/*!Select2 4.0.5 | https://github.com/select2/select2/blob/master/LICENSE.md*/
!function(a) {
    "function" == typeof define && define.amd ? define(["jquery"], a) : "object" == typeof module && module.exports ? module.exports = function(b, c) {
        return void 0 === c && (c = "undefined" != typeof window ? require("jquery") : require("jquery")(b)),
        a(c),
        c
    }
    : a(jQuery)
}(function(a) {
    var b = function() {
        if (a && a.fn && a.fn.select2 && a.fn.select2.amd)
            var b = a.fn.select2.amd;
        var b;
        return function() {
            if (!b || !b.requirejs) {
                b ? c = b : b = {};
                var a, c, d;
                !function(b) {
                    function e(a, b) {
                        return v.call(a, b)
                    }
                    function f(a, b) {
                        var c, d, e, f, g, h, i, j, k, l, m, n, o = b && b.split("/"), p = t.map, q = p && p["*"] || {};
                        if (a) {
                            for (a = a.split("/"),
                            g = a.length - 1,
                            t.nodeIdCompat && x.test(a[g]) && (a[g] = a[g].replace(x, "")),
                            "." === a[0].charAt(0) && o && (n = o.slice(0, o.length - 1),
                            a = n.concat(a)),
                            k = 0; k < a.length; k++)
                                if ("." === (m = a[k]))
                                    a.splice(k, 1),
                                    k -= 1;
                                else if (".." === m) {
                                    if (0 === k || 1 === k && ".." === a[2] || ".." === a[k - 1])
                                        continue;
                                    k > 0 && (a.splice(k - 1, 2),
                                    k -= 2)
                                }
                            a = a.join("/")
                        }
                        if ((o || q) && p) {
                            for (c = a.split("/"),
                            k = c.length; k > 0; k -= 1) {
                                if (d = c.slice(0, k).join("/"),
                                o)
                                    for (l = o.length; l > 0; l -= 1)
                                        if ((e = p[o.slice(0, l).join("/")]) && (e = e[d])) {
                                            f = e,
                                            h = k;
                                            break
                                        }
                                if (f)
                                    break;
                                !i && q && q[d] && (i = q[d],
                                j = k)
                            }
                            !f && i && (f = i,
                            h = j),
                            f && (c.splice(0, h, f),
                            a = c.join("/"))
                        }
                        return a
                    }
                    function g(a, c) {
                        return function() {
                            var d = w.call(arguments, 0);
                            return "string" != typeof d[0] && 1 === d.length && d.push(null),
                            o.apply(b, d.concat([a, c]))
                        }
                    }
                    function h(a) {
                        return function(b) {
                            return f(b, a)
                        }
                    }
                    function i(a) {
                        return function(b) {
                            r[a] = b
                        }
                    }
                    function j(a) {
                        if (e(s, a)) {
                            var c = s[a];
                            delete s[a],
                            u[a] = !0,
                            n.apply(b, c)
                        }
                        if (!e(r, a) && !e(u, a))
                            throw new Error("No " + a);
                        return r[a]
                    }
                    function k(a) {
                        var b, c = a ? a.indexOf("!") : -1;
                        return c > -1 && (b = a.substring(0, c),
                        a = a.substring(c + 1, a.length)),
                        [b, a]
                    }
                    function l(a) {
                        return a ? k(a) : []
                    }
                    function m(a) {
                        return function() {
                            return t && t.config && t.config[a] || {}
                        }
                    }
                    var n, o, p, q, r = {}, s = {}, t = {}, u = {}, v = Object.prototype.hasOwnProperty, w = [].slice, x = /\.js$/;
                    p = function(a, b) {
                        var c, d = k(a), e = d[0], g = b[1];
                        return a = d[1],
                        e && (e = f(e, g),
                        c = j(e)),
                        e ? a = c && c.normalize ? c.normalize(a, h(g)) : f(a, g) : (a = f(a, g),
                        d = k(a),
                        e = d[0],
                        a = d[1],
                        e && (c = j(e))),
                        {
                            f: e ? e + "!" + a : a,
                            n: a,
                            pr: e,
                            p: c
                        }
                    }
                    ,
                    q = {
                        require: function(a) {
                            return g(a)
                        },
                        exports: function(a) {
                            var b = r[a];
                            return void 0 !== b ? b : r[a] = {}
                        },
                        module: function(a) {
                            return {
                                id: a,
                                uri: "",
                                exports: r[a],
                                config: m(a)
                            }
                        }
                    },
                    n = function(a, c, d, f) {
                        var h, k, m, n, o, t, v, w = [], x = typeof d;
                        if (f = f || a,
                        t = l(f),
                        "undefined" === x || "function" === x) {
                            for (c = !c.length && d.length ? ["require", "exports", "module"] : c,
                            o = 0; o < c.length; o += 1)
                                if (n = p(c[o], t),
                                "require" === (k = n.f))
                                    w[o] = q.require(a);
                                else if ("exports" === k)
                                    w[o] = q.exports(a),
                                    v = !0;
                                else if ("module" === k)
                                    h = w[o] = q.module(a);
                                else if (e(r, k) || e(s, k) || e(u, k))
                                    w[o] = j(k);
                                else {
                                    if (!n.p)
                                        throw new Error(a + " missing " + k);
                                    n.p.load(n.n, g(f, !0), i(k), {}),
                                    w[o] = r[k]
                                }
                            m = d ? d.apply(r[a], w) : void 0,
                            a && (h && h.exports !== b && h.exports !== r[a] ? r[a] = h.exports : m === b && v || (r[a] = m))
                        } else
                            a && (r[a] = d)
                    }
                    ,
                    a = c = o = function(a, c, d, e, f) {
                        if ("string" == typeof a)
                            return q[a] ? q[a](c) : j(p(a, l(c)).f);
                        if (!a.splice) {
                            if (t = a,
                            t.deps && o(t.deps, t.callback),
                            !c)
                                return;
                            c.splice ? (a = c,
                            c = d,
                            d = null) : a = b
                        }
                        return c = c || function() {}
                        ,
                        "function" == typeof d && (d = e,
                        e = f),
                        e ? n(b, a, c, d) : setTimeout(function() {
                            n(b, a, c, d)
                        }, 4),
                        o
                    }
                    ,
                    o.config = function(a) {
                        return o(a)
                    }
                    ,
                    a._defined = r,
                    d = function(a, b, c) {
                        if ("string" != typeof a)
                            throw new Error("See almond README: incorrect module build, no module name");
                        b.splice || (c = b,
                        b = []),
                        e(r, a) || e(s, a) || (s[a] = [a, b, c])
                    }
                    ,
                    d.amd = {
                        jQuery: !0
                    }
                }(),
                b.requirejs = a,
                b.require = c,
                b.define = d
            }
        }(),
        b.define("almond", function() {}),
        b.define("jquery", [], function() {
            var b = a || $;
            return null == b && console && console.error && console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),
            b
        }),
        b.define("select2/utils", ["jquery"], function(a) {
            function b(a) {
                var b = a.prototype
                  , c = [];
                for (var d in b) {
                    "function" == typeof b[d] && ("constructor" !== d && c.push(d))
                }
                return c
            }
            var c = {};
            c.Extend = function(a, b) {
                function c() {
                    this.constructor = a
                }
                var d = {}.hasOwnProperty;
                for (var e in b)
                    d.call(b, e) && (a[e] = b[e]);
                return c.prototype = b.prototype,
                a.prototype = new c,
                a.__super__ = b.prototype,
                a
            }
            ,
            c.Decorate = function(a, c) {
                function d() {
                    var b = Array.prototype.unshift
                      , d = c.prototype.constructor.length
                      , e = a.prototype.constructor;
                    d > 0 && (b.call(arguments, a.prototype.constructor),
                    e = c.prototype.constructor),
                    e.apply(this, arguments)
                }
                function e() {
                    this.constructor = d
                }
                var f = b(c)
                  , g = b(a);
                c.displayName = a.displayName,
                d.prototype = new e;
                for (var h = 0; h < g.length; h++) {
                    var i = g[h];
                    d.prototype[i] = a.prototype[i]
                }
                for (var j = (function(a) {
                    var b = function() {};
                    a in d.prototype && (b = d.prototype[a]);
                    var e = c.prototype[a];
                    return function() {
                        return Array.prototype.unshift.call(arguments, b),
                        e.apply(this, arguments)
                    }
                }
                ), k = 0; k < f.length; k++) {
                    var l = f[k];
                    d.prototype[l] = j(l)
                }
                return d
            }
            ;
            var d = function() {
                this.listeners = {}
            };
            return d.prototype.on = function(a, b) {
                this.listeners = this.listeners || {},
                a in this.listeners ? this.listeners[a].push(b) : this.listeners[a] = [b]
            }
            ,
            d.prototype.trigger = function(a) {
                var b = Array.prototype.slice
                  , c = b.call(arguments, 1);
                this.listeners = this.listeners || {},
                null == c && (c = []),
                0 === c.length && c.push({}),
                c[0]._type = a,
                a in this.listeners && this.invoke(this.listeners[a], b.call(arguments, 1)),
                "*"in this.listeners && this.invoke(this.listeners["*"], arguments)
            }
            ,
            d.prototype.invoke = function(a, b) {
                for (var c = 0, d = a.length; c < d; c++)
                    a[c].apply(this, b)
            }
            ,
            c.Observable = d,
            c.generateChars = function(a) {
                for (var b = "", c = 0; c < a; c++) {
                    b += Math.floor(36 * Math.random()).toString(36)
                }
                return b
            }
            ,
            c.bind = function(a, b) {
                return function() {
                    a.apply(b, arguments)
                }
            }
            ,
            c._convertData = function(a) {
                for (var b in a) {
                    var c = b.split("-")
                      , d = a;
                    if (1 !== c.length) {
                        for (var e = 0; e < c.length; e++) {
                            var f = c[e];
                            f = f.substring(0, 1).toLowerCase() + f.substring(1),
                            f in d || (d[f] = {}),
                            e == c.length - 1 && (d[f] = a[b]),
                            d = d[f]
                        }
                        delete a[b]
                    }
                }
                return a
            }
            ,
            c.hasScroll = function(b, c) {
                var d = a(c)
                  , e = c.style.overflowX
                  , f = c.style.overflowY;
                return (e !== f || "hidden" !== f && "visible" !== f) && ("scroll" === e || "scroll" === f || (d.innerHeight() < c.scrollHeight || d.innerWidth() < c.scrollWidth))
            }
            ,
            c.escapeMarkup = function(a) {
                var b = {
                    "\\": "&#92;",
                    "&": "&amp;",
                    "<": "&lt;",
                    ">": "&gt;",
                    '"': "&quot;",
                    "'": "&#39;",
                    "/": "&#47;"
                };
                return "string" != typeof a ? a : String(a).replace(/[&<>"'\/\\]/g, function(a) {
                    return b[a]
                })
            }
            ,
            c.appendMany = function(b, c) {
                if ("1.7" === a.fn.jquery.substr(0, 3)) {
                    var d = a();
                    a.map(c, function(a) {
                        d = d.add(a)
                    }),
                    c = d
                }
                b.append(c)
            }
            ,
            c
        }),
        b.define("select2/results", ["jquery", "./utils"], function(a, b) {
            function c(a, b, d) {
                this.$element = a,
                this.data = d,
                this.options = b,
                c.__super__.constructor.call(this)
            }
            return b.Extend(c, b.Observable),
            c.prototype.render = function() {
                var b = a('<ul class="select2-results__options" role="tree"></ul>');
                return this.options.get("multiple") && b.attr("aria-multiselectable", "true"),
                this.$results = b,
                b
            }
            ,
            c.prototype.clear = function() {
                this.$results.empty()
            }
            ,
            c.prototype.displayMessage = function(b) {
                var c = this.options.get("escapeMarkup");
                this.clear(),
                this.hideLoading();
                var d = a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>')
                  , e = this.options.get("translations").get(b.message);
                d.append(c(e(b.args))),
                d[0].className += " select2-results__message",
                this.$results.append(d)
            }
            ,
            c.prototype.hideMessages = function() {
                this.$results.find(".select2-results__message").remove()
            }
            ,
            c.prototype.append = function(a) {
                this.hideLoading();
                var b = [];
                if (null == a.results || 0 === a.results.length)
                    return void (0 === this.$results.children().length && this.trigger("results:message", {
                        message: "noResults"
                    }));
                a.results = this.sort(a.results);
                for (var c = 0; c < a.results.length; c++) {
                    var d = a.results[c]
                      , e = this.option(d);
                    b.push(e)
                }
                this.$results.append(b)
            }
            ,
            c.prototype.position = function(a, b) {
                b.find(".select2-results").append(a)
            }
            ,
            c.prototype.sort = function(a) {
                return this.options.get("sorter")(a)
            }
            ,
            c.prototype.highlightFirstItem = function() {
                var a = this.$results.find(".select2-results__option[aria-selected]")
                  , b = a.filter("[aria-selected=true]");
                b.length > 0 ? b.first().trigger("mouseenter") : a.first().trigger("mouseenter"),
                this.ensureHighlightVisible()
            }
            ,
            c.prototype.setClasses = function() {
                var b = this;
                this.data.current(function(c) {
                    var d = a.map(c, function(a) {
                        return a.id.toString()
                    });
                    b.$results.find(".select2-results__option[aria-selected]").each(function() {
                        var b = a(this)
                          , c = a.data(this, "data")
                          , e = "" + c.id;
                        null != c.element && c.element.selected || null == c.element && a.inArray(e, d) > -1 ? b.attr("aria-selected", "true") : b.attr("aria-selected", "false")
                    })
                })
            }
            ,
            c.prototype.showLoading = function(a) {
                this.hideLoading();
                var b = this.options.get("translations").get("searching")
                  , c = {
                    disabled: !0,
                    loading: !0,
                    text: b(a)
                }
                  , d = this.option(c);
                d.className += " loading-results",
                this.$results.prepend(d)
            }
            ,
            c.prototype.hideLoading = function() {
                this.$results.find(".loading-results").remove()
            }
            ,
            c.prototype.option = function(b) {
                var c = document.createElement("li");
                c.className = "select2-results__option";
                var d = {
                    role: "treeitem",
                    "aria-selected": "false"
                };
                b.disabled && (delete d["aria-selected"],
                d["aria-disabled"] = "true"),
                null == b.id && delete d["aria-selected"],
                null != b._resultId && (c.id = b._resultId),
                b.title && (c.title = b.title),
                b.children && (d.role = "group",
                d["aria-label"] = b.text,
                delete d["aria-selected"]);
                for (var e in d) {
                    var f = d[e];
                    c.setAttribute(e, f)
                }
                if (b.children) {
                    var g = a(c)
                      , h = document.createElement("strong");
                    h.className = "select2-results__group";
                    a(h);
                    this.template(b, h);
                    for (var i = [], j = 0; j < b.children.length; j++) {
                        var k = b.children[j]
                          , l = this.option(k);
                        i.push(l)
                    }
                    var m = a("<ul></ul>", {
                        class: "select2-results__options select2-results__options--nested"
                    });
                    m.append(i),
                    g.append(h),
                    g.append(m)
                } else
                    this.template(b, c);
                return a.data(c, "data", b),
                c
            }
            ,
            c.prototype.bind = function(b, c) {
                var d = this
                  , e = b.id + "-results";
                this.$results.attr("id", e),
                b.on("results:all", function(a) {
                    d.clear(),
                    d.append(a.data),
                    b.isOpen() && (d.setClasses(),
                    d.highlightFirstItem())
                }),
                b.on("results:append", function(a) {
                    d.append(a.data),
                    b.isOpen() && d.setClasses()
                }),
                b.on("query", function(a) {
                    d.hideMessages(),
                    d.showLoading(a)
                }),
                b.on("select", function() {
                    b.isOpen() && (d.setClasses(),
                    d.highlightFirstItem())
                }),
                b.on("unselect", function() {
                    b.isOpen() && (d.setClasses(),
                    d.highlightFirstItem())
                }),
                b.on("open", function() {
                    d.$results.attr("aria-expanded", "true"),
                    d.$results.attr("aria-hidden", "false"),
                    d.setClasses(),
                    d.ensureHighlightVisible()
                }),
                b.on("close", function() {
                    d.$results.attr("aria-expanded", "false"),
                    d.$results.attr("aria-hidden", "true"),
                    d.$results.removeAttr("aria-activedescendant")
                }),
                b.on("results:toggle", function() {
                    var a = d.getHighlightedResults();
                    0 !== a.length && a.trigger("mouseup")
                }),
                b.on("results:select", function() {
                    var a = d.getHighlightedResults();
                    if (0 !== a.length) {
                        var b = a.data("data");
                        "true" == a.attr("aria-selected") ? d.trigger("close", {}) : d.trigger("select", {
                            data: b
                        })
                    }
                }),
                b.on("results:previous", function() {
                    var a = d.getHighlightedResults()
                      , b = d.$results.find("[aria-selected]")
                      , c = b.index(a);
                    if (0 !== c) {
                        var e = c - 1;
                        0 === a.length && (e = 0);
                        var f = b.eq(e);
                        f.trigger("mouseenter");
                        var g = d.$results.offset().top
                          , h = f.offset().top
                          , i = d.$results.scrollTop() + (h - g);
                        0 === e ? d.$results.scrollTop(0) : h - g < 0 && d.$results.scrollTop(i)
                    }
                }),
                b.on("results:next", function() {
                    var a = d.getHighlightedResults()
                      , b = d.$results.find("[aria-selected]")
                      , c = b.index(a)
                      , e = c + 1;
                    if (!(e >= b.length)) {
                        var f = b.eq(e);
                        f.trigger("mouseenter");
                        var g = d.$results.offset().top + d.$results.outerHeight(!1)
                          , h = f.offset().top + f.outerHeight(!1)
                          , i = d.$results.scrollTop() + h - g;
                        0 === e ? d.$results.scrollTop(0) : h > g && d.$results.scrollTop(i)
                    }
                }),
                b.on("results:focus", function(a) {
                    a.element.addClass("select2-results__option--highlighted")
                }),
                b.on("results:message", function(a) {
                    d.displayMessage(a)
                }),
                a.fn.mousewheel && this.$results.on("mousewheel", function(a) {
                    var b = d.$results.scrollTop()
                      , c = d.$results.get(0).scrollHeight - b + a.deltaY
                      , e = a.deltaY > 0 && b - a.deltaY <= 0
                      , f = a.deltaY < 0 && c <= d.$results.height();
                    e ? (d.$results.scrollTop(0),
                    a.preventDefault(),
                    a.stopPropagation()) : f && (d.$results.scrollTop(d.$results.get(0).scrollHeight - d.$results.height()),
                    a.preventDefault(),
                    a.stopPropagation())
                }),
                this.$results.on("mouseup", ".select2-results__option[aria-selected]", function(b) {
                    var c = a(this)
                      , e = c.data("data");
                    if ("true" === c.attr("aria-selected"))
                        return void (d.options.get("multiple") ? d.trigger("unselect", {
                            originalEvent: b,
                            data: e
                        }) : d.trigger("close", {}));
                    d.trigger("select", {
                        originalEvent: b,
                        data: e
                    })
                }),
                this.$results.on("mouseenter", ".select2-results__option[aria-selected]", function(b) {
                    var c = a(this).data("data");
                    d.getHighlightedResults().removeClass("select2-results__option--highlighted"),
                    d.trigger("results:focus", {
                        data: c,
                        element: a(this)
                    })
                })
            }
            ,
            c.prototype.getHighlightedResults = function() {
                return this.$results.find(".select2-results__option--highlighted")
            }
            ,
            c.prototype.destroy = function() {
                this.$results.remove()
            }
            ,
            c.prototype.ensureHighlightVisible = function() {
                var a = this.getHighlightedResults();
                if (0 !== a.length) {
                    var b = this.$results.find("[aria-selected]")
                      , c = b.index(a)
                      , d = this.$results.offset().top
                      , e = a.offset().top
                      , f = this.$results.scrollTop() + (e - d)
                      , g = e - d;
                    f -= 2 * a.outerHeight(!1),
                    c <= 2 ? this.$results.scrollTop(0) : (g > this.$results.outerHeight() || g < 0) && this.$results.scrollTop(f)
                }
            }
            ,
            c.prototype.template = function(b, c) {
                var d = this.options.get("templateResult")
                  , e = this.options.get("escapeMarkup")
                  , f = d(b, c);
                null == f ? c.style.display = "none" : "string" == typeof f ? c.innerHTML = e(f) : a(c).append(f)
            }
            ,
            c
        }),
        b.define("select2/keys", [], function() {
            return {
                BACKSPACE: 8,
                TAB: 9,
                ENTER: 13,
                SHIFT: 16,
                CTRL: 17,
                ALT: 18,
                ESC: 27,
                SPACE: 32,
                PAGE_UP: 33,
                PAGE_DOWN: 34,
                END: 35,
                HOME: 36,
                LEFT: 37,
                UP: 38,
                RIGHT: 39,
                DOWN: 40,
                DELETE: 46
            }
        }),
        b.define("select2/selection/base", ["jquery", "../utils", "../keys"], function(a, b, c) {
            function d(a, b) {
                this.$element = a,
                this.options = b,
                d.__super__.constructor.call(this)
            }
            return b.Extend(d, b.Observable),
            d.prototype.render = function() {
                var b = a('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');
                return this._tabindex = 0,
                null != this.$element.data("old-tabindex") ? this._tabindex = this.$element.data("old-tabindex") : null != this.$element.attr("tabindex") && (this._tabindex = this.$element.attr("tabindex")),
                b.attr("title", this.$element.attr("title")),
                b.attr("tabindex", this._tabindex),
                this.$selection = b,
                b
            }
            ,
            d.prototype.bind = function(a, b) {
                var d = this
                  , e = (a.id,
                a.id + "-results");
                this.container = a,
                this.$selection.on("focus", function(a) {
                    d.trigger("focus", a)
                }),
                this.$selection.on("blur", function(a) {
                    d._handleBlur(a)
                }),
                this.$selection.on("keydown", function(a) {
                    d.trigger("keypress", a),
                    a.which === c.SPACE && a.preventDefault()
                }),
                a.on("results:focus", function(a) {
                    d.$selection.attr("aria-activedescendant", a.data._resultId)
                }),
                a.on("selection:update", function(a) {
                    d.update(a.data)
                }),
                a.on("open", function() {
                    d.$selection.attr("aria-expanded", "true"),
                    d.$selection.attr("aria-owns", e),
                    d._attachCloseHandler(a)
                }),
                a.on("close", function() {
                    d.$selection.attr("aria-expanded", "false"),
                    d.$selection.removeAttr("aria-activedescendant"),
                    d.$selection.removeAttr("aria-owns"),
                    d.$selection.focus(),
                    d._detachCloseHandler(a)
                }),
                a.on("enable", function() {
                    d.$selection.attr("tabindex", d._tabindex)
                }),
                a.on("disable", function() {
                    d.$selection.attr("tabindex", "-1")
                })
            }
            ,
            d.prototype._handleBlur = function(b) {
                var c = this;
                window.setTimeout(function() {
                    document.activeElement == c.$selection[0] || a.contains(c.$selection[0], document.activeElement) || c.trigger("blur", b)
                }, 1)
            }
            ,
            d.prototype._attachCloseHandler = function(b) {
                a(document.body).on("mousedown.select2." + b.id, function(b) {
                    var c = a(b.target)
                      , d = c.closest(".select2");
                    a(".select2.select2-container--open").each(function() {
                        var b = a(this);
                        this != d[0] && b.data("element").select2("close")
                    })
                })
            }
            ,
            d.prototype._detachCloseHandler = function(b) {
                a(document.body).off("mousedown.select2." + b.id)
            }
            ,
            d.prototype.position = function(a, b) {
                b.find(".selection").append(a)
            }
            ,
            d.prototype.destroy = function() {
                this._detachCloseHandler(this.container)
            }
            ,
            d.prototype.update = function(a) {
                throw new Error("The `update` method must be defined in child classes.")
            }
            ,
            d
        }),
        b.define("select2/selection/single", ["jquery", "./base", "../utils", "../keys"], function(a, b, c, d) {
            function e() {
                e.__super__.constructor.apply(this, arguments)
            }
            return c.Extend(e, b),
            e.prototype.render = function() {
                var a = e.__super__.render.call(this);
                return a.addClass("select2-selection--single"),
                a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),
                a
            }
            ,
            e.prototype.bind = function(a, b) {
                var c = this;
                e.__super__.bind.apply(this, arguments);
                var d = a.id + "-container";
                this.$selection.find(".select2-selection__rendered").attr("id", d),
                this.$selection.attr("aria-labelledby", d),
                this.$selection.on("mousedown", function(a) {
                    1 === a.which && c.trigger("toggle", {
                        originalEvent: a
                    })
                }),
                this.$selection.on("focus", function(a) {}),
                this.$selection.on("blur", function(a) {}),
                a.on("focus", function(b) {
                    a.isOpen() || c.$selection.focus()
                }),
                a.on("selection:update", function(a) {
                    c.update(a.data)
                })
            }
            ,
            e.prototype.clear = function() {
                this.$selection.find(".select2-selection__rendered").empty()
            }
            ,
            e.prototype.display = function(a, b) {
                var c = this.options.get("templateSelection");
                return this.options.get("escapeMarkup")(c(a, b))
            }
            ,
            e.prototype.selectionContainer = function() {
                return a("<span></span>")
            }
            ,
            e.prototype.update = function(a) {
                if (0 === a.length)
                    return void this.clear();
                var b = a[0]
                  , c = this.$selection.find(".select2-selection__rendered")
                  , d = this.display(b, c);
                c.empty().append(d),
                c.prop("title", b.title || b.text)
            }
            ,
            e
        }),
        b.define("select2/selection/multiple", ["jquery", "./base", "../utils"], function(a, b, c) {
            function d(a, b) {
                d.__super__.constructor.apply(this, arguments)
            }
            return c.Extend(d, b),
            d.prototype.render = function() {
                var a = d.__super__.render.call(this);
                return a.addClass("select2-selection--multiple"),
                a.html('<ul class="select2-selection__rendered"></ul>'),
                a
            }
            ,
            d.prototype.bind = function(b, c) {
                var e = this;
                d.__super__.bind.apply(this, arguments),
                this.$selection.on("click", function(a) {
                    e.trigger("toggle", {
                        originalEvent: a
                    })
                }),
                this.$selection.on("click", ".select2-selection__choice__remove", function(b) {
                    if (!e.options.get("disabled")) {
                        var c = a(this)
                          , d = c.parent()
                          , f = d.data("data");
                        e.trigger("unselect", {
                            originalEvent: b,
                            data: f
                        })
                    }
                })
            }
            ,
            d.prototype.clear = function() {
                this.$selection.find(".select2-selection__rendered").empty()
            }
            ,
            d.prototype.display = function(a, b) {
                var c = this.options.get("templateSelection");
                return this.options.get("escapeMarkup")(c(a, b))
            }
            ,
            d.prototype.selectionContainer = function() {
                return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')
            }
            ,
            d.prototype.update = function(a) {
                if (this.clear(),
                0 !== a.length) {
                    for (var b = [], d = 0; d < a.length; d++) {
                        var e = a[d]
                          , f = this.selectionContainer()
                          , g = this.display(e, f);
                        f.append(g),
                        f.prop("title", e.title || e.text),
                        f.data("data", e),
                        b.push(f)
                    }
                    var h = this.$selection.find(".select2-selection__rendered");
                    c.appendMany(h, b)
                }
            }
            ,
            d
        }),
        b.define("select2/selection/placeholder", ["../utils"], function(a) {
            function b(a, b, c) {
                this.placeholder = this.normalizePlaceholder(c.get("placeholder")),
                a.call(this, b, c)
            }
            return b.prototype.normalizePlaceholder = function(a, b) {
                return "string" == typeof b && (b = {
                    id: "",
                    text: b
                }),
                b
            }
            ,
            b.prototype.createPlaceholder = function(a, b) {
                var c = this.selectionContainer();
                return c.html(this.display(b)),
                c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),
                c
            }
            ,
            b.prototype.update = function(a, b) {
                var c = 1 == b.length && b[0].id != this.placeholder.id;
                if (b.length > 1 || c)
                    return a.call(this, b);
                this.clear();
                var d = this.createPlaceholder(this.placeholder);
                this.$selection.find(".select2-selection__rendered").append(d)
            }
            ,
            b
        }),
        b.define("select2/selection/allowClear", ["jquery", "../keys"], function(a, b) {
            function c() {}
            return c.prototype.bind = function(a, b, c) {
                var d = this;
                a.call(this, b, c),
                null == this.placeholder && this.options.get("debug") && window.console && console.error && console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),
                this.$selection.on("mousedown", ".select2-selection__clear", function(a) {
                    d._handleClear(a)
                }),
                b.on("keypress", function(a) {
                    d._handleKeyboardClear(a, b)
                })
            }
            ,
            c.prototype._handleClear = function(a, b) {
                if (!this.options.get("disabled")) {
                    var c = this.$selection.find(".select2-selection__clear");
                    if (0 !== c.length) {
                        b.stopPropagation();
                        for (var d = c.data("data"), e = 0; e < d.length; e++) {
                            var f = {
                                data: d[e]
                            };
                            if (this.trigger("unselect", f),
                            f.prevented)
                                return
                        }
                        this.$element.val(this.placeholder.id).trigger("change"),
                        this.trigger("toggle", {})
                    }
                }
            }
            ,
            c.prototype._handleKeyboardClear = function(a, c, d) {
                d.isOpen() || c.which != b.DELETE && c.which != b.BACKSPACE || this._handleClear(c)
            }
            ,
            c.prototype.update = function(b, c) {
                if (b.call(this, c),
                !(this.$selection.find(".select2-selection__placeholder").length > 0 || 0 === c.length)) {
                    var d = a('<span class="select2-selection__clear">&times;</span>');
                    d.data("data", c),
                    this.$selection.find(".select2-selection__rendered").prepend(d)
                }
            }
            ,
            c
        }),
        b.define("select2/selection/search", ["jquery", "../utils", "../keys"], function(a, b, c) {
            function d(a, b, c) {
                a.call(this, b, c)
            }
            return d.prototype.render = function(b) {
                var c = a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');
                this.$searchContainer = c,
                this.$search = c.find("input");
                var d = b.call(this);
                return this._transferTabIndex(),
                d
            }
            ,
            d.prototype.bind = function(a, b, d) {
                var e = this;
                a.call(this, b, d),
                b.on("open", function() {
                    e.$search.trigger("focus")
                }),
                b.on("close", function() {
                    e.$search.val(""),
                    e.$search.removeAttr("aria-activedescendant"),
                    e.$search.trigger("focus")
                }),
                b.on("enable", function() {
                    e.$search.prop("disabled", !1),
                    e._transferTabIndex()
                }),
                b.on("disable", function() {
                    e.$search.prop("disabled", !0)
                }),
                b.on("focus", function(a) {
                    e.$search.trigger("focus")
                }),
                b.on("results:focus", function(a) {
                    e.$search.attr("aria-activedescendant", a.id)
                }),
                this.$selection.on("focusin", ".select2-search--inline", function(a) {
                    e.trigger("focus", a)
                }),
                this.$selection.on("focusout", ".select2-search--inline", function(a) {
                    e._handleBlur(a)
                }),
                this.$selection.on("keydown", ".select2-search--inline", function(a) {
                    if (a.stopPropagation(),
                    e.trigger("keypress", a),
                    e._keyUpPrevented = a.isDefaultPrevented(),
                    a.which === c.BACKSPACE && "" === e.$search.val()) {
                        var b = e.$searchContainer.prev(".select2-selection__choice");
                        if (b.length > 0) {
                            var d = b.data("data");
                            e.searchRemoveChoice(d),
                            a.preventDefault()
                        }
                    }
                });
                var f = document.documentMode
                  , g = f && f <= 11;
                this.$selection.on("input.searchcheck", ".select2-search--inline", function(a) {
                    if (g)
                        return void e.$selection.off("input.search input.searchcheck");
                    e.$selection.off("keyup.search")
                }),
                this.$selection.on("keyup.search input.search", ".select2-search--inline", function(a) {
                    if (g && "input" === a.type)
                        return void e.$selection.off("input.search input.searchcheck");
                    var b = a.which;
                    b != c.SHIFT && b != c.CTRL && b != c.ALT && b != c.TAB && e.handleSearch(a)
                })
            }
            ,
            d.prototype._transferTabIndex = function(a) {
                this.$search.attr("tabindex", this.$selection.attr("tabindex")),
                this.$selection.attr("tabindex", "-1")
            }
            ,
            d.prototype.createPlaceholder = function(a, b) {
                this.$search.attr("placeholder", b.text)
            }
            ,
            d.prototype.update = function(a, b) {
                var c = this.$search[0] == document.activeElement;
                this.$search.attr("placeholder", ""),
                a.call(this, b),
                this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),
                this.resizeSearch(),
                c && this.$search.focus()
            }
            ,
            d.prototype.handleSearch = function() {
                if (this.resizeSearch(),
                !this._keyUpPrevented) {
                    var a = this.$search.val();
                    this.trigger("query", {
                        term: a
                    })
                }
                this._keyUpPrevented = !1
            }
            ,
            d.prototype.searchRemoveChoice = function(a, b) {
                this.trigger("unselect", {
                    data: b
                }),
                this.$search.val(b.text),
                this.handleSearch()
            }
            ,
            d.prototype.resizeSearch = function() {
                this.$search.css("width", "25px");
                var a = "";
                if ("" !== this.$search.attr("placeholder"))
                    a = this.$selection.find(".select2-selection__rendered").innerWidth();
                else {
                    a = .75 * (this.$search.val().length + 1) + "em"
                }
                this.$search.css("width", a)
            }
            ,
            d
        }),
        b.define("select2/selection/eventRelay", ["jquery"], function(a) {
            function b() {}
            return b.prototype.bind = function(b, c, d) {
                var e = this
                  , f = ["open", "opening", "close", "closing", "select", "selecting", "unselect", "unselecting"]
                  , g = ["opening", "closing", "selecting", "unselecting"];
                b.call(this, c, d),
                c.on("*", function(b, c) {
                    if (-1 !== a.inArray(b, f)) {
                        c = c || {};
                        var d = a.Event("select2:" + b, {
                            params: c
                        });
                        e.$element.trigger(d),
                        -1 !== a.inArray(b, g) && (c.prevented = d.isDefaultPrevented())
                    }
                })
            }
            ,
            b
        }),
        b.define("select2/translation", ["jquery", "require"], function(a, b) {
            function c(a) {
                this.dict = a || {}
            }
            return c.prototype.all = function() {
                return this.dict
            }
            ,
            c.prototype.get = function(a) {
                return this.dict[a]
            }
            ,
            c.prototype.extend = function(b) {
                this.dict = a.extend({}, b.all(), this.dict)
            }
            ,
            c._cache = {},
            c.loadPath = function(a) {
                if (!(a in c._cache)) {
                    var d = b(a);
                    c._cache[a] = d
                }
                return new c(c._cache[a])
            }
            ,
            c
        }),
        b.define("select2/diacritics", [], function() {
            return {
                "Ⓐ": "A",
                "Ａ": "A",
                "À": "A",
                "Á": "A",
                "Â": "A",
                "Ầ": "A",
                "Ấ": "A",
                "Ẫ": "A",
                "Ẩ": "A",
                "Ã": "A",
                "Ā": "A",
                "Ă": "A",
                "Ằ": "A",
                "Ắ": "A",
                "Ẵ": "A",
                "Ẳ": "A",
                "Ȧ": "A",
                "Ǡ": "A",
                "Ä": "A",
                "Ǟ": "A",
                "Ả": "A",
                "Å": "A",
                "Ǻ": "A",
                "Ǎ": "A",
                "Ȁ": "A",
                "Ȃ": "A",
                "Ạ": "A",
                "Ậ": "A",
                "Ặ": "A",
                "Ḁ": "A",
                "Ą": "A",
                "Ⱥ": "A",
                "Ɐ": "A",
                "Ꜳ": "AA",
                "Æ": "AE",
                "Ǽ": "AE",
                "Ǣ": "AE",
                "Ꜵ": "AO",
                "Ꜷ": "AU",
                "Ꜹ": "AV",
                "Ꜻ": "AV",
                "Ꜽ": "AY",
                "Ⓑ": "B",
                "Ｂ": "B",
                "Ḃ": "B",
                "Ḅ": "B",
                "Ḇ": "B",
                "Ƀ": "B",
                "Ƃ": "B",
                "Ɓ": "B",
                "Ⓒ": "C",
                "Ｃ": "C",
                "Ć": "C",
                "Ĉ": "C",
                "Ċ": "C",
                "Č": "C",
                "Ç": "C",
                "Ḉ": "C",
                "Ƈ": "C",
                "Ȼ": "C",
                "Ꜿ": "C",
                "Ⓓ": "D",
                "Ｄ": "D",
                "Ḋ": "D",
                "Ď": "D",
                "Ḍ": "D",
                "Ḑ": "D",
                "Ḓ": "D",
                "Ḏ": "D",
                "Đ": "D",
                "Ƌ": "D",
                "Ɗ": "D",
                "Ɖ": "D",
                "Ꝺ": "D",
                "Ǳ": "DZ",
                "Ǆ": "DZ",
                "ǲ": "Dz",
                "ǅ": "Dz",
                "Ⓔ": "E",
                "Ｅ": "E",
                "È": "E",
                "É": "E",
                "Ê": "E",
                "Ề": "E",
                "Ế": "E",
                "Ễ": "E",
                "Ể": "E",
                "Ẽ": "E",
                "Ē": "E",
                "Ḕ": "E",
                "Ḗ": "E",
                "Ĕ": "E",
                "Ė": "E",
                "Ë": "E",
                "Ẻ": "E",
                "Ě": "E",
                "Ȅ": "E",
                "Ȇ": "E",
                "Ẹ": "E",
                "Ệ": "E",
                "Ȩ": "E",
                "Ḝ": "E",
                "Ę": "E",
                "Ḙ": "E",
                "Ḛ": "E",
                "Ɛ": "E",
                "Ǝ": "E",
                "Ⓕ": "F",
                "Ｆ": "F",
                "Ḟ": "F",
                "Ƒ": "F",
                "Ꝼ": "F",
                "Ⓖ": "G",
                "Ｇ": "G",
                "Ǵ": "G",
                "Ĝ": "G",
                "Ḡ": "G",
                "Ğ": "G",
                "Ġ": "G",
                "Ǧ": "G",
                "Ģ": "G",
                "Ǥ": "G",
                "Ɠ": "G",
                "Ꞡ": "G",
                "Ᵹ": "G",
                "Ꝿ": "G",
                "Ⓗ": "H",
                "Ｈ": "H",
                "Ĥ": "H",
                "Ḣ": "H",
                "Ḧ": "H",
                "Ȟ": "H",
                "Ḥ": "H",
                "Ḩ": "H",
                "Ḫ": "H",
                "Ħ": "H",
                "Ⱨ": "H",
                "Ⱶ": "H",
                "Ɥ": "H",
                "Ⓘ": "I",
                "Ｉ": "I",
                "Ì": "I",
                "Í": "I",
                "Î": "I",
                "Ĩ": "I",
                "Ī": "I",
                "Ĭ": "I",
                "İ": "I",
                "Ï": "I",
                "Ḯ": "I",
                "Ỉ": "I",
                "Ǐ": "I",
                "Ȉ": "I",
                "Ȋ": "I",
                "Ị": "I",
                "Į": "I",
                "Ḭ": "I",
                "Ɨ": "I",
                "Ⓙ": "J",
                "Ｊ": "J",
                "Ĵ": "J",
                "Ɉ": "J",
                "Ⓚ": "K",
                "Ｋ": "K",
                "Ḱ": "K",
                "Ǩ": "K",
                "Ḳ": "K",
                "Ķ": "K",
                "Ḵ": "K",
                "Ƙ": "K",
                "Ⱪ": "K",
                "Ꝁ": "K",
                "Ꝃ": "K",
                "Ꝅ": "K",
                "Ꞣ": "K",
                "Ⓛ": "L",
                "Ｌ": "L",
                "Ŀ": "L",
                "Ĺ": "L",
                "Ľ": "L",
                "Ḷ": "L",
                "Ḹ": "L",
                "Ļ": "L",
                "Ḽ": "L",
                "Ḻ": "L",
                "Ł": "L",
                "Ƚ": "L",
                "Ɫ": "L",
                "Ⱡ": "L",
                "Ꝉ": "L",
                "Ꝇ": "L",
                "Ꞁ": "L",
                "Ǉ": "LJ",
                "ǈ": "Lj",
                "Ⓜ": "M",
                "Ｍ": "M",
                "Ḿ": "M",
                "Ṁ": "M",
                "Ṃ": "M",
                "Ɱ": "M",
                "Ɯ": "M",
                "Ⓝ": "N",
                "Ｎ": "N",
                "Ǹ": "N",
                "Ń": "N",
                "Ñ": "N",
                "Ṅ": "N",
                "Ň": "N",
                "Ṇ": "N",
                "Ņ": "N",
                "Ṋ": "N",
                "Ṉ": "N",
                "Ƞ": "N",
                "Ɲ": "N",
                "Ꞑ": "N",
                "Ꞥ": "N",
                "Ǌ": "NJ",
                "ǋ": "Nj",
                "Ⓞ": "O",
                "Ｏ": "O",
                "Ò": "O",
                "Ó": "O",
                "Ô": "O",
                "Ồ": "O",
                "Ố": "O",
                "Ỗ": "O",
                "Ổ": "O",
                "Õ": "O",
                "Ṍ": "O",
                "Ȭ": "O",
                "Ṏ": "O",
                "Ō": "O",
                "Ṑ": "O",
                "Ṓ": "O",
                "Ŏ": "O",
                "Ȯ": "O",
                "Ȱ": "O",
                "Ö": "O",
                "Ȫ": "O",
                "Ỏ": "O",
                "Ő": "O",
                "Ǒ": "O",
                "Ȍ": "O",
                "Ȏ": "O",
                "Ơ": "O",
                "Ờ": "O",
                "Ớ": "O",
                "Ỡ": "O",
                "Ở": "O",
                "Ợ": "O",
                "Ọ": "O",
                "Ộ": "O",
                "Ǫ": "O",
                "Ǭ": "O",
                "Ø": "O",
                "Ǿ": "O",
                "Ɔ": "O",
                "Ɵ": "O",
                "Ꝋ": "O",
                "Ꝍ": "O",
                "Ƣ": "OI",
                "Ꝏ": "OO",
                "Ȣ": "OU",
                "Ⓟ": "P",
                "Ｐ": "P",
                "Ṕ": "P",
                "Ṗ": "P",
                "Ƥ": "P",
                "Ᵽ": "P",
                "Ꝑ": "P",
                "Ꝓ": "P",
                "Ꝕ": "P",
                "Ⓠ": "Q",
                "Ｑ": "Q",
                "Ꝗ": "Q",
                "Ꝙ": "Q",
                "Ɋ": "Q",
                "Ⓡ": "R",
                "Ｒ": "R",
                "Ŕ": "R",
                "Ṙ": "R",
                "Ř": "R",
                "Ȑ": "R",
                "Ȓ": "R",
                "Ṛ": "R",
                "Ṝ": "R",
                "Ŗ": "R",
                "Ṟ": "R",
                "Ɍ": "R",
                "Ɽ": "R",
                "Ꝛ": "R",
                "Ꞧ": "R",
                "Ꞃ": "R",
                "Ⓢ": "S",
                "Ｓ": "S",
                "ẞ": "S",
                "Ś": "S",
                "Ṥ": "S",
                "Ŝ": "S",
                "Ṡ": "S",
                "Š": "S",
                "Ṧ": "S",
                "Ṣ": "S",
                "Ṩ": "S",
                "Ș": "S",
                "Ş": "S",
                "Ȿ": "S",
                "Ꞩ": "S",
                "Ꞅ": "S",
                "Ⓣ": "T",
                "Ｔ": "T",
                "Ṫ": "T",
                "Ť": "T",
                "Ṭ": "T",
                "Ț": "T",
                "Ţ": "T",
                "Ṱ": "T",
                "Ṯ": "T",
                "Ŧ": "T",
                "Ƭ": "T",
                "Ʈ": "T",
                "Ⱦ": "T",
                "Ꞇ": "T",
                "Ꜩ": "TZ",
                "Ⓤ": "U",
                "Ｕ": "U",
                "Ù": "U",
                "Ú": "U",
                "Û": "U",
                "Ũ": "U",
                "Ṹ": "U",
                "Ū": "U",
                "Ṻ": "U",
                "Ŭ": "U",
                "Ü": "U",
                "Ǜ": "U",
                "Ǘ": "U",
                "Ǖ": "U",
                "Ǚ": "U",
                "Ủ": "U",
                "Ů": "U",
                "Ű": "U",
                "Ǔ": "U",
                "Ȕ": "U",
                "Ȗ": "U",
                "Ư": "U",
                "Ừ": "U",
                "Ứ": "U",
                "Ữ": "U",
                "Ử": "U",
                "Ự": "U",
                "Ụ": "U",
                "Ṳ": "U",
                "Ų": "U",
                "Ṷ": "U",
                "Ṵ": "U",
                "Ʉ": "U",
                "Ⓥ": "V",
                "Ｖ": "V",
                "Ṽ": "V",
                "Ṿ": "V",
                "Ʋ": "V",
                "Ꝟ": "V",
                "Ʌ": "V",
                "Ꝡ": "VY",
                "Ⓦ": "W",
                "Ｗ": "W",
                "Ẁ": "W",
                "Ẃ": "W",
                "Ŵ": "W",
                "Ẇ": "W",
                "Ẅ": "W",
                "Ẉ": "W",
                "Ⱳ": "W",
                "Ⓧ": "X",
                "Ｘ": "X",
                "Ẋ": "X",
                "Ẍ": "X",
                "Ⓨ": "Y",
                "Ｙ": "Y",
                "Ỳ": "Y",
                "Ý": "Y",
                "Ŷ": "Y",
                "Ỹ": "Y",
                "Ȳ": "Y",
                "Ẏ": "Y",
                "Ÿ": "Y",
                "Ỷ": "Y",
                "Ỵ": "Y",
                "Ƴ": "Y",
                "Ɏ": "Y",
                "Ỿ": "Y",
                "Ⓩ": "Z",
                "Ｚ": "Z",
                "Ź": "Z",
                "Ẑ": "Z",
                "Ż": "Z",
                "Ž": "Z",
                "Ẓ": "Z",
                "Ẕ": "Z",
                "Ƶ": "Z",
                "Ȥ": "Z",
                "Ɀ": "Z",
                "Ⱬ": "Z",
                "Ꝣ": "Z",
                "ⓐ": "a",
                "ａ": "a",
                "ẚ": "a",
                "à": "a",
                "á": "a",
                "â": "a",
                "ầ": "a",
                "ấ": "a",
                "ẫ": "a",
                "ẩ": "a",
                "ã": "a",
                "ā": "a",
                "ă": "a",
                "ằ": "a",
                "ắ": "a",
                "ẵ": "a",
                "ẳ": "a",
                "ȧ": "a",
                "ǡ": "a",
                "ä": "a",
                "ǟ": "a",
                "ả": "a",
                "å": "a",
                "ǻ": "a",
                "ǎ": "a",
                "ȁ": "a",
                "ȃ": "a",
                "ạ": "a",
                "ậ": "a",
                "ặ": "a",
                "ḁ": "a",
                "ą": "a",
                "ⱥ": "a",
                "ɐ": "a",
                "ꜳ": "aa",
                "æ": "ae",
                "ǽ": "ae",
                "ǣ": "ae",
                "ꜵ": "ao",
                "ꜷ": "au",
                "ꜹ": "av",
                "ꜻ": "av",
                "ꜽ": "ay",
                "ⓑ": "b",
                "ｂ": "b",
                "ḃ": "b",
                "ḅ": "b",
                "ḇ": "b",
                "ƀ": "b",
                "ƃ": "b",
                "ɓ": "b",
                "ⓒ": "c",
                "ｃ": "c",
                "ć": "c",
                "ĉ": "c",
                "ċ": "c",
                "č": "c",
                "ç": "c",
                "ḉ": "c",
                "ƈ": "c",
                "ȼ": "c",
                "ꜿ": "c",
                "ↄ": "c",
                "ⓓ": "d",
                "ｄ": "d",
                "ḋ": "d",
                "ď": "d",
                "ḍ": "d",
                "ḑ": "d",
                "ḓ": "d",
                "ḏ": "d",
                "đ": "d",
                "ƌ": "d",
                "ɖ": "d",
                "ɗ": "d",
                "ꝺ": "d",
                "ǳ": "dz",
                "ǆ": "dz",
                "ⓔ": "e",
                "ｅ": "e",
                "è": "e",
                "é": "e",
                "ê": "e",
                "ề": "e",
                "ế": "e",
                "ễ": "e",
                "ể": "e",
                "ẽ": "e",
                "ē": "e",
                "ḕ": "e",
                "ḗ": "e",
                "ĕ": "e",
                "ė": "e",
                "ë": "e",
                "ẻ": "e",
                "ě": "e",
                "ȅ": "e",
                "ȇ": "e",
                "ẹ": "e",
                "ệ": "e",
                "ȩ": "e",
                "ḝ": "e",
                "ę": "e",
                "ḙ": "e",
                "ḛ": "e",
                "ɇ": "e",
                "ɛ": "e",
                "ǝ": "e",
                "ⓕ": "f",
                "ｆ": "f",
                "ḟ": "f",
                "ƒ": "f",
                "ꝼ": "f",
                "ⓖ": "g",
                "ｇ": "g",
                "ǵ": "g",
                "ĝ": "g",
                "ḡ": "g",
                "ğ": "g",
                "ġ": "g",
                "ǧ": "g",
                "ģ": "g",
                "ǥ": "g",
                "ɠ": "g",
                "ꞡ": "g",
                "ᵹ": "g",
                "ꝿ": "g",
                "ⓗ": "h",
                "ｈ": "h",
                "ĥ": "h",
                "ḣ": "h",
                "ḧ": "h",
                "ȟ": "h",
                "ḥ": "h",
                "ḩ": "h",
                "ḫ": "h",
                "ẖ": "h",
                "ħ": "h",
                "ⱨ": "h",
                "ⱶ": "h",
                "ɥ": "h",
                "ƕ": "hv",
                "ⓘ": "i",
                "ｉ": "i",
                "ì": "i",
                "í": "i",
                "î": "i",
                "ĩ": "i",
                "ī": "i",
                "ĭ": "i",
                "ï": "i",
                "ḯ": "i",
                "ỉ": "i",
                "ǐ": "i",
                "ȉ": "i",
                "ȋ": "i",
                "ị": "i",
                "į": "i",
                "ḭ": "i",
                "ɨ": "i",
                "ı": "i",
                "ⓙ": "j",
                "ｊ": "j",
                "ĵ": "j",
                "ǰ": "j",
                "ɉ": "j",
                "ⓚ": "k",
                "ｋ": "k",
                "ḱ": "k",
                "ǩ": "k",
                "ḳ": "k",
                "ķ": "k",
                "ḵ": "k",
                "ƙ": "k",
                "ⱪ": "k",
                "ꝁ": "k",
                "ꝃ": "k",
                "ꝅ": "k",
                "ꞣ": "k",
                "ⓛ": "l",
                "ｌ": "l",
                "ŀ": "l",
                "ĺ": "l",
                "ľ": "l",
                "ḷ": "l",
                "ḹ": "l",
                "ļ": "l",
                "ḽ": "l",
                "ḻ": "l",
                "ſ": "l",
                "ł": "l",
                "ƚ": "l",
                "ɫ": "l",
                "ⱡ": "l",
                "ꝉ": "l",
                "ꞁ": "l",
                "ꝇ": "l",
                "ǉ": "lj",
                "ⓜ": "m",
                "ｍ": "m",
                "ḿ": "m",
                "ṁ": "m",
                "ṃ": "m",
                "ɱ": "m",
                "ɯ": "m",
                "ⓝ": "n",
                "ｎ": "n",
                "ǹ": "n",
                "ń": "n",
                "ñ": "n",
                "ṅ": "n",
                "ň": "n",
                "ṇ": "n",
                "ņ": "n",
                "ṋ": "n",
                "ṉ": "n",
                "ƞ": "n",
                "ɲ": "n",
                "ŉ": "n",
                "ꞑ": "n",
                "ꞥ": "n",
                "ǌ": "nj",
                "ⓞ": "o",
                "ｏ": "o",
                "ò": "o",
                "ó": "o",
                "ô": "o",
                "ồ": "o",
                "ố": "o",
                "ỗ": "o",
                "ổ": "o",
                "õ": "o",
                "ṍ": "o",
                "ȭ": "o",
                "ṏ": "o",
                "ō": "o",
                "ṑ": "o",
                "ṓ": "o",
                "ŏ": "o",
                "ȯ": "o",
                "ȱ": "o",
                "ö": "o",
                "ȫ": "o",
                "ỏ": "o",
                "ő": "o",
                "ǒ": "o",
                "ȍ": "o",
                "ȏ": "o",
                "ơ": "o",
                "ờ": "o",
                "ớ": "o",
                "ỡ": "o",
                "ở": "o",
                "ợ": "o",
                "ọ": "o",
                "ộ": "o",
                "ǫ": "o",
                "ǭ": "o",
                "ø": "o",
                "ǿ": "o",
                "ɔ": "o",
                "ꝋ": "o",
                "ꝍ": "o",
                "ɵ": "o",
                "ƣ": "oi",
                "ȣ": "ou",
                "ꝏ": "oo",
                "ⓟ": "p",
                "ｐ": "p",
                "ṕ": "p",
                "ṗ": "p",
                "ƥ": "p",
                "ᵽ": "p",
                "ꝑ": "p",
                "ꝓ": "p",
                "ꝕ": "p",
                "ⓠ": "q",
                "ｑ": "q",
                "ɋ": "q",
                "ꝗ": "q",
                "ꝙ": "q",
                "ⓡ": "r",
                "ｒ": "r",
                "ŕ": "r",
                "ṙ": "r",
                "ř": "r",
                "ȑ": "r",
                "ȓ": "r",
                "ṛ": "r",
                "ṝ": "r",
                "ŗ": "r",
                "ṟ": "r",
                "ɍ": "r",
                "ɽ": "r",
                "ꝛ": "r",
                "ꞧ": "r",
                "ꞃ": "r",
                "ⓢ": "s",
                "ｓ": "s",
                "ß": "s",
                "ś": "s",
                "ṥ": "s",
                "ŝ": "s",
                "ṡ": "s",
                "š": "s",
                "ṧ": "s",
                "ṣ": "s",
                "ṩ": "s",
                "ș": "s",
                "ş": "s",
                "ȿ": "s",
                "ꞩ": "s",
                "ꞅ": "s",
                "ẛ": "s",
                "ⓣ": "t",
                "ｔ": "t",
                "ṫ": "t",
                "ẗ": "t",
                "ť": "t",
                "ṭ": "t",
                "ț": "t",
                "ţ": "t",
                "ṱ": "t",
                "ṯ": "t",
                "ŧ": "t",
                "ƭ": "t",
                "ʈ": "t",
                "ⱦ": "t",
                "ꞇ": "t",
                "ꜩ": "tz",
                "ⓤ": "u",
                "ｕ": "u",
                "ù": "u",
                "ú": "u",
                "û": "u",
                "ũ": "u",
                "ṹ": "u",
                "ū": "u",
                "ṻ": "u",
                "ŭ": "u",
                "ü": "u",
                "ǜ": "u",
                "ǘ": "u",
                "ǖ": "u",
                "ǚ": "u",
                "ủ": "u",
                "ů": "u",
                "ű": "u",
                "ǔ": "u",
                "ȕ": "u",
                "ȗ": "u",
                "ư": "u",
                "ừ": "u",
                "ứ": "u",
                "ữ": "u",
                "ử": "u",
                "ự": "u",
                "ụ": "u",
                "ṳ": "u",
                "ų": "u",
                "ṷ": "u",
                "ṵ": "u",
                "ʉ": "u",
                "ⓥ": "v",
                "ｖ": "v",
                "ṽ": "v",
                "ṿ": "v",
                "ʋ": "v",
                "ꝟ": "v",
                "ʌ": "v",
                "ꝡ": "vy",
                "ⓦ": "w",
                "ｗ": "w",
                "ẁ": "w",
                "ẃ": "w",
                "ŵ": "w",
                "ẇ": "w",
                "ẅ": "w",
                "ẘ": "w",
                "ẉ": "w",
                "ⱳ": "w",
                "ⓧ": "x",
                "ｘ": "x",
                "ẋ": "x",
                "ẍ": "x",
                "ⓨ": "y",
                "ｙ": "y",
                "ỳ": "y",
                "ý": "y",
                "ŷ": "y",
                "ỹ": "y",
                "ȳ": "y",
                "ẏ": "y",
                "ÿ": "y",
                "ỷ": "y",
                "ẙ": "y",
                "ỵ": "y",
                "ƴ": "y",
                "ɏ": "y",
                "ỿ": "y",
                "ⓩ": "z",
                "ｚ": "z",
                "ź": "z",
                "ẑ": "z",
                "ż": "z",
                "ž": "z",
                "ẓ": "z",
                "ẕ": "z",
                "ƶ": "z",
                "ȥ": "z",
                "ɀ": "z",
                "ⱬ": "z",
                "ꝣ": "z",
                "Ά": "Α",
                "Έ": "Ε",
                "Ή": "Η",
                "Ί": "Ι",
                "Ϊ": "Ι",
                "Ό": "Ο",
                "Ύ": "Υ",
                "Ϋ": "Υ",
                "Ώ": "Ω",
                "ά": "α",
                "έ": "ε",
                "ή": "η",
                "ί": "ι",
                "ϊ": "ι",
                "ΐ": "ι",
                "ό": "ο",
                "ύ": "υ",
                "ϋ": "υ",
                "ΰ": "υ",
                "ω": "ω",
                "ς": "σ"
            }
        }),
        b.define("select2/data/base", ["../utils"], function(a) {
            function b(a, c) {
                b.__super__.constructor.call(this)
            }
            return a.Extend(b, a.Observable),
            b.prototype.current = function(a) {
                throw new Error("The `current` method must be defined in child classes.")
            }
            ,
            b.prototype.query = function(a, b) {
                throw new Error("The `query` method must be defined in child classes.")
            }
            ,
            b.prototype.bind = function(a, b) {}
            ,
            b.prototype.destroy = function() {}
            ,
            b.prototype.generateResultId = function(b, c) {
                var d = b.id + "-result-";
                return d += a.generateChars(4),
                null != c.id ? d += "-" + c.id.toString() : d += "-" + a.generateChars(4),
                d
            }
            ,
            b
        }),
        b.define("select2/data/select", ["./base", "../utils", "jquery"], function(a, b, c) {
            function d(a, b) {
                this.$element = a,
                this.options = b,
                d.__super__.constructor.call(this)
            }
            return b.Extend(d, a),
            d.prototype.current = function(a) {
                var b = []
                  , d = this;
                this.$element.find(":selected").each(function() {
                    var a = c(this)
                      , e = d.item(a);
                    b.push(e)
                }),
                a(b)
            }
            ,
            d.prototype.select = function(a) {
                var b = this;
                if (a.selected = !0,
                c(a.element).is("option"))
                    return a.element.selected = !0,
                    void this.$element.trigger("change");
                if (this.$element.prop("multiple"))
                    this.current(function(d) {
                        var e = [];
                        a = [a],
                        a.push.apply(a, d);
                        for (var f = 0; f < a.length; f++) {
                            var g = a[f].id;
                            -1 === c.inArray(g, e) && e.push(g)
                        }
                        b.$element.val(e),
                        b.$element.trigger("change")
                    });
                else {
                    var d = a.id;
                    this.$element.val(d),
                    this.$element.trigger("change")
                }
            }
            ,
            d.prototype.unselect = function(a) {
                var b = this;
                if (this.$element.prop("multiple")) {
                    if (a.selected = !1,
                    c(a.element).is("option"))
                        return a.element.selected = !1,
                        void this.$element.trigger("change");
                    this.current(function(d) {
                        for (var e = [], f = 0; f < d.length; f++) {
                            var g = d[f].id;
                            g !== a.id && -1 === c.inArray(g, e) && e.push(g)
                        }
                        b.$element.val(e),
                        b.$element.trigger("change")
                    })
                }
            }
            ,
            d.prototype.bind = function(a, b) {
                var c = this;
                this.container = a,
                a.on("select", function(a) {
                    c.select(a.data)
                }),
                a.on("unselect", function(a) {
                    c.unselect(a.data)
                })
            }
            ,
            d.prototype.destroy = function() {
                this.$element.find("*").each(function() {
                    c.removeData(this, "data")
                })
            }
            ,
            d.prototype.query = function(a, b) {
                var d = []
                  , e = this;
                this.$element.children().each(function() {
                    var b = c(this);
                    if (b.is("option") || b.is("optgroup")) {
                        var f = e.item(b)
                          , g = e.matches(a, f);
                        null !== g && d.push(g)
                    }
                }),
                b({
                    results: d
                })
            }
            ,
            d.prototype.addOptions = function(a) {
                b.appendMany(this.$element, a)
            }
            ,
            d.prototype.option = function(a) {
                var b;
                a.children ? (b = document.createElement("optgroup"),
                b.label = a.text) : (b = document.createElement("option"),
                void 0 !== b.textContent ? b.textContent = a.text : b.innerText = a.text),
                void 0 !== a.id && (b.value = a.id),
                a.disabled && (b.disabled = !0),
                a.selected && (b.selected = !0),
                a.title && (b.title = a.title);
                var d = c(b)
                  , e = this._normalizeItem(a);
                return e.element = b,
                c.data(b, "data", e),
                d
            }
            ,
            d.prototype.item = function(a) {
                var b = {};
                if (null != (b = c.data(a[0], "data")))
                    return b;
                if (a.is("option"))
                    b = {
                        id: a.val(),
                        text: a.text(),
                        disabled: a.prop("disabled"),
                        selected: a.prop("selected"),
                        title: a.prop("title")
                    };
                else if (a.is("optgroup")) {
                    b = {
                        text: a.prop("label"),
                        children: [],
                        title: a.prop("title")
                    };
                    for (var d = a.children("option"), e = [], f = 0; f < d.length; f++) {
                        var g = c(d[f])
                          , h = this.item(g);
                        e.push(h)
                    }
                    b.children = e
                }
                return b = this._normalizeItem(b),
                b.element = a[0],
                c.data(a[0], "data", b),
                b
            }
            ,
            d.prototype._normalizeItem = function(a) {
                c.isPlainObject(a) || (a = {
                    id: a,
                    text: a
                }),
                a = c.extend({}, {
                    text: ""
                }, a);
                var b = {
                    selected: !1,
                    disabled: !1
                };
                return null != a.id && (a.id = a.id.toString()),
                null != a.text && (a.text = a.text.toString()),
                null == a._resultId && a.id && null != this.container && (a._resultId = this.generateResultId(this.container, a)),
                c.extend({}, b, a)
            }
            ,
            d.prototype.matches = function(a, b) {
                return this.options.get("matcher")(a, b)
            }
            ,
            d
        }),
        b.define("select2/data/array", ["./select", "../utils", "jquery"], function(a, b, c) {
            function d(a, b) {
                var c = b.get("data") || [];
                d.__super__.constructor.call(this, a, b),
                this.addOptions(this.convertToOptions(c))
            }
            return b.Extend(d, a),
            d.prototype.select = function(a) {
                var b = this.$element.find("option").filter(function(b, c) {
                    return c.value == a.id.toString()
                });
                0 === b.length && (b = this.option(a),
                this.addOptions(b)),
                d.__super__.select.call(this, a)
            }
            ,
            d.prototype.convertToOptions = function(a) {
                function d(a) {
                    return function() {
                        return c(this).val() == a.id
                    }
                }
                for (var e = this, f = this.$element.find("option"), g = f.map(function() {
                    return e.item(c(this)).id
                }).get(), h = [], i = 0; i < a.length; i++) {
                    var j = this._normalizeItem(a[i]);
                    if (c.inArray(j.id, g) >= 0) {
                        var k = f.filter(d(j))
                          , l = this.item(k)
                          , m = c.extend(!0, {}, j, l)
                          , n = this.option(m);
                        k.replaceWith(n)
                    } else {
                        var o = this.option(j);
                        if (j.children) {
                            var p = this.convertToOptions(j.children);
                            b.appendMany(o, p)
                        }
                        h.push(o)
                    }
                }
                return h
            }
            ,
            d
        }),
        b.define("select2/data/ajax", ["./array", "../utils", "jquery"], function(a, b, c) {
            function d(a, b) {
                this.ajaxOptions = this._applyDefaults(b.get("ajax")),
                null != this.ajaxOptions.processResults && (this.processResults = this.ajaxOptions.processResults),
                d.__super__.constructor.call(this, a, b)
            }
            return b.Extend(d, a),
            d.prototype._applyDefaults = function(a) {
                var b = {
                    data: function(a) {
                        return c.extend({}, a, {
                            q: a.term
                        })
                    },
                    transport: function(a, b, d) {
                        var e = c.ajax(a);
                        return e.then(b),
                        e.fail(d),
                        e
                    }
                };
                return c.extend({}, b, a, !0)
            }
            ,
            d.prototype.processResults = function(a) {
                return a
            }
            ,
            d.prototype.query = function(a, b) {
                function d() {
                    var d = f.transport(f, function(d) {
                        var f = e.processResults(d, a);
                        e.options.get("debug") && window.console && console.error && (f && f.results && c.isArray(f.results) || console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),
                        b(f)
                    }, function() {
                        d.status && "0" === d.status || e.trigger("results:message", {
                            message: "errorLoading"
                        })
                    });
                    e._request = d
                }
                var e = this;
                null != this._request && (c.isFunction(this._request.abort) && this._request.abort(),
                this._request = null);
                var f = c.extend({
                    type: "GET"
                }, this.ajaxOptions);
                "function" == typeof f.url && (f.url = f.url.call(this.$element, a)),
                "function" == typeof f.data && (f.data = f.data.call(this.$element, a)),
                this.ajaxOptions.delay && null != a.term ? (this._queryTimeout && window.clearTimeout(this._queryTimeout),
                this._queryTimeout = window.setTimeout(d, this.ajaxOptions.delay)) : d()
            }
            ,
            d
        }),
        b.define("select2/data/tags", ["jquery"], function(a) {
            function b(b, c, d) {
                var e = d.get("tags")
                  , f = d.get("createTag");
                void 0 !== f && (this.createTag = f);
                var g = d.get("insertTag");
                if (void 0 !== g && (this.insertTag = g),
                b.call(this, c, d),
                a.isArray(e))
                    for (var h = 0; h < e.length; h++) {
                        var i = e[h]
                          , j = this._normalizeItem(i)
                          , k = this.option(j);
                        this.$element.append(k)
                    }
            }
            return b.prototype.query = function(a, b, c) {
                function d(a, f) {
                    for (var g = a.results, h = 0; h < g.length; h++) {
                        var i = g[h]
                          , j = null != i.children && !d({
                            results: i.children
                        }, !0);
                        if ((i.text || "").toUpperCase() === (b.term || "").toUpperCase() || j)
                            return !f && (a.data = g,
                            void c(a))
                    }
                    if (f)
                        return !0;
                    var k = e.createTag(b);
                    if (null != k) {
                        var l = e.option(k);
                        l.attr("data-select2-tag", !0),
                        e.addOptions([l]),
                        e.insertTag(g, k)
                    }
                    a.results = g,
                    c(a)
                }
                var e = this;
                if (this._removeOldTags(),
                null == b.term || null != b.page)
                    return void a.call(this, b, c);
                a.call(this, b, d)
            }
            ,
            b.prototype.createTag = function(b, c) {
                var d = a.trim(c.term);
                return "" === d ? null : {
                    id: d,
                    text: d
                }
            }
            ,
            b.prototype.insertTag = function(a, b, c) {
                b.unshift(c)
            }
            ,
            b.prototype._removeOldTags = function(b) {
                this._lastTag;
                this.$element.find("option[data-select2-tag]").each(function() {
                    this.selected || a(this).remove()
                })
            }
            ,
            b
        }),
        b.define("select2/data/tokenizer", ["jquery"], function(a) {
            function b(a, b, c) {
                var d = c.get("tokenizer");
                void 0 !== d && (this.tokenizer = d),
                a.call(this, b, c)
            }
            return b.prototype.bind = function(a, b, c) {
                a.call(this, b, c),
                this.$search = b.dropdown.$search || b.selection.$search || c.find(".select2-search__field")
            }
            ,
            b.prototype.query = function(b, c, d) {
                function e(b) {
                    var c = g._normalizeItem(b);
                    if (!g.$element.find("option").filter(function() {
                        return a(this).val() === c.id
                    }).length) {
                        var d = g.option(c);
                        d.attr("data-select2-tag", !0),
                        g._removeOldTags(),
                        g.addOptions([d])
                    }
                    f(c)
                }
                function f(a) {
                    g.trigger("select", {
                        data: a
                    })
                }
                var g = this;
                c.term = c.term || "";
                var h = this.tokenizer(c, this.options, e);
                h.term !== c.term && (this.$search.length && (this.$search.val(h.term),
                this.$search.focus()),
                c.term = h.term),
                b.call(this, c, d)
            }
            ,
            b.prototype.tokenizer = function(b, c, d, e) {
                for (var f = d.get("tokenSeparators") || [], g = c.term, h = 0, i = this.createTag || function(a) {
                    return {
                        id: a.term,
                        text: a.term
                    }
                }
                ; h < g.length; ) {
                    var j = g[h];
                    if (-1 !== a.inArray(j, f)) {
                        var k = g.substr(0, h)
                          , l = a.extend({}, c, {
                            term: k
                        })
                          , m = i(l);
                        null != m ? (e(m),
                        g = g.substr(h + 1) || "",
                        h = 0) : h++
                    } else
                        h++
                }
                return {
                    term: g
                }
            }
            ,
            b
        }),
        b.define("select2/data/minimumInputLength", [], function() {
            function a(a, b, c) {
                this.minimumInputLength = c.get("minimumInputLength"),
                a.call(this, b, c)
            }
            return a.prototype.query = function(a, b, c) {
                if (b.term = b.term || "",
                b.term.length < this.minimumInputLength)
                    return void this.trigger("results:message", {
                        message: "inputTooShort",
                        args: {
                            minimum: this.minimumInputLength,
                            input: b.term,
                            params: b
                        }
                    });
                a.call(this, b, c)
            }
            ,
            a
        }),
        b.define("select2/data/maximumInputLength", [], function() {
            function a(a, b, c) {
                this.maximumInputLength = c.get("maximumInputLength"),
                a.call(this, b, c)
            }
            return a.prototype.query = function(a, b, c) {
                if (b.term = b.term || "",
                this.maximumInputLength > 0 && b.term.length > this.maximumInputLength)
                    return void this.trigger("results:message", {
                        message: "inputTooLong",
                        args: {
                            maximum: this.maximumInputLength,
                            input: b.term,
                            params: b
                        }
                    });
                a.call(this, b, c)
            }
            ,
            a
        }),
        b.define("select2/data/maximumSelectionLength", [], function() {
            function a(a, b, c) {
                this.maximumSelectionLength = c.get("maximumSelectionLength"),
                a.call(this, b, c)
            }
            return a.prototype.query = function(a, b, c) {
                var d = this;
                this.current(function(e) {
                    var f = null != e ? e.length : 0;
                    if (d.maximumSelectionLength > 0 && f >= d.maximumSelectionLength)
                        return void d.trigger("results:message", {
                            message: "maximumSelected",
                            args: {
                                maximum: d.maximumSelectionLength
                            }
                        });
                    a.call(d, b, c)
                })
            }
            ,
            a
        }),
        b.define("select2/dropdown", ["jquery", "./utils"], function(a, b) {
            function c(a, b) {
                this.$element = a,
                this.options = b,
                c.__super__.constructor.call(this)
            }
            return b.Extend(c, b.Observable),
            c.prototype.render = function() {
                var b = a('<span class="select2-dropdown"><span class="select2-results"></span></span>');
                return b.attr("dir", this.options.get("dir")),
                this.$dropdown = b,
                b
            }
            ,
            c.prototype.bind = function() {}
            ,
            c.prototype.position = function(a, b) {}
            ,
            c.prototype.destroy = function() {
                this.$dropdown.remove()
            }
            ,
            c
        }),
        b.define("select2/dropdown/search", ["jquery", "../utils"], function(a, b) {
            function c() {}
            return c.prototype.render = function(b) {
                var c = b.call(this)
                  , d = a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');
                return this.$searchContainer = d,
                this.$search = d.find("input"),
                c.prepend(d),
                c
            }
            ,
            c.prototype.bind = function(b, c, d) {
                var e = this;
                b.call(this, c, d),
                this.$search.on("keydown", function(a) {
                    e.trigger("keypress", a),
                    e._keyUpPrevented = a.isDefaultPrevented()
                }),
                this.$search.on("input", function(b) {
                    a(this).off("keyup")
                }),
                this.$search.on("keyup input", function(a) {
                    e.handleSearch(a)
                }),
                c.on("open", function() {
                    e.$search.attr("tabindex", 0),
                    e.$search.focus(),
                    window.setTimeout(function() {
                        e.$search.focus()
                    }, 0)
                }),
                c.on("close", function() {
                    e.$search.attr("tabindex", -1),
                    e.$search.val("")
                }),
                c.on("focus", function() {
                    c.isOpen() || e.$search.focus()
                }),
                c.on("results:all", function(a) {
                    if (null == a.query.term || "" === a.query.term) {
                        e.showSearch(a) ? e.$searchContainer.removeClass("select2-search--hide") : e.$searchContainer.addClass("select2-search--hide")
                    }
                })
            }
            ,
            c.prototype.handleSearch = function(a) {
                if (!this._keyUpPrevented) {
                    var b = this.$search.val();
                    this.trigger("query", {
                        term: b
                    })
                }
                this._keyUpPrevented = !1
            }
            ,
            c.prototype.showSearch = function(a, b) {
                return !0
            }
            ,
            c
        }),
        b.define("select2/dropdown/hidePlaceholder", [], function() {
            function a(a, b, c, d) {
                this.placeholder = this.normalizePlaceholder(c.get("placeholder")),
                a.call(this, b, c, d)
            }
            return a.prototype.append = function(a, b) {
                b.results = this.removePlaceholder(b.results),
                a.call(this, b)
            }
            ,
            a.prototype.normalizePlaceholder = function(a, b) {
                return "string" == typeof b && (b = {
                    id: "",
                    text: b
                }),
                b
            }
            ,
            a.prototype.removePlaceholder = function(a, b) {
                for (var c = b.slice(0), d = b.length - 1; d >= 0; d--) {
                    var e = b[d];
                    this.placeholder.id === e.id && c.splice(d, 1)
                }
                return c
            }
            ,
            a
        }),
        b.define("select2/dropdown/infiniteScroll", ["jquery"], function(a) {
            function b(a, b, c, d) {
                this.lastParams = {},
                a.call(this, b, c, d),
                this.$loadingMore = this.createLoadingMore(),
                this.loading = !1
            }
            return b.prototype.append = function(a, b) {
                this.$loadingMore.remove(),
                this.loading = !1,
                a.call(this, b),
                this.showLoadingMore(b) && this.$results.append(this.$loadingMore)
            }
            ,
            b.prototype.bind = function(b, c, d) {
                var e = this;
                b.call(this, c, d),
                c.on("query", function(a) {
                    e.lastParams = a,
                    e.loading = !0
                }),
                c.on("query:append", function(a) {
                    e.lastParams = a,
                    e.loading = !0
                }),
                this.$results.on("scroll", function() {
                    var b = a.contains(document.documentElement, e.$loadingMore[0]);
                    if (!e.loading && b) {
                        e.$results.offset().top + e.$results.outerHeight(!1) + 50 >= e.$loadingMore.offset().top + e.$loadingMore.outerHeight(!1) && e.loadMore()
                    }
                })
            }
            ,
            b.prototype.loadMore = function() {
                this.loading = !0;
                var b = a.extend({}, {
                    page: 1
                }, this.lastParams);
                b.page++,
                this.trigger("query:append", b)
            }
            ,
            b.prototype.showLoadingMore = function(a, b) {
                return b.pagination && b.pagination.more
            }
            ,
            b.prototype.createLoadingMore = function() {
                var b = a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>')
                  , c = this.options.get("translations").get("loadingMore");
                return b.html(c(this.lastParams)),
                b
            }
            ,
            b
        }),
        b.define("select2/dropdown/attachBody", ["jquery", "../utils"], function(a, b) {
            function c(b, c, d) {
                this.$dropdownParent = d.get("dropdownParent") || a(document.body),
                b.call(this, c, d)
            }
            return c.prototype.bind = function(a, b, c) {
                var d = this
                  , e = !1;
                a.call(this, b, c),
                b.on("open", function() {
                    d._showDropdown(),
                    d._attachPositioningHandler(b),
                    e || (e = !0,
                    b.on("results:all", function() {
                        d._positionDropdown(),
                        d._resizeDropdown()
                    }),
                    b.on("results:append", function() {
                        d._positionDropdown(),
                        d._resizeDropdown()
                    }))
                }),
                b.on("close", function() {
                    d._hideDropdown(),
                    d._detachPositioningHandler(b)
                }),
                this.$dropdownContainer.on("mousedown", function(a) {
                    a.stopPropagation()
                })
            }
            ,
            c.prototype.destroy = function(a) {
                a.call(this),
                this.$dropdownContainer.remove()
            }
            ,
            c.prototype.position = function(a, b, c) {
                b.attr("class", c.attr("class")),
                b.removeClass("select2"),
                b.addClass("select2-container--open"),
                b.css({
                    position: "absolute",
                    top: -999999
                }),
                this.$container = c
            }
            ,
            c.prototype.render = function(b) {
                var c = a("<span></span>")
                  , d = b.call(this);
                return c.append(d),
                this.$dropdownContainer = c,
                c
            }
            ,
            c.prototype._hideDropdown = function(a) {
                this.$dropdownContainer.detach()
            }
            ,
            c.prototype._attachPositioningHandler = function(c, d) {
                var e = this
                  , f = "scroll.select2." + d.id
                  , g = "resize.select2." + d.id
                  , h = "orientationchange.select2." + d.id
                  , i = this.$container.parents().filter(b.hasScroll);
                i.each(function() {
                    a(this).data("select2-scroll-position", {
                        x: a(this).scrollLeft(),
                        y: a(this).scrollTop()
                    })
                }),
                i.on(f, function(b) {
                    var c = a(this).data("select2-scroll-position");
                    a(this).scrollTop(c.y)
                }),
                a(window).on(f + " " + g + " " + h, function(a) {
                    e._positionDropdown(),
                    e._resizeDropdown()
                })
            }
            ,
            c.prototype._detachPositioningHandler = function(c, d) {
                var e = "scroll.select2." + d.id
                  , f = "resize.select2." + d.id
                  , g = "orientationchange.select2." + d.id;
                this.$container.parents().filter(b.hasScroll).off(e),
                a(window).off(e + " " + f + " " + g)
            }
            ,
            c.prototype._positionDropdown = function() {
                var b = a(window)
                  , c = this.$dropdown.hasClass("select2-dropdown--above")
                  , d = this.$dropdown.hasClass("select2-dropdown--below")
                  , e = null
                  , f = this.$container.offset();
                f.bottom = f.top + this.$container.outerHeight(!1);
                var g = {
                    height: this.$container.outerHeight(!1)
                };
                g.top = f.top,
                g.bottom = f.top + g.height;
                var h = {
                    height: this.$dropdown.outerHeight(!1)
                }
                  , i = {
                    top: b.scrollTop(),
                    bottom: b.scrollTop() + b.height()
                }
                  , j = i.top < f.top - h.height
                  , k = i.bottom > f.bottom + h.height
                  , l = {
                    left: f.left,
                    top: g.bottom
                }
                  , m = this.$dropdownParent;
                "static" === m.css("position") && (m = m.offsetParent());
                var n = m.offset();
                l.top -= n.top,
                l.left -= n.left,
                c || d || (e = "below"),
                k || !j || c ? !j && k && c && (e = "below") : e = "above",
                ("above" == e || c && "below" !== e) && (l.top = g.top - n.top - h.height),
                null != e && (this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--" + e),
                this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--" + e)),
                this.$dropdownContainer.css(l)
            }
            ,
            c.prototype._resizeDropdown = function() {
                var a = {
                    width: this.$container.outerWidth(!1) + "px"
                };
                this.options.get("dropdownAutoWidth") && (a.minWidth = a.width,
                a.position = "relative",
                a.width = "auto"),
                this.$dropdown.css(a)
            }
            ,
            c.prototype._showDropdown = function(a) {
                this.$dropdownContainer.appendTo(this.$dropdownParent),
                this._positionDropdown(),
                this._resizeDropdown()
            }
            ,
            c
        }),
        b.define("select2/dropdown/minimumResultsForSearch", [], function() {
            function a(b) {
                for (var c = 0, d = 0; d < b.length; d++) {
                    var e = b[d];
                    e.children ? c += a(e.children) : c++
                }
                return c
            }
            function b(a, b, c, d) {
                this.minimumResultsForSearch = c.get("minimumResultsForSearch"),
                this.minimumResultsForSearch < 0 && (this.minimumResultsForSearch = 1 / 0),
                a.call(this, b, c, d)
            }
            return b.prototype.showSearch = function(b, c) {
                return !(a(c.data.results) < this.minimumResultsForSearch) && b.call(this, c)
            }
            ,
            b
        }),
        b.define("select2/dropdown/selectOnClose", [], function() {
            function a() {}
            return a.prototype.bind = function(a, b, c) {
                var d = this;
                a.call(this, b, c),
                b.on("close", function(a) {
                    d._handleSelectOnClose(a)
                })
            }
            ,
            a.prototype._handleSelectOnClose = function(a, b) {
                if (b && null != b.originalSelect2Event) {
                    var c = b.originalSelect2Event;
                    if ("select" === c._type || "unselect" === c._type)
                        return
                }
                var d = this.getHighlightedResults();
                if (!(d.length < 1)) {
                    var e = d.data("data");
                    null != e.element && e.element.selected || null == e.element && e.selected || this.trigger("select", {
                        data: e
                    })
                }
            }
            ,
            a
        }),
        b.define("select2/dropdown/closeOnSelect", [], function() {
            function a() {}
            return a.prototype.bind = function(a, b, c) {
                var d = this;
                a.call(this, b, c),
                b.on("select", function(a) {
                    d._selectTriggered(a)
                }),
                b.on("unselect", function(a) {
                    d._selectTriggered(a)
                })
            }
            ,
            a.prototype._selectTriggered = function(a, b) {
                var c = b.originalEvent;
                c && c.ctrlKey || this.trigger("close", {
                    originalEvent: c,
                    originalSelect2Event: b
                })
            }
            ,
            a
        }),
        b.define("select2/i18n/en", [], function() {
            return {
                errorLoading: function() {
                    return "The results could not be loaded."
                },
                inputTooLong: function(a) {
                    var b = a.input.length - a.maximum
                      , c = "Please delete " + b + " character";
                    return 1 != b && (c += "s"),
                    c
                },
                inputTooShort: function(a) {
                    return "Please enter " + (a.minimum - a.input.length) + " or more characters"
                },
                loadingMore: function() {
                    return "Loading more results…"
                },
                maximumSelected: function(a) {
                    var b = "You can only select " + a.maximum + " item";
                    return 1 != a.maximum && (b += "s"),
                    b
                },
                noResults: function() {
                    return "No results found"
                },
                searching: function() {
                    return "Searching…"
                }
            }
        }),
        b.define("select2/defaults", ["jquery", "require", "./results", "./selection/single", "./selection/multiple", "./selection/placeholder", "./selection/allowClear", "./selection/search", "./selection/eventRelay", "./utils", "./translation", "./diacritics", "./data/select", "./data/array", "./data/ajax", "./data/tags", "./data/tokenizer", "./data/minimumInputLength", "./data/maximumInputLength", "./data/maximumSelectionLength", "./dropdown", "./dropdown/search", "./dropdown/hidePlaceholder", "./dropdown/infiniteScroll", "./dropdown/attachBody", "./dropdown/minimumResultsForSearch", "./dropdown/selectOnClose", "./dropdown/closeOnSelect", "./i18n/en"], function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C) {
            function D() {
                this.reset()
            }
            return D.prototype.apply = function(l) {
                if (l = a.extend(!0, {}, this.defaults, l),
                null == l.dataAdapter) {
                    if (null != l.ajax ? l.dataAdapter = o : null != l.data ? l.dataAdapter = n : l.dataAdapter = m,
                    l.minimumInputLength > 0 && (l.dataAdapter = j.Decorate(l.dataAdapter, r)),
                    l.maximumInputLength > 0 && (l.dataAdapter = j.Decorate(l.dataAdapter, s)),
                    l.maximumSelectionLength > 0 && (l.dataAdapter = j.Decorate(l.dataAdapter, t)),
                    l.tags && (l.dataAdapter = j.Decorate(l.dataAdapter, p)),
                    null == l.tokenSeparators && null == l.tokenizer || (l.dataAdapter = j.Decorate(l.dataAdapter, q)),
                    null != l.query) {
                        var C = b(l.amdBase + "compat/query");
                        l.dataAdapter = j.Decorate(l.dataAdapter, C)
                    }
                    if (null != l.initSelection) {
                        var D = b(l.amdBase + "compat/initSelection");
                        l.dataAdapter = j.Decorate(l.dataAdapter, D)
                    }
                }
                if (null == l.resultsAdapter && (l.resultsAdapter = c,
                null != l.ajax && (l.resultsAdapter = j.Decorate(l.resultsAdapter, x)),
                null != l.placeholder && (l.resultsAdapter = j.Decorate(l.resultsAdapter, w)),
                l.selectOnClose && (l.resultsAdapter = j.Decorate(l.resultsAdapter, A))),
                null == l.dropdownAdapter) {
                    if (l.multiple)
                        l.dropdownAdapter = u;
                    else {
                        var E = j.Decorate(u, v);
                        l.dropdownAdapter = E
                    }
                    if (0 !== l.minimumResultsForSearch && (l.dropdownAdapter = j.Decorate(l.dropdownAdapter, z)),
                    l.closeOnSelect && (l.dropdownAdapter = j.Decorate(l.dropdownAdapter, B)),
                    null != l.dropdownCssClass || null != l.dropdownCss || null != l.adaptDropdownCssClass) {
                        var F = b(l.amdBase + "compat/dropdownCss");
                        l.dropdownAdapter = j.Decorate(l.dropdownAdapter, F)
                    }
                    l.dropdownAdapter = j.Decorate(l.dropdownAdapter, y)
                }
                if (null == l.selectionAdapter) {
                    if (l.multiple ? l.selectionAdapter = e : l.selectionAdapter = d,
                    null != l.placeholder && (l.selectionAdapter = j.Decorate(l.selectionAdapter, f)),
                    l.allowClear && (l.selectionAdapter = j.Decorate(l.selectionAdapter, g)),
                    l.multiple && (l.selectionAdapter = j.Decorate(l.selectionAdapter, h)),
                    null != l.containerCssClass || null != l.containerCss || null != l.adaptContainerCssClass) {
                        var G = b(l.amdBase + "compat/containerCss");
                        l.selectionAdapter = j.Decorate(l.selectionAdapter, G)
                    }
                    l.selectionAdapter = j.Decorate(l.selectionAdapter, i)
                }
                if ("string" == typeof l.language)
                    if (l.language.indexOf("-") > 0) {
                        var H = l.language.split("-")
                          , I = H[0];
                        l.language = [l.language, I]
                    } else
                        l.language = [l.language];
                if (a.isArray(l.language)) {
                    var J = new k;
                    l.language.push("en");
                    for (var K = l.language, L = 0; L < K.length; L++) {
                        var M = K[L]
                          , N = {};
                        try {
                            N = k.loadPath(M)
                        } catch (a) {
                            try {
                                M = this.defaults.amdLanguageBase + M,
                                N = k.loadPath(M)
                            } catch (a) {
                                l.debug && window.console && console.warn && console.warn('Select2: The language file for "' + M + '" could not be automatically loaded. A fallback will be used instead.');
                                continue
                            }
                        }
                        J.extend(N)
                    }
                    l.translations = J
                } else {
                    var O = k.loadPath(this.defaults.amdLanguageBase + "en")
                      , P = new k(l.language);
                    P.extend(O),
                    l.translations = P
                }
                return l
            }
            ,
            D.prototype.reset = function() {
                function b(a) {
                    function b(a) {
                        return l[a] || a
                    }
                    return a.replace(/[^\u0000-\u007E]/g, b)
                }
                function c(d, e) {
                    if ("" === a.trim(d.term))
                        return e;
                    if (e.children && e.children.length > 0) {
                        for (var f = a.extend(!0, {}, e), g = e.children.length - 1; g >= 0; g--) {
                            null == c(d, e.children[g]) && f.children.splice(g, 1)
                        }
                        return f.children.length > 0 ? f : c(d, f)
                    }
                    var h = b(e.text).toUpperCase()
                      , i = b(d.term).toUpperCase();
                    return h.indexOf(i) > -1 ? e : null
                }
                this.defaults = {
                    amdBase: "./",
                    amdLanguageBase: "./i18n/",
                    closeOnSelect: !0,
                    debug: !1,
                    dropdownAutoWidth: !1,
                    escapeMarkup: j.escapeMarkup,
                    language: C,
                    matcher: c,
                    minimumInputLength: 0,
                    maximumInputLength: 0,
                    maximumSelectionLength: 0,
                    minimumResultsForSearch: 0,
                    selectOnClose: !1,
                    sorter: function(a) {
                        return a
                    },
                    templateResult: function(a) {
                        return a.text
                    },
                    templateSelection: function(a) {
                        return a.text
                    },
                    theme: "default",
                    width: "resolve"
                }
            }
            ,
            D.prototype.set = function(b, c) {
                var d = a.camelCase(b)
                  , e = {};
                e[d] = c;
                var f = j._convertData(e);
                a.extend(this.defaults, f)
            }
            ,
            new D
        }),
        b.define("select2/options", ["require", "jquery", "./defaults", "./utils"], function(a, b, c, d) {
            function e(b, e) {
                if (this.options = b,
                null != e && this.fromElement(e),
                this.options = c.apply(this.options),
                e && e.is("input")) {
                    var f = a(this.get("amdBase") + "compat/inputData");
                    this.options.dataAdapter = d.Decorate(this.options.dataAdapter, f)
                }
            }
            return e.prototype.fromElement = function(a) {
                var c = ["select2"];
                null == this.options.multiple && (this.options.multiple = a.prop("multiple")),
                null == this.options.disabled && (this.options.disabled = a.prop("disabled")),
                null == this.options.language && (a.prop("lang") ? this.options.language = a.prop("lang").toLowerCase() : a.closest("[lang]").prop("lang") && (this.options.language = a.closest("[lang]").prop("lang"))),
                null == this.options.dir && (a.prop("dir") ? this.options.dir = a.prop("dir") : a.closest("[dir]").prop("dir") ? this.options.dir = a.closest("[dir]").prop("dir") : this.options.dir = "ltr"),
                a.prop("disabled", this.options.disabled),
                a.prop("multiple", this.options.multiple),
                a.data("select2Tags") && (this.options.debug && window.console && console.warn && console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),
                a.data("data", a.data("select2Tags")),
                a.data("tags", !0)),
                a.data("ajaxUrl") && (this.options.debug && window.console && console.warn && console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),
                a.attr("ajax--url", a.data("ajaxUrl")),
                a.data("ajax--url", a.data("ajaxUrl")));
                var e = {};
                e = b.fn.jquery && "1." == b.fn.jquery.substr(0, 2) && a[0].dataset ? b.extend(!0, {}, a[0].dataset, a.data()) : a.data();
                var f = b.extend(!0, {}, e);
                f = d._convertData(f);
                for (var g in f)
                    b.inArray(g, c) > -1 || (b.isPlainObject(this.options[g]) ? b.extend(this.options[g], f[g]) : this.options[g] = f[g]);
                return this
            }
            ,
            e.prototype.get = function(a) {
                return this.options[a]
            }
            ,
            e.prototype.set = function(a, b) {
                this.options[a] = b
            }
            ,
            e
        }),
        b.define("select2/core", ["jquery", "./options", "./utils", "./keys"], function(a, b, c, d) {
            var e = function(a, c) {
                null != a.data("select2") && a.data("select2").destroy(),
                this.$element = a,
                this.id = this._generateId(a),
                c = c || {},
                this.options = new b(c,a),
                e.__super__.constructor.call(this);
                var d = a.attr("tabindex") || 0;
                a.data("old-tabindex", d),
                a.attr("tabindex", "-1");
                var f = this.options.get("dataAdapter");
                this.dataAdapter = new f(a,this.options);
                var g = this.render();
                this._placeContainer(g);
                var h = this.options.get("selectionAdapter");
                this.selection = new h(a,this.options),
                this.$selection = this.selection.render(),
                this.selection.position(this.$selection, g);
                var i = this.options.get("dropdownAdapter");
                this.dropdown = new i(a,this.options),
                this.$dropdown = this.dropdown.render(),
                this.dropdown.position(this.$dropdown, g);
                var j = this.options.get("resultsAdapter");
                this.results = new j(a,this.options,this.dataAdapter),
                this.$results = this.results.render(),
                this.results.position(this.$results, this.$dropdown);
                var k = this;
                this._bindAdapters(),
                this._registerDomEvents(),
                this._registerDataEvents(),
                this._registerSelectionEvents(),
                this._registerDropdownEvents(),
                this._registerResultsEvents(),
                this._registerEvents(),
                this.dataAdapter.current(function(a) {
                    k.trigger("selection:update", {
                        data: a
                    })
                }),
                a.addClass("select2-hidden-accessible"),
                a.attr("aria-hidden", "true"),
                this._syncAttributes(),
                a.data("select2", this)
            };
            return c.Extend(e, c.Observable),
            e.prototype._generateId = function(a) {
                var b = "";
                return b = null != a.attr("id") ? a.attr("id") : null != a.attr("name") ? a.attr("name") + "-" + c.generateChars(2) : c.generateChars(4),
                b = b.replace(/(:|\.|\[|\]|,)/g, ""),
                b = "select2-" + b
            }
            ,
            e.prototype._placeContainer = function(a) {
                a.insertAfter(this.$element);
                var b = this._resolveWidth(this.$element, this.options.get("width"));
                null != b && a.css("width", b)
            }
            ,
            e.prototype._resolveWidth = function(a, b) {
                var c = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
                if ("resolve" == b) {
                    var d = this._resolveWidth(a, "style");
                    return null != d ? d : this._resolveWidth(a, "element")
                }
                if ("element" == b) {
                    var e = a.outerWidth(!1);
                    return e <= 0 ? "auto" : e + "px"
                }
                if ("style" == b) {
                    var f = a.attr("style");
                    if ("string" != typeof f)
                        return null;
                    for (var g = f.split(";"), h = 0, i = g.length; h < i; h += 1) {
                        var j = g[h].replace(/\s/g, "")
                          , k = j.match(c);
                        if (null !== k && k.length >= 1)
                            return k[1]
                    }
                    return null
                }
                return b
            }
            ,
            e.prototype._bindAdapters = function() {
                this.dataAdapter.bind(this, this.$container),
                this.selection.bind(this, this.$container),
                this.dropdown.bind(this, this.$container),
                this.results.bind(this, this.$container)
            }
            ,
            e.prototype._registerDomEvents = function() {
                var b = this;
                this.$element.on("change.select2", function() {
                    b.dataAdapter.current(function(a) {
                        b.trigger("selection:update", {
                            data: a
                        })
                    })
                }),
                this.$element.on("focus.select2", function(a) {
                    b.trigger("focus", a)
                }),
                this._syncA = c.bind(this._syncAttributes, this),
                this._syncS = c.bind(this._syncSubtree, this),
                this.$element[0].attachEvent && this.$element[0].attachEvent("onpropertychange", this._syncA);
                var d = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
                null != d ? (this._observer = new d(function(c) {
                    a.each(c, b._syncA),
                    a.each(c, b._syncS)
                }
                ),
                this._observer.observe(this.$element[0], {
                    attributes: !0,
                    childList: !0,
                    subtree: !1
                })) : this.$element[0].addEventListener && (this.$element[0].addEventListener("DOMAttrModified", b._syncA, !1),
                this.$element[0].addEventListener("DOMNodeInserted", b._syncS, !1),
                this.$element[0].addEventListener("DOMNodeRemoved", b._syncS, !1))
            }
            ,
            e.prototype._registerDataEvents = function() {
                var a = this;
                this.dataAdapter.on("*", function(b, c) {
                    a.trigger(b, c)
                })
            }
            ,
            e.prototype._registerSelectionEvents = function() {
                var b = this
                  , c = ["toggle", "focus"];
                this.selection.on("toggle", function() {
                    b.toggleDropdown()
                }),
                this.selection.on("focus", function(a) {
                    b.focus(a)
                }),
                this.selection.on("*", function(d, e) {
                    -1 === a.inArray(d, c) && b.trigger(d, e)
                })
            }
            ,
            e.prototype._registerDropdownEvents = function() {
                var a = this;
                this.dropdown.on("*", function(b, c) {
                    a.trigger(b, c)
                })
            }
            ,
            e.prototype._registerResultsEvents = function() {
                var a = this;
                this.results.on("*", function(b, c) {
                    a.trigger(b, c)
                })
            }
            ,
            e.prototype._registerEvents = function() {
                var a = this;
                this.on("open", function() {
                    a.$container.addClass("select2-container--open")
                }),
                this.on("close", function() {
                    a.$container.removeClass("select2-container--open")
                }),
                this.on("enable", function() {
                    a.$container.removeClass("select2-container--disabled")
                }),
                this.on("disable", function() {
                    a.$container.addClass("select2-container--disabled")
                }),
                this.on("blur", function() {
                    a.$container.removeClass("select2-container--focus")
                }),
                this.on("query", function(b) {
                    a.isOpen() || a.trigger("open", {}),
                    this.dataAdapter.query(b, function(c) {
                        a.trigger("results:all", {
                            data: c,
                            query: b
                        })
                    })
                }),
                this.on("query:append", function(b) {
                    this.dataAdapter.query(b, function(c) {
                        a.trigger("results:append", {
                            data: c,
                            query: b
                        })
                    })
                }),
                this.on("keypress", function(b) {
                    var c = b.which;
                    a.isOpen() ? c === d.ESC || c === d.TAB || c === d.UP && b.altKey ? (a.close(),
                    b.preventDefault()) : c === d.ENTER ? (a.trigger("results:select", {}),
                    b.preventDefault()) : c === d.SPACE && b.ctrlKey ? (a.trigger("results:toggle", {}),
                    b.preventDefault()) : c === d.UP ? (a.trigger("results:previous", {}),
                    b.preventDefault()) : c === d.DOWN && (a.trigger("results:next", {}),
                    b.preventDefault()) : (c === d.ENTER || c === d.SPACE || c === d.DOWN && b.altKey) && (a.open(),
                    b.preventDefault())
                })
            }
            ,
            e.prototype._syncAttributes = function() {
                this.options.set("disabled", this.$element.prop("disabled")),
                this.options.get("disabled") ? (this.isOpen() && this.close(),
                this.trigger("disable", {})) : this.trigger("enable", {})
            }
            ,
            e.prototype._syncSubtree = function(a, b) {
                var c = !1
                  , d = this;
                if (!a || !a.target || "OPTION" === a.target.nodeName || "OPTGROUP" === a.target.nodeName) {
                    if (b)
                        if (b.addedNodes && b.addedNodes.length > 0)
                            for (var e = 0; e < b.addedNodes.length; e++) {
                                var f = b.addedNodes[e];
                                f.selected && (c = !0)
                            }
                        else
                            b.removedNodes && b.removedNodes.length > 0 && (c = !0);
                    else
                        c = !0;
                    c && this.dataAdapter.current(function(a) {
                        d.trigger("selection:update", {
                            data: a
                        })
                    })
                }
            }
            ,
            e.prototype.trigger = function(a, b) {
                var c = e.__super__.trigger
                  , d = {
                    open: "opening",
                    close: "closing",
                    select: "selecting",
                    unselect: "unselecting"
                };
                if (void 0 === b && (b = {}),
                a in d) {
                    var f = d[a]
                      , g = {
                        prevented: !1,
                        name: a,
                        args: b
                    };
                    if (c.call(this, f, g),
                    g.prevented)
                        return void (b.prevented = !0)
                }
                c.call(this, a, b)
            }
            ,
            e.prototype.toggleDropdown = function() {
                this.options.get("disabled") || (this.isOpen() ? this.close() : this.open())
            }
            ,
            e.prototype.open = function() {
                this.isOpen() || this.trigger("query", {})
            }
            ,
            e.prototype.close = function() {
                this.isOpen() && this.trigger("close", {})
            }
            ,
            e.prototype.isOpen = function() {
                return this.$container.hasClass("select2-container--open")
            }
            ,
            e.prototype.hasFocus = function() {
                return this.$container.hasClass("select2-container--focus")
            }
            ,
            e.prototype.focus = function(a) {
                this.hasFocus() || (this.$container.addClass("select2-container--focus"),
                this.trigger("focus", {}))
            }
            ,
            e.prototype.enable = function(a) {
                this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),
                null != a && 0 !== a.length || (a = [!0]);
                var b = !a[0];
                this.$element.prop("disabled", b)
            }
            ,
            e.prototype.data = function() {
                this.options.get("debug") && arguments.length > 0 && window.console && console.warn && console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');
                var a = [];
                return this.dataAdapter.current(function(b) {
                    a = b
                }),
                a
            }
            ,
            e.prototype.val = function(b) {
                if (this.options.get("debug") && window.console && console.warn && console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),
                null == b || 0 === b.length)
                    return this.$element.val();
                var c = b[0];
                a.isArray(c) && (c = a.map(c, function(a) {
                    return a.toString()
                })),
                this.$element.val(c).trigger("change")
            }
            ,
            e.prototype.destroy = function() {
                this.$container.remove(),
                this.$element[0].detachEvent && this.$element[0].detachEvent("onpropertychange", this._syncA),
                null != this._observer ? (this._observer.disconnect(),
                this._observer = null) : this.$element[0].removeEventListener && (this.$element[0].removeEventListener("DOMAttrModified", this._syncA, !1),
                this.$element[0].removeEventListener("DOMNodeInserted", this._syncS, !1),
                this.$element[0].removeEventListener("DOMNodeRemoved", this._syncS, !1)),
                this._syncA = null,
                this._syncS = null,
                this.$element.off(".select2"),
                this.$element.attr("tabindex", this.$element.data("old-tabindex")),
                this.$element.removeClass("select2-hidden-accessible"),
                this.$element.attr("aria-hidden", "false"),
                this.$element.removeData("select2"),
                this.dataAdapter.destroy(),
                this.selection.destroy(),
                this.dropdown.destroy(),
                this.results.destroy(),
                this.dataAdapter = null,
                this.selection = null,
                this.dropdown = null,
                this.results = null
            }
            ,
            e.prototype.render = function() {
                var b = a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');
                return b.attr("dir", this.options.get("dir")),
                this.$container = b,
                this.$container.addClass("select2-container--" + this.options.get("theme")),
                b.data("element", this.$element),
                b
            }
            ,
            e
        }),
        b.define("select2/compat/utils", ["jquery"], function(a) {
            function b(b, c, d) {
                var e, f, g = [];
                e = a.trim(b.attr("class")),
                e && (e = "" + e,
                a(e.split(/\s+/)).each(function() {
                    0 === this.indexOf("select2-") && g.push(this)
                })),
                e = a.trim(c.attr("class")),
                e && (e = "" + e,
                a(e.split(/\s+/)).each(function() {
                    0 !== this.indexOf("select2-") && null != (f = d(this)) && g.push(f)
                })),
                b.attr("class", g.join(" "))
            }
            return {
                syncCssClasses: b
            }
        }),
        b.define("select2/compat/containerCss", ["jquery", "./utils"], function(a, b) {
            function c(a) {
                return null
            }
            function d() {}
            return d.prototype.render = function(d) {
                var e = d.call(this)
                  , f = this.options.get("containerCssClass") || "";
                a.isFunction(f) && (f = f(this.$element));
                var g = this.options.get("adaptContainerCssClass");
                if (g = g || c,
                -1 !== f.indexOf(":all:")) {
                    f = f.replace(":all:", "");
                    var h = g;
                    g = function(a) {
                        var b = h(a);
                        return null != b ? b + " " + a : a
                    }
                }
                var i = this.options.get("containerCss") || {};
                return a.isFunction(i) && (i = i(this.$element)),
                b.syncCssClasses(e, this.$element, g),
                e.css(i),
                e.addClass(f),
                e
            }
            ,
            d
        }),
        b.define("select2/compat/dropdownCss", ["jquery", "./utils"], function(a, b) {
            function c(a) {
                return null
            }
            function d() {}
            return d.prototype.render = function(d) {
                var e = d.call(this)
                  , f = this.options.get("dropdownCssClass") || "";
                a.isFunction(f) && (f = f(this.$element));
                var g = this.options.get("adaptDropdownCssClass");
                if (g = g || c,
                -1 !== f.indexOf(":all:")) {
                    f = f.replace(":all:", "");
                    var h = g;
                    g = function(a) {
                        var b = h(a);
                        return null != b ? b + " " + a : a
                    }
                }
                var i = this.options.get("dropdownCss") || {};
                return a.isFunction(i) && (i = i(this.$element)),
                b.syncCssClasses(e, this.$element, g),
                e.css(i),
                e.addClass(f),
                e
            }
            ,
            d
        }),
        b.define("select2/compat/initSelection", ["jquery"], function(a) {
            function b(a, b, c) {
                c.get("debug") && window.console && console.warn && console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),
                this.initSelection = c.get("initSelection"),
                this._isInitialized = !1,
                a.call(this, b, c)
            }
            return b.prototype.current = function(b, c) {
                var d = this;
                if (this._isInitialized)
                    return void b.call(this, c);
                this.initSelection.call(null, this.$element, function(b) {
                    d._isInitialized = !0,
                    a.isArray(b) || (b = [b]),
                    c(b)
                })
            }
            ,
            b
        }),
        b.define("select2/compat/inputData", ["jquery"], function(a) {
            function b(a, b, c) {
                this._currentData = [],
                this._valueSeparator = c.get("valueSeparator") || ",",
                "hidden" === b.prop("type") && c.get("debug") && console && console.warn && console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),
                a.call(this, b, c)
            }
            return b.prototype.current = function(b, c) {
                function d(b, c) {
                    var e = [];
                    return b.selected || -1 !== a.inArray(b.id, c) ? (b.selected = !0,
                    e.push(b)) : b.selected = !1,
                    b.children && e.push.apply(e, d(b.children, c)),
                    e
                }
                for (var e = [], f = 0; f < this._currentData.length; f++) {
                    var g = this._currentData[f];
                    e.push.apply(e, d(g, this.$element.val().split(this._valueSeparator)))
                }
                c(e)
            }
            ,
            b.prototype.select = function(b, c) {
                if (this.options.get("multiple")) {
                    var d = this.$element.val();
                    d += this._valueSeparator + c.id,
                    this.$element.val(d),
                    this.$element.trigger("change")
                } else
                    this.current(function(b) {
                        a.map(b, function(a) {
                            a.selected = !1
                        })
                    }),
                    this.$element.val(c.id),
                    this.$element.trigger("change")
            }
            ,
            b.prototype.unselect = function(a, b) {
                var c = this;
                b.selected = !1,
                this.current(function(a) {
                    for (var d = [], e = 0; e < a.length; e++) {
                        var f = a[e];
                        b.id != f.id && d.push(f.id)
                    }
                    c.$element.val(d.join(c._valueSeparator)),
                    c.$element.trigger("change")
                })
            }
            ,
            b.prototype.query = function(a, b, c) {
                for (var d = [], e = 0; e < this._currentData.length; e++) {
                    var f = this._currentData[e]
                      , g = this.matches(b, f);
                    null !== g && d.push(g)
                }
                c({
                    results: d
                })
            }
            ,
            b.prototype.addOptions = function(b, c) {
                var d = a.map(c, function(b) {
                    return a.data(b[0], "data")
                });
                this._currentData.push.apply(this._currentData, d)
            }
            ,
            b
        }),
        b.define("select2/compat/matcher", ["jquery"], function(a) {
            function b(b) {
                function c(c, d) {
                    var e = a.extend(!0, {}, d);
                    if (null == c.term || "" === a.trim(c.term))
                        return e;
                    if (d.children) {
                        for (var f = d.children.length - 1; f >= 0; f--) {
                            var g = d.children[f];
                            b(c.term, g.text, g) || e.children.splice(f, 1)
                        }
                        if (e.children.length > 0)
                            return e
                    }
                    return b(c.term, d.text, d) ? e : null
                }
                return c
            }
            return b
        }),
        b.define("select2/compat/query", [], function() {
            function a(a, b, c) {
                c.get("debug") && window.console && console.warn && console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),
                a.call(this, b, c)
            }
            return a.prototype.query = function(a, b, c) {
                b.callback = c,
                this.options.get("query").call(null, b)
            }
            ,
            a
        }),
        b.define("select2/dropdown/attachContainer", [], function() {
            function a(a, b, c) {
                a.call(this, b, c)
            }
            return a.prototype.position = function(a, b, c) {
                c.find(".dropdown-wrapper").append(b),
                b.addClass("select2-dropdown--below"),
                c.addClass("select2-container--below")
            }
            ,
            a
        }),
        b.define("select2/dropdown/stopPropagation", [], function() {
            function a() {}
            return a.prototype.bind = function(a, b, c) {
                a.call(this, b, c);
                var d = ["blur", "change", "click", "dblclick", "focus", "focusin", "focusout", "input", "keydown", "keyup", "keypress", "mousedown", "mouseenter", "mouseleave", "mousemove", "mouseover", "mouseup", "search", "touchend", "touchstart"];
                this.$dropdown.on(d.join(" "), function(a) {
                    a.stopPropagation()
                })
            }
            ,
            a
        }),
        b.define("select2/selection/stopPropagation", [], function() {
            function a() {}
            return a.prototype.bind = function(a, b, c) {
                a.call(this, b, c);
                var d = ["blur", "change", "click", "dblclick", "focus", "focusin", "focusout", "input", "keydown", "keyup", "keypress", "mousedown", "mouseenter", "mouseleave", "mousemove", "mouseover", "mouseup", "search", "touchend", "touchstart"];
                this.$selection.on(d.join(" "), function(a) {
                    a.stopPropagation()
                })
            }
            ,
            a
        }),
        function(c) {
            "function" == typeof b.define && b.define.amd ? b.define("jquery-mousewheel", ["jquery"], c) : "object" == typeof exports ? module.exports = c : c(a)
        }(function(a) {
            function b(b) {
                var g = b || window.event
                  , h = i.call(arguments, 1)
                  , j = 0
                  , l = 0
                  , m = 0
                  , n = 0
                  , o = 0
                  , p = 0;
                if (b = a.event.fix(g),
                b.type = "mousewheel",
                "detail"in g && (m = -1 * g.detail),
                "wheelDelta"in g && (m = g.wheelDelta),
                "wheelDeltaY"in g && (m = g.wheelDeltaY),
                "wheelDeltaX"in g && (l = -1 * g.wheelDeltaX),
                "axis"in g && g.axis === g.HORIZONTAL_AXIS && (l = -1 * m,
                m = 0),
                j = 0 === m ? l : m,
                "deltaY"in g && (m = -1 * g.deltaY,
                j = m),
                "deltaX"in g && (l = g.deltaX,
                0 === m && (j = -1 * l)),
                0 !== m || 0 !== l) {
                    if (1 === g.deltaMode) {
                        var q = a.data(this, "mousewheel-line-height");
                        j *= q,
                        m *= q,
                        l *= q
                    } else if (2 === g.deltaMode) {
                        var r = a.data(this, "mousewheel-page-height");
                        j *= r,
                        m *= r,
                        l *= r
                    }
                    if (n = Math.max(Math.abs(m), Math.abs(l)),
                    (!f || n < f) && (f = n,
                    d(g, n) && (f /= 40)),
                    d(g, n) && (j /= 40,
                    l /= 40,
                    m /= 40),
                    j = Math[j >= 1 ? "floor" : "ceil"](j / f),
                    l = Math[l >= 1 ? "floor" : "ceil"](l / f),
                    m = Math[m >= 1 ? "floor" : "ceil"](m / f),
                    k.settings.normalizeOffset && this.getBoundingClientRect) {
                        var s = this.getBoundingClientRect();
                        o = b.clientX - s.left,
                        p = b.clientY - s.top
                    }
                    return b.deltaX = l,
                    b.deltaY = m,
                    b.deltaFactor = f,
                    b.offsetX = o,
                    b.offsetY = p,
                    b.deltaMode = 0,
                    h.unshift(b, j, l, m),
                    e && clearTimeout(e),
                    e = setTimeout(c, 200),
                    (a.event.dispatch || a.event.handle).apply(this, h)
                }
            }
            function c() {
                f = null
            }
            function d(a, b) {
                return k.settings.adjustOldDeltas && "mousewheel" === a.type && b % 120 == 0
            }
            var e, f, g = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"], h = "onwheel"in document || document.documentMode >= 9 ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"], i = Array.prototype.slice;
            if (a.event.fixHooks)
                for (var j = g.length; j; )
                    a.event.fixHooks[g[--j]] = a.event.mouseHooks;
            var k = a.event.special.mousewheel = {
                version: "3.1.12",
                setup: function() {
                    if (this.addEventListener)
                        for (var c = h.length; c; )
                            this.addEventListener(h[--c], b, !1);
                    else
                        this.onmousewheel = b;
                    a.data(this, "mousewheel-line-height", k.getLineHeight(this)),
                    a.data(this, "mousewheel-page-height", k.getPageHeight(this))
                },
                teardown: function() {
                    if (this.removeEventListener)
                        for (var c = h.length; c; )
                            this.removeEventListener(h[--c], b, !1);
                    else
                        this.onmousewheel = null;
                    a.removeData(this, "mousewheel-line-height"),
                    a.removeData(this, "mousewheel-page-height")
                },
                getLineHeight: function(b) {
                    var c = a(b)
                      , d = c["offsetParent"in a.fn ? "offsetParent" : "parent"]();
                    return d.length || (d = a("body")),
                    parseInt(d.css("fontSize"), 10) || parseInt(c.css("fontSize"), 10) || 16
                },
                getPageHeight: function(b) {
                    return a(b).height()
                },
                settings: {
                    adjustOldDeltas: !0,
                    normalizeOffset: !0
                }
            };
            a.fn.extend({
                mousewheel: function(a) {
                    return a ? this.bind("mousewheel", a) : this.trigger("mousewheel")
                },
                unmousewheel: function(a) {
                    return this.unbind("mousewheel", a)
                }
            })
        }),
        b.define("jquery.select2", ["jquery", "jquery-mousewheel", "./select2/core", "./select2/defaults"], function(a, b, c, d) {
            if (null == a.fn.select2) {
                var e = ["open", "close", "destroy"];
                a.fn.select2 = function(b) {
                    if ("object" == typeof (b = b || {}))
                        return this.each(function() {
                            var d = a.extend(!0, {}, b);
                            new c(a(this),d)
                        }),
                        this;
                    if ("string" == typeof b) {
                        var d, f = Array.prototype.slice.call(arguments, 1);
                        return this.each(function() {
                            var c = a(this).data("select2");
                            null == c && window.console && console.error && console.error("The select2('" + b + "') method was called on an element that is not using Select2."),
                            d = c[b].apply(c, f)
                        }),
                        a.inArray(b, e) > -1 ? this : d
                    }
                    throw new Error("Invalid arguments for Select2: " + b)
                }
            }
            return null == a.fn.select2.defaults && (a.fn.select2.defaults = d),
            c
        }),
        {
            define: b.define,
            require: b.require
        }
    }()
      , c = b.require("jquery.select2");
    return a.fn.select2.amd = b,
    c
});
/*!
* bootstrap-fileinput v4.3.7
* http://plugins.krajee.com/file-input
*
* Author: Kartik Visweswaran
* Copyright: 2014 - 2017, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
*/
!function(e) {
    "use strict";
    "function" == typeof define && define.amd ? define(["jquery"], e) : "object" == typeof module && module.exports ? module.exports = e(require("jquery")) : e(window.jQuery)
}(function(e) {
    "use strict";
    e.fn.fileinputLocales = {},
    e.fn.fileinputThemes = {};
    var i, t;
    i = {
        NAMESPACE: ".fileinput",
        MODAL_ID: "kvFileinputModal",
        FRAMES: ".kv-preview-thumb",
        SORT_CSS: "file-sortable",
        STYLE_SETTING: 'style="width:{width};height:{height};"',
        OBJECT_PARAMS: '<param name="controller" value="true" />\n<param name="allowFullScreen" value="true" />\n<param name="allowScriptAccess" value="always" />\n<param name="autoPlay" value="false" />\n<param name="autoStart" value="false" />\n<param name="quality" value="high" />\n',
        DEFAULT_PREVIEW: '<div class="file-preview-other">\n<span class="{previewFileIconClass}">{previewFileIcon}</span>\n</div>',
        objUrl: window.URL || window.webkitURL,
        compare: function(e, i, t) {
            return void 0 !== e && (t ? e === i : e.match(i))
        },
        handler: function(e, t, a, r) {
            var n = r ? t : t.split(" ").join(i.NAMESPACE + " ") + i.NAMESPACE;
            e.length && e.off(n).on(n, a)
        },
        isIE: function(e) {
            if ("Microsoft Internet Explorer" !== navigator.appName)
                return !1;
            if (10 === e)
                return new RegExp("msie\\s" + e,"i").test(navigator.userAgent);
            var i, t = document.createElement("div");
            return t.innerHTML = "<!--[if IE " + e + "]> <i></i> <![endif]-->",
            i = t.getElementsByTagName("i").length,
            document.body.appendChild(t),
            t.parentNode.removeChild(t),
            i
        },
        isEmpty: function(i, t) {
            return void 0 === i || null === i || 0 === i.length || t && "" === e.trim(i)
        },
        isArray: function(e) {
            return Array.isArray(e) || "[object Array]" === Object.prototype.toString.call(e)
        },
        ifSet: function(e, i, t) {
            return t = t || "",
            i && "object" == typeof i && e in i ? i[e] : t
        },
        getNum: function(e, i) {
            return i = i || 0,
            "number" == typeof e ? e : ("string" == typeof e && (e = parseFloat(e)),
            isNaN(e) ? i : e)
        },
        hasFileAPISupport: function() {
            return !(!window.File || !window.FileReader)
        },
        hasDragDropSupport: function() {
            var e = document.createElement("div");
            return !i.isIE(9) && (void 0 !== e.draggable || void 0 !== e.ondragstart && void 0 !== e.ondrop)
        },
        hasFileUploadSupport: function() {
            return i.hasFileAPISupport() && window.FormData
        },
        addCss: function(e, i) {
            e.removeClass(i).addClass(i)
        },
        getElement: function(t, a, r) {
            return i.isEmpty(t) || i.isEmpty(t[a]) ? r : e(t[a])
        },
        uniqId: function() {
            return Math.round((new Date).getTime() + 100 * Math.random())
        },
        htmlEncode: function(e) {
            return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;")
        },
        replaceTags: function(i, t) {
            var a = i;
            return t ? (e.each(t, function(e, i) {
                "function" == typeof i && (i = i()),
                a = a.split(e).join(i)
            }),
            a) : a
        },
        cleanMemory: function(e) {
            var t = e.is("img") ? e.attr("src") : e.find("source").attr("src");
            i.objUrl.revokeObjectURL(t)
        },
        findFileName: function(e) {
            var i = e.lastIndexOf("/");
            return -1 === i && (i = e.lastIndexOf("\\")),
            e.split(e.substring(i, i + 1)).pop()
        },
        checkFullScreen: function() {
            return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement
        },
        toggleFullScreen: function(e) {
            var t = document
              , a = t.documentElement;
            a && e && !i.checkFullScreen() ? a.requestFullscreen ? a.requestFullscreen() : a.msRequestFullscreen ? a.msRequestFullscreen() : a.mozRequestFullScreen ? a.mozRequestFullScreen() : a.webkitRequestFullscreen && a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) : t.exitFullscreen ? t.exitFullscreen() : t.msExitFullscreen ? t.msExitFullscreen() : t.mozCancelFullScreen ? t.mozCancelFullScreen() : t.webkitExitFullscreen && t.webkitExitFullscreen()
        },
        moveArray: function(e, i, t) {
            if (t >= e.length)
                for (var a = t - e.length; a-- + 1; )
                    e.push(void 0);
            return e.splice(t, 0, e.splice(i, 1)[0]),
            e
        },
        cleanZoomCache: function(e) {
            var i = e.closest(".kv-zoom-cache-theme");
            i.length || (i = e.closest(".kv-zoom-cache")),
            i.remove()
        }
    },
    t = function(t, a) {
        var r = this;
        r.$element = e(t),
        r._validate() && (r.isPreviewable = i.hasFileAPISupport(),
        r.isIE9 = i.isIE(9),
        r.isIE10 = i.isIE(10),
        r.isPreviewable || r.isIE9 ? (r._init(a),
        r._listen()) : r.$element.removeClass("file-loading"))
    }
    ,
    t.prototype = {
        constructor: t,
        _init: function(t) {
            var a, r = this, n = r.$element;
            r.options = t,
            e.each(t, function(e, t) {
                switch (e) {
                case "minFileCount":
                case "maxFileCount":
                case "maxFileSize":
                    r[e] = i.getNum(t);
                    break;
                default:
                    r[e] = t
                }
            }),
            r._initTemplateDefaults(),
            r.fileInputCleared = !1,
            r.fileBatchCompleted = !0,
            r.isPreviewable || (r.showPreview = !1),
            r.uploadFileAttr = i.isEmpty(n.attr("name")) ? "file_data" : n.attr("name"),
            r.reader = null,
            r.formdata = {},
            r.clearStack(),
            r.uploadCount = 0,
            r.uploadStatus = {},
            r.uploadLog = [],
            r.uploadAsyncCount = 0,
            r.loadedImages = [],
            r.totalImagesCount = 0,
            r.ajaxRequests = [],
            r.isError = !1,
            r.ajaxAborted = !1,
            r.cancelling = !1,
            a = r._getLayoutTemplate("progress"),
            r.progressTemplate = a.replace("{class}", r.progressClass),
            r.progressCompleteTemplate = a.replace("{class}", r.progressCompleteClass),
            r.progressErrorTemplate = a.replace("{class}", r.progressErrorClass),
            r.dropZoneEnabled = i.hasDragDropSupport() && r.dropZoneEnabled,
            r.isDisabled = r.$element.attr("disabled") || r.$element.attr("readonly"),
            r.isUploadable = i.hasFileUploadSupport() && !i.isEmpty(r.uploadUrl),
            r.isClickable = r.browseOnZoneClick && r.showPreview && (r.isUploadable && r.dropZoneEnabled || !i.isEmpty(r.defaultPreviewContent)),
            r.slug = "function" == typeof t.slugCallback ? t.slugCallback : r._slugDefault,
            r.mainTemplate = r.showCaption ? r._getLayoutTemplate("main1") : r._getLayoutTemplate("main2"),
            r.captionTemplate = r._getLayoutTemplate("caption"),
            r.previewGenericTemplate = r._getPreviewTemplate("generic"),
            r.resizeImage && (r.maxImageWidth || r.maxImageHeight) && (r.imageCanvas = document.createElement("canvas"),
            r.imageCanvasContext = r.imageCanvas.getContext("2d")),
            i.isEmpty(r.$element.attr("id")) && r.$element.attr("id", i.uniqId()),
            void 0 === r.$container ? r.$container = r._createContainer() : r._refreshContainer(),
            r.$dropZone = r.$container.find(".file-drop-zone"),
            r.$progress = r.$container.find(".kv-upload-progress"),
            r.$btnUpload = r.$container.find(".fileinput-upload"),
            r.$captionContainer = i.getElement(t, "elCaptionContainer", r.$container.find(".file-caption")),
            r.$caption = i.getElement(t, "elCaptionText", r.$container.find(".file-caption-name")),
            r.$previewContainer = i.getElement(t, "elPreviewContainer", r.$container.find(".file-preview")),
            r.$preview = i.getElement(t, "elPreviewImage", r.$container.find(".file-preview-thumbnails")),
            r.$previewStatus = i.getElement(t, "elPreviewStatus", r.$container.find(".file-preview-status")),
            r.$errorContainer = i.getElement(t, "elErrorContainer", r.$previewContainer.find(".kv-fileinput-error")),
            i.isEmpty(r.msgErrorClass) || i.addCss(r.$errorContainer, r.msgErrorClass),
            r.$errorContainer.hide(),
            r.previewInitId = "preview-" + i.uniqId(),
            r._initPreviewCache(),
            r._initPreview(!0),
            r._initPreviewActions(),
            r._setFileDropZoneTitle(),
            r.$element.removeClass("file-loading"),
            r.$element.attr("disabled") && r.disable(),
            r._initZoom()
        },
        _initTemplateDefaults: function() {
            var t, a, r, n, o, l, s, d, c, p, u, f, m, g, v, h, w, _, b, C, E, y, x, T, S, F, P, I, k, $, A, z, D, U, j = this;
            t = '{preview}\n<div class="kv-upload-progress hide"></div>\n<div class="input-group {class}">\n   {caption}\n   <div class="input-group-btn">\n       {remove}\n       {cancel}\n       {upload}\n       {browse}\n   </div>\n</div>',
            a = '{preview}\n<div class="kv-upload-progress hide"></div>\n{remove}\n{cancel}\n{upload}\n{browse}\n',
            r = '<div class="file-preview {class}">\n    {close}    <div class="{dropClass}">\n    <div class="file-preview-thumbnails">\n    </div>\n    <div class="clearfix"></div>    <div class="file-preview-status text-center text-success"></div>\n    <div class="kv-fileinput-error"></div>\n    </div>\n</div>',
            o = '<div class="close fileinput-remove">&times;</div>\n',
            n = '<i class="glyphicon glyphicon-file kv-caption-icon"></i>',
            l = '<div tabindex="500" class="form-control file-caption {class}">\n   <div class="file-caption-name"></div>\n</div>\n',
            s = '<button type="{type}" tabindex="500" title="{title}" class="{css}" {status}>{icon} {label}</button>',
            d = '<a href="{href}" tabindex="500" title="{title}" class="{css}" {status}>{icon} {label}</a>',
            c = '<div tabindex="500" class="{css}" {status}>{icon} {label}</div>',
            p = '<div id="' + i.MODAL_ID + '" class="file-zoom-dialog modal fade" tabindex="-1" aria-labelledby="' + i.MODAL_ID + 'Label"></div>',
            u = '<div class="modal-dialog modal-lg" role="document">\n  <div class="modal-content">\n    <div class="modal-header">\n      <div class="kv-zoom-actions pull-right">{toggleheader}{fullscreen}{borderless}{close}</div>\n      <h3 class="modal-title">{heading} <small><span class="kv-zoom-title"></span></small></h3>\n    </div>\n    <div class="modal-body">\n      <div class="floating-buttons"></div>\n      <div class="kv-zoom-body file-zoom-content"></div>\n{prev} {next}\n    </div>\n  </div>\n</div>\n',
            f = '<div class="progress">\n    <div class="{class}" role="progressbar" aria-valuenow="{percent}" aria-valuemin="0" aria-valuemax="100" style="width:{percent}%;">\n        {percent}%\n     </div>\n</div>',
            m = " <samp>({sizeText})</samp>",
            g = '<div class="file-thumbnail-footer">\n    <div class="file-footer-caption" title="{caption}">{caption}<br>{size}</div>\n    {progress} {actions}\n</div>',
            v = '<div class="file-upload-indicator" title="{indicatorTitle}">{indicator}</div>\n{drag}\n<div class="file-actions">\n    <div class="file-footer-buttons">\n        {upload} {delete} {zoom} {other}    </div>\n    <div class="clearfix"></div>\n</div>',
            h = '<button type="button" class="kv-file-remove {removeClass}" title="{removeTitle}" {dataUrl}{dataKey}>{removeIcon}</button>\n',
            w = '<button type="button" class="kv-file-upload {uploadClass}" title="{uploadTitle}">{uploadIcon}</button>',
            _ = '<button type="button" class="kv-file-zoom {zoomClass}" title="{zoomTitle}">{zoomIcon}</button>',
            b = '<span class="file-drag-handle {dragClass}" title="{dragTitle}">{dragIcon}</span>',
            C = '<div class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}" data-template="{template}"',
            E = C + '><div class="kv-file-content">\n',
            y = C + ' title="{caption}" ' + i.STYLE_SETTING + '><div class="kv-file-content">\n',
            x = "</div>{footer}\n</div>\n",
            T = "{content}\n",
            S = '<div class="kv-preview-data file-preview-html" title="{caption}" ' + i.STYLE_SETTING + ">{data}</div>\n",
            F = '<img src="{data}" class="kv-preview-data file-preview-image" title="{caption}" alt="{caption}" ' + i.STYLE_SETTING + ">\n",
            P = '<textarea class="kv-preview-data file-preview-text" title="{caption}" readonly ' + i.STYLE_SETTING + ">{data}</textarea>\n",
            I = '<video class="kv-preview-data" width="{width}" height="{height}" controls>\n<source src="{data}" type="{type}">\n' + i.DEFAULT_PREVIEW + "\n</video>\n",
            k = '<audio class="kv-preview-data" controls>\n<source src="{data}" type="{type}">\n' + i.DEFAULT_PREVIEW + "\n</audio>\n",
            $ = '<object class="kv-preview-data file-object" type="application/x-shockwave-flash" width="{width}" height="{height}" data="{data}">\n' + i.OBJECT_PARAMS + " " + i.DEFAULT_PREVIEW + "\n</object>\n",
            A = '<object class="kv-preview-data file-object" data="{data}" type="{type}" width="{width}" height="{height}">\n<param name="movie" value="{caption}" />\n' + i.OBJECT_PARAMS + " " + i.DEFAULT_PREVIEW + "\n</object>\n",
            z = '<embed class="kv-preview-data" src="{data}" width="{width}" height="{height}" type="application/pdf">\n',
            D = '<div class="kv-preview-data file-preview-other-frame">\n' + i.DEFAULT_PREVIEW + "\n</div>\n",
            U = '<div class="kv-zoom-cache" style="display:none">{zoomContent}</div>',
            j.defaults = {
                layoutTemplates: {
                    main1: t,
                    main2: a,
                    preview: r,
                    close: o,
                    fileIcon: n,
                    caption: l,
                    modalMain: p,
                    modal: u,
                    progress: f,
                    size: m,
                    footer: g,
                    actions: v,
                    actionDelete: h,
                    actionUpload: w,
                    actionZoom: _,
                    actionDrag: b,
                    btnDefault: s,
                    btnLink: d,
                    btnBrowse: c,
                    zoomCache: U
                },
                previewMarkupTags: {
                    tagBefore1: E,
                    tagBefore2: y,
                    tagAfter: x
                },
                previewContentTemplates: {
                    generic: T,
                    html: S,
                    image: F,
                    text: P,
                    video: I,
                    audio: k,
                    flash: $,
                    object: A,
                    pdf: z,
                    other: D
                },
                allowedPreviewTypes: ["image", "html", "text", "video", "audio", "flash", "pdf", "object"],
                previewTemplates: {},
                previewSettings: {
                    image: {
                        width: "auto",
                        height: "160px"
                    },
                    html: {
                        width: "213px",
                        height: "160px"
                    },
                    text: {
                        width: "213px",
                        height: "160px"
                    },
                    video: {
                        width: "213px",
                        height: "160px"
                    },
                    audio: {
                        width: "213px",
                        height: "80px"
                    },
                    flash: {
                        width: "213px",
                        height: "160px"
                    },
                    object: {
                        width: "160px",
                        height: "160px"
                    },
                    pdf: {
                        width: "160px",
                        height: "160px"
                    },
                    other: {
                        width: "160px",
                        height: "160px"
                    }
                },
                previewZoomSettings: {
                    image: {
                        width: "auto",
                        height: "auto",
                        "max-width": "100%",
                        "max-height": "100%"
                    },
                    html: {
                        width: "100%",
                        height: "100%",
                        "min-height": "480px"
                    },
                    text: {
                        width: "100%",
                        height: "100%",
                        "min-height": "480px"
                    },
                    video: {
                        width: "auto",
                        height: "100%",
                        "max-width": "100%"
                    },
                    audio: {
                        width: "100%",
                        height: "30px"
                    },
                    flash: {
                        width: "auto",
                        height: "480px"
                    },
                    object: {
                        width: "auto",
                        height: "100%",
                        "min-height": "480px"
                    },
                    pdf: {
                        width: "100%",
                        height: "100%",
                        "min-height": "480px"
                    },
                    other: {
                        width: "auto",
                        height: "100%",
                        "min-height": "480px"
                    }
                },
                fileTypeSettings: {
                    image: function(e, t) {
                        return i.compare(e, "image.*") || i.compare(t, /\.(gif|png|jpe?g)$/i)
                    },
                    html: function(e, t) {
                        return i.compare(e, "text/html") || i.compare(t, /\.(htm|html)$/i)
                    },
                    text: function(e, t) {
                        return i.compare(e, "text.*") || i.compare(t, /\.(xml|javascript)$/i) || i.compare(t, /\.(txt|md|csv|nfo|ini|json|php|js|css)$/i)
                    },
                    video: function(e, t) {
                        return i.compare(e, "video.*") && (i.compare(e, /(ogg|mp4|mp?g|mov|webm|3gp)$/i) || i.compare(t, /\.(og?|mp4|webm|mp?g|mov|3gp)$/i))
                    },
                    audio: function(e, t) {
                        return i.compare(e, "audio.*") && (i.compare(t, /(ogg|mp3|mp?g|wav)$/i) || i.compare(t, /\.(og?|mp3|mp?g|wav)$/i))
                    },
                    flash: function(e, t) {
                        return i.compare(e, "application/x-shockwave-flash", !0) || i.compare(t, /\.(swf)$/i)
                    },
                    pdf: function(e, t) {
                        return i.compare(e, "application/pdf", !0) || i.compare(t, /\.(pdf)$/i)
                    },
                    object: function() {
                        return !0
                    },
                    other: function() {
                        return !0
                    }
                },
                fileActionSettings: {
                    showRemove: !0,
                    showUpload: !0,
                    showZoom: !0,
                    showDrag: !0,
                    removeIcon: '<i class="glyphicon glyphicon-trash text-danger"></i>',
                    removeClass: "btn btn-xs btn-default",
                    removeTitle: "Remove file",
                    uploadIcon: '<i class="glyphicon glyphicon-upload text-info"></i>',
                    uploadClass: "btn btn-xs btn-default",
                    uploadTitle: "Upload file",
                    zoomIcon: '<i class="glyphicon glyphicon-zoom-in"></i>',
                    zoomClass: "btn btn-xs btn-default",
                    zoomTitle: "View Details",
                    dragIcon: '<i class="glyphicon glyphicon-menu-hamburger"></i>',
                    dragClass: "text-info",
                    dragTitle: "Move / Rearrange",
                    dragSettings: {},
                    indicatorNew: '<i class="glyphicon glyphicon-hand-down text-warning"></i>',
                    indicatorSuccess: '<i class="glyphicon glyphicon-ok-sign text-success"></i>',
                    indicatorError: '<i class="glyphicon glyphicon-exclamation-sign text-danger"></i>',
                    indicatorLoading: '<i class="glyphicon glyphicon-hand-up text-muted"></i>',
                    indicatorNewTitle: "Not uploaded yet",
                    indicatorSuccessTitle: "Uploaded",
                    indicatorErrorTitle: "Upload Error",
                    indicatorLoadingTitle: "Uploading ..."
                }
            },
            e.each(j.defaults, function(i, t) {
                return "allowedPreviewTypes" === i ? void (void 0 === j.allowedPreviewTypes && (j.allowedPreviewTypes = t)) : void (j[i] = e.extend(!0, t, j[i]))
            }),
            j._initPreviewTemplates()
        },
        _initPreviewTemplates: function() {
            var t, a = this, r = a.defaults, n = a.previewMarkupTags, o = n.tagAfter;
            e.each(r.previewContentTemplates, function(e, r) {
                i.isEmpty(a.previewTemplates[e]) && (t = n.tagBefore2,
                "generic" !== e && "image" !== e && "html" !== e && "text" !== e || (t = n.tagBefore1),
                a.previewTemplates[e] = t + r + o)
            })
        },
        _initPreviewCache: function() {
            var t = this;
            t.previewCache = {
                data: {},
                init: function() {
                    var e = t.initialPreview;
                    e.length > 0 && !i.isArray(e) && (e = e.split(t.initialPreviewDelimiter)),
                    t.previewCache.data = {
                        content: e,
                        config: t.initialPreviewConfig,
                        tags: t.initialPreviewThumbTags
                    }
                },
                fetch: function() {
                    return t.previewCache.data.content.filter(function(e) {
                        return null !== e
                    })
                },
                count: function(e) {
                    return t.previewCache.data && t.previewCache.data.content ? e ? t.previewCache.data.content.length : t.previewCache.fetch().length : 0
                },
                get: function(a, r) {
                    var n, o, l, s, d, c, p, u = "init_" + a, f = t.previewCache.data, m = f.config[a], g = f.content[a], v = t.previewInitId + "-" + u, h = i.ifSet("previewAsData", m, t.initialPreviewAsData), w = function(e, a, r, n, o, l, s, d, c) {
                        return d = " file-preview-initial " + i.SORT_CSS + (d ? " " + d : ""),
                        t._generatePreviewTemplate(e, a, r, n, o, !1, null, d, l, s, c)
                    };
                    return g ? (r = void 0 === r ? !0 : r,
                    l = i.ifSet("type", m, t.initialPreviewFileType || "generic"),
                    d = i.ifSet("filename", m, i.ifSet("caption", m)),
                    c = i.ifSet("filetype", m, l),
                    s = t.previewCache.footer(a, r, m && m.size || null),
                    p = i.ifSet("frameClass", m),
                    n = h ? w(l, g, d, c, v, s, u, p) : w("generic", g, d, c, v, s, u, p, l).replace(/\{content}/g, f.content[a]),
                    f.tags.length && f.tags[a] && (n = i.replaceTags(n, f.tags[a])),
                    i.isEmpty(m) || i.isEmpty(m.frameAttr) || (o = e(document.createElement("div")).html(n),
                    o.find(".file-preview-initial").attr(m.frameAttr),
                    n = o.html(),
                    o.remove()),
                    n) : ""
                },
                add: function(e, a, r, n) {
                    var o, l = t.previewCache.data;
                    return i.isArray(e) || (e = e.split(t.initialPreviewDelimiter)),
                    n ? (o = l.content.push(e) - 1,
                    l.config[o] = a,
                    l.tags[o] = r) : (o = e.length - 1,
                    l.content = e,
                    l.config = a,
                    l.tags = r),
                    t.previewCache.data = l,
                    o
                },
                set: function(e, a, r, n) {
                    var o, l, s = t.previewCache.data;
                    if (e && e.length && (i.isArray(e) || (e = e.split(t.initialPreviewDelimiter)),
                    l = e.filter(function(e) {
                        return null !== e
                    }),
                    l.length)) {
                        if (void 0 === s.content && (s.content = []),
                        void 0 === s.config && (s.config = []),
                        void 0 === s.tags && (s.tags = []),
                        n) {
                            for (o = 0; o < e.length; o++)
                                e[o] && s.content.push(e[o]);
                            for (o = 0; o < a.length; o++)
                                a[o] && s.config.push(a[o]);
                            for (o = 0; o < r.length; o++)
                                r[o] && s.tags.push(r[o])
                        } else
                            s.content = e,
                            s.config = a,
                            s.tags = r;
                        t.previewCache.data = s
                    }
                },
                unset: function(e) {
                    var i = t.previewCache.count();
                    if (i) {
                        if (1 === i)
                            return t.previewCache.data.content = [],
                            t.previewCache.data.config = [],
                            t.previewCache.data.tags = [],
                            t.initialPreview = [],
                            t.initialPreviewConfig = [],
                            void (t.initialPreviewThumbTags = []);
                        t.previewCache.data.content[e] = null,
                        t.previewCache.data.config[e] = null,
                        t.previewCache.data.tags[e] = null
                    }
                },
                out: function() {
                    var e, i, a = "", r = t.previewCache.count(!0);
                    if (0 === r)
                        return {
                            content: "",
                            caption: ""
                        };
                    for (i = 0; r > i; i++)
                        a += t.previewCache.get(i);
                    return e = t._getMsgSelected(t.previewCache.count()),
                    {
                        content: a,
                        caption: e
                    }
                },
                footer: function(e, a, r) {
                    var n = t.previewCache.data;
                    if (!n || !n.config || 0 === n.config.length || i.isEmpty(n.config[e]))
                        return "";
                    a = void 0 === a ? !0 : a;
                    var o = n.config[e]
                      , l = i.ifSet("caption", o)
                      , s = ""
                      , d = i.ifSet("width", o, "auto")
                      , c = i.ifSet("url", o, !1)
                      , p = i.ifSet("key", o, null)
                      , u = t.fileActionSettings
                      , f = i.ifSet("showDelete", o, !0)
                      , m = i.ifSet("showZoom", o, u.showZoom)
                      , g = i.ifSet("showDrag", o, u.showDrag)
                      , v = c === !1 && a;
                    return t.initialPreviewShowDelete && (s = t._renderFileActions(!1, f, m, g, v, c, p, !0)),
                    t._getLayoutTemplate("footer").replace(/\{progress}/g, t._renderThumbProgress()).replace(/\{actions}/g, s).replace(/\{caption}/g, l).replace(/\{size}/g, t._getSize(r)).replace(/\{width}/g, d).replace(/\{indicator}/g, "").replace(/\{indicatorTitle}/g, "")
                }
            },
            t.previewCache.init()
        },
        _log: function(e) {
            var i = this
              , t = i.$element.attr("id");
            t && (e = '"' + t + '": ' + e),
            "undefined" != typeof window.console.log ? window.console.log(e) : window.alert(e)
        },
        _validate: function() {
            var e = this
              , i = "file" === e.$element.attr("type");
            return i || e._log('The input "type" must be set to "file" for initializing the "bootstrap-fileinput" plugin.'),
            i
        },
        _errorsExist: function() {
            var i, t = this;
            return t.$errorContainer.find("li").length ? !0 : (i = e(document.createElement("div")).html(t.$errorContainer.html()),
            i.find("span.kv-error-close").remove(),
            i.find("ul").remove(),
            !!e.trim(i.text()).length)
        },
        _errorHandler: function(e, i) {
            var t = this
              , a = e.target.error;
            a.code === a.NOT_FOUND_ERR ? t._showError(t.msgFileNotFound.replace("{name}", i)) : a.code === a.SECURITY_ERR ? t._showError(t.msgFileSecured.replace("{name}", i)) : a.code === a.NOT_READABLE_ERR ? t._showError(t.msgFileNotReadable.replace("{name}", i)) : a.code === a.ABORT_ERR ? t._showError(t.msgFilePreviewAborted.replace("{name}", i)) : t._showError(t.msgFilePreviewError.replace("{name}", i))
        },
        _addError: function(e) {
            var t = this
              , a = t.$errorContainer;
            e && a.length && (a.html(t.errorCloseButton + e),
            i.handler(a.find(".kv-error-close"), "click", function() {
                a.fadeOut("slow")
            }))
        },
        _resetErrors: function(e) {
            var i = this
              , t = i.$errorContainer;
            i.isError = !1,
            i.$container.removeClass("has-error"),
            t.html(""),
            e ? t.fadeOut("slow") : t.hide()
        },
        _showFolderError: function(e) {
            var t, a = this, r = a.$errorContainer;
            e && (t = a.msgFoldersNotAllowed.replace(/\{n}/g, e),
            a._addError(t),
            i.addCss(a.$container, "has-error"),
            r.fadeIn(800),
            a._raise("filefoldererror", [e, t]))
        },
        _showUploadError: function(e, t, a) {
            var r = this
              , n = r.$errorContainer
              , o = a || "fileuploaderror"
              , l = t && t.id ? '<li data-file-id="' + t.id + '">' + e + "</li>" : "<li>" + e + "</li>";
            return 0 === n.find("ul").length ? r._addError("<ul>" + l + "</ul>") : n.find("ul").append(l),
            n.fadeIn(800),
            r._raise(o, [t, e]),
            r.$container.removeClass("file-input-new"),
            i.addCss(r.$container, "has-error"),
            !0
        },
        _showError: function(e, t, a) {
            var r = this
              , n = r.$errorContainer
              , o = a || "fileerror";
            return t = t || {},
            t.reader = r.reader,
            r._addError(e),
            n.fadeIn(800),
            r._raise(o, [t, e]),
            r.isUploadable || r._clearFileInput(),
            r.$container.removeClass("file-input-new"),
            i.addCss(r.$container, "has-error"),
            r.$btnUpload.attr("disabled", !0),
            !0
        },
        _noFilesError: function(e) {
            var t = this
              , a = t.minFileCount > 1 ? t.filePlural : t.fileSingle
              , r = t.msgFilesTooLess.replace("{n}", t.minFileCount).replace("{files}", a)
              , n = t.$errorContainer;
            t._addError(r),
            t.isError = !0,
            t._updateFileDetails(0),
            n.fadeIn(800),
            t._raise("fileerror", [e, r]),
            t._clearFileInput(),
            i.addCss(t.$container, "has-error")
        },
        _parseError: function(i, t, a, r) {
            var n = this
              , o = e.trim(a + "")
              , l = "." === o.slice(-1) ? "" : "."
              , s = void 0 !== t.responseJSON && void 0 !== t.responseJSON.error ? t.responseJSON.error : t.responseText;
            return n.cancelling && n.msgUploadAborted && (o = n.msgUploadAborted),
            n.showAjaxErrorDetails && s ? (s = e.trim(s.replace(/\n\s*\n/g, "\n")),
            s = s.length > 0 ? "<pre>" + s + "</pre>" : "",
            o += l + s) : o += l,
            o === l && (o = n.msgAjaxError.replace("{operation}", i)),
            n.cancelling = !1,
            r ? "<b>" + r + ": </b>" + o : o
        },
        _parseFileType: function(e) {
            var t, a, r, n, o = this, l = o.allowedPreviewTypes;
            for (n = 0; n < l.length; n++)
                if (r = l[n],
                t = o.fileTypeSettings[r],
                a = t(e.type, e.name) ? r : "",
                !i.isEmpty(a))
                    return a;
            return "other"
        },
        _getPreviewIcon: function(i) {
            var t, a = this, r = null;
            return i && i.indexOf(".") > -1 && (t = i.split(".").pop(),
            a.previewFileIconSettings && a.previewFileIconSettings[t] && (r = a.previewFileIconSettings[t]),
            a.previewFileExtSettings && e.each(a.previewFileExtSettings, function(e, i) {
                return a.previewFileIconSettings[e] && i(t) ? void (r = a.previewFileIconSettings[e]) : void 0
            })),
            r
        },
        _parseFilePreviewIcon: function(e, i) {
            var t = this
              , a = t._getPreviewIcon(i) || t.previewFileIcon;
            return e.indexOf("{previewFileIcon}") > -1 && (e = e.replace(/\{previewFileIconClass}/g, t.previewFileIconClass).replace(/\{previewFileIcon}/g, a)),
            e
        },
        _raise: function(i, t) {
            var a = this
              , r = e.Event(i);
            if (void 0 !== t ? a.$element.trigger(r, t) : a.$element.trigger(r),
            r.isDefaultPrevented())
                return !1;
            if (!r.result)
                return r.result;
            switch (i) {
            case "filebatchuploadcomplete":
            case "filebatchuploadsuccess":
            case "fileuploaded":
            case "fileclear":
            case "filecleared":
            case "filereset":
            case "fileerror":
            case "filefoldererror":
            case "fileuploaderror":
            case "filebatchuploaderror":
            case "filedeleteerror":
            case "filecustomerror":
            case "filesuccessremove":
                break;
            default:
                a.ajaxAborted = r.result
            }
            return !0
        },
        _listenFullScreen: function(e) {
            var i, t, a = this, r = a.$modal;
            r && r.length && (i = r && r.find(".btn-fullscreen"),
            t = r && r.find(".btn-borderless"),
            i.length && t.length && (i.removeClass("active").attr("aria-pressed", "false"),
            t.removeClass("active").attr("aria-pressed", "false"),
            e ? i.addClass("active").attr("aria-pressed", "true") : t.addClass("active").attr("aria-pressed", "true"),
            r.hasClass("file-zoom-fullscreen") ? a._maximizeZoomDialog() : e ? a._maximizeZoomDialog() : t.removeClass("active").attr("aria-pressed", "false")))
        },
        _listen: function() {
            var t = this
              , a = t.$element
              , r = a.closest("form")
              , n = t.$container;
            i.handler(a, "change", e.proxy(t._change, t)),
            t.showBrowse && i.handler(t.$btnFile, "click", e.proxy(t._browse, t)),
            i.handler(r, "reset", e.proxy(t.reset, t)),
            i.handler(n.find(".fileinput-remove:not([disabled])"), "click", e.proxy(t.clear, t)),
            i.handler(n.find(".fileinput-cancel"), "click", e.proxy(t.cancel, t)),
            t._initDragDrop(),
            t.isUploadable || i.handler(r, "submit", e.proxy(t._submitForm, t)),
            i.handler(t.$container.find(".fileinput-upload"), "click", e.proxy(t._uploadClick, t)),
            i.handler(e(window), "resize", function() {
                t._listenFullScreen(screen.width === window.innerWidth && screen.height === window.innerHeight)
            }),
            i.handler(e(document), "webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange", function() {
                t._listenFullScreen(i.checkFullScreen())
            }),
            t._initClickable()
        },
        _initClickable: function() {
            var t, a = this;
            a.isClickable && (t = a.isUploadable ? a.$dropZone : a.$preview.find(".file-default-preview"),
            i.addCss(t, "clickable"),
            t.attr("tabindex", -1),
            i.handler(t, "click", function(i) {
                var r = e(i.target);
                r.parents(".file-preview-thumbnails").length && !r.parents(".file-default-preview").length || (a.$element.trigger("click"),
                t.blur())
            }))
        },
        _initDragDrop: function() {
            var t = this
              , a = t.$dropZone;
            t.isUploadable && t.dropZoneEnabled && t.showPreview && (i.handler(a, "dragenter dragover", e.proxy(t._zoneDragEnter, t)),
            i.handler(a, "dragleave", e.proxy(t._zoneDragLeave, t)),
            i.handler(a, "drop", e.proxy(t._zoneDrop, t)),
            i.handler(e(document), "dragenter dragover drop", t._zoneDragDropInit))
        },
        _zoneDragDropInit: function(e) {
            e.stopPropagation(),
            e.preventDefault()
        },
        _zoneDragEnter: function(t) {
            var a = this
              , r = e.inArray("Files", t.originalEvent.dataTransfer.types) > -1;
            return a._zoneDragDropInit(t),
            a.isDisabled || !r ? (t.originalEvent.dataTransfer.effectAllowed = "none",
            void (t.originalEvent.dataTransfer.dropEffect = "none")) : void i.addCss(a.$dropZone, "file-highlighted")
        },
        _zoneDragLeave: function(e) {
            var i = this;
            i._zoneDragDropInit(e),
            i.isDisabled || i.$dropZone.removeClass("file-highlighted")
        },
        _zoneDrop: function(e) {
            var t = this;
            e.preventDefault(),
            t.isDisabled || i.isEmpty(e.originalEvent.dataTransfer.files) || (t._change(e, "dragdrop"),
            t.$dropZone.removeClass("file-highlighted"))
        },
        _uploadClick: function(e) {
            var t, a = this, r = a.$container.find(".fileinput-upload"), n = !r.hasClass("disabled") && i.isEmpty(r.attr("disabled"));
            if (!e || !e.isDefaultPrevented()) {
                if (!a.isUploadable)
                    return void (n && "submit" !== r.attr("type") && (t = r.closest("form"),
                    t.length && t.trigger("submit"),
                    e.preventDefault()));
                e.preventDefault(),
                n && a.upload()
            }
        },
        _submitForm: function() {
            var e = this
              , i = e.$element
              , t = i.get(0).files;
            return t && e.minFileCount > 0 && e._getFileCount(t.length) < e.minFileCount ? (e._noFilesError({}),
            !1) : !e._abort({})
        },
        _clearPreview: function() {
            var t = this
              , a = t.$preview
              , r = t.showUploadedThumbs ? a.find(i.FRAMES + ":not(.file-preview-success)") : a.find(i.FRAMES);
            r.each(function() {
                var t = e(this);
                t.remove(),
                i.cleanZoomCache(a.find("#zoom-" + t.attr("id")))
            }),
            t.$preview.find(i.FRAMES).length && t.showPreview || t._resetUpload(),
            t._validateDefaultPreview()
        },
        _initSortable: function() {
            var t, a = this, r = a.$preview, n = "." + i.SORT_CSS;
            window.KvSortable && 0 !== r.find(n).length && (t = {
                handle: ".drag-handle-init",
                dataIdAttr: "data-preview-id",
                draggable: n,
                onSort: function(t) {
                    var r, n, o = t.oldIndex, l = t.newIndex;
                    a.initialPreview = i.moveArray(a.initialPreview, o, l),
                    a.initialPreviewConfig = i.moveArray(a.initialPreviewConfig, o, l),
                    a.previewCache.init();
                    for (var s = 0; s < a.initialPreviewConfig.length; s++)
                        null !== a.initialPreviewConfig[s] && (r = a.initialPreviewConfig[s].key,
                        n = e(".kv-file-remove[data-key='" + r + "']").closest(i.FRAMES),
                        n.attr("data-fileindex", "init_" + s).data("fileindex", "init_" + s));
                    a._raise("filesorted", {
                        previewId: e(t.item).attr("id"),
                        oldIndex: o,
                        newIndex: l,
                        stack: a.initialPreviewConfig
                    })
                }
            },
            r.data("kvsortable") && r.kvsortable("destroy"),
            e.extend(!0, t, a.fileActionSettings.dragSettings),
            r.kvsortable(t))
        },
        _initPreview: function(e) {
            var t, a = this, r = a.initialCaption || "";
            return a.previewCache.count() ? (t = a.previewCache.out(),
            r = e && a.initialCaption ? a.initialCaption : t.caption,
            a.$preview.html(t.content),
            a._setInitThumbAttr(),
            a._setCaption(r),
            a._initSortable(),
            void (i.isEmpty(t.content) || a.$container.removeClass("file-input-new"))) : (a._clearPreview(),
            void (e ? a._setCaption(r) : a._initCaption()))
        },
        _getZoomButton: function(e) {
            var i = this
              , t = i.previewZoomButtonIcons[e]
              , a = i.previewZoomButtonClasses[e]
              , r = ' title="' + (i.previewZoomButtonTitles[e] || "") + '" '
              , n = r + ("close" === e ? ' data-dismiss="modal" aria-hidden="true"' : "");
            return "fullscreen" !== e && "borderless" !== e && "toggleheader" !== e || (n += ' data-toggle="button" aria-pressed="false" autocomplete="off"'),
            '<button type="button" class="' + a + " btn-" + e + '"' + n + ">" + t + "</button>"
        },
        _getModalContent: function() {
            var e = this;
            return e._getLayoutTemplate("modal").replace(/\{heading}/g, e.msgZoomModalHeading).replace(/\{prev}/g, e._getZoomButton("prev")).replace(/\{next}/g, e._getZoomButton("next")).replace(/\{toggleheader}/g, e._getZoomButton("toggleheader")).replace(/\{fullscreen}/g, e._getZoomButton("fullscreen")).replace(/\{borderless}/g, e._getZoomButton("borderless")).replace(/\{close}/g, e._getZoomButton("close"))
        },
        _listenModalEvent: function(e) {
            var t = this
              , a = t.$modal
              , r = function(e) {
                return {
                    sourceEvent: e,
                    previewId: a.data("previewId"),
                    modal: a
                }
            };
            a.on(e + ".bs.modal", function(n) {
                var o = a.find(".btn-fullscreen")
                  , l = a.find(".btn-borderless");
                t._raise("filezoom" + e, r(n)),
                "shown" === e && (l.removeClass("active").attr("aria-pressed", "false"),
                o.removeClass("active").attr("aria-pressed", "false"),
                a.hasClass("file-zoom-fullscreen") && (t._maximizeZoomDialog(),
                i.checkFullScreen() ? o.addClass("active").attr("aria-pressed", "true") : l.addClass("active").attr("aria-pressed", "true")))
            })
        },
        _initZoom: function() {
            var t, a = this, r = a._getLayoutTemplate("modalMain"), n = "#" + i.MODAL_ID;
            a.$modal = e(n),
            a.$modal && a.$modal.length || (t = e(document.createElement("div")).html(r).insertAfter(a.$container),
            a.$modal = e("#" + i.MODAL_ID).insertBefore(t),
            t.remove()),
            a.$modal.html(a._getModalContent()),
            a._listenModalEvent("show"),
            a._listenModalEvent("shown"),
            a._listenModalEvent("hide"),
            a._listenModalEvent("hidden"),
            a._listenModalEvent("loaded")
        },
        _initZoomButtons: function() {
            var t, a, r = this, n = r.$modal.data("previewId") || "", o = r.$preview, l = o.find(i.FRAMES).toArray(), s = l.length, d = r.$modal.find(".btn-prev"), c = r.$modal.find(".btn-next");
            return l.length < 2 ? (d.hide(),
            void c.hide()) : (d.show(),
            c.show(),
            void (s && (t = e(l[0]),
            a = e(l[s - 1]),
            d.removeAttr("disabled"),
            c.removeAttr("disabled"),
            t.length && t.attr("id") === n && d.attr("disabled", !0),
            a.length && a.attr("id") === n && c.attr("disabled", !0))))
        },
        _maximizeZoomDialog: function() {
            var i = this
              , t = i.$modal
              , a = t.find(".modal-header:visible")
              , r = t.find(".modal-footer:visible")
              , n = t.find(".modal-body")
              , o = e(window).height()
              , l = 0;
            t.addClass("file-zoom-fullscreen"),
            a && a.length && (o -= a.outerHeight(!0)),
            r && r.length && (o -= r.outerHeight(!0)),
            n && n.length && (l = n.outerHeight(!0) - n.height(),
            o -= l),
            t.find(".kv-zoom-body").height(o)
        },
        _resizeZoomDialog: function(e) {
            var t = this
              , a = t.$modal
              , r = a.find(".btn-fullscreen")
              , n = a.find(".btn-borderless");
            if (a.hasClass("file-zoom-fullscreen"))
                i.toggleFullScreen(!1),
                e ? r.hasClass("active") || (a.removeClass("file-zoom-fullscreen"),
                t._resizeZoomDialog(!0),
                n.hasClass("active") && n.removeClass("active").attr("aria-pressed", "false")) : r.hasClass("active") ? r.removeClass("active").attr("aria-pressed", "false") : (a.removeClass("file-zoom-fullscreen"),
                t.$modal.find(".kv-zoom-body").css("height", t.zoomModalHeight));
            else {
                if (!e)
                    return void t._maximizeZoomDialog();
                i.toggleFullScreen(!0)
            }
            a.focus()
        },
        _setZoomContent: function(t, a) {
            var r, n, o, l, s, d, c, p, u, f, m = this, g = t.attr("id"), v = m.$modal, h = v.find(".btn-prev"), w = v.find(".btn-next"), _ = v.find(".btn-fullscreen"), b = v.find(".btn-borderless"), C = v.find(".btn-toggleheader"), E = m.$preview.find("#zoom-" + g);
            n = E.attr("data-template") || "generic",
            r = E.find(".kv-file-content"),
            o = r.length ? r.html() : "",
            u = t.data("caption") || "",
            f = t.data("size") || "",
            l = u + " " + f,
            v.find(".kv-zoom-title").html(l),
            s = v.find(".kv-zoom-body"),
            v.removeClass("kv-single-content"),
            a ? (p = s.clone().insertAfter(s),
            s.html(o).hide(),
            p.fadeOut("fast", function() {
                s.fadeIn("fast"),
                p.remove()
            })) : s.html(o),
            c = m.previewZoomSettings[n],
            c && (d = s.find(".kv-preview-data"),
            i.addCss(d, "file-zoom-detail"),
            e.each(c, function(e, i) {
                d.css(e, i),
                (d.attr("width") && "width" === e || d.attr("height") && "height" === e) && d.removeAttr(e)
            })),
            v.data("previewId", g),
            i.handler(h, "click", function() {
                m._zoomSlideShow("prev", g)
            }),
            i.handler(w, "click", function() {
                m._zoomSlideShow("next", g)
            }),
            i.handler(_, "click", function() {
                m._resizeZoomDialog(!0)
            }),
            i.handler(b, "click", function() {
                m._resizeZoomDialog(!1)
            }),
            i.handler(C, "click", function() {
                var e, i = v.find(".modal-header"), t = v.find(".modal-body .floating-buttons"), a = i.find(".kv-zoom-actions"), r = function(e) {
                    var t = m.$modal.find(".kv-zoom-body")
                      , a = m.zoomModalHeight;
                    v.hasClass("file-zoom-fullscreen") && (a = t.outerHeight(!0),
                    e || (a -= i.outerHeight(!0))),
                    t.css("height", e ? a + e : a)
                };
                i.is(":visible") ? (e = i.outerHeight(!0),
                i.slideUp("slow", function() {
                    a.find(".btn").appendTo(t),
                    r(e)
                })) : (t.find(".btn").appendTo(a),
                i.slideDown("slow", function() {
                    r()
                })),
                v.focus()
            }),
            i.handler(v, "keydown", function(e) {
                var i = e.which || e.keyCode;
                37 !== i || h.attr("disabled") || m._zoomSlideShow("prev", g),
                39 !== i || w.attr("disabled") || m._zoomSlideShow("next", g)
            })
        },
        _zoomPreview: function(t) {
            var a, r = this, n = e("body"), o = r.$modal;
            if (!t.length)
                throw "Cannot zoom to detailed preview!";
            n.length && o.appendTo(n),
            o.html(r._getModalContent()),
            a = t.closest(i.FRAMES),
            r._setZoomContent(a),
            o.modal("show"),
            r._initZoomButtons()
        },
        _zoomSlideShow: function(t, a) {
            var r, n, o, l = this, s = l.$modal.find(".kv-zoom-actions .btn-" + t), d = l.$preview.find(i.FRAMES).toArray(), c = d.length;
            if (!s.attr("disabled")) {
                for (n = 0; c > n; n++)
                    if (e(d[n]).attr("id") === a) {
                        o = "prev" === t ? n - 1 : n + 1;
                        break
                    }
                0 > o || o >= c || !d[o] || (r = e(d[o]),
                r.length && l._setZoomContent(r, !0),
                l._initZoomButtons(),
                l._raise("filezoom" + t, {
                    previewId: a,
                    modal: l.$modal
                }))
            }
        },
        _initZoomButton: function() {
            var t = this;
            t.$preview.find(".kv-file-zoom").each(function() {
                var a = e(this);
                i.handler(a, "click", function() {
                    t._zoomPreview(a)
                })
            })
        },
        _initPreviewActions: function() {
            var t = this
              , a = t.$preview
              , r = t.deleteExtraData || {}
              , n = i.FRAMES + " .kv-file-remove"
              , o = function() {
                var e = t.isUploadable ? t.previewCache.count() : t.$element.get(0).files.length;
                0 !== a.find(n).length || e || (t.reset(),
                t.initialCaption = "")
            };
            t._initZoomButton(),
            a.find(n).each(function() {
                var n = e(this)
                  , l = n.data("url") || t.deleteUrl
                  , s = n.data("key");
                if (!i.isEmpty(l) && void 0 !== s) {
                    var d, c, p, u, f = n.closest(i.FRAMES), m = t.previewCache.data, g = f.data("fileindex");
                    g = parseInt(g.replace("init_", "")),
                    p = i.isEmpty(m.config) && i.isEmpty(m.config[g]) ? null : m.config[g],
                    u = i.isEmpty(p) || i.isEmpty(p.extra) ? r : p.extra,
                    "function" == typeof u && (u = u()),
                    c = {
                        id: n.attr("id"),
                        key: s,
                        extra: u
                    },
                    d = e.extend(!0, {}, {
                        url: l,
                        type: "POST",
                        dataType: "json",
                        data: e.extend(!0, {}, {
                            key: s
                        }, u),
                        beforeSend: function(e) {
                            t.ajaxAborted = !1,
                            t._raise("filepredelete", [s, e, u]),
                            t.ajaxAborted ? e.abort() : (i.addCss(f, "file-uploading"),
                            i.addCss(n, "disabled"))
                        },
                        success: function(e, r, l) {
                            var d, p;
                            return i.isEmpty(e) || i.isEmpty(e.error) ? (t.previewCache.init(),
                            g = parseInt(f.data("fileindex").replace("init_", "")),
                            t.previewCache.unset(g),
                            d = t.previewCache.count(),
                            p = d > 0 ? t._getMsgSelected(d) : "",
                            t._raise("filedeleted", [s, l, u]),
                            t._setCaption(p),
                            f.removeClass("file-uploading").addClass("file-deleted"),
                            void f.fadeOut("slow", function() {
                                i.cleanZoomCache(a.find("#zoom-" + f.attr("id"))),
                                t._clearObjects(f),
                                f.remove(),
                                o(),
                                d || 0 !== t.getFileStack().length || (t._setCaption(""),
                                t.reset())
                            })) : (c.jqXHR = l,
                            c.response = e,
                            t._showError(e.error, c, "filedeleteerror"),
                            f.removeClass("file-uploading"),
                            n.removeClass("disabled"),
                            void o())
                        },
                        error: function(e, i, a) {
                            var r = t.ajaxOperations.deleteThumb
                              , n = t._parseError(r, e, a);
                            c.jqXHR = e,
                            c.response = {},
                            t._showError(n, c, "filedeleteerror"),
                            f.removeClass("file-uploading"),
                            o()
                        }
                    }, t.ajaxDeleteSettings),
                    i.handler(n, "click", function() {
                        return t._validateMinCount() ? void e.ajax(d) : !1
                    })
                }
            })
        },
        _clearObjects: function(i) {
            i.find("video audio").each(function() {
                this.pause(),
                e(this).remove()
            }),
            i.find("img object div").each(function() {
                e(this).remove()
            })
        },
        _clearFileInput: function() {
            var t, a, r, n = this, o = n.$element;
            n.fileInputCleared = !0,
            i.isEmpty(o.val()) || (n.isIE9 || n.isIE10 ? (t = o.closest("form"),
            a = e(document.createElement("form")),
            r = e(document.createElement("div")),
            o.before(r),
            t.length ? t.after(a) : r.after(a),
            a.append(o).trigger("reset"),
            r.before(o).remove(),
            a.remove()) : o.val(""))
        },
        _resetUpload: function() {
            var e = this;
            e.uploadCache = {
                content: [],
                config: [],
                tags: [],
                append: !0
            },
            e.uploadCount = 0,
            e.uploadStatus = {},
            e.uploadLog = [],
            e.uploadAsyncCount = 0,
            e.loadedImages = [],
            e.totalImagesCount = 0,
            e.$btnUpload.removeAttr("disabled"),
            e._setProgress(0),
            i.addCss(e.$progress, "hide"),
            e._resetErrors(!1),
            e.ajaxAborted = !1,
            e.ajaxRequests = [],
            e._resetCanvas(),
            e.cacheInitialPreview = {}
        },
        _resetCanvas: function() {
            var e = this;
            e.canvas && e.imageCanvasContext && e.imageCanvasContext.clearRect(0, 0, e.canvas.width, e.canvas.height)
        },
        _hasInitialPreview: function() {
            var e = this;
            return !e.overwriteInitial && e.previewCache.count()
        },
        _resetPreview: function() {
            var e, i, t = this;
            t.previewCache.count() ? (e = t.previewCache.out(),
            t.$preview.html(e.content),
            t._setInitThumbAttr(),
            i = t.initialCaption ? t.initialCaption : e.caption,
            t._setCaption(i)) : (t._clearPreview(),
            t._initCaption()),
            t.showPreview && (t._initZoom(),
            t._initSortable())
        },
        _clearDefaultPreview: function() {
            var e = this;
            e.$preview.find(".file-default-preview").remove()
        },
        _validateDefaultPreview: function() {
            var e = this;
            e.showPreview && !i.isEmpty(e.defaultPreviewContent) && (e.$preview.html('<div class="file-default-preview">' + e.defaultPreviewContent + "</div>"),
            e.$container.removeClass("file-input-new"),
            e._initClickable())
        },
        _resetPreviewThumbs: function(e) {
            var i, t = this;
            return e ? (t._clearPreview(),
            void t.clearStack()) : void (t._hasInitialPreview() ? (i = t.previewCache.out(),
            t.$preview.html(i.content),
            t._setInitThumbAttr(),
            t._setCaption(i.caption),
            t._initPreviewActions()) : t._clearPreview())
        },
        _getLayoutTemplate: function(e) {
            var t = this
              , a = t.layoutTemplates[e];
            return i.isEmpty(t.customLayoutTags) ? a : i.replaceTags(a, t.customLayoutTags)
        },
        _getPreviewTemplate: function(e) {
            var t = this
              , a = t.previewTemplates[e];
            return i.isEmpty(t.customPreviewTags) ? a : i.replaceTags(a, t.customPreviewTags)
        },
        _getOutData: function(e, i, t) {
            var a = this;
            return e = e || {},
            i = i || {},
            t = t || a.filestack.slice(0) || {},
            {
                form: a.formdata,
                files: t,
                filenames: a.filenames,
                filescount: a.getFilesCount(),
                extra: a._getExtraData(),
                response: i,
                reader: a.reader,
                jqXHR: e
            }
        },
        _getMsgSelected: function(e) {
            var i = this
              , t = 1 === e ? i.fileSingle : i.filePlural;
            return e > 0 ? i.msgSelected.replace("{n}", e).replace("{files}", t) : i.msgNoFilesSelected
        },
        _getThumbs: function(e) {
            return e = e || "",
            this.$preview.find(i.FRAMES + ":not(.file-preview-initial)" + e)
        },
        _getExtraData: function(e, i) {
            var t = this
              , a = t.uploadExtraData;
            return "function" == typeof t.uploadExtraData && (a = t.uploadExtraData(e, i)),
            a
        },
        _initXhr: function(e, i, t) {
            var a = this;
            return e.upload && e.upload.addEventListener("progress", function(e) {
                var r = 0
                  , n = e.total
                  , o = e.loaded || e.position;
                e.lengthComputable && (r = Math.floor(o / n * 100)),
                i ? a._setAsyncUploadStatus(i, r, t) : a._setProgress(r)
            }, !1),
            e
        },
        _ajaxSubmit: function(i, t, a, r, n, o) {
            var l, s = this;
            s._raise("filepreajax", [n, o]),
            s._uploadExtra(n, o),
            l = e.extend(!0, {}, {
                xhr: function() {
                    var i = e.ajaxSettings.xhr();
                    return s._initXhr(i, n, s.getFileStack().length)
                },
                url: s.uploadUrl,
                type: "POST",
                dataType: "json",
                data: s.formdata,
                cache: !1,
                processData: !1,
                contentType: !1,
                beforeSend: i,
                success: t,
                complete: a,
                error: r
            }, s.ajaxSettings),
            s.ajaxRequests.push(e.ajax(l))
        },
        _initUploadSuccess: function(t, a, r) {
            var n, o, l, s, d, c, p, u, f, m = this, g = function(e, i) {
                m[e]instanceof Array || (m[e] = []),
                i && i.length && (m[e] = m[e].concat(i))
            };
            m.showPreview && "object" == typeof t && !e.isEmptyObject(t) && void 0 !== t.initialPreview && t.initialPreview.length > 0 && (m.hasInitData = !0,
            c = t.initialPreview || [],
            p = t.initialPreviewConfig || [],
            u = t.initialPreviewThumbTags || [],
            n = !(void 0 !== t.append && !t.append),
            c.length > 0 && !i.isArray(c) && (c = c.split(m.initialPreviewDelimiter)),
            m.overwriteInitial = !1,
            g("initialPreview", c),
            g("initialPreviewConfig", p),
            g("initialPreviewThumbTags", u),
            void 0 !== a ? r ? (f = a.attr("data-fileindex"),
            m.uploadCache.content[f] = c[0],
            m.uploadCache.config[f] = p[0] || [],
            m.uploadCache.tags[f] = u[0] || [],
            m.uploadCache.append = n) : (l = m.previewCache.add(c, p[0], u[0], n),
            o = m.previewCache.get(l, !1),
            s = e(document.createElement("div")).html(o).hide().insertAfter(a),
            d = s.find(".kv-zoom-cache"),
            d && d.length && d.insertAfter(a),
            a.fadeOut("slow", function() {
                var e = s.find(".file-preview-frame");
                e && e.length && e.insertBefore(a).fadeIn("slow").css("display:inline-block"),
                m._initPreviewActions(),
                m._clearFileInput(),
                i.cleanZoomCache(m.$preview.find("#zoom-" + a.attr("id"))),
                a.remove(),
                s.remove(),
                m._initSortable()
            })) : (m.previewCache.set(c, p, u, n),
            m._initPreview(),
            m._initPreviewActions()))
        },
        _initSuccessThumbs: function() {
            var t = this;
            t.showPreview && t._getThumbs(i.FRAMES + " .file-preview-success").each(function() {
                var a = e(this)
                  , r = t.$preview
                  , n = a.find(".kv-file-remove");
                n.removeAttr("disabled"),
                i.handler(n, "click", function() {
                    var e = a.attr("id")
                      , n = t._raise("filesuccessremove", [e, a.data("fileindex")]);
                    i.cleanMemory(a),
                    n !== !1 && a.fadeOut("slow", function() {
                        i.cleanZoomCache(r.find("#zoom-" + e)),
                        a.remove(),
                        r.find(i.FRAMES).length || t.reset()
                    })
                })
            })
        },
        _checkAsyncComplete: function() {
            var i, t, a = this;
            for (t = 0; t < a.filestack.length; t++)
                if (a.filestack[t] && (i = a.previewInitId + "-" + t,
                -1 === e.inArray(i, a.uploadLog)))
                    return !1;
            return a.uploadAsyncCount === a.uploadLog.length
        },
        _uploadExtra: function(i, t) {
            var a = this
              , r = a._getExtraData(i, t);
            0 !== r.length && e.each(r, function(e, i) {
                a.formdata.append(e, i)
            })
        },
        _uploadSingle: function(t, a, r) {
            var n, o, l, s, d, c, p, u, f, m, g = this, v = g.getFileStack().length, h = new FormData, w = g.previewInitId + "-" + t, _ = g.filestack.length > 0 || !e.isEmptyObject(g.uploadExtraData), b = e("#" + w).find(".file-thumb-progress"), C = {
                id: w,
                index: t
            };
            g.formdata = h,
            g.showPreview && (o = e("#" + w + ":not(.file-preview-initial)"),
            s = o.find(".kv-file-upload"),
            d = o.find(".kv-file-remove"),
            b.removeClass("hide")),
            0 === v || !_ || s && s.hasClass("disabled") || g._abort(C) || (m = function(e, i) {
                g.updateStack(e, void 0),
                g.uploadLog.push(i),
                g._checkAsyncComplete() && (g.fileBatchCompleted = !0)
            }
            ,
            l = function() {
                var e, t, a, r, n = g.uploadCache, o = g.cacheInitialPreview;
                g.fileBatchCompleted && setTimeout(function() {
                    if (g.showPreview) {
                        if (g.previewCache.set(n.content, n.config, n.tags, n.append),
                        r = o && o.content ? o.content.length : 0) {
                            for (t = 0; t < n.content.length; t++)
                                a = t + r,
                                o.content[a] = n.content[t],
                                o.config.length && (o.config[a] = n.config[t]),
                                o.tags.length && (o.tags[a] = n.tags[t]);
                            g.initialPreview = o.content,
                            g.initialPreviewConfig = o.config,
                            g.initialPreviewThumbTags = o.tags
                        } else
                            g.initialPreview = n.content,
                            g.initialPreviewConfig = n.config,
                            g.initialPreviewThumbTags = n.tags;
                        g.cacheInitialPreview = {},
                        g.hasInitData && (g._initPreview(),
                        g._initPreviewActions())
                    }
                    g.unlock(),
                    g._clearFileInput(),
                    e = g.$preview.find(".file-preview-initial"),
                    g.uploadAsync && e.length && (i.addCss(e, i.SORT_CSS),
                    g._initSortable()),
                    g._raise("filebatchuploadcomplete", [g.filestack, g._getExtraData()]),
                    g.uploadCount = 0,
                    g.uploadStatus = {},
                    g.uploadLog = [],
                    g._setProgress(101)
                }, 100)
            }
            ,
            c = function(a) {
                n = g._getOutData(a),
                g.fileBatchCompleted = !1,
                g.showPreview && (o.hasClass("file-preview-success") || (g._setThumbStatus(o, "Loading"),
                i.addCss(o, "file-uploading")),
                s.attr("disabled", !0),
                d.attr("disabled", !0)),
                r || g.lock(),
                g._raise("filepreupload", [n, w, t]),
                e.extend(!0, C, n),
                g._abort(C) && (a.abort(),
                g._setProgressCancelled())
            }
            ,
            p = function(a, l, d) {
                var c = g.showPreview && o.attr("id") ? o.attr("id") : w;
                n = g._getOutData(d, a),
                e.extend(!0, C, n),
                setTimeout(function() {
                    i.isEmpty(a) || i.isEmpty(a.error) ? (g.showPreview && (g._setThumbStatus(o, "Success"),
                    s.hide(),
                    g._initUploadSuccess(a, o, r),
                    g._setProgress(101, b)),
                    g._raise("fileuploaded", [n, c, t]),
                    r ? m(t, c) : g.updateStack(t, void 0)) : (g._showUploadError(a.error, C),
                    g._setPreviewError(o, t),
                    r && m(t, c))
                }, 100)
            }
            ,
            u = function() {
                setTimeout(function() {
                    g.showPreview && (s.removeAttr("disabled"),
                    d.removeAttr("disabled"),
                    o.removeClass("file-uploading")),
                    r ? l() : (g.unlock(!1),
                    g._clearFileInput()),
                    g._initSuccessThumbs()
                }, 100)
            }
            ,
            f = function(i, n, l) {
                var s = g.ajaxOperations.uploadThumb
                  , d = g._parseError(s, i, l, r ? a[t].name : null);
                setTimeout(function() {
                    r && m(t, w),
                    g.uploadStatus[w] = 100,
                    g._setPreviewError(o, t),
                    e.extend(!0, C, g._getOutData(i)),
                    g._setProgress(101, b, g.msgAjaxProgressError.replace("{operation}", s)),
                    g._showUploadError(d, C)
                }, 100)
            }
            ,
            h.append(g.uploadFileAttr, a[t], g.filenames[t]),
            h.append("file_id", t),
            g._ajaxSubmit(c, p, u, f, w, t))
        },
        _uploadBatch: function() {
            var t, a, r, n, o, l = this, s = l.filestack, d = s.length, c = {}, p = l.filestack.length > 0 || !e.isEmptyObject(l.uploadExtraData);
            l.formdata = new FormData,
            0 !== d && p && !l._abort(c) && (o = function() {
                e.each(s, function(e) {
                    l.updateStack(e, void 0)
                }),
                l._clearFileInput()
            }
            ,
            t = function(t) {
                l.lock();
                var a = l._getOutData(t);
                l.showPreview && l._getThumbs().each(function() {
                    var t = e(this)
                      , a = t.find(".kv-file-upload")
                      , r = t.find(".kv-file-remove");
                    t.hasClass("file-preview-success") || (l._setThumbStatus(t, "Loading"),
                    i.addCss(t, "file-uploading")),
                    a.attr("disabled", !0),
                    r.attr("disabled", !0)
                }),
                l._raise("filebatchpreupload", [a]),
                l._abort(a) && (t.abort(),
                l._setProgressCancelled())
            }
            ,
            a = function(t, a, r) {
                var n = l._getOutData(r, t)
                  , s = l._getThumbs(":not(.file-preview-error)")
                  , d = 0
                  , c = i.isEmpty(t) || i.isEmpty(t.errorkeys) ? [] : t.errorkeys;
                i.isEmpty(t) || i.isEmpty(t.error) ? (l._raise("filebatchuploadsuccess", [n]),
                o(),
                l.showPreview ? (s.each(function() {
                    var i = e(this)
                      , t = i.find(".kv-file-upload");
                    i.find(".kv-file-upload").hide(),
                    l._setThumbStatus(i, "Success"),
                    i.removeClass("file-uploading"),
                    t.removeAttr("disabled")
                }),
                l._initUploadSuccess(t)) : l.reset(),
                l._setProgress(101)) : (l.showPreview && (s.each(function() {
                    var i = e(this)
                      , t = i.find(".kv-file-remove")
                      , a = i.find(".kv-file-upload");
                    return i.removeClass("file-uploading"),
                    a.removeAttr("disabled"),
                    t.removeAttr("disabled"),
                    0 === c.length ? void l._setPreviewError(i) : (-1 !== e.inArray(d, c) ? l._setPreviewError(i) : (i.find(".kv-file-upload").hide(),
                    l._setThumbStatus(i, "Success"),
                    l.updateStack(d, void 0)),
                    void d++)
                }),
                l._initUploadSuccess(t)),
                l._showUploadError(t.error, n, "filebatchuploaderror"))
            }
            ,
            n = function() {
                l.unlock(),
                l._initSuccessThumbs(),
                l._clearFileInput(),
                l._raise("filebatchuploadcomplete", [l.filestack, l._getExtraData()])
            }
            ,
            r = function(i, t, a) {
                var r = l._getOutData(i)
                  , n = l.ajaxOperations.uploadBatch
                  , o = l._parseError(n, i, a);
                l._showUploadError(o, r, "filebatchuploaderror"),
                l.uploadFileCount = d - 1,
                l.showPreview && (l._getThumbs().each(function() {
                    var i = e(this)
                      , t = i.attr("data-fileindex");
                    i.removeClass("file-uploading"),
                    void 0 !== l.filestack[t] && l._setPreviewError(i)
                }),
                l._getThumbs().removeClass("file-uploading"),
                l._getThumbs(" .kv-file-upload").removeAttr("disabled"),
                l._getThumbs(" .kv-file-delete").removeAttr("disabled"),
                l._setProgress(101, l.$progress, l.msgAjaxProgressError.replace("{operation}", n)))
            }
            ,
            e.each(s, function(e, t) {
                i.isEmpty(s[e]) || l.formdata.append(l.uploadFileAttr, t, l.filenames[e])
            }),
            l._ajaxSubmit(t, a, n, r))
        },
        _uploadExtraOnly: function() {
            var e, t, a, r, n = this, o = {};
            n.formdata = new FormData,
            n._abort(o) || (e = function(e) {
                n.lock();
                var i = n._getOutData(e);
                n._raise("filebatchpreupload", [i]),
                n._setProgress(50),
                o.data = i,
                o.xhr = e,
                n._abort(o) && (e.abort(),
                n._setProgressCancelled())
            }
            ,
            t = function(e, t, a) {
                var r = n._getOutData(a, e);
                i.isEmpty(e) || i.isEmpty(e.error) ? (n._raise("filebatchuploadsuccess", [r]),
                n._clearFileInput(),
                n._initUploadSuccess(e),
                n._setProgress(101)) : n._showUploadError(e.error, r, "filebatchuploaderror")
            }
            ,
            a = function() {
                n.unlock(),
                n._clearFileInput(),
                n._raise("filebatchuploadcomplete", [n.filestack, n._getExtraData()])
            }
            ,
            r = function(e, i, t) {
                var a = n._getOutData(e)
                  , r = n.ajaxOperations.uploadExtra
                  , l = n._parseError(r, e, t);
                o.data = a,
                n._showUploadError(l, a, "filebatchuploaderror"),
                n._setProgress(101, n.$progress, n.msgAjaxProgressError.replace("{operation}", r))
            }
            ,
            n._ajaxSubmit(e, t, a, r))
        },
        _initFileActions: function() {
            var t = this
              , a = t.$preview;
            t.showPreview && (t._initZoomButton(),
            a.find(i.FRAMES + " .kv-file-remove").each(function() {
                var r, n, o, l, s = e(this), d = s.closest(i.FRAMES), c = d.attr("id"), p = d.attr("data-fileindex");
                i.handler(s, "click", function() {
                    return l = t._raise("filepreremove", [c, p]),
                    l !== !1 && t._validateMinCount() ? (r = d.hasClass("file-preview-error"),
                    i.cleanMemory(d),
                    void d.fadeOut("slow", function() {
                        i.cleanZoomCache(a.find("#zoom-" + c)),
                        t.updateStack(p, void 0),
                        t._clearObjects(d),
                        d.remove(),
                        c && r && t.$errorContainer.find('li[data-file-id="' + c + '"]').fadeOut("fast", function() {
                            e(this).remove(),
                            t._errorsExist() || t._resetErrors()
                        }),
                        t._clearFileInput();
                        var l = t.getFileStack(!0)
                          , s = t.previewCache.count()
                          , u = l.length
                          , f = t.showPreview && a.find(i.FRAMES).length;
                        0 !== u || 0 !== s || f ? (n = s + u,
                        o = n > 1 ? t._getMsgSelected(n) : l[0] ? t._getFileNames()[0] : "",
                        t._setCaption(o)) : t.reset(),
                        t._raise("fileremoved", [c, p])
                    })) : !1
                })
            }),
            t.$preview.find(i.FRAMES + " .kv-file-upload").each(function() {
                var a = e(this);
                i.handler(a, "click", function() {
                    var e = a.closest(i.FRAMES)
                      , r = e.attr("data-fileindex");
                    e.hasClass("file-preview-error") || t._uploadSingle(r, t.filestack, !1)
                })
            }))
        },
        _hideFileIcon: function() {
            this.overwriteInitial && this.$captionContainer.find(".kv-caption-icon").hide()
        },
        _showFileIcon: function() {
            this.$captionContainer.find(".kv-caption-icon").show()
        },
        _getSize: function(i) {
            var t, a, r, n = this, o = parseFloat(i), l = n.fileSizeGetter;
            return e.isNumeric(i) && e.isNumeric(o) ? ("function" == typeof l ? r = l(o) : (t = Math.floor(Math.log(o) / Math.log(1024)),
            a = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
            r = 1 * (o / Math.pow(1024, t)).toFixed(2) + " " + a[t]),
            n._getLayoutTemplate("size").replace("{sizeText}", r)) : ""
        },
        _generatePreviewTemplate: function(e, t, a, r, n, o, l, s, d, c, p) {
            var u, f = this, m = f.slug(a), g = "", v = f.previewSettings[e], h = v && v.width ? v.width : "", w = v && v.height ? v.height : "", _ = d || f._renderFileFooter(m, l, v.width, o), b = f._getPreviewIcon(a), C = b && f.preferIconicPreview, E = b && f.preferIconicZoomPreview, y = function(t, o, l, d) {
                var u = l ? "zoom-" + n : n
                  , g = f._getPreviewTemplate(t)
                  , v = (s || "") + " " + d;
                return f.frameClass && (v = f.frameClass + " " + v),
                l && (v = v.replace(" " + i.SORT_CSS, "")),
                g = f._parseFilePreviewIcon(g, a),
                "text" === t && (o = i.htmlEncode(o)),
                g.replace(/\{previewId}/g, u).replace(/\{caption}/g, m).replace(/\{frameClass}/g, v).replace(/\{type}/g, r).replace(/\{fileindex}/g, c).replace(/\{width}/g, h).replace(/\{height}/g, w).replace(/\{footer}/g, _).replace(/\{data}/g, o).replace(/\{template}/g, p || e)
            };
            return c = c || n.slice(n.lastIndexOf("-") + 1),
            f.fileActionSettings.showZoom && (g = y(E ? "other" : e, t, !0, "kv-zoom-thumb")),
            g = "\n" + f._getLayoutTemplate("zoomCache").replace("{zoomContent}", g),
            u = y(C ? "other" : e, t, !1, "kv-preview-thumb"),
            u + g
        },
        _previewDefault: function(t, a, r) {
            var n = this
              , o = n.$preview;
            if (n.showPreview) {
                var l, s = t ? t.name : "", d = t ? t.type : "", c = t.size, p = n.slug(s), u = r === !0 && !n.isUploadable, f = i.objUrl.createObjectURL(t);
                n._clearDefaultPreview(),
                l = n._generatePreviewTemplate("other", f, s, d, a, u, c),
                o.append("\n" + l),
                n._setThumbAttr(a, p, c),
                r === !0 && n.isUploadable && n._setThumbStatus(e("#" + a), "Error")
            }
        },
        _previewFile: function(e, i, t, a, r) {
            if (this.showPreview) {
                var n, o = this, l = o._parseFileType(i), s = i ? i.name : "", d = o.slug(s), c = o.allowedPreviewTypes, p = o.allowedPreviewMimeTypes, u = o.$preview, f = c && c.indexOf(l) >= 0, m = i.size, g = "text" === l || "html" === l || "image" === l ? t.target.result : r, v = p && -1 !== p.indexOf(i.type);
                "html" === l && o.purifyHtml && window.DOMPurify && (g = window.DOMPurify.sanitize(g)),
                f || v ? (n = o._generatePreviewTemplate(l, g, s, i.type, a, !1, m),
                o._clearDefaultPreview(),
                u.append("\n" + n),
                o._validateImage(a, d, i.type)) : o._previewDefault(i, a),
                o._setThumbAttr(a, d, m),
                o._initSortable()
            }
        },
        _setThumbAttr: function(i, t, a) {
            var r = this
              , n = e("#" + i);
            n.length && (a = a && a > 0 ? r._getSize(a) : "",
            n.data({
                caption: t,
                size: a
            }))
        },
        _setInitThumbAttr: function() {
            var e, t, a, r, n = this, o = n.previewCache.data, l = n.previewCache.count(!0);
            if (0 !== l)
                for (var s = 0; l > s; s++)
                    e = o.config[s],
                    r = n.previewInitId + "-init_" + s,
                    t = i.ifSet("caption", e, i.ifSet("filename", e)),
                    a = i.ifSet("size", e),
                    n._setThumbAttr(r, t, a)
        },
        _slugDefault: function(e) {
            return i.isEmpty(e) ? "" : String(e).replace(/[\-\[\]\/\{}:;#%=\(\)\*\+\?\\\^\$\|<>&"']/g, "_")
        },
        _readFiles: function(t) {
            this.reader = new FileReader;
            var a, r = this, n = r.$element, o = r.$preview, l = r.reader, s = r.$previewContainer, d = r.$previewStatus, c = r.msgLoading, p = r.msgProgress, u = r.previewInitId, f = t.length, m = r.fileTypeSettings, g = r.filestack.length, v = r.allowedFileTypes, h = v ? v.length : 0, w = r.allowedFileExtensions, _ = i.isEmpty(w) ? "" : w.join(", "), b = r.maxFilePreviewSize && parseFloat(r.maxFilePreviewSize), C = o.length && (!b || isNaN(b)), E = function(i, n, o, l) {
                var s = e.extend(!0, {}, r._getOutData({}, {}, t), {
                    id: o,
                    index: l
                })
                  , d = {
                    id: o,
                    index: l,
                    file: n,
                    files: t
                };
                return r._previewDefault(n, o, !0),
                r.isUploadable && (r.addToStack(void 0),
                setTimeout(function() {
                    a(l + 1)
                }, 100)),
                r._initFileActions(),
                r.removeFromPreviewOnError && e("#" + o).remove(),
                r.isUploadable ? r._showUploadError(i, s) : r._showError(i, d)
            };
            r.loadedImages = [],
            r.totalImagesCount = 0,
            e.each(t, function(e, i) {
                var t = r.fileTypeSettings.image;
                t && t(i.type) && r.totalImagesCount++
            }),
            a = function(e) {
                if (i.isEmpty(n.attr("multiple")) && (f = 1),
                e >= f)
                    return r.isUploadable && r.filestack.length > 0 ? r._raise("filebatchselected", [r.getFileStack()]) : r._raise("filebatchselected", [t]),
                    s.removeClass("file-thumb-loading"),
                    void d.html("");
                var y, x, T, S, F, P, I, k, $, A = g + e, z = u + "-" + A, D = t[e], U = D.name ? r.slug(D.name) : "", j = (D.size || 0) / 1e3, L = "", R = i.objUrl.createObjectURL(D), M = 0, O = "";
                if (h > 0)
                    for (S = 0; h > S; S++)
                        k = v[S],
                        $ = r.msgFileTypes[k] || k,
                        O += 0 === S ? $ : ", " + $;
                if (U === !1)
                    return void a(e + 1);
                if (0 === U.length)
                    return F = r.msgInvalidFileName.replace("{name}", i.htmlEncode(D.name)),
                    void (r.isError = E(F, D, z, e));
                if (i.isEmpty(w) || (L = new RegExp("\\.(" + w.join("|") + ")$","i")),
                T = j.toFixed(2),
                r.maxFileSize > 0 && j > r.maxFileSize)
                    return F = r.msgSizeTooLarge.replace("{name}", U).replace("{size}", T).replace("{maxSize}", r.maxFileSize),
                    void (r.isError = E(F, D, z, e));
                if (null !== r.minFileSize && j <= i.getNum(r.minFileSize))
                    return F = r.msgSizeTooSmall.replace("{name}", U).replace("{size}", T).replace("{minSize}", r.minFileSize),
                    void (r.isError = E(F, D, z, e));
                if (!i.isEmpty(v) && i.isArray(v)) {
                    for (S = 0; S < v.length; S += 1)
                        P = v[S],
                        M += m[P] ? 1 : 0;
                    if (0 === M)
                        return F = r.msgInvalidFileType.replace("{name}", U).replace("{types}", O),
                        void (r.isError = E(F, D, z, e))
                }
                return 0 !== M || i.isEmpty(w) || !i.isArray(w) || i.isEmpty(L) || (I = i.compare(U, L),
                M += i.isEmpty(I) ? 0 : I.length,
                0 !== M) ? r.showPreview ? !C && j > b ? (r.addToStack(D),
                s.addClass("file-thumb-loading"),
                r._previewDefault(D, z),
                r._initFileActions(),
                r._updateFileDetails(f),
                void a(e + 1)) : (o.length && void 0 !== FileReader ? (d.html(c.replace("{index}", e + 1).replace("{files}", f)),
                s.addClass("file-thumb-loading"),
                l.onerror = function(e) {
                    r._errorHandler(e, U)
                }
                ,
                l.onload = function(i) {
                    r._previewFile(e, D, i, z, R),
                    r._initFileActions()
                }
                ,
                l.onloadend = function() {
                    F = p.replace("{index}", e + 1).replace("{files}", f).replace("{percent}", 50).replace("{name}", U),
                    setTimeout(function() {
                        d.html(F),
                        r._updateFileDetails(f),
                        a(e + 1)
                    }, 100),
                    r._raise("fileloaded", [D, z, e, l])
                }
                ,
                l.onprogress = function(i) {
                    if (i.lengthComputable) {
                        var t = i.loaded / i.total * 100
                          , a = Math.ceil(t);
                        F = p.replace("{index}", e + 1).replace("{files}", f).replace("{percent}", a).replace("{name}", U),
                        setTimeout(function() {
                            d.html(F)
                        }, 100)
                    }
                }
                ,
                y = m.text,
                x = m.image,
                y(D.type, U) ? l.readAsText(D, r.textEncoding) : x(D.type, U) ? l.readAsDataURL(D) : l.readAsArrayBuffer(D)) : (r._previewDefault(D, z),
                setTimeout(function() {
                    a(e + 1),
                    r._updateFileDetails(f)
                }, 100),
                r._raise("fileloaded", [D, z, e, l])),
                void r.addToStack(D)) : (r.addToStack(D),
                setTimeout(function() {
                    a(e + 1)
                }, 100),
                void r._raise("fileloaded", [D, z, e, l])) : (F = r.msgInvalidFileExtension.replace("{name}", U).replace("{extensions}", _),
                void (r.isError = E(F, D, z, e)))
            }
            ,
            a(0),
            r._updateFileDetails(f, !1)
        },
        _updateFileDetails: function(e) {
            var t = this
              , a = t.$element
              , r = t.getFileStack()
              , n = i.isIE(9) && i.findFileName(a.val()) || a[0].files[0] && a[0].files[0].name || r.length && r[0].name || ""
              , o = t.slug(n)
              , l = t.isUploadable ? r.length : e
              , s = t.previewCache.count() + l
              , d = l > 1 ? t._getMsgSelected(s) : o;
            t.isError ? (t.$previewContainer.removeClass("file-thumb-loading"),
            t.$previewStatus.html(""),
            t.$captionContainer.find(".kv-caption-icon").hide()) : t._showFileIcon(),
            t._setCaption(d, t.isError),
            t.$container.removeClass("file-input-new file-input-ajax-new"),
            1 === arguments.length && t._raise("fileselect", [e, o]),
            t.previewCache.count() && t._initPreviewActions()
        },
        _setThumbStatus: function(e, i) {
            var t = this;
            if (t.showPreview) {
                var a = "indicator" + i
                  , r = a + "Title"
                  , n = "file-preview-" + i.toLowerCase()
                  , o = e.find(".file-upload-indicator")
                  , l = t.fileActionSettings;
                e.removeClass("file-preview-success file-preview-error file-preview-loading"),
                "Error" === i && e.find(".kv-file-upload").attr("disabled", !0),
                "Success" === i && (e.find(".file-drag-handle").remove(),
                o.css("margin-left", 0)),
                o.html(l[a]),
                o.attr("title", l[r]),
                e.addClass(n)
            }
        },
        _setProgressCancelled: function() {
            var e = this;
            e._setProgress(101, e.$progress, e.msgCancelled)
        },
        _setProgress: function(e, t, a) {
            var r = this
              , n = Math.min(e, 100)
              , o = 100 > n ? r.progressTemplate : a ? r.progressErrorTemplate : 100 >= e ? r.progressTemplate : r.progressCompleteTemplate
              , l = r.progressUploadThreshold;
            if (t = t || r.$progress,
            !i.isEmpty(o)) {
                if (l && n > l && 100 >= e) {
                    var s = o.replace("{percent}", l).replace("{percent}", l).replace("{percent}%", r.msgUploadThreshold);
                    t.html(s)
                } else
                    t.html(o.replace(/\{percent}/g, n));
                a && t.find('[role="progressbar"]').html(a)
            }
        },
        _setFileDropZoneTitle: function() {
            var e, t = this, a = t.$container.find(".file-drop-zone"), r = t.dropZoneTitle;
            t.isClickable && (e = i.isEmpty(t.$element.attr("multiple")) ? t.fileSingle : t.filePlural,
            r += t.dropZoneClickTitle.replace("{files}", e)),
            a.find("." + t.dropZoneTitleClass).remove(),
            t.isUploadable && t.showPreview && 0 !== a.length && !(t.getFileStack().length > 0) && t.dropZoneEnabled && (0 === a.find(i.FRAMES).length && i.isEmpty(t.defaultPreviewContent) && a.prepend('<div class="' + t.dropZoneTitleClass + '">' + r + "</div>"),
            t.$container.removeClass("file-input-new"),
            i.addCss(t.$container, "file-input-ajax-new"))
        },
        _setAsyncUploadStatus: function(i, t, a) {
            var r = this
              , n = 0;
            r._setProgress(t, e("#" + i).find(".file-thumb-progress")),
            r.uploadStatus[i] = t,
            e.each(r.uploadStatus, function(e, i) {
                n += i
            }),
            r._setProgress(Math.floor(n / a))
        },
        _validateMinCount: function() {
            var e = this
              , i = e.isUploadable ? e.getFileStack().length : e.$element.get(0).files.length;
            return e.validateInitialCount && e.minFileCount > 0 && e._getFileCount(i - 1) < e.minFileCount ? (e._noFilesError({}),
            !1) : !0
        },
        _getFileCount: function(e) {
            var i = this
              , t = 0;
            return i.validateInitialCount && !i.overwriteInitial && (t = i.previewCache.count(),
            e += t),
            e
        },
        _getFileName: function(e) {
            return e && e.name ? this.slug(e.name) : void 0
        },
        _getFileNames: function(e) {
            var i = this;
            return i.filenames.filter(function(i) {
                return e ? void 0 !== i : void 0 !== i && null !== i
            })
        },
        _setPreviewError: function(e, i, t) {
            var a = this;
            void 0 !== i && a.updateStack(i, t),
            a.removeFromPreviewOnError ? e.remove() : a._setThumbStatus(e, "Error")
        },
        _checkDimensions: function(e, t, a, r, n, o, l) {
            var s, d, c, p, u = this, f = "Small" === t ? "min" : "max", m = u[f + "Image" + o];
            !i.isEmpty(m) && a.length && (c = a[0],
            d = "Width" === o ? c.naturalWidth || c.width : c.naturalHeight || c.height,
            p = "Small" === t ? d >= m : m >= d,
            p || (s = u["msgImage" + o + t].replace("{name}", n).replace("{size}", m),
            u._showUploadError(s, l),
            u._setPreviewError(r, e, null)))
        },
        _validateImage: function(e, t, a) {
            var r, n, o, l = this, s = l.$preview, d = s.find("#" + e), c = d.attr("data-fileindex"), p = d.find("img");
            t = t || "Untitled",
            p.length && i.handler(p, "load", function() {
                n = d.width(),
                o = s.width(),
                n > o && (p.css("width", "100%"),
                d.css("width", "97%")),
                r = {
                    ind: c,
                    id: e
                },
                l._checkDimensions(c, "Small", p, d, t, "Width", r),
                l._checkDimensions(c, "Small", p, d, t, "Height", r),
                l.resizeImage || (l._checkDimensions(c, "Large", p, d, t, "Width", r),
                l._checkDimensions(c, "Large", p, d, t, "Height", r)),
                l._raise("fileimageloaded", [e]),
                l.loadedImages.push({
                    ind: c,
                    img: p,
                    thumb: d,
                    pid: e,
                    typ: a
                }),
                l._validateAllImages()
            })
        },
        _validateAllImages: function() {
            var e, i = this, t = {
                val: 0
            }, a = i.loadedImages.length;
            if (a === i.totalImagesCount && (i._raise("fileimagesloaded"),
            i.resizeImage))
                for (e = 0; e < i.loadedImages.length; e++)
                    i._getResizedImage(i.loadedImages[e], t, a)
        },
        _getResizedImage: function(e, i, t) {
            var a, r, n, o, l, s = this, d = e.img, c = d.naturalWidth, p = d.naturalHeight, u = 1, f = s.maxImageWidth || c, m = s.maxImageHeight || p, g = !(!c || !p), v = s.imageCanvas, h = s.imageCanvasContext, w = e.typ, _ = e.pid, b = e.ind, C = e.thumb;
            if (n = s.isUploadable ? s._showUploadError : s._showError,
            o = function(e, i, t) {
                n(e, i, t),
                s._setPreviewError(C, b)
            }
            ,
            (!s.filestack[b] || !g || f >= c && m >= p) && (g && s.filestack[b] && s._raise("fileimageresized", [_, b]),
            i.val++,
            i.val === t && s._raise("fileimagesresized"),
            !g))
                return void o(s.msgImageResizeError, {
                    id: _,
                    index: b
                }, "fileimageresizeerror");
            w = w || s.resizeDefaultImageType,
            a = c > f,
            r = p > m,
            u = "width" === s.resizePreference ? a ? f / c : r ? m / p : 1 : r ? m / p : a ? f / c : 1,
            s._resetCanvas(),
            c *= u,
            p *= u,
            v.width = c,
            v.height = p;
            try {
                h.drawImage(d, 0, 0, c, p),
                v.toBlob(function(e) {
                    s.filestack[b] = e,
                    s._raise("fileimageresized", [_, b]),
                    i.val++,
                    i.val === t && s._raise("fileimagesresized", [void 0, void 0]),
                    e instanceof Blob || o(s.msgImageResizeError, {
                        id: _,
                        index: b
                    }, "fileimageresizeerror")
                }, w, s.resizeQuality)
            } catch (E) {
                i.val++,
                i.val === t && s._raise("fileimagesresized", [void 0, void 0]),
                l = s.msgImageResizeException.replace("{errors}", E.message),
                o(l, {
                    id: _,
                    index: b
                }, "fileimageresizeexception")
            }
        },
        _initBrowse: function(e) {
            var i = this;
            i.showBrowse ? (i.$btnFile = e.find(".btn-file"),
            i.$btnFile.append(i.$element)) : i.$element.hide()
        },
        _initCaption: function() {
            var e = this
              , t = e.initialCaption || "";
            return e.overwriteInitial || i.isEmpty(t) ? (e.$caption.html(""),
            !1) : (e._setCaption(t),
            !0)
        },
        _setCaption: function(t, a) {
            var r, n, o, l, s = this, d = s.getFileStack();
            if (s.$caption.length) {
                if (a)
                    r = e("<div>" + s.msgValidationError + "</div>").text(),
                    o = d.length,
                    l = o ? 1 === o && d[0] ? s._getFileNames()[0] : s._getMsgSelected(o) : s._getMsgSelected(s.msgNo),
                    n = '<span class="' + s.msgValidationErrorClass + '">' + s.msgValidationErrorIcon + (i.isEmpty(t) ? l : t) + "</span>";
                else {
                    if (i.isEmpty(t))
                        return;
                    r = e("<div>" + t + "</div>").text(),
                    n = s._getLayoutTemplate("fileIcon") + r
                }
                s.$caption.html(n),
                s.$caption.attr("title", r),
                s.$captionContainer.find(".file-caption-ellipsis").attr("title", r)
            }
        },
        _createContainer: function() {
            var i = this
              , t = e(document.createElement("div")).attr({
                "class": "file-input file-input-new"
            }).html(i._renderMain());
            return i.$element.before(t),
            i._initBrowse(t),
            i.theme && t.addClass("theme-" + i.theme),
            t
        },
        _refreshContainer: function() {
            var e = this
              , i = e.$container;
            i.before(e.$element),
            i.html(e._renderMain()),
            e._initBrowse(i)
        },
        _renderMain: function() {
            var e = this
              , i = e.isUploadable && e.dropZoneEnabled ? " file-drop-zone" : "file-drop-disabled"
              , t = e.showClose ? e._getLayoutTemplate("close") : ""
              , a = e.showPreview ? e._getLayoutTemplate("preview").replace(/\{class}/g, e.previewClass).replace(/\{dropClass}/g, i) : ""
              , r = e.isDisabled ? e.captionClass + " file-caption-disabled" : e.captionClass
              , n = e.captionTemplate.replace(/\{class}/g, r + " kv-fileinput-caption");
            return e.mainTemplate.replace(/\{class}/g, e.mainClass + (!e.showBrowse && e.showCaption ? " no-browse" : "")).replace(/\{preview}/g, a).replace(/\{close}/g, t).replace(/\{caption}/g, n).replace(/\{upload}/g, e._renderButton("upload")).replace(/\{remove}/g, e._renderButton("remove")).replace(/\{cancel}/g, e._renderButton("cancel")).replace(/\{browse}/g, e._renderButton("browse"))
        },
        _renderButton: function(e) {
            var t = this
              , a = t._getLayoutTemplate("btnDefault")
              , r = t[e + "Class"]
              , n = t[e + "Title"]
              , o = t[e + "Icon"]
              , l = t[e + "Label"]
              , s = t.isDisabled ? " disabled" : ""
              , d = "button";
            switch (e) {
            case "remove":
                if (!t.showRemove)
                    return "";
                break;
            case "cancel":
                if (!t.showCancel)
                    return "";
                r += " hide";
                break;
            case "upload":
                if (!t.showUpload)
                    return "";
                t.isUploadable && !t.isDisabled ? a = t._getLayoutTemplate("btnLink").replace("{href}", t.uploadUrl) : d = "submit";
                break;
            case "browse":
                if (!t.showBrowse)
                    return "";
                a = t._getLayoutTemplate("btnBrowse");
                break;
            default:
                return ""
            }
            return r += "browse" === e ? " btn-file" : " fileinput-" + e + " fileinput-" + e + "-button",
            i.isEmpty(l) || (l = ' <span class="' + t.buttonLabelClass + '">' + l + "</span>"),
            a.replace("{type}", d).replace("{css}", r).replace("{title}", n).replace("{status}", s).replace("{icon}", o).replace("{label}", l)
        },
        _renderThumbProgress: function() {
            return '<div class="file-thumb-progress hide">' + this.progressTemplate.replace(/\{percent}/g, "0") + "</div>"
        },
        _renderFileFooter: function(e, t, a, r) {
            var n, o = this, l = o.fileActionSettings, s = l.showRemove, d = l.showDrag, c = l.showUpload, p = l.showZoom, u = o._getLayoutTemplate("footer"), f = r ? l.indicatorError : l.indicatorNew, m = r ? l.indicatorErrorTitle : l.indicatorNewTitle;
            return t = o._getSize(t),
            n = o.isUploadable ? u.replace(/\{actions}/g, o._renderFileActions(c, s, p, d, !1, !1, !1)).replace(/\{caption}/g, e).replace(/\{size}/g, t).replace(/\{width}/g, a).replace(/\{progress}/g, o._renderThumbProgress()).replace(/\{indicator}/g, f).replace(/\{indicatorTitle}/g, m) : u.replace(/\{actions}/g, o._renderFileActions(!1, !1, p, d, !1, !1, !1)).replace(/\{caption}/g, e).replace(/\{size}/g, t).replace(/\{width}/g, a).replace(/\{progress}/g, "").replace(/\{indicator}/g, f).replace(/\{indicatorTitle}/g, m),
            n = i.replaceTags(n, o.previewThumbTags)
        },
        _renderFileActions: function(e, i, t, a, r, n, o, l) {
            if (!(e || i || t || a))
                return "";
            var s, d = this, c = n === !1 ? "" : ' data-url="' + n + '"', p = o === !1 ? "" : ' data-key="' + o + '"', u = "", f = "", m = "", g = "", v = d._getLayoutTemplate("actions"), h = d.fileActionSettings, w = d.otherActionButtons.replace(/\{dataKey}/g, p), _ = r ? h.removeClass + " disabled" : h.removeClass;
            return i && (u = d._getLayoutTemplate("actionDelete").replace(/\{removeClass}/g, _).replace(/\{removeIcon}/g, h.removeIcon).replace(/\{removeTitle}/g, h.removeTitle).replace(/\{dataUrl}/g, c).replace(/\{dataKey}/g, p)),
            e && (f = d._getLayoutTemplate("actionUpload").replace(/\{uploadClass}/g, h.uploadClass).replace(/\{uploadIcon}/g, h.uploadIcon).replace(/\{uploadTitle}/g, h.uploadTitle)),
            t && (m = d._getLayoutTemplate("actionZoom").replace(/\{zoomClass}/g, h.zoomClass).replace(/\{zoomIcon}/g, h.zoomIcon).replace(/\{zoomTitle}/g, h.zoomTitle)),
            a && l && (s = "drag-handle-init " + h.dragClass,
            g = d._getLayoutTemplate("actionDrag").replace(/\{dragClass}/g, s).replace(/\{dragTitle}/g, h.dragTitle).replace(/\{dragIcon}/g, h.dragIcon)),
            v.replace(/\{delete}/g, u).replace(/\{upload}/g, f).replace(/\{zoom}/g, m).replace(/\{drag}/g, g).replace(/\{other}/g, w)
        },
        _browse: function(e) {
            var i = this;
            i._raise("filebrowse"),
            e && e.isDefaultPrevented() || (i.isError && !i.isUploadable && i.clear(),
            i.$captionContainer.focus())
        },
        _change: function(t) {
            var a = this
              , r = a.$element;
            if (!a.isUploadable && i.isEmpty(r.val()) && a.fileInputCleared)
                return void (a.fileInputCleared = !1);
            a.fileInputCleared = !1;
            var n, o, l, s, d, c, p = arguments.length > 1, u = a.isUploadable, f = 0, m = p ? t.originalEvent.dataTransfer.files : r.get(0).files, g = a.filestack.length, v = i.isEmpty(r.attr("multiple")), h = v && g > 0, w = 0, _ = function(i, t, r, n) {
                var o = e.extend(!0, {}, a._getOutData({}, {}, m), {
                    id: r,
                    index: n
                })
                  , l = {
                    id: r,
                    index: n,
                    file: t,
                    files: m
                };
                return a.isUploadable ? a._showUploadError(i, o) : a._showError(i, l)
            };
            if (a.reader = null,
            a._resetUpload(),
            a._hideFileIcon(),
            a.isUploadable && a.$container.find(".file-drop-zone ." + a.dropZoneTitleClass).remove(),
            p)
                for (n = []; m[f]; )
                    s = m[f],
                    s.type || s.size % 4096 !== 0 ? n.push(s) : w++,
                    f++;
            else
                n = void 0 === t.target.files ? t.target && t.target.value ? [{
                    name: t.target.value.replace(/^.+\\/, "")
                }] : [] : t.target.files;
            if (i.isEmpty(n) || 0 === n.length)
                return u || a.clear(),
                a._showFolderError(w),
                void a._raise("fileselectnone");
            if (a._resetErrors(),
            c = n.length,
            l = a._getFileCount(a.isUploadable ? a.getFileStack().length + c : c),
            a.maxFileCount > 0 && l > a.maxFileCount) {
                if (!a.autoReplace || c > a.maxFileCount)
                    return d = a.autoReplace && c > a.maxFileCount ? c : l,
                    o = a.msgFilesTooMany.replace("{m}", a.maxFileCount).replace("{n}", d),
                    a.isError = _(o, null, null, null),
                    a.$captionContainer.find(".kv-caption-icon").hide(),
                    a._setCaption("", !0),
                    void a.$container.removeClass("file-input-new file-input-ajax-new");
                l > a.maxFileCount && a._resetPreviewThumbs(u)
            } else
                !u || h ? (a._resetPreviewThumbs(!1),
                h && a.clearStack()) : !u || 0 !== g || a.previewCache.count() && !a.overwriteInitial || a._resetPreviewThumbs(!0);
            a.isPreviewable ? a._readFiles(n) : a._updateFileDetails(1),
            a._showFolderError(w)
        },
        _abort: function(i) {
            var t, a = this;
            return a.ajaxAborted && "object" == typeof a.ajaxAborted && void 0 !== a.ajaxAborted.message ? (t = e.extend(!0, {}, a._getOutData(), i),
            t.abortData = a.ajaxAborted.data || {},
            t.abortMessage = a.ajaxAborted.message,
            a.cancel(),
            a._setProgress(101, a.$progress, a.msgCancelled),
            a._showUploadError(a.ajaxAborted.message, t, "filecustomerror"),
            !0) : !1
        },
        _resetFileStack: function() {
            var t = this
              , a = 0
              , r = []
              , n = [];
            t._getThumbs().each(function() {
                var o = e(this)
                  , l = o.attr("data-fileindex")
                  , s = t.filestack[l];
                -1 !== l && (void 0 !== s ? (r[a] = s,
                n[a] = t._getFileName(s),
                o.attr({
                    id: t.previewInitId + "-" + a,
                    "data-fileindex": a
                }),
                a++) : o.attr({
                    id: "uploaded-" + i.uniqId(),
                    "data-fileindex": "-1"
                }))
            }),
            t.filestack = r,
            t.filenames = n
        },
        clearStack: function() {
            var e = this;
            return e.filestack = [],
            e.filenames = [],
            e.$element
        },
        updateStack: function(e, i) {
            var t = this;
            return t.filestack[e] = i,
            t.filenames[e] = t._getFileName(i),
            t.$element
        },
        addToStack: function(e) {
            var i = this;
            return i.filestack.push(e),
            i.filenames.push(i._getFileName(e)),
            i.$element
        },
        getFileStack: function(e) {
            var i = this;
            return i.filestack.filter(function(i) {
                return e ? void 0 !== i : void 0 !== i && null !== i
            })
        },
        getFilesCount: function() {
            var e = this
              , i = e.isUploadable ? e.getFileStack().length : e.$element.get(0).files.length;
            return e._getFileCount(i)
        },
        lock: function() {
            var e = this;
            return e._resetErrors(),
            e.disable(),
            e.showRemove && i.addCss(e.$container.find(".fileinput-remove"), "hide"),
            e.showCancel && e.$container.find(".fileinput-cancel").removeClass("hide"),
            e._raise("filelock", [e.filestack, e._getExtraData()]),
            e.$element
        },
        unlock: function(e) {
            var t = this;
            return void 0 === e && (e = !0),
            t.enable(),
            t.showCancel && i.addCss(t.$container.find(".fileinput-cancel"), "hide"),
            t.showRemove && t.$container.find(".fileinput-remove").removeClass("hide"),
            e && t._resetFileStack(),
            t._raise("fileunlock", [t.filestack, t._getExtraData()]),
            t.$element
        },
        cancel: function() {
            var i, t = this, a = t.ajaxRequests, r = a.length;
            if (r > 0)
                for (i = 0; r > i; i += 1)
                    t.cancelling = !0,
                    a[i].abort();
            return t._setProgressCancelled(),
            t._getThumbs().each(function() {
                var i = e(this)
                  , a = i.attr("data-fileindex");
                i.removeClass("file-uploading"),
                void 0 !== t.filestack[a] && (i.find(".kv-file-upload").removeClass("disabled").removeAttr("disabled"),
                i.find(".kv-file-remove").removeClass("disabled").removeAttr("disabled")),
                t.unlock()
            }),
            t.$element
        },
        clear: function() {
            var t, a = this;
            return a.$btnUpload.removeAttr("disabled"),
            a._getThumbs().find("video,audio,img").each(function() {
                i.cleanMemory(e(this))
            }),
            a._resetUpload(),
            a.clearStack(),
            a._clearFileInput(),
            a._resetErrors(!0),
            a._raise("fileclear"),
            a._hasInitialPreview() ? (a._showFileIcon(),
            a._resetPreview(),
            a._initPreviewActions(),
            a.$container.removeClass("file-input-new")) : (a._getThumbs().each(function() {
                a._clearObjects(e(this))
            }),
            a.isUploadable && (a.previewCache.data = {}),
            a.$preview.html(""),
            t = !a.overwriteInitial && a.initialCaption.length > 0 ? a.initialCaption : "",
            a.$caption.html(t),
            a.$caption.attr("title", ""),
            i.addCss(a.$container, "file-input-new"),
            a._validateDefaultPreview()),
            0 === a.$container.find(i.FRAMES).length && (a._initCaption() || a.$captionContainer.find(".kv-caption-icon").hide()),
            a._hideFileIcon(),
            a._raise("filecleared"),
            a.$captionContainer.focus(),
            a._setFileDropZoneTitle(),
            a.$element
        },
        reset: function() {
            var e = this;
            return e._resetPreview(),
            e.$container.find(".fileinput-filename").text(""),
            e._raise("filereset"),
            i.addCss(e.$container, "file-input-new"),
            (e.$preview.find(i.FRAMES).length || e.isUploadable && e.dropZoneEnabled) && e.$container.removeClass("file-input-new"),
            e._setFileDropZoneTitle(),
            e.clearStack(),
            e.formdata = {},
            e.$element
        },
        disable: function() {
            var e = this;
            return e.isDisabled = !0,
            e._raise("filedisabled"),
            e.$element.attr("disabled", "disabled"),
            e.$container.find(".kv-fileinput-caption").addClass("file-caption-disabled"),
            e.$container.find(".btn-file, .fileinput-remove, .fileinput-upload, .file-preview-frame button").attr("disabled", !0),
            e._initDragDrop(),
            e.$element
        },
        enable: function() {
            var e = this;
            return e.isDisabled = !1,
            e._raise("fileenabled"),
            e.$element.removeAttr("disabled"),
            e.$container.find(".kv-fileinput-caption").removeClass("file-caption-disabled"),
            e.$container.find(".btn-file, .fileinput-remove, .fileinput-upload, .file-preview-frame button").removeAttr("disabled"),
            e._initDragDrop(),
            e.$element
        },
        upload: function() {
            var t, a, r, n = this, o = n.getFileStack().length, l = {}, s = !e.isEmptyObject(n._getExtraData());
            if (n.isUploadable && !n.isDisabled) {
                if (n.minFileCount > 0 && n._getFileCount(o) < n.minFileCount)
                    return void n._noFilesError(l);
                if (0 === o && !s)
                    return n._resetUpload(),
                    void n._showUploadError(n.msgUploadEmpty);
                if (n._resetUpload(),
                n.$progress.removeClass("hide"),
                n.uploadCount = 0,
                n.uploadStatus = {},
                n.uploadLog = [],
                n.lock(),
                n._setProgress(2),
                0 === o && s)
                    return void n._uploadExtraOnly();
                if (r = n.filestack.length,
                n.hasInitData = !1,
                !n.uploadAsync)
                    return n._uploadBatch(),
                    n.$element;
                for (a = n._getOutData(),
                n._raise("filebatchpreupload", [a]),
                n.fileBatchCompleted = !1,
                n.uploadCache = {
                    content: [],
                    config: [],
                    tags: [],
                    append: !0
                },
                n.uploadAsyncCount = n.getFileStack().length,
                t = 0; r > t; t++)
                    n.uploadCache.content[t] = null,
                    n.uploadCache.config[t] = null,
                    n.uploadCache.tags[t] = null;
                for (n.$preview.find(".file-preview-initial").removeClass(i.SORT_CSS),
                n._initSortable(),
                n.cacheInitialPreview = {
                    content: n.initialPreview,
                    config: n.initialPreviewConfig,
                    tags: n.initialPreviewThumbTags
                },
                t = 0; r > t; t++)
                    void 0 !== n.filestack[t] && n._uploadSingle(t, n.filestack, !0)
            }
        },
        destroy: function() {
            var e = this
              , t = e.$container;
            return t.find(".file-drop-zone").off(),
            e.$element.insertBefore(t).off(i.NAMESPACE).removeData(),
            t.off().remove(),
            e.$element
        },
        refresh: function(i) {
            var t = this
              , a = t.$element;
            return i = i ? e.extend(!0, {}, t.options, i) : t.options,
            t.destroy(),
            a.fileinput(i),
            a.val() && a.trigger("change.fileinput"),
            a
        }
    },
    e.fn.fileinput = function(a) {
        if (i.hasFileAPISupport() || i.isIE(9)) {
            var r = Array.apply(null, arguments)
              , n = [];
            switch (r.shift(),
            this.each(function() {
                var o, l = e(this), s = l.data("fileinput"), d = "object" == typeof a && a, c = d.theme || l.data("theme"), p = {}, u = {}, f = d.language || l.data("language") || e.fn.fileinput.defaults.language || "en";
                s || (c && (u = e.fn.fileinputThemes[c] || {}),
                "en" === f || i.isEmpty(e.fn.fileinputLocales[f]) || (p = e.fn.fileinputLocales[f] || {}),
                o = e.extend(!0, {}, e.fn.fileinput.defaults, u, e.fn.fileinputLocales.en, p, d, l.data()),
                s = new t(this,o),
                l.data("fileinput", s)),
                "string" == typeof a && n.push(s[a].apply(s, r))
            }),
            n.length) {
            case 0:
                return this;
            case 1:
                return n[0];
            default:
                return n
            }
        }
    }
    ,
    e.fn.fileinput.defaults = {
        language: "en",
        showCaption: !0,
        showBrowse: !0,
        showPreview: !0,
        showRemove: !0,
        showUpload: !0,
        showCancel: !0,
        showClose: !0,
        showUploadedThumbs: !0,
        browseOnZoneClick: !1,
        autoReplace: !1,
        previewClass: "",
        captionClass: "",
        frameClass: "krajee-default",
        mainClass: "file-caption-main",
        mainTemplate: null,
        purifyHtml: !0,
        fileSizeGetter: null,
        initialCaption: "",
        initialPreview: [],
        initialPreviewDelimiter: "*$$*",
        initialPreviewAsData: !1,
        initialPreviewFileType: "image",
        initialPreviewConfig: [],
        initialPreviewThumbTags: [],
        previewThumbTags: {},
        initialPreviewShowDelete: !0,
        removeFromPreviewOnError: !1,
        deleteUrl: "",
        deleteExtraData: {},
        overwriteInitial: !0,
        previewZoomButtonIcons: {
            prev: '<i class="glyphicon glyphicon-triangle-left"></i>',
            next: '<i class="glyphicon glyphicon-triangle-right"></i>',
            toggleheader: '<i class="glyphicon glyphicon-resize-vertical"></i>',
            fullscreen: '<i class="glyphicon glyphicon-fullscreen"></i>',
            borderless: '<i class="glyphicon glyphicon-resize-full"></i>',
            close: '<i class="glyphicon glyphicon-remove"></i>'
        },
        previewZoomButtonClasses: {
            prev: "btn btn-navigate",
            next: "btn btn-navigate",
            toggleheader: "btn btn-default btn-header-toggle",
            fullscreen: "btn btn-default",
            borderless: "btn btn-default",
            close: "btn btn-default"
        },
        preferIconicPreview: !1,
        preferIconicZoomPreview: !1,
        allowedPreviewTypes: void 0,
        allowedPreviewMimeTypes: null,
        allowedFileTypes: null,
        allowedFileExtensions: null,
        defaultPreviewContent: null,
        customLayoutTags: {},
        customPreviewTags: {},
        previewFileIcon: '<i class="glyphicon glyphicon-file"></i>',
        previewFileIconClass: "file-other-icon",
        previewFileIconSettings: {},
        previewFileExtSettings: {},
        buttonLabelClass: "hidden-xs",
        browseIcon: '<i class="glyphicon glyphicon-folder-open"></i>&nbsp;',
        browseClass: "btn btn-primary",
        removeIcon: '<i class="glyphicon glyphicon-trash"></i>',
        removeClass: "btn btn-default",
        cancelIcon: '<i class="glyphicon glyphicon-ban-circle"></i>',
        cancelClass: "btn btn-default",
        uploadIcon: '<i class="glyphicon glyphicon-upload"></i>',
        uploadClass: "btn btn-default",
        uploadUrl: null,
        uploadAsync: !0,
        uploadExtraData: {},
        zoomModalHeight: 480,
        minImageWidth: null,
        minImageHeight: null,
        maxImageWidth: null,
        maxImageHeight: null,
        resizeImage: !1,
        resizePreference: "width",
        resizeQuality: .92,
        resizeDefaultImageType: "image/jpeg",
        minFileSize: 0,
        maxFileSize: 0,
        maxFilePreviewSize: 25600,
        minFileCount: 0,
        maxFileCount: 0,
        validateInitialCount: !1,
        msgValidationErrorClass: "text-danger",
        msgValidationErrorIcon: '<i class="glyphicon glyphicon-exclamation-sign"></i> ',
        msgErrorClass: "file-error-message",
        progressThumbClass: "progress-bar progress-bar-success progress-bar-striped active",
        progressClass: "progress-bar progress-bar-success progress-bar-striped active",
        progressCompleteClass: "progress-bar progress-bar-success",
        progressErrorClass: "progress-bar progress-bar-danger",
        progressUploadThreshold: 99,
        previewFileType: "image",
        elCaptionContainer: null,
        elCaptionText: null,
        elPreviewContainer: null,
        elPreviewImage: null,
        elPreviewStatus: null,
        elErrorContainer: null,
        errorCloseButton: '<span class="close kv-error-close">&times;</span>',
        slugCallback: null,
        dropZoneEnabled: !0,
        dropZoneTitleClass: "file-drop-zone-title",
        fileActionSettings: {},
        otherActionButtons: "",
        textEncoding: "UTF-8",
        ajaxSettings: {},
        ajaxDeleteSettings: {},
        showAjaxErrorDetails: !0
    },
    e.fn.fileinputLocales.en = {
        fileSingle: "file",
        filePlural: "files",
        browseLabel: "Browse &hellip;",
        removeLabel: "Remove",
        removeTitle: "Clear selected files",
        cancelLabel: "Cancel",
        cancelTitle: "Abort ongoing upload",
        uploadLabel: "Upload",
        uploadTitle: "Upload selected files",
        msgNo: "No",
        msgNoFilesSelected: "No files selected",
        msgCancelled: "Cancelled",
        msgZoomModalHeading: "Detailed Preview",
        msgSizeTooSmall: 'File "{name}" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',
        msgSizeTooLarge: 'File "{name}" (<b>{size} KB</b>) exceeds maximum allowed upload size of <b>{maxSize} KB</b>.',
        msgFilesTooLess: "You must select at least <b>{n}</b> {files} to upload.",
        msgFilesTooMany: "Number of files selected for upload <b>({n})</b> exceeds maximum allowed limit of <b>{m}</b>.",
        msgFileNotFound: 'File "{name}" not found!',
        msgFileSecured: 'Security restrictions prevent reading the file "{name}".',
        msgFileNotReadable: 'File "{name}" is not readable.',
        msgFilePreviewAborted: 'File preview aborted for "{name}".',
        msgFilePreviewError: 'An error occurred while reading the file "{name}".',
        msgInvalidFileName: 'Invalid or unsupported characters in file name "{name}".',
        msgInvalidFileType: 'Invalid type for file "{name}". Only "{types}" files are supported.',
        msgInvalidFileExtension: 'Invalid extension for file "{name}". Only "{extensions}" files are supported.',
        msgFileTypes: {
            image: "image",
            html: "HTML",
            text: "text",
            video: "video",
            audio: "audio",
            flash: "flash",
            pdf: "PDF",
            object: "object"
        },
        msgUploadAborted: "The file upload was aborted",
        msgUploadThreshold: "Processing...",
        msgUploadEmpty: "No valid data available for upload.",
        msgValidationError: "Validation Error",
        msgLoading: "Loading file {index} of {files} &hellip;",
        msgProgress: "Loading file {index} of {files} - {name} - {percent}% completed.",
        msgSelected: "{n} {files} selected",
        msgFoldersNotAllowed: "Drag & drop files only! {n} folder(s) dropped were skipped.",
        msgImageWidthSmall: 'Width of image file "{name}" must be at least {size} px.',
        msgImageHeightSmall: 'Height of image file "{name}" must be at least {size} px.',
        msgImageWidthLarge: 'Width of image file "{name}" cannot exceed {size} px.',
        msgImageHeightLarge: 'Height of image file "{name}" cannot exceed {size} px.',
        msgImageResizeError: "Could not get the image dimensions to resize.",
        msgImageResizeException: "Error while resizing the image.<pre>{errors}</pre>",
        msgAjaxError: "Something went wrong with the {operation} operation. Please try again later!",
        msgAjaxProgressError: "{operation} failed",
        ajaxOperations: {
            deleteThumb: "file delete",
            uploadThumb: "single file upload",
            uploadBatch: "batch file upload",
            uploadExtra: "form data upload"
        },
        dropZoneTitle: "Drag & drop files here &hellip;",
        dropZoneClickTitle: "<br>(or click to select {files})",
        previewZoomButtonTitles: {
            prev: "View previous file",
            next: "View next file",
            toggleheader: "Toggle header",
            fullscreen: "Toggle full screen",
            borderless: "Toggle borderless mode",
            close: "Close detailed preview"
        }
    },
    e.fn.fileinput.Constructor = t,
    e(document).ready(function() {
        var i = e("input.file[type=file]");
        i.length && i.fileinput()
    })
});
!function(a, b, c, d) {
    function e(b, c) {
        this.element = a(b),
        this.settings = a.extend({}, w, c),
        this._defaults = w,
        this._name = v,
        this.init()
    }
    function f(a) {
        a.element.trigger("change")
    }
    function g(b) {
        b.element.find("option").each(function(c, d) {
            var e = a(d);
            "undefined" == typeof e.data("original-index") && e.data("original-index", b.elementCount++),
            "undefined" == typeof e.data("_selected") && e.data("_selected", !1)
        })
    }
    function h(b, c, d) {
        b.element.find("option").each(function(e, f) {
            var g = a(f);
            g.data("original-index") === c && (g.prop("selected", d),
            d ? (g.attr("data-sortindex", b.sortIndex),
            b.sortIndex++) : g.removeAttr("data-sortindex"))
        })
    }
    function i(a, b) {
        return a.replace(/\{(\d+)\}/g, function(a, c) {
            return "undefined" != typeof b[c] ? b[c] : a
        })
    }
    function j(a) {
        if (a.settings.infoText) {
            var b = a.elements.select1.find("option").length
              , c = a.elements.select2.find("option").length
              , d = a.element.find("option").length - a.selectedElements
              , e = a.selectedElements
              , f = "";
            f = 0 === d ? a.settings.infoTextEmpty : b === d ? i(a.settings.infoText, [b, d]) : i(a.settings.infoTextFiltered, [b, d]),
            a.elements.info1.html(f),
            a.elements.box1.toggleClass("filtered", !(b === d || 0 === d)),
            f = 0 === e ? a.settings.infoTextEmpty : c === e ? i(a.settings.infoText, [c, e]) : i(a.settings.infoTextFiltered, [c, e]),
            a.elements.info2.html(f),
            a.elements.box2.toggleClass("filtered", !(c === e || 0 === e))
        }
    }
    function k(b) {
        b.selectedElements = 0,
        b.elements.select1.empty(),
        b.elements.select2.empty(),
        b.element.find("option").each(function(c, d) {
            var e = a(d);
            e.prop("selected") ? (b.selectedElements++,
            b.elements.select2.append(e.clone(!0).prop("selected", e.data("_selected")))) : b.elements.select1.append(e.clone(!0).prop("selected", e.data("_selected")))
        }),
        b.settings.showFilterInputs && (l(b, 1),
        l(b, 2)),
        j(b)
    }
    function l(b, c) {
        if (b.settings.showFilterInputs) {
            m(b, c),
            b.elements["select" + c].empty().scrollTop(0);
            var d = new RegExp(a.trim(b.elements["filterInput" + c].val()),"gi")
              , e = b.element.find("option")
              , f = b.element;
            f = 1 === c ? e.not(":selected") : f.find("option:selected"),
            f.each(function(f, g) {
                var h = a(g)
                  , i = !0;
                (g.text.match(d) || b.settings.filterOnValues && h.attr("value").match(d)) && (i = !1,
                b.elements["select" + c].append(h.clone(!0).prop("selected", h.data("_selected")))),
                e.eq(h.data("original-index")).data("filtered" + c, i)
            }),
            j(b)
        }
    }
    function m(b, c) {
        var d = b.element.find("option");
        b.elements["select" + c].find("option").each(function(b, c) {
            var e = a(c);
            d.eq(e.data("original-index")).data("_selected", e.prop("selected"))
        })
    }
    function n(a) {
        var b = a.children("option");
        b.sort(function(a, b) {
            var c = parseInt(a.getAttribute("data-sortindex"))
              , d = parseInt(b.getAttribute("data-sortindex"));
            return c > d ? 1 : d > c ? -1 : 0
        }),
        b.detach().appendTo(a)
    }
    function o(b) {
        b.find("option").sort(function(b, c) {
            return a(b).data("original-index") > a(c).data("original-index") ? 1 : -1
        }).appendTo(b)
    }
    function p(a) {
        a.elements.select1.find("option").each(function() {
            a.element.find("option").data("_selected", !1)
        })
    }
    function q(b) {
        "all" !== b.settings.preserveSelectionOnMove || b.settings.moveOnSelect ? "moved" !== b.settings.preserveSelectionOnMove || b.settings.moveOnSelect || m(b, 1) : (m(b, 1),
        m(b, 2)),
        b.elements.select1.find("option:selected").each(function(c, d) {
            var e = a(d);
            e.data("filtered1") || h(b, e.data("original-index"), !0)
        }),
        k(b),
        f(b),
        b.settings.sortByInputOrder ? n(b.elements.select2) : o(b.elements.select2)
    }
    function r(b) {
        "all" !== b.settings.preserveSelectionOnMove || b.settings.moveOnSelect ? "moved" !== b.settings.preserveSelectionOnMove || b.settings.moveOnSelect || m(b, 2) : (m(b, 1),
        m(b, 2)),
        b.elements.select2.find("option:selected").each(function(c, d) {
            var e = a(d);
            e.data("filtered2") || h(b, e.data("original-index"), !1)
        }),
        k(b),
        f(b),
        o(b.elements.select1),
        b.settings.sortByInputOrder && n(b.elements.select2)
    }
    function s(b) {
        "all" !== b.settings.preserveSelectionOnMove || b.settings.moveOnSelect ? "moved" !== b.settings.preserveSelectionOnMove || b.settings.moveOnSelect || m(b, 1) : (m(b, 1),
        m(b, 2)),
        b.element.find("option").each(function(c, d) {
            var e = a(d);
            e.data("filtered1") || (e.prop("selected", !0),
            e.attr("data-sortindex", b.sortIndex),
            b.sortIndex++)
        }),
        k(b),
        f(b)
    }
    function t(b) {
        "all" !== b.settings.preserveSelectionOnMove || b.settings.moveOnSelect ? "moved" !== b.settings.preserveSelectionOnMove || b.settings.moveOnSelect || m(b, 2) : (m(b, 1),
        m(b, 2)),
        b.element.find("option").each(function(b, c) {
            var d = a(c);
            d.data("filtered2") || (d.prop("selected", !1),
            d.removeAttr("data-sortindex"))
        }),
        k(b),
        f(b)
    }
    function u(a) {
        a.elements.form.submit(function(b) {
            a.elements.filterInput1.is(":focus") ? (b.preventDefault(),
            a.elements.filterInput1.focusout()) : a.elements.filterInput2.is(":focus") && (b.preventDefault(),
            a.elements.filterInput2.focusout())
        }),
        a.element.on("bootstrapDualListbox.refresh", function(b, c) {
            a.refresh(c)
        }),
        a.elements.filterClear1.on("click", function() {
            a.setNonSelectedFilter("", !0)
        }),
        a.elements.filterClear2.on("click", function() {
            a.setSelectedFilter("", !0)
        }),
        a.settings.eventMoveOverride === !1 && a.elements.moveButton.on("click", function() {
            q(a)
        }),
        a.settings.eventMoveAllOverride === !1 && a.elements.moveAllButton.on("click", function() {
            s(a)
        }),
        a.settings.eventRemoveOverride === !1 && a.elements.removeButton.on("click", function() {
            r(a)
        }),
        a.settings.eventRemoveAllOverride === !1 && a.elements.removeAllButton.on("click", function() {
            t(a)
        }),
        a.elements.filterInput1.on("change keyup", function() {
            l(a, 1)
        }),
        a.elements.filterInput2.on("change keyup", function() {
            l(a, 2)
        })
    }
    var v = "bootstrapDualListbox"
      , w = {
        bootstrap2Compatible: !1,
        filterTextClear: "show all",
        filterPlaceHolder: "Filter",
        moveSelectedLabel: "Move selected",
        moveAllLabel: "Move all",
        removeSelectedLabel: "Remove selected",
        removeAllLabel: "Remove all",
        moveOnSelect: !0,
        preserveSelectionOnMove: !1,
        selectedListLabel: !1,
        nonSelectedListLabel: !1,
        helperSelectNamePostfix: "_helper",
        selectorMinimalHeight: 100,
        showFilterInputs: !0,
        nonSelectedFilter: "",
        selectedFilter: "",
        infoText: "Showing all {0}",
        infoTextFiltered: '<span class="label label-warning">Filtered</span> {0} from {1}',
        infoTextEmpty: "Empty list",
        filterOnValues: !1,
        sortByInputOrder: !1,
        eventMoveOverride: !1,
        eventMoveAllOverride: !1,
        eventRemoveOverride: !1,
        eventRemoveAllOverride: !1
    }
      , x = /android/i.test(navigator.userAgent.toLowerCase());
    e.prototype = {
        init: function() {
            this.container = a('<div class="bootstrap-duallistbox-container"> <div class="box1">   <label></label>   <span class="info-container">     <span class="info"></span>     <button type="button" class="btn clear1 pull-right"></button>   </span>   <input class="filter" type="text">   <div class="btn-group buttons">     <button type="button" class="btn moveall">       <i></i>       <i></i>     </button>     <button type="button" class="btn move">       <i></i>     </button>   </div>   <select multiple="multiple"></select> </div> <div class="box2">   <label></label>   <span class="info-container">     <span class="info"></span>     <button type="button" class="btn clear2 pull-right"></button>   </span>   <input class="filter" type="text">   <div class="btn-group buttons">     <button type="button" class="btn remove">       <i></i>     </button>     <button type="button" class="btn removeall">       <i></i>       <i></i>     </button>   </div>   <select multiple="multiple"></select> </div></div>').insertBefore(this.element),
            this.elements = {
                originalSelect: this.element,
                box1: a(".box1", this.container),
                box2: a(".box2", this.container),
                filterInput1: a(".box1 .filter", this.container),
                filterInput2: a(".box2 .filter", this.container),
                filterClear1: a(".box1 .clear1", this.container),
                filterClear2: a(".box2 .clear2", this.container),
                label1: a(".box1 > label", this.container),
                label2: a(".box2 > label", this.container),
                info1: a(".box1 .info", this.container),
                info2: a(".box2 .info", this.container),
                select1: a(".box1 select", this.container),
                select2: a(".box2 select", this.container),
                moveButton: a(".box1 .move", this.container),
                removeButton: a(".box2 .remove", this.container),
                moveAllButton: a(".box1 .moveall", this.container),
                removeAllButton: a(".box2 .removeall", this.container),
                form: a(a(".box1 .filter", this.container)[0].form)
            },
            this.originalSelectName = this.element.attr("name") || "";
            var b = "bootstrap-duallistbox-nonselected-list_" + this.originalSelectName
              , c = "bootstrap-duallistbox-selected-list_" + this.originalSelectName;
            return this.elements.select1.attr("id", b),
            this.elements.select2.attr("id", c),
            this.elements.label1.attr("for", b),
            this.elements.label2.attr("for", c),
            this.selectedElements = 0,
            this.sortIndex = 0,
            this.elementCount = 0,
            this.setBootstrap2Compatible(this.settings.bootstrap2Compatible),
            this.setFilterTextClear(this.settings.filterTextClear),
            this.setFilterPlaceHolder(this.settings.filterPlaceHolder),
            this.setMoveSelectedLabel(this.settings.moveSelectedLabel),
            this.setMoveAllLabel(this.settings.moveAllLabel),
            this.setRemoveSelectedLabel(this.settings.removeSelectedLabel),
            this.setRemoveAllLabel(this.settings.removeAllLabel),
            this.setMoveOnSelect(this.settings.moveOnSelect),
            this.setPreserveSelectionOnMove(this.settings.preserveSelectionOnMove),
            this.setSelectedListLabel(this.settings.selectedListLabel),
            this.setNonSelectedListLabel(this.settings.nonSelectedListLabel),
            this.setHelperSelectNamePostfix(this.settings.helperSelectNamePostfix),
            this.setSelectOrMinimalHeight(this.settings.selectorMinimalHeight),
            g(this),
            this.setShowFilterInputs(this.settings.showFilterInputs),
            this.setNonSelectedFilter(this.settings.nonSelectedFilter),
            this.setSelectedFilter(this.settings.selectedFilter),
            this.setInfoText(this.settings.infoText),
            this.setInfoTextFiltered(this.settings.infoTextFiltered),
            this.setInfoTextEmpty(this.settings.infoTextEmpty),
            this.setFilterOnValues(this.settings.filterOnValues),
            this.setSortByInputOrder(this.settings.sortByInputOrder),
            this.setEventMoveOverride(this.settings.eventMoveOverride),
            this.setEventMoveAllOverride(this.settings.eventMoveAllOverride),
            this.setEventRemoveOverride(this.settings.eventRemoveOverride),
            this.setEventRemoveAllOverride(this.settings.eventRemoveAllOverride),
            this.element.hide(),
            u(this),
            k(this),
            this.element
        },
        setBootstrap2Compatible: function(a, b) {
            return this.settings.bootstrap2Compatible = a,
            a ? (this.container.removeClass("row").addClass("row-fluid bs2compatible"),
            this.container.find(".box1, .box2").removeClass("col-md-6").addClass("span6"),
            this.container.find(".clear1, .clear2").removeClass("btn-default btn-xs").addClass("btn-mini"),
            this.container.find("input, select").removeClass("form-control"),
            this.container.find(".btn").removeClass("btn-default"),
            this.container.find(".moveall > i, .move > i").removeClass("glyphicon glyphicon-arrow-right").addClass("icon-arrow-right"),
            this.container.find(".removeall > i, .remove > i").removeClass("glyphicon glyphicon-arrow-left").addClass("icon-arrow-left")) : (this.container.removeClass("row-fluid bs2compatible").addClass("row"),
            this.container.find(".box1, .box2").removeClass("span6").addClass("col-md-6"),
            this.container.find(".clear1, .clear2").removeClass("btn-mini").addClass("btn-default btn-xs"),
            this.container.find("input, select").addClass("form-control"),
            this.container.find(".btn").addClass("btn-default"),
            this.container.find(".moveall > i, .move > i").removeClass("icon-arrow-right").addClass("glyphicon glyphicon-arrow-right"),
            this.container.find(".removeall > i, .remove > i").removeClass("icon-arrow-left").addClass("glyphicon glyphicon-arrow-left")),
            b && k(this),
            this.element
        },
        setFilterTextClear: function(a, b) {
            return this.settings.filterTextClear = a,
            this.elements.filterClear1.html(a),
            this.elements.filterClear2.html(a),
            b && k(this),
            this.element
        },
        setFilterPlaceHolder: function(a, b) {
            return this.settings.filterPlaceHolder = a,
            this.elements.filterInput1.attr("placeholder", a),
            this.elements.filterInput2.attr("placeholder", a),
            b && k(this),
            this.element
        },
        setMoveSelectedLabel: function(a, b) {
            return this.settings.moveSelectedLabel = a,
            this.elements.moveButton.attr("title", a),
            b && k(this),
            this.element
        },
        setMoveAllLabel: function(a, b) {
            return this.settings.moveAllLabel = a,
            this.elements.moveAllButton.attr("title", a),
            b && k(this),
            this.element
        },
        setRemoveSelectedLabel: function(a, b) {
            return this.settings.removeSelectedLabel = a,
            this.elements.removeButton.attr("title", a),
            b && k(this),
            this.element
        },
        setRemoveAllLabel: function(a, b) {
            return this.settings.removeAllLabel = a,
            this.elements.removeAllButton.attr("title", a),
            b && k(this),
            this.element
        },
        setMoveOnSelect: function(a, b) {
            if (x && (a = !0),
            this.settings.moveOnSelect = a,
            this.settings.moveOnSelect) {
                this.container.addClass("moveonselect");
                var c = this;
                this.elements.select1.on("change", function() {
                    q(c)
                }),
                this.elements.select2.on("change", function() {
                    r(c)
                })
            } else
                this.container.removeClass("moveonselect"),
                this.elements.select1.off("change"),
                this.elements.select2.off("change");
            return b && k(this),
            this.element
        },
        setPreserveSelectionOnMove: function(a, b) {
            return x && (a = !1),
            this.settings.preserveSelectionOnMove = a,
            b && k(this),
            this.element
        },
        setSelectedListLabel: function(a, b) {
            return this.settings.selectedListLabel = a,
            a ? this.elements.label2.show().html(a) : this.elements.label2.hide().html(a),
            b && k(this),
            this.element
        },
        setNonSelectedListLabel: function(a, b) {
            return this.settings.nonSelectedListLabel = a,
            a ? this.elements.label1.show().html(a) : this.elements.label1.hide().html(a),
            b && k(this),
            this.element
        },
        setHelperSelectNamePostfix: function(a, b) {
            return this.settings.helperSelectNamePostfix = a,
            a ? (this.elements.select1.attr("name", this.originalSelectName + a + "1"),
            this.elements.select2.attr("name", this.originalSelectName + a + "2")) : (this.elements.select1.removeAttr("name"),
            this.elements.select2.removeAttr("name")),
            b && k(this),
            this.element
        },
        setSelectOrMinimalHeight: function(a, b) {
            this.settings.selectorMinimalHeight = a;
            var c = this.element.height();
            return this.element.height() < a && (c = a),
            this.elements.select1.height(c),
            this.elements.select2.height(c),
            b && k(this),
            this.element
        },
        setShowFilterInputs: function(a, b) {
            return a ? (this.elements.filterInput1.show(),
            this.elements.filterInput2.show()) : (this.setNonSelectedFilter(""),
            this.setSelectedFilter(""),
            k(this),
            this.elements.filterInput1.hide(),
            this.elements.filterInput2.hide()),
            this.settings.showFilterInputs = a,
            b && k(this),
            this.element
        },
        setNonSelectedFilter: function(a, b) {
            return this.settings.showFilterInputs ? (this.settings.nonSelectedFilter = a,
            this.elements.filterInput1.val(a),
            b && k(this),
            this.element) : void 0
        },
        setSelectedFilter: function(a, b) {
            return this.settings.showFilterInputs ? (this.settings.selectedFilter = a,
            this.elements.filterInput2.val(a),
            b && k(this),
            this.element) : void 0
        },
        setInfoText: function(a, b) {
            return this.settings.infoText = a,
            b && k(this),
            this.element
        },
        setInfoTextFiltered: function(a, b) {
            return this.settings.infoTextFiltered = a,
            b && k(this),
            this.element
        },
        setInfoTextEmpty: function(a, b) {
            return this.settings.infoTextEmpty = a,
            b && k(this),
            this.element
        },
        setFilterOnValues: function(a, b) {
            return this.settings.filterOnValues = a,
            b && k(this),
            this.element
        },
        setSortByInputOrder: function(a, b) {
            return this.settings.sortByInputOrder = a,
            b && k(this),
            this.element
        },
        setEventMoveOverride: function(a, b) {
            return this.settings.eventMoveOverride = a,
            b && k(this),
            this.element
        },
        setEventMoveAllOverride: function(a, b) {
            return this.settings.eventMoveAllOverride = a,
            b && k(this),
            this.element
        },
        setEventRemoveOverride: function(a, b) {
            return this.settings.eventRemoveOverride = a,
            b && k(this),
            this.element
        },
        setEventRemoveAllOverride: function(a, b) {
            return this.settings.eventRemoveAllOverride = a,
            b && k(this),
            this.element
        },
        getContainer: function() {
            return this.container
        },
        refresh: function(a) {
            g(this),
            a ? p(this) : (m(this, 1),
            m(this, 2)),
            k(this)
        },
        destroy: function() {
            return this.container.remove(),
            this.element.show(),
            a.data(this, "plugin_" + v, null),
            this.element
        }
    },
    a.fn[v] = function(b) {
        var c = arguments;
        if (b === d || "object" == typeof b)
            return this.each(function() {
                a(this).is("select") ? a.data(this, "plugin_" + v) || a.data(this, "plugin_" + v, new e(this,b)) : a(this).find("select").each(function(c, d) {
                    a(d).bootstrapDualListbox(b)
                })
            });
        if ("string" == typeof b && "_" !== b[0] && "init" !== b) {
            var f;
            return this.each(function() {
                var d = a.data(this, "plugin_" + v);
                d instanceof e && "function" == typeof d[b] && (f = d[b].apply(d, Array.prototype.slice.call(c, 1)))
            }),
            f !== d ? f : this
        }
    }
}(jQuery, window, document);
(function() {
    var t = [].slice;
    !function(e, i) {
        "use strict";
        var n;
        return n = function() {
            function t(t, i) {
                null == i && (i = {}),
                this.$element = e(t),
                this.options = e.extend({}, e.fn.bootstrapSwitch.defaults, {
                    state: this.$element.is(":checked"),
                    size: this.$element.data("size"),
                    animate: this.$element.data("animate"),
                    disabled: this.$element.is(":disabled"),
                    readonly: this.$element.is("[readonly]"),
                    indeterminate: this.$element.data("indeterminate"),
                    inverse: this.$element.data("inverse"),
                    radioAllOff: this.$element.data("radio-all-off"),
                    onColor: this.$element.data("on-color"),
                    offColor: this.$element.data("off-color"),
                    onText: this.$element.data("on-text"),
                    offText: this.$element.data("off-text"),
                    labelText: this.$element.data("label-text"),
                    handleWidth: this.$element.data("handle-width"),
                    labelWidth: this.$element.data("label-width"),
                    baseClass: this.$element.data("base-class"),
                    wrapperClass: this.$element.data("wrapper-class")
                }, i),
                this.prevOptions = {},
                this.$wrapper = e("<div>", {
                    "class": function(t) {
                        return function() {
                            var e;
                            return e = ["" + t.options.baseClass].concat(t._getClasses(t.options.wrapperClass)),
                            e.push(t.options.state ? t.options.baseClass + "-on" : t.options.baseClass + "-off"),
                            null != t.options.size && e.push(t.options.baseClass + "-" + t.options.size),
                            t.options.disabled && e.push(t.options.baseClass + "-disabled"),
                            t.options.readonly && e.push(t.options.baseClass + "-readonly"),
                            t.options.indeterminate && e.push(t.options.baseClass + "-indeterminate"),
                            t.options.inverse && e.push(t.options.baseClass + "-inverse"),
                            t.$element.attr("id") && e.push(t.options.baseClass + "-id-" + t.$element.attr("id")),
                            e.join(" ")
                        }
                    }(this)()
                }),
                this.$container = e("<div>", {
                    "class": this.options.baseClass + "-container"
                }),
                this.$on = e("<span>", {
                    html: this.options.onText,
                    "class": this.options.baseClass + "-handle-on " + this.options.baseClass + "-" + this.options.onColor
                }),
                this.$off = e("<span>", {
                    html: this.options.offText,
                    "class": this.options.baseClass + "-handle-off " + this.options.baseClass + "-" + this.options.offColor
                }),
                this.$label = e("<span>", {
                    html: this.options.labelText,
                    "class": this.options.baseClass + "-label"
                }),
                this.$element.on("init.bootstrapSwitch", function(e) {
                    return function() {
                        return e.options.onInit.apply(t, arguments)
                    }
                }(this)),
                this.$element.on("switchChange.bootstrapSwitch", function(i) {
                    return function(n) {
                        return !1 === i.options.onSwitchChange.apply(t, arguments) ? i.$element.is(":radio") ? e("[name='" + i.$element.attr("name") + "']").trigger("previousState.bootstrapSwitch", !0) : i.$element.trigger("previousState.bootstrapSwitch", !0) : void 0
                    }
                }(this)),
                this.$container = this.$element.wrap(this.$container).parent(),
                this.$wrapper = this.$container.wrap(this.$wrapper).parent(),
                this.$element.before(this.options.inverse ? this.$off : this.$on).before(this.$label).before(this.options.inverse ? this.$on : this.$off),
                this.options.indeterminate && this.$element.prop("indeterminate", !0),
                this._init(),
                this._elementHandlers(),
                this._handleHandlers(),
                this._labelHandlers(),
                this._formHandler(),
                this._externalLabelHandler(),
                this.$element.trigger("init.bootstrapSwitch", this.options.state)
            }
            return t.prototype._constructor = t,
            t.prototype.setPrevOptions = function() {
                return this.prevOptions = e.extend(!0, {}, this.options)
            }
            ,
            t.prototype.state = function(t, i) {
                return "undefined" == typeof t ? this.options.state : this.options.disabled || this.options.readonly ? this.$element : this.options.state && !this.options.radioAllOff && this.$element.is(":radio") ? this.$element : (this.$element.is(":radio") ? e("[name='" + this.$element.attr("name") + "']").trigger("setPreviousOptions.bootstrapSwitch") : this.$element.trigger("setPreviousOptions.bootstrapSwitch"),
                this.options.indeterminate && this.indeterminate(!1),
                t = !!t,
                this.$element.prop("checked", t).trigger("change.bootstrapSwitch", i),
                this.$element)
            }
            ,
            t.prototype.toggleState = function(t) {
                return this.options.disabled || this.options.readonly ? this.$element : this.options.indeterminate ? (this.indeterminate(!1),
                this.state(!0)) : this.$element.prop("checked", !this.options.state).trigger("change.bootstrapSwitch", t)
            }
            ,
            t.prototype.size = function(t) {
                return "undefined" == typeof t ? this.options.size : (null != this.options.size && this.$wrapper.removeClass(this.options.baseClass + "-" + this.options.size),
                t && this.$wrapper.addClass(this.options.baseClass + "-" + t),
                this._width(),
                this._containerPosition(),
                this.options.size = t,
                this.$element)
            }
            ,
            t.prototype.animate = function(t) {
                return "undefined" == typeof t ? this.options.animate : (t = !!t,
                t === this.options.animate ? this.$element : this.toggleAnimate())
            }
            ,
            t.prototype.toggleAnimate = function() {
                return this.options.animate = !this.options.animate,
                this.$wrapper.toggleClass(this.options.baseClass + "-animate"),
                this.$element
            }
            ,
            t.prototype.disabled = function(t) {
                return "undefined" == typeof t ? this.options.disabled : (t = !!t,
                t === this.options.disabled ? this.$element : this.toggleDisabled())
            }
            ,
            t.prototype.toggleDisabled = function() {
                return this.options.disabled = !this.options.disabled,
                this.$element.prop("disabled", this.options.disabled),
                this.$wrapper.toggleClass(this.options.baseClass + "-disabled"),
                this.$element
            }
            ,
            t.prototype.readonly = function(t) {
                return "undefined" == typeof t ? this.options.readonly : (t = !!t,
                t === this.options.readonly ? this.$element : this.toggleReadonly())
            }
            ,
            t.prototype.toggleReadonly = function() {
                return this.options.readonly = !this.options.readonly,
                this.$element.prop("readonly", this.options.readonly),
                this.$wrapper.toggleClass(this.options.baseClass + "-readonly"),
                this.$element
            }
            ,
            t.prototype.indeterminate = function(t) {
                return "undefined" == typeof t ? this.options.indeterminate : (t = !!t,
                t === this.options.indeterminate ? this.$element : this.toggleIndeterminate())
            }
            ,
            t.prototype.toggleIndeterminate = function() {
                return this.options.indeterminate = !this.options.indeterminate,
                this.$element.prop("indeterminate", this.options.indeterminate),
                this.$wrapper.toggleClass(this.options.baseClass + "-indeterminate"),
                this._containerPosition(),
                this.$element
            }
            ,
            t.prototype.inverse = function(t) {
                return "undefined" == typeof t ? this.options.inverse : (t = !!t,
                t === this.options.inverse ? this.$element : this.toggleInverse())
            }
            ,
            t.prototype.toggleInverse = function() {
                var t, e;
                return this.$wrapper.toggleClass(this.options.baseClass + "-inverse"),
                e = this.$on.clone(!0),
                t = this.$off.clone(!0),
                this.$on.replaceWith(t),
                this.$off.replaceWith(e),
                this.$on = t,
                this.$off = e,
                this.options.inverse = !this.options.inverse,
                this.$element
            }
            ,
            t.prototype.onColor = function(t) {
                var e;
                return e = this.options.onColor,
                "undefined" == typeof t ? e : (null != e && this.$on.removeClass(this.options.baseClass + "-" + e),
                this.$on.addClass(this.options.baseClass + "-" + t),
                this.options.onColor = t,
                this.$element)
            }
            ,
            t.prototype.offColor = function(t) {
                var e;
                return e = this.options.offColor,
                "undefined" == typeof t ? e : (null != e && this.$off.removeClass(this.options.baseClass + "-" + e),
                this.$off.addClass(this.options.baseClass + "-" + t),
                this.options.offColor = t,
                this.$element)
            }
            ,
            t.prototype.onText = function(t) {
                return "undefined" == typeof t ? this.options.onText : (this.$on.html(t),
                this._width(),
                this._containerPosition(),
                this.options.onText = t,
                this.$element)
            }
            ,
            t.prototype.offText = function(t) {
                return "undefined" == typeof t ? this.options.offText : (this.$off.html(t),
                this._width(),
                this._containerPosition(),
                this.options.offText = t,
                this.$element)
            }
            ,
            t.prototype.labelText = function(t) {
                return "undefined" == typeof t ? this.options.labelText : (this.$label.html(t),
                this._width(),
                this.options.labelText = t,
                this.$element)
            }
            ,
            t.prototype.handleWidth = function(t) {
                return "undefined" == typeof t ? this.options.handleWidth : (this.options.handleWidth = t,
                this._width(),
                this._containerPosition(),
                this.$element)
            }
            ,
            t.prototype.labelWidth = function(t) {
                return "undefined" == typeof t ? this.options.labelWidth : (this.options.labelWidth = t,
                this._width(),
                this._containerPosition(),
                this.$element)
            }
            ,
            t.prototype.baseClass = function(t) {
                return this.options.baseClass
            }
            ,
            t.prototype.wrapperClass = function(t) {
                return "undefined" == typeof t ? this.options.wrapperClass : (t || (t = e.fn.bootstrapSwitch.defaults.wrapperClass),
                this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" ")),
                this.$wrapper.addClass(this._getClasses(t).join(" ")),
                this.options.wrapperClass = t,
                this.$element)
            }
            ,
            t.prototype.radioAllOff = function(t) {
                return "undefined" == typeof t ? this.options.radioAllOff : (t = !!t,
                t === this.options.radioAllOff ? this.$element : (this.options.radioAllOff = t,
                this.$element))
            }
            ,
            t.prototype.onInit = function(t) {
                return "undefined" == typeof t ? this.options.onInit : (t || (t = e.fn.bootstrapSwitch.defaults.onInit),
                this.options.onInit = t,
                this.$element)
            }
            ,
            t.prototype.onSwitchChange = function(t) {
                return "undefined" == typeof t ? this.options.onSwitchChange : (t || (t = e.fn.bootstrapSwitch.defaults.onSwitchChange),
                this.options.onSwitchChange = t,
                this.$element)
            }
            ,
            t.prototype.destroy = function() {
                var t;
                return t = this.$element.closest("form"),
                t.length && t.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),
                this.$container.children().not(this.$element).remove(),
                this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),
                this.$element
            }
            ,
            t.prototype._width = function() {
                var t, e;
                return t = this.$on.add(this.$off),
                t.add(this.$label).css("width", ""),
                e = "auto" === this.options.handleWidth ? Math.max(this.$on.width(), this.$off.width()) : this.options.handleWidth,
                t.width(e),
                this.$label.width(function(t) {
                    return function(i, n) {
                        return "auto" !== t.options.labelWidth ? t.options.labelWidth : e > n ? e : n
                    }
                }(this)),
                this._handleWidth = this.$on.outerWidth(),
                this._labelWidth = this.$label.outerWidth(),
                this.$container.width(2 * this._handleWidth + this._labelWidth),
                this.$wrapper.width(this._handleWidth + this._labelWidth)
            }
            ,
            t.prototype._containerPosition = function(t, e) {
                return null == t && (t = this.options.state),
                this.$container.css("margin-left", function(e) {
                    return function() {
                        var i;
                        return i = [0, "-" + e._handleWidth + "px"],
                        e.options.indeterminate ? "-" + e._handleWidth / 2 + "px" : t ? e.options.inverse ? i[1] : i[0] : e.options.inverse ? i[0] : i[1]
                    }
                }(this)),
                e ? setTimeout(function() {
                    return e()
                }, 50) : void 0
            }
            ,
            t.prototype._init = function() {
                var t, e;
                return t = function(t) {
                    return function() {
                        return t.setPrevOptions(),
                        t._width(),
                        t._containerPosition(null, function() {
                            return t.options.animate ? t.$wrapper.addClass(t.options.baseClass + "-animate") : void 0
                        })
                    }
                }(this),
                this.$wrapper.is(":visible") ? t() : e = i.setInterval(function(n) {
                    return function() {
                        return n.$wrapper.is(":visible") ? (t(),
                        i.clearInterval(e)) : void 0
                    }
                }(this), 50)
            }
            ,
            t.prototype._elementHandlers = function() {
                return this.$element.on({
                    "setPreviousOptions.bootstrapSwitch": function(t) {
                        return function(e) {
                            return t.setPrevOptions()
                        }
                    }(this),
                    "previousState.bootstrapSwitch": function(t) {
                        return function(e) {
                            return t.options = t.prevOptions,
                            t.options.indeterminate && t.$wrapper.addClass(t.options.baseClass + "-indeterminate"),
                            t.$element.prop("checked", t.options.state).trigger("change.bootstrapSwitch", !0)
                        }
                    }(this),
                    "change.bootstrapSwitch": function(t) {
                        return function(i, n) {
                            var o;
                            return i.preventDefault(),
                            i.stopImmediatePropagation(),
                            o = t.$element.is(":checked"),
                            t._containerPosition(o),
                            o !== t.options.state ? (t.options.state = o,
                            t.$wrapper.toggleClass(t.options.baseClass + "-off").toggleClass(t.options.baseClass + "-on"),
                            n ? void 0 : (t.$element.is(":radio") && e("[name='" + t.$element.attr("name") + "']").not(t.$element).prop("checked", !1).trigger("change.bootstrapSwitch", !0),
                            t.$element.trigger("switchChange.bootstrapSwitch", [o]))) : void 0
                        }
                    }(this),
                    "focus.bootstrapSwitch": function(t) {
                        return function(e) {
                            return e.preventDefault(),
                            t.$wrapper.addClass(t.options.baseClass + "-focused")
                        }
                    }(this),
                    "blur.bootstrapSwitch": function(t) {
                        return function(e) {
                            return e.preventDefault(),
                            t.$wrapper.removeClass(t.options.baseClass + "-focused")
                        }
                    }(this),
                    "keydown.bootstrapSwitch": function(t) {
                        return function(e) {
                            if (e.which && !t.options.disabled && !t.options.readonly)
                                switch (e.which) {
                                case 37:
                                    return e.preventDefault(),
                                    e.stopImmediatePropagation(),
                                    t.state(!1);
                                case 39:
                                    return e.preventDefault(),
                                    e.stopImmediatePropagation(),
                                    t.state(!0)
                                }
                        }
                    }(this)
                })
            }
            ,
            t.prototype._handleHandlers = function() {
                return this.$on.on("click.bootstrapSwitch", function(t) {
                    return function(e) {
                        return e.preventDefault(),
                        e.stopPropagation(),
                        t.state(!1),
                        t.$element.trigger("focus.bootstrapSwitch")
                    }
                }(this)),
                this.$off.on("click.bootstrapSwitch", function(t) {
                    return function(e) {
                        return e.preventDefault(),
                        e.stopPropagation(),
                        t.state(!0),
                        t.$element.trigger("focus.bootstrapSwitch")
                    }
                }(this))
            }
            ,
            t.prototype._labelHandlers = function() {
                return this.$label.on({
                    click: function(t) {
                        return t.stopPropagation()
                    },
                    "mousedown.bootstrapSwitch touchstart.bootstrapSwitch": function(t) {
                        return function(e) {
                            return t._dragStart || t.options.disabled || t.options.readonly ? void 0 : (e.preventDefault(),
                            e.stopPropagation(),
                            t._dragStart = (e.pageX || e.originalEvent.touches[0].pageX) - parseInt(t.$container.css("margin-left"), 10),
                            t.options.animate && t.$wrapper.removeClass(t.options.baseClass + "-animate"),
                            t.$element.trigger("focus.bootstrapSwitch"))
                        }
                    }(this),
                    "mousemove.bootstrapSwitch touchmove.bootstrapSwitch": function(t) {
                        return function(e) {
                            var i;
                            if (null != t._dragStart && (e.preventDefault(),
                            i = (e.pageX || e.originalEvent.touches[0].pageX) - t._dragStart,
                            !(i < -t._handleWidth || i > 0)))
                                return t._dragEnd = i,
                                t.$container.css("margin-left", t._dragEnd + "px")
                        }
                    }(this),
                    "mouseup.bootstrapSwitch touchend.bootstrapSwitch": function(t) {
                        return function(e) {
                            var i;
                            if (t._dragStart)
                                return e.preventDefault(),
                                t.options.animate && t.$wrapper.addClass(t.options.baseClass + "-animate"),
                                t._dragEnd ? (i = t._dragEnd > -(t._handleWidth / 2),
                                t._dragEnd = !1,
                                t.state(t.options.inverse ? !i : i)) : t.state(!t.options.state),
                                t._dragStart = !1
                        }
                    }(this),
                    "mouseleave.bootstrapSwitch": function(t) {
                        return function(e) {
                            return t.$label.trigger("mouseup.bootstrapSwitch")
                        }
                    }(this)
                })
            }
            ,
            t.prototype._externalLabelHandler = function() {
                var t;
                return t = this.$element.closest("label"),
                t.on("click", function(e) {
                    return function(i) {
                        return i.preventDefault(),
                        i.stopImmediatePropagation(),
                        i.target === t[0] ? e.toggleState() : void 0
                    }
                }(this))
            }
            ,
            t.prototype._formHandler = function() {
                var t;
                return t = this.$element.closest("form"),
                t.data("bootstrap-switch") ? void 0 : t.on("reset.bootstrapSwitch", function() {
                    return i.setTimeout(function() {
                        return t.find("input").filter(function() {
                            return e(this).data("bootstrap-switch")
                        }).each(function() {
                            return e(this).bootstrapSwitch("state", this.checked)
                        })
                    }, 1)
                }).data("bootstrap-switch", !0)
            }
            ,
            t.prototype._getClasses = function(t) {
                var i, n, o, s;
                if (!e.isArray(t))
                    return [this.options.baseClass + "-" + t];
                for (n = [],
                o = 0,
                s = t.length; s > o; o++)
                    i = t[o],
                    n.push(this.options.baseClass + "-" + i);
                return n
            }
            ,
            t
        }(),
        e.fn.bootstrapSwitch = function() {
            var i, o, s;
            return o = arguments[0],
            i = 2 <= arguments.length ? t.call(arguments, 1) : [],
            s = this,
            this.each(function() {
                var t, a;
                return t = e(this),
                a = t.data("bootstrap-switch"),
                a || t.data("bootstrap-switch", a = new n(this,o)),
                "string" == typeof o ? s = a[o].apply(a, i) : void 0
            }),
            s
        }
        ,
        e.fn.bootstrapSwitch.Constructor = n,
        e.fn.bootstrapSwitch.defaults = {
            state: !0,
            size: null,
            animate: !0,
            disabled: !1,
            readonly: !1,
            indeterminate: !1,
            inverse: !1,
            radioAllOff: !1,
            onColor: "primary",
            offColor: "default",
            onText: "ON",
            offText: "OFF",
            labelText: "&nbsp;",
            handleWidth: "auto",
            labelWidth: "auto",
            baseClass: "bootstrap-switch",
            wrapperClass: "wrapper",
            onInit: function() {},
            onSwitchChange: function() {}
        }
    }(window.jQuery, window)
}
).call(this);
!function(a) {
    "use strict";
    var b = function(a) {
        this.value = {
            h: 0,
            s: 0,
            b: 0,
            a: 1
        },
        this.origFormat = null,
        a && (void 0 !== a.toLowerCase ? this.setColor(a) : void 0 !== a.h && (this.value = a))
    };
    b.prototype = {
        constructor: b,
        _sanitizeNumber: function(a) {
            return "number" == typeof a ? a : isNaN(a) || null === a || "" === a || void 0 === a ? 1 : void 0 !== a.toLowerCase ? parseFloat(a) : 1
        },
        setColor: function(a) {
            a = a.toLowerCase(),
            this.value = this.stringToHSB(a) || {
                h: 0,
                s: 0,
                b: 0,
                a: 1
            }
        },
        stringToHSB: function(b) {
            b = b.toLowerCase();
            var c = this
              , d = !1;
            return a.each(this.stringParsers, function(a, e) {
                var f = e.re.exec(b)
                  , g = f && e.parse.apply(c, [f])
                  , h = e.format || "rgba";
                return g ? (d = h.match(/hsla?/) ? c.RGBtoHSB.apply(c, c.HSLtoRGB.apply(c, g)) : c.RGBtoHSB.apply(c, g),
                c.origFormat = h,
                !1) : !0
            }),
            d
        },
        setHue: function(a) {
            this.value.h = 1 - a
        },
        setSaturation: function(a) {
            this.value.s = a
        },
        setBrightness: function(a) {
            this.value.b = 1 - a
        },
        setAlpha: function(a) {
            this.value.a = parseInt(100 * (1 - a), 10) / 100
        },
        toRGB: function(a, b, c, d) {
            a = a || this.value.h,
            b = b || this.value.s,
            c = c || this.value.b,
            d = d || this.value.a;
            var e, f, g, h, i, j, k, l;
            switch (a && void 0 === b && void 0 === c && (b = a.s,
            c = a.v,
            a = a.h),
            h = Math.floor(6 * a),
            i = 6 * a - h,
            j = c * (1 - b),
            k = c * (1 - i * b),
            l = c * (1 - (1 - i) * b),
            h % 6) {
            case 0:
                e = c,
                f = l,
                g = j;
                break;
            case 1:
                e = k,
                f = c,
                g = j;
                break;
            case 2:
                e = j,
                f = c,
                g = l;
                break;
            case 3:
                e = j,
                f = k,
                g = c;
                break;
            case 4:
                e = l,
                f = j,
                g = c;
                break;
            case 5:
                e = c,
                f = j,
                g = k
            }
            return {
                r: Math.floor(255 * e),
                g: Math.floor(255 * f),
                b: Math.floor(255 * g),
                a: d
            }
        },
        toHex: function(a, b, c, d) {
            var e = this.toRGB(a, b, c, d);
            return "#" + (1 << 24 | parseInt(e.r) << 16 | parseInt(e.g) << 8 | parseInt(e.b)).toString(16).substr(1)
        },
        toHSL: function(a, b, c, d) {
            a = a || this.value.h,
            b = b || this.value.s,
            c = c || this.value.b,
            d = d || this.value.a;
            var e = a
              , f = (2 - b) * c
              , g = b * c;
            return g /= f > 0 && 1 >= f ? f : 2 - f,
            f /= 2,
            g > 1 && (g = 1),
            {
                h: e,
                s: g,
                l: f,
                a: d
            }
        },
        RGBtoHSB: function(a, b, c, d) {
            a /= 255,
            b /= 255,
            c /= 255;
            var e, f, g, h;
            return g = Math.max(a, b, c),
            h = g - Math.min(a, b, c),
            e = 0 === h ? null : g === a ? (b - c) / h : g === b ? (c - a) / h + 2 : (a - b) / h + 4,
            e = (e + 360) % 6 * 60 / 360,
            f = 0 === h ? 0 : h / g,
            {
                h: this._sanitizeNumber(e),
                s: f,
                b: g,
                a: this._sanitizeNumber(d)
            }
        },
        HueToRGB: function(a, b, c) {
            return 0 > c ? c += 1 : c > 1 && (c -= 1),
            1 > 6 * c ? a + (b - a) * c * 6 : 1 > 2 * c ? b : 2 > 3 * c ? a + (b - a) * (2 / 3 - c) * 6 : a
        },
        HSLtoRGB: function(a, b, c, d) {
            0 > b && (b = 0);
            var e;
            e = .5 >= c ? c * (1 + b) : c + b - c * b;
            var f = 2 * c - e
              , g = a + 1 / 3
              , h = a
              , i = a - 1 / 3
              , j = Math.round(255 * this.HueToRGB(f, e, g))
              , k = Math.round(255 * this.HueToRGB(f, e, h))
              , l = Math.round(255 * this.HueToRGB(f, e, i));
            return [j, k, l, this._sanitizeNumber(d)]
        },
        toString: function(a) {
            switch (a = a || "rgba") {
            case "rgb":
                var b = this.toRGB();
                return "rgb(" + b.r + "," + b.g + "," + b.b + ")";
            case "rgba":
                var b = this.toRGB();
                return "rgba(" + b.r + "," + b.g + "," + b.b + "," + b.a + ")";
            case "hsl":
                var c = this.toHSL();
                return "hsl(" + Math.round(360 * c.h) + "," + Math.round(100 * c.s) + "%," + Math.round(100 * c.l) + "%)";
            case "hsla":
                var c = this.toHSL();
                return "hsla(" + Math.round(360 * c.h) + "," + Math.round(100 * c.s) + "%," + Math.round(100 * c.l) + "%," + c.a + ")";
            case "hex":
                return this.toHex();
            default:
                return !1
            }
        },
        stringParsers: [{
            re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,
            format: "hex",
            parse: function(a) {
                return [parseInt(a[1], 16), parseInt(a[2], 16), parseInt(a[3], 16), 1]
            }
        }, {
            re: /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,
            format: "hex",
            parse: function(a) {
                return [parseInt(a[1] + a[1], 16), parseInt(a[2] + a[2], 16), parseInt(a[3] + a[3], 16), 1]
            }
        }, {
            re: /rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,
            format: "rgb",
            parse: function(a) {
                return [a[1], a[2], a[3], 1]
            }
        }, {
            re: /rgb\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,
            format: "rgb",
            parse: function(a) {
                return [2.55 * a[1], 2.55 * a[2], 2.55 * a[3], 1]
            }
        }, {
            re: /rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
            format: "rgba",
            parse: function(a) {
                return [a[1], a[2], a[3], a[4]]
            }
        }, {
            re: /rgba\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
            format: "rgba",
            parse: function(a) {
                return [2.55 * a[1], 2.55 * a[2], 2.55 * a[3], a[4]]
            }
        }, {
            re: /hsl\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,
            format: "hsl",
            parse: function(a) {
                return [a[1] / 360, a[2] / 100, a[3] / 100, a[4]]
            }
        }, {
            re: /hsla\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
            format: "hsla",
            parse: function(a) {
                return [a[1] / 360, a[2] / 100, a[3] / 100, a[4]]
            }
        }, {
            re: /^([a-z]{3,})$/,
            format: "alias",
            parse: function(a) {
                var b = this.colorNameToHex(a[0]) || "#000000"
                  , c = this.stringParsers[0].re.exec(b)
                  , d = c && this.stringParsers[0].parse.apply(this, [c]);
                return d
            }
        }],
        colorNameToHex: function(a) {
            var b = {
                aliceblue: "#f0f8ff",
                antiquewhite: "#faebd7",
                aqua: "#00ffff",
                aquamarine: "#7fffd4",
                azure: "#f0ffff",
                beige: "#f5f5dc",
                bisque: "#ffe4c4",
                black: "#000000",
                blanchedalmond: "#ffebcd",
                blue: "#0000ff",
                blueviolet: "#8a2be2",
                brown: "#a52a2a",
                burlywood: "#deb887",
                cadetblue: "#5f9ea0",
                chartreuse: "#7fff00",
                chocolate: "#d2691e",
                coral: "#ff7f50",
                cornflowerblue: "#6495ed",
                cornsilk: "#fff8dc",
                crimson: "#dc143c",
                cyan: "#00ffff",
                darkblue: "#00008b",
                darkcyan: "#008b8b",
                darkgoldenrod: "#b8860b",
                darkgray: "#a9a9a9",
                darkgreen: "#006400",
                darkkhaki: "#bdb76b",
                darkmagenta: "#8b008b",
                darkolivegreen: "#556b2f",
                darkorange: "#ff8c00",
                darkorchid: "#9932cc",
                darkred: "#8b0000",
                darksalmon: "#e9967a",
                darkseagreen: "#8fbc8f",
                darkslateblue: "#483d8b",
                darkslategray: "#2f4f4f",
                darkturquoise: "#00ced1",
                darkviolet: "#9400d3",
                deeppink: "#ff1493",
                deepskyblue: "#00bfff",
                dimgray: "#696969",
                dodgerblue: "#1e90ff",
                firebrick: "#b22222",
                floralwhite: "#fffaf0",
                forestgreen: "#228b22",
                fuchsia: "#ff00ff",
                gainsboro: "#dcdcdc",
                ghostwhite: "#f8f8ff",
                gold: "#ffd700",
                goldenrod: "#daa520",
                gray: "#808080",
                green: "#008000",
                greenyellow: "#adff2f",
                honeydew: "#f0fff0",
                hotpink: "#ff69b4",
                "indianred ": "#cd5c5c",
                "indigo ": "#4b0082",
                ivory: "#fffff0",
                khaki: "#f0e68c",
                lavender: "#e6e6fa",
                lavenderblush: "#fff0f5",
                lawngreen: "#7cfc00",
                lemonchiffon: "#fffacd",
                lightblue: "#add8e6",
                lightcoral: "#f08080",
                lightcyan: "#e0ffff",
                lightgoldenrodyellow: "#fafad2",
                lightgrey: "#d3d3d3",
                lightgreen: "#90ee90",
                lightpink: "#ffb6c1",
                lightsalmon: "#ffa07a",
                lightseagreen: "#20b2aa",
                lightskyblue: "#87cefa",
                lightslategray: "#778899",
                lightsteelblue: "#b0c4de",
                lightyellow: "#ffffe0",
                lime: "#00ff00",
                limegreen: "#32cd32",
                linen: "#faf0e6",
                magenta: "#ff00ff",
                maroon: "#800000",
                mediumaquamarine: "#66cdaa",
                mediumblue: "#0000cd",
                mediumorchid: "#ba55d3",
                mediumpurple: "#9370d8",
                mediumseagreen: "#3cb371",
                mediumslateblue: "#7b68ee",
                mediumspringgreen: "#00fa9a",
                mediumturquoise: "#48d1cc",
                mediumvioletred: "#c71585",
                midnightblue: "#191970",
                mintcream: "#f5fffa",
                mistyrose: "#ffe4e1",
                moccasin: "#ffe4b5",
                navajowhite: "#ffdead",
                navy: "#000080",
                oldlace: "#fdf5e6",
                olive: "#808000",
                olivedrab: "#6b8e23",
                orange: "#ffa500",
                orangered: "#ff4500",
                orchid: "#da70d6",
                palegoldenrod: "#eee8aa",
                palegreen: "#98fb98",
                paleturquoise: "#afeeee",
                palevioletred: "#d87093",
                papayawhip: "#ffefd5",
                peachpuff: "#ffdab9",
                peru: "#cd853f",
                pink: "#ffc0cb",
                plum: "#dda0dd",
                powderblue: "#b0e0e6",
                purple: "#800080",
                red: "#ff0000",
                rosybrown: "#bc8f8f",
                royalblue: "#4169e1",
                saddlebrown: "#8b4513",
                salmon: "#fa8072",
                sandybrown: "#f4a460",
                seagreen: "#2e8b57",
                seashell: "#fff5ee",
                sienna: "#a0522d",
                silver: "#c0c0c0",
                skyblue: "#87ceeb",
                slateblue: "#6a5acd",
                slategray: "#708090",
                snow: "#fffafa",
                springgreen: "#00ff7f",
                steelblue: "#4682b4",
                tan: "#d2b48c",
                teal: "#008080",
                thistle: "#d8bfd8",
                tomato: "#ff6347",
                turquoise: "#40e0d0",
                violet: "#ee82ee",
                wheat: "#f5deb3",
                white: "#ffffff",
                whitesmoke: "#f5f5f5",
                yellow: "#ffff00",
                yellowgreen: "#9acd32"
            };
            return "undefined" != typeof b[a.toLowerCase()] ? b[a.toLowerCase()] : !1
        }
    };
    var c = {
        horizontal: !1,
        inline: !1,
        color: !1,
        format: !1,
        input: "input",
        container: !1,
        component: ".add-on, .input-group-addon",
        sliders: {
            saturation: {
                maxLeft: 100,
                maxTop: 100,
                callLeft: "setSaturation",
                callTop: "setBrightness"
            },
            hue: {
                maxLeft: 0,
                maxTop: 100,
                callLeft: !1,
                callTop: "setHue"
            },
            alpha: {
                maxLeft: 0,
                maxTop: 100,
                callLeft: !1,
                callTop: "setAlpha"
            }
        },
        slidersHorz: {
            saturation: {
                maxLeft: 100,
                maxTop: 100,
                callLeft: "setSaturation",
                callTop: "setBrightness"
            },
            hue: {
                maxLeft: 100,
                maxTop: 0,
                callLeft: "setHue",
                callTop: !1
            },
            alpha: {
                maxLeft: 100,
                maxTop: 0,
                callLeft: "setAlpha",
                callTop: !1
            }
        },
        template: '<div class="colorpicker dropdown-menu"><div class="colorpicker-saturation"><i><b></b></i></div><div class="colorpicker-hue"><i></i></div><div class="colorpicker-alpha"><i></i></div><div class="colorpicker-color"><div /></div></div>'
    }
      , d = function(d, e) {
        this.element = a(d).addClass("colorpicker-element"),
        this.options = a.extend({}, c, this.element.data(), e),
        this.component = this.options.component,
        this.component = this.component !== !1 ? this.element.find(this.component) : !1,
        this.component && 0 === this.component.length && (this.component = !1),
        this.container = this.options.container === !0 ? this.element : this.options.container,
        this.container = this.container !== !1 ? a(this.container) : !1,
        this.input = this.element.is("input") ? this.element : this.options.input ? this.element.find(this.options.input) : !1,
        this.input && 0 === this.input.length && (this.input = !1),
        this.color = new b(this.options.color !== !1 ? this.options.color : this.getValue()),
        this.format = this.options.format !== !1 ? this.options.format : this.color.origFormat,
        this.picker = a(this.options.template),
        this.options.inline ? this.picker.addClass("colorpicker-inline colorpicker-visible") : this.picker.addClass("colorpicker-hidden"),
        this.options.horizontal && this.picker.addClass("colorpicker-horizontal"),
        ("rgba" === this.format || "hsla" === this.format) && this.picker.addClass("colorpicker-with-alpha"),
        this.picker.on("mousedown.colorpicker", a.proxy(this.mousedown, this)),
        this.picker.appendTo(this.container ? this.container : a("body")),
        this.input !== !1 && (this.input.on({
            "keyup.colorpicker": a.proxy(this.keyup, this)
        }),
        this.component === !1 && this.element.on({
            "focus.colorpicker": a.proxy(this.show, this)
        }),
        this.options.inline === !1 && this.element.on({
            "focusout.colorpicker": a.proxy(this.hide, this)
        })),
        this.component !== !1 && this.component.on({
            "click.colorpicker": a.proxy(this.show, this)
        }),
        this.input === !1 && this.component === !1 && this.element.on({
            "click.colorpicker": a.proxy(this.show, this)
        }),
        this.update(),
        a(a.proxy(function() {
            this.element.trigger("create")
        }, this))
    };
    d.version = "2.0.0-beta",
    d.Color = b,
    d.prototype = {
        constructor: d,
        destroy: function() {
            this.picker.remove(),
            this.element.removeData("colorpicker").off(".colorpicker"),
            this.input !== !1 && this.input.off(".colorpicker"),
            this.component !== !1 && this.component.off(".colorpicker"),
            this.element.removeClass("colorpicker-element"),
            this.element.trigger({
                type: "destroy"
            })
        },
        reposition: function() {
            if (this.options.inline !== !1)
                return !1;
            var a = this.component ? this.component.offset() : this.element.offset();
            this.picker.css({
                top: a.top + (this.component ? this.component.outerHeight() : this.element.outerHeight()),
                left: a.left
            })
        },
        show: function(b) {
            return this.isDisabled() ? !1 : (this.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden"),
            this.reposition(),
            a(window).on("resize.colorpicker", a.proxy(this.reposition, this)),
            !this.hasInput() && b && b.stopPropagation && b.preventDefault && (b.stopPropagation(),
            b.preventDefault()),
            this.options.inline === !1 && a(window.document).on({
                "mousedown.colorpicker": a.proxy(this.hide, this)
            }),
            this.element.trigger({
                type: "showPicker",
                color: this.color
            }),
            void 0)
        },
        hide: function() {
            this.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible"),
            a(window).off("resize.colorpicker", this.reposition),
            a(document).off({
                "mousedown.colorpicker": this.hide
            }),
            this.update(),
            this.element.trigger({
                type: "hidePicker",
                color: this.color
            })
        },
        updateData: function(a) {
            return a = a || this.color.toString(this.format),
            this.element.data("color", a),
            a
        },
        updateInput: function(a) {
            return a = a || this.color.toString(this.format),
            this.input !== !1 && this.input.prop("value", a),
            a
        },
        updatePicker: function(a) {
            void 0 !== a && (this.color = new b(a));
            var c = this.options.horizontal === !1 ? this.options.sliders : this.options.slidersHorz
              , d = this.picker.find("i");
            return 0 !== d.length ? (this.options.horizontal === !1 ? (c = this.options.sliders,
            d.eq(1).css("top", c.hue.maxTop * (1 - this.color.value.h)).end().eq(2).css("top", c.alpha.maxTop * (1 - this.color.value.a))) : (c = this.options.slidersHorz,
            d.eq(1).css("left", c.hue.maxLeft * (1 - this.color.value.h)).end().eq(2).css("left", c.alpha.maxLeft * (1 - this.color.value.a))),
            d.eq(0).css({
                top: c.saturation.maxTop - this.color.value.b * c.saturation.maxTop,
                left: this.color.value.s * c.saturation.maxLeft
            }),
            this.picker.find(".colorpicker-saturation").css("backgroundColor", this.color.toHex(this.color.value.h, 1, 1, 1)),
            this.picker.find(".colorpicker-alpha").css("backgroundColor", this.color.toHex()),
            this.picker.find(".colorpicker-color, .colorpicker-color div").css("backgroundColor", this.color.toString(this.format)),
            a) : void 0
        },
        updateComponent: function(a) {
            if (a = a || this.color.toString(this.format),
            this.component !== !1) {
                var b = this.component.find("i").eq(0);
                b.length > 0 ? b.css({
                    backgroundColor: a
                }) : this.component.css({
                    backgroundColor: a
                })
            }
            return a
        },
        update: function(a) {
            var b = this.updateComponent();
            return (this.getValue(!1) !== !1 || a === !0) && (this.updateInput(b),
            this.updateData(b)),
            this.updatePicker(),
            b
        },
        setValue: function(a) {
            this.color = new b(a),
            this.update(),
            this.element.trigger({
                type: "changeColor",
                color: this.color,
                value: a
            })
        },
        getValue: function(a) {
            a = void 0 === a ? "#000000" : a;
            var b;
            return b = this.hasInput() ? this.input.val() : this.element.data("color"),
            (void 0 === b || "" === b || null === b) && (b = a),
            b
        },
        hasInput: function() {
            return this.input !== !1
        },
        isDisabled: function() {
            return this.hasInput() ? this.input.prop("disabled") === !0 : !1
        },
        disable: function() {
            return this.hasInput() ? (this.input.prop("disabled", !0),
            !0) : !1
        },
        enable: function() {
            return this.hasInput() ? (this.input.prop("disabled", !1),
            !0) : !1
        },
        currentSlider: null,
        mousePointer: {
            left: 0,
            top: 0
        },
        mousedown: function(b) {
            b.stopPropagation(),
            b.preventDefault();
            var c = a(b.target)
              , d = c.closest("div")
              , e = this.options.horizontal ? this.options.slidersHorz : this.options.sliders;
            if (!d.is(".colorpicker")) {
                if (d.is(".colorpicker-saturation"))
                    this.currentSlider = a.extend({}, e.saturation);
                else if (d.is(".colorpicker-hue"))
                    this.currentSlider = a.extend({}, e.hue);
                else {
                    if (!d.is(".colorpicker-alpha"))
                        return !1;
                    this.currentSlider = a.extend({}, e.alpha)
                }
                var f = d.offset();
                this.currentSlider.guide = d.find("i")[0].style,
                this.currentSlider.left = b.pageX - f.left,
                this.currentSlider.top = b.pageY - f.top,
                this.mousePointer = {
                    left: b.pageX,
                    top: b.pageY
                },
                a(document).on({
                    "mousemove.colorpicker": a.proxy(this.mousemove, this),
                    "mouseup.colorpicker": a.proxy(this.mouseup, this)
                }).trigger("mousemove")
            }
            return !1
        },
        mousemove: function(a) {
            a.stopPropagation(),
            a.preventDefault();
            var b = Math.max(0, Math.min(this.currentSlider.maxLeft, this.currentSlider.left + ((a.pageX || this.mousePointer.left) - this.mousePointer.left)))
              , c = Math.max(0, Math.min(this.currentSlider.maxTop, this.currentSlider.top + ((a.pageY || this.mousePointer.top) - this.mousePointer.top)));
            return this.currentSlider.guide.left = b + "px",
            this.currentSlider.guide.top = c + "px",
            this.currentSlider.callLeft && this.color[this.currentSlider.callLeft].call(this.color, b / 100),
            this.currentSlider.callTop && this.color[this.currentSlider.callTop].call(this.color, c / 100),
            this.update(!0),
            this.element.trigger({
                type: "changeColor",
                color: this.color
            }),
            !1
        },
        mouseup: function(b) {
            return b.stopPropagation(),
            b.preventDefault(),
            a(document).off({
                "mousemove.colorpicker": this.mousemove,
                "mouseup.colorpicker": this.mouseup
            }),
            !1
        },
        keyup: function(a) {
            if (38 === a.keyCode)
                this.color.value.a < 1 && (this.color.value.a = Math.round(100 * (this.color.value.a + .01)) / 100),
                this.update(!0);
            else if (40 === a.keyCode)
                this.color.value.a > 0 && (this.color.value.a = Math.round(100 * (this.color.value.a - .01)) / 100),
                this.update(!0);
            else {
                var c = this.input.val();
                this.color = new b(c),
                this.getValue(!1) !== !1 && (this.updateData(),
                this.updateComponent(),
                this.updatePicker())
            }
            this.element.trigger({
                type: "changeColor",
                color: this.color,
                value: c
            })
        }
    },
    a.colorpicker = d,
    a.fn.colorpicker = function(b) {
        return this.each(function() {
            var c = a(this)
              , e = c.data("colorpicker")
              , f = "object" == typeof b ? b : {};
            e || "string" == typeof b ? "string" == typeof b && e[b].apply(e, Array.prototype.slice.call(arguments, 1)) : c.data("colorpicker", new d(this,f))
        })
    }
    ,
    a.fn.colorpicker.constructor = d
}(window.jQuery);
/*!
* jquery.inputmask.bundle.js
* https://github.com/RobinHerbots/jquery.inputmask
* Copyright (c) 2010 - 2016 Robin Herbots
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
* Version: 3.2.8-36
*/
!function(a) {
    function b(c, d) {
        return this instanceof b ? (a.isPlainObject(c) ? d = c : (d = d || {},
        d.alias = c),
        this.el = void 0,
        this.opts = a.extend(!0, {}, this.defaults, d),
        this.noMasksCache = d && void 0 !== d.definitions,
        this.userOptions = d || {},
        this.events = {},
        void e(this.opts.alias, d, this.opts)) : new b(c,d)
    }
    function c(a) {
        var b = document.createElement("input")
          , c = "on" + a
          , d = c in b;
        return d || (b.setAttribute(c, "return;"),
        d = "function" == typeof b[c]),
        b = null,
        d
    }
    function d(b, c) {
        var d = b.getAttribute("type")
          , e = "INPUT" === b.tagName && -1 !== a.inArray(d, c.supportsInputType) || b.isContentEditable || "TEXTAREA" === b.tagName;
        if (!e && "INPUT" === b.tagName) {
            var f = document.createElement("input");
            f.setAttribute("type", d),
            e = "text" === f.type,
            f = null
        }
        return e
    }
    function e(b, c, d) {
        var f = d.aliases[b];
        return f ? (f.alias && e(f.alias, void 0, d),
        a.extend(!0, d, f),
        a.extend(!0, d, c),
        !0) : (null === d.mask && (d.mask = b),
        !1)
    }
    function f(b, c, d) {
        function f(a, c) {
            c = void 0 !== c ? c : b.getAttribute("data-inputmask-" + a),
            null !== c && ("string" == typeof c && (0 === a.indexOf("on") ? c = window[c] : "false" === c ? c = !1 : "true" === c && (c = !0)),
            d[a] = c)
        }
        var g, h, i, j, k = b.getAttribute("data-inputmask");
        if (k && "" !== k && (k = k.replace(new RegExp("'","g"), '"'),
        h = JSON.parse("{" + k + "}")),
        h) {
            i = void 0;
            for (j in h)
                if ("alias" === j.toLowerCase()) {
                    i = h[j];
                    break
                }
        }
        f("alias", i),
        d.alias && e(d.alias, d, c);
        for (g in c) {
            if (h) {
                i = void 0;
                for (j in h)
                    if (j.toLowerCase() === g.toLowerCase()) {
                        i = h[j];
                        break
                    }
            }
            f(g, i)
        }
        return a.extend(!0, c, d),
        c
    }
    function g(c, d) {
        function e(b) {
            function d(a, b, c, d) {
                this.matches = [],
                this.isGroup = a || !1,
                this.isOptional = b || !1,
                this.isQuantifier = c || !1,
                this.isAlternator = d || !1,
                this.quantifier = {
                    min: 1,
                    max: 1
                }
            }
            function e(b, d, e) {
                var f = c.definitions[d];
                e = void 0 !== e ? e : b.matches.length;
                var g = b.matches[e - 1];
                if (f && !r) {
                    f.placeholder = a.isFunction(f.placeholder) ? f.placeholder(c) : f.placeholder;
                    for (var h = f.prevalidator, i = h ? h.length : 0, j = 1; j < f.cardinality; j++) {
                        var k = i >= j ? h[j - 1] : []
                          , l = k.validator
                          , m = k.cardinality;
                        b.matches.splice(e++, 0, {
                            fn: l ? "string" == typeof l ? new RegExp(l) : new function() {
                                this.test = l
                            }
                            : new RegExp("."),
                            cardinality: m ? m : 1,
                            optionality: b.isOptional,
                            newBlockMarker: void 0 === g || g.def !== (f.definitionSymbol || d),
                            casing: f.casing,
                            def: f.definitionSymbol || d,
                            placeholder: f.placeholder,
                            mask: d
                        }),
                        g = b.matches[e - 1]
                    }
                    b.matches.splice(e++, 0, {
                        fn: f.validator ? "string" == typeof f.validator ? new RegExp(f.validator) : new function() {
                            this.test = f.validator
                        }
                        : new RegExp("."),
                        cardinality: f.cardinality,
                        optionality: b.isOptional,
                        newBlockMarker: void 0 === g || g.def !== (f.definitionSymbol || d),
                        casing: f.casing,
                        def: f.definitionSymbol || d,
                        placeholder: f.placeholder,
                        mask: d
                    })
                } else
                    b.matches.splice(e++, 0, {
                        fn: null,
                        cardinality: 0,
                        optionality: b.isOptional,
                        newBlockMarker: void 0 === g || g.def !== d,
                        casing: null,
                        def: c.staticDefinitionSymbol || d,
                        placeholder: void 0 !== c.staticDefinitionSymbol ? d : void 0,
                        mask: d
                    }),
                    r = !1
            }
            function f(a, b) {
                a.isGroup && (a.isGroup = !1,
                e(a, c.groupmarker.start, 0),
                b !== !0 && e(a, c.groupmarker.end))
            }
            function g(a, b, c, d) {
                b.matches.length > 0 && (void 0 === d || d) && (c = b.matches[b.matches.length - 1],
                f(c)),
                e(b, a)
            }
            function h() {
                if (t.length > 0) {
                    if (m = t[t.length - 1],
                    g(k, m, o, !m.isAlternator),
                    m.isAlternator) {
                        n = t.pop();
                        for (var a = 0; a < n.matches.length; a++)
                            n.matches[a].isGroup = !1;
                        t.length > 0 ? (m = t[t.length - 1],
                        m.matches.push(n)) : s.matches.push(n)
                    }
                } else
                    g(k, s, o)
            }
            function i(a) {
                function b(a) {
                    return a === c.optionalmarker.start ? a = c.optionalmarker.end : a === c.optionalmarker.end ? a = c.optionalmarker.start : a === c.groupmarker.start ? a = c.groupmarker.end : a === c.groupmarker.end && (a = c.groupmarker.start),
                    a
                }
                a.matches = a.matches.reverse();
                for (var d in a.matches) {
                    var e = parseInt(d);
                    if (a.matches[d].isQuantifier && a.matches[e + 1] && a.matches[e + 1].isGroup) {
                        var f = a.matches[d];
                        a.matches.splice(d, 1),
                        a.matches.splice(e + 1, 0, f)
                    }
                    void 0 !== a.matches[d].matches ? a.matches[d] = i(a.matches[d]) : a.matches[d] = b(a.matches[d])
                }
                return a
            }
            for (var j, k, l, m, n, o, p, q = /(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g, r = !1, s = new d, t = [], u = []; j = q.exec(b); )
                if (k = j[0],
                r)
                    h();
                else
                    switch (k.charAt(0)) {
                    case c.escapeChar:
                        r = !0;
                        break;
                    case c.optionalmarker.end:
                    case c.groupmarker.end:
                        if (l = t.pop(),
                        void 0 !== l)
                            if (t.length > 0) {
                                if (m = t[t.length - 1],
                                m.matches.push(l),
                                m.isAlternator) {
                                    n = t.pop();
                                    for (var v = 0; v < n.matches.length; v++)
                                        n.matches[v].isGroup = !1;
                                    t.length > 0 ? (m = t[t.length - 1],
                                    m.matches.push(n)) : s.matches.push(n)
                                }
                            } else
                                s.matches.push(l);
                        else
                            h();
                        break;
                    case c.optionalmarker.start:
                        t.push(new d(!1,!0));
                        break;
                    case c.groupmarker.start:
                        t.push(new d(!0));
                        break;
                    case c.quantifiermarker.start:
                        var w = new d(!1,!1,!0);
                        k = k.replace(/[{}]/g, "");
                        var x = k.split(",")
                          , y = isNaN(x[0]) ? x[0] : parseInt(x[0])
                          , z = 1 === x.length ? y : isNaN(x[1]) ? x[1] : parseInt(x[1]);
                        if (("*" === z || "+" === z) && (y = "*" === z ? 0 : 1),
                        w.quantifier = {
                            min: y,
                            max: z
                        },
                        t.length > 0) {
                            var A = t[t.length - 1].matches;
                            j = A.pop(),
                            j.isGroup || (p = new d(!0),
                            p.matches.push(j),
                            j = p),
                            A.push(j),
                            A.push(w)
                        } else
                            j = s.matches.pop(),
                            j.isGroup || (p = new d(!0),
                            p.matches.push(j),
                            j = p),
                            s.matches.push(j),
                            s.matches.push(w);
                        break;
                    case c.alternatormarker:
                        t.length > 0 ? (m = t[t.length - 1],
                        o = m.matches.pop()) : o = s.matches.pop(),
                        o.isAlternator ? t.push(o) : (n = new d(!1,!1,!1,!0),
                        n.matches.push(o),
                        t.push(n));
                        break;
                    default:
                        h()
                    }
            for (; t.length > 0; )
                l = t.pop(),
                f(l, !0),
                s.matches.push(l);
            return s.matches.length > 0 && (o = s.matches[s.matches.length - 1],
            f(o),
            u.push(s)),
            c.numericInput && i(u[0]),
            u
        }
        function f(f, g) {
            if (null === f || "" === f)
                return void 0;
            if (1 === f.length && c.greedy === !1 && 0 !== c.repeat && (c.placeholder = ""),
            c.repeat > 0 || "*" === c.repeat || "+" === c.repeat) {
                var h = "*" === c.repeat ? 0 : "+" === c.repeat ? 1 : c.repeat;
                f = c.groupmarker.start + f + c.groupmarker.end + c.quantifiermarker.start + h + "," + c.repeat + c.quantifiermarker.end
            }
            var i;
            return void 0 === b.prototype.masksCache[f] || d === !0 ? (i = {
                mask: f,
                maskToken: e(f),
                validPositions: {},
                _buffer: void 0,
                buffer: void 0,
                tests: {},
                metadata: g
            },
            d !== !0 && (b.prototype.masksCache[c.numericInput ? f.split("").reverse().join("") : f] = i,
            i = a.extend(!0, {}, b.prototype.masksCache[c.numericInput ? f.split("").reverse().join("") : f]))) : i = a.extend(!0, {}, b.prototype.masksCache[c.numericInput ? f.split("").reverse().join("") : f]),
            i
        }
        function g(a) {
            return a = a.toString()
        }
        var h;
        if (a.isFunction(c.mask) && (c.mask = c.mask(c)),
        a.isArray(c.mask)) {
            if (c.mask.length > 1) {
                c.keepStatic = null === c.keepStatic ? !0 : c.keepStatic;
                var i = "(";
                return a.each(c.numericInput ? c.mask.reverse() : c.mask, function(b, c) {
                    i.length > 1 && (i += ")|("),
                    i += g(void 0 === c.mask || a.isFunction(c.mask) ? c : c.mask)
                }),
                i += ")",
                f(i, c.mask)
            }
            c.mask = c.mask.pop()
        }
        return c.mask && (h = void 0 === c.mask.mask || a.isFunction(c.mask.mask) ? f(g(c.mask), c.mask) : f(g(c.mask.mask), c.mask)),
        h
    }
    function h(e, f, g) {
        function i(a, b, c) {
            b = b || 0;
            var d, e, f, h = [], i = 0, j = o();
            do {
                if (a === !0 && m().validPositions[i]) {
                    var k = m().validPositions[i];
                    e = k.match,
                    d = k.locator.slice(),
                    h.push(c === !0 ? k.input : I(i, e))
                } else
                    f = r(i, d, i - 1),
                    e = f.match,
                    d = f.locator.slice(),
                    (g.jitMasking === !1 || j > i || isFinite(g.jitMasking) && g.jitMasking > i) && h.push(I(i, e));
                i++
            } while ((void 0 === ha || ha > i - 1) && null !== e.fn || null === e.fn && "" !== e.def || b >= i);
            return "" === h[h.length - 1] && h.pop(),
            h
        }
        function m() {
            return f
        }
        function n(a) {
            var b = m();
            b.buffer = void 0,
            a !== !0 && (b.tests = {},
            b._buffer = void 0,
            b.validPositions = {},
            b.p = 0)
        }
        function o(a, b) {
            var c = -1
              , d = -1
              , e = m().validPositions;
            void 0 === a && (a = -1);
            for (var f in e) {
                var g = parseInt(f);
                e[g] && (b || null !== e[g].match.fn) && (a >= g && (c = g),
                g >= a && (d = g))
            }
            return -1 !== c && a - c > 1 || a > d ? c : d
        }
        function p(b, c, d, e) {
            if (e || g.insertMode && void 0 !== m().validPositions[b] && void 0 === d) {
                var f, h = a.extend(!0, {}, m().validPositions), i = o();
                for (f = b; i >= f; f++)
                    delete m().validPositions[f];
                m().validPositions[b] = c;
                var j, k = !0, l = m().validPositions;
                for (f = j = b; i >= f; f++) {
                    var p = h[f];
                    if (void 0 !== p)
                        for (var q = j, r = -1; q < D() && (null == p.match.fn && l[f] && (l[f].match.optionalQuantifier === !0 || l[f].match.optionality === !0) || null != p.match.fn); )
                            if (null === p.match.fn || !g.keepStatic && l[f] && (void 0 !== l[f + 1] && v(f + 1, l[f].locator.slice(), f).length > 1 || void 0 !== l[f].alternation) ? q++ : q = E(j),
                            t(q, p.match.def)) {
                                var s = B(q, p.input, !0, !0);
                                if (k = s !== !1,
                                j = s.caret || s.insert ? o() : q,
                                k)
                                    break
                            } else {
                                if (k = null == p.match.fn,
                                r === q)
                                    break;
                                r = q
                            }
                    if (!k)
                        break
                }
                if (!k)
                    return m().validPositions = a.extend(!0, {}, h),
                    n(!0),
                    !1
            } else
                m().validPositions[b] = c;
            return n(!0),
            !0
        }
        function q(a, b, c, d) {
            function e(a) {
                var b = m().validPositions[a];
                if (void 0 !== b && null === b.match.fn) {
                    var c = m().validPositions[a - 1]
                      , d = m().validPositions[a + 1];
                    return void 0 !== c && void 0 !== d
                }
                return !1
            }
            var f, h = a;
            for (m().p = a,
            f = b - 1; f >= h; f--)
                void 0 !== m().validPositions[f] && (c === !0 || !e(f) && g.canClearPosition(m(), f, o(), d, g) !== !1) && delete m().validPositions[f];
            for (n(!0),
            f = h + 1; f <= o(); ) {
                for (; void 0 !== m().validPositions[h]; )
                    h++;
                var i = m().validPositions[h];
                if (h > f && (f = h + 1),
                void 0 === m().validPositions[f] && C(f) || void 0 !== i)
                    f++;
                else {
                    var j = r(f);
                    t(h, j.match.def) ? B(h, j.input || I(f), !0) !== !1 && (delete m().validPositions[f],
                    f++) : C(f) || (f++,
                    h--),
                    h++
                }
            }
            n(!0)
        }
        function r(a, b, c) {
            var d = m().validPositions[a];
            if (void 0 === d)
                for (var e = v(a, b, c), f = o(), h = m().validPositions[f] || v(0)[0], i = void 0 !== h.alternation ? h.locator[h.alternation].toString().split(",") : [], j = 0; j < e.length && (d = e[j],
                !(d.match && (g.greedy && d.match.optionalQuantifier !== !0 || (d.match.optionality === !1 || d.match.newBlockMarker === !1) && d.match.optionalQuantifier !== !0) && (void 0 === h.alternation || h.alternation !== d.alternation || void 0 !== d.locator[h.alternation] && A(d.locator[h.alternation].toString().split(","), i)))); j++)
                    ;
            return d
        }
        function s(a) {
            return m().validPositions[a] ? m().validPositions[a].match : v(a)[0].match
        }
        function t(a, b) {
            for (var c = !1, d = v(a), e = 0; e < d.length; e++)
                if (d[e].match && d[e].match.def === b) {
                    c = !0;
                    break
                }
            return c
        }
        function u(b, c) {
            var d, e;
            return (m().tests[b] || m().validPositions[b]) && a.each(m().tests[b] || [m().validPositions[b]], function(a, b) {
                var f = b.alternation ? b.locator[b.alternation].toString().indexOf(c) : -1;
                (void 0 === e || e > f) && -1 !== f && (d = b,
                e = f)
            }),
            d
        }
        function v(b, c, d) {
            function e(c, d, f, h) {
                function j(f, h, o) {
                    function p(b, c) {
                        var d = 0 === a.inArray(b, c.matches);
                        return d || a.each(c.matches, function(a, e) {
                            return e.isQuantifier === !0 && (d = p(b, c.matches[a - 1])) ? !1 : void 0
                        }),
                        d
                    }
                    function q(a, b) {
                        var c = u(a, b);
                        return c ? c.locator.slice(c.alternation + 1) : []
                    }
                    if (i > 1e4)
                        throw "Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. " + m().mask;
                    if (i === b && void 0 === f.matches)
                        return k.push({
                            match: f,
                            locator: h.reverse(),
                            cd: n
                        }),
                        !0;
                    if (void 0 !== f.matches) {
                        if (f.isGroup && o !== f) {
                            if (f = j(c.matches[a.inArray(f, c.matches) + 1], h))
                                return !0
                        } else if (f.isOptional) {
                            var r = f;
                            if (f = e(f, d, h, o)) {
                                if (g = k[k.length - 1].match,
                                !p(g, r))
                                    return !0;
                                l = !0,
                                i = b
                            }
                        } else if (f.isAlternator) {
                            var s, t = f, v = [], w = k.slice(), x = h.length, y = d.length > 0 ? d.shift() : -1;
                            if (-1 === y || "string" == typeof y) {
                                var z, A = i, B = d.slice(), C = [];
                                if ("string" == typeof y)
                                    C = y.split(",");
                                else
                                    for (z = 0; z < t.matches.length; z++)
                                        C.push(z);
                                for (var D = 0; D < C.length; D++) {
                                    if (z = parseInt(C[D]),
                                    k = [],
                                    d = q(i, z),
                                    f = j(t.matches[z] || c.matches[z], [z].concat(h), o) || f,
                                    f !== !0 && void 0 !== f && C[C.length - 1] < t.matches.length) {
                                        var E = a.inArray(f, c.matches) + 1;
                                        c.matches.length > E && (f = j(c.matches[E], [E].concat(h.slice(1, h.length)), o),
                                        f && (C.push(E.toString()),
                                        a.each(k, function(a, b) {
                                            b.alternation = h.length - 1
                                        })))
                                    }
                                    s = k.slice(),
                                    i = A,
                                    k = [];
                                    for (var F = 0; F < B.length; F++)
                                        d[F] = B[F];
                                    for (var G = 0; G < s.length; G++) {
                                        var H = s[G];
                                        H.alternation = H.alternation || x;
                                        for (var I = 0; I < v.length; I++) {
                                            var J = v[I];
                                            if (H.match.def === J.match.def && ("string" != typeof y || -1 !== a.inArray(H.locator[H.alternation].toString(), C))) {
                                                H.match.mask === J.match.mask && (s.splice(G, 1),
                                                G--),
                                                -1 === J.locator[H.alternation].toString().indexOf(H.locator[H.alternation]) && (J.locator[H.alternation] = J.locator[H.alternation] + "," + H.locator[H.alternation],
                                                J.alternation = H.alternation);
                                                break
                                            }
                                        }
                                    }
                                    v = v.concat(s)
                                }
                                "string" == typeof y && (v = a.map(v, function(b, c) {
                                    if (isFinite(c)) {
                                        var d, e = b.alternation, f = b.locator[e].toString().split(",");
                                        b.locator[e] = void 0,
                                        b.alternation = void 0;
                                        for (var g = 0; g < f.length; g++)
                                            d = -1 !== a.inArray(f[g], C),
                                            d && (void 0 !== b.locator[e] ? (b.locator[e] += ",",
                                            b.locator[e] += f[g]) : b.locator[e] = parseInt(f[g]),
                                            b.alternation = e);
                                        if (void 0 !== b.locator[e])
                                            return b
                                    }
                                })),
                                k = w.concat(v),
                                i = b,
                                l = k.length > 0
                            } else
                                f = j(t.matches[y] || c.matches[y], [y].concat(h), o);
                            if (f)
                                return !0
                        } else if (f.isQuantifier && o !== c.matches[a.inArray(f, c.matches) - 1])
                            for (var K = f, L = d.length > 0 ? d.shift() : 0; L < (isNaN(K.quantifier.max) ? L + 1 : K.quantifier.max) && b >= i; L++) {
                                var M = c.matches[a.inArray(K, c.matches) - 1];
                                if (f = j(M, [L].concat(h), M)) {
                                    if (g = k[k.length - 1].match,
                                    g.optionalQuantifier = L > K.quantifier.min - 1,
                                    p(g, M)) {
                                        if (L > K.quantifier.min - 1) {
                                            l = !0,
                                            i = b;
                                            break
                                        }
                                        return !0
                                    }
                                    return !0
                                }
                            }
                        else if (f = e(f, d, h, o))
                            return !0
                    } else
                        i++
                }
                for (var o = d.length > 0 ? d.shift() : 0; o < c.matches.length; o++)
                    if (c.matches[o].isQuantifier !== !0) {
                        var p = j(c.matches[o], [o].concat(f), h);
                        if (p && i === b)
                            return p;
                        if (i > b)
                            break
                    }
            }
            function f(a) {
                var b = a[0] || a;
                return b.locator.slice()
            }
            var g, h = m().maskToken, i = c ? d : 0, j = c || [0], k = [], l = !1, n = c ? c.join("") : "";
            if (b > -1) {
                if (void 0 === c) {
                    for (var o, p = b - 1; void 0 === (o = m().validPositions[p] || m().tests[p]) && p > -1; )
                        p--;
                    void 0 !== o && p > -1 && (j = f(o),
                    n = j.join(""),
                    o = o[0] || o,
                    i = p)
                }
                if (m().tests[b] && m().tests[b][0].cd === n)
                    return m().tests[b];
                for (var q = j.shift(); q < h.length; q++) {
                    var r = e(h[q], j, [q]);
                    if (r && i === b || i > b)
                        break
                }
            }
            return (0 === k.length || l) && k.push({
                match: {
                    fn: null,
                    cardinality: 0,
                    optionality: !0,
                    casing: null,
                    def: ""
                },
                locator: []
            }),
            m().tests[b] = a.extend(!0, [], k),
            m().tests[b]
        }
        function w() {
            return void 0 === m()._buffer && (m()._buffer = i(!1, 1)),
            m()._buffer
        }
        function x(a) {
            if (void 0 === m().buffer || a === !0) {
                if (a === !0)
                    for (var b in m().tests)
                        void 0 === m().validPositions[b] && delete m().tests[b];
                m().buffer = i(!0, o(), !0)
            }
            return m().buffer
        }
        function y(a, b, c) {
            var d;
            if (c = c,
            a === !0)
                n(),
                a = 0,
                b = c.length;
            else
                for (d = a; b > d; d++)
                    delete m().validPositions[d],
                    delete m().tests[d];
            for (d = a; b > d; d++)
                n(!0),
                c[d] !== g.skipOptionalPartCharacter && B(d, c[d], !0, !0)
        }
        function z(a, b) {
            switch (b.casing) {
            case "upper":
                a = a.toUpperCase();
                break;
            case "lower":
                a = a.toLowerCase()
            }
            return a
        }
        function A(b, c) {
            for (var d = g.greedy ? c : c.slice(0, 1), e = !1, f = 0; f < b.length; f++)
                if (-1 !== a.inArray(b[f], d)) {
                    e = !0;
                    break
                }
            return e
        }
        function B(c, d, e, f) {
            function h(a) {
                return ja ? a.begin - a.end > 1 || a.begin - a.end === 1 && g.insertMode : a.end - a.begin > 1 || a.end - a.begin === 1 && g.insertMode
            }
            function i(b, d, e, f) {
                var i = !1;
                return a.each(v(b), function(j, k) {
                    for (var l = k.match, r = d ? 1 : 0, s = "", t = l.cardinality; t > r; t--)
                        s += G(b - (t - 1));
                    if (d && (s += d),
                    x(!0),
                    i = null != l.fn ? l.fn.test(s, m(), b, e, g, h(c)) : d !== l.def && d !== g.skipOptionalPartCharacter || "" === l.def ? !1 : {
                        c: l.placeholder || l.def,
                        pos: b
                    },
                    i !== !1) {
                        var u = void 0 !== i.c ? i.c : d;
                        u = u === g.skipOptionalPartCharacter && null === l.fn ? l.placeholder || l.def : u;
                        var v = b
                          , w = x();
                        if (void 0 !== i.remove && (a.isArray(i.remove) || (i.remove = [i.remove]),
                        a.each(i.remove.sort(function(a, b) {
                            return b - a
                        }), function(a, b) {
                            q(b, b + 1, !0)
                        })),
                        void 0 !== i.insert && (a.isArray(i.insert) || (i.insert = [i.insert]),
                        a.each(i.insert.sort(function(a, b) {
                            return a - b
                        }), function(a, b) {
                            B(b.pos, b.c, !1, f)
                        })),
                        i.refreshFromBuffer) {
                            var A = i.refreshFromBuffer;
                            if (e = !0,
                            y(A === !0 ? A : A.start, A.end, w),
                            void 0 === i.pos && void 0 === i.c)
                                return i.pos = o(),
                                !1;
                            if (v = void 0 !== i.pos ? i.pos : b,
                            v !== b)
                                return i = a.extend(i, B(v, u, !0, f)),
                                !1
                        } else if (i !== !0 && void 0 !== i.pos && i.pos !== b && (v = i.pos,
                        y(b, v, x().slice()),
                        v !== b))
                            return i = a.extend(i, B(v, u, !0)),
                            !1;
                        return i !== !0 && void 0 === i.pos && void 0 === i.c ? !1 : (j > 0 && n(!0),
                        p(v, a.extend({}, k, {
                            input: z(u, l)
                        }), f, h(c)) || (i = !1),
                        !1)
                    }
                }),
                i
            }
            function j(b, c, d, e) {
                for (var f, h, i, j, k, l, p = a.extend(!0, {}, m().validPositions), q = a.extend(!0, {}, m().tests), s = o(); s >= 0 && (j = m().validPositions[s],
                !j || void 0 === j.alternation || (f = s,
                h = m().validPositions[f].alternation,
                r(f).locator[j.alternation] === j.locator[j.alternation])); s--)
                    ;
                if (void 0 !== h) {
                    f = parseInt(f);
                    for (var t in m().validPositions)
                        if (t = parseInt(t),
                        j = m().validPositions[t],
                        t >= f && void 0 !== j.alternation) {
                            var v;
                            0 === f ? (v = [],
                            a.each(m().tests[f], function(a, b) {
                                void 0 !== b.locator[h] && (v = v.concat(b.locator[h].toString().split(",")))
                            })) : v = m().validPositions[f].locator[h].toString().split(",");
                            var w = void 0 !== j.locator[h] ? j.locator[h] : v[0];
                            w.length > 0 && (w = w.split(",")[0]);
                            for (var x = 0; x < v.length; x++) {
                                var y = []
                                  , z = 0
                                  , A = 0;
                                if (w < v[x]) {
                                    for (var C, D, E = t; E >= 0; E--)
                                        if (C = m().validPositions[E],
                                        void 0 !== C) {
                                            var F = u(E, v[x]);
                                            m().validPositions[E].match.def !== F.match.def && (y.push(m().validPositions[E].input),
                                            m().validPositions[E] = F,
                                            m().validPositions[E].input = I(E),
                                            null === m().validPositions[E].match.fn && A++,
                                            C = F),
                                            D = C.locator[h],
                                            C.locator[h] = parseInt(v[x]);
                                            break
                                        }
                                    if (w !== C.locator[h]) {
                                        for (k = t + 1; k < o(void 0, !0) + 1; k++)
                                            l = m().validPositions[k],
                                            l && null != l.match.fn ? y.push(l.input) : b > k && z++,
                                            delete m().validPositions[k],
                                            delete m().tests[k];
                                        for (n(!0),
                                        g.keepStatic = !g.keepStatic,
                                        i = !0; y.length > 0; ) {
                                            var G = y.shift();
                                            if (G !== g.skipOptionalPartCharacter && !(i = B(o(void 0, !0) + 1, G, !1, e)))
                                                break
                                        }
                                        if (C.alternation = h,
                                        C.locator[h] = D,
                                        i) {
                                            var H = o(b) + 1;
                                            for (k = t + 1; k < o() + 1; k++)
                                                l = m().validPositions[k],
                                                (void 0 === l || null == l.match.fn) && b > k && A++;
                                            b += A - z,
                                            i = B(b > H ? H : b, c, d, e)
                                        }
                                        if (g.keepStatic = !g.keepStatic,
                                        i)
                                            return i;
                                        n(),
                                        m().validPositions = a.extend(!0, {}, p),
                                        m().tests = a.extend(!0, {}, q)
                                    }
                                }
                            }
                            break
                        }
                }
                return !1
            }
            function k(b, c) {
                for (var d = m().validPositions[c], e = d.locator, f = e.length, g = b; c > g; g++)
                    if (void 0 === m().validPositions[g] && !C(g, !0)) {
                        var h = v(g)
                          , i = h[0]
                          , j = -1;
                        a.each(h, function(a, b) {
                            for (var c = 0; f > c && (void 0 !== b.locator[c] && A(b.locator[c].toString().split(","), e[c].toString().split(","))); c++)
                                c > j && (j = c,
                                i = b)
                        }),
                        p(g, a.extend({}, i, {
                            input: i.match.placeholder || i.match.def
                        }), !0)
                    }
            }
            e = e === !0;
            var l = c;
            void 0 !== c.begin && (l = ja && !h(c) ? c.end : c.begin);
            for (var s = !1, t = a.extend(!0, {}, m().validPositions), w = l - 1; w > -1 && !m().validPositions[w]; w--)
                ;
            var F;
            for (w++; l > w; w++)
                void 0 === m().validPositions[w] && (g.jitMasking === !1 || g.jitMasking > w) && ((F = r(w)).match.def === g.radixPointDefinitionSymbol || !C(w, !0) || a.inArray(g.radixPoint, x()) < w && F.match.fn && F.match.fn.test(I(w), m(), w, !1, g)) && i(o(w, !0) + 1, F.match.placeholder || (null == F.match.fn ? F.match.def : "" !== I(w) ? I(w) : x()[w]), !0, f);
            if (h(c) && (Q(void 0, b.keyCode.DELETE, c),
            l = m().p),
            l < D() && (s = i(l, d, e, f),
            (!e || f === !0) && s === !1)) {
                var H = m().validPositions[l];
                if (!H || null !== H.match.fn || H.match.def !== d && d !== g.skipOptionalPartCharacter) {
                    if ((g.insertMode || void 0 === m().validPositions[E(l)]) && !C(l, !0)) {
                        var J = r(l).match;
                        J = J.placeholder || J.def,
                        i(l, J, e, f);
                        for (var K = l + 1, L = E(l); L >= K; K++)
                            if (s = i(K, d, e, f),
                            s !== !1) {
                                k(l, K),
                                l = K;
                                break
                            }
                    }
                } else
                    s = {
                        caret: E(l)
                    }
            }
            return s === !1 && g.keepStatic && (s = j(l, d, e, f)),
            s === !0 && (s = {
                pos: l
            }),
            a.isFunction(g.postValidation) && s !== !1 && !e && f !== !0 && (s = g.postValidation(x(!0), s, g) ? s : !1),
            void 0 === s.pos && (s.pos = l),
            s === !1 && (n(!0),
            m().validPositions = a.extend(!0, {}, t)),
            s
        }
        function C(a, b) {
            var c;
            if (b ? (c = r(a).match,
            "" === c.def && (c = s(a))) : c = s(a),
            null != c.fn)
                return c.fn;
            if (b !== !0 && a > -1 && !g.keepStatic && void 0 === m().validPositions[a]) {
                var d = v(a);
                return d.length > 2
            }
            return !1
        }
        function D() {
            var a;
            ha = void 0 !== fa ? fa.maxLength : void 0,
            -1 === ha && (ha = void 0);
            var b, c = o(), d = m().validPositions[c], e = void 0 !== d ? d.locator.slice() : void 0;
            for (b = c + 1; void 0 === d || null !== d.match.fn || null === d.match.fn && "" !== d.match.def; b++)
                d = r(b, e, b - 1),
                e = d.locator.slice();
            var f = s(b - 1);
            return a = "" !== f.def ? b : b - 1,
            void 0 === ha || ha > a ? a : ha
        }
        function E(a, b) {
            var c = D();
            if (a >= c)
                return c;
            for (var d = a; ++d < c && (b === !0 && (s(d).newBlockMarker !== !0 || !C(d)) || b !== !0 && !C(d) && (g.nojumps !== !0 || g.nojumpsThreshold > d)); )
                ;
            return d
        }
        function F(a, b) {
            var c = a;
            if (0 >= c)
                return 0;
            for (; --c > 0 && (b === !0 && s(c).newBlockMarker !== !0 || b !== !0 && !C(c)); )
                ;
            return c
        }
        function G(a) {
            return void 0 === m().validPositions[a] ? I(a) : m().validPositions[a].input
        }
        function H(b, c, d, e, f) {
            if (e && a.isFunction(g.onBeforeWrite)) {
                var h = g.onBeforeWrite(e, c, d, g);
                if (h) {
                    if (h.refreshFromBuffer) {
                        var i = h.refreshFromBuffer;
                        y(i === !0 ? i : i.start, i.end, h.buffer || c),
                        c = x(!0)
                    }
                    void 0 !== d && (d = void 0 !== h.caret ? h.caret : d)
                }
            }
            b.inputmask._valueSet(c.join("")),
            void 0 === d || void 0 !== e && "blur" === e.type || L(b, d),
            f === !0 && (la = !0,
            a(b).trigger("input"))
        }
        function I(a, b) {
            if (b = b || s(a),
            void 0 !== b.placeholder)
                return b.placeholder;
            if (null === b.fn) {
                if (a > -1 && !g.keepStatic && void 0 === m().validPositions[a]) {
                    var c, d = v(a), e = 0;
                    if (d.length > 2)
                        for (var f = 0; f < d.length; f++)
                            if (d[f].match.optionality !== !0 && d[f].match.optionalQuantifier !== !0 && (null === d[f].match.fn || void 0 === c || d[f].match.fn.test(c.match.def, m(), a, !0, g) !== !1) && (e++,
                            null === d[f].match.fn && (c = d[f]),
                            e > 1))
                                return g.placeholder.charAt(a % g.placeholder.length)
                }
                return b.def
            }
            return g.placeholder.charAt(a % g.placeholder.length)
        }
        function J(c, d, e, f) {
            function h() {
                var a = !1
                  , b = w().slice(l, E(l)).join("").indexOf(k);
                if (-1 !== b && !C(l)) {
                    a = !0;
                    for (var c = w().slice(l, l + b), d = 0; d < c.length; d++)
                        if (" " !== c[d]) {
                            a = !1;
                            break
                        }
                }
                return a
            }
            var i, j = f.slice(), k = "", l = 0;
            if (n(),
            m().p = E(-1),
            !e)
                if (g.autoUnmask !== !0) {
                    var p = w().slice(0, E(-1)).join("")
                      , q = j.join("").match(new RegExp("^" + b.escapeRegex(p),"g"));
                    q && q.length > 0 && (j.splice(0, q.length * p.length),
                    l = E(l))
                } else
                    l = E(l);
            a.each(j, function(b, d) {
                if (void 0 !== d) {
                    var f = new a.Event("keypress");
                    f.which = d.charCodeAt(0),
                    k += d;
                    var j = o(void 0, !0)
                      , p = m().validPositions[j]
                      , q = r(j + 1, p ? p.locator.slice() : void 0, j);
                    if (!h() || e || g.autoUnmask) {
                        var s = e ? b : null == q.match.fn && q.match.optionality && j + 1 < m().p ? j + 1 : m().p;
                        i = S.call(c, f, !0, !1, e, s),
                        l = s + 1,
                        k = ""
                    } else
                        i = S.call(c, f, !0, !1, !0, j + 1);
                    if (!e && a.isFunction(g.onBeforeWrite) && (i = g.onBeforeWrite(f, x(), i.forwardPosition, g),
                    i && i.refreshFromBuffer)) {
                        var t = i.refreshFromBuffer;
                        y(t === !0 ? t : t.start, t.end, i.buffer),
                        n(!0),
                        i.caret && (m().p = i.caret)
                    }
                }
            }),
            d && H(c, x(), document.activeElement === c ? E(o(0)) : void 0, new a.Event("checkval"))
        }
        function K(b) {
            if (b && void 0 === b.inputmask)
                return b.value;
            var c = []
              , d = m().validPositions;
            for (var e in d)
                d[e].match && null != d[e].match.fn && c.push(d[e].input);
            var f = 0 === c.length ? null : (ja ? c.reverse() : c).join("");
            if (null !== f) {
                var h = (ja ? x().slice().reverse() : x()).join("");
                a.isFunction(g.onUnMask) && (f = g.onUnMask(h, f, g) || f)
            }
            return f
        }
        function L(a, b, c, d) {
            function e(a) {
                if (d !== !0 && ja && "number" == typeof a && (!g.greedy || "" !== g.placeholder)) {
                    var b = x().join("").length;
                    a = b - a
                }
                return a
            }
            var f;
            if ("number" != typeof b)
                return a.setSelectionRange ? (b = a.selectionStart,
                c = a.selectionEnd) : window.getSelection ? (f = window.getSelection().getRangeAt(0),
                (f.commonAncestorContainer.parentNode === a || f.commonAncestorContainer === a) && (b = f.startOffset,
                c = f.endOffset)) : document.selection && document.selection.createRange && (f = document.selection.createRange(),
                b = 0 - f.duplicate().moveStart("character", -a.inputmask._valueGet().length),
                c = b + f.text.length),
                {
                    begin: e(b),
                    end: e(c)
                };
            b = e(b),
            c = e(c),
            c = "number" == typeof c ? c : b;
            var h = parseInt(((a.ownerDocument.defaultView || window).getComputedStyle ? (a.ownerDocument.defaultView || window).getComputedStyle(a, null) : a.currentStyle).fontSize) * c;
            if (a.scrollLeft = h > a.scrollWidth ? h : 0,
            j || g.insertMode !== !1 || b !== c || c++,
            a.setSelectionRange)
                a.selectionStart = b,
                a.selectionEnd = c;
            else if (window.getSelection) {
                if (f = document.createRange(),
                void 0 === a.firstChild || null === a.firstChild) {
                    var i = document.createTextNode("");
                    a.appendChild(i)
                }
                f.setStart(a.firstChild, b < a.inputmask._valueGet().length ? b : a.inputmask._valueGet().length),
                f.setEnd(a.firstChild, c < a.inputmask._valueGet().length ? c : a.inputmask._valueGet().length),
                f.collapse(!0);
                var k = window.getSelection();
                k.removeAllRanges(),
                k.addRange(f)
            } else
                a.createTextRange && (f = a.createTextRange(),
                f.collapse(!0),
                f.moveEnd("character", c),
                f.moveStart("character", b),
                f.select())
        }
        function M(b) {
            var c, d, e = x(), f = e.length, g = o(), h = {}, i = m().validPositions[g], j = void 0 !== i ? i.locator.slice() : void 0;
            for (c = g + 1; c < e.length; c++)
                d = r(c, j, c - 1),
                j = d.locator.slice(),
                h[c] = a.extend(!0, {}, d);
            var k = i && void 0 !== i.alternation ? i.locator[i.alternation] : void 0;
            for (c = f - 1; c > g && (d = h[c],
            (d.match.optionality || d.match.optionalQuantifier || k && (k !== h[c].locator[i.alternation] && null != d.match.fn || null === d.match.fn && d.locator[i.alternation] && A(d.locator[i.alternation].toString().split(","), k.toString().split(",")) && "" !== v(c)[0].def)) && e[c] === I(c, d.match)); c--)
                f--;
            return b ? {
                l: f,
                def: h[f] ? h[f].match : void 0
            } : f
        }
        function N(a) {
            for (var b = M(), c = a.length - 1; c > b && !C(c); c--)
                ;
            return a.splice(b, c + 1 - b),
            a
        }
        function O(b) {
            if (a.isFunction(g.isComplete))
                return g.isComplete(b, g);
            if ("*" === g.repeat)
                return void 0;
            var c = !1
              , d = M(!0)
              , e = F(d.l);
            if (void 0 === d.def || d.def.newBlockMarker || d.def.optionality || d.def.optionalQuantifier) {
                c = !0;
                for (var f = 0; e >= f; f++) {
                    var h = r(f).match;
                    if (null !== h.fn && void 0 === m().validPositions[f] && h.optionality !== !0 && h.optionalQuantifier !== !0 || null === h.fn && b[f] !== I(f, h)) {
                        c = !1;
                        break
                    }
                }
            }
            return c
        }
        function P(b) {
            function c(b) {
                if (a.valHooks && (void 0 === a.valHooks[b] || a.valHooks[b].inputmaskpatch !== !0)) {
                    var c = a.valHooks[b] && a.valHooks[b].get ? a.valHooks[b].get : function(a) {
                        return a.value
                    }
                      , d = a.valHooks[b] && a.valHooks[b].set ? a.valHooks[b].set : function(a, b) {
                        return a.value = b,
                        a
                    }
                    ;
                    a.valHooks[b] = {
                        get: function(a) {
                            if (a.inputmask) {
                                if (a.inputmask.opts.autoUnmask)
                                    return a.inputmask.unmaskedvalue();
                                var b = c(a);
                                return -1 !== o() || g.nullable !== !0 ? b : ""
                            }
                            return c(a)
                        },
                        set: function(b, c) {
                            var e, f = a(b);
                            return e = d(b, c),
                            b.inputmask && f.trigger("setvalue"),
                            e
                        },
                        inputmaskpatch: !0
                    }
                }
            }
            function d() {
                return this.inputmask ? this.inputmask.opts.autoUnmask ? this.inputmask.unmaskedvalue() : -1 !== o() || g.nullable !== !0 ? document.activeElement === this && g.clearMaskOnLostFocus ? (ja ? N(x().slice()).reverse() : N(x().slice())).join("") : h.call(this) : "" : h.call(this)
            }
            function e(b) {
                i.call(this, b),
                this.inputmask && a(this).trigger("setvalue")
            }
            function f(b) {
                oa.on(b, "mouseenter", function(b) {
                    var c = a(this)
                      , d = this
                      , e = d.inputmask._valueGet();
                    e !== x().join("") && c.trigger("setvalue")
                })
            }
            var h, i;
            if (!b.inputmask.__valueGet) {
                if (Object.getOwnPropertyDescriptor) {
                    var j = Object.getPrototypeOf ? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(b), "value") : void 0;
                    j && j.get && j.set ? (h = j.get,
                    i = j.set,
                    Object.defineProperty(b, "value", {
                        get: d,
                        set: e,
                        configurable: !0
                    })) : "INPUT" !== b.tagName && (h = function() {
                        return this.textContent
                    }
                    ,
                    i = function(a) {
                        this.textContent = a
                    }
                    ,
                    Object.defineProperty(b, "value", {
                        get: d,
                        set: e,
                        configurable: !0
                    }))
                } else
                    document.__lookupGetter__ && b.__lookupGetter__("value") && (h = b.__lookupGetter__("value"),
                    i = b.__lookupSetter__("value"),
                    b.__defineGetter__("value", d),
                    b.__defineSetter__("value", e));
                void 0 === h && (h = function() {
                    return b.value
                }
                ,
                i = function(a) {
                    b.value = a
                }
                ,
                c(b.type),
                f(b)),
                b.inputmask.__valueGet = h,
                b.inputmask._valueGet = function(a) {
                    return ja && a !== !0 ? h.call(this.el).split("").reverse().join("") : h.call(this.el)
                }
                ,
                b.inputmask.__valueSet = i,
                b.inputmask._valueSet = function(a, b) {
                    i.call(this.el, null === a || void 0 === a ? "" : b !== !0 && ja ? a.split("").reverse().join("") : a)
                }
            }
        }
        function Q(c, d, e, f) {
            function h() {
                if (g.keepStatic) {
                    n(!0);
                    var b, d = [], e = a.extend(!0, {}, m().validPositions);
                    for (b = o(); b >= 0; b--) {
                        var f = m().validPositions[b];
                        if (f && (null != f.match.fn && d.push(f.input),
                        delete m().validPositions[b],
                        void 0 !== f.alternation && f.locator[f.alternation] === r(b).locator[f.alternation]))
                            break
                    }
                    if (b > -1)
                        for (; d.length > 0; ) {
                            m().p = E(o());
                            var h = new a.Event("keypress");
                            h.which = d.pop().charCodeAt(0),
                            S.call(c, h, !0, !1, !1, m().p)
                        }
                    else
                        m().validPositions = a.extend(!0, {}, e)
                }
            }
            if ((g.numericInput || ja) && (d === b.keyCode.BACKSPACE ? d = b.keyCode.DELETE : d === b.keyCode.DELETE && (d = b.keyCode.BACKSPACE),
            ja)) {
                var i = e.end;
                e.end = e.begin,
                e.begin = i
            }
            d === b.keyCode.BACKSPACE && (e.end - e.begin < 1 || g.insertMode === !1) ? (e.begin = F(e.begin),
            void 0 === m().validPositions[e.begin] || m().validPositions[e.begin].input !== g.groupSeparator && m().validPositions[e.begin].input !== g.radixPoint || e.begin--) : d === b.keyCode.DELETE && e.begin === e.end && (e.end = C(e.end) ? e.end + 1 : E(e.end) + 1,
            void 0 === m().validPositions[e.begin] || m().validPositions[e.begin].input !== g.groupSeparator && m().validPositions[e.begin].input !== g.radixPoint || e.end++),
            q(e.begin, e.end, !1, f),
            f !== !0 && h();
            var j = o(e.begin);
            j < e.begin ? (-1 === j && n(),
            m().p = E(j)) : f !== !0 && (m().p = e.begin)
        }
        function R(d) {
            var e = this
              , f = a(e)
              , h = d.keyCode
              , i = L(e);
            if (h === b.keyCode.BACKSPACE || h === b.keyCode.DELETE || l && h === b.keyCode.BACKSPACE_SAFARI || d.ctrlKey && h === b.keyCode.X && !c("cut"))
                d.preventDefault(),
                Q(e, h, i),
                H(e, x(), m().p, d, ea !== x().join("")),
                e.inputmask._valueGet() === w().join("") ? f.trigger("cleared") : O(x()) === !0 && f.trigger("complete"),
                g.showTooltip && (e.title = g.tooltip || m().mask);
            else if (h === b.keyCode.END || h === b.keyCode.PAGE_DOWN) {
                d.preventDefault();
                var j = E(o());
                g.insertMode || j !== D() || d.shiftKey || j--,
                L(e, d.shiftKey ? i.begin : j, j, !0)
            } else
                h === b.keyCode.HOME && !d.shiftKey || h === b.keyCode.PAGE_UP ? (d.preventDefault(),
                L(e, 0, d.shiftKey ? i.begin : 0, !0)) : (g.undoOnEscape && h === b.keyCode.ESCAPE || 90 === h && d.ctrlKey) && d.altKey !== !0 ? (J(e, !0, !1, ea.split("")),
                f.trigger("click")) : h !== b.keyCode.INSERT || d.shiftKey || d.ctrlKey ? g.tabThrough === !0 && h === b.keyCode.TAB ? (d.shiftKey === !0 ? (null === s(i.begin).fn && (i.begin = E(i.begin)),
                i.end = F(i.begin, !0),
                i.begin = F(i.end, !0)) : (i.begin = E(i.begin, !0),
                i.end = E(i.begin, !0),
                i.end < D() && i.end--),
                i.begin < D() && (d.preventDefault(),
                L(e, i.begin, i.end))) : g.insertMode !== !1 || d.shiftKey || (h === b.keyCode.RIGHT ? setTimeout(function() {
                    var a = L(e);
                    L(e, a.begin)
                }, 0) : h === b.keyCode.LEFT && setTimeout(function() {
                    var a = L(e);
                    L(e, ja ? a.begin + 1 : a.begin - 1)
                }, 0)) : (g.insertMode = !g.insertMode,
                L(e, g.insertMode || i.begin !== D() ? i.begin : i.begin - 1));
            g.onKeyDown.call(this, d, x(), L(e).begin, g),
            ma = -1 !== a.inArray(h, g.ignorables)
        }
        function S(c, d, e, f, h) {
            var i = this
              , j = a(i)
              , k = c.which || c.charCode || c.keyCode;
            if (!(d === !0 || c.ctrlKey && c.altKey) && (c.ctrlKey || c.metaKey || ma))
                return k === b.keyCode.ENTER && ea !== x().join("") && (ea = x().join(""),
                setTimeout(function() {
                    j.trigger("change")
                }, 0)),
                !0;
            if (k) {
                46 === k && c.shiftKey === !1 && "," === g.radixPoint && (k = 44);
                var l, o = d ? {
                    begin: h,
                    end: h
                } : L(i), p = String.fromCharCode(k);
                m().writeOutBuffer = !0;
                var q = B(o, p, f);
                if (q !== !1) {
                    var r = q.pos;
                    if (n(!0),
                    void 0 !== q.caret)
                        l = q.caret;
                    else {
                        var s = m().validPositions;
                        l = !g.keepStatic && (void 0 !== s[r + 1] && v(r + 1, s[r].locator.slice(), r).length > 1 || void 0 !== s[r].alternation) ? r + 1 : E(r)
                    }
                    m().p = l
                }
                if (e !== !1) {
                    var t = this;
                    if (setTimeout(function() {
                        g.onKeyValidation.call(t, k, q, g)
                    }, 0),
                    m().writeOutBuffer && q !== !1) {
                        var u = x();
                        H(i, u, g.numericInput && void 0 === q.caret ? F(l) : l, c, d !== !0),
                        d !== !0 && setTimeout(function() {
                            O(u) === !0 && j.trigger("complete")
                        }, 0)
                    }
                }
                if (g.showTooltip && (i.title = g.tooltip || m().mask),
                c.preventDefault(),
                d)
                    return q.forwardPosition = l,
                    q
            }
        }
        function T(b) {
            var c, d = this, e = b.originalEvent || b, f = a(d), h = d.inputmask._valueGet(!0), i = L(d);
            ja && (c = i.end,
            i.end = i.begin,
            i.begin = c);
            var j = h.substr(0, i.begin)
              , k = h.substr(i.end, h.length);
            j === (ja ? w().reverse() : w()).slice(0, i.begin).join("") && (j = ""),
            k === (ja ? w().reverse() : w()).slice(i.end).join("") && (k = ""),
            ja && (c = j,
            j = k,
            k = c),
            window.clipboardData && window.clipboardData.getData ? h = j + window.clipboardData.getData("Text") + k : e.clipboardData && e.clipboardData.getData && (h = j + e.clipboardData.getData("text/plain") + k);
            var l = h;
            if (a.isFunction(g.onBeforePaste)) {
                if (l = g.onBeforePaste(h, g),
                l === !1)
                    return b.preventDefault();
                l || (l = h)
            }
            return J(d, !1, !1, ja ? l.split("").reverse() : l.toString().split("")),
            H(d, x(), E(o()), b, !0),
            O(x()) === !0 && f.trigger("complete"),
            b.preventDefault()
        }
        function U(c) {
            var d = this
              , e = d.inputmask._valueGet();
            if (x().join("") !== e) {
                var f = L(d);
                if (e = e.replace(new RegExp("(" + b.escapeRegex(w().join("")) + ")*"), ""),
                k) {
                    var g = e.replace(x().join(""), "");
                    if (1 === g.length) {
                        var h = new a.Event("keypress");
                        return h.which = g.charCodeAt(0),
                        S.call(d, h, !0, !0, !1, m().validPositions[f.begin - 1] ? f.begin : f.begin - 1),
                        !1
                    }
                }
                if (f.begin > e.length && (L(d, e.length),
                f = L(d)),
                x().length - e.length !== 1 || e.charAt(f.begin) === x()[f.begin] || e.charAt(f.begin + 1) === x()[f.begin] || C(f.begin)) {
                    for (var i = o() + 1, j = x().slice(i).join(""); null === e.match(b.escapeRegex(j) + "$"); )
                        j = j.slice(1);
                    e = e.replace(j, ""),
                    e = e.split(""),
                    J(d, !0, !1, e),
                    O(x()) === !0 && a(d).trigger("complete")
                } else
                    c.keyCode = b.keyCode.BACKSPACE,
                    R.call(d, c);
                c.preventDefault()
            }
        }
        function V(b) {
            var c = this
              , d = c.inputmask._valueGet();
            J(c, !0, !1, (a.isFunction(g.onBeforeMask) ? g.onBeforeMask(d, g) || d : d).split("")),
            ea = x().join(""),
            (g.clearMaskOnLostFocus || g.clearIncomplete) && c.inputmask._valueGet() === w().join("") && c.inputmask._valueSet("")
        }
        function W(a) {
            var b = this
              , c = b.inputmask._valueGet();
            g.showMaskOnFocus && (!g.showMaskOnHover || g.showMaskOnHover && "" === c) ? b.inputmask._valueGet() !== x().join("") && H(b, x(), E(o())) : na === !1 && L(b, E(o())),
            g.positionCaretOnTab === !0 && setTimeout(function() {
                L(b, E(o()))
            }, 0),
            ea = x().join("")
        }
        function X(a) {
            var b = this;
            if (na = !1,
            g.clearMaskOnLostFocus && document.activeElement !== b) {
                var c = x().slice()
                  , d = b.inputmask._valueGet();
                d !== b.getAttribute("placeholder") && "" !== d && (-1 === o() && d === w().join("") ? c = [] : N(c),
                H(b, c))
            }
        }
        function Y(b) {
            function c(b) {
                if (g.radixFocus && "" !== g.radixPoint) {
                    var c = m().validPositions;
                    if (void 0 === c[b] || c[b].input === I(b)) {
                        if (b < E(-1))
                            return !0;
                        var d = a.inArray(g.radixPoint, x());
                        if (-1 !== d) {
                            for (var e in c)
                                if (e > d && c[e].input !== I(e))
                                    return !1;
                            return !0
                        }
                    }
                }
                return !1
            }
            var d = this;
            setTimeout(function() {
                if (document.activeElement === d) {
                    var b = L(d);
                    if (b.begin === b.end)
                        if (c(b.begin))
                            L(d, g.numericInput ? E(a.inArray(g.radixPoint, x())) : a.inArray(g.radixPoint, x()));
                        else {
                            var e = b.begin
                              , f = o(e, !0)
                              , h = E(f);
                            if (h > e)
                                L(d, C(e) || C(e - 1) ? e : E(e));
                            else {
                                var i = I(h);
                                ("" !== i && x()[h] !== i || !C(h, !0) && s(h).def === i) && (h = E(h)),
                                L(d, h)
                            }
                        }
                }
            }, 0)
        }
        function Z(a) {
            var b = this;
            setTimeout(function() {
                L(b, 0, E(o()))
            }, 0)
        }
        function $(c) {
            var d = this
              , e = a(d)
              , f = L(d)
              , h = c.originalEvent || c
              , i = window.clipboardData || h.clipboardData
              , j = ja ? x().slice(f.end, f.begin) : x().slice(f.begin, f.end);
            i.setData("text", ja ? j.reverse().join("") : j.join("")),
            document.execCommand && document.execCommand("copy"),
            Q(d, b.keyCode.DELETE, f),
            H(d, x(), m().p, c, ea !== x().join("")),
            d.inputmask._valueGet() === w().join("") && e.trigger("cleared"),
            g.showTooltip && (d.title = g.tooltip || m().mask)
        }
        function _(b) {
            var c = a(this)
              , d = this;
            if (d.inputmask) {
                var e = d.inputmask._valueGet()
                  , f = x().slice();
                ea !== f.join("") && setTimeout(function() {
                    c.trigger("change"),
                    ea = f.join("")
                }, 0),
                "" !== e && (g.clearMaskOnLostFocus && (-1 === o() && e === w().join("") ? f = [] : N(f)),
                O(f) === !1 && (setTimeout(function() {
                    c.trigger("incomplete")
                }, 0),
                g.clearIncomplete && (n(),
                f = g.clearMaskOnLostFocus ? [] : w().slice())),
                H(d, f, void 0, b))
            }
        }
        function aa(a) {
            var b = this;
            na = !0,
            document.activeElement !== b && g.showMaskOnHover && b.inputmask._valueGet() !== x().join("") && H(b, x())
        }
        function ba(a) {
            ea !== x().join("") && ga.trigger("change"),
            g.clearMaskOnLostFocus && -1 === o() && fa.inputmask._valueGet && fa.inputmask._valueGet() === w().join("") && fa.inputmask._valueSet(""),
            g.removeMaskOnSubmit && (fa.inputmask._valueSet(fa.inputmask.unmaskedvalue(), !0),
            setTimeout(function() {
                H(fa, x())
            }, 0))
        }
        function ca(a) {
            setTimeout(function() {
                ga.trigger("setvalue")
            }, 0)
        }
        function da(b) {
            if (fa = b,
            ga = a(fa),
            g.showTooltip && (fa.title = g.tooltip || m().mask),
            ("rtl" === fa.dir || g.rightAlign) && (fa.style.textAlign = "right"),
            ("rtl" === fa.dir || g.numericInput) && (fa.dir = "ltr",
            fa.removeAttribute("dir"),
            fa.inputmask.isRTL = !0,
            ja = !0),
            oa.off(fa),
            P(fa),
            d(fa, g) && (oa.on(fa, "submit", ba),
            oa.on(fa, "reset", ca),
            oa.on(fa, "mouseenter", aa),
            oa.on(fa, "blur", _),
            oa.on(fa, "focus", W),
            oa.on(fa, "mouseleave", X),
            oa.on(fa, "click", Y),
            oa.on(fa, "dblclick", Z),
            oa.on(fa, "paste", T),
            oa.on(fa, "dragdrop", T),
            oa.on(fa, "drop", T),
            oa.on(fa, "cut", $),
            oa.on(fa, "complete", g.oncomplete),
            oa.on(fa, "incomplete", g.onincomplete),
            oa.on(fa, "cleared", g.oncleared),
            oa.on(fa, "keydown", R),
            oa.on(fa, "keypress", S),
            oa.on(fa, "input", U)),
            oa.on(fa, "setvalue", V),
            "" !== fa.inputmask._valueGet() || g.clearMaskOnLostFocus === !1 || document.activeElement === fa) {
                var c = a.isFunction(g.onBeforeMask) ? g.onBeforeMask(fa.inputmask._valueGet(), g) || fa.inputmask._valueGet() : fa.inputmask._valueGet();
                J(fa, !0, !1, c.split(""));
                var e = x().slice();
                ea = e.join(""),
                O(e) === !1 && g.clearIncomplete && n(),
                g.clearMaskOnLostFocus && document.activeElement !== fa && (-1 === o() ? e = [] : N(e)),
                H(fa, e),
                document.activeElement === fa && L(fa, E(o()))
            }
        }
        var ea, fa, ga, ha, ia, ja = !1, ka = !1, la = !1, ma = !1, na = !0, oa = {
            on: function(c, d, e) {
                var f = function(c) {
                    if (void 0 === this.inputmask && "FORM" !== this.nodeName) {
                        var d = a.data(this, "_inputmask_opts");
                        d ? new b(d).mask(this) : oa.off(this)
                    } else {
                        if ("setvalue" === c.type || !(this.disabled || this.readOnly && !("keydown" === c.type && c.ctrlKey && 67 === c.keyCode || g.tabThrough === !1 && c.keyCode === b.keyCode.TAB))) {
                            switch (c.type) {
                            case "input":
                                if (la === !0)
                                    return la = !1,
                                    c.preventDefault();
                                break;
                            case "keydown":
                                ka = !1,
                                la = !1;
                                break;
                            case "keypress":
                                if (ka === !0)
                                    return c.preventDefault();
                                ka = !0;
                                break;
                            case "click":
                                if (k) {
                                    var f = this;
                                    return setTimeout(function() {
                                        e.apply(f, arguments)
                                    }, 0),
                                    !1
                                }
                            }
                            var h = e.apply(this, arguments);
                            return h === !1 && (c.preventDefault(),
                            c.stopPropagation()),
                            h
                        }
                        c.preventDefault()
                    }
                };
                c.inputmask.events[d] = c.inputmask.events[d] || [],
                c.inputmask.events[d].push(f),
                -1 !== a.inArray(d, ["submit", "reset"]) ? null != c.form && a(c.form).on(d, f) : a(c).on(d, f)
            },
            off: function(b, c) {
                if (b.inputmask && b.inputmask.events) {
                    var d;
                    c ? (d = [],
                    d[c] = b.inputmask.events[c]) : d = b.inputmask.events,
                    a.each(d, function(c, d) {
                        for (; d.length > 0; ) {
                            var e = d.pop();
                            -1 !== a.inArray(c, ["submit", "reset"]) ? null != b.form && a(b.form).off(c, e) : a(b).off(c, e)
                        }
                        delete b.inputmask.events[c]
                    })
                }
            }
        };
        if (void 0 !== e)
            switch (e.action) {
            case "isComplete":
                return fa = e.el,
                O(x());
            case "unmaskedvalue":
                return fa = e.el,
                void 0 !== fa && void 0 !== fa.inputmask ? (f = fa.inputmask.maskset,
                g = fa.inputmask.opts,
                ja = fa.inputmask.isRTL) : (ia = e.value,
                g.numericInput && (ja = !0),
                ia = (a.isFunction(g.onBeforeMask) ? g.onBeforeMask(ia, g) || ia : ia).split(""),
                J(void 0, !1, !1, ja ? ia.reverse() : ia),
                a.isFunction(g.onBeforeWrite) && g.onBeforeWrite(void 0, x(), 0, g)),
                K(fa);
            case "mask":
                fa = e.el,
                f = fa.inputmask.maskset,
                g = fa.inputmask.opts,
                ja = fa.inputmask.isRTL,
                ea = x().join(""),
                da(fa);
                break;
            case "format":
                return g.numericInput && (ja = !0),
                ia = (a.isFunction(g.onBeforeMask) ? g.onBeforeMask(e.value, g) || e.value : e.value).split(""),
                J(void 0, !1, !1, ja ? ia.reverse() : ia),
                a.isFunction(g.onBeforeWrite) && g.onBeforeWrite(void 0, x(), 0, g),
                e.metadata ? {
                    value: ja ? x().slice().reverse().join("") : x().join(""),
                    metadata: h({
                        action: "getmetadata"
                    }, f, g)
                } : ja ? x().slice().reverse().join("") : x().join("");
            case "isValid":
                g.numericInput && (ja = !0),
                e.value ? (ia = e.value.split(""),
                J(void 0, !1, !0, ja ? ia.reverse() : ia)) : e.value = x().join("");
                for (var pa = x(), qa = M(), ra = pa.length - 1; ra > qa && !C(ra); ra--)
                    ;
                return pa.splice(qa, ra + 1 - qa),
                O(pa) && e.value === x().join("");
            case "getemptymask":
                return w().join("");
            case "remove":
                fa = e.el,
                ga = a(fa),
                f = fa.inputmask.maskset,
                g = fa.inputmask.opts,
                fa.inputmask._valueSet(K(fa)),
                oa.off(fa);
                var sa;
                Object.getOwnPropertyDescriptor && Object.getPrototypeOf ? (sa = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(fa), "value"),
                sa && fa.inputmask.__valueGet && Object.defineProperty(fa, "value", {
                    get: fa.inputmask.__valueGet,
                    set: fa.inputmask.__valueSet,
                    configurable: !0
                })) : document.__lookupGetter__ && fa.__lookupGetter__("value") && fa.inputmask.__valueGet && (fa.__defineGetter__("value", fa.inputmask.__valueGet),
                fa.__defineSetter__("value", fa.inputmask.__valueSet)),
                fa.inputmask = void 0;
                break;
            case "getmetadata":
                if (a.isArray(f.metadata)) {
                    for (var ta, ua = o(void 0, !0), va = ua; va >= 0; va--)
                        if (m().validPositions[va] && void 0 !== m().validPositions[va].alternation) {
                            ta = m().validPositions[va].alternation;
                            break
                        }
                    return void 0 !== ta ? f.metadata[m().validPositions[va].locator[ta]] : []
                }
                return f.metadata
            }
    }
    b.prototype = {
        defaults: {
            placeholder: "_",
            optionalmarker: {
                start: "[",
                end: "]"
            },
            quantifiermarker: {
                start: "{",
                end: "}"
            },
            groupmarker: {
                start: "(",
                end: ")"
            },
            alternatormarker: "|",
            escapeChar: "\\",
            mask: null,
            oncomplete: a.noop,
            onincomplete: a.noop,
            oncleared: a.noop,
            repeat: 0,
            greedy: !0,
            autoUnmask: !1,
            removeMaskOnSubmit: !1,
            clearMaskOnLostFocus: !0,
            insertMode: !0,
            clearIncomplete: !1,
            aliases: {},
            alias: null,
            onKeyDown: a.noop,
            onBeforeMask: null,
            onBeforePaste: function(b, c) {
                return a.isFunction(c.onBeforeMask) ? c.onBeforeMask(b, c) : b
            },
            onBeforeWrite: null,
            onUnMask: null,
            showMaskOnFocus: !0,
            showMaskOnHover: !0,
            onKeyValidation: a.noop,
            skipOptionalPartCharacter: " ",
            showTooltip: !1,
            tooltip: void 0,
            numericInput: !1,
            rightAlign: !1,
            undoOnEscape: !0,
            radixPoint: "",
            radixPointDefinitionSymbol: void 0,
            groupSeparator: "",
            radixFocus: !1,
            nojumps: !1,
            nojumpsThreshold: 0,
            keepStatic: null,
            positionCaretOnTab: !1,
            tabThrough: !1,
            supportsInputType: ["text", "tel", "password"],
            definitions: {
                9: {
                    validator: "[0-9]",
                    cardinality: 1,
                    definitionSymbol: "*"
                },
                a: {
                    validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
                    cardinality: 1,
                    definitionSymbol: "*"
                },
                "*": {
                    validator: "[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
                    cardinality: 1
                }
            },
            ignorables: [8, 9, 13, 19, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123],
            isComplete: null,
            canClearPosition: a.noop,
            postValidation: null,
            staticDefinitionSymbol: void 0,
            jitMasking: !1,
            nullable: !0
        },
        masksCache: {},
        mask: function(c) {
            var d = this;
            return "string" == typeof c && (c = document.getElementById(c) || document.querySelectorAll(c)),
            c = c.nodeName ? [c] : c,
            a.each(c, function(c, e) {
                var i = a.extend(!0, {}, d.opts);
                f(e, i, a.extend(!0, {}, d.userOptions));
                var j = g(i, d.noMasksCache);
                void 0 !== j && (void 0 !== e.inputmask && e.inputmask.remove(),
                e.inputmask = new b,
                e.inputmask.opts = i,
                e.inputmask.noMasksCache = d.noMasksCache,
                e.inputmask.userOptions = a.extend(!0, {}, d.userOptions),
                e.inputmask.el = e,
                e.inputmask.maskset = j,
                e.inputmask.isRTL = !1,
                a.data(e, "_inputmask_opts", i),
                h({
                    action: "mask",
                    el: e
                }))
            }),
            c && c[0] ? c[0].inputmask || this : this
        },
        option: function(b) {
            return "string" == typeof b ? this.opts[b] : "object" == typeof b ? (a.extend(this.opts, b),
            a.extend(this.userOptions, b),
            this.el && (void 0 !== b.mask || void 0 !== b.alias ? this.mask(this.el) : (a.data(this.el, "_inputmask_opts", this.opts),
            h({
                action: "mask",
                el: this.el
            }))),
            this) : void 0
        },
        unmaskedvalue: function(a) {
            return h({
                action: "unmaskedvalue",
                el: this.el,
                value: a
            }, this.el && this.el.inputmask ? this.el.inputmask.maskset : g(this.opts, this.noMasksCache), this.opts)
        },
        remove: function() {
            return this.el ? (h({
                action: "remove",
                el: this.el
            }),
            this.el.inputmask = void 0,
            this.el) : void 0
        },
        getemptymask: function() {
            return h({
                action: "getemptymask"
            }, this.maskset || g(this.opts, this.noMasksCache), this.opts)
        },
        hasMaskedValue: function() {
            return !this.opts.autoUnmask
        },
        isComplete: function() {
            return h({
                action: "isComplete",
                el: this.el
            }, this.maskset || g(this.opts, this.noMasksCache), this.opts)
        },
        getmetadata: function() {
            return h({
                action: "getmetadata"
            }, this.maskset || g(this.opts, this.noMasksCache), this.opts)
        },
        isValid: function(a) {
            return h({
                action: "isValid",
                value: a
            }, this.maskset || g(this.opts, this.noMasksCache), this.opts)
        },
        format: function(a, b) {
            return h({
                action: "format",
                value: a,
                metadata: b
            }, this.maskset || g(this.opts, this.noMasksCache), this.opts)
        }
    },
    b.extendDefaults = function(c) {
        a.extend(!0, b.prototype.defaults, c)
    }
    ,
    b.extendDefinitions = function(c) {
        a.extend(!0, b.prototype.defaults.definitions, c)
    }
    ,
    b.extendAliases = function(c) {
        a.extend(!0, b.prototype.defaults.aliases, c)
    }
    ,
    b.format = function(a, c, d) {
        return b(c).format(a, d)
    }
    ,
    b.unmask = function(a, c) {
        return b(c).unmaskedvalue(a)
    }
    ,
    b.isValid = function(a, c) {
        return b(c).isValid(a)
    }
    ,
    b.remove = function(b) {
        a.each(b, function(a, b) {
            b.inputmask && b.inputmask.remove()
        })
    }
    ,
    b.escapeRegex = function(a) {
        var b = ["/", ".", "*", "+", "?", "|", "(", ")", "[", "]", "{", "}", "\\", "$", "^"];
        return a.replace(new RegExp("(\\" + b.join("|\\") + ")","gim"), "\\$1")
    }
    ,
    b.keyCode = {
        ALT: 18,
        BACKSPACE: 8,
        BACKSPACE_SAFARI: 127,
        CAPS_LOCK: 20,
        COMMA: 188,
        COMMAND: 91,
        COMMAND_LEFT: 91,
        COMMAND_RIGHT: 93,
        CONTROL: 17,
        DELETE: 46,
        DOWN: 40,
        END: 35,
        ENTER: 13,
        ESCAPE: 27,
        HOME: 36,
        INSERT: 45,
        LEFT: 37,
        MENU: 93,
        NUMPAD_ADD: 107,
        NUMPAD_DECIMAL: 110,
        NUMPAD_DIVIDE: 111,
        NUMPAD_ENTER: 108,
        NUMPAD_MULTIPLY: 106,
        NUMPAD_SUBTRACT: 109,
        PAGE_DOWN: 34,
        PAGE_UP: 33,
        PERIOD: 190,
        RIGHT: 39,
        SHIFT: 16,
        SPACE: 32,
        TAB: 9,
        UP: 38,
        WINDOWS: 91,
        X: 88
    };
    var i = navigator.userAgent
      , j = /mobile/i.test(i)
      , k = /iemobile/i.test(i)
      , l = /iphone/i.test(i) && !k;
    /android.*safari.*/i.test(i) && !k;
    return window.Inputmask = b,
    b
}(jQuery),
function(a, b) {
    return void 0 === a.fn.inputmask && (a.fn.inputmask = function(c, d) {
        var e, f = this[0];
        if (void 0 === d && (d = {}),
        "string" == typeof c)
            switch (c) {
            case "unmaskedvalue":
                return f && f.inputmask ? f.inputmask.unmaskedvalue() : a(f).val();
            case "remove":
                return this.each(function() {
                    this.inputmask && this.inputmask.remove()
                });
            case "getemptymask":
                return f && f.inputmask ? f.inputmask.getemptymask() : "";
            case "hasMaskedValue":
                return f && f.inputmask ? f.inputmask.hasMaskedValue() : !1;
            case "isComplete":
                return f && f.inputmask ? f.inputmask.isComplete() : !0;
            case "getmetadata":
                return f && f.inputmask ? f.inputmask.getmetadata() : void 0;
            case "setvalue":
                a(f).val(d),
                f && void 0 !== f.inputmask && a(f).triggerHandler("setvalue");
                break;
            case "option":
                if ("string" != typeof d)
                    return this.each(function() {
                        return void 0 !== this.inputmask ? this.inputmask.option(d) : void 0
                    });
                if (f && void 0 !== f.inputmask)
                    return f.inputmask.option(d);
                break;
            default:
                return d.alias = c,
                e = new b(d),
                this.each(function() {
                    e.mask(this)
                })
            }
        else {
            if ("object" == typeof c)
                return e = new b(c),
                void 0 === c.mask && void 0 === c.alias ? this.each(function() {
                    return void 0 !== this.inputmask ? this.inputmask.option(c) : void e.mask(this)
                }) : this.each(function() {
                    e.mask(this)
                });
            if (void 0 === c)
                return this.each(function() {
                    e = new b(d),
                    e.mask(this)
                })
        }
    }
    ),
    a.fn.inputmask
}(jQuery, Inputmask),
function(a, b) {
    return b.extendDefinitions({
        h: {
            validator: "[01][0-9]|2[0-3]",
            cardinality: 2,
            prevalidator: [{
                validator: "[0-2]",
                cardinality: 1
            }]
        },
        s: {
            validator: "[0-5][0-9]",
            cardinality: 2,
            prevalidator: [{
                validator: "[0-5]",
                cardinality: 1
            }]
        },
        d: {
            validator: "0[1-9]|[12][0-9]|3[01]",
            cardinality: 2,
            prevalidator: [{
                validator: "[0-3]",
                cardinality: 1
            }]
        },
        m: {
            validator: "0[1-9]|1[012]",
            cardinality: 2,
            prevalidator: [{
                validator: "[01]",
                cardinality: 1
            }]
        },
        y: {
            validator: "(19|20)\\d{2}",
            cardinality: 4,
            prevalidator: [{
                validator: "[12]",
                cardinality: 1
            }, {
                validator: "(19|20)",
                cardinality: 2
            }, {
                validator: "(19|20)\\d",
                cardinality: 3
            }]
        }
    }),
    b.extendAliases({
        "dd/mm/yyyy": {
            mask: "1/2/y",
            placeholder: "dd/mm/yyyy",
            regex: {
                val1pre: new RegExp("[0-3]"),
                val1: new RegExp("0[1-9]|[12][0-9]|3[01]"),
                val2pre: function(a) {
                    var c = b.escapeRegex.call(this, a);
                    return new RegExp("((0[1-9]|[12][0-9]|3[01])" + c + "[01])")
                },
                val2: function(a) {
                    var c = b.escapeRegex.call(this, a);
                    return new RegExp("((0[1-9]|[12][0-9])" + c + "(0[1-9]|1[012]))|(30" + c + "(0[13-9]|1[012]))|(31" + c + "(0[13578]|1[02]))")
                }
            },
            leapday: "29/02/",
            separator: "/",
            yearrange: {
                minyear: 1900,
                maxyear: 2099
            },
            isInYearRange: function(a, b, c) {
                if (isNaN(a))
                    return !1;
                var d = parseInt(a.concat(b.toString().slice(a.length)))
                  , e = parseInt(a.concat(c.toString().slice(a.length)));
                return (isNaN(d) ? !1 : d >= b && c >= d) || (isNaN(e) ? !1 : e >= b && c >= e)
            },
            determinebaseyear: function(a, b, c) {
                var d = (new Date).getFullYear();
                if (a > d)
                    return a;
                if (d > b) {
                    for (var e = b.toString().slice(0, 2), f = b.toString().slice(2, 4); e + c > b; )
                        e--;
                    var g = e + f;
                    return a > g ? a : g
                }
                if (d >= a && b >= d) {
                    for (var h = d.toString().slice(0, 2); h + c > b; )
                        h--;
                    var i = h + c;
                    return a > i ? a : i
                }
                return d
            },
            onKeyDown: function(c, d, e, f) {
                var g = a(this);
                if (c.ctrlKey && c.keyCode === b.keyCode.RIGHT) {
                    var h = new Date;
                    g.val(h.getDate().toString() + (h.getMonth() + 1).toString() + h.getFullYear().toString()),
                    g.trigger("setvalue")
                }
            },
            getFrontValue: function(a, b, c) {
                for (var d = 0, e = 0, f = 0; f < a.length && "2" !== a.charAt(f); f++) {
                    var g = c.definitions[a.charAt(f)];
                    g ? (d += e,
                    e = g.cardinality) : e++
                }
                return b.join("").substr(d, e)
            },
            definitions: {
                1: {
                    validator: function(a, b, c, d, e) {
                        var f = e.regex.val1.test(a);
                        return d || f || a.charAt(1) !== e.separator && -1 === "-./".indexOf(a.charAt(1)) || !(f = e.regex.val1.test("0" + a.charAt(0))) ? f : (b.buffer[c - 1] = "0",
                        {
                            refreshFromBuffer: {
                                start: c - 1,
                                end: c
                            },
                            pos: c,
                            c: a.charAt(0)
                        })
                    },
                    cardinality: 2,
                    prevalidator: [{
                        validator: function(a, b, c, d, e) {
                            var f = a;
                            isNaN(b.buffer[c + 1]) || (f += b.buffer[c + 1]);
                            var g = 1 === f.length ? e.regex.val1pre.test(f) : e.regex.val1.test(f);
                            if (!d && !g) {
                                if (g = e.regex.val1.test(a + "0"))
                                    return b.buffer[c] = a,
                                    b.buffer[++c] = "0",
                                    {
                                        pos: c,
                                        c: "0"
                                    };
                                if (g = e.regex.val1.test("0" + a))
                                    return b.buffer[c] = "0",
                                    c++,
                                    {
                                        pos: c
                                    }
                            }
                            return g
                        },
                        cardinality: 1
                    }]
                },
                2: {
                    validator: function(a, b, c, d, e) {
                        var f = e.getFrontValue(b.mask, b.buffer, e);
                        -1 !== f.indexOf(e.placeholder[0]) && (f = "01" + e.separator);
                        var g = e.regex.val2(e.separator).test(f + a);
                        if (!d && !g && (a.charAt(1) === e.separator || -1 !== "-./".indexOf(a.charAt(1))) && (g = e.regex.val2(e.separator).test(f + "0" + a.charAt(0))))
                            return b.buffer[c - 1] = "0",
                            {
                                refreshFromBuffer: {
                                    start: c - 1,
                                    end: c
                                },
                                pos: c,
                                c: a.charAt(0)
                            };
                        if (e.mask.indexOf("2") === e.mask.length - 1 && g) {
                            var h = b.buffer.join("").substr(4, 4) + a;
                            if (h !== e.leapday)
                                return !0;
                            var i = parseInt(b.buffer.join("").substr(0, 4), 10);
                            return i % 4 === 0 ? i % 100 === 0 ? i % 400 === 0 ? !0 : !1 : !0 : !1
                        }
                        return g
                    },
                    cardinality: 2,
                    prevalidator: [{
                        validator: function(a, b, c, d, e) {
                            isNaN(b.buffer[c + 1]) || (a += b.buffer[c + 1]);
                            var f = e.getFrontValue(b.mask, b.buffer, e);
                            -1 !== f.indexOf(e.placeholder[0]) && (f = "01" + e.separator);
                            var g = 1 === a.length ? e.regex.val2pre(e.separator).test(f + a) : e.regex.val2(e.separator).test(f + a);
                            return d || g || !(g = e.regex.val2(e.separator).test(f + "0" + a)) ? g : (b.buffer[c] = "0",
                            c++,
                            {
                                pos: c
                            })
                        },
                        cardinality: 1
                    }]
                },
                y: {
                    validator: function(a, b, c, d, e) {
                        if (e.isInYearRange(a, e.yearrange.minyear, e.yearrange.maxyear)) {
                            var f = b.buffer.join("").substr(0, 6);
                            if (f !== e.leapday)
                                return !0;
                            var g = parseInt(a, 10);
                            return g % 4 === 0 ? g % 100 === 0 ? g % 400 === 0 ? !0 : !1 : !0 : !1
                        }
                        return !1
                    },
                    cardinality: 4,
                    prevalidator: [{
                        validator: function(a, b, c, d, e) {
                            var f = e.isInYearRange(a, e.yearrange.minyear, e.yearrange.maxyear);
                            if (!d && !f) {
                                var g = e.determinebaseyear(e.yearrange.minyear, e.yearrange.maxyear, a + "0").toString().slice(0, 1);
                                if (f = e.isInYearRange(g + a, e.yearrange.minyear, e.yearrange.maxyear))
                                    return b.buffer[c++] = g.charAt(0),
                                    {
                                        pos: c
                                    };
                                if (g = e.determinebaseyear(e.yearrange.minyear, e.yearrange.maxyear, a + "0").toString().slice(0, 2),
                                f = e.isInYearRange(g + a, e.yearrange.minyear, e.yearrange.maxyear))
                                    return b.buffer[c++] = g.charAt(0),
                                    b.buffer[c++] = g.charAt(1),
                                    {
                                        pos: c
                                    }
                            }
                            return f
                        },
                        cardinality: 1
                    }, {
                        validator: function(a, b, c, d, e) {
                            var f = e.isInYearRange(a, e.yearrange.minyear, e.yearrange.maxyear);
                            if (!d && !f) {
                                var g = e.determinebaseyear(e.yearrange.minyear, e.yearrange.maxyear, a).toString().slice(0, 2);
                                if (f = e.isInYearRange(a[0] + g[1] + a[1], e.yearrange.minyear, e.yearrange.maxyear))
                                    return b.buffer[c++] = g.charAt(1),
                                    {
                                        pos: c
                                    };
                                if (g = e.determinebaseyear(e.yearrange.minyear, e.yearrange.maxyear, a).toString().slice(0, 2),
                                e.isInYearRange(g + a, e.yearrange.minyear, e.yearrange.maxyear)) {
                                    var h = b.buffer.join("").substr(0, 6);
                                    if (h !== e.leapday)
                                        f = !0;
                                    else {
                                        var i = parseInt(a, 10);
                                        f = i % 4 === 0 ? i % 100 === 0 ? i % 400 === 0 ? !0 : !1 : !0 : !1
                                    }
                                } else
                                    f = !1;
                                if (f)
                                    return b.buffer[c - 1] = g.charAt(0),
                                    b.buffer[c++] = g.charAt(1),
                                    b.buffer[c++] = a.charAt(0),
                                    {
                                        refreshFromBuffer: {
                                            start: c - 3,
                                            end: c
                                        },
                                        pos: c
                                    }
                            }
                            return f
                        },
                        cardinality: 2
                    }, {
                        validator: function(a, b, c, d, e) {
                            return e.isInYearRange(a, e.yearrange.minyear, e.yearrange.maxyear)
                        },
                        cardinality: 3
                    }]
                }
            },
            insertMode: !1,
            autoUnmask: !1
        },
        "mm/dd/yyyy": {
            placeholder: "mm/dd/yyyy",
            alias: "dd/mm/yyyy",
            regex: {
                val2pre: function(a) {
                    var c = b.escapeRegex.call(this, a);
                    return new RegExp("((0[13-9]|1[012])" + c + "[0-3])|(02" + c + "[0-2])")
                },
                val2: function(a) {
                    var c = b.escapeRegex.call(this, a);
                    return new RegExp("((0[1-9]|1[012])" + c + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + c + "30)|((0[13578]|1[02])" + c + "31)")
                },
                val1pre: new RegExp("[01]"),
                val1: new RegExp("0[1-9]|1[012]")
            },
            leapday: "02/29/",
            onKeyDown: function(c, d, e, f) {
                var g = a(this);
                if (c.ctrlKey && c.keyCode === b.keyCode.RIGHT) {
                    var h = new Date;
                    g.val((h.getMonth() + 1).toString() + h.getDate().toString() + h.getFullYear().toString()),
                    g.trigger("setvalue")
                }
            }
        },
        "yyyy/mm/dd": {
            mask: "y/1/2",
            placeholder: "yyyy/mm/dd",
            alias: "mm/dd/yyyy",
            leapday: "/02/29",
            onKeyDown: function(c, d, e, f) {
                var g = a(this);
                if (c.ctrlKey && c.keyCode === b.keyCode.RIGHT) {
                    var h = new Date;
                    g.val(h.getFullYear().toString() + (h.getMonth() + 1).toString() + h.getDate().toString()),
                    g.trigger("setvalue")
                }
            }
        },
        "dd.mm.yyyy": {
            mask: "1.2.y",
            placeholder: "dd.mm.yyyy",
            leapday: "29.02.",
            separator: ".",
            alias: "dd/mm/yyyy"
        },
        "dd-mm-yyyy": {
            mask: "1-2-y",
            placeholder: "dd-mm-yyyy",
            leapday: "29-02-",
            separator: "-",
            alias: "dd/mm/yyyy"
        },
        "mm.dd.yyyy": {
            mask: "1.2.y",
            placeholder: "mm.dd.yyyy",
            leapday: "02.29.",
            separator: ".",
            alias: "mm/dd/yyyy"
        },
        "mm-dd-yyyy": {
            mask: "1-2-y",
            placeholder: "mm-dd-yyyy",
            leapday: "02-29-",
            separator: "-",
            alias: "mm/dd/yyyy"
        },
        "yyyy.mm.dd": {
            mask: "y.1.2",
            placeholder: "yyyy.mm.dd",
            leapday: ".02.29",
            separator: ".",
            alias: "yyyy/mm/dd"
        },
        "yyyy-mm-dd": {
            mask: "y-1-2",
            placeholder: "yyyy-mm-dd",
            leapday: "-02-29",
            separator: "-",
            alias: "yyyy/mm/dd"
        },
        datetime: {
            mask: "1/2/y h:s",
            placeholder: "dd/mm/yyyy hh:mm",
            alias: "dd/mm/yyyy",
            regex: {
                hrspre: new RegExp("[012]"),
                hrs24: new RegExp("2[0-4]|1[3-9]"),
                hrs: new RegExp("[01][0-9]|2[0-4]"),
                ampm: new RegExp("^[a|p|A|P][m|M]"),
                mspre: new RegExp("[0-5]"),
                ms: new RegExp("[0-5][0-9]")
            },
            timeseparator: ":",
            hourFormat: "24",
            definitions: {
                h: {
                    validator: function(a, b, c, d, e) {
                        if ("24" === e.hourFormat && 24 === parseInt(a, 10))
                            return b.buffer[c - 1] = "0",
                            b.buffer[c] = "0",
                            {
                                refreshFromBuffer: {
                                    start: c - 1,
                                    end: c
                                },
                                c: "0"
                            };
                        var f = e.regex.hrs.test(a);
                        if (!d && !f && (a.charAt(1) === e.timeseparator || -1 !== "-.:".indexOf(a.charAt(1))) && (f = e.regex.hrs.test("0" + a.charAt(0))))
                            return b.buffer[c - 1] = "0",
                            b.buffer[c] = a.charAt(0),
                            c++,
                            {
                                refreshFromBuffer: {
                                    start: c - 2,
                                    end: c
                                },
                                pos: c,
                                c: e.timeseparator
                            };
                        if (f && "24" !== e.hourFormat && e.regex.hrs24.test(a)) {
                            var g = parseInt(a, 10);
                            return 24 === g ? (b.buffer[c + 5] = "a",
                            b.buffer[c + 6] = "m") : (b.buffer[c + 5] = "p",
                            b.buffer[c + 6] = "m"),
                            g -= 12,
                            10 > g ? (b.buffer[c] = g.toString(),
                            b.buffer[c - 1] = "0") : (b.buffer[c] = g.toString().charAt(1),
                            b.buffer[c - 1] = g.toString().charAt(0)),
                            {
                                refreshFromBuffer: {
                                    start: c - 1,
                                    end: c + 6
                                },
                                c: b.buffer[c]
                            }
                        }
                        return f
                    },
                    cardinality: 2,
                    prevalidator: [{
                        validator: function(a, b, c, d, e) {
                            var f = e.regex.hrspre.test(a);
                            return d || f || !(f = e.regex.hrs.test("0" + a)) ? f : (b.buffer[c] = "0",
                            c++,
                            {
                                pos: c
                            })
                        },
                        cardinality: 1
                    }]
                },
                s: {
                    validator: "[0-5][0-9]",
                    cardinality: 2,
                    prevalidator: [{
                        validator: function(a, b, c, d, e) {
                            var f = e.regex.mspre.test(a);
                            return d || f || !(f = e.regex.ms.test("0" + a)) ? f : (b.buffer[c] = "0",
                            c++,
                            {
                                pos: c
                            })
                        },
                        cardinality: 1
                    }]
                },
                t: {
                    validator: function(a, b, c, d, e) {
                        return e.regex.ampm.test(a + "m")
                    },
                    casing: "lower",
                    cardinality: 1
                }
            },
            insertMode: !1,
            autoUnmask: !1
        },
        datetime12: {
            mask: "1/2/y h:s t\\m",
            placeholder: "dd/mm/yyyy hh:mm xm",
            alias: "datetime",
            hourFormat: "12"
        },
        "mm/dd/yyyy hh:mm xm": {
            mask: "1/2/y h:s t\\m",
            placeholder: "mm/dd/yyyy hh:mm xm",
            alias: "datetime12",
            regex: {
                val2pre: function(a) {
                    var c = b.escapeRegex.call(this, a);
                    return new RegExp("((0[13-9]|1[012])" + c + "[0-3])|(02" + c + "[0-2])")
                },
                val2: function(a) {
                    var c = b.escapeRegex.call(this, a);
                    return new RegExp("((0[1-9]|1[012])" + c + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + c + "30)|((0[13578]|1[02])" + c + "31)")
                },
                val1pre: new RegExp("[01]"),
                val1: new RegExp("0[1-9]|1[012]")
            },
            leapday: "02/29/",
            onKeyDown: function(c, d, e, f) {
                var g = a(this);
                if (c.ctrlKey && c.keyCode === b.keyCode.RIGHT) {
                    var h = new Date;
                    g.val((h.getMonth() + 1).toString() + h.getDate().toString() + h.getFullYear().toString()),
                    g.trigger("setvalue")
                }
            }
        },
        "hh:mm t": {
            mask: "h:s t\\m",
            placeholder: "hh:mm xm",
            alias: "datetime",
            hourFormat: "12"
        },
        "h:s t": {
            mask: "h:s t\\m",
            placeholder: "hh:mm xm",
            alias: "datetime",
            hourFormat: "12"
        },
        "hh:mm:ss": {
            mask: "h:s:s",
            placeholder: "hh:mm:ss",
            alias: "datetime",
            autoUnmask: !1
        },
        "hh:mm": {
            mask: "h:s",
            placeholder: "hh:mm",
            alias: "datetime",
            autoUnmask: !1
        },
        date: {
            alias: "dd/mm/yyyy"
        },
        "mm/yyyy": {
            mask: "1/y",
            placeholder: "mm/yyyy",
            leapday: "donotuse",
            separator: "/",
            alias: "mm/dd/yyyy"
        },
        shamsi: {
            regex: {
                val2pre: function(a) {
                    var c = b.escapeRegex.call(this, a);
                    return new RegExp("((0[1-9]|1[012])" + c + "[0-3])")
                },
                val2: function(a) {
                    var c = b.escapeRegex.call(this, a);
                    return new RegExp("((0[1-9]|1[012])" + c + "(0[1-9]|[12][0-9]))|((0[1-9]|1[012])" + c + "30)|((0[1-6])" + c + "31)")
                },
                val1pre: new RegExp("[01]"),
                val1: new RegExp("0[1-9]|1[012]")
            },
            yearrange: {
                minyear: 1300,
                maxyear: 1499
            },
            mask: "y/1/2",
            leapday: "/12/30",
            placeholder: "yyyy/mm/dd",
            alias: "mm/dd/yyyy",
            clearIncomplete: !0
        }
    }),
    b
}(jQuery, Inputmask),
function(a, b) {
    return b.extendDefinitions({
        A: {
            validator: "[A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
            cardinality: 1,
            casing: "upper"
        },
        "&": {
            validator: "[0-9A-Za-z\u0410-\u044f\u0401\u0451\xc0-\xff\xb5]",
            cardinality: 1,
            casing: "upper"
        },
        "#": {
            validator: "[0-9A-Fa-f]",
            cardinality: 1,
            casing: "upper"
        }
    }),
    b.extendAliases({
        url: {
            definitions: {
                i: {
                    validator: ".",
                    cardinality: 1
                }
            },
            mask: "(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",
            insertMode: !1,
            autoUnmask: !1
        },
        ip: {
            mask: "i[i[i]].i[i[i]].i[i[i]].i[i[i]]",
            definitions: {
                i: {
                    validator: function(a, b, c, d, e) {
                        return c - 1 > -1 && "." !== b.buffer[c - 1] ? (a = b.buffer[c - 1] + a,
                        a = c - 2 > -1 && "." !== b.buffer[c - 2] ? b.buffer[c - 2] + a : "0" + a) : a = "00" + a,
                        new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(a)
                    },
                    cardinality: 1
                }
            },
            onUnMask: function(a, b, c) {
                return a
            }
        },
        email: {
            mask: "*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}[.-{1,63}][.-{1,63}][.-{1,63}]",
            greedy: !1,
            onBeforePaste: function(a, b) {
                return a = a.toLowerCase(),
                a.replace("mailto:", "")
            },
            definitions: {
                "*": {
                    validator: "[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",
                    cardinality: 1,
                    casing: "lower"
                },
                "-": {
                    validator: "[0-9A-Za-z-]",
                    cardinality: 1,
                    casing: "lower"
                }
            },
            onUnMask: function(a, b, c) {
                return a
            }
        },
        mac: {
            mask: "##:##:##:##:##:##"
        },
        vin: {
            mask: "V{13}9{4}",
            definitions: {
                V: {
                    validator: "[A-HJ-NPR-Za-hj-npr-z\\d]",
                    cardinality: 1,
                    casing: "upper"
                }
            },
            clearIncomplete: !0,
            autoUnmask: !0
        }
    }),
    b
}(jQuery, Inputmask),
function(a, b) {
    return b.extendAliases({
        numeric: {
            mask: function(a) {
                function b(b) {
                    for (var c = "", d = 0; d < b.length; d++)
                        c += a.definitions[b.charAt(d)] || a.optionalmarker.start === b.charAt(d) || a.optionalmarker.end === b.charAt(d) || a.quantifiermarker.start === b.charAt(d) || a.quantifiermarker.end === b.charAt(d) || a.groupmarker.start === b.charAt(d) || a.groupmarker.end === b.charAt(d) || a.alternatormarker === b.charAt(d) ? "\\" + b.charAt(d) : b.charAt(d);
                    return c
                }
                if (0 !== a.repeat && isNaN(a.integerDigits) && (a.integerDigits = a.repeat),
                a.repeat = 0,
                a.groupSeparator === a.radixPoint && ("." === a.radixPoint ? a.groupSeparator = "," : "," === a.radixPoint ? a.groupSeparator = "." : a.groupSeparator = ""),
                " " === a.groupSeparator && (a.skipOptionalPartCharacter = void 0),
                a.autoGroup = a.autoGroup && "" !== a.groupSeparator,
                a.autoGroup && ("string" == typeof a.groupSize && isFinite(a.groupSize) && (a.groupSize = parseInt(a.groupSize)),
                isFinite(a.integerDigits))) {
                    var c = Math.floor(a.integerDigits / a.groupSize)
                      , d = a.integerDigits % a.groupSize;
                    a.integerDigits = parseInt(a.integerDigits) + (0 === d ? c - 1 : c),
                    a.integerDigits < 1 && (a.integerDigits = "*")
                }
                a.placeholder.length > 1 && (a.placeholder = a.placeholder.charAt(0)),
                a.radixFocus = a.radixFocus && "" !== a.placeholder && a.integerOptional === !0,
                a.definitions[";"] = a.definitions["~"],
                a.definitions[";"].definitionSymbol = "~",
                a.numericInput === !0 && (a.radixFocus = !1,
                a.digitsOptional = !1,
                isNaN(a.digits) && (a.digits = 2),
                a.decimalProtect = !1);
                var e = b(a.prefix);
                return e += "[+]",
                e += a.integerOptional === !0 ? "~{1," + a.integerDigits + "}" : "~{" + a.integerDigits + "}",
                void 0 !== a.digits && (isNaN(a.digits) || parseInt(a.digits) > 0) && (a.decimalProtect && (a.radixPointDefinitionSymbol = ":"),
                e += a.digitsOptional ? "[" + (a.decimalProtect ? ":" : a.radixPoint) + ";{1," + a.digits + "}]" : (a.decimalProtect ? ":" : a.radixPoint) + ";{" + a.digits + "}"),
                e += "[-]",
                e += b(a.suffix),
                a.greedy = !1,
                e
            },
            placeholder: "",
            greedy: !1,
            digits: "*",
            digitsOptional: !0,
            radixPoint: ".",
            radixFocus: !0,
            groupSize: 3,
            groupSeparator: "",
            autoGroup: !1,
            allowPlus: !0,
            allowMinus: !0,
            negationSymbol: {
                front: "-",
                back: ""
            },
            integerDigits: "+",
            integerOptional: !0,
            prefix: "",
            suffix: "",
            rightAlign: !0,
            decimalProtect: !0,
            min: null,
            max: null,
            step: 1,
            insertMode: !0,
            autoUnmask: !1,
            unmaskAsNumber: !1,
            postFormat: function(c, d, e) {
                e.numericInput === !0 && (c = c.reverse(),
                isFinite(d) && (d = c.join("").length - d - 1));
                var f, g, h = !1;
                c.length >= e.suffix.length && c.join("").indexOf(e.suffix) === c.length - e.suffix.length && (c.length = c.length - e.suffix.length,
                h = !0),
                d = d >= c.length ? c.length - 1 : d < e.prefix.length ? e.prefix.length : d;
                var i = !1
                  , j = c[d]
                  , k = c.slice();
                j === e.groupSeparator && (k.splice(d--, 1),
                j = k[d]),
                j !== e.radixPoint && j !== e.negationSymbol.front && j !== e.negationSymbol.back && (k[d] = "?");
                var l = k.join("")
                  , m = l;
                if (l.length > 0 && e.autoGroup || -1 !== l.indexOf(e.groupSeparator)) {
                    var n = b.escapeRegex(e.groupSeparator);
                    i = 0 === l.indexOf(e.groupSeparator),
                    l = l.replace(new RegExp(n,"g"), "");
                    var o = l.split(e.radixPoint);
                    if (l = "" === e.radixPoint ? l : o[0],
                    l !== e.prefix + "?0" && l.length >= e.groupSize + e.prefix.length)
                        for (var p = new RegExp("([-+]?[\\d?]+)([\\d?]{" + e.groupSize + "})"); p.test(l) && "" !== e.groupSeparator; )
                            l = l.replace(p, "$1" + e.groupSeparator + "$2"),
                            l = l.replace(e.groupSeparator + e.groupSeparator, e.groupSeparator);
                    "" !== e.radixPoint && o.length > 1 && (l += e.radixPoint + o[1])
                }
                for (i = m !== l,
                c.length = l.length,
                f = 0,
                g = l.length; g > f; f++)
                    c[f] = l.charAt(f);
                var q = a.inArray("?", c);
                if (-1 === q && (q = a.inArray(j, c)),
                c[q] = j,
                !i && h)
                    for (f = 0,
                    g = e.suffix.length; g > f; f++)
                        c.push(e.suffix.charAt(f));
                return q = e.numericInput && isFinite(d) ? c.join("").length - q - 1 : q,
                e.numericInput && (c = c.reverse(),
                a.inArray(e.radixPoint, c) < q && c.join("").length - e.suffix.length !== q && (q -= 1)),
                {
                    pos: q,
                    refreshFromBuffer: i,
                    buffer: c
                }
            },
            onBeforeWrite: function(c, d, e, f) {
                var g;
                if (c && ("blur" === c.type || "checkval" === c.type || "keydown" === c.type)) {
                    var h = f.numericInput ? d.slice().reverse().join("") : d.join("")
                      , i = h.replace(f.prefix, "");
                    i = i.replace(f.suffix, ""),
                    i = i.replace(new RegExp(b.escapeRegex(f.groupSeparator),"g"), ""),
                    "," === f.radixPoint && (i = i.replace(f.radixPoint, "."));
                    var j = i.match(new RegExp("[-" + b.escapeRegex(f.negationSymbol.front) + "]","g"));
                    if (j = null !== j && 1 === j.length,
                    i = i.replace(new RegExp("[-" + b.escapeRegex(f.negationSymbol.front) + "]","g"), ""),
                    i = i.replace(new RegExp(b.escapeRegex(f.negationSymbol.back) + "$"), ""),
                    i = i === f.negationSymbol.front ? i + "0" : i,
                    "" !== i && isFinite(i)) {
                        var k = parseFloat(i)
                          , l = j ? -1 * k : k;
                        if (null !== f.min && isFinite(f.min) && l < parseFloat(f.min) ? (k = Math.abs(f.min),
                        j = f.min < 0) : null !== f.max && isFinite(f.max) && l > parseFloat(f.max) && (k = Math.abs(f.max),
                        j = f.max < 0),
                        i = k.toString().replace(".", f.radixPoint).split(""),
                        isFinite(f.digits)) {
                            var m = a.inArray(f.radixPoint, i)
                              , n = a.inArray(f.radixPoint, h);
                            -1 === m && (i.push(f.radixPoint),
                            m = i.length - 1);
                            for (var o = 1; o <= f.digits; o++)
                                f.digitsOptional || void 0 !== i[m + o] && i[m + o] !== f.placeholder.charAt(0) ? -1 !== n && void 0 !== h[n + o] && (i[m + o] = i[m + o] || h[n + o]) : i[m + o] = "0";
                            i[i.length - 1] === f.radixPoint && delete i[i.length - 1]
                        }
                        if (k.toString() !== i && k.toString() + "." !== i || j)
                            return !j || 0 === k && "blur" === c.type || (i.unshift(f.negationSymbol.front),
                            i.push(f.negationSymbol.back)),
                            i = (f.prefix + i.join("")).split(""),
                            f.numericInput && (i = i.reverse()),
                            g = f.postFormat(i, f.numericInput ? e : e - 1, f),
                            g.buffer && (g.refreshFromBuffer = g.buffer.join("") !== d.join("")),
                            g
                    }
                }
                return f.autoGroup ? (g = f.postFormat(d, f.numericInput ? e : e - 1, f),
                g.caret = e <= f.prefix.length ? g.pos : g.pos + 1,
                g) : void 0
            },
            regex: {
                integerPart: function(a) {
                    return new RegExp("[" + b.escapeRegex(a.negationSymbol.front) + "+]?\\d+")
                },
                integerNPart: function(a) {
                    return new RegExp("[\\d" + b.escapeRegex(a.groupSeparator) + b.escapeRegex(a.placeholder.charAt(0)) + "]+")
                }
            },
            signHandler: function(a, b, c, d, e) {
                if (!d && e.allowMinus && "-" === a || e.allowPlus && "+" === a) {
                    var f = b.buffer.join("").match(e.regex.integerPart(e));
                    if (f && f[0].length > 0)
                        return b.buffer[f.index] === ("-" === a ? "+" : e.negationSymbol.front) ? "-" === a ? "" !== e.negationSymbol.back ? {
                            pos: f.index,
                            c: e.negationSymbol.front,
                            remove: f.index,
                            caret: c,
                            insert: {
                                pos: b.buffer.length - e.suffix.length - 1,
                                c: e.negationSymbol.back
                            }
                        } : {
                            pos: f.index,
                            c: e.negationSymbol.front,
                            remove: f.index,
                            caret: c
                        } : "" !== e.negationSymbol.back ? {
                            pos: f.index,
                            c: "+",
                            remove: [f.index, b.buffer.length - e.suffix.length - 1],
                            caret: c
                        } : {
                            pos: f.index,
                            c: "+",
                            remove: f.index,
                            caret: c
                        } : b.buffer[f.index] === ("-" === a ? e.negationSymbol.front : "+") ? "-" === a && "" !== e.negationSymbol.back ? {
                            remove: [f.index, b.buffer.length - e.suffix.length - 1],
                            caret: c - 1
                        } : {
                            remove: f.index,
                            caret: c - 1
                        } : "-" === a ? "" !== e.negationSymbol.back ? {
                            pos: f.index,
                            c: e.negationSymbol.front,
                            caret: c + 1,
                            insert: {
                                pos: b.buffer.length - e.suffix.length,
                                c: e.negationSymbol.back
                            }
                        } : {
                            pos: f.index,
                            c: e.negationSymbol.front,
                            caret: c + 1
                        } : {
                            pos: f.index,
                            c: a,
                            caret: c + 1
                        }
                }
                return !1
            },
            radixHandler: function(b, c, d, e, f) {
                if (!e && f.numericInput !== !0 && b === f.radixPoint && void 0 !== f.digits && (isNaN(f.digits) || parseInt(f.digits) > 0)) {
                    var g = a.inArray(f.radixPoint, c.buffer)
                      , h = c.buffer.join("").match(f.regex.integerPart(f));
                    if (-1 !== g && c.validPositions[g])
                        return c.validPositions[g - 1] ? {
                            caret: g + 1
                        } : {
                            pos: h.index,
                            c: h[0],
                            caret: g + 1
                        };
                    if (!h || "0" === h[0] && h.index + 1 !== d)
                        return c.buffer[h ? h.index : d] = "0",
                        {
                            pos: (h ? h.index : d) + 1,
                            c: f.radixPoint
                        }
                }
                return !1
            },
            leadingZeroHandler: function(b, c, d, e, f, g) {
                if (!e)
                    if (f.numericInput === !0) {
                        var h = c.buffer.slice("").reverse()
                          , i = h[f.prefix.length];
                        if ("0" === i)
                            return {
                                pos: d,
                                remove: h.length - f.prefix.length - 1
                            }
                    } else {
                        var j = a.inArray(f.radixPoint, c.buffer)
                          , k = c.buffer.slice(0, -1 !== j ? j : void 0).join("").match(f.regex.integerNPart(f));
                        if (k && (-1 === j || j >= d)) {
                            var l = -1 === j ? 0 : parseInt(c.buffer.slice(j + 1).join(""));
                            if (0 === k[0].indexOf("" !== f.placeholder ? f.placeholder.charAt(0) : "0") && (k.index + 1 === d || g !== !0 && 0 === l))
                                return c.buffer.splice(k.index, 1),
                                d = k.index,
                                {
                                    pos: d,
                                    remove: k.index
                                };
                            if ("0" === b && d <= k.index && k[0] !== f.groupSeparator)
                                return !1
                        }
                    }
                return !0
            },
            definitions: {
                "~": {
                    validator: function(c, d, e, f, g, h) {
                        var i = g.signHandler(c, d, e, f, g);
                        if (!i && (i = g.radixHandler(c, d, e, f, g),
                        !i && (i = f ? new RegExp("[0-9" + b.escapeRegex(g.groupSeparator) + "]").test(c) : new RegExp("[0-9]").test(c),
                        i === !0 && (i = g.leadingZeroHandler(c, d, e, f, g, h),
                        i === !0)))) {
                            var j = a.inArray(g.radixPoint, d.buffer);
                            i = -1 !== j && (g.digitsOptional === !1 || d.validPositions[e]) && g.numericInput !== !0 && e > j && !f ? {
                                pos: e,
                                remove: e
                            } : {
                                pos: e
                            }
                        }
                        return i
                    },
                    cardinality: 1
                },
                "+": {
                    validator: function(a, b, c, d, e) {
                        var f = e.signHandler(a, b, c, d, e);
                        return !f && (d && e.allowMinus && a === e.negationSymbol.front || e.allowMinus && "-" === a || e.allowPlus && "+" === a) && (f = d || "-" !== a ? !0 : "" !== e.negationSymbol.back ? {
                            pos: c,
                            c: "-" === a ? e.negationSymbol.front : "+",
                            caret: c + 1,
                            insert: {
                                pos: b.buffer.length,
                                c: e.negationSymbol.back
                            }
                        } : {
                            pos: c,
                            c: "-" === a ? e.negationSymbol.front : "+",
                            caret: c + 1
                        }),
                        f
                    },
                    cardinality: 1,
                    placeholder: ""
                },
                "-": {
                    validator: function(a, b, c, d, e) {
                        var f = e.signHandler(a, b, c, d, e);
                        return !f && d && e.allowMinus && a === e.negationSymbol.back && (f = !0),
                        f
                    },
                    cardinality: 1,
                    placeholder: ""
                },
                ":": {
                    validator: function(a, c, d, e, f) {
                        var g = f.signHandler(a, c, d, e, f);
                        if (!g) {
                            var h = "[" + b.escapeRegex(f.radixPoint) + "]";
                            g = new RegExp(h).test(a),
                            g && c.validPositions[d] && c.validPositions[d].match.placeholder === f.radixPoint && (g = {
                                caret: d + 1
                            })
                        }
                        return g ? {
                            c: f.radixPoint
                        } : g
                    },
                    cardinality: 1,
                    placeholder: function(a) {
                        return a.radixPoint
                    }
                }
            },
            onUnMask: function(a, c, d) {
                var e = a.replace(d.prefix, "");
                return e = e.replace(d.suffix, ""),
                e = e.replace(new RegExp(b.escapeRegex(d.groupSeparator),"g"), ""),
                d.unmaskAsNumber ? ("" !== d.radixPoint && -1 !== e.indexOf(d.radixPoint) && (e = e.replace(b.escapeRegex.call(this, d.radixPoint), ".")),
                Number(e)) : e
            },
            isComplete: function(a, c) {
                var d = a.join("")
                  , e = a.slice();
                if (c.postFormat(e, 0, c),
                e.join("") !== d)
                    return !1;
                var f = d.replace(c.prefix, "");
                return f = f.replace(c.suffix, ""),
                f = f.replace(new RegExp(b.escapeRegex(c.groupSeparator),"g"), ""),
                "," === c.radixPoint && (f = f.replace(b.escapeRegex(c.radixPoint), ".")),
                isFinite(f)
            },
            onBeforeMask: function(a, c) {
                if ("" !== c.radixPoint && isFinite(a))
                    a = a.toString().replace(".", c.radixPoint);
                else {
                    var d = a.match(/,/g)
                      , e = a.match(/\./g);
                    e && d ? e.length > d.length ? (a = a.replace(/\./g, ""),
                    a = a.replace(",", c.radixPoint)) : d.length > e.length ? (a = a.replace(/,/g, ""),
                    a = a.replace(".", c.radixPoint)) : a = a.indexOf(".") < a.indexOf(",") ? a.replace(/\./g, "") : a = a.replace(/,/g, "") : a = a.replace(new RegExp(b.escapeRegex(c.groupSeparator),"g"), "")
                }
                if (0 === c.digits && (-1 !== a.indexOf(".") ? a = a.substring(0, a.indexOf(".")) : -1 !== a.indexOf(",") && (a = a.substring(0, a.indexOf(",")))),
                "" !== c.radixPoint && isFinite(c.digits) && -1 !== a.indexOf(c.radixPoint)) {
                    var f = a.split(c.radixPoint)
                      , g = f[1].match(new RegExp("\\d*"))[0];
                    if (parseInt(c.digits) < g.toString().length) {
                        var h = Math.pow(10, parseInt(c.digits));
                        a = a.replace(b.escapeRegex(c.radixPoint), "."),
                        a = Math.round(parseFloat(a) * h) / h,
                        a = a.toString().replace(".", c.radixPoint)
                    }
                }
                return a.toString()
            },
            canClearPosition: function(a, b, c, d, e) {
                var f = a.validPositions[b].input
                  , g = f !== e.radixPoint || null !== a.validPositions[b].match.fn && e.decimalProtect === !1 || isFinite(f) || b === c || f === e.groupSeparator || f === e.negationSymbol.front || f === e.negationSymbol.back;
                return g
            },
            onKeyDown: function(c, d, e, f) {
                var g = a(this);
                if (c.ctrlKey)
                    switch (c.keyCode) {
                    case b.keyCode.UP:
                        g.val(parseFloat(this.inputmask.unmaskedvalue()) + parseInt(f.step)),
                        g.trigger("setvalue");
                        break;
                    case b.keyCode.DOWN:
                        g.val(parseFloat(this.inputmask.unmaskedvalue()) - parseInt(f.step)),
                        g.trigger("setvalue")
                    }
            }
        },
        currency: {
            prefix: "$ ",
            groupSeparator: ",",
            alias: "numeric",
            placeholder: "0",
            autoGroup: !0,
            digits: 2,
            digitsOptional: !1,
            clearMaskOnLostFocus: !1
        },
        decimal: {
            alias: "numeric"
        },
        integer: {
            alias: "numeric",
            digits: 0,
            radixPoint: ""
        },
        percentage: {
            alias: "numeric",
            digits: 2,
            radixPoint: ".",
            placeholder: "0",
            autoGroup: !1,
            min: 0,
            max: 100,
            suffix: " %",
            allowPlus: !1,
            allowMinus: !1
        }
    }),
    b
}(jQuery, Inputmask),
function(a, b) {
    return b.extendAliases({
        phone: {
            url: "phone-codes/phone-codes.js",
            countrycode: "",
            phoneCodeCache: {},
            mask: function(b) {
                if (void 0 === b.phoneCodeCache[b.url]) {
                    var c = [];
                    b.definitions["#"] = b.definitions[9],
                    a.ajax({
                        url: b.url,
                        async: !1,
                        type: "get",
                        dataType: "json",
                        success: function(a) {
                            c = a
                        },
                        error: function(a, c, d) {
                            alert(d + " - " + b.url)
                        }
                    }),
                    b.phoneCodeCache[b.url] = c.sort(function(a, b) {
                        return (a.mask || a) < (b.mask || b) ? -1 : 1
                    })
                }
                return b.phoneCodeCache[b.url]
            },
            keepStatic: !1,
            nojumps: !0,
            nojumpsThreshold: 1,
            onBeforeMask: function(a, b) {
                var c = a.replace(/^0{1,2}/, "").replace(/[\s]/g, "");
                return (c.indexOf(b.countrycode) > 1 || -1 === c.indexOf(b.countrycode)) && (c = "+" + b.countrycode + c),
                c
            }
        },
        phonebe: {
            alias: "phone",
            url: "phone-codes/phone-be.js",
            countrycode: "32",
            nojumpsThreshold: 4
        }
    }),
    b
}(jQuery, Inputmask),
function(a, b) {
    return b.extendAliases({
        Regex: {
            mask: "r",
            greedy: !1,
            repeat: "*",
            regex: null,
            regexTokens: null,
            tokenizer: /\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,
            quantifierFilter: /[0-9]+[^,]/,
            isComplete: function(a, b) {
                return new RegExp(b.regex).test(a.join(""))
            },
            definitions: {
                r: {
                    validator: function(b, c, d, e, f) {
                        function g(a, b) {
                            this.matches = [],
                            this.isGroup = a || !1,
                            this.isQuantifier = b || !1,
                            this.quantifier = {
                                min: 1,
                                max: 1
                            },
                            this.repeaterPart = void 0
                        }
                        function h() {
                            var a, b, c = new g, d = [];
                            for (f.regexTokens = []; a = f.tokenizer.exec(f.regex); )
                                switch (b = a[0],
                                b.charAt(0)) {
                                case "(":
                                    d.push(new g(!0));
                                    break;
                                case ")":
                                    k = d.pop(),
                                    d.length > 0 ? d[d.length - 1].matches.push(k) : c.matches.push(k);
                                    break;
                                case "{":
                                case "+":
                                case "*":
                                    var e = new g(!1,!0);
                                    b = b.replace(/[{}]/g, "");
                                    var h = b.split(",")
                                      , i = isNaN(h[0]) ? h[0] : parseInt(h[0])
                                      , j = 1 === h.length ? i : isNaN(h[1]) ? h[1] : parseInt(h[1]);
                                    if (e.quantifier = {
                                        min: i,
                                        max: j
                                    },
                                    d.length > 0) {
                                        var l = d[d.length - 1].matches;
                                        a = l.pop(),
                                        a.isGroup || (k = new g(!0),
                                        k.matches.push(a),
                                        a = k),
                                        l.push(a),
                                        l.push(e)
                                    } else
                                        a = c.matches.pop(),
                                        a.isGroup || (k = new g(!0),
                                        k.matches.push(a),
                                        a = k),
                                        c.matches.push(a),
                                        c.matches.push(e);
                                    break;
                                default:
                                    d.length > 0 ? d[d.length - 1].matches.push(b) : c.matches.push(b)
                                }
                            c.matches.length > 0 && f.regexTokens.push(c)
                        }
                        function i(b, c) {
                            var d = !1;
                            c && (m += "(",
                            o++);
                            for (var e = 0; e < b.matches.length; e++) {
                                var f = b.matches[e];
                                if (f.isGroup === !0)
                                    d = i(f, !0);
                                else if (f.isQuantifier === !0) {
                                    var g = a.inArray(f, b.matches)
                                      , h = b.matches[g - 1]
                                      , k = m;
                                    if (isNaN(f.quantifier.max)) {
                                        for (; f.repeaterPart && f.repeaterPart !== m && f.repeaterPart.length > m.length && !(d = i(h, !0)); )
                                            ;
                                        d = d || i(h, !0),
                                        d && (f.repeaterPart = m),
                                        m = k + f.quantifier.max
                                    } else {
                                        for (var l = 0, n = f.quantifier.max - 1; n > l && !(d = i(h, !0)); l++)
                                            ;
                                        m = k + "{" + f.quantifier.min + "," + f.quantifier.max + "}"
                                    }
                                } else if (void 0 !== f.matches)
                                    for (var p = 0; p < f.length && !(d = i(f[p], c)); p++)
                                        ;
                                else {
                                    var q;
                                    if ("[" == f.charAt(0)) {
                                        q = m,
                                        q += f;
                                        for (var r = 0; o > r; r++)
                                            q += ")";
                                        var s = new RegExp("^(" + q + ")$");
                                        d = s.test(j)
                                    } else
                                        for (var t = 0, u = f.length; u > t; t++)
                                            if ("\\" !== f.charAt(t)) {
                                                q = m,
                                                q += f.substr(0, t + 1),
                                                q = q.replace(/\|$/, "");
                                                for (var r = 0; o > r; r++)
                                                    q += ")";
                                                var s = new RegExp("^(" + q + ")$");
                                                if (d = s.test(j))
                                                    break
                                            }
                                    m += f
                                }
                                if (d)
                                    break
                            }
                            return c && (m += ")",
                            o--),
                            d
                        }
                        var j, k, l = c.buffer.slice(), m = "", n = !1, o = 0;
                        null === f.regexTokens && h(),
                        l.splice(d, 0, b),
                        j = l.join("");
                        for (var p = 0; p < f.regexTokens.length; p++) {
                            var q = f.regexTokens[p];
                            if (n = i(q, q.isGroup))
                                break
                        }
                        return n
                    },
                    cardinality: 1
                }
            }
        }
    }),
    b
}(jQuery, Inputmask);
(function($) {
    $.fn.bootstrapNumber = function(options) {
        var settings = $.extend({
            upClass: 'default',
            downClass: 'default',
            center: true
        }, options);
        return this.each(function(e) {
            var self = $(this);
            var clone = self.clone();
            var min = self.attr('min');
            var max = self.attr('max');
            function setText(n) {
                if ((min && n < min) || (max && n > max)) {
                    return false;
                }
                clone.focus().val(n);
                return true;
            }
            var group = $("<div class='input-group'></div>");
            var down = $("<button type='button'>-</button>").attr('class', 'btn btn-' + settings.downClass).click(function() {
                setText(parseInt(clone.val()) - 1);
            });
            var up = $("<button type='button'>+</button>").attr('class', 'btn btn-' + settings.upClass).click(function() {
                setText(parseInt(clone.val()) + 1);
            });
            $("<span class='input-group-btn'></span>").append(down).appendTo(group);
            clone.appendTo(group);
            if (clone) {
                clone.css('text-align', 'center');
            }
            $("<span class='input-group-btn'></span>").append(up).appendTo(group);
            clone.prop('type', 'text').keydown(function(e) {
                if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 || (e.keyCode == 65 && e.ctrlKey === true) || (e.keyCode >= 35 && e.keyCode <= 39)) {
                    return;
                }
                if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
                    e.preventDefault();
                }
                var c = String.fromCharCode(e.which);
                var n = parseInt(clone.val() + c);
            });
            clone.prop('type', 'text').blur(function(e) {
                var c = String.fromCharCode(e.which);
                var n = parseInt(clone.val() + c);
                if ((min && n < min)) {
                    setText(min);
                } else if (max && n > max) {
                    setText(max);
                }
            });
            self.replaceWith(group);
        });
    }
    ;
}(jQuery));
(function(c, X, ea, S) {
    var Y = 0, O = function() {
        var c = S.userAgent
          , a = /msie\s\d+/i;
        return 0 < c.search(a) && (c = a.exec(c).toString(),
        c = c.split(" ")[1],
        9 > c) ? !0 : !1
    }(), H;
    try {
        X.createEvent("TouchEvent"),
        H = !0
    } catch (ga) {
        H = !1
    }
    var N = {
        init: function(A) {
            return this.each(function() {
                var a = c.extend({
                    min: 10,
                    max: 100,
                    from: null,
                    to: null,
                    type: "single",
                    step: 1,
                    prefix: "",
                    postfix: "",
                    hasGrid: !1,
                    hideMinMax: !1,
                    hideFromTo: !1,
                    prettify: !0,
                    onChange: null,
                    onLoad: null,
                    onFinish: null
                }, A)
                  , d = c(this)
                  , u = this;
                if (!d.data("isActive")) {
                    d.data("isActive", !0);
                    this.pluginCount = Y += 1;
                    d.prop("value") && (a.min = parseInt(d.prop("value").split(";")[0], 10),
                    a.max = parseInt(d.prop("value").split(";")[1], 10));
                    "number" !== typeof a.from && (a.from = a.min);
                    "number" !== typeof a.to && (a.to = a.max);
                    "number" === typeof d.data("from") && (a.from = parseFloat(d.data("from")));
                    "number" === typeof d.data("to") && (a.to = parseFloat(d.data("to")));
                    d.data("step") && (a.step = parseFloat(d.data("step")));
                    d.data("type") && (a.type = d.data("type"));
                    d.data("prefix") && (a.prefix = d.data("prefix"));
                    d.data("postfix") && (a.postfix = d.data("postfix"));
                    d.data("hasgrid") && (a.hasGrid = d.data("hasgrid"));
                    d.data("hideminmax") && (a.hideMinMax = d.data("hideminmax"));
                    d.data("hidefromto") && (a.hideFromTo = d.data("hidefromto"));
                    d.data("prettify") && (a.prettify = d.data("prettify"));
                    a.from < a.min && (a.from = a.min);
                    a.to > a.max && (a.to = a.max);
                    "double" === a.type && (a.from > a.to && (a.from = a.to),
                    a.to < a.from && (a.to = a.from));
                    var v = function(b) {
                        b = b.toString();
                        a.prettify && (b = b.replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g, "$1 "));
                        return b
                    }
                      , N = '<span class="irs" id="irs-' + this.pluginCount + '"></span>';
                    d[0].style.display = "none";
                    d.before(N);
                    var w = c("#irs-" + this.pluginCount), C = c(X.body), I = c(ea), l, D, E, x, y, q, r, e, m, s, T, Z, p = !1, t = !1, P = !0, g = {}, U = 0, J = 0, K = 0, k = 0, B = 0, L = 0, V = 0, Q = 0, R = 0, $ = 0, n = 0;
                    parseInt(a.step, 10) !== parseFloat(a.step) && (n = a.step.toString().split(".")[1],
                    n = Math.pow(10, n.length));
                    this.updateData = function(b) {
                        P = !0;
                        a = c.extend(a, b);
                        w.find("*").off();
                        I.off("mouseup.irs" + u.pluginCount);
                        C.off("mouseup.irs" + u.pluginCount);
                        C.off("mousemove.irs" + u.pluginCount);
                        w.html("");
                        aa()
                    }
                    ;
                    this.removeSlider = function() {
                        w.find("*").off();
                        I.off("mouseup.irs" + u.pluginCount);
                        C.off("mouseup.irs" + u.pluginCount);
                        C.off("mousemove.irs" + u.pluginCount);
                        w.html("").remove();
                        d.data("isActive", !1);
                        d.show()
                    }
                    ;
                    var aa = function() {
                        w.html('<span class="irs"><span class="irs-line"><span class="irs-line-left"></span><span class="irs-line-mid"></span><span class="irs-line-right"></span></span><span class="irs-min">0</span><span class="irs-max">1</span><span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span></span><span class="irs-grid"></span>');
                        l = w.find(".irs");
                        D = l.find(".irs-min");
                        E = l.find(".irs-max");
                        x = l.find(".irs-from");
                        y = l.find(".irs-to");
                        q = l.find(".irs-single");
                        Z = w.find(".irs-grid");
                        a.hideMinMax && (D[0].style.display = "none",
                        E[0].style.display = "none",
                        K = J = 0);
                        a.hideFromTo && (x[0].style.display = "none",
                        y[0].style.display = "none",
                        q[0].style.display = "none");
                        a.hideMinMax || (D.html(a.prefix + v(a.min) + a.postfix),
                        E.html(a.prefix + v(a.max) + a.postfix),
                        J = D.outerWidth(),
                        K = E.outerWidth());
                        if ("single" === a.type) {
                            if (l.append('<span class="irs-slider single"></span>'),
                            r = l.find(".single"),
                            r.on("mousedown", function(a) {
                                a.preventDefault();
                                a.stopPropagation();
                                F(a, c(this), null);
                                t = p = !0;
                                O && c("*").prop("unselectable", !0)
                            }),
                            H)
                                r.on("touchstart", function(a) {
                                    a.preventDefault();
                                    a.stopPropagation();
                                    F(a.originalEvent.touches[0], c(this), null);
                                    t = p = !0
                                })
                        } else
                            "double" === a.type && (l.append('<span class="irs-diapason"></span><span class="irs-slider from"></span><span class="irs-slider to"></span>'),
                            e = l.find(".from"),
                            m = l.find(".to"),
                            T = l.find(".irs-diapason"),
                            M(),
                            e.on("mousedown", function(a) {
                                a.preventDefault();
                                a.stopPropagation();
                                c(this).addClass("last");
                                m.removeClass("last");
                                F(a, c(this), "from");
                                t = p = !0;
                                O && c("*").prop("unselectable", !0)
                            }),
                            m.on("mousedown", function(a) {
                                a.preventDefault();
                                a.stopPropagation();
                                c(this).addClass("last");
                                e.removeClass("last");
                                F(a, c(this), "to");
                                t = p = !0;
                                O && c("*").prop("unselectable", !0)
                            }),
                            H && (e.on("touchstart", function(a) {
                                a.preventDefault();
                                a.stopPropagation();
                                c(this).addClass("last");
                                m.removeClass("last");
                                F(a.originalEvent.touches[0], c(this), "from");
                                t = p = !0
                            }),
                            m.on("touchstart", function(a) {
                                a.preventDefault();
                                a.stopPropagation();
                                c(this).addClass("last");
                                e.removeClass("last");
                                F(a.originalEvent.touches[0], c(this), "to");
                                t = p = !0
                            })),
                            a.to === a.max && e.addClass("last"));
                        var b = function() {
                            p && (p = t = !1,
                            s.removeAttr("id"),
                            s = null,
                            "double" === a.type && M(),
                            W(),
                            O && c("*").prop("unselectable", !1))
                        };
                        C.on("mouseup.irs" + u.pluginCount, function() {
                            b()
                        });
                        I.on("mouseup.irs" + u.pluginCount, function() {
                            b()
                        });
                        C.on("mousemove.irs" + u.pluginCount, function(a) {
                            p && (U = a.pageX,
                            ba())
                        });
                        H && (I.on("touchend", function() {
                            p && (p = t = !1,
                            s.removeAttr("id"),
                            s = null,
                            "double" === a.type && M(),
                            W())
                        }),
                        I.on("touchmove", function(a) {
                            p && (U = a.originalEvent.touches[0].pageX,
                            ba())
                        }));
                        ca();
                        S();
                        a.hasGrid && fa()
                    }
                      , ca = function() {
                        k = l.width();
                        L = r ? r.width() : e.width();
                        B = k - L
                    }
                      , F = function(b, f, c) {
                        ca();
                        P = !1;
                        s = f;
                        s.attr("id", "irs-active-slider");
                        f = s.offset().left;
                        $ = f + (b.pageX - f) - s.position().left;
                        "single" === a.type ? V = l.width() - L : "double" === a.type && ("from" === c ? (Q = 0,
                        R = parseInt(m.css("left"), 10)) : (Q = parseInt(e.css("left"), 10),
                        R = l.width() - L))
                    }
                      , M = function() {
                        var a = e.width()
                          , f = c.data(e[0], "x") || parseInt(e[0].style.left, 10) || e.position().left
                          , G = (c.data(m[0], "x") || parseInt(m[0].style.left, 10) || m.position().left) - f;
                        T[0].style.left = f + a / 2 + "px";
                        T[0].style.width = G + "px"
                    }
                      , ba = function() {
                        var b = U - $;
                        "single" === a.type ? (0 > b && (b = 0),
                        b > V && (b = V)) : "double" === a.type && (b < Q && (b = Q),
                        b > R && (b = R),
                        M());
                        c.data(s[0], "x", b);
                        W();
                        b = Math.round(b);
                        s[0].style.left = b + "px"
                    }
                      , W = function() {
                        var b = {
                            fromNumber: 0,
                            toNumber: 0,
                            fromPers: 0,
                            toPers: 0,
                            fromX: 0,
                            toX: 0
                        }, f = a.max - a.min, G;
                        "single" === a.type ? (b.fromX = c.data(r[0], "x") || parseInt(r[0].style.left, 10) || r.position().left,
                        b.fromPers = b.fromX / B * 100,
                        G = f / 100 * b.fromPers + parseInt(a.min, 10),
                        b.fromNumber = Math.round(G / a.step) * a.step,
                        n && (b.fromNumber = parseInt(b.fromNumber * n, 10) / n)) : "double" === a.type && (b.fromX = c.data(e[0], "x") || parseInt(e[0].style.left, 10) || e.position().left,
                        b.fromPers = b.fromX / B * 100,
                        G = f / 100 * b.fromPers + parseInt(a.min, 10),
                        b.fromNumber = Math.round(G / a.step) * a.step,
                        b.toX = c.data(m[0], "x") || parseInt(m[0].style.left, 10) || m.position().left,
                        b.toPers = b.toX / B * 100,
                        f = f / 100 * b.toPers + parseInt(a.min, 10),
                        b.toNumber = Math.round(f / a.step) * a.step,
                        n && (b.fromNumber = parseInt(b.fromNumber * n, 10) / n,
                        b.toNumber = parseInt(b.toNumber * n, 10) / n));
                        g = b;
                        da()
                    }
                      , S = function() {
                        var b = {
                            fromNumber: a.from,
                            toNumber: a.to,
                            fromPers: 0,
                            toPers: 0,
                            fromX: 0,
                            fromX_pure: 0,
                            toX: 0,
                            toX_pure: 0
                        }
                          , f = a.max - a.min;
                        "single" === a.type ? (b.fromPers = (b.fromNumber - a.min) / f * 100,
                        b.fromX_pure = B / 100 * b.fromPers,
                        b.fromX = Math.round(b.fromX_pure),
                        r[0].style.left = b.fromX + "px",
                        c.data(r[0], "x", b.fromX_pure)) : "double" === a.type && (b.fromPers = (b.fromNumber - a.min) / f * 100,
                        b.fromX_pure = B / 100 * b.fromPers,
                        b.fromX = Math.round(b.fromX_pure),
                        e[0].style.left = b.fromX + "px",
                        c.data(e[0], "x", b.fromX_pure),
                        b.toPers = (b.toNumber - a.min) / f * 100,
                        b.toX_pure = B / 100 * b.toPers,
                        b.toX = Math.round(b.toX_pure),
                        m[0].style.left = b.toX + "px",
                        c.data(m[0], "x", b.toX_pure),
                        M());
                        g = b;
                        da()
                    }
                      , da = function() {
                        var b, f, c, z, e, h;
                        h = L / 2;
                        "single" === a.type ? (a.hideText || (x[0].style.display = "none",
                        y[0].style.display = "none",
                        c = a.prefix + v(g.fromNumber) + a.postfix,
                        q.html(c),
                        e = q.outerWidth(),
                        h = g.fromX - e / 2 + h,
                        0 > h && (h = 0),
                        h > k - e && (h = k - e),
                        q[0].style.left = h + "px",
                        a.hideMinMax || a.hideFromTo || (D[0].style.display = h < J ? "none" : "block",
                        E[0].style.display = h + e > k - K ? "none" : "block")),
                        d.attr("value", parseInt(g.fromNumber, 10))) : "double" === a.type && (a.hideText || (b = a.prefix + v(g.fromNumber) + a.postfix,
                        f = a.prefix + v(g.toNumber) + a.postfix,
                        c = g.fromNumber !== g.toNumber ? a.prefix + v(g.fromNumber) + " \u2014 " + a.prefix + v(g.toNumber) + a.postfix : a.prefix + v(g.fromNumber) + a.postfix,
                        x.html(b),
                        y.html(f),
                        q.html(c),
                        b = x.outerWidth(),
                        f = g.fromX - b / 2 + h,
                        0 > f && (f = 0),
                        f > k - b && (f = k - b),
                        x[0].style.left = f + "px",
                        c = y.outerWidth(),
                        z = g.toX - c / 2 + h,
                        0 > z && (z = 0),
                        z > k - c && (z = k - c),
                        y[0].style.left = z + "px",
                        e = q.outerWidth(),
                        h = g.fromX + (g.toX - g.fromX) / 2 - e / 2 + h,
                        0 > h && (h = 0),
                        h > k - e && (h = k - e),
                        q[0].style.left = h + "px",
                        f + b < z ? (q[0].style.display = "none",
                        x[0].style.display = "block",
                        y[0].style.display = "block") : (q[0].style.display = "block",
                        x[0].style.display = "none",
                        y[0].style.display = "none"),
                        a.hideMinMax || a.hideFromTo || (D[0].style.display = h < J || f < J ? "none" : "block",
                        E[0].style.display = h + e > k - K || z + c > k - K ? "none" : "block")),
                        d.attr("value", parseInt(g.fromNumber, 10) + ";" + parseInt(g.toNumber, 10)));
                        "function" === typeof a.onChange && a.onChange.call(this, g);
                        "function" !== typeof a.onFinish || t || P || a.onFinish.call(this, g);
                        "function" === typeof a.onLoad && !t && P && a.onLoad.call(this, g)
                    }
                      , fa = function() {
                        w.addClass("irs-with-grid");
                        var b, c = "", d = 0, d = 0, e = "";
                        for (b = 0; 20 >= b; b += 1)
                            d = Math.floor(k / 20 * b),
                            d >= k && (d = k - 1),
                            e += '<span class="irs-grid-pol small" style="left: ' + d + 'px;"></span>';
                        for (b = 0; 4 >= b; b += 1)
                            d = Math.floor(k / 4 * b),
                            d >= k && (d = k - 1),
                            e += '<span class="irs-grid-pol" style="left: ' + d + 'px;"></span>',
                            n ? (c = a.min + (a.max - a.min) / 4 * b,
                            c = c / a.step * a.step,
                            c = parseInt(c * n, 10) / n) : (c = Math.round(a.min + (a.max - a.min) / 4 * b),
                            c = Math.round(c / a.step) * a.step,
                            c = v(c)),
                            0 === b ? e += '<span class="irs-grid-text" style="left: ' + d + 'px; text-align: left;">' + c + "</span>" : 4 === b ? (d -= 100,
                            e += '<span class="irs-grid-text" style="left: ' + d + 'px; text-align: right;">' + c + "</span>") : (d -= 50,
                            e += '<span class="irs-grid-text" style="left: ' + d + 'px;">' + c + "</span>");
                        Z.html(e)
                    };
                    aa()
                }
            })
        },
        update: function(c) {
            return this.each(function() {
                this.updateData(c)
            })
        },
        remove: function() {
            return this.each(function() {
                this.removeSlider()
            })
        }
    };
    c.fn.ionRangeSlider = function(A) {
        if (N[A])
            return N[A].apply(this, Array.prototype.slice.call(arguments, 1));
        if ("object" !== typeof A && A)
            c.error("Method " + A + " does not exist for jQuery.ionRangeSlider");
        else
            return N.init.apply(this, arguments)
    }
}
)(jQuery, document, window, navigator);
!function(e, t) {
    "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : e.wangEditor = t()
}(this, function() {
    "use strict";
    function e(e) {
        var t = void 0;
        return t = document.createElement("div"),
        t.innerHTML = e,
        t.children
    }
    function t(e) {
        return !!e && (e instanceof HTMLCollection || e instanceof NodeList)
    }
    function n(e) {
        var n = document.querySelectorAll(e);
        return t(n) ? n : [n]
    }
    function i(o) {
        if (o) {
            if (o instanceof i)
                return o;
            this.selector = o;
            var A = o.nodeType
              , r = [];
            9 === A ? r = [o] : 1 === A ? r = [o] : t(o) || o instanceof Array ? r = o : "string" == typeof o && (o = o.replace("/\n/mg", "").trim(),
            r = 0 === o.indexOf("<") ? e(o) : n(o));
            var c = r.length;
            if (!c)
                return this;
            var a = void 0;
            for (a = 0; a < c; a++)
                this[a] = r[a];
            this.length = c
        }
    }
    function o(e) {
        return new i(e)
    }
    function A(e, t) {
        var n = void 0;
        for (n in e)
            if (e.hasOwnProperty(n) && !1 === t.call(e, n, e[n]))
                break
    }
    function r(e, t) {
        var n = void 0
          , i = void 0
          , o = e.length || 0;
        for (n = 0; n < o && (i = e[n],
        !1 !== t.call(e, i, n)); n++)
            ;
    }
    function c(e) {
        return e + Math.random().toString().slice(2)
    }
    function a(e) {
        return null == e ? "" : e.replace(/</gm, "&lt;").replace(/>/gm, "&gt;").replace(/"/gm, "&quot;").replace(/(\r\n|\r|\n)/g, "<br/>")
    }
    function s(e) {
        return "function" == typeof e
    }
    function l(e) {
        this.editor = e,
        this.$elem = o('<div class="w-e-menu">\n            <i class="w-e-icon-bold"></i>\n        </div>'),
        this.type = "click",
        this._active = !1
    }
    function d(e, t) {
        var n = this
          , i = e.editor;
        this.menu = e,
        this.opt = t;
        var A = o('<div class="w-e-droplist"></div>')
          , r = t.$title
          , c = void 0;
        r && (c = r.html(),
        c = O(i, c),
        r.html(c),
        r.addClass("w-e-dp-title"),
        A.append(r));
        var a = t.list || []
          , s = t.type || "list"
          , l = t.onClick || $
          , d = o('<ul class="' + ("list" === s ? "w-e-list" : "w-e-block") + '"></ul>');
        A.append(d),
        a.forEach(function(e) {
            var t = e.$elem
              , A = t.html();
            A = O(i, A),
            t.html(A);
            var r = e.value
              , c = o('<li class="w-e-item"></li>');
            t && (c.append(t),
            d.append(c),
            c.on("click", function(e) {
                l(r),
                n.hideTimeoutId = setTimeout(function() {
                    n.hide()
                }, 0)
            }))
        }),
        A.on("mouseleave", function(e) {
            n.hideTimeoutId = setTimeout(function() {
                n.hide()
            }, 0)
        }),
        this.$container = A,
        this._rendered = !1,
        this._show = !1
    }
    function u(e) {
        var t = this;
        this.editor = e,
        this.$elem = o('<div class="w-e-menu"><i class="w-e-icon-header"></i></div>'),
        this.type = "droplist",
        this._active = !1,
        this.droplist = new d(this,{
            width: 100,
            $title: o("<p>设置标题</p>"),
            type: "list",
            list: [{
                $elem: o("<h1>H1</h1>"),
                value: "<h1>"
            }, {
                $elem: o("<h2>H2</h2>"),
                value: "<h2>"
            }, {
                $elem: o("<h3>H3</h3>"),
                value: "<h3>"
            }, {
                $elem: o("<h4>H4</h4>"),
                value: "<h4>"
            }, {
                $elem: o("<h5>H5</h5>"),
                value: "<h5>"
            }, {
                $elem: o("<p>正文</p>"),
                value: "<p>"
            }],
            onClick: function(e) {
                t._command(e)
            }
        })
    }
    function h(e) {
        var t = this;
        this.editor = e,
        this.$elem = o('<div class="w-e-menu"><i class="w-e-icon-text-heigh"></i></div>'),
        this.type = "droplist",
        this._active = !1,
        this.droplist = new d(this,{
            width: 160,
            $title: o("<p>字号</p>"),
            type: "list",
            list: [{
                $elem: o('<span style="font-size: x-small;">x-small</span>'),
                value: "1"
            }, {
                $elem: o('<span style="font-size: small;">small</span>'),
                value: "2"
            }, {
                $elem: o("<span>normal</span>"),
                value: "3"
            }, {
                $elem: o('<span style="font-size: large;">large</span>'),
                value: "4"
            }, {
                $elem: o('<span style="font-size: x-large;">x-large</span>'),
                value: "5"
            }, {
                $elem: o('<span style="font-size: xx-large;">xx-large</span>'),
                value: "6"
            }],
            onClick: function(e) {
                t._command(e)
            }
        })
    }
    function p(e) {
        var t = this;
        this.editor = e,
        this.$elem = o('<div class="w-e-menu"><i class="w-e-icon-font"></i></div>'),
        this.type = "droplist",
        this._active = !1;
        var n = e.config
          , i = n.fontNames || [];
        this.droplist = new d(this,{
            width: 100,
            $title: o("<p>字体</p>"),
            type: "list",
            list: i.map(function(e) {
                return {
                    $elem: o('<span style="font-family: ' + e + ';">' + e + "</span>"),
                    value: e
                }
            }),
            onClick: function(e) {
                t._command(e)
            }
        })
    }
    function f(e, t) {
        this.menu = e,
        this.opt = t
    }
    function m(e) {
        this.editor = e,
        this.$elem = o('<div class="w-e-menu"><i class="w-e-icon-link"></i></div>'),
        this.type = "panel",
        this._active = !1
    }
    function g(e) {
        this.editor = e,
        this.$elem = o('<div class="w-e-menu">\n            <i class="w-e-icon-italic"></i>\n        </div>'),
        this.type = "click",
        this._active = !1
    }
    function w(e) {
        this.editor = e,
        this.$elem = o('<div class="w-e-menu">\n            <i class="w-e-icon-redo"></i>\n        </div>'),
        this.type = "click",
        this._active = !1
    }
    function v(e) {
        this.editor = e,
        this.$elem = o('<div class="w-e-menu">\n            <i class="w-e-icon-strikethrough"></i>\n        </div>'),
        this.type = "click",
        this._active = !1
    }
    function E(e) {
        this.editor = e,
        this.$elem = o('<div class="w-e-menu">\n            <i class="w-e-icon-underline"></i>\n        </div>'),
        this.type = "click",
        this._active = !1
    }
    function b(e) {
        this.editor = e,
        this.$elem = o('<div class="w-e-menu">\n            <i class="w-e-icon-undo"></i>\n        </div>'),
        this.type = "click",
        this._active = !1
    }
    function B(e) {
        var t = this;
        this.editor = e,
        this.$elem = o('<div class="w-e-menu"><i class="w-e-icon-list2"></i></div>'),
        this.type = "droplist",
        this._active = !1,
        this.droplist = new d(this,{
            width: 120,
            $title: o("<p>设置列表</p>"),
            type: "list",
            list: [{
                $elem: o('<span><i class="w-e-icon-list-numbered"></i> 有序列表</span>'),
                value: "insertOrderedList"
            }, {
                $elem: o('<span><i class="w-e-icon-list2"></i> 无序列表</span>'),
                value: "insertUnorderedList"
            }],
            onClick: function(e) {
                t._command(e)
            }
        })
    }
    function y(e) {
        var t = this;
        this.editor = e,
        this.$elem = o('<div class="w-e-menu"><i class="w-e-icon-paragraph-left"></i></div>'),
        this.type = "droplist",
        this._active = !1,
        this.droplist = new d(this,{
            width: 100,
            $title: o("<p>对齐方式</p>"),
            type: "list",
            list: [{
                $elem: o('<span><i class="w-e-icon-paragraph-left"></i> 靠左</span>'),
                value: "justifyLeft"
            }, {
                $elem: o('<span><i class="w-e-icon-paragraph-center"></i> 居中</span>'),
                value: "justifyCenter"
            }, {
                $elem: o('<span><i class="w-e-icon-paragraph-right"></i> 靠右</span>'),
                value: "justifyRight"
            }],
            onClick: function(e) {
                t._command(e)
            }
        })
    }
    function C(e) {
        var t = this;
        this.editor = e,
        this.$elem = o('<div class="w-e-menu"><i class="w-e-icon-pencil2"></i></div>'),
        this.type = "droplist";
        var n = e.config
          , i = n.colors || [];
        this._active = !1,
        this.droplist = new d(this,{
            width: 120,
            $title: o("<p>文字颜色</p>"),
            type: "inline-block",
            list: i.map(function(e) {
                return {
                    $elem: o('<i style="color:' + e + ';" class="w-e-icon-pencil2"></i>'),
                    value: e
                }
            }),
            onClick: function(e) {
                t._command(e)
            }
        })
    }
    function x(e) {
        var t = this;
        this.editor = e,
        this.$elem = o('<div class="w-e-menu"><i class="w-e-icon-paint-brush"></i></div>'),
        this.type = "droplist";
        var n = e.config
          , i = n.colors || [];
        this._active = !1,
        this.droplist = new d(this,{
            width: 120,
            $title: o("<p>背景色</p>"),
            type: "inline-block",
            list: i.map(function(e) {
                return {
                    $elem: o('<i style="color:' + e + ';" class="w-e-icon-paint-brush"></i>'),
                    value: e
                }
            }),
            onClick: function(e) {
                t._command(e)
            }
        })
    }
    function I(e) {
        this.editor = e,
        this.$elem = o('<div class="w-e-menu">\n            <i class="w-e-icon-quotes-left"></i>\n        </div>'),
        this.type = "click",
        this._active = !1
    }
    function Q(e) {
        this.editor = e,
        this.$elem = o('<div class="w-e-menu">\n            <i class="w-e-icon-terminal"></i>\n        </div>'),
        this.type = "panel",
        this._active = !1
    }
    function M(e) {
        this.editor = e,
        this.$elem = o('<div class="w-e-menu">\n            <i class="w-e-icon-happy"></i>\n        </div>'),
        this.type = "panel",
        this._active = !1
    }
    function S(e) {
        this.editor = e,
        this.$elem = o('<div class="w-e-menu"><i class="w-e-icon-table2"></i></div>'),
        this.type = "panel",
        this._active = !1
    }
    function k(e) {
        this.editor = e,
        this.$elem = o('<div class="w-e-menu"><i class="w-e-icon-play"></i></div>'),
        this.type = "panel",
        this._active = !1
    }
    function D(e) {
        this.editor = e;
        var t = c("w-e-img");
        this.$elem = o('<div class="w-e-menu" id="' + t + '"><i class="w-e-icon-image"></i></div>'),
        e.imgMenuId = t,
        this.type = "panel",
        this._active = !1
    }
    function _(e) {
        this.editor = e,
        this.menus = {}
    }
    function N(e) {
        var t = e.clipboardData || e.originalEvent && e.originalEvent.clipboardData
          , n = void 0;
        return n = null == t ? window.clipboardData && window.clipboardData.getData("text") : t.getData("text/plain"),
        a(n)
    }
    function F(e, t, n) {
        var i = e.clipboardData || e.originalEvent && e.originalEvent.clipboardData
          , o = void 0
          , A = void 0;
        if (null == i ? o = window.clipboardData && window.clipboardData.getData("text") : (o = i.getData("text/plain"),
        A = i.getData("text/html")),
        !A && o && (A = "<p>" + a(o) + "</p>"),
        A) {
            var r = A.split("</html>");
            return 2 === r.length && (A = r[0]),
            A = A.replace(/<(meta|script|link).+?>/gim, ""),
            A = A.replace(/<!--.*?-->/gm, ""),
            A = A.replace(/\s?data-.+?=('|").+?('|")/gim, ""),
            n && (A = A.replace(/<img.+?>/gim, "")),
            A = t ? A.replace(/\s?(class|style)=('|").*?('|")/gim, "") : A.replace(/\s?class=('|").*?('|")/gim, "")
        }
    }
    function T(e) {
        var t = [];
        if (N(e))
            return t;
        var n = e.clipboardData || e.originalEvent && e.originalEvent.clipboardData || {}
          , i = n.items;
        return i ? (A(i, function(e, n) {
            var i = n.type;
            /image/i.test(i) && t.push(n.getAsFile())
        }),
        t) : t
    }
    function R(e) {
        var t = [];
        return (e.childNodes() || []).forEach(function(e) {
            var n = void 0
              , i = e.nodeType;
            if (3 === i && (n = e.textContent,
            n = a(n)),
            1 === i) {
                n = {},
                n.tag = e.nodeName.toLowerCase();
                for (var A = [], r = e.attributes || {}, c = r.length || 0, s = 0; s < c; s++) {
                    var l = r[s];
                    A.push({
                        name: l.name,
                        value: l.value
                    })
                }
                n.attrs = A,
                n.children = R(o(e))
            }
            t.push(n)
        }),
        t
    }
    function U(e) {
        this.editor = e
    }
    function Y(e) {
        this.editor = e
    }
    function P(e) {
        this.editor = e,
        this._currentRange = null
    }
    function H(e) {
        this.editor = e,
        this._time = 0,
        this._isShow = !1,
        this._isRender = !1,
        this._timeoutId = 0,
        this.$textContainer = e.$textContainerElem,
        this.$bar = o('<div class="w-e-progress"></div>')
    }
    function L(e) {
        this.editor = e
    }
    function j(e, t) {
        if (null == e)
            throw new Error("错误：初始化编辑器时候未传入任何参数，请查阅文档");
        this.id = "wangEditor-" + W++,
        this.toolbarSelector = e,
        this.textSelector = t,
        this.customConfig = {}
    }
    var G = [];
    i.prototype = {
        constructor: i,
        forEach: function(e) {
            var t = void 0;
            for (t = 0; t < this.length; t++) {
                var n = this[t];
                if (!1 === e.call(n, n, t))
                    break
            }
            return this
        },
        clone: function(e) {
            var t = [];
            return this.forEach(function(n) {
                t.push(n.cloneNode(!!e))
            }),
            o(t)
        },
        get: function(e) {
            var t = this.length;
            return e >= t && (e %= t),
            o(this[e])
        },
        first: function() {
            return this.get(0)
        },
        last: function() {
            var e = this.length;
            return this.get(e - 1)
        },
        on: function(e, t, n) {
            n || (n = t,
            t = null);
            var i = [];
            return i = e.split(/\s+/),
            this.forEach(function(e) {
                i.forEach(function(i) {
                    if (i) {
                        if (G.push({
                            elem: e,
                            type: i,
                            fn: n
                        }),
                        !t)
                            return void e.addEventListener(i, n);
                        e.addEventListener(i, function(e) {
                            var i = e.target;
                            i.matches(t) && n.call(i, e)
                        })
                    }
                })
            })
        },
        off: function(e, t) {
            return this.forEach(function(n) {
                n.removeEventListener(e, t)
            })
        },
        attr: function(e, t) {
            return null == t ? this[0].getAttribute(e) : this.forEach(function(n) {
                n.setAttribute(e, t)
            })
        },
        addClass: function(e) {
            return e ? this.forEach(function(t) {
                var n = void 0;
                t.className ? (n = t.className.split(/\s/),
                n = n.filter(function(e) {
                    return !!e.trim()
                }),
                n.indexOf(e) < 0 && n.push(e),
                t.className = n.join(" ")) : t.className = e
            }) : this
        },
        removeClass: function(e) {
            return e ? this.forEach(function(t) {
                var n = void 0;
                t.className && (n = t.className.split(/\s/),
                n = n.filter(function(t) {
                    return !(!(t = t.trim()) || t === e)
                }),
                t.className = n.join(" "))
            }) : this
        },
        css: function(e, t) {
            var n = e + ":" + t + ";";
            return this.forEach(function(t) {
                var i = (t.getAttribute("style") || "").trim()
                  , o = void 0
                  , A = [];
                i ? (o = i.split(";"),
                o.forEach(function(e) {
                    var t = e.split(":").map(function(e) {
                        return e.trim()
                    });
                    2 === t.length && A.push(t[0] + ":" + t[1])
                }),
                A = A.map(function(t) {
                    return 0 === t.indexOf(e) ? n : t
                }),
                A.indexOf(n) < 0 && A.push(n),
                t.setAttribute("style", A.join("; "))) : t.setAttribute("style", n)
            })
        },
        show: function() {
            return this.css("display", "block")
        },
        hide: function() {
            return this.css("display", "none")
        },
        children: function() {
            var e = this[0];
            return e ? o(e.children) : null
        },
        childNodes: function() {
            var e = this[0];
            return e ? o(e.childNodes) : null
        },
        append: function(e) {
            return this.forEach(function(t) {
                e.forEach(function(e) {
                    t.appendChild(e)
                })
            })
        },
        remove: function() {
            return this.forEach(function(e) {
                if (e.remove)
                    e.remove();
                else {
                    var t = e.parentElement;
                    t && t.removeChild(e)
                }
            })
        },
        isContain: function(e) {
            var t = this[0]
              , n = e[0];
            return t.contains(n)
        },
        getSizeData: function() {
            return this[0].getBoundingClientRect()
        },
        getNodeName: function() {
            return this[0].nodeName
        },
        find: function(e) {
            return o(this[0].querySelectorAll(e))
        },
        text: function(e) {
            return e ? this.forEach(function(t) {
                t.innerHTML = e
            }) : this[0].innerHTML.replace(/<.*?>/g, function() {
                return ""
            })
        },
        html: function(e) {
            var t = this[0];
            return null == e ? t.innerHTML : (t.innerHTML = e,
            this)
        },
        val: function() {
            return this[0].value.trim()
        },
        focus: function() {
            return this.forEach(function(e) {
                e.focus()
            })
        },
        parent: function() {
            return o(this[0].parentElement)
        },
        parentUntil: function(e, t) {
            var n = document.querySelectorAll(e)
              , i = n.length;
            if (!i)
                return null;
            var A = t || this[0];
            if ("BODY" === A.nodeName)
                return null;
            var r = A.parentElement
              , c = void 0;
            for (c = 0; c < i; c++)
                if (r === n[c])
                    return o(r);
            return this.parentUntil(e, r)
        },
        equal: function(e) {
            return 1 === e.nodeType ? this[0] === e : this[0] === e[0]
        },
        insertBefore: function(e) {
            var t = o(e)
              , n = t[0];
            return n ? this.forEach(function(e) {
                n.parentNode.insertBefore(e, n)
            }) : this
        },
        insertAfter: function(e) {
            var t = o(e)
              , n = t[0];
            return n ? this.forEach(function(e) {
                var t = n.parentNode;
                t.lastChild === n ? t.appendChild(e) : t.insertBefore(e, n.nextSibling)
            }) : this
        }
    },
    o.offAll = function() {
        G.forEach(function(e) {
            var t = e.elem
              , n = e.type
              , i = e.fn;
            t.removeEventListener(n, i)
        })
    }
    ;
    var z = {
        menus: ["head", "bold", "fontSize", "fontName", "italic", "underline", "strikeThrough", "foreColor", "backColor", "link", "list", "justify", "quote", "emoticon", "image", "table", "video", "code", "undo", "redo"],
        fontNames: ["宋体", "微软雅黑", "Arial", "Tahoma", "Verdana"],
        colors: ["#000000", "#eeece0", "#1c487f", "#4d80bf", "#c24f4a", "#8baa4a", "#7b5ba1", "#46acc8", "#f9963b", "#ffffff"],
        emotions: [{
            title: "默认",
            type: "image",
            content: [{
                alt: "[坏笑]",
                src: "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/50/pcmoren_huaixiao_org.png"
            }, {
                alt: "[舔屏]",
                src: "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/pcmoren_tian_org.png"
            }, {
                alt: "[污]",
                src: "http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3c/pcmoren_wu_org.png"
            }]
        }, {
            title: "新浪",
            type: "image",
            content: [{
                src: "http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/7a/shenshou_thumb.gif",
                alt: "[草泥马]"
            }, {
                src: "http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/60/horse2_thumb.gif",
                alt: "[神马]"
            }, {
                src: "http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/bc/fuyun_thumb.gif",
                alt: "[浮云]"
            }]
        }, {
            title: "emoji",
            type: "emoji",
            content: "😀 😃 😄 😁 😆 😅 😂 😊 😇 🙂 🙃 😉 😓 😪 😴 🙄 🤔 😬 🤐".split(/\s/)
        }],
        zIndex: 1e4,
        debug: !1,
        linkCheck: function(e, t) {
            return !0
        },
        linkImgCheck: function(e) {
            return !0
        },
        pasteFilterStyle: !0,
        pasteIgnoreImg: !1,
        pasteTextHandle: function(e) {
            return e
        },
        showLinkImg: !0,
        linkImgCallback: function(e) {},
        uploadImgMaxSize: 5242880,
        uploadImgShowBase64: !1,
        uploadFileName: "",
        uploadImgParams: {},
        uploadImgHeaders: {},
        withCredentials: !1,
        uploadImgTimeout: 1e4,
        uploadImgHooks: {
            before: function(e, t, n) {},
            success: function(e, t, n) {},
            fail: function(e, t, n) {},
            error: function(e, t) {},
            timeout: function(e, t) {}
        },
        qiniu: !1
    }
      , J = {
        _ua: navigator.userAgent,
        isWebkit: function() {
            return /webkit/i.test(this._ua)
        },
        isIE: function() {
            return "ActiveXObject"in window
        }
    };
    l.prototype = {
        constructor: l,
        onClick: function(e) {
            var t = this.editor
              , n = t.selection.isSelectionEmpty();
            n && t.selection.createEmptyRange(),
            t.cmd.do("bold"),
            n && (t.selection.collapseRange(),
            t.selection.restoreSelection())
        },
        tryChangeActive: function(e) {
            var t = this.editor
              , n = this.$elem;
            t.cmd.queryCommandState("bold") ? (this._active = !0,
            n.addClass("w-e-active")) : (this._active = !1,
            n.removeClass("w-e-active"))
        }
    };
    var O = function(e, t) {
        var n = e.config.langArgs || []
          , i = t;
        return n.forEach(function(e) {
            var t = e.reg
              , n = e.val;
            t.test(i) && (i = i.replace(t, function() {
                return n
            }))
        }),
        i
    }
      , $ = function() {};
    d.prototype = {
        constructor: d,
        show: function() {
            this.hideTimeoutId && clearTimeout(this.hideTimeoutId);
            var e = this.menu
              , t = e.$elem
              , n = this.$container;
            if (!this._show) {
                if (this._rendered)
                    n.show();
                else {
                    var i = t.getSizeData().height || 0
                      , o = this.opt.width || 100;
                    n.css("margin-top", i + "px").css("width", o + "px"),
                    t.append(n),
                    this._rendered = !0
                }
                this._show = !0
            }
        },
        hide: function() {
            this.showTimeoutId && clearTimeout(this.showTimeoutId);
            var e = this.$container;
            this._show && (e.hide(),
            this._show = !1)
        }
    },
    u.prototype = {
        constructor: u,
        _command: function(e) {
            var t = this.editor
              , n = t.selection.getSelectionContainerElem();
            t.$textElem.equal(n) || t.cmd.do("formatBlock", e)
        },
        tryChangeActive: function(e) {
            var t = this.editor
              , n = this.$elem
              , i = /^h/i
              , o = t.cmd.queryCommandValue("formatBlock");
            i.test(o) ? (this._active = !0,
            n.addClass("w-e-active")) : (this._active = !1,
            n.removeClass("w-e-active"))
        }
    },
    h.prototype = {
        constructor: h,
        _command: function(e) {
            this.editor.cmd.do("fontSize", e)
        }
    },
    p.prototype = {
        constructor: p,
        _command: function(e) {
            this.editor.cmd.do("fontName", e)
        }
    };
    var V = function() {}
      , K = [];
    f.prototype = {
        constructor: f,
        show: function() {
            var e = this
              , t = this.menu;
            if (!(K.indexOf(t) >= 0)) {
                var n = t.editor
                  , i = o("body")
                  , A = n.$textContainerElem
                  , r = this.opt
                  , c = o('<div class="w-e-panel-container"></div>')
                  , a = r.width || 300;
                c.css("width", a + "px").css("margin-left", (0 - a) / 2 + "px");
                var s = o('<i class="w-e-icon-close w-e-panel-close"></i>');
                c.append(s),
                s.on("click", function() {
                    e.hide()
                });
                var l = o('<ul class="w-e-panel-tab-title"></ul>')
                  , d = o('<div class="w-e-panel-tab-content"></div>');
                c.append(l).append(d);
                var u = r.height;
                u && d.css("height", u + "px").css("overflow-y", "auto");
                var h = r.tabs || []
                  , p = []
                  , f = [];
                h.forEach(function(e, t) {
                    if (e) {
                        var i = e.title || ""
                          , A = e.tpl || "";
                        i = O(n, i),
                        A = O(n, A);
                        var r = o('<li class="w-e-item">' + i + "</li>");
                        l.append(r);
                        var c = o(A);
                        d.append(c),
                        r._index = t,
                        p.push(r),
                        f.push(c),
                        0 === t ? (r._active = !0,
                        r.addClass("w-e-active")) : c.hide(),
                        r.on("click", function(e) {
                            r._active || (p.forEach(function(e) {
                                e._active = !1,
                                e.removeClass("w-e-active")
                            }),
                            f.forEach(function(e) {
                                e.hide()
                            }),
                            r._active = !0,
                            r.addClass("w-e-active"),
                            c.show())
                        })
                    }
                }),
                c.on("click", function(e) {
                    e.stopPropagation()
                }),
                i.on("click", function(t) {
                    e.hide()
                }),
                A.append(c),
                h.forEach(function(t, n) {
                    if (t) {
                        (t.events || []).forEach(function(t) {
                            var i = t.selector
                              , o = t.type
                              , A = t.fn || V;
                            f[n].find(i).on(o, function(t) {
                                t.stopPropagation(),
                                A(t) && e.hide()
                            })
                        })
                    }
                });
                var m = c.find("input[type=text],textarea");
                m.length && m.get(0).focus(),
                this.$container = c,
                this._hideOtherPanels(),
                K.push(t)
            }
        },
        hide: function() {
            var e = this.menu
              , t = this.$container;
            t && t.remove(),
            K = K.filter(function(t) {
                return t !== e
            })
        },
        _hideOtherPanels: function() {
            K.length && K.forEach(function(e) {
                var t = e.panel || {};
                t.hide && t.hide()
            })
        }
    },
    m.prototype = {
        constructor: m,
        onClick: function(e) {
            var t = this.editor
              , n = void 0;
            if (this._active) {
                if (!(n = t.selection.getSelectionContainerElem()))
                    return;
                t.selection.createRangeByElem(n),
                t.selection.restoreSelection(),
                this._createPanel(n.text(), n.attr("href"))
            } else
                t.selection.isSelectionEmpty() ? this._createPanel("", "") : this._createPanel(t.selection.getSelectionText(), "")
        },
        _createPanel: function(e, t) {
            var n = this
              , i = c("input-link")
              , A = c("input-text")
              , r = c("btn-ok")
              , a = c("btn-del")
              , s = this._active ? "inline-block" : "none"
              , l = new f(this,{
                width: 300,
                tabs: [{
                    title: "链接",
                    tpl: '<div>\n                            <input id="' + A + '" type="text" class="block" value="' + e + '" placeholder="链接文字"/></td>\n                            <input id="' + i + '" type="text" class="block" value="' + t + '" placeholder="http://..."/></td>\n                            <div class="w-e-button-container">\n                                <button id="' + r + '" class="right">插入</button>\n                                <button id="' + a + '" class="gray right" style="display:' + s + '">删除链接</button>\n                            </div>\n                        </div>',
                    events: [{
                        selector: "#" + r,
                        type: "click",
                        fn: function() {
                            var e = o("#" + i)
                              , t = o("#" + A)
                              , r = e.val()
                              , c = t.val();
                            return n._insertLink(c, r),
                            !0
                        }
                    }, {
                        selector: "#" + a,
                        type: "click",
                        fn: function() {
                            return n._delLink(),
                            !0
                        }
                    }]
                }]
            });
            l.show(),
            this.panel = l
        },
        _delLink: function() {
            if (this._active) {
                var e = this.editor;
                if (e.selection.getSelectionContainerElem()) {
                    var t = e.selection.getSelectionText();
                    e.cmd.do("insertHTML", "<span>" + t + "</span>")
                }
            }
        },
        _insertLink: function(e, t) {
            var n = this.editor
              , i = n.config
              , o = i.linkCheck
              , A = !0;
            o && "function" == typeof o && (A = o(e, t)),
            !0 === A ? n.cmd.do("insertHTML", '<a href="' + t + '" target="_blank">' + e + "</a>") : alert(A)
        },
        tryChangeActive: function(e) {
            var t = this.editor
              , n = this.$elem
              , i = t.selection.getSelectionContainerElem();
            i && ("A" === i.getNodeName() ? (this._active = !0,
            n.addClass("w-e-active")) : (this._active = !1,
            n.removeClass("w-e-active")))
        }
    },
    g.prototype = {
        constructor: g,
        onClick: function(e) {
            var t = this.editor
              , n = t.selection.isSelectionEmpty();
            n && t.selection.createEmptyRange(),
            t.cmd.do("italic"),
            n && (t.selection.collapseRange(),
            t.selection.restoreSelection())
        },
        tryChangeActive: function(e) {
            var t = this.editor
              , n = this.$elem;
            t.cmd.queryCommandState("italic") ? (this._active = !0,
            n.addClass("w-e-active")) : (this._active = !1,
            n.removeClass("w-e-active"))
        }
    },
    w.prototype = {
        constructor: w,
        onClick: function(e) {
            this.editor.cmd.do("redo")
        }
    },
    v.prototype = {
        constructor: v,
        onClick: function(e) {
            var t = this.editor
              , n = t.selection.isSelectionEmpty();
            n && t.selection.createEmptyRange(),
            t.cmd.do("strikeThrough"),
            n && (t.selection.collapseRange(),
            t.selection.restoreSelection())
        },
        tryChangeActive: function(e) {
            var t = this.editor
              , n = this.$elem;
            t.cmd.queryCommandState("strikeThrough") ? (this._active = !0,
            n.addClass("w-e-active")) : (this._active = !1,
            n.removeClass("w-e-active"))
        }
    },
    E.prototype = {
        constructor: E,
        onClick: function(e) {
            var t = this.editor
              , n = t.selection.isSelectionEmpty();
            n && t.selection.createEmptyRange(),
            t.cmd.do("underline"),
            n && (t.selection.collapseRange(),
            t.selection.restoreSelection())
        },
        tryChangeActive: function(e) {
            var t = this.editor
              , n = this.$elem;
            t.cmd.queryCommandState("underline") ? (this._active = !0,
            n.addClass("w-e-active")) : (this._active = !1,
            n.removeClass("w-e-active"))
        }
    },
    b.prototype = {
        constructor: b,
        onClick: function(e) {
            this.editor.cmd.do("undo")
        }
    },
    B.prototype = {
        constructor: B,
        _command: function(e) {
            var t = this.editor
              , n = t.$textElem;
            if (t.selection.restoreSelection(),
            !t.cmd.queryCommandState(e)) {
                t.cmd.do(e);
                var i = t.selection.getSelectionContainerElem();
                if ("LI" === i.getNodeName() && (i = i.parent()),
                !1 !== /^ol|ul$/i.test(i.getNodeName()) && !i.equal(n)) {
                    var o = i.parent();
                    o.equal(n) || (i.insertAfter(o),
                    o.remove())
                }
            }
        },
        tryChangeActive: function(e) {
            var t = this.editor
              , n = this.$elem;
            t.cmd.queryCommandState("insertUnOrderedList") || t.cmd.queryCommandState("insertOrderedList") ? (this._active = !0,
            n.addClass("w-e-active")) : (this._active = !1,
            n.removeClass("w-e-active"))
        }
    },
    y.prototype = {
        constructor: y,
        _command: function(e) {
            this.editor.cmd.do(e)
        }
    },
    C.prototype = {
        constructor: C,
        _command: function(e) {
            this.editor.cmd.do("foreColor", e)
        }
    },
    x.prototype = {
        constructor: x,
        _command: function(e) {
            this.editor.cmd.do("backColor", e)
        }
    },
    I.prototype = {
        constructor: I,
        onClick: function(e) {
            var t = this.editor
              , n = t.selection.getSelectionContainerElem()
              , i = n.getNodeName();
            if (!J.isIE())
                return void ("BLOCKQUOTE" === i ? t.cmd.do("formatBlock", "<P>") : t.cmd.do("formatBlock", "<BLOCKQUOTE>"));
            var A = void 0
              , r = void 0;
            if ("P" === i)
                return A = n.text(),
                r = o("<blockquote>" + A + "</blockquote>"),
                r.insertAfter(n),
                void n.remove();
            "BLOCKQUOTE" === i && (A = n.text(),
            r = o("<p>" + A + "</p>"),
            r.insertAfter(n),
            n.remove())
        },
        tryChangeActive: function(e) {
            var t = this.editor
              , n = this.$elem
              , i = /^BLOCKQUOTE$/i
              , o = t.cmd.queryCommandValue("formatBlock");
            i.test(o) ? (this._active = !0,
            n.addClass("w-e-active")) : (this._active = !1,
            n.removeClass("w-e-active"))
        }
    },
    Q.prototype = {
        constructor: Q,
        onClick: function(e) {
            var t = this.editor
              , n = t.selection.getSelectionStartElem()
              , i = t.selection.getSelectionEndElem()
              , A = t.selection.isSelectionEmpty()
              , r = t.selection.getSelectionText()
              , c = void 0;
            return n.equal(i) ? A ? void (this._active ? this._createPanel(n.html()) : this._createPanel()) : (c = o("<code>" + r + "</code>"),
            t.cmd.do("insertElem", c),
            t.selection.createRangeByElem(c, !1),
            void t.selection.restoreSelection()) : void t.selection.restoreSelection()
        },
        _createPanel: function(e) {
            var t = this;
            e = e || "";
            var n = e ? "edit" : "new"
              , i = c("texxt")
              , A = c("btn")
              , r = new f(this,{
                width: 500,
                tabs: [{
                    title: "插入代码",
                    tpl: '<div>\n                        <textarea id="' + i + '" style="height:145px;;">' + e + '</textarea>\n                        <div class="w-e-button-container">\n                            <button id="' + A + '" class="right">插入</button>\n                        </div>\n                    <div>',
                    events: [{
                        selector: "#" + A,
                        type: "click",
                        fn: function() {
                            var e = o("#" + i)
                              , A = e.val() || e.html();
                            return A = a(A),
                            "new" === n ? t._insertCode(A) : t._updateCode(A),
                            !0
                        }
                    }]
                }]
            });
            r.show(),
            this.panel = r
        },
        _insertCode: function(e) {
            this.editor.cmd.do("insertHTML", "<pre><code>" + e + "</code></pre><p><br></p>")
        },
        _updateCode: function(e) {
            var t = this.editor
              , n = t.selection.getSelectionContainerElem();
            n && (n.html(e),
            t.selection.restoreSelection())
        },
        tryChangeActive: function(e) {
            var t = this.editor
              , n = this.$elem
              , i = t.selection.getSelectionContainerElem();
            if (i) {
                var o = i.parent();
                "CODE" === i.getNodeName() && "PRE" === o.getNodeName() ? (this._active = !0,
                n.addClass("w-e-active")) : (this._active = !1,
                n.removeClass("w-e-active"))
            }
        }
    },
    M.prototype = {
        constructor: M,
        onClick: function() {
            this._createPanel()
        },
        _createPanel: function() {
            var e = this
              , t = this.editor
              , n = t.config
              , i = n.emotions || []
              , A = [];
            i.forEach(function(t) {
                var n = t.type
                  , i = t.content || []
                  , r = "";
                "emoji" === n && i.forEach(function(e) {
                    e && (r += '<span class="w-e-item">' + e + "</span>")
                }),
                "image" === n && i.forEach(function(e) {
                    var t = e.src
                      , n = e.alt;
                    t && (r += '<span class="w-e-item"><img src="' + t + '" alt="' + n + '" data-w-e="1"/></span>')
                }),
                A.push({
                    title: t.title,
                    tpl: '<div class="w-e-emoticon-container">' + r + "</div>",
                    events: [{
                        selector: "span.w-e-item",
                        type: "click",
                        fn: function(t) {
                            var n = t.target
                              , i = o(n)
                              , A = i.getNodeName()
                              , r = void 0;
                            return r = "IMG" === A ? i.parent().html() : "<span>" + i.html() + "</span>",
                            e._insert(r),
                            !0
                        }
                    }]
                })
            });
            var r = new f(this,{
                width: 300,
                height: 200,
                tabs: A
            });
            r.show(),
            this.panel = r
        },
        _insert: function(e) {
            this.editor.cmd.do("insertHTML", e)
        }
    },
    S.prototype = {
        constructor: S,
        onClick: function() {
            this._active ? this._createEditPanel() : this._createInsertPanel()
        },
        _createInsertPanel: function() {
            var e = this
              , t = c("btn")
              , n = c("row")
              , i = c("col")
              , A = new f(this,{
                width: 250,
                tabs: [{
                    title: "插入表格",
                    tpl: '<div>\n                        <p style="text-align:left; padding:5px 0;">\n                            创建\n                            <input id="' + n + '" type="text" value="5" style="width:40px;text-align:center;"/>\n                            行\n                            <input id="' + i + '" type="text" value="5" style="width:40px;text-align:center;"/>\n                            列的表格\n                        </p>\n                        <div class="w-e-button-container">\n                            <button id="' + t + '" class="right">插入</button>\n                        </div>\n                    </div>',
                    events: [{
                        selector: "#" + t,
                        type: "click",
                        fn: function() {
                            var t = parseInt(o("#" + n).val())
                              , A = parseInt(o("#" + i).val());
                            return t && A && t > 0 && A > 0 && e._insert(t, A),
                            !0
                        }
                    }]
                }]
            });
            A.show(),
            this.panel = A
        },
        _insert: function(e, t) {
            var n = void 0
              , i = void 0
              , o = '<table border="0" width="100%" cellpadding="0" cellspacing="0">';
            for (n = 0; n < e; n++) {
                if (o += "<tr>",
                0 === n)
                    for (i = 0; i < t; i++)
                        o += "<th>&nbsp;</th>";
                else
                    for (i = 0; i < t; i++)
                        o += "<td>&nbsp;</td>";
                o += "</tr>"
            }
            o += "</table><p><br></p>";
            var A = this.editor;
            A.cmd.do("insertHTML", o),
            A.cmd.do("enableObjectResizing", !1),
            A.cmd.do("enableInlineTableEditing", !1)
        },
        _createEditPanel: function() {
            var e = this
              , t = c("add-row")
              , n = c("add-col")
              , i = c("del-row")
              , o = c("del-col")
              , A = c("del-table");
            new f(this,{
                width: 320,
                tabs: [{
                    title: "编辑表格",
                    tpl: '<div>\n                        <div class="w-e-button-container" style="border-bottom:1px solid #f1f1f1;padding-bottom:5px;margin-bottom:5px;">\n                            <button id="' + t + '" class="left">增加行</button>\n                            <button id="' + i + '" class="red left">删除行</button>\n                            <button id="' + n + '" class="left">增加列</button>\n                            <button id="' + o + '" class="red left">删除列</button>\n                        </div>\n                        <div class="w-e-button-container">\n                            <button id="' + A + '" class="gray left">删除表格</button>\n                        </dv>\n                    </div>',
                    events: [{
                        selector: "#" + t,
                        type: "click",
                        fn: function() {
                            return e._addRow(),
                            !0
                        }
                    }, {
                        selector: "#" + n,
                        type: "click",
                        fn: function() {
                            return e._addCol(),
                            !0
                        }
                    }, {
                        selector: "#" + i,
                        type: "click",
                        fn: function() {
                            return e._delRow(),
                            !0
                        }
                    }, {
                        selector: "#" + o,
                        type: "click",
                        fn: function() {
                            return e._delCol(),
                            !0
                        }
                    }, {
                        selector: "#" + A,
                        type: "click",
                        fn: function() {
                            return e._delTable(),
                            !0
                        }
                    }]
                }]
            }).show()
        },
        _getLocationData: function() {
            var e = {}
              , t = this.editor
              , n = t.selection.getSelectionContainerElem();
            if (n) {
                var i = n.getNodeName();
                if ("TD" === i || "TH" === i) {
                    var o = n.parent()
                      , A = o.children()
                      , r = A.length;
                    A.forEach(function(t, i) {
                        if (t === n[0])
                            return e.td = {
                                index: i,
                                elem: t,
                                length: r
                            },
                            !1
                    });
                    var c = o.parent()
                      , a = c.children()
                      , s = a.length;
                    return a.forEach(function(t, n) {
                        if (t === o[0])
                            return e.tr = {
                                index: n,
                                elem: t,
                                length: s
                            },
                            !1
                    }),
                    e
                }
            }
        },
        _addRow: function() {
            var e = this._getLocationData();
            if (e) {
                var t = e.tr
                  , n = o(t.elem)
                  , i = e.td
                  , A = i.length
                  , r = document.createElement("tr")
                  , c = ""
                  , a = void 0;
                for (a = 0; a < A; a++)
                    c += "<td>&nbsp;</td>";
                r.innerHTML = c,
                o(r).insertAfter(n)
            }
        },
        _addCol: function() {
            var e = this._getLocationData();
            if (e) {
                var t = e.tr
                  , n = e.td
                  , i = n.index;
                o(t.elem).parent().children().forEach(function(e) {
                    var t = o(e)
                      , n = t.children()
                      , A = n.get(i)
                      , r = A.getNodeName().toLowerCase();
                    o(document.createElement(r)).insertAfter(A)
                })
            }
        },
        _delRow: function() {
            var e = this._getLocationData();
            if (e) {
                o(e.tr.elem).remove()
            }
        },
        _delCol: function() {
            var e = this._getLocationData();
            if (e) {
                var t = e.tr
                  , n = e.td
                  , i = n.index;
                o(t.elem).parent().children().forEach(function(e) {
                    o(e).children().get(i).remove()
                })
            }
        },
        _delTable: function() {
            var e = this.editor
              , t = e.selection.getSelectionContainerElem();
            if (t) {
                var n = t.parentUntil("table");
                n && n.remove()
            }
        },
        tryChangeActive: function(e) {
            var t = this.editor
              , n = this.$elem
              , i = t.selection.getSelectionContainerElem();
            if (i) {
                var o = i.getNodeName();
                "TD" === o || "TH" === o ? (this._active = !0,
                n.addClass("w-e-active")) : (this._active = !1,
                n.removeClass("w-e-active"))
            }
        }
    },
    k.prototype = {
        constructor: k,
        onClick: function() {
            this._createPanel()
        },
        _createPanel: function() {
            var e = this
              , t = c("text-val")
              , n = c("btn")
              , i = new f(this,{
                width: 350,
                tabs: [{
                    title: "插入视频",
                    tpl: '<div>\n                        <input id="' + t + '" type="text" class="block" placeholder="格式如：<iframe src=... ></iframe>"/>\n                        <div class="w-e-button-container">\n                            <button id="' + n + '" class="right">插入</button>\n                        </div>\n                    </div>',
                    events: [{
                        selector: "#" + n,
                        type: "click",
                        fn: function() {
                            var n = o("#" + t)
                              , i = n.val().trim();
                            return i && e._insert(i),
                            !0
                        }
                    }]
                }]
            });
            i.show(),
            this.panel = i
        },
        _insert: function(e) {
            this.editor.cmd.do("insertHTML", e + "<p><br></p>")
        }
    },
    D.prototype = {
        constructor: D,
        onClick: function() {
            this.editor.config.qiniu || (this._active ? this._createEditPanel() : this._createInsertPanel())
        },
        _createEditPanel: function() {
            var e = this.editor
              , t = c("width-30")
              , n = c("width-50")
              , i = c("width-100")
              , o = c("del-btn")
              , A = [{
                title: "编辑图片",
                tpl: '<div>\n                    <div class="w-e-button-container" style="border-bottom:1px solid #f1f1f1;padding-bottom:5px;margin-bottom:5px;">\n                        <span style="float:left;font-size:14px;margin:4px 5px 0 5px;color:#333;">最大宽度：</span>\n                        <button id="' + t + '" class="left">30%</button>\n                        <button id="' + n + '" class="left">50%</button>\n                        <button id="' + i + '" class="left">100%</button>\n                    </div>\n                    <div class="w-e-button-container">\n                        <button id="' + o + '" class="gray left">删除图片</button>\n                    </dv>\n                </div>',
                events: [{
                    selector: "#" + t,
                    type: "click",
                    fn: function() {
                        var t = e._selectedImg;
                        return t && t.css("max-width", "30%"),
                        !0
                    }
                }, {
                    selector: "#" + n,
                    type: "click",
                    fn: function() {
                        var t = e._selectedImg;
                        return t && t.css("max-width", "50%"),
                        !0
                    }
                }, {
                    selector: "#" + i,
                    type: "click",
                    fn: function() {
                        var t = e._selectedImg;
                        return t && t.css("max-width", "100%"),
                        !0
                    }
                }, {
                    selector: "#" + o,
                    type: "click",
                    fn: function() {
                        var t = e._selectedImg;
                        return t && t.remove(),
                        !0
                    }
                }]
            }]
              , r = new f(this,{
                width: 300,
                tabs: A
            });
            r.show(),
            this.panel = r
        },
        _createInsertPanel: function() {
            var e = this.editor
              , t = e.uploadImg
              , n = e.config
              , i = c("up-trigger")
              , A = c("up-file")
              , r = c("link-url")
              , a = c("link-btn")
              , s = [{
                title: "上传图片",
                tpl: '<div class="w-e-up-img-container">\n                    <div id="' + i + '" class="w-e-up-btn">\n                        <i class="w-e-icon-upload2"></i>\n                    </div>\n                    <div style="display:none;">\n                        <input id="' + A + '" type="file" multiple="multiple" accept="image/jpg,image/jpeg,image/png,image/gif,image/bmp"/>\n                    </div>\n                </div>',
                events: [{
                    selector: "#" + i,
                    type: "click",
                    fn: function() {
                        var e = o("#" + A)
                          , t = e[0];
                        if (!t)
                            return !0;
                        t.click()
                    }
                }, {
                    selector: "#" + A,
                    type: "change",
                    fn: function() {
                        var e = o("#" + A)
                          , n = e[0];
                        if (!n)
                            return !0;
                        var i = n.files;
                        return i.length && t.uploadImg(i),
                        !0
                    }
                }]
            }, {
                title: "网络图片",
                tpl: '<div>\n                    <input id="' + r + '" type="text" class="block" placeholder="图片链接"/></td>\n                    <div class="w-e-button-container">\n                        <button id="' + a + '" class="right">插入</button>\n                    </div>\n                </div>',
                events: [{
                    selector: "#" + a,
                    type: "click",
                    fn: function() {
                        var e = o("#" + r)
                          , n = e.val().trim();
                        return n && t.insertLinkImg(n),
                        !0
                    }
                }]
            }]
              , l = [];
            (n.uploadImgShowBase64 || n.uploadImgServer || n.customUploadImg) && window.FileReader && l.push(s[0]),
            n.showLinkImg && l.push(s[1]);
            var d = new f(this,{
                width: 300,
                tabs: l
            });
            d.show(),
            this.panel = d
        },
        tryChangeActive: function(e) {
            var t = this.editor
              , n = this.$elem;
            t._selectedImg ? (this._active = !0,
            n.addClass("w-e-active")) : (this._active = !1,
            n.removeClass("w-e-active"))
        }
    };
    var q = {};
    q.bold = l,
    q.head = u,
    q.fontSize = h,
    q.fontName = p,
    q.link = m,
    q.italic = g,
    q.redo = w,
    q.strikeThrough = v,
    q.underline = E,
    q.undo = b,
    q.list = B,
    q.justify = y,
    q.foreColor = C,
    q.backColor = x,
    q.quote = I,
    q.code = Q,
    q.emoticon = M,
    q.table = S,
    q.video = k,
    q.image = D,
    _.prototype = {
        constructor: _,
        init: function() {
            var e = this
              , t = this.editor;
            ((t.config || {}).menus || []).forEach(function(n) {
                var i = q[n];
                i && "function" == typeof i && (e.menus[n] = new i(t))
            }),
            this._addToToolbar(),
            this._bindEvent()
        },
        _addToToolbar: function() {
            var e = this.editor
              , t = e.$toolbarElem
              , n = this.menus
              , i = e.config
              , o = i.zIndex + 1;
            A(n, function(e, n) {
                var i = n.$elem;
                i && (i.css("z-index", o),
                t.append(i))
            })
        },
        _bindEvent: function() {
            var e = this.menus
              , t = this.editor;
            A(e, function(e, n) {
                var i = n.type;
                if (i) {
                    var o = n.$elem
                      , A = n.droplist;
                    n.panel;
                    "click" === i && n.onClick && o.on("click", function(e) {
                        null != t.selection.getRange() && n.onClick(e)
                    }),
                    "droplist" === i && A && o.on("mouseenter", function(e) {
                        null != t.selection.getRange() && (A.showTimeoutId = setTimeout(function() {
                            A.show()
                        }, 200))
                    }).on("mouseleave", function(e) {
                        A.hideTimeoutId = setTimeout(function() {
                            A.hide()
                        }, 0)
                    }),
                    "panel" === i && n.onClick && o.on("click", function(e) {
                        e.stopPropagation(),
                        null != t.selection.getRange() && n.onClick(e)
                    })
                }
            })
        },
        changeActive: function() {
            A(this.menus, function(e, t) {
                t.tryChangeActive && setTimeout(function() {
                    t.tryChangeActive()
                }, 100)
            })
        }
    },
    U.prototype = {
        constructor: U,
        init: function() {
            this._bindEvent()
        },
        clear: function() {
            this.html("<p><br></p>")
        },
        html: function(e) {
            var t = this.editor
              , n = t.$textElem
              , i = void 0;
            if (null == e)
                return i = n.html(),
                i = i.replace(/\u200b/gm, ""),
                i;
            n.html(e),
            t.initSelection()
        },
        getJSON: function() {
            return R(this.editor.$textElem)
        },
        text: function(e) {
            var t = this.editor
              , n = t.$textElem
              , i = void 0;
            if (null == e)
                return i = n.text(),
                i = i.replace(/\u200b/gm, ""),
                i;
            n.text("<p>" + e + "</p>"),
            t.initSelection()
        },
        append: function(e) {
            var t = this.editor;
            t.$textElem.append(o(e)),
            t.initSelection()
        },
        _bindEvent: function() {
            this._saveRangeRealTime(),
            this._enterKeyHandle(),
            this._clearHandle(),
            this._pasteHandle(),
            this._tabHandle(),
            this._imgHandle(),
            this._dragHandle()
        },
        _saveRangeRealTime: function() {
            function e(e) {
                t.selection.saveRange(),
                t.menus.changeActive()
            }
            var t = this.editor
              , n = t.$textElem;
            n.on("keyup", e),
            n.on("mousedown", function(t) {
                n.on("mouseleave", e)
            }),
            n.on("mouseup", function(t) {
                e(),
                n.off("mouseleave", e)
            })
        },
        _enterKeyHandle: function() {
            function e(e) {
                var t = o("<p><br></p>");
                t.insertBefore(e),
                i.selection.createRangeByElem(t, !0),
                i.selection.restoreSelection(),
                e.remove()
            }
            function t(t) {
                var n = i.selection.getSelectionContainerElem()
                  , o = n.parent();
                if ("<code><br></code>" === o.html())
                    return void e(n);
                if (o.equal(A)) {
                    "P" !== n.getNodeName() && (n.text() || e(n))
                }
            }
            function n(e) {
                var t = i.selection.getSelectionContainerElem();
                if (t) {
                    var n = t.parent()
                      , A = t.getNodeName()
                      , r = n.getNodeName();
                    if ("CODE" === A && "PRE" === r && i.cmd.queryCommandSupported("insertHTML")) {
                        if (!0 === i._willBreakCode) {
                            var c = o("<p><br></p>");
                            return c.insertAfter(n),
                            i.selection.createRangeByElem(c, !0),
                            i.selection.restoreSelection(),
                            i._willBreakCode = !1,
                            void e.preventDefault()
                        }
                        var a = i.selection.getRange().startOffset;
                        i.cmd.do("insertHTML", "\n"),
                        i.selection.saveRange(),
                        i.selection.getRange().startOffset === a && i.cmd.do("insertHTML", "\n");
                        var s = t.html().length;
                        i.selection.getRange().startOffset + 1 === s && (i._willBreakCode = !0),
                        e.preventDefault()
                    }
                }
            }
            var i = this.editor
              , A = i.$textElem;
            A.on("keyup", function(e) {
                13 === e.keyCode && t(e)
            }),
            A.on("keydown", function(e) {
                if (13 !== e.keyCode)
                    return void (i._willBreakCode = !1);
                n(e)
            })
        },
        _clearHandle: function() {
            var e = this.editor
              , t = e.$textElem;
            t.on("keydown", function(e) {
                if (8 === e.keyCode) {
                    return "<p><br></p>" === t.html().toLowerCase().trim() ? void e.preventDefault() : void 0
                }
            }),
            t.on("keyup", function(n) {
                if (8 === n.keyCode) {
                    var i = void 0
                      , A = t.html().toLowerCase().trim();
                    A && "<br>" !== A || (i = o("<p><br/></p>"),
                    t.html(""),
                    t.append(i),
                    e.selection.createRangeByElem(i, !1, !0),
                    e.selection.restoreSelection())
                }
            })
        },
        _pasteHandle: function() {
            function e() {
                var e = Date.now()
                  , t = !1;
                return e - a >= 100 && (t = !0),
                a = e,
                t
            }
            function t() {
                a = 0
            }
            var n = this.editor
              , i = n.config
              , o = i.pasteFilterStyle
              , A = i.pasteTextHandle
              , r = i.pasteIgnoreImg
              , c = n.$textElem
              , a = 0;
            c.on("paste", function(i) {
                if (!J.isIE() && (i.preventDefault(),
                e())) {
                    var c = F(i, o, r)
                      , a = N(i);
                    a = a.replace(/\n/gm, "<br>");
                    var l = n.selection.getSelectionContainerElem();
                    if (l) {
                        var d = l.getNodeName();
                        if ("CODE" === d || "PRE" === d)
                            return A && s(A) && (a = "" + (A(a) || "")),
                            void n.cmd.do("insertHTML", "<p>" + a + "</p>");
                        if (!c)
                            return void t();
                        try {
                            A && s(A) && (c = "" + (A(c) || "")),
                            n.cmd.do("insertHTML", c)
                        } catch (e) {
                            A && s(A) && (a = "" + (A(a) || "")),
                            n.cmd.do("insertHTML", "<p>" + a + "</p>")
                        }
                    }
                }
            }),
            c.on("paste", function(t) {
                if (!J.isIE() && (t.preventDefault(),
                e())) {
                    var i = T(t);
                    if (i && i.length) {
                        var o = n.selection.getSelectionContainerElem();
                        if (o) {
                            var A = o.getNodeName();
                            if ("CODE" !== A && "PRE" !== A) {
                                n.uploadImg.uploadImg(i)
                            }
                        }
                    }
                }
            })
        },
        _tabHandle: function() {
            var e = this.editor;
            e.$textElem.on("keydown", function(t) {
                if (9 === t.keyCode && e.cmd.queryCommandSupported("insertHTML")) {
                    var n = e.selection.getSelectionContainerElem();
                    if (n) {
                        var i = n.parent()
                          , o = n.getNodeName()
                          , A = i.getNodeName();
                        "CODE" === o && "PRE" === A ? e.cmd.do("insertHTML", "    ") : e.cmd.do("insertHTML", "&nbsp;&nbsp;&nbsp;&nbsp;"),
                        t.preventDefault()
                    }
                }
            })
        },
        _imgHandle: function() {
            var e = this.editor
              , t = e.$textElem;
            t.on("click", "img", function(t) {
                var n = this
                  , i = o(n);
                "1" !== i.attr("data-w-e") && (e._selectedImg = i,
                e.selection.createRangeByElem(i),
                e.selection.restoreSelection())
            }),
            t.on("click  keyup", function(t) {
                t.target.matches("img") || (e._selectedImg = null)
            })
        },
        _dragHandle: function() {
            var e = this.editor;
            o(document).on("dragleave drop dragenter dragover", function(e) {
                e.preventDefault()
            }),
            e.$textElem.on("drop", function(t) {
                t.preventDefault();
                var n = t.dataTransfer && t.dataTransfer.files;
                n && n.length && e.uploadImg.uploadImg(n)
            })
        }
    },
    Y.prototype = {
        constructor: Y,
        do: function(e, t) {
            var n = this.editor;
            if (n._useStyleWithCSS || (document.execCommand("styleWithCSS", null, !0),
            n._useStyleWithCSS = !0),
            n.selection.getRange()) {
                n.selection.restoreSelection();
                var i = "_" + e;
                this[i] ? this[i](t) : this._execCommand(e, t),
                n.menus.changeActive(),
                n.selection.saveRange(),
                n.selection.restoreSelection(),
                n.change && n.change()
            }
        },
        _insertHTML: function(e) {
            var t = this.editor
              , n = t.selection.getRange();
            this.queryCommandSupported("insertHTML") ? this._execCommand("insertHTML", e) : n.insertNode ? (n.deleteContents(),
            n.insertNode(o(e)[0])) : n.pasteHTML && n.pasteHTML(e)
        },
        _insertElem: function(e) {
            var t = this.editor
              , n = t.selection.getRange();
            n.insertNode && (n.deleteContents(),
            n.insertNode(e[0]))
        },
        _execCommand: function(e, t) {
            document.execCommand(e, !1, t)
        },
        queryCommandValue: function(e) {
            return document.queryCommandValue(e)
        },
        queryCommandState: function(e) {
            return document.queryCommandState(e)
        },
        queryCommandSupported: function(e) {
            return document.queryCommandSupported(e)
        }
    },
    P.prototype = {
        constructor: P,
        getRange: function() {
            return this._currentRange
        },
        saveRange: function(e) {
            if (e)
                return void (this._currentRange = e);
            var t = window.getSelection();
            if (0 !== t.rangeCount) {
                var n = t.getRangeAt(0)
                  , i = this.getSelectionContainerElem(n);
                if (i && "false" !== i.attr("contenteditable") && !i.parentUntil("[contenteditable=false]")) {
                    this.editor.$textElem.isContain(i) && (this._currentRange = n)
                }
            }
        },
        collapseRange: function(e) {
            null == e && (e = !1);
            var t = this._currentRange;
            t && t.collapse(e)
        },
        getSelectionText: function() {
            return this._currentRange ? this._currentRange.toString() : ""
        },
        getSelectionContainerElem: function(e) {
            e = e || this._currentRange;
            var t = void 0;
            if (e)
                return t = e.commonAncestorContainer,
                o(1 === t.nodeType ? t : t.parentNode)
        },
        getSelectionStartElem: function(e) {
            e = e || this._currentRange;
            var t = void 0;
            if (e)
                return t = e.startContainer,
                o(1 === t.nodeType ? t : t.parentNode)
        },
        getSelectionEndElem: function(e) {
            e = e || this._currentRange;
            var t = void 0;
            if (e)
                return t = e.endContainer,
                o(1 === t.nodeType ? t : t.parentNode)
        },
        isSelectionEmpty: function() {
            var e = this._currentRange;
            return !(!e || !e.startContainer || e.startContainer !== e.endContainer || e.startOffset !== e.endOffset)
        },
        restoreSelection: function() {
            var e = window.getSelection();
            e.removeAllRanges(),
            e.addRange(this._currentRange)
        },
        createEmptyRange: function() {
            var e = this.editor
              , t = this.getRange()
              , n = void 0;
            if (t && this.isSelectionEmpty())
                try {
                    J.isWebkit() ? (e.cmd.do("insertHTML", "&#8203;"),
                    t.setEnd(t.endContainer, t.endOffset + 1),
                    this.saveRange(t)) : (n = o("<strong>&#8203;</strong>"),
                    e.cmd.do("insertElem", n),
                    this.createRangeByElem(n, !0))
                } catch (e) {}
        },
        createRangeByElem: function(e, t, n) {
            if (e.length) {
                var i = e[0]
                  , o = document.createRange();
                n ? o.selectNodeContents(i) : o.selectNode(i),
                "boolean" == typeof t && o.collapse(t),
                this.saveRange(o)
            }
        }
    },
    H.prototype = {
        constructor: H,
        show: function(e) {
            var t = this;
            if (!this._isShow) {
                this._isShow = !0;
                var n = this.$bar;
                if (this._isRender)
                    this._isRender = !0;
                else {
                    this.$textContainer.append(n)
                }
                Date.now() - this._time > 100 && e <= 1 && (n.css("width", 100 * e + "%"),
                this._time = Date.now());
                var i = this._timeoutId;
                i && clearTimeout(i),
                i = setTimeout(function() {
                    t._hide()
                }, 500)
            }
        },
        _hide: function() {
            this.$bar.remove(),
            this._time = 0,
            this._isShow = !1,
            this._isRender = !1
        }
    };
    var X = "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
    }
    ;
    L.prototype = {
        constructor: L,
        _alert: function(e, t) {
            var n = this.editor
              , i = n.config.debug
              , o = n.config.customAlert;
            if (i)
                throw new Error("wangEditor: " + (t || e));
            o && "function" == typeof o ? o(e) : alert(e)
        },
        insertLinkImg: function(e) {
            var t = this;
            if (e) {
                var n = this.editor
                  , i = n.config
                  , o = i.linkImgCheck
                  , A = void 0;
                if (o && "function" == typeof o && "string" == typeof (A = o(e)))
                    return void alert(A);
                n.cmd.do("insertHTML", '<img src="' + e + '" style="max-width:100%;"/>');
                var r = document.createElement("img");
                r.onload = function() {
                    var t = i.linkImgCallback;
                    t && "function" == typeof t && t(e),
                    r = null
                }
                ,
                r.onerror = function() {
                    r = null,
                    t._alert("插入图片错误", 'wangEditor: 插入图片出错，图片链接是 "' + e + '"，下载该链接失败')
                }
                ,
                r.onabort = function() {
                    r = null
                }
                ,
                r.src = e
            }
        },
        uploadImg: function(e) {
            var t = this;
            if (e && e.length) {
                var n = this.editor
                  , i = n.config
                  , o = i.uploadImgServer
                  , c = i.uploadImgShowBase64
                  , a = i.uploadImgMaxSize
                  , s = a / 1024 / 1024
                  , l = i.uploadImgMaxLength || 1e4
                  , d = i.uploadFileName || ""
                  , u = i.uploadImgParams || {}
                  , h = i.uploadImgParamsWithUrl
                  , p = i.uploadImgHeaders || {}
                  , f = i.uploadImgHooks || {}
                  , m = i.uploadImgTimeout || 3e3
                  , g = i.withCredentials;
                null == g && (g = !1);
                var w = i.customUploadImg;
                if (w || o || c) {
                    var v = []
                      , E = [];
                    if (r(e, function(e) {
                        var t = e.name
                          , n = e.size;
                        if (t && n)
                            return !1 === /\.(jpg|jpeg|png|bmp|gif|webp)$/i.test(t) ? void E.push("【" + t + "】不是图片") : a < n ? void E.push("【" + t + "】大于 " + s + "M") : void v.push(e)
                    }),
                    E.length)
                        return void this._alert("图片验证未通过: \n" + E.join("\n"));
                    if (v.length > l)
                        return void this._alert("一次最多上传" + l + "张图片");
                    if (w && "function" == typeof w)
                        return void w(v, this.insertLinkImg.bind(this));
                    var b = new FormData;
                    if (r(v, function(e) {
                        var t = d || e.name;
                        b.append(t, e)
                    }),
                    o && "string" == typeof o) {
                        var B = o.split("#");
                        o = B[0];
                        var y = B[1] || "";
                        A(u, function(e, t) {
                            h && (o.indexOf("?") > 0 ? o += "&" : o += "?",
                            o = o + e + "=" + t),
                            b.append(e, t)
                        }),
                        y && (o += "#" + y);
                        var C = new XMLHttpRequest;
                        if (C.open("POST", o),
                        C.timeout = m,
                        C.ontimeout = function() {
                            f.timeout && "function" == typeof f.timeout && f.timeout(C, n),
                            t._alert("上传图片超时")
                        }
                        ,
                        C.upload && (C.upload.onprogress = function(e) {
                            var t = void 0
                              , i = new H(n);
                            e.lengthComputable && (t = e.loaded / e.total,
                            i.show(t))
                        }
                        ),
                        C.onreadystatechange = function() {
                            var e = void 0;
                            if (4 === C.readyState) {
                                if (C.status < 200 || C.status >= 300)
                                    return f.error && "function" == typeof f.error && f.error(C, n),
                                    void t._alert("上传图片发生错误", "上传图片发生错误，服务器返回状态是 " + C.status);
                                if (e = C.responseText,
                                "object" !== (void 0 === e ? "undefined" : X(e)))
                                    try {
                                        e = JSON.parse(e)
                                    } catch (i) {
                                        return f.fail && "function" == typeof f.fail && f.fail(C, n, e),
                                        void t._alert("上传图片失败", "上传图片返回结果错误，返回结果是: " + e)
                                    }
                                if (f.customInsert || "0" == e.errno) {
                                    if (f.customInsert && "function" == typeof f.customInsert)
                                        f.customInsert(t.insertLinkImg.bind(t), e, n);
                                    else {
                                        (e.data || []).forEach(function(e) {
                                            t.insertLinkImg(e)
                                        })
                                    }
                                    f.success && "function" == typeof f.success && f.success(C, n, e)
                                } else
                                    f.fail && "function" == typeof f.fail && f.fail(C, n, e),
                                    t._alert("上传图片失败", "上传图片返回结果错误，返回结果 errno=" + e.errno)
                            }
                        }
                        ,
                        f.before && "function" == typeof f.before) {
                            var x = f.before(C, n, v);
                            if (x && "object" === (void 0 === x ? "undefined" : X(x)) && x.prevent)
                                return void this._alert(x.msg)
                        }
                        return A(p, function(e, t) {
                            C.setRequestHeader(e, t)
                        }),
                        C.withCredentials = g,
                        void C.send(b)
                    }
                    c && r(e, function(e) {
                        var n = t
                          , i = new FileReader;
                        i.readAsDataURL(e),
                        i.onload = function() {
                            n.insertLinkImg(this.result)
                        }
                    })
                }
            }
        }
    };
    var W = 1;
    j.prototype = {
        constructor: j,
        _initConfig: function() {
            var e = {};
            this.config = Object.assign(e, z, this.customConfig);
            var t = this.config.lang || {}
              , n = [];
            A(t, function(e, t) {
                n.push({
                    reg: new RegExp(e,"img"),
                    val: t
                })
            }),
            this.config.langArgs = n
        },
        _initDom: function() {
            var e = this
              , t = this.toolbarSelector
              , n = o(t)
              , i = this.textSelector
              , A = this.config
              , r = A.zIndex
              , a = void 0
              , s = void 0
              , l = void 0
              , d = void 0;
            null == i ? (a = o("<div></div>"),
            s = o("<div></div>"),
            d = n.children(),
            n.append(a).append(s),
            a.css("background-color", "#f1f1f1").css("border", "1px solid #ccc"),
            s.css("border", "1px solid #ccc").css("border-top", "none").css("height", "300px")) : (a = n,
            s = o(i),
            d = s.children()),
            l = o("<div></div>"),
            l.attr("contenteditable", "true").css("width", "100%").css("height", "100%"),
            d && d.length ? l.append(d) : l.append(o("<p><br></p>")),
            s.append(l),
            a.addClass("w-e-toolbar"),
            s.addClass("w-e-text-container"),
            s.css("z-index", r),
            l.addClass("w-e-text");
            var u = c("toolbar-elem");
            a.attr("id", u);
            var h = c("text-elem");
            l.attr("id", h),
            this.$toolbarElem = a,
            this.$textContainerElem = s,
            this.$textElem = l,
            this.toolbarElemId = u,
            this.textElemId = h;
            var p = !0;
            s.on("compositionstart", function() {
                p = !1
            }),
            s.on("compositionend", function() {
                p = !0
            }),
            s.on("click keyup", function() {
                p && e.change && e.change()
            }),
            a.on("click", function() {
                this.change && this.change()
            }),
            (A.onfocus || A.onblur) && (this.isFocus = !1,
            o(document).on("click", function(t) {
                var n = l.isContain(o(t.target))
                  , i = a.isContain(o(t.target))
                  , A = a[0] == t.target;
                if (n)
                    e.isFocus || e.onfocus && e.onfocus(),
                    e.isFocus = !0;
                else {
                    if (i && !A)
                        return;
                    e.isFocus && e.onblur && e.onblur(),
                    e.isFocus = !1
                }
            }))
        },
        _initCommand: function() {
            this.cmd = new Y(this)
        },
        _initSelectionAPI: function() {
            this.selection = new P(this)
        },
        _initUploadImg: function() {
            this.uploadImg = new L(this)
        },
        _initMenus: function() {
            this.menus = new _(this),
            this.menus.init()
        },
        _initText: function() {
            this.txt = new U(this),
            this.txt.init()
        },
        initSelection: function(e) {
            var t = this.$textElem
              , n = t.children();
            if (!n.length)
                return t.append(o("<p><br></p>")),
                void this.initSelection();
            var i = n.last();
            if (e) {
                var A = i.html().toLowerCase()
                  , r = i.getNodeName();
                if ("<br>" !== A && "<br/>" !== A || "P" !== r)
                    return t.append(o("<p><br></p>")),
                    void this.initSelection()
            }
            this.selection.createRangeByElem(i, !1, !0),
            this.selection.restoreSelection()
        },
        _bindEvent: function() {
            var e = 0
              , t = this.txt.html()
              , n = this.config
              , i = n.onchangeTimeout;
            (!(i = parseInt(i, 10)) || i <= 0) && (i = 200);
            var o = n.onchange;
            o && "function" == typeof o && (this.change = function() {
                var n = this.txt.html();
                n.length === t.length && n === t || (e && clearTimeout(e),
                e = setTimeout(function() {
                    o(n),
                    t = n
                }, i))
            }
            );
            var A = n.onblur;
            A && "function" == typeof A && (this.onblur = function() {
                var e = this.txt.html();
                A(e)
            }
            );
            var r = n.onfocus;
            r && "function" == typeof r && (this.onfocus = function() {
                r()
            }
            )
        },
        create: function() {
            this._initConfig(),
            this._initDom(),
            this._initCommand(),
            this._initSelectionAPI(),
            this._initText(),
            this._initMenus(),
            this._initUploadImg(),
            this.initSelection(!0),
            this._bindEvent()
        },
        _offAllEvent: function() {
            o.offAll()
        }
    };
    try {
        document
    } catch (e) {
        throw new Error("请在浏览器环境下运行")
    }
    !function() {
        "function" != typeof Object.assign && (Object.assign = function(e, t) {
            if (null == e)
                throw new TypeError("Cannot convert undefined or null to object");
            for (var n = Object(e), i = 1; i < arguments.length; i++) {
                var o = arguments[i];
                if (null != o)
                    for (var A in o)
                        Object.prototype.hasOwnProperty.call(o, A) && (n[A] = o[A])
            }
            return n
        }
        ),
        Element.prototype.matches || (Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function(e) {
            for (var t = (this.document || this.ownerDocument).querySelectorAll(e), n = t.length; --n >= 0 && t.item(n) !== this; )
                ;
            return n > -1
        }
        )
    }();
    var Z = document.createElement("style");
    return Z.type = "text/css",
    Z.innerHTML = '.w-e-toolbar,.w-e-text-container,.w-e-menu-panel {  padding: 0;  margin: 0;  box-sizing: border-box;}.w-e-toolbar *,.w-e-text-container *,.w-e-menu-panel * {  padding: 0;  margin: 0;  box-sizing: border-box;}.w-e-clear-fix:after {  content: "";  display: table;  clear: both;}.w-e-toolbar .w-e-droplist {  position: absolute;  left: 0;  top: 0;  background-color: #fff;  border: 1px solid #f1f1f1;  border-right-color: #ccc;  border-bottom-color: #ccc;}.w-e-toolbar .w-e-droplist .w-e-dp-title {  text-align: center;  color: #999;  line-height: 2;  border-bottom: 1px solid #f1f1f1;  font-size: 13px;}.w-e-toolbar .w-e-droplist ul.w-e-list {  list-style: none;  line-height: 1;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item {  color: #333;  padding: 5px 0;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover {  background-color: #f1f1f1;}.w-e-toolbar .w-e-droplist ul.w-e-block {  list-style: none;  text-align: left;  padding: 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item {  display: inline-block;  *display: inline;  *zoom: 1;  padding: 3px 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover {  background-color: #f1f1f1;}@font-face {  font-family: \'w-e-icon\';  src: url(data:application/x-font-woff;charset=utf-8;base64, ) format(\'truetype\');  font-weight: normal;  font-style: normal;}[class^="w-e-icon-"],[class*=" w-e-icon-"] {  /* use !important to prevent issues with browser extensions that change fonts */  font-family: \'w-e-icon\' !important;  speak: none;  font-style: normal;  font-weight: normal;  font-variant: normal;  text-transform: none;  line-height: 1;  /* Better Font Rendering =========== */  -webkit-font-smoothing: antialiased;  -moz-osx-font-smoothing: grayscale;}.w-e-icon-close:before {  content: "\\f00d";}.w-e-icon-upload2:before {  content: "\\e9c6";}.w-e-icon-trash-o:before {  content: "\\f014";}.w-e-icon-header:before {  content: "\\f1dc";}.w-e-icon-pencil2:before {  content: "\\e906";}.w-e-icon-paint-brush:before {  content: "\\f1fc";}.w-e-icon-image:before {  content: "\\e90d";}.w-e-icon-play:before {  content: "\\e912";}.w-e-icon-location:before {  content: "\\e947";}.w-e-icon-undo:before {  content: "\\e965";}.w-e-icon-redo:before {  content: "\\e966";}.w-e-icon-quotes-left:before {  content: "\\e977";}.w-e-icon-list-numbered:before {  content: "\\e9b9";}.w-e-icon-list2:before {  content: "\\e9bb";}.w-e-icon-link:before {  content: "\\e9cb";}.w-e-icon-happy:before {  content: "\\e9df";}.w-e-icon-bold:before {  content: "\\ea62";}.w-e-icon-underline:before {  content: "\\ea63";}.w-e-icon-italic:before {  content: "\\ea64";}.w-e-icon-strikethrough:before {  content: "\\ea65";}.w-e-icon-table2:before {  content: "\\ea71";}.w-e-icon-paragraph-left:before {  content: "\\ea77";}.w-e-icon-paragraph-center:before {  content: "\\ea78";}.w-e-icon-paragraph-right:before {  content: "\\ea79";}.w-e-icon-terminal:before {  content: "\\f120";}.w-e-icon-page-break:before {  content: "\\ea68";}.w-e-icon-cancel-circle:before {  content: "\\ea0d";}.w-e-icon-font:before {  content: "\\ea5c";}.w-e-icon-text-heigh:before {  content: "\\ea5f";}.w-e-toolbar {  display: -webkit-box;  display: -ms-flexbox;  display: flex;  padding: 0 5px;  /* flex-wrap: wrap; */  /* 单个菜单 */}.w-e-toolbar .w-e-menu {  position: relative;  text-align: center;  padding: 5px 10px;  cursor: pointer;}.w-e-toolbar .w-e-menu i {  color: #999;}.w-e-toolbar .w-e-menu:hover i {  color: #333;}.w-e-toolbar .w-e-active i {  color: #1e88e5;}.w-e-toolbar .w-e-active:hover i {  color: #1e88e5;}.w-e-text-container .w-e-panel-container {  position: absolute;  top: 0;  left: 50%;  border: 1px solid #ccc;  border-top: 0;  box-shadow: 1px 1px 2px #ccc;  color: #333;  background-color: #fff;  /* 为 emotion panel 定制的样式 */  /* 上传图片的 panel 定制样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-close {  position: absolute;  right: 0;  top: 0;  padding: 5px;  margin: 2px 5px 0 0;  cursor: pointer;  color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-close:hover {  color: #333;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title {  list-style: none;  display: -webkit-box;  display: -ms-flexbox;  display: flex;  font-size: 14px;  margin: 2px 10px 0 10px;  border-bottom: 1px solid #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-item {  padding: 3px 5px;  color: #999;  cursor: pointer;  margin: 0 3px;  position: relative;  top: 1px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-active {  color: #333;  border-bottom: 1px solid #333;  cursor: default;  font-weight: 700;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content {  padding: 10px 15px 10px 15px;  font-size: 16px;  /* 输入框的样式 */  /* 按钮的样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content button:focus {  outline: none;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea {  width: 100%;  border: 1px solid #ccc;  padding: 5px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus {  border-color: #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text] {  border: none;  border-bottom: 1px solid #ccc;  font-size: 14px;  height: 20px;  color: #333;  text-align: left;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].small {  width: 30px;  text-align: center;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].block {  display: block;  width: 100%;  margin: 10px 0;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus {  border-bottom: 2px solid #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button {  font-size: 14px;  color: #1e88e5;  border: none;  padding: 5px 10px;  background-color: #fff;  cursor: pointer;  border-radius: 3px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left {  float: left;  margin-right: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right {  float: right;  margin-left: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray {  color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red {  color: #c24f4a;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover {  background-color: #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after {  content: "";  display: table;  clear: both;}.w-e-text-container .w-e-panel-container .w-e-emoticon-container .w-e-item {  cursor: pointer;  font-size: 18px;  padding: 0 3px;  display: inline-block;  *display: inline;  *zoom: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container {  text-align: center;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn {  display: inline-block;  *display: inline;  *zoom: 1;  color: #999;  cursor: pointer;  font-size: 60px;  line-height: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover {  color: #333;}.w-e-text-container {  position: relative;}.w-e-text-container .w-e-progress {  position: absolute;  background-color: #1e88e5;  bottom: 0;  left: 0;  height: 1px;}.w-e-text {  padding: 0 10px;  overflow-y: scroll;}.w-e-text p,.w-e-text h1,.w-e-text h2,.w-e-text h3,.w-e-text h4,.w-e-text h5,.w-e-text table,.w-e-text pre {  margin: 10px 0;  line-height: 1.5;}.w-e-text ul,.w-e-text ol {  margin: 10px 0 10px 20px;}.w-e-text blockquote {  display: block;  border-left: 8px solid #d0e5f2;  padding: 5px 10px;  margin: 10px 0;  line-height: 1.4;  font-size: 100%;  background-color: #f1f1f1;}.w-e-text code {  display: inline-block;  *display: inline;  *zoom: 1;  background-color: #f1f1f1;  border-radius: 3px;  padding: 3px 5px;  margin: 0 3px;}.w-e-text pre code {  display: block;}.w-e-text table {  border-top: 1px solid #ccc;  border-left: 1px solid #ccc;}.w-e-text table td,.w-e-text table th {  border-bottom: 1px solid #ccc;  border-right: 1px solid #ccc;  padding: 3px 5px;}.w-e-text table th {  border-bottom: 2px solid #ccc;  text-align: center;}.w-e-text:focus {  outline: none;}.w-e-text img {  cursor: pointer;}.w-e-text img:hover {  box-shadow: 0 0 5px #333;}',
    document.getElementsByTagName("HEAD").item(0).appendChild(Z),
    window.wangEditor || j
});
window.wangEditor.fullscreen = {
    init: function(editorSelector) {
        $(editorSelector + " .w-e-toolbar").append('<div class="w-e-menu"><a class="_wangEditor_btn_fullscreen" href="###" onclick="window.wangEditor.fullscreen.toggleFullscreen(\'' + editorSelector + '\')">FullScreen</a></div>');
    },
    toggleFullscreen: function(editorSelector) {
        $(editorSelector).toggleClass('fullscreen-editor');
        if ($(editorSelector + ' ._wangEditor_btn_fullscreen').text() == 'FullScreen') {
            $(editorSelector + ' ._wangEditor_btn_fullscreen').text('Exit');
        } else {
            $(editorSelector + ' ._wangEditor_btn_fullscreen').text('FullScreen');
        }
    }
};
/*!
* bootstrap-fileinput v4.3.7
* http://plugins.krajee.com/file-input
*
* Author: Kartik Visweswaran
* Copyright: 2014 - 2017, Kartik Visweswaran, Krajee.com
*
* Licensed under the BSD 3-Clause
* https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
*/
!function(e) {
    "use strict";
    "function" == typeof define && define.amd ? define(["jquery"], e) : "object" == typeof module && module.exports ? module.exports = e(require("jquery")) : e(window.jQuery)
}(function(e) {
    "use strict";
    e.fn.fileinputLocales = {},
    e.fn.fileinputThemes = {};
    var i, t;
    i = {
        NAMESPACE: ".fileinput",
        MODAL_ID: "kvFileinputModal",
        FRAMES: ".kv-preview-thumb",
        SORT_CSS: "file-sortable",
        STYLE_SETTING: 'style="width:{width};height:{height};"',
        OBJECT_PARAMS: '<param name="controller" value="true" />\n<param name="allowFullScreen" value="true" />\n<param name="allowScriptAccess" value="always" />\n<param name="autoPlay" value="false" />\n<param name="autoStart" value="false" />\n<param name="quality" value="high" />\n',
        DEFAULT_PREVIEW: '<div class="file-preview-other">\n<span class="{previewFileIconClass}">{previewFileIcon}</span>\n</div>',
        objUrl: window.URL || window.webkitURL,
        compare: function(e, i, t) {
            return void 0 !== e && (t ? e === i : e.match(i))
        },
        handler: function(e, t, a, r) {
            var n = r ? t : t.split(" ").join(i.NAMESPACE + " ") + i.NAMESPACE;
            e.length && e.off(n).on(n, a)
        },
        isIE: function(e) {
            if ("Microsoft Internet Explorer" !== navigator.appName)
                return !1;
            if (10 === e)
                return new RegExp("msie\\s" + e,"i").test(navigator.userAgent);
            var i, t = document.createElement("div");
            return t.innerHTML = "<!--[if IE " + e + "]> <i></i> <![endif]-->",
            i = t.getElementsByTagName("i").length,
            document.body.appendChild(t),
            t.parentNode.removeChild(t),
            i
        },
        isEmpty: function(i, t) {
            return void 0 === i || null === i || 0 === i.length || t && "" === e.trim(i)
        },
        isArray: function(e) {
            return Array.isArray(e) || "[object Array]" === Object.prototype.toString.call(e)
        },
        ifSet: function(e, i, t) {
            return t = t || "",
            i && "object" == typeof i && e in i ? i[e] : t
        },
        getNum: function(e, i) {
            return i = i || 0,
            "number" == typeof e ? e : ("string" == typeof e && (e = parseFloat(e)),
            isNaN(e) ? i : e)
        },
        hasFileAPISupport: function() {
            return !(!window.File || !window.FileReader)
        },
        hasDragDropSupport: function() {
            var e = document.createElement("div");
            return !i.isIE(9) && (void 0 !== e.draggable || void 0 !== e.ondragstart && void 0 !== e.ondrop)
        },
        hasFileUploadSupport: function() {
            return i.hasFileAPISupport() && window.FormData
        },
        addCss: function(e, i) {
            e.removeClass(i).addClass(i)
        },
        getElement: function(t, a, r) {
            return i.isEmpty(t) || i.isEmpty(t[a]) ? r : e(t[a])
        },
        uniqId: function() {
            return Math.round((new Date).getTime() + 100 * Math.random())
        },
        htmlEncode: function(e) {
            return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;")
        },
        replaceTags: function(i, t) {
            var a = i;
            return t ? (e.each(t, function(e, i) {
                "function" == typeof i && (i = i()),
                a = a.split(e).join(i)
            }),
            a) : a
        },
        cleanMemory: function(e) {
            var t = e.is("img") ? e.attr("src") : e.find("source").attr("src");
            i.objUrl.revokeObjectURL(t)
        },
        findFileName: function(e) {
            var i = e.lastIndexOf("/");
            return -1 === i && (i = e.lastIndexOf("\\")),
            e.split(e.substring(i, i + 1)).pop()
        },
        checkFullScreen: function() {
            return document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement
        },
        toggleFullScreen: function(e) {
            var t = document
              , a = t.documentElement;
            a && e && !i.checkFullScreen() ? a.requestFullscreen ? a.requestFullscreen() : a.msRequestFullscreen ? a.msRequestFullscreen() : a.mozRequestFullScreen ? a.mozRequestFullScreen() : a.webkitRequestFullscreen && a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT) : t.exitFullscreen ? t.exitFullscreen() : t.msExitFullscreen ? t.msExitFullscreen() : t.mozCancelFullScreen ? t.mozCancelFullScreen() : t.webkitExitFullscreen && t.webkitExitFullscreen()
        },
        moveArray: function(e, i, t) {
            if (t >= e.length)
                for (var a = t - e.length; a-- + 1; )
                    e.push(void 0);
            return e.splice(t, 0, e.splice(i, 1)[0]),
            e
        },
        cleanZoomCache: function(e) {
            var i = e.closest(".kv-zoom-cache-theme");
            i.length || (i = e.closest(".kv-zoom-cache")),
            i.remove()
        }
    },
    t = function(t, a) {
        var r = this;
        r.$element = e(t),
        r._validate() && (r.isPreviewable = i.hasFileAPISupport(),
        r.isIE9 = i.isIE(9),
        r.isIE10 = i.isIE(10),
        r.isPreviewable || r.isIE9 ? (r._init(a),
        r._listen()) : r.$element.removeClass("file-loading"))
    }
    ,
    t.prototype = {
        constructor: t,
        _init: function(t) {
            var a, r = this, n = r.$element;
            r.options = t,
            e.each(t, function(e, t) {
                switch (e) {
                case "minFileCount":
                case "maxFileCount":
                case "maxFileSize":
                    r[e] = i.getNum(t);
                    break;
                default:
                    r[e] = t
                }
            }),
            r._initTemplateDefaults(),
            r.fileInputCleared = !1,
            r.fileBatchCompleted = !0,
            r.isPreviewable || (r.showPreview = !1),
            r.uploadFileAttr = i.isEmpty(n.attr("name")) ? "file_data" : n.attr("name"),
            r.reader = null,
            r.formdata = {},
            r.clearStack(),
            r.uploadCount = 0,
            r.uploadStatus = {},
            r.uploadLog = [],
            r.uploadAsyncCount = 0,
            r.loadedImages = [],
            r.totalImagesCount = 0,
            r.ajaxRequests = [],
            r.isError = !1,
            r.ajaxAborted = !1,
            r.cancelling = !1,
            a = r._getLayoutTemplate("progress"),
            r.progressTemplate = a.replace("{class}", r.progressClass),
            r.progressCompleteTemplate = a.replace("{class}", r.progressCompleteClass),
            r.progressErrorTemplate = a.replace("{class}", r.progressErrorClass),
            r.dropZoneEnabled = i.hasDragDropSupport() && r.dropZoneEnabled,
            r.isDisabled = r.$element.attr("disabled") || r.$element.attr("readonly"),
            r.isUploadable = i.hasFileUploadSupport() && !i.isEmpty(r.uploadUrl),
            r.isClickable = r.browseOnZoneClick && r.showPreview && (r.isUploadable && r.dropZoneEnabled || !i.isEmpty(r.defaultPreviewContent)),
            r.slug = "function" == typeof t.slugCallback ? t.slugCallback : r._slugDefault,
            r.mainTemplate = r.showCaption ? r._getLayoutTemplate("main1") : r._getLayoutTemplate("main2"),
            r.captionTemplate = r._getLayoutTemplate("caption"),
            r.previewGenericTemplate = r._getPreviewTemplate("generic"),
            r.resizeImage && (r.maxImageWidth || r.maxImageHeight) && (r.imageCanvas = document.createElement("canvas"),
            r.imageCanvasContext = r.imageCanvas.getContext("2d")),
            i.isEmpty(r.$element.attr("id")) && r.$element.attr("id", i.uniqId()),
            void 0 === r.$container ? r.$container = r._createContainer() : r._refreshContainer(),
            r.$dropZone = r.$container.find(".file-drop-zone"),
            r.$progress = r.$container.find(".kv-upload-progress"),
            r.$btnUpload = r.$container.find(".fileinput-upload"),
            r.$captionContainer = i.getElement(t, "elCaptionContainer", r.$container.find(".file-caption")),
            r.$caption = i.getElement(t, "elCaptionText", r.$container.find(".file-caption-name")),
            r.$previewContainer = i.getElement(t, "elPreviewContainer", r.$container.find(".file-preview")),
            r.$preview = i.getElement(t, "elPreviewImage", r.$container.find(".file-preview-thumbnails")),
            r.$previewStatus = i.getElement(t, "elPreviewStatus", r.$container.find(".file-preview-status")),
            r.$errorContainer = i.getElement(t, "elErrorContainer", r.$previewContainer.find(".kv-fileinput-error")),
            i.isEmpty(r.msgErrorClass) || i.addCss(r.$errorContainer, r.msgErrorClass),
            r.$errorContainer.hide(),
            r.previewInitId = "preview-" + i.uniqId(),
            r._initPreviewCache(),
            r._initPreview(!0),
            r._initPreviewActions(),
            r._setFileDropZoneTitle(),
            r.$element.removeClass("file-loading"),
            r.$element.attr("disabled") && r.disable(),
            r._initZoom()
        },
        _initTemplateDefaults: function() {
            var t, a, r, n, o, l, s, d, c, p, u, f, m, g, v, h, w, _, b, C, E, y, x, T, S, F, P, I, k, $, A, z, D, U, j = this;
            t = '{preview}\n<div class="kv-upload-progress hide"></div>\n<div class="input-group {class}">\n   {caption}\n   <div class="input-group-btn">\n       {remove}\n       {cancel}\n       {upload}\n       {browse}\n   </div>\n</div>',
            a = '{preview}\n<div class="kv-upload-progress hide"></div>\n{remove}\n{cancel}\n{upload}\n{browse}\n',
            r = '<div class="file-preview {class}">\n    {close}    <div class="{dropClass}">\n    <div class="file-preview-thumbnails">\n    </div>\n    <div class="clearfix"></div>    <div class="file-preview-status text-center text-success"></div>\n    <div class="kv-fileinput-error"></div>\n    </div>\n</div>',
            o = '<div class="close fileinput-remove">&times;</div>\n',
            n = '<i class="glyphicon glyphicon-file kv-caption-icon"></i>',
            l = '<div tabindex="500" class="form-control file-caption {class}">\n   <div class="file-caption-name"></div>\n</div>\n',
            s = '<button type="{type}" tabindex="500" title="{title}" class="{css}" {status}>{icon} {label}</button>',
            d = '<a href="{href}" tabindex="500" title="{title}" class="{css}" {status}>{icon} {label}</a>',
            c = '<div tabindex="500" class="{css}" {status}>{icon} {label}</div>',
            p = '<div id="' + i.MODAL_ID + '" class="file-zoom-dialog modal fade" tabindex="-1" aria-labelledby="' + i.MODAL_ID + 'Label"></div>',
            u = '<div class="modal-dialog modal-lg" role="document">\n  <div class="modal-content">\n    <div class="modal-header">\n      <div class="kv-zoom-actions pull-right">{toggleheader}{fullscreen}{borderless}{close}</div>\n      <h3 class="modal-title">{heading} <small><span class="kv-zoom-title"></span></small></h3>\n    </div>\n    <div class="modal-body">\n      <div class="floating-buttons"></div>\n      <div class="kv-zoom-body file-zoom-content"></div>\n{prev} {next}\n    </div>\n  </div>\n</div>\n',
            f = '<div class="progress">\n    <div class="{class}" role="progressbar" aria-valuenow="{percent}" aria-valuemin="0" aria-valuemax="100" style="width:{percent}%;">\n        {percent}%\n     </div>\n</div>',
            m = " <samp>({sizeText})</samp>",
            g = '<div class="file-thumbnail-footer">\n    <div class="file-footer-caption" title="{caption}">{caption}<br>{size}</div>\n    {progress} {actions}\n</div>',
            v = '<div class="file-upload-indicator" title="{indicatorTitle}">{indicator}</div>\n{drag}\n<div class="file-actions">\n    <div class="file-footer-buttons">\n        {upload} {delete} {zoom} {other}    </div>\n    <div class="clearfix"></div>\n</div>',
            h = '<button type="button" class="kv-file-remove {removeClass}" title="{removeTitle}" {dataUrl}{dataKey}>{removeIcon}</button>\n',
            w = '<button type="button" class="kv-file-upload {uploadClass}" title="{uploadTitle}">{uploadIcon}</button>',
            _ = '<button type="button" class="kv-file-zoom {zoomClass}" title="{zoomTitle}">{zoomIcon}</button>',
            b = '<span class="file-drag-handle {dragClass}" title="{dragTitle}">{dragIcon}</span>',
            C = '<div class="file-preview-frame {frameClass}" id="{previewId}" data-fileindex="{fileindex}" data-template="{template}"',
            E = C + '><div class="kv-file-content">\n',
            y = C + ' title="{caption}" ' + i.STYLE_SETTING + '><div class="kv-file-content">\n',
            x = "</div>{footer}\n</div>\n",
            T = "{content}\n",
            S = '<div class="kv-preview-data file-preview-html" title="{caption}" ' + i.STYLE_SETTING + ">{data}</div>\n",
            F = '<img src="{data}" class="kv-preview-data file-preview-image" title="{caption}" alt="{caption}" ' + i.STYLE_SETTING + ">\n",
            P = '<textarea class="kv-preview-data file-preview-text" title="{caption}" readonly ' + i.STYLE_SETTING + ">{data}</textarea>\n",
            I = '<video class="kv-preview-data" width="{width}" height="{height}" controls>\n<source src="{data}" type="{type}">\n' + i.DEFAULT_PREVIEW + "\n</video>\n",
            k = '<audio class="kv-preview-data" controls>\n<source src="{data}" type="{type}">\n' + i.DEFAULT_PREVIEW + "\n</audio>\n",
            $ = '<object class="kv-preview-data file-object" type="application/x-shockwave-flash" width="{width}" height="{height}" data="{data}">\n' + i.OBJECT_PARAMS + " " + i.DEFAULT_PREVIEW + "\n</object>\n",
            A = '<object class="kv-preview-data file-object" data="{data}" type="{type}" width="{width}" height="{height}">\n<param name="movie" value="{caption}" />\n' + i.OBJECT_PARAMS + " " + i.DEFAULT_PREVIEW + "\n</object>\n",
            z = '<embed class="kv-preview-data" src="{data}" width="{width}" height="{height}" type="application/pdf">\n',
            D = '<div class="kv-preview-data file-preview-other-frame">\n' + i.DEFAULT_PREVIEW + "\n</div>\n",
            U = '<div class="kv-zoom-cache" style="display:none">{zoomContent}</div>',
            j.defaults = {
                layoutTemplates: {
                    main1: t,
                    main2: a,
                    preview: r,
                    close: o,
                    fileIcon: n,
                    caption: l,
                    modalMain: p,
                    modal: u,
                    progress: f,
                    size: m,
                    footer: g,
                    actions: v,
                    actionDelete: h,
                    actionUpload: w,
                    actionZoom: _,
                    actionDrag: b,
                    btnDefault: s,
                    btnLink: d,
                    btnBrowse: c,
                    zoomCache: U
                },
                previewMarkupTags: {
                    tagBefore1: E,
                    tagBefore2: y,
                    tagAfter: x
                },
                previewContentTemplates: {
                    generic: T,
                    html: S,
                    image: F,
                    text: P,
                    video: I,
                    audio: k,
                    flash: $,
                    object: A,
                    pdf: z,
                    other: D
                },
                allowedPreviewTypes: ["image", "html", "text", "video", "audio", "flash", "pdf", "object"],
                previewTemplates: {},
                previewSettings: {
                    image: {
                        width: "auto",
                        height: "160px"
                    },
                    html: {
                        width: "213px",
                        height: "160px"
                    },
                    text: {
                        width: "213px",
                        height: "160px"
                    },
                    video: {
                        width: "213px",
                        height: "160px"
                    },
                    audio: {
                        width: "213px",
                        height: "80px"
                    },
                    flash: {
                        width: "213px",
                        height: "160px"
                    },
                    object: {
                        width: "160px",
                        height: "160px"
                    },
                    pdf: {
                        width: "160px",
                        height: "160px"
                    },
                    other: {
                        width: "160px",
                        height: "160px"
                    }
                },
                previewZoomSettings: {
                    image: {
                        width: "auto",
                        height: "auto",
                        "max-width": "100%",
                        "max-height": "100%"
                    },
                    html: {
                        width: "100%",
                        height: "100%",
                        "min-height": "480px"
                    },
                    text: {
                        width: "100%",
                        height: "100%",
                        "min-height": "480px"
                    },
                    video: {
                        width: "auto",
                        height: "100%",
                        "max-width": "100%"
                    },
                    audio: {
                        width: "100%",
                        height: "30px"
                    },
                    flash: {
                        width: "auto",
                        height: "480px"
                    },
                    object: {
                        width: "auto",
                        height: "100%",
                        "min-height": "480px"
                    },
                    pdf: {
                        width: "100%",
                        height: "100%",
                        "min-height": "480px"
                    },
                    other: {
                        width: "auto",
                        height: "100%",
                        "min-height": "480px"
                    }
                },
                fileTypeSettings: {
                    image: function(e, t) {
                        return i.compare(e, "image.*") || i.compare(t, /\.(gif|png|jpe?g)$/i)
                    },
                    html: function(e, t) {
                        return i.compare(e, "text/html") || i.compare(t, /\.(htm|html)$/i)
                    },
                    text: function(e, t) {
                        return i.compare(e, "text.*") || i.compare(t, /\.(xml|javascript)$/i) || i.compare(t, /\.(txt|md|csv|nfo|ini|json|php|js|css)$/i)
                    },
                    video: function(e, t) {
                        return i.compare(e, "video.*") && (i.compare(e, /(ogg|mp4|mp?g|mov|webm|3gp)$/i) || i.compare(t, /\.(og?|mp4|webm|mp?g|mov|3gp)$/i))
                    },
                    audio: function(e, t) {
                        return i.compare(e, "audio.*") && (i.compare(t, /(ogg|mp3|mp?g|wav)$/i) || i.compare(t, /\.(og?|mp3|mp?g|wav)$/i))
                    },
                    flash: function(e, t) {
                        return i.compare(e, "application/x-shockwave-flash", !0) || i.compare(t, /\.(swf)$/i)
                    },
                    pdf: function(e, t) {
                        return i.compare(e, "application/pdf", !0) || i.compare(t, /\.(pdf)$/i)
                    },
                    object: function() {
                        return !0
                    },
                    other: function() {
                        return !0
                    }
                },
                fileActionSettings: {
                    showRemove: !0,
                    showUpload: !0,
                    showZoom: !0,
                    showDrag: !0,
                    removeIcon: '<i class="glyphicon glyphicon-trash text-danger"></i>',
                    removeClass: "btn btn-xs btn-default",
                    removeTitle: "Remove file",
                    uploadIcon: '<i class="glyphicon glyphicon-upload text-info"></i>',
                    uploadClass: "btn btn-xs btn-default",
                    uploadTitle: "Upload file",
                    zoomIcon: '<i class="glyphicon glyphicon-zoom-in"></i>',
                    zoomClass: "btn btn-xs btn-default",
                    zoomTitle: "View Details",
                    dragIcon: '<i class="glyphicon glyphicon-menu-hamburger"></i>',
                    dragClass: "text-info",
                    dragTitle: "Move / Rearrange",
                    dragSettings: {},
                    indicatorNew: '<i class="glyphicon glyphicon-hand-down text-warning"></i>',
                    indicatorSuccess: '<i class="glyphicon glyphicon-ok-sign text-success"></i>',
                    indicatorError: '<i class="glyphicon glyphicon-exclamation-sign text-danger"></i>',
                    indicatorLoading: '<i class="glyphicon glyphicon-hand-up text-muted"></i>',
                    indicatorNewTitle: "Not uploaded yet",
                    indicatorSuccessTitle: "Uploaded",
                    indicatorErrorTitle: "Upload Error",
                    indicatorLoadingTitle: "Uploading ..."
                }
            },
            e.each(j.defaults, function(i, t) {
                return "allowedPreviewTypes" === i ? void (void 0 === j.allowedPreviewTypes && (j.allowedPreviewTypes = t)) : void (j[i] = e.extend(!0, t, j[i]))
            }),
            j._initPreviewTemplates()
        },
        _initPreviewTemplates: function() {
            var t, a = this, r = a.defaults, n = a.previewMarkupTags, o = n.tagAfter;
            e.each(r.previewContentTemplates, function(e, r) {
                i.isEmpty(a.previewTemplates[e]) && (t = n.tagBefore2,
                "generic" !== e && "image" !== e && "html" !== e && "text" !== e || (t = n.tagBefore1),
                a.previewTemplates[e] = t + r + o)
            })
        },
        _initPreviewCache: function() {
            var t = this;
            t.previewCache = {
                data: {},
                init: function() {
                    var e = t.initialPreview;
                    e.length > 0 && !i.isArray(e) && (e = e.split(t.initialPreviewDelimiter)),
                    t.previewCache.data = {
                        content: e,
                        config: t.initialPreviewConfig,
                        tags: t.initialPreviewThumbTags
                    }
                },
                fetch: function() {
                    return t.previewCache.data.content.filter(function(e) {
                        return null !== e
                    })
                },
                count: function(e) {
                    return t.previewCache.data && t.previewCache.data.content ? e ? t.previewCache.data.content.length : t.previewCache.fetch().length : 0
                },
                get: function(a, r) {
                    var n, o, l, s, d, c, p, u = "init_" + a, f = t.previewCache.data, m = f.config[a], g = f.content[a], v = t.previewInitId + "-" + u, h = i.ifSet("previewAsData", m, t.initialPreviewAsData), w = function(e, a, r, n, o, l, s, d, c) {
                        return d = " file-preview-initial " + i.SORT_CSS + (d ? " " + d : ""),
                        t._generatePreviewTemplate(e, a, r, n, o, !1, null, d, l, s, c)
                    };
                    return g ? (r = void 0 === r ? !0 : r,
                    l = i.ifSet("type", m, t.initialPreviewFileType || "generic"),
                    d = i.ifSet("filename", m, i.ifSet("caption", m)),
                    c = i.ifSet("filetype", m, l),
                    s = t.previewCache.footer(a, r, m && m.size || null),
                    p = i.ifSet("frameClass", m),
                    n = h ? w(l, g, d, c, v, s, u, p) : w("generic", g, d, c, v, s, u, p, l).replace(/\{content}/g, f.content[a]),
                    f.tags.length && f.tags[a] && (n = i.replaceTags(n, f.tags[a])),
                    i.isEmpty(m) || i.isEmpty(m.frameAttr) || (o = e(document.createElement("div")).html(n),
                    o.find(".file-preview-initial").attr(m.frameAttr),
                    n = o.html(),
                    o.remove()),
                    n) : ""
                },
                add: function(e, a, r, n) {
                    var o, l = t.previewCache.data;
                    return i.isArray(e) || (e = e.split(t.initialPreviewDelimiter)),
                    n ? (o = l.content.push(e) - 1,
                    l.config[o] = a,
                    l.tags[o] = r) : (o = e.length - 1,
                    l.content = e,
                    l.config = a,
                    l.tags = r),
                    t.previewCache.data = l,
                    o
                },
                set: function(e, a, r, n) {
                    var o, l, s = t.previewCache.data;
                    if (e && e.length && (i.isArray(e) || (e = e.split(t.initialPreviewDelimiter)),
                    l = e.filter(function(e) {
                        return null !== e
                    }),
                    l.length)) {
                        if (void 0 === s.content && (s.content = []),
                        void 0 === s.config && (s.config = []),
                        void 0 === s.tags && (s.tags = []),
                        n) {
                            for (o = 0; o < e.length; o++)
                                e[o] && s.content.push(e[o]);
                            for (o = 0; o < a.length; o++)
                                a[o] && s.config.push(a[o]);
                            for (o = 0; o < r.length; o++)
                                r[o] && s.tags.push(r[o])
                        } else
                            s.content = e,
                            s.config = a,
                            s.tags = r;
                        t.previewCache.data = s
                    }
                },
                unset: function(e) {
                    var i = t.previewCache.count();
                    if (i) {
                        if (1 === i)
                            return t.previewCache.data.content = [],
                            t.previewCache.data.config = [],
                            t.previewCache.data.tags = [],
                            t.initialPreview = [],
                            t.initialPreviewConfig = [],
                            void (t.initialPreviewThumbTags = []);
                        t.previewCache.data.content[e] = null,
                        t.previewCache.data.config[e] = null,
                        t.previewCache.data.tags[e] = null
                    }
                },
                out: function() {
                    var e, i, a = "", r = t.previewCache.count(!0);
                    if (0 === r)
                        return {
                            content: "",
                            caption: ""
                        };
                    for (i = 0; r > i; i++)
                        a += t.previewCache.get(i);
                    return e = t._getMsgSelected(t.previewCache.count()),
                    {
                        content: a,
                        caption: e
                    }
                },
                footer: function(e, a, r) {
                    var n = t.previewCache.data;
                    if (!n || !n.config || 0 === n.config.length || i.isEmpty(n.config[e]))
                        return "";
                    a = void 0 === a ? !0 : a;
                    var o = n.config[e]
                      , l = i.ifSet("caption", o)
                      , s = ""
                      , d = i.ifSet("width", o, "auto")
                      , c = i.ifSet("url", o, !1)
                      , p = i.ifSet("key", o, null)
                      , u = t.fileActionSettings
                      , f = i.ifSet("showDelete", o, !0)
                      , m = i.ifSet("showZoom", o, u.showZoom)
                      , g = i.ifSet("showDrag", o, u.showDrag)
                      , v = c === !1 && a;
                    return t.initialPreviewShowDelete && (s = t._renderFileActions(!1, f, m, g, v, c, p, !0)),
                    t._getLayoutTemplate("footer").replace(/\{progress}/g, t._renderThumbProgress()).replace(/\{actions}/g, s).replace(/\{caption}/g, l).replace(/\{size}/g, t._getSize(r)).replace(/\{width}/g, d).replace(/\{indicator}/g, "").replace(/\{indicatorTitle}/g, "")
                }
            },
            t.previewCache.init()
        },
        _log: function(e) {
            var i = this
              , t = i.$element.attr("id");
            t && (e = '"' + t + '": ' + e),
            "undefined" != typeof window.console.log ? window.console.log(e) : window.alert(e)
        },
        _validate: function() {
            var e = this
              , i = "file" === e.$element.attr("type");
            return i || e._log('The input "type" must be set to "file" for initializing the "bootstrap-fileinput" plugin.'),
            i
        },
        _errorsExist: function() {
            var i, t = this;
            return t.$errorContainer.find("li").length ? !0 : (i = e(document.createElement("div")).html(t.$errorContainer.html()),
            i.find("span.kv-error-close").remove(),
            i.find("ul").remove(),
            !!e.trim(i.text()).length)
        },
        _errorHandler: function(e, i) {
            var t = this
              , a = e.target.error;
            a.code === a.NOT_FOUND_ERR ? t._showError(t.msgFileNotFound.replace("{name}", i)) : a.code === a.SECURITY_ERR ? t._showError(t.msgFileSecured.replace("{name}", i)) : a.code === a.NOT_READABLE_ERR ? t._showError(t.msgFileNotReadable.replace("{name}", i)) : a.code === a.ABORT_ERR ? t._showError(t.msgFilePreviewAborted.replace("{name}", i)) : t._showError(t.msgFilePreviewError.replace("{name}", i))
        },
        _addError: function(e) {
            var t = this
              , a = t.$errorContainer;
            e && a.length && (a.html(t.errorCloseButton + e),
            i.handler(a.find(".kv-error-close"), "click", function() {
                a.fadeOut("slow")
            }))
        },
        _resetErrors: function(e) {
            var i = this
              , t = i.$errorContainer;
            i.isError = !1,
            i.$container.removeClass("has-error"),
            t.html(""),
            e ? t.fadeOut("slow") : t.hide()
        },
        _showFolderError: function(e) {
            var t, a = this, r = a.$errorContainer;
            e && (t = a.msgFoldersNotAllowed.replace(/\{n}/g, e),
            a._addError(t),
            i.addCss(a.$container, "has-error"),
            r.fadeIn(800),
            a._raise("filefoldererror", [e, t]))
        },
        _showUploadError: function(e, t, a) {
            var r = this
              , n = r.$errorContainer
              , o = a || "fileuploaderror"
              , l = t && t.id ? '<li data-file-id="' + t.id + '">' + e + "</li>" : "<li>" + e + "</li>";
            return 0 === n.find("ul").length ? r._addError("<ul>" + l + "</ul>") : n.find("ul").append(l),
            n.fadeIn(800),
            r._raise(o, [t, e]),
            r.$container.removeClass("file-input-new"),
            i.addCss(r.$container, "has-error"),
            !0
        },
        _showError: function(e, t, a) {
            var r = this
              , n = r.$errorContainer
              , o = a || "fileerror";
            return t = t || {},
            t.reader = r.reader,
            r._addError(e),
            n.fadeIn(800),
            r._raise(o, [t, e]),
            r.isUploadable || r._clearFileInput(),
            r.$container.removeClass("file-input-new"),
            i.addCss(r.$container, "has-error"),
            r.$btnUpload.attr("disabled", !0),
            !0
        },
        _noFilesError: function(e) {
            var t = this
              , a = t.minFileCount > 1 ? t.filePlural : t.fileSingle
              , r = t.msgFilesTooLess.replace("{n}", t.minFileCount).replace("{files}", a)
              , n = t.$errorContainer;
            t._addError(r),
            t.isError = !0,
            t._updateFileDetails(0),
            n.fadeIn(800),
            t._raise("fileerror", [e, r]),
            t._clearFileInput(),
            i.addCss(t.$container, "has-error")
        },
        _parseError: function(i, t, a, r) {
            var n = this
              , o = e.trim(a + "")
              , l = "." === o.slice(-1) ? "" : "."
              , s = void 0 !== t.responseJSON && void 0 !== t.responseJSON.error ? t.responseJSON.error : t.responseText;
            return n.cancelling && n.msgUploadAborted && (o = n.msgUploadAborted),
            n.showAjaxErrorDetails && s ? (s = e.trim(s.replace(/\n\s*\n/g, "\n")),
            s = s.length > 0 ? "<pre>" + s + "</pre>" : "",
            o += l + s) : o += l,
            o === l && (o = n.msgAjaxError.replace("{operation}", i)),
            n.cancelling = !1,
            r ? "<b>" + r + ": </b>" + o : o
        },
        _parseFileType: function(e) {
            var t, a, r, n, o = this, l = o.allowedPreviewTypes;
            for (n = 0; n < l.length; n++)
                if (r = l[n],
                t = o.fileTypeSettings[r],
                a = t(e.type, e.name) ? r : "",
                !i.isEmpty(a))
                    return a;
            return "other"
        },
        _getPreviewIcon: function(i) {
            var t, a = this, r = null;
            return i && i.indexOf(".") > -1 && (t = i.split(".").pop(),
            a.previewFileIconSettings && a.previewFileIconSettings[t] && (r = a.previewFileIconSettings[t]),
            a.previewFileExtSettings && e.each(a.previewFileExtSettings, function(e, i) {
                return a.previewFileIconSettings[e] && i(t) ? void (r = a.previewFileIconSettings[e]) : void 0
            })),
            r
        },
        _parseFilePreviewIcon: function(e, i) {
            var t = this
              , a = t._getPreviewIcon(i) || t.previewFileIcon;
            return e.indexOf("{previewFileIcon}") > -1 && (e = e.replace(/\{previewFileIconClass}/g, t.previewFileIconClass).replace(/\{previewFileIcon}/g, a)),
            e
        },
        _raise: function(i, t) {
            var a = this
              , r = e.Event(i);
            if (void 0 !== t ? a.$element.trigger(r, t) : a.$element.trigger(r),
            r.isDefaultPrevented())
                return !1;
            if (!r.result)
                return r.result;
            switch (i) {
            case "filebatchuploadcomplete":
            case "filebatchuploadsuccess":
            case "fileuploaded":
            case "fileclear":
            case "filecleared":
            case "filereset":
            case "fileerror":
            case "filefoldererror":
            case "fileuploaderror":
            case "filebatchuploaderror":
            case "filedeleteerror":
            case "filecustomerror":
            case "filesuccessremove":
                break;
            default:
                a.ajaxAborted = r.result
            }
            return !0
        },
        _listenFullScreen: function(e) {
            var i, t, a = this, r = a.$modal;
            r && r.length && (i = r && r.find(".btn-fullscreen"),
            t = r && r.find(".btn-borderless"),
            i.length && t.length && (i.removeClass("active").attr("aria-pressed", "false"),
            t.removeClass("active").attr("aria-pressed", "false"),
            e ? i.addClass("active").attr("aria-pressed", "true") : t.addClass("active").attr("aria-pressed", "true"),
            r.hasClass("file-zoom-fullscreen") ? a._maximizeZoomDialog() : e ? a._maximizeZoomDialog() : t.removeClass("active").attr("aria-pressed", "false")))
        },
        _listen: function() {
            var t = this
              , a = t.$element
              , r = a.closest("form")
              , n = t.$container;
            i.handler(a, "change", e.proxy(t._change, t)),
            t.showBrowse && i.handler(t.$btnFile, "click", e.proxy(t._browse, t)),
            i.handler(r, "reset", e.proxy(t.reset, t)),
            i.handler(n.find(".fileinput-remove:not([disabled])"), "click", e.proxy(t.clear, t)),
            i.handler(n.find(".fileinput-cancel"), "click", e.proxy(t.cancel, t)),
            t._initDragDrop(),
            t.isUploadable || i.handler(r, "submit", e.proxy(t._submitForm, t)),
            i.handler(t.$container.find(".fileinput-upload"), "click", e.proxy(t._uploadClick, t)),
            i.handler(e(window), "resize", function() {
                t._listenFullScreen(screen.width === window.innerWidth && screen.height === window.innerHeight)
            }),
            i.handler(e(document), "webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange", function() {
                t._listenFullScreen(i.checkFullScreen())
            }),
            t._initClickable()
        },
        _initClickable: function() {
            var t, a = this;
            a.isClickable && (t = a.isUploadable ? a.$dropZone : a.$preview.find(".file-default-preview"),
            i.addCss(t, "clickable"),
            t.attr("tabindex", -1),
            i.handler(t, "click", function(i) {
                var r = e(i.target);
                r.parents(".file-preview-thumbnails").length && !r.parents(".file-default-preview").length || (a.$element.trigger("click"),
                t.blur())
            }))
        },
        _initDragDrop: function() {
            var t = this
              , a = t.$dropZone;
            t.isUploadable && t.dropZoneEnabled && t.showPreview && (i.handler(a, "dragenter dragover", e.proxy(t._zoneDragEnter, t)),
            i.handler(a, "dragleave", e.proxy(t._zoneDragLeave, t)),
            i.handler(a, "drop", e.proxy(t._zoneDrop, t)),
            i.handler(e(document), "dragenter dragover drop", t._zoneDragDropInit))
        },
        _zoneDragDropInit: function(e) {
            e.stopPropagation(),
            e.preventDefault()
        },
        _zoneDragEnter: function(t) {
            var a = this
              , r = e.inArray("Files", t.originalEvent.dataTransfer.types) > -1;
            return a._zoneDragDropInit(t),
            a.isDisabled || !r ? (t.originalEvent.dataTransfer.effectAllowed = "none",
            void (t.originalEvent.dataTransfer.dropEffect = "none")) : void i.addCss(a.$dropZone, "file-highlighted")
        },
        _zoneDragLeave: function(e) {
            var i = this;
            i._zoneDragDropInit(e),
            i.isDisabled || i.$dropZone.removeClass("file-highlighted")
        },
        _zoneDrop: function(e) {
            var t = this;
            e.preventDefault(),
            t.isDisabled || i.isEmpty(e.originalEvent.dataTransfer.files) || (t._change(e, "dragdrop"),
            t.$dropZone.removeClass("file-highlighted"))
        },
        _uploadClick: function(e) {
            var t, a = this, r = a.$container.find(".fileinput-upload"), n = !r.hasClass("disabled") && i.isEmpty(r.attr("disabled"));
            if (!e || !e.isDefaultPrevented()) {
                if (!a.isUploadable)
                    return void (n && "submit" !== r.attr("type") && (t = r.closest("form"),
                    t.length && t.trigger("submit"),
                    e.preventDefault()));
                e.preventDefault(),
                n && a.upload()
            }
        },
        _submitForm: function() {
            var e = this
              , i = e.$element
              , t = i.get(0).files;
            return t && e.minFileCount > 0 && e._getFileCount(t.length) < e.minFileCount ? (e._noFilesError({}),
            !1) : !e._abort({})
        },
        _clearPreview: function() {
            var t = this
              , a = t.$preview
              , r = t.showUploadedThumbs ? a.find(i.FRAMES + ":not(.file-preview-success)") : a.find(i.FRAMES);
            r.each(function() {
                var t = e(this);
                t.remove(),
                i.cleanZoomCache(a.find("#zoom-" + t.attr("id")))
            }),
            t.$preview.find(i.FRAMES).length && t.showPreview || t._resetUpload(),
            t._validateDefaultPreview()
        },
        _initSortable: function() {
            var t, a = this, r = a.$preview, n = "." + i.SORT_CSS;
            window.KvSortable && 0 !== r.find(n).length && (t = {
                handle: ".drag-handle-init",
                dataIdAttr: "data-preview-id",
                draggable: n,
                onSort: function(t) {
                    var r, n, o = t.oldIndex, l = t.newIndex;
                    a.initialPreview = i.moveArray(a.initialPreview, o, l),
                    a.initialPreviewConfig = i.moveArray(a.initialPreviewConfig, o, l),
                    a.previewCache.init();
                    for (var s = 0; s < a.initialPreviewConfig.length; s++)
                        null !== a.initialPreviewConfig[s] && (r = a.initialPreviewConfig[s].key,
                        n = e(".kv-file-remove[data-key='" + r + "']").closest(i.FRAMES),
                        n.attr("data-fileindex", "init_" + s).data("fileindex", "init_" + s));
                    a._raise("filesorted", {
                        previewId: e(t.item).attr("id"),
                        oldIndex: o,
                        newIndex: l,
                        stack: a.initialPreviewConfig
                    })
                }
            },
            r.data("kvsortable") && r.kvsortable("destroy"),
            e.extend(!0, t, a.fileActionSettings.dragSettings),
            r.kvsortable(t))
        },
        _initPreview: function(e) {
            var t, a = this, r = a.initialCaption || "";
            return a.previewCache.count() ? (t = a.previewCache.out(),
            r = e && a.initialCaption ? a.initialCaption : t.caption,
            a.$preview.html(t.content),
            a._setInitThumbAttr(),
            a._setCaption(r),
            a._initSortable(),
            void (i.isEmpty(t.content) || a.$container.removeClass("file-input-new"))) : (a._clearPreview(),
            void (e ? a._setCaption(r) : a._initCaption()))
        },
        _getZoomButton: function(e) {
            var i = this
              , t = i.previewZoomButtonIcons[e]
              , a = i.previewZoomButtonClasses[e]
              , r = ' title="' + (i.previewZoomButtonTitles[e] || "") + '" '
              , n = r + ("close" === e ? ' data-dismiss="modal" aria-hidden="true"' : "");
            return "fullscreen" !== e && "borderless" !== e && "toggleheader" !== e || (n += ' data-toggle="button" aria-pressed="false" autocomplete="off"'),
            '<button type="button" class="' + a + " btn-" + e + '"' + n + ">" + t + "</button>"
        },
        _getModalContent: function() {
            var e = this;
            return e._getLayoutTemplate("modal").replace(/\{heading}/g, e.msgZoomModalHeading).replace(/\{prev}/g, e._getZoomButton("prev")).replace(/\{next}/g, e._getZoomButton("next")).replace(/\{toggleheader}/g, e._getZoomButton("toggleheader")).replace(/\{fullscreen}/g, e._getZoomButton("fullscreen")).replace(/\{borderless}/g, e._getZoomButton("borderless")).replace(/\{close}/g, e._getZoomButton("close"))
        },
        _listenModalEvent: function(e) {
            var t = this
              , a = t.$modal
              , r = function(e) {
                return {
                    sourceEvent: e,
                    previewId: a.data("previewId"),
                    modal: a
                }
            };
            a.on(e + ".bs.modal", function(n) {
                var o = a.find(".btn-fullscreen")
                  , l = a.find(".btn-borderless");
                t._raise("filezoom" + e, r(n)),
                "shown" === e && (l.removeClass("active").attr("aria-pressed", "false"),
                o.removeClass("active").attr("aria-pressed", "false"),
                a.hasClass("file-zoom-fullscreen") && (t._maximizeZoomDialog(),
                i.checkFullScreen() ? o.addClass("active").attr("aria-pressed", "true") : l.addClass("active").attr("aria-pressed", "true")))
            })
        },
        _initZoom: function() {
            var t, a = this, r = a._getLayoutTemplate("modalMain"), n = "#" + i.MODAL_ID;
            a.$modal = e(n),
            a.$modal && a.$modal.length || (t = e(document.createElement("div")).html(r).insertAfter(a.$container),
            a.$modal = e("#" + i.MODAL_ID).insertBefore(t),
            t.remove()),
            a.$modal.html(a._getModalContent()),
            a._listenModalEvent("show"),
            a._listenModalEvent("shown"),
            a._listenModalEvent("hide"),
            a._listenModalEvent("hidden"),
            a._listenModalEvent("loaded")
        },
        _initZoomButtons: function() {
            var t, a, r = this, n = r.$modal.data("previewId") || "", o = r.$preview, l = o.find(i.FRAMES).toArray(), s = l.length, d = r.$modal.find(".btn-prev"), c = r.$modal.find(".btn-next");
            return l.length < 2 ? (d.hide(),
            void c.hide()) : (d.show(),
            c.show(),
            void (s && (t = e(l[0]),
            a = e(l[s - 1]),
            d.removeAttr("disabled"),
            c.removeAttr("disabled"),
            t.length && t.attr("id") === n && d.attr("disabled", !0),
            a.length && a.attr("id") === n && c.attr("disabled", !0))))
        },
        _maximizeZoomDialog: function() {
            var i = this
              , t = i.$modal
              , a = t.find(".modal-header:visible")
              , r = t.find(".modal-footer:visible")
              , n = t.find(".modal-body")
              , o = e(window).height()
              , l = 0;
            t.addClass("file-zoom-fullscreen"),
            a && a.length && (o -= a.outerHeight(!0)),
            r && r.length && (o -= r.outerHeight(!0)),
            n && n.length && (l = n.outerHeight(!0) - n.height(),
            o -= l),
            t.find(".kv-zoom-body").height(o)
        },
        _resizeZoomDialog: function(e) {
            var t = this
              , a = t.$modal
              , r = a.find(".btn-fullscreen")
              , n = a.find(".btn-borderless");
            if (a.hasClass("file-zoom-fullscreen"))
                i.toggleFullScreen(!1),
                e ? r.hasClass("active") || (a.removeClass("file-zoom-fullscreen"),
                t._resizeZoomDialog(!0),
                n.hasClass("active") && n.removeClass("active").attr("aria-pressed", "false")) : r.hasClass("active") ? r.removeClass("active").attr("aria-pressed", "false") : (a.removeClass("file-zoom-fullscreen"),
                t.$modal.find(".kv-zoom-body").css("height", t.zoomModalHeight));
            else {
                if (!e)
                    return void t._maximizeZoomDialog();
                i.toggleFullScreen(!0)
            }
            a.focus()
        },
        _setZoomContent: function(t, a) {
            var r, n, o, l, s, d, c, p, u, f, m = this, g = t.attr("id"), v = m.$modal, h = v.find(".btn-prev"), w = v.find(".btn-next"), _ = v.find(".btn-fullscreen"), b = v.find(".btn-borderless"), C = v.find(".btn-toggleheader"), E = m.$preview.find("#zoom-" + g);
            n = E.attr("data-template") || "generic",
            r = E.find(".kv-file-content"),
            o = r.length ? r.html() : "",
            u = t.data("caption") || "",
            f = t.data("size") || "",
            l = u + " " + f,
            v.find(".kv-zoom-title").html(l),
            s = v.find(".kv-zoom-body"),
            v.removeClass("kv-single-content"),
            a ? (p = s.clone().insertAfter(s),
            s.html(o).hide(),
            p.fadeOut("fast", function() {
                s.fadeIn("fast"),
                p.remove()
            })) : s.html(o),
            c = m.previewZoomSettings[n],
            c && (d = s.find(".kv-preview-data"),
            i.addCss(d, "file-zoom-detail"),
            e.each(c, function(e, i) {
                d.css(e, i),
                (d.attr("width") && "width" === e || d.attr("height") && "height" === e) && d.removeAttr(e)
            })),
            v.data("previewId", g),
            i.handler(h, "click", function() {
                m._zoomSlideShow("prev", g)
            }),
            i.handler(w, "click", function() {
                m._zoomSlideShow("next", g)
            }),
            i.handler(_, "click", function() {
                m._resizeZoomDialog(!0)
            }),
            i.handler(b, "click", function() {
                m._resizeZoomDialog(!1)
            }),
            i.handler(C, "click", function() {
                var e, i = v.find(".modal-header"), t = v.find(".modal-body .floating-buttons"), a = i.find(".kv-zoom-actions"), r = function(e) {
                    var t = m.$modal.find(".kv-zoom-body")
                      , a = m.zoomModalHeight;
                    v.hasClass("file-zoom-fullscreen") && (a = t.outerHeight(!0),
                    e || (a -= i.outerHeight(!0))),
                    t.css("height", e ? a + e : a)
                };
                i.is(":visible") ? (e = i.outerHeight(!0),
                i.slideUp("slow", function() {
                    a.find(".btn").appendTo(t),
                    r(e)
                })) : (t.find(".btn").appendTo(a),
                i.slideDown("slow", function() {
                    r()
                })),
                v.focus()
            }),
            i.handler(v, "keydown", function(e) {
                var i = e.which || e.keyCode;
                37 !== i || h.attr("disabled") || m._zoomSlideShow("prev", g),
                39 !== i || w.attr("disabled") || m._zoomSlideShow("next", g)
            })
        },
        _zoomPreview: function(t) {
            var a, r = this, n = e("body"), o = r.$modal;
            if (!t.length)
                throw "Cannot zoom to detailed preview!";
            n.length && o.appendTo(n),
            o.html(r._getModalContent()),
            a = t.closest(i.FRAMES),
            r._setZoomContent(a),
            o.modal("show"),
            r._initZoomButtons()
        },
        _zoomSlideShow: function(t, a) {
            var r, n, o, l = this, s = l.$modal.find(".kv-zoom-actions .btn-" + t), d = l.$preview.find(i.FRAMES).toArray(), c = d.length;
            if (!s.attr("disabled")) {
                for (n = 0; c > n; n++)
                    if (e(d[n]).attr("id") === a) {
                        o = "prev" === t ? n - 1 : n + 1;
                        break
                    }
                0 > o || o >= c || !d[o] || (r = e(d[o]),
                r.length && l._setZoomContent(r, !0),
                l._initZoomButtons(),
                l._raise("filezoom" + t, {
                    previewId: a,
                    modal: l.$modal
                }))
            }
        },
        _initZoomButton: function() {
            var t = this;
            t.$preview.find(".kv-file-zoom").each(function() {
                var a = e(this);
                i.handler(a, "click", function() {
                    t._zoomPreview(a)
                })
            })
        },
        _initPreviewActions: function() {
            var t = this
              , a = t.$preview
              , r = t.deleteExtraData || {}
              , n = i.FRAMES + " .kv-file-remove"
              , o = function() {
                var e = t.isUploadable ? t.previewCache.count() : t.$element.get(0).files.length;
                0 !== a.find(n).length || e || (t.reset(),
                t.initialCaption = "")
            };
            t._initZoomButton(),
            a.find(n).each(function() {
                var n = e(this)
                  , l = n.data("url") || t.deleteUrl
                  , s = n.data("key");
                if (!i.isEmpty(l) && void 0 !== s) {
                    var d, c, p, u, f = n.closest(i.FRAMES), m = t.previewCache.data, g = f.data("fileindex");
                    g = parseInt(g.replace("init_", "")),
                    p = i.isEmpty(m.config) && i.isEmpty(m.config[g]) ? null : m.config[g],
                    u = i.isEmpty(p) || i.isEmpty(p.extra) ? r : p.extra,
                    "function" == typeof u && (u = u()),
                    c = {
                        id: n.attr("id"),
                        key: s,
                        extra: u
                    },
                    d = e.extend(!0, {}, {
                        url: l,
                        type: "POST",
                        dataType: "json",
                        data: e.extend(!0, {}, {
                            key: s
                        }, u),
                        beforeSend: function(e) {
                            t.ajaxAborted = !1,
                            t._raise("filepredelete", [s, e, u]),
                            t.ajaxAborted ? e.abort() : (i.addCss(f, "file-uploading"),
                            i.addCss(n, "disabled"))
                        },
                        success: function(e, r, l) {
                            var d, p;
                            return i.isEmpty(e) || i.isEmpty(e.error) ? (t.previewCache.init(),
                            g = parseInt(f.data("fileindex").replace("init_", "")),
                            t.previewCache.unset(g),
                            d = t.previewCache.count(),
                            p = d > 0 ? t._getMsgSelected(d) : "",
                            t._raise("filedeleted", [s, l, u]),
                            t._setCaption(p),
                            f.removeClass("file-uploading").addClass("file-deleted"),
                            void f.fadeOut("slow", function() {
                                i.cleanZoomCache(a.find("#zoom-" + f.attr("id"))),
                                t._clearObjects(f),
                                f.remove(),
                                o(),
                                d || 0 !== t.getFileStack().length || (t._setCaption(""),
                                t.reset())
                            })) : (c.jqXHR = l,
                            c.response = e,
                            t._showError(e.error, c, "filedeleteerror"),
                            f.removeClass("file-uploading"),
                            n.removeClass("disabled"),
                            void o())
                        },
                        error: function(e, i, a) {
                            var r = t.ajaxOperations.deleteThumb
                              , n = t._parseError(r, e, a);
                            c.jqXHR = e,
                            c.response = {},
                            t._showError(n, c, "filedeleteerror"),
                            f.removeClass("file-uploading"),
                            o()
                        }
                    }, t.ajaxDeleteSettings),
                    i.handler(n, "click", function() {
                        return t._validateMinCount() ? void e.ajax(d) : !1
                    })
                }
            })
        },
        _clearObjects: function(i) {
            i.find("video audio").each(function() {
                this.pause(),
                e(this).remove()
            }),
            i.find("img object div").each(function() {
                e(this).remove()
            })
        },
        _clearFileInput: function() {
            var t, a, r, n = this, o = n.$element;
            n.fileInputCleared = !0,
            i.isEmpty(o.val()) || (n.isIE9 || n.isIE10 ? (t = o.closest("form"),
            a = e(document.createElement("form")),
            r = e(document.createElement("div")),
            o.before(r),
            t.length ? t.after(a) : r.after(a),
            a.append(o).trigger("reset"),
            r.before(o).remove(),
            a.remove()) : o.val(""))
        },
        _resetUpload: function() {
            var e = this;
            e.uploadCache = {
                content: [],
                config: [],
                tags: [],
                append: !0
            },
            e.uploadCount = 0,
            e.uploadStatus = {},
            e.uploadLog = [],
            e.uploadAsyncCount = 0,
            e.loadedImages = [],
            e.totalImagesCount = 0,
            e.$btnUpload.removeAttr("disabled"),
            e._setProgress(0),
            i.addCss(e.$progress, "hide"),
            e._resetErrors(!1),
            e.ajaxAborted = !1,
            e.ajaxRequests = [],
            e._resetCanvas(),
            e.cacheInitialPreview = {}
        },
        _resetCanvas: function() {
            var e = this;
            e.canvas && e.imageCanvasContext && e.imageCanvasContext.clearRect(0, 0, e.canvas.width, e.canvas.height)
        },
        _hasInitialPreview: function() {
            var e = this;
            return !e.overwriteInitial && e.previewCache.count()
        },
        _resetPreview: function() {
            var e, i, t = this;
            t.previewCache.count() ? (e = t.previewCache.out(),
            t.$preview.html(e.content),
            t._setInitThumbAttr(),
            i = t.initialCaption ? t.initialCaption : e.caption,
            t._setCaption(i)) : (t._clearPreview(),
            t._initCaption()),
            t.showPreview && (t._initZoom(),
            t._initSortable())
        },
        _clearDefaultPreview: function() {
            var e = this;
            e.$preview.find(".file-default-preview").remove()
        },
        _validateDefaultPreview: function() {
            var e = this;
            e.showPreview && !i.isEmpty(e.defaultPreviewContent) && (e.$preview.html('<div class="file-default-preview">' + e.defaultPreviewContent + "</div>"),
            e.$container.removeClass("file-input-new"),
            e._initClickable())
        },
        _resetPreviewThumbs: function(e) {
            var i, t = this;
            return e ? (t._clearPreview(),
            void t.clearStack()) : void (t._hasInitialPreview() ? (i = t.previewCache.out(),
            t.$preview.html(i.content),
            t._setInitThumbAttr(),
            t._setCaption(i.caption),
            t._initPreviewActions()) : t._clearPreview())
        },
        _getLayoutTemplate: function(e) {
            var t = this
              , a = t.layoutTemplates[e];
            return i.isEmpty(t.customLayoutTags) ? a : i.replaceTags(a, t.customLayoutTags)
        },
        _getPreviewTemplate: function(e) {
            var t = this
              , a = t.previewTemplates[e];
            return i.isEmpty(t.customPreviewTags) ? a : i.replaceTags(a, t.customPreviewTags)
        },
        _getOutData: function(e, i, t) {
            var a = this;
            return e = e || {},
            i = i || {},
            t = t || a.filestack.slice(0) || {},
            {
                form: a.formdata,
                files: t,
                filenames: a.filenames,
                filescount: a.getFilesCount(),
                extra: a._getExtraData(),
                response: i,
                reader: a.reader,
                jqXHR: e
            }
        },
        _getMsgSelected: function(e) {
            var i = this
              , t = 1 === e ? i.fileSingle : i.filePlural;
            return e > 0 ? i.msgSelected.replace("{n}", e).replace("{files}", t) : i.msgNoFilesSelected
        },
        _getThumbs: function(e) {
            return e = e || "",
            this.$preview.find(i.FRAMES + ":not(.file-preview-initial)" + e)
        },
        _getExtraData: function(e, i) {
            var t = this
              , a = t.uploadExtraData;
            return "function" == typeof t.uploadExtraData && (a = t.uploadExtraData(e, i)),
            a
        },
        _initXhr: function(e, i, t) {
            var a = this;
            return e.upload && e.upload.addEventListener("progress", function(e) {
                var r = 0
                  , n = e.total
                  , o = e.loaded || e.position;
                e.lengthComputable && (r = Math.floor(o / n * 100)),
                i ? a._setAsyncUploadStatus(i, r, t) : a._setProgress(r)
            }, !1),
            e
        },
        _ajaxSubmit: function(i, t, a, r, n, o) {
            var l, s = this;
            s._raise("filepreajax", [n, o]),
            s._uploadExtra(n, o),
            l = e.extend(!0, {}, {
                xhr: function() {
                    var i = e.ajaxSettings.xhr();
                    return s._initXhr(i, n, s.getFileStack().length)
                },
                url: s.uploadUrl,
                type: "POST",
                dataType: "json",
                data: s.formdata,
                cache: !1,
                processData: !1,
                contentType: !1,
                beforeSend: i,
                success: t,
                complete: a,
                error: r
            }, s.ajaxSettings),
            s.ajaxRequests.push(e.ajax(l))
        },
        _initUploadSuccess: function(t, a, r) {
            var n, o, l, s, d, c, p, u, f, m = this, g = function(e, i) {
                m[e]instanceof Array || (m[e] = []),
                i && i.length && (m[e] = m[e].concat(i))
            };
            m.showPreview && "object" == typeof t && !e.isEmptyObject(t) && void 0 !== t.initialPreview && t.initialPreview.length > 0 && (m.hasInitData = !0,
            c = t.initialPreview || [],
            p = t.initialPreviewConfig || [],
            u = t.initialPreviewThumbTags || [],
            n = !(void 0 !== t.append && !t.append),
            c.length > 0 && !i.isArray(c) && (c = c.split(m.initialPreviewDelimiter)),
            m.overwriteInitial = !1,
            g("initialPreview", c),
            g("initialPreviewConfig", p),
            g("initialPreviewThumbTags", u),
            void 0 !== a ? r ? (f = a.attr("data-fileindex"),
            m.uploadCache.content[f] = c[0],
            m.uploadCache.config[f] = p[0] || [],
            m.uploadCache.tags[f] = u[0] || [],
            m.uploadCache.append = n) : (l = m.previewCache.add(c, p[0], u[0], n),
            o = m.previewCache.get(l, !1),
            s = e(document.createElement("div")).html(o).hide().insertAfter(a),
            d = s.find(".kv-zoom-cache"),
            d && d.length && d.insertAfter(a),
            a.fadeOut("slow", function() {
                var e = s.find(".file-preview-frame");
                e && e.length && e.insertBefore(a).fadeIn("slow").css("display:inline-block"),
                m._initPreviewActions(),
                m._clearFileInput(),
                i.cleanZoomCache(m.$preview.find("#zoom-" + a.attr("id"))),
                a.remove(),
                s.remove(),
                m._initSortable()
            })) : (m.previewCache.set(c, p, u, n),
            m._initPreview(),
            m._initPreviewActions()))
        },
        _initSuccessThumbs: function() {
            var t = this;
            t.showPreview && t._getThumbs(i.FRAMES + " .file-preview-success").each(function() {
                var a = e(this)
                  , r = t.$preview
                  , n = a.find(".kv-file-remove");
                n.removeAttr("disabled"),
                i.handler(n, "click", function() {
                    var e = a.attr("id")
                      , n = t._raise("filesuccessremove", [e, a.data("fileindex")]);
                    i.cleanMemory(a),
                    n !== !1 && a.fadeOut("slow", function() {
                        i.cleanZoomCache(r.find("#zoom-" + e)),
                        a.remove(),
                        r.find(i.FRAMES).length || t.reset()
                    })
                })
            })
        },
        _checkAsyncComplete: function() {
            var i, t, a = this;
            for (t = 0; t < a.filestack.length; t++)
                if (a.filestack[t] && (i = a.previewInitId + "-" + t,
                -1 === e.inArray(i, a.uploadLog)))
                    return !1;
            return a.uploadAsyncCount === a.uploadLog.length
        },
        _uploadExtra: function(i, t) {
            var a = this
              , r = a._getExtraData(i, t);
            0 !== r.length && e.each(r, function(e, i) {
                a.formdata.append(e, i)
            })
        },
        _uploadSingle: function(t, a, r) {
            var n, o, l, s, d, c, p, u, f, m, g = this, v = g.getFileStack().length, h = new FormData, w = g.previewInitId + "-" + t, _ = g.filestack.length > 0 || !e.isEmptyObject(g.uploadExtraData), b = e("#" + w).find(".file-thumb-progress"), C = {
                id: w,
                index: t
            };
            g.formdata = h,
            g.showPreview && (o = e("#" + w + ":not(.file-preview-initial)"),
            s = o.find(".kv-file-upload"),
            d = o.find(".kv-file-remove"),
            b.removeClass("hide")),
            0 === v || !_ || s && s.hasClass("disabled") || g._abort(C) || (m = function(e, i) {
                g.updateStack(e, void 0),
                g.uploadLog.push(i),
                g._checkAsyncComplete() && (g.fileBatchCompleted = !0)
            }
            ,
            l = function() {
                var e, t, a, r, n = g.uploadCache, o = g.cacheInitialPreview;
                g.fileBatchCompleted && setTimeout(function() {
                    if (g.showPreview) {
                        if (g.previewCache.set(n.content, n.config, n.tags, n.append),
                        r = o && o.content ? o.content.length : 0) {
                            for (t = 0; t < n.content.length; t++)
                                a = t + r,
                                o.content[a] = n.content[t],
                                o.config.length && (o.config[a] = n.config[t]),
                                o.tags.length && (o.tags[a] = n.tags[t]);
                            g.initialPreview = o.content,
                            g.initialPreviewConfig = o.config,
                            g.initialPreviewThumbTags = o.tags
                        } else
                            g.initialPreview = n.content,
                            g.initialPreviewConfig = n.config,
                            g.initialPreviewThumbTags = n.tags;
                        g.cacheInitialPreview = {},
                        g.hasInitData && (g._initPreview(),
                        g._initPreviewActions())
                    }
                    g.unlock(),
                    g._clearFileInput(),
                    e = g.$preview.find(".file-preview-initial"),
                    g.uploadAsync && e.length && (i.addCss(e, i.SORT_CSS),
                    g._initSortable()),
                    g._raise("filebatchuploadcomplete", [g.filestack, g._getExtraData()]),
                    g.uploadCount = 0,
                    g.uploadStatus = {},
                    g.uploadLog = [],
                    g._setProgress(101)
                }, 100)
            }
            ,
            c = function(a) {
                n = g._getOutData(a),
                g.fileBatchCompleted = !1,
                g.showPreview && (o.hasClass("file-preview-success") || (g._setThumbStatus(o, "Loading"),
                i.addCss(o, "file-uploading")),
                s.attr("disabled", !0),
                d.attr("disabled", !0)),
                r || g.lock(),
                g._raise("filepreupload", [n, w, t]),
                e.extend(!0, C, n),
                g._abort(C) && (a.abort(),
                g._setProgressCancelled())
            }
            ,
            p = function(a, l, d) {
                var c = g.showPreview && o.attr("id") ? o.attr("id") : w;
                n = g._getOutData(d, a),
                e.extend(!0, C, n),
                setTimeout(function() {
                    i.isEmpty(a) || i.isEmpty(a.error) ? (g.showPreview && (g._setThumbStatus(o, "Success"),
                    s.hide(),
                    g._initUploadSuccess(a, o, r),
                    g._setProgress(101, b)),
                    g._raise("fileuploaded", [n, c, t]),
                    r ? m(t, c) : g.updateStack(t, void 0)) : (g._showUploadError(a.error, C),
                    g._setPreviewError(o, t),
                    r && m(t, c))
                }, 100)
            }
            ,
            u = function() {
                setTimeout(function() {
                    g.showPreview && (s.removeAttr("disabled"),
                    d.removeAttr("disabled"),
                    o.removeClass("file-uploading")),
                    r ? l() : (g.unlock(!1),
                    g._clearFileInput()),
                    g._initSuccessThumbs()
                }, 100)
            }
            ,
            f = function(i, n, l) {
                var s = g.ajaxOperations.uploadThumb
                  , d = g._parseError(s, i, l, r ? a[t].name : null);
                setTimeout(function() {
                    r && m(t, w),
                    g.uploadStatus[w] = 100,
                    g._setPreviewError(o, t),
                    e.extend(!0, C, g._getOutData(i)),
                    g._setProgress(101, b, g.msgAjaxProgressError.replace("{operation}", s)),
                    g._showUploadError(d, C)
                }, 100)
            }
            ,
            h.append(g.uploadFileAttr, a[t], g.filenames[t]),
            h.append("file_id", t),
            g._ajaxSubmit(c, p, u, f, w, t))
        },
        _uploadBatch: function() {
            var t, a, r, n, o, l = this, s = l.filestack, d = s.length, c = {}, p = l.filestack.length > 0 || !e.isEmptyObject(l.uploadExtraData);
            l.formdata = new FormData,
            0 !== d && p && !l._abort(c) && (o = function() {
                e.each(s, function(e) {
                    l.updateStack(e, void 0)
                }),
                l._clearFileInput()
            }
            ,
            t = function(t) {
                l.lock();
                var a = l._getOutData(t);
                l.showPreview && l._getThumbs().each(function() {
                    var t = e(this)
                      , a = t.find(".kv-file-upload")
                      , r = t.find(".kv-file-remove");
                    t.hasClass("file-preview-success") || (l._setThumbStatus(t, "Loading"),
                    i.addCss(t, "file-uploading")),
                    a.attr("disabled", !0),
                    r.attr("disabled", !0)
                }),
                l._raise("filebatchpreupload", [a]),
                l._abort(a) && (t.abort(),
                l._setProgressCancelled())
            }
            ,
            a = function(t, a, r) {
                var n = l._getOutData(r, t)
                  , s = l._getThumbs(":not(.file-preview-error)")
                  , d = 0
                  , c = i.isEmpty(t) || i.isEmpty(t.errorkeys) ? [] : t.errorkeys;
                i.isEmpty(t) || i.isEmpty(t.error) ? (l._raise("filebatchuploadsuccess", [n]),
                o(),
                l.showPreview ? (s.each(function() {
                    var i = e(this)
                      , t = i.find(".kv-file-upload");
                    i.find(".kv-file-upload").hide(),
                    l._setThumbStatus(i, "Success"),
                    i.removeClass("file-uploading"),
                    t.removeAttr("disabled")
                }),
                l._initUploadSuccess(t)) : l.reset(),
                l._setProgress(101)) : (l.showPreview && (s.each(function() {
                    var i = e(this)
                      , t = i.find(".kv-file-remove")
                      , a = i.find(".kv-file-upload");
                    return i.removeClass("file-uploading"),
                    a.removeAttr("disabled"),
                    t.removeAttr("disabled"),
                    0 === c.length ? void l._setPreviewError(i) : (-1 !== e.inArray(d, c) ? l._setPreviewError(i) : (i.find(".kv-file-upload").hide(),
                    l._setThumbStatus(i, "Success"),
                    l.updateStack(d, void 0)),
                    void d++)
                }),
                l._initUploadSuccess(t)),
                l._showUploadError(t.error, n, "filebatchuploaderror"))
            }
            ,
            n = function() {
                l.unlock(),
                l._initSuccessThumbs(),
                l._clearFileInput(),
                l._raise("filebatchuploadcomplete", [l.filestack, l._getExtraData()])
            }
            ,
            r = function(i, t, a) {
                var r = l._getOutData(i)
                  , n = l.ajaxOperations.uploadBatch
                  , o = l._parseError(n, i, a);
                l._showUploadError(o, r, "filebatchuploaderror"),
                l.uploadFileCount = d - 1,
                l.showPreview && (l._getThumbs().each(function() {
                    var i = e(this)
                      , t = i.attr("data-fileindex");
                    i.removeClass("file-uploading"),
                    void 0 !== l.filestack[t] && l._setPreviewError(i)
                }),
                l._getThumbs().removeClass("file-uploading"),
                l._getThumbs(" .kv-file-upload").removeAttr("disabled"),
                l._getThumbs(" .kv-file-delete").removeAttr("disabled"),
                l._setProgress(101, l.$progress, l.msgAjaxProgressError.replace("{operation}", n)))
            }
            ,
            e.each(s, function(e, t) {
                i.isEmpty(s[e]) || l.formdata.append(l.uploadFileAttr, t, l.filenames[e])
            }),
            l._ajaxSubmit(t, a, n, r))
        },
        _uploadExtraOnly: function() {
            var e, t, a, r, n = this, o = {};
            n.formdata = new FormData,
            n._abort(o) || (e = function(e) {
                n.lock();
                var i = n._getOutData(e);
                n._raise("filebatchpreupload", [i]),
                n._setProgress(50),
                o.data = i,
                o.xhr = e,
                n._abort(o) && (e.abort(),
                n._setProgressCancelled())
            }
            ,
            t = function(e, t, a) {
                var r = n._getOutData(a, e);
                i.isEmpty(e) || i.isEmpty(e.error) ? (n._raise("filebatchuploadsuccess", [r]),
                n._clearFileInput(),
                n._initUploadSuccess(e),
                n._setProgress(101)) : n._showUploadError(e.error, r, "filebatchuploaderror")
            }
            ,
            a = function() {
                n.unlock(),
                n._clearFileInput(),
                n._raise("filebatchuploadcomplete", [n.filestack, n._getExtraData()])
            }
            ,
            r = function(e, i, t) {
                var a = n._getOutData(e)
                  , r = n.ajaxOperations.uploadExtra
                  , l = n._parseError(r, e, t);
                o.data = a,
                n._showUploadError(l, a, "filebatchuploaderror"),
                n._setProgress(101, n.$progress, n.msgAjaxProgressError.replace("{operation}", r))
            }
            ,
            n._ajaxSubmit(e, t, a, r))
        },
        _initFileActions: function() {
            var t = this
              , a = t.$preview;
            t.showPreview && (t._initZoomButton(),
            a.find(i.FRAMES + " .kv-file-remove").each(function() {
                var r, n, o, l, s = e(this), d = s.closest(i.FRAMES), c = d.attr("id"), p = d.attr("data-fileindex");
                i.handler(s, "click", function() {
                    return l = t._raise("filepreremove", [c, p]),
                    l !== !1 && t._validateMinCount() ? (r = d.hasClass("file-preview-error"),
                    i.cleanMemory(d),
                    void d.fadeOut("slow", function() {
                        i.cleanZoomCache(a.find("#zoom-" + c)),
                        t.updateStack(p, void 0),
                        t._clearObjects(d),
                        d.remove(),
                        c && r && t.$errorContainer.find('li[data-file-id="' + c + '"]').fadeOut("fast", function() {
                            e(this).remove(),
                            t._errorsExist() || t._resetErrors()
                        }),
                        t._clearFileInput();
                        var l = t.getFileStack(!0)
                          , s = t.previewCache.count()
                          , u = l.length
                          , f = t.showPreview && a.find(i.FRAMES).length;
                        0 !== u || 0 !== s || f ? (n = s + u,
                        o = n > 1 ? t._getMsgSelected(n) : l[0] ? t._getFileNames()[0] : "",
                        t._setCaption(o)) : t.reset(),
                        t._raise("fileremoved", [c, p])
                    })) : !1
                })
            }),
            t.$preview.find(i.FRAMES + " .kv-file-upload").each(function() {
                var a = e(this);
                i.handler(a, "click", function() {
                    var e = a.closest(i.FRAMES)
                      , r = e.attr("data-fileindex");
                    e.hasClass("file-preview-error") || t._uploadSingle(r, t.filestack, !1)
                })
            }))
        },
        _hideFileIcon: function() {
            this.overwriteInitial && this.$captionContainer.find(".kv-caption-icon").hide()
        },
        _showFileIcon: function() {
            this.$captionContainer.find(".kv-caption-icon").show()
        },
        _getSize: function(i) {
            var t, a, r, n = this, o = parseFloat(i), l = n.fileSizeGetter;
            return e.isNumeric(i) && e.isNumeric(o) ? ("function" == typeof l ? r = l(o) : (t = Math.floor(Math.log(o) / Math.log(1024)),
            a = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
            r = 1 * (o / Math.pow(1024, t)).toFixed(2) + " " + a[t]),
            n._getLayoutTemplate("size").replace("{sizeText}", r)) : ""
        },
        _generatePreviewTemplate: function(e, t, a, r, n, o, l, s, d, c, p) {
            var u, f = this, m = f.slug(a), g = "", v = f.previewSettings[e], h = v && v.width ? v.width : "", w = v && v.height ? v.height : "", _ = d || f._renderFileFooter(m, l, v.width, o), b = f._getPreviewIcon(a), C = b && f.preferIconicPreview, E = b && f.preferIconicZoomPreview, y = function(t, o, l, d) {
                var u = l ? "zoom-" + n : n
                  , g = f._getPreviewTemplate(t)
                  , v = (s || "") + " " + d;
                return f.frameClass && (v = f.frameClass + " " + v),
                l && (v = v.replace(" " + i.SORT_CSS, "")),
                g = f._parseFilePreviewIcon(g, a),
                "text" === t && (o = i.htmlEncode(o)),
                g.replace(/\{previewId}/g, u).replace(/\{caption}/g, m).replace(/\{frameClass}/g, v).replace(/\{type}/g, r).replace(/\{fileindex}/g, c).replace(/\{width}/g, h).replace(/\{height}/g, w).replace(/\{footer}/g, _).replace(/\{data}/g, o).replace(/\{template}/g, p || e)
            };
            return c = c || n.slice(n.lastIndexOf("-") + 1),
            f.fileActionSettings.showZoom && (g = y(E ? "other" : e, t, !0, "kv-zoom-thumb")),
            g = "\n" + f._getLayoutTemplate("zoomCache").replace("{zoomContent}", g),
            u = y(C ? "other" : e, t, !1, "kv-preview-thumb"),
            u + g
        },
        _previewDefault: function(t, a, r) {
            var n = this
              , o = n.$preview;
            if (n.showPreview) {
                var l, s = t ? t.name : "", d = t ? t.type : "", c = t.size, p = n.slug(s), u = r === !0 && !n.isUploadable, f = i.objUrl.createObjectURL(t);
                n._clearDefaultPreview(),
                l = n._generatePreviewTemplate("other", f, s, d, a, u, c),
                o.append("\n" + l),
                n._setThumbAttr(a, p, c),
                r === !0 && n.isUploadable && n._setThumbStatus(e("#" + a), "Error")
            }
        },
        _previewFile: function(e, i, t, a, r) {
            if (this.showPreview) {
                var n, o = this, l = o._parseFileType(i), s = i ? i.name : "", d = o.slug(s), c = o.allowedPreviewTypes, p = o.allowedPreviewMimeTypes, u = o.$preview, f = c && c.indexOf(l) >= 0, m = i.size, g = "text" === l || "html" === l || "image" === l ? t.target.result : r, v = p && -1 !== p.indexOf(i.type);
                "html" === l && o.purifyHtml && window.DOMPurify && (g = window.DOMPurify.sanitize(g)),
                f || v ? (n = o._generatePreviewTemplate(l, g, s, i.type, a, !1, m),
                o._clearDefaultPreview(),
                u.append("\n" + n),
                o._validateImage(a, d, i.type)) : o._previewDefault(i, a),
                o._setThumbAttr(a, d, m),
                o._initSortable()
            }
        },
        _setThumbAttr: function(i, t, a) {
            var r = this
              , n = e("#" + i);
            n.length && (a = a && a > 0 ? r._getSize(a) : "",
            n.data({
                caption: t,
                size: a
            }))
        },
        _setInitThumbAttr: function() {
            var e, t, a, r, n = this, o = n.previewCache.data, l = n.previewCache.count(!0);
            if (0 !== l)
                for (var s = 0; l > s; s++)
                    e = o.config[s],
                    r = n.previewInitId + "-init_" + s,
                    t = i.ifSet("caption", e, i.ifSet("filename", e)),
                    a = i.ifSet("size", e),
                    n._setThumbAttr(r, t, a)
        },
        _slugDefault: function(e) {
            return i.isEmpty(e) ? "" : String(e).replace(/[\-\[\]\/\{}:;#%=\(\)\*\+\?\\\^\$\|<>&"']/g, "_")
        },
        _readFiles: function(t) {
            this.reader = new FileReader;
            var a, r = this, n = r.$element, o = r.$preview, l = r.reader, s = r.$previewContainer, d = r.$previewStatus, c = r.msgLoading, p = r.msgProgress, u = r.previewInitId, f = t.length, m = r.fileTypeSettings, g = r.filestack.length, v = r.allowedFileTypes, h = v ? v.length : 0, w = r.allowedFileExtensions, _ = i.isEmpty(w) ? "" : w.join(", "), b = r.maxFilePreviewSize && parseFloat(r.maxFilePreviewSize), C = o.length && (!b || isNaN(b)), E = function(i, n, o, l) {
                var s = e.extend(!0, {}, r._getOutData({}, {}, t), {
                    id: o,
                    index: l
                })
                  , d = {
                    id: o,
                    index: l,
                    file: n,
                    files: t
                };
                return r._previewDefault(n, o, !0),
                r.isUploadable && (r.addToStack(void 0),
                setTimeout(function() {
                    a(l + 1)
                }, 100)),
                r._initFileActions(),
                r.removeFromPreviewOnError && e("#" + o).remove(),
                r.isUploadable ? r._showUploadError(i, s) : r._showError(i, d)
            };
            r.loadedImages = [],
            r.totalImagesCount = 0,
            e.each(t, function(e, i) {
                var t = r.fileTypeSettings.image;
                t && t(i.type) && r.totalImagesCount++
            }),
            a = function(e) {
                if (i.isEmpty(n.attr("multiple")) && (f = 1),
                e >= f)
                    return r.isUploadable && r.filestack.length > 0 ? r._raise("filebatchselected", [r.getFileStack()]) : r._raise("filebatchselected", [t]),
                    s.removeClass("file-thumb-loading"),
                    void d.html("");
                var y, x, T, S, F, P, I, k, $, A = g + e, z = u + "-" + A, D = t[e], U = D.name ? r.slug(D.name) : "", j = (D.size || 0) / 1e3, L = "", R = i.objUrl.createObjectURL(D), M = 0, O = "";
                if (h > 0)
                    for (S = 0; h > S; S++)
                        k = v[S],
                        $ = r.msgFileTypes[k] || k,
                        O += 0 === S ? $ : ", " + $;
                if (U === !1)
                    return void a(e + 1);
                if (0 === U.length)
                    return F = r.msgInvalidFileName.replace("{name}", i.htmlEncode(D.name)),
                    void (r.isError = E(F, D, z, e));
                if (i.isEmpty(w) || (L = new RegExp("\\.(" + w.join("|") + ")$","i")),
                T = j.toFixed(2),
                r.maxFileSize > 0 && j > r.maxFileSize)
                    return F = r.msgSizeTooLarge.replace("{name}", U).replace("{size}", T).replace("{maxSize}", r.maxFileSize),
                    void (r.isError = E(F, D, z, e));
                if (null !== r.minFileSize && j <= i.getNum(r.minFileSize))
                    return F = r.msgSizeTooSmall.replace("{name}", U).replace("{size}", T).replace("{minSize}", r.minFileSize),
                    void (r.isError = E(F, D, z, e));
                if (!i.isEmpty(v) && i.isArray(v)) {
                    for (S = 0; S < v.length; S += 1)
                        P = v[S],
                        M += m[P] ? 1 : 0;
                    if (0 === M)
                        return F = r.msgInvalidFileType.replace("{name}", U).replace("{types}", O),
                        void (r.isError = E(F, D, z, e))
                }
                return 0 !== M || i.isEmpty(w) || !i.isArray(w) || i.isEmpty(L) || (I = i.compare(U, L),
                M += i.isEmpty(I) ? 0 : I.length,
                0 !== M) ? r.showPreview ? !C && j > b ? (r.addToStack(D),
                s.addClass("file-thumb-loading"),
                r._previewDefault(D, z),
                r._initFileActions(),
                r._updateFileDetails(f),
                void a(e + 1)) : (o.length && void 0 !== FileReader ? (d.html(c.replace("{index}", e + 1).replace("{files}", f)),
                s.addClass("file-thumb-loading"),
                l.onerror = function(e) {
                    r._errorHandler(e, U)
                }
                ,
                l.onload = function(i) {
                    r._previewFile(e, D, i, z, R),
                    r._initFileActions()
                }
                ,
                l.onloadend = function() {
                    F = p.replace("{index}", e + 1).replace("{files}", f).replace("{percent}", 50).replace("{name}", U),
                    setTimeout(function() {
                        d.html(F),
                        r._updateFileDetails(f),
                        a(e + 1)
                    }, 100),
                    r._raise("fileloaded", [D, z, e, l])
                }
                ,
                l.onprogress = function(i) {
                    if (i.lengthComputable) {
                        var t = i.loaded / i.total * 100
                          , a = Math.ceil(t);
                        F = p.replace("{index}", e + 1).replace("{files}", f).replace("{percent}", a).replace("{name}", U),
                        setTimeout(function() {
                            d.html(F)
                        }, 100)
                    }
                }
                ,
                y = m.text,
                x = m.image,
                y(D.type, U) ? l.readAsText(D, r.textEncoding) : x(D.type, U) ? l.readAsDataURL(D) : l.readAsArrayBuffer(D)) : (r._previewDefault(D, z),
                setTimeout(function() {
                    a(e + 1),
                    r._updateFileDetails(f)
                }, 100),
                r._raise("fileloaded", [D, z, e, l])),
                void r.addToStack(D)) : (r.addToStack(D),
                setTimeout(function() {
                    a(e + 1)
                }, 100),
                void r._raise("fileloaded", [D, z, e, l])) : (F = r.msgInvalidFileExtension.replace("{name}", U).replace("{extensions}", _),
                void (r.isError = E(F, D, z, e)))
            }
            ,
            a(0),
            r._updateFileDetails(f, !1)
        },
        _updateFileDetails: function(e) {
            var t = this
              , a = t.$element
              , r = t.getFileStack()
              , n = i.isIE(9) && i.findFileName(a.val()) || a[0].files[0] && a[0].files[0].name || r.length && r[0].name || ""
              , o = t.slug(n)
              , l = t.isUploadable ? r.length : e
              , s = t.previewCache.count() + l
              , d = l > 1 ? t._getMsgSelected(s) : o;
            t.isError ? (t.$previewContainer.removeClass("file-thumb-loading"),
            t.$previewStatus.html(""),
            t.$captionContainer.find(".kv-caption-icon").hide()) : t._showFileIcon(),
            t._setCaption(d, t.isError),
            t.$container.removeClass("file-input-new file-input-ajax-new"),
            1 === arguments.length && t._raise("fileselect", [e, o]),
            t.previewCache.count() && t._initPreviewActions()
        },
        _setThumbStatus: function(e, i) {
            var t = this;
            if (t.showPreview) {
                var a = "indicator" + i
                  , r = a + "Title"
                  , n = "file-preview-" + i.toLowerCase()
                  , o = e.find(".file-upload-indicator")
                  , l = t.fileActionSettings;
                e.removeClass("file-preview-success file-preview-error file-preview-loading"),
                "Error" === i && e.find(".kv-file-upload").attr("disabled", !0),
                "Success" === i && (e.find(".file-drag-handle").remove(),
                o.css("margin-left", 0)),
                o.html(l[a]),
                o.attr("title", l[r]),
                e.addClass(n)
            }
        },
        _setProgressCancelled: function() {
            var e = this;
            e._setProgress(101, e.$progress, e.msgCancelled)
        },
        _setProgress: function(e, t, a) {
            var r = this
              , n = Math.min(e, 100)
              , o = 100 > n ? r.progressTemplate : a ? r.progressErrorTemplate : 100 >= e ? r.progressTemplate : r.progressCompleteTemplate
              , l = r.progressUploadThreshold;
            if (t = t || r.$progress,
            !i.isEmpty(o)) {
                if (l && n > l && 100 >= e) {
                    var s = o.replace("{percent}", l).replace("{percent}", l).replace("{percent}%", r.msgUploadThreshold);
                    t.html(s)
                } else
                    t.html(o.replace(/\{percent}/g, n));
                a && t.find('[role="progressbar"]').html(a)
            }
        },
        _setFileDropZoneTitle: function() {
            var e, t = this, a = t.$container.find(".file-drop-zone"), r = t.dropZoneTitle;
            t.isClickable && (e = i.isEmpty(t.$element.attr("multiple")) ? t.fileSingle : t.filePlural,
            r += t.dropZoneClickTitle.replace("{files}", e)),
            a.find("." + t.dropZoneTitleClass).remove(),
            t.isUploadable && t.showPreview && 0 !== a.length && !(t.getFileStack().length > 0) && t.dropZoneEnabled && (0 === a.find(i.FRAMES).length && i.isEmpty(t.defaultPreviewContent) && a.prepend('<div class="' + t.dropZoneTitleClass + '">' + r + "</div>"),
            t.$container.removeClass("file-input-new"),
            i.addCss(t.$container, "file-input-ajax-new"))
        },
        _setAsyncUploadStatus: function(i, t, a) {
            var r = this
              , n = 0;
            r._setProgress(t, e("#" + i).find(".file-thumb-progress")),
            r.uploadStatus[i] = t,
            e.each(r.uploadStatus, function(e, i) {
                n += i
            }),
            r._setProgress(Math.floor(n / a))
        },
        _validateMinCount: function() {
            var e = this
              , i = e.isUploadable ? e.getFileStack().length : e.$element.get(0).files.length;
            return e.validateInitialCount && e.minFileCount > 0 && e._getFileCount(i - 1) < e.minFileCount ? (e._noFilesError({}),
            !1) : !0
        },
        _getFileCount: function(e) {
            var i = this
              , t = 0;
            return i.validateInitialCount && !i.overwriteInitial && (t = i.previewCache.count(),
            e += t),
            e
        },
        _getFileName: function(e) {
            return e && e.name ? this.slug(e.name) : void 0
        },
        _getFileNames: function(e) {
            var i = this;
            return i.filenames.filter(function(i) {
                return e ? void 0 !== i : void 0 !== i && null !== i
            })
        },
        _setPreviewError: function(e, i, t) {
            var a = this;
            void 0 !== i && a.updateStack(i, t),
            a.removeFromPreviewOnError ? e.remove() : a._setThumbStatus(e, "Error")
        },
        _checkDimensions: function(e, t, a, r, n, o, l) {
            var s, d, c, p, u = this, f = "Small" === t ? "min" : "max", m = u[f + "Image" + o];
            !i.isEmpty(m) && a.length && (c = a[0],
            d = "Width" === o ? c.naturalWidth || c.width : c.naturalHeight || c.height,
            p = "Small" === t ? d >= m : m >= d,
            p || (s = u["msgImage" + o + t].replace("{name}", n).replace("{size}", m),
            u._showUploadError(s, l),
            u._setPreviewError(r, e, null)))
        },
        _validateImage: function(e, t, a) {
            var r, n, o, l = this, s = l.$preview, d = s.find("#" + e), c = d.attr("data-fileindex"), p = d.find("img");
            t = t || "Untitled",
            p.length && i.handler(p, "load", function() {
                n = d.width(),
                o = s.width(),
                n > o && (p.css("width", "100%"),
                d.css("width", "97%")),
                r = {
                    ind: c,
                    id: e
                },
                l._checkDimensions(c, "Small", p, d, t, "Width", r),
                l._checkDimensions(c, "Small", p, d, t, "Height", r),
                l.resizeImage || (l._checkDimensions(c, "Large", p, d, t, "Width", r),
                l._checkDimensions(c, "Large", p, d, t, "Height", r)),
                l._raise("fileimageloaded", [e]),
                l.loadedImages.push({
                    ind: c,
                    img: p,
                    thumb: d,
                    pid: e,
                    typ: a
                }),
                l._validateAllImages()
            })
        },
        _validateAllImages: function() {
            var e, i = this, t = {
                val: 0
            }, a = i.loadedImages.length;
            if (a === i.totalImagesCount && (i._raise("fileimagesloaded"),
            i.resizeImage))
                for (e = 0; e < i.loadedImages.length; e++)
                    i._getResizedImage(i.loadedImages[e], t, a)
        },
        _getResizedImage: function(e, i, t) {
            var a, r, n, o, l, s = this, d = e.img, c = d.naturalWidth, p = d.naturalHeight, u = 1, f = s.maxImageWidth || c, m = s.maxImageHeight || p, g = !(!c || !p), v = s.imageCanvas, h = s.imageCanvasContext, w = e.typ, _ = e.pid, b = e.ind, C = e.thumb;
            if (n = s.isUploadable ? s._showUploadError : s._showError,
            o = function(e, i, t) {
                n(e, i, t),
                s._setPreviewError(C, b)
            }
            ,
            (!s.filestack[b] || !g || f >= c && m >= p) && (g && s.filestack[b] && s._raise("fileimageresized", [_, b]),
            i.val++,
            i.val === t && s._raise("fileimagesresized"),
            !g))
                return void o(s.msgImageResizeError, {
                    id: _,
                    index: b
                }, "fileimageresizeerror");
            w = w || s.resizeDefaultImageType,
            a = c > f,
            r = p > m,
            u = "width" === s.resizePreference ? a ? f / c : r ? m / p : 1 : r ? m / p : a ? f / c : 1,
            s._resetCanvas(),
            c *= u,
            p *= u,
            v.width = c,
            v.height = p;
            try {
                h.drawImage(d, 0, 0, c, p),
                v.toBlob(function(e) {
                    s.filestack[b] = e,
                    s._raise("fileimageresized", [_, b]),
                    i.val++,
                    i.val === t && s._raise("fileimagesresized", [void 0, void 0]),
                    e instanceof Blob || o(s.msgImageResizeError, {
                        id: _,
                        index: b
                    }, "fileimageresizeerror")
                }, w, s.resizeQuality)
            } catch (E) {
                i.val++,
                i.val === t && s._raise("fileimagesresized", [void 0, void 0]),
                l = s.msgImageResizeException.replace("{errors}", E.message),
                o(l, {
                    id: _,
                    index: b
                }, "fileimageresizeexception")
            }
        },
        _initBrowse: function(e) {
            var i = this;
            i.showBrowse ? (i.$btnFile = e.find(".btn-file"),
            i.$btnFile.append(i.$element)) : i.$element.hide()
        },
        _initCaption: function() {
            var e = this
              , t = e.initialCaption || "";
            return e.overwriteInitial || i.isEmpty(t) ? (e.$caption.html(""),
            !1) : (e._setCaption(t),
            !0)
        },
        _setCaption: function(t, a) {
            var r, n, o, l, s = this, d = s.getFileStack();
            if (s.$caption.length) {
                if (a)
                    r = e("<div>" + s.msgValidationError + "</div>").text(),
                    o = d.length,
                    l = o ? 1 === o && d[0] ? s._getFileNames()[0] : s._getMsgSelected(o) : s._getMsgSelected(s.msgNo),
                    n = '<span class="' + s.msgValidationErrorClass + '">' + s.msgValidationErrorIcon + (i.isEmpty(t) ? l : t) + "</span>";
                else {
                    if (i.isEmpty(t))
                        return;
                    r = e("<div>" + t + "</div>").text(),
                    n = s._getLayoutTemplate("fileIcon") + r
                }
                s.$caption.html(n),
                s.$caption.attr("title", r),
                s.$captionContainer.find(".file-caption-ellipsis").attr("title", r)
            }
        },
        _createContainer: function() {
            var i = this
              , t = e(document.createElement("div")).attr({
                "class": "file-input file-input-new"
            }).html(i._renderMain());
            return i.$element.before(t),
            i._initBrowse(t),
            i.theme && t.addClass("theme-" + i.theme),
            t
        },
        _refreshContainer: function() {
            var e = this
              , i = e.$container;
            i.before(e.$element),
            i.html(e._renderMain()),
            e._initBrowse(i)
        },
        _renderMain: function() {
            var e = this
              , i = e.isUploadable && e.dropZoneEnabled ? " file-drop-zone" : "file-drop-disabled"
              , t = e.showClose ? e._getLayoutTemplate("close") : ""
              , a = e.showPreview ? e._getLayoutTemplate("preview").replace(/\{class}/g, e.previewClass).replace(/\{dropClass}/g, i) : ""
              , r = e.isDisabled ? e.captionClass + " file-caption-disabled" : e.captionClass
              , n = e.captionTemplate.replace(/\{class}/g, r + " kv-fileinput-caption");
            return e.mainTemplate.replace(/\{class}/g, e.mainClass + (!e.showBrowse && e.showCaption ? " no-browse" : "")).replace(/\{preview}/g, a).replace(/\{close}/g, t).replace(/\{caption}/g, n).replace(/\{upload}/g, e._renderButton("upload")).replace(/\{remove}/g, e._renderButton("remove")).replace(/\{cancel}/g, e._renderButton("cancel")).replace(/\{browse}/g, e._renderButton("browse"))
        },
        _renderButton: function(e) {
            var t = this
              , a = t._getLayoutTemplate("btnDefault")
              , r = t[e + "Class"]
              , n = t[e + "Title"]
              , o = t[e + "Icon"]
              , l = t[e + "Label"]
              , s = t.isDisabled ? " disabled" : ""
              , d = "button";
            switch (e) {
            case "remove":
                if (!t.showRemove)
                    return "";
                break;
            case "cancel":
                if (!t.showCancel)
                    return "";
                r += " hide";
                break;
            case "upload":
                if (!t.showUpload)
                    return "";
                t.isUploadable && !t.isDisabled ? a = t._getLayoutTemplate("btnLink").replace("{href}", t.uploadUrl) : d = "submit";
                break;
            case "browse":
                if (!t.showBrowse)
                    return "";
                a = t._getLayoutTemplate("btnBrowse");
                break;
            default:
                return ""
            }
            return r += "browse" === e ? " btn-file" : " fileinput-" + e + " fileinput-" + e + "-button",
            i.isEmpty(l) || (l = ' <span class="' + t.buttonLabelClass + '">' + l + "</span>"),
            a.replace("{type}", d).replace("{css}", r).replace("{title}", n).replace("{status}", s).replace("{icon}", o).replace("{label}", l)
        },
        _renderThumbProgress: function() {
            return '<div class="file-thumb-progress hide">' + this.progressTemplate.replace(/\{percent}/g, "0") + "</div>"
        },
        _renderFileFooter: function(e, t, a, r) {
            var n, o = this, l = o.fileActionSettings, s = l.showRemove, d = l.showDrag, c = l.showUpload, p = l.showZoom, u = o._getLayoutTemplate("footer"), f = r ? l.indicatorError : l.indicatorNew, m = r ? l.indicatorErrorTitle : l.indicatorNewTitle;
            return t = o._getSize(t),
            n = o.isUploadable ? u.replace(/\{actions}/g, o._renderFileActions(c, s, p, d, !1, !1, !1)).replace(/\{caption}/g, e).replace(/\{size}/g, t).replace(/\{width}/g, a).replace(/\{progress}/g, o._renderThumbProgress()).replace(/\{indicator}/g, f).replace(/\{indicatorTitle}/g, m) : u.replace(/\{actions}/g, o._renderFileActions(!1, !1, p, d, !1, !1, !1)).replace(/\{caption}/g, e).replace(/\{size}/g, t).replace(/\{width}/g, a).replace(/\{progress}/g, "").replace(/\{indicator}/g, f).replace(/\{indicatorTitle}/g, m),
            n = i.replaceTags(n, o.previewThumbTags)
        },
        _renderFileActions: function(e, i, t, a, r, n, o, l) {
            if (!(e || i || t || a))
                return "";
            var s, d = this, c = n === !1 ? "" : ' data-url="' + n + '"', p = o === !1 ? "" : ' data-key="' + o + '"', u = "", f = "", m = "", g = "", v = d._getLayoutTemplate("actions"), h = d.fileActionSettings, w = d.otherActionButtons.replace(/\{dataKey}/g, p), _ = r ? h.removeClass + " disabled" : h.removeClass;
            return i && (u = d._getLayoutTemplate("actionDelete").replace(/\{removeClass}/g, _).replace(/\{removeIcon}/g, h.removeIcon).replace(/\{removeTitle}/g, h.removeTitle).replace(/\{dataUrl}/g, c).replace(/\{dataKey}/g, p)),
            e && (f = d._getLayoutTemplate("actionUpload").replace(/\{uploadClass}/g, h.uploadClass).replace(/\{uploadIcon}/g, h.uploadIcon).replace(/\{uploadTitle}/g, h.uploadTitle)),
            t && (m = d._getLayoutTemplate("actionZoom").replace(/\{zoomClass}/g, h.zoomClass).replace(/\{zoomIcon}/g, h.zoomIcon).replace(/\{zoomTitle}/g, h.zoomTitle)),
            a && l && (s = "drag-handle-init " + h.dragClass,
            g = d._getLayoutTemplate("actionDrag").replace(/\{dragClass}/g, s).replace(/\{dragTitle}/g, h.dragTitle).replace(/\{dragIcon}/g, h.dragIcon)),
            v.replace(/\{delete}/g, u).replace(/\{upload}/g, f).replace(/\{zoom}/g, m).replace(/\{drag}/g, g).replace(/\{other}/g, w)
        },
        _browse: function(e) {
            var i = this;
            i._raise("filebrowse"),
            e && e.isDefaultPrevented() || (i.isError && !i.isUploadable && i.clear(),
            i.$captionContainer.focus())
        },
        _change: function(t) {
            var a = this
              , r = a.$element;
            if (!a.isUploadable && i.isEmpty(r.val()) && a.fileInputCleared)
                return void (a.fileInputCleared = !1);
            a.fileInputCleared = !1;
            var n, o, l, s, d, c, p = arguments.length > 1, u = a.isUploadable, f = 0, m = p ? t.originalEvent.dataTransfer.files : r.get(0).files, g = a.filestack.length, v = i.isEmpty(r.attr("multiple")), h = v && g > 0, w = 0, _ = function(i, t, r, n) {
                var o = e.extend(!0, {}, a._getOutData({}, {}, m), {
                    id: r,
                    index: n
                })
                  , l = {
                    id: r,
                    index: n,
                    file: t,
                    files: m
                };
                return a.isUploadable ? a._showUploadError(i, o) : a._showError(i, l)
            };
            if (a.reader = null,
            a._resetUpload(),
            a._hideFileIcon(),
            a.isUploadable && a.$container.find(".file-drop-zone ." + a.dropZoneTitleClass).remove(),
            p)
                for (n = []; m[f]; )
                    s = m[f],
                    s.type || s.size % 4096 !== 0 ? n.push(s) : w++,
                    f++;
            else
                n = void 0 === t.target.files ? t.target && t.target.value ? [{
                    name: t.target.value.replace(/^.+\\/, "")
                }] : [] : t.target.files;
            if (i.isEmpty(n) || 0 === n.length)
                return u || a.clear(),
                a._showFolderError(w),
                void a._raise("fileselectnone");
            if (a._resetErrors(),
            c = n.length,
            l = a._getFileCount(a.isUploadable ? a.getFileStack().length + c : c),
            a.maxFileCount > 0 && l > a.maxFileCount) {
                if (!a.autoReplace || c > a.maxFileCount)
                    return d = a.autoReplace && c > a.maxFileCount ? c : l,
                    o = a.msgFilesTooMany.replace("{m}", a.maxFileCount).replace("{n}", d),
                    a.isError = _(o, null, null, null),
                    a.$captionContainer.find(".kv-caption-icon").hide(),
                    a._setCaption("", !0),
                    void a.$container.removeClass("file-input-new file-input-ajax-new");
                l > a.maxFileCount && a._resetPreviewThumbs(u)
            } else
                !u || h ? (a._resetPreviewThumbs(!1),
                h && a.clearStack()) : !u || 0 !== g || a.previewCache.count() && !a.overwriteInitial || a._resetPreviewThumbs(!0);
            a.isPreviewable ? a._readFiles(n) : a._updateFileDetails(1),
            a._showFolderError(w)
        },
        _abort: function(i) {
            var t, a = this;
            return a.ajaxAborted && "object" == typeof a.ajaxAborted && void 0 !== a.ajaxAborted.message ? (t = e.extend(!0, {}, a._getOutData(), i),
            t.abortData = a.ajaxAborted.data || {},
            t.abortMessage = a.ajaxAborted.message,
            a.cancel(),
            a._setProgress(101, a.$progress, a.msgCancelled),
            a._showUploadError(a.ajaxAborted.message, t, "filecustomerror"),
            !0) : !1
        },
        _resetFileStack: function() {
            var t = this
              , a = 0
              , r = []
              , n = [];
            t._getThumbs().each(function() {
                var o = e(this)
                  , l = o.attr("data-fileindex")
                  , s = t.filestack[l];
                -1 !== l && (void 0 !== s ? (r[a] = s,
                n[a] = t._getFileName(s),
                o.attr({
                    id: t.previewInitId + "-" + a,
                    "data-fileindex": a
                }),
                a++) : o.attr({
                    id: "uploaded-" + i.uniqId(),
                    "data-fileindex": "-1"
                }))
            }),
            t.filestack = r,
            t.filenames = n
        },
        clearStack: function() {
            var e = this;
            return e.filestack = [],
            e.filenames = [],
            e.$element
        },
        updateStack: function(e, i) {
            var t = this;
            return t.filestack[e] = i,
            t.filenames[e] = t._getFileName(i),
            t.$element
        },
        addToStack: function(e) {
            var i = this;
            return i.filestack.push(e),
            i.filenames.push(i._getFileName(e)),
            i.$element
        },
        getFileStack: function(e) {
            var i = this;
            return i.filestack.filter(function(i) {
                return e ? void 0 !== i : void 0 !== i && null !== i
            })
        },
        getFilesCount: function() {
            var e = this
              , i = e.isUploadable ? e.getFileStack().length : e.$element.get(0).files.length;
            return e._getFileCount(i)
        },
        lock: function() {
            var e = this;
            return e._resetErrors(),
            e.disable(),
            e.showRemove && i.addCss(e.$container.find(".fileinput-remove"), "hide"),
            e.showCancel && e.$container.find(".fileinput-cancel").removeClass("hide"),
            e._raise("filelock", [e.filestack, e._getExtraData()]),
            e.$element
        },
        unlock: function(e) {
            var t = this;
            return void 0 === e && (e = !0),
            t.enable(),
            t.showCancel && i.addCss(t.$container.find(".fileinput-cancel"), "hide"),
            t.showRemove && t.$container.find(".fileinput-remove").removeClass("hide"),
            e && t._resetFileStack(),
            t._raise("fileunlock", [t.filestack, t._getExtraData()]),
            t.$element
        },
        cancel: function() {
            var i, t = this, a = t.ajaxRequests, r = a.length;
            if (r > 0)
                for (i = 0; r > i; i += 1)
                    t.cancelling = !0,
                    a[i].abort();
            return t._setProgressCancelled(),
            t._getThumbs().each(function() {
                var i = e(this)
                  , a = i.attr("data-fileindex");
                i.removeClass("file-uploading"),
                void 0 !== t.filestack[a] && (i.find(".kv-file-upload").removeClass("disabled").removeAttr("disabled"),
                i.find(".kv-file-remove").removeClass("disabled").removeAttr("disabled")),
                t.unlock()
            }),
            t.$element
        },
        clear: function() {
            var t, a = this;
            return a.$btnUpload.removeAttr("disabled"),
            a._getThumbs().find("video,audio,img").each(function() {
                i.cleanMemory(e(this))
            }),
            a._resetUpload(),
            a.clearStack(),
            a._clearFileInput(),
            a._resetErrors(!0),
            a._raise("fileclear"),
            a._hasInitialPreview() ? (a._showFileIcon(),
            a._resetPreview(),
            a._initPreviewActions(),
            a.$container.removeClass("file-input-new")) : (a._getThumbs().each(function() {
                a._clearObjects(e(this))
            }),
            a.isUploadable && (a.previewCache.data = {}),
            a.$preview.html(""),
            t = !a.overwriteInitial && a.initialCaption.length > 0 ? a.initialCaption : "",
            a.$caption.html(t),
            a.$caption.attr("title", ""),
            i.addCss(a.$container, "file-input-new"),
            a._validateDefaultPreview()),
            0 === a.$container.find(i.FRAMES).length && (a._initCaption() || a.$captionContainer.find(".kv-caption-icon").hide()),
            a._hideFileIcon(),
            a._raise("filecleared"),
            a.$captionContainer.focus(),
            a._setFileDropZoneTitle(),
            a.$element
        },
        reset: function() {
            var e = this;
            return e._resetPreview(),
            e.$container.find(".fileinput-filename").text(""),
            e._raise("filereset"),
            i.addCss(e.$container, "file-input-new"),
            (e.$preview.find(i.FRAMES).length || e.isUploadable && e.dropZoneEnabled) && e.$container.removeClass("file-input-new"),
            e._setFileDropZoneTitle(),
            e.clearStack(),
            e.formdata = {},
            e.$element
        },
        disable: function() {
            var e = this;
            return e.isDisabled = !0,
            e._raise("filedisabled"),
            e.$element.attr("disabled", "disabled"),
            e.$container.find(".kv-fileinput-caption").addClass("file-caption-disabled"),
            e.$container.find(".btn-file, .fileinput-remove, .fileinput-upload, .file-preview-frame button").attr("disabled", !0),
            e._initDragDrop(),
            e.$element
        },
        enable: function() {
            var e = this;
            return e.isDisabled = !1,
            e._raise("fileenabled"),
            e.$element.removeAttr("disabled"),
            e.$container.find(".kv-fileinput-caption").removeClass("file-caption-disabled"),
            e.$container.find(".btn-file, .fileinput-remove, .fileinput-upload, .file-preview-frame button").removeAttr("disabled"),
            e._initDragDrop(),
            e.$element
        },
        upload: function() {
            var t, a, r, n = this, o = n.getFileStack().length, l = {}, s = !e.isEmptyObject(n._getExtraData());
            if (n.isUploadable && !n.isDisabled) {
                if (n.minFileCount > 0 && n._getFileCount(o) < n.minFileCount)
                    return void n._noFilesError(l);
                if (0 === o && !s)
                    return n._resetUpload(),
                    void n._showUploadError(n.msgUploadEmpty);
                if (n._resetUpload(),
                n.$progress.removeClass("hide"),
                n.uploadCount = 0,
                n.uploadStatus = {},
                n.uploadLog = [],
                n.lock(),
                n._setProgress(2),
                0 === o && s)
                    return void n._uploadExtraOnly();
                if (r = n.filestack.length,
                n.hasInitData = !1,
                !n.uploadAsync)
                    return n._uploadBatch(),
                    n.$element;
                for (a = n._getOutData(),
                n._raise("filebatchpreupload", [a]),
                n.fileBatchCompleted = !1,
                n.uploadCache = {
                    content: [],
                    config: [],
                    tags: [],
                    append: !0
                },
                n.uploadAsyncCount = n.getFileStack().length,
                t = 0; r > t; t++)
                    n.uploadCache.content[t] = null,
                    n.uploadCache.config[t] = null,
                    n.uploadCache.tags[t] = null;
                for (n.$preview.find(".file-preview-initial").removeClass(i.SORT_CSS),
                n._initSortable(),
                n.cacheInitialPreview = {
                    content: n.initialPreview,
                    config: n.initialPreviewConfig,
                    tags: n.initialPreviewThumbTags
                },
                t = 0; r > t; t++)
                    void 0 !== n.filestack[t] && n._uploadSingle(t, n.filestack, !0)
            }
        },
        destroy: function() {
            var e = this
              , t = e.$container;
            return t.find(".file-drop-zone").off(),
            e.$element.insertBefore(t).off(i.NAMESPACE).removeData(),
            t.off().remove(),
            e.$element
        },
        refresh: function(i) {
            var t = this
              , a = t.$element;
            return i = i ? e.extend(!0, {}, t.options, i) : t.options,
            t.destroy(),
            a.fileinput(i),
            a.val() && a.trigger("change.fileinput"),
            a
        }
    },
    e.fn.fileinput = function(a) {
        if (i.hasFileAPISupport() || i.isIE(9)) {
            var r = Array.apply(null, arguments)
              , n = [];
            switch (r.shift(),
            this.each(function() {
                var o, l = e(this), s = l.data("fileinput"), d = "object" == typeof a && a, c = d.theme || l.data("theme"), p = {}, u = {}, f = d.language || l.data("language") || e.fn.fileinput.defaults.language || "en";
                s || (c && (u = e.fn.fileinputThemes[c] || {}),
                "en" === f || i.isEmpty(e.fn.fileinputLocales[f]) || (p = e.fn.fileinputLocales[f] || {}),
                o = e.extend(!0, {}, e.fn.fileinput.defaults, u, e.fn.fileinputLocales.en, p, d, l.data()),
                s = new t(this,o),
                l.data("fileinput", s)),
                "string" == typeof a && n.push(s[a].apply(s, r))
            }),
            n.length) {
            case 0:
                return this;
            case 1:
                return n[0];
            default:
                return n
            }
        }
    }
    ,
    e.fn.fileinput.defaults = {
        language: "en",
        showCaption: !0,
        showBrowse: !0,
        showPreview: !0,
        showRemove: !0,
        showUpload: !0,
        showCancel: !0,
        showClose: !0,
        showUploadedThumbs: !0,
        browseOnZoneClick: !1,
        autoReplace: !1,
        previewClass: "",
        captionClass: "",
        frameClass: "krajee-default",
        mainClass: "file-caption-main",
        mainTemplate: null,
        purifyHtml: !0,
        fileSizeGetter: null,
        initialCaption: "",
        initialPreview: [],
        initialPreviewDelimiter: "*$$*",
        initialPreviewAsData: !1,
        initialPreviewFileType: "image",
        initialPreviewConfig: [],
        initialPreviewThumbTags: [],
        previewThumbTags: {},
        initialPreviewShowDelete: !0,
        removeFromPreviewOnError: !1,
        deleteUrl: "",
        deleteExtraData: {},
        overwriteInitial: !0,
        previewZoomButtonIcons: {
            prev: '<i class="glyphicon glyphicon-triangle-left"></i>',
            next: '<i class="glyphicon glyphicon-triangle-right"></i>',
            toggleheader: '<i class="glyphicon glyphicon-resize-vertical"></i>',
            fullscreen: '<i class="glyphicon glyphicon-fullscreen"></i>',
            borderless: '<i class="glyphicon glyphicon-resize-full"></i>',
            close: '<i class="glyphicon glyphicon-remove"></i>'
        },
        previewZoomButtonClasses: {
            prev: "btn btn-navigate",
            next: "btn btn-navigate",
            toggleheader: "btn btn-default btn-header-toggle",
            fullscreen: "btn btn-default",
            borderless: "btn btn-default",
            close: "btn btn-default"
        },
        preferIconicPreview: !1,
        preferIconicZoomPreview: !1,
        allowedPreviewTypes: void 0,
        allowedPreviewMimeTypes: null,
        allowedFileTypes: null,
        allowedFileExtensions: null,
        defaultPreviewContent: null,
        customLayoutTags: {},
        customPreviewTags: {},
        previewFileIcon: '<i class="glyphicon glyphicon-file"></i>',
        previewFileIconClass: "file-other-icon",
        previewFileIconSettings: {},
        previewFileExtSettings: {},
        buttonLabelClass: "hidden-xs",
        browseIcon: '<i class="glyphicon glyphicon-folder-open"></i>&nbsp;',
        browseClass: "btn btn-primary",
        removeIcon: '<i class="glyphicon glyphicon-trash"></i>',
        removeClass: "btn btn-default",
        cancelIcon: '<i class="glyphicon glyphicon-ban-circle"></i>',
        cancelClass: "btn btn-default",
        uploadIcon: '<i class="glyphicon glyphicon-upload"></i>',
        uploadClass: "btn btn-default",
        uploadUrl: null,
        uploadAsync: !0,
        uploadExtraData: {},
        zoomModalHeight: 480,
        minImageWidth: null,
        minImageHeight: null,
        maxImageWidth: null,
        maxImageHeight: null,
        resizeImage: !1,
        resizePreference: "width",
        resizeQuality: .92,
        resizeDefaultImageType: "image/jpeg",
        minFileSize: 0,
        maxFileSize: 0,
        maxFilePreviewSize: 25600,
        minFileCount: 0,
        maxFileCount: 0,
        validateInitialCount: !1,
        msgValidationErrorClass: "text-danger",
        msgValidationErrorIcon: '<i class="glyphicon glyphicon-exclamation-sign"></i> ',
        msgErrorClass: "file-error-message",
        progressThumbClass: "progress-bar progress-bar-success progress-bar-striped active",
        progressClass: "progress-bar progress-bar-success progress-bar-striped active",
        progressCompleteClass: "progress-bar progress-bar-success",
        progressErrorClass: "progress-bar progress-bar-danger",
        progressUploadThreshold: 99,
        previewFileType: "image",
        elCaptionContainer: null,
        elCaptionText: null,
        elPreviewContainer: null,
        elPreviewImage: null,
        elPreviewStatus: null,
        elErrorContainer: null,
        errorCloseButton: '<span class="close kv-error-close">&times;</span>',
        slugCallback: null,
        dropZoneEnabled: !0,
        dropZoneTitleClass: "file-drop-zone-title",
        fileActionSettings: {},
        otherActionButtons: "",
        textEncoding: "UTF-8",
        ajaxSettings: {},
        ajaxDeleteSettings: {},
        showAjaxErrorDetails: !0
    },
    e.fn.fileinputLocales.en = {
        fileSingle: "file",
        filePlural: "files",
        browseLabel: "Browse &hellip;",
        removeLabel: "Remove",
        removeTitle: "Clear selected files",
        cancelLabel: "Cancel",
        cancelTitle: "Abort ongoing upload",
        uploadLabel: "Upload",
        uploadTitle: "Upload selected files",
        msgNo: "No",
        msgNoFilesSelected: "No files selected",
        msgCancelled: "Cancelled",
        msgZoomModalHeading: "Detailed Preview",
        msgSizeTooSmall: 'File "{name}" (<b>{size} KB</b>) is too small and must be larger than <b>{minSize} KB</b>.',
        msgSizeTooLarge: 'File "{name}" (<b>{size} KB</b>) exceeds maximum allowed upload size of <b>{maxSize} KB</b>.',
        msgFilesTooLess: "You must select at least <b>{n}</b> {files} to upload.",
        msgFilesTooMany: "Number of files selected for upload <b>({n})</b> exceeds maximum allowed limit of <b>{m}</b>.",
        msgFileNotFound: 'File "{name}" not found!',
        msgFileSecured: 'Security restrictions prevent reading the file "{name}".',
        msgFileNotReadable: 'File "{name}" is not readable.',
        msgFilePreviewAborted: 'File preview aborted for "{name}".',
        msgFilePreviewError: 'An error occurred while reading the file "{name}".',
        msgInvalidFileName: 'Invalid or unsupported characters in file name "{name}".',
        msgInvalidFileType: 'Invalid type for file "{name}". Only "{types}" files are supported.',
        msgInvalidFileExtension: 'Invalid extension for file "{name}". Only "{extensions}" files are supported.',
        msgFileTypes: {
            image: "image",
            html: "HTML",
            text: "text",
            video: "video",
            audio: "audio",
            flash: "flash",
            pdf: "PDF",
            object: "object"
        },
        msgUploadAborted: "The file upload was aborted",
        msgUploadThreshold: "Processing...",
        msgUploadEmpty: "No valid data available for upload.",
        msgValidationError: "Validation Error",
        msgLoading: "Loading file {index} of {files} &hellip;",
        msgProgress: "Loading file {index} of {files} - {name} - {percent}% completed.",
        msgSelected: "{n} {files} selected",
        msgFoldersNotAllowed: "Drag & drop files only! {n} folder(s) dropped were skipped.",
        msgImageWidthSmall: 'Width of image file "{name}" must be at least {size} px.',
        msgImageHeightSmall: 'Height of image file "{name}" must be at least {size} px.',
        msgImageWidthLarge: 'Width of image file "{name}" cannot exceed {size} px.',
        msgImageHeightLarge: 'Height of image file "{name}" cannot exceed {size} px.',
        msgImageResizeError: "Could not get the image dimensions to resize.",
        msgImageResizeException: "Error while resizing the image.<pre>{errors}</pre>",
        msgAjaxError: "Something went wrong with the {operation} operation. Please try again later!",
        msgAjaxProgressError: "{operation} failed",
        ajaxOperations: {
            deleteThumb: "file delete",
            uploadThumb: "single file upload",
            uploadBatch: "batch file upload",
            uploadExtra: "form data upload"
        },
        dropZoneTitle: "Drag & drop files here &hellip;",
        dropZoneClickTitle: "<br>(or click to select {files})",
        previewZoomButtonTitles: {
            prev: "View previous file",
            next: "View next file",
            toggleheader: "Toggle header",
            fullscreen: "Toggle full screen",
            borderless: "Toggle borderless mode",
            close: "Close detailed preview"
        }
    },
    e.fn.fileinput.Constructor = t,
    e(document).ready(function() {
        var i = e("input.file[type=file]");
        i.length && i.fileinput()
    })
});
/*!
* Font Awesome Icon Picker
* https://farbelous.github.io/fontawesome-iconpicker/
*
* @author Javi Aguilar, itsjavi.com
* @license MIT License
* @see https://github.com/farbelous/fontawesome-iconpicker/blob/master/LICENSE
*/
!function(e) {
    "function" == typeof define && define.amd ? define(["jquery"], e) : e(jQuery)
}(function(j) {
    j.ui = j.ui || {};
    j.ui.version = "1.12.1";
    !function() {
        var r, y = Math.max, x = Math.abs, s = /left|center|right/, i = /top|center|bottom/, c = /[\+\-]\d+(\.[\d]+)?%?/, f = /^\w+/, l = /%$/, o = j.fn.pos;
        function q(e, a, t) {
            return [parseFloat(e[0]) * (l.test(e[0]) ? a / 100 : 1), parseFloat(e[1]) * (l.test(e[1]) ? t / 100 : 1)]
        }
        function C(e, a) {
            return parseInt(j.css(e, a), 10) || 0
        }
        j.pos = {
            scrollbarWidth: function() {
                if (void 0 !== r)
                    return r;
                var e, a, t = j("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"), s = t.children()[0];
                return j("body").append(t),
                e = s.offsetWidth,
                t.css("overflow", "scroll"),
                e === (a = s.offsetWidth) && (a = t[0].clientWidth),
                t.remove(),
                r = e - a
            },
            getScrollInfo: function(e) {
                var a = e.isWindow || e.isDocument ? "" : e.element.css("overflow-x")
                  , t = e.isWindow || e.isDocument ? "" : e.element.css("overflow-y")
                  , s = "scroll" === a || "auto" === a && e.width < e.element[0].scrollWidth;
                return {
                    width: "scroll" === t || "auto" === t && e.height < e.element[0].scrollHeight ? j.pos.scrollbarWidth() : 0,
                    height: s ? j.pos.scrollbarWidth() : 0
                }
            },
            getWithinInfo: function(e) {
                var a = j(e || window)
                  , t = j.isWindow(a[0])
                  , s = !!a[0] && 9 === a[0].nodeType;
                return {
                    element: a,
                    isWindow: t,
                    isDocument: s,
                    offset: !t && !s ? j(e).offset() : {
                        left: 0,
                        top: 0
                    },
                    scrollLeft: a.scrollLeft(),
                    scrollTop: a.scrollTop(),
                    width: a.outerWidth(),
                    height: a.outerHeight()
                }
            }
        },
        j.fn.pos = function(h) {
            if (!h || !h.of)
                return o.apply(this, arguments);
            h = j.extend({}, h);
            var m, p, d, T, u, e, a, t, g = j(h.of), b = j.pos.getWithinInfo(h.within), k = j.pos.getScrollInfo(b), w = (h.collision || "flip").split(" "), v = {};
            return e = 9 === (t = (a = g)[0]).nodeType ? {
                width: a.width(),
                height: a.height(),
                offset: {
                    top: 0,
                    left: 0
                }
            } : j.isWindow(t) ? {
                width: a.width(),
                height: a.height(),
                offset: {
                    top: a.scrollTop(),
                    left: a.scrollLeft()
                }
            } : t.preventDefault ? {
                width: 0,
                height: 0,
                offset: {
                    top: t.pageY,
                    left: t.pageX
                }
            } : {
                width: a.outerWidth(),
                height: a.outerHeight(),
                offset: a.offset()
            },
            g[0].preventDefault && (h.at = "left top"),
            p = e.width,
            d = e.height,
            T = e.offset,
            u = j.extend({}, T),
            j.each(["my", "at"], function() {
                var e, a, t = (h[this] || "").split(" ");
                1 === t.length && (t = s.test(t[0]) ? t.concat(["center"]) : i.test(t[0]) ? ["center"].concat(t) : ["center", "center"]),
                t[0] = s.test(t[0]) ? t[0] : "center",
                t[1] = i.test(t[1]) ? t[1] : "center",
                e = c.exec(t[0]),
                a = c.exec(t[1]),
                v[this] = [e ? e[0] : 0, a ? a[0] : 0],
                h[this] = [f.exec(t[0])[0], f.exec(t[1])[0]]
            }),
            1 === w.length && (w[1] = w[0]),
            "right" === h.at[0] ? u.left += p : "center" === h.at[0] && (u.left += p / 2),
            "bottom" === h.at[1] ? u.top += d : "center" === h.at[1] && (u.top += d / 2),
            m = q(v.at, p, d),
            u.left += m[0],
            u.top += m[1],
            this.each(function() {
                var t, e, c = j(this), f = c.outerWidth(), l = c.outerHeight(), a = C(this, "marginLeft"), s = C(this, "marginTop"), r = f + a + C(this, "marginRight") + k.width, i = l + s + C(this, "marginBottom") + k.height, o = j.extend({}, u), n = q(v.my, c.outerWidth(), c.outerHeight());
                "right" === h.my[0] ? o.left -= f : "center" === h.my[0] && (o.left -= f / 2),
                "bottom" === h.my[1] ? o.top -= l : "center" === h.my[1] && (o.top -= l / 2),
                o.left += n[0],
                o.top += n[1],
                t = {
                    marginLeft: a,
                    marginTop: s
                },
                j.each(["left", "top"], function(e, a) {
                    j.ui.pos[w[e]] && j.ui.pos[w[e]][a](o, {
                        targetWidth: p,
                        targetHeight: d,
                        elemWidth: f,
                        elemHeight: l,
                        collisionPosition: t,
                        collisionWidth: r,
                        collisionHeight: i,
                        offset: [m[0] + n[0], m[1] + n[1]],
                        my: h.my,
                        at: h.at,
                        within: b,
                        elem: c
                    })
                }),
                h.using && (e = function(e) {
                    var a = T.left - o.left
                      , t = a + p - f
                      , s = T.top - o.top
                      , r = s + d - l
                      , i = {
                        target: {
                            element: g,
                            left: T.left,
                            top: T.top,
                            width: p,
                            height: d
                        },
                        element: {
                            element: c,
                            left: o.left,
                            top: o.top,
                            width: f,
                            height: l
                        },
                        horizontal: t < 0 ? "left" : 0 < a ? "right" : "center",
                        vertical: r < 0 ? "top" : 0 < s ? "bottom" : "middle"
                    };
                    p < f && x(a + t) < p && (i.horizontal = "center"),
                    d < l && x(s + r) < d && (i.vertical = "middle"),
                    y(x(a), x(t)) > y(x(s), x(r)) ? i.important = "horizontal" : i.important = "vertical",
                    h.using.call(this, e, i)
                }
                ),
                c.offset(j.extend(o, {
                    using: e
                }))
            })
        }
        ,
        j.ui.pos = {
            _trigger: function(e, a, t, s) {
                a.elem && a.elem.trigger({
                    type: t,
                    position: e,
                    positionData: a,
                    triggered: s
                })
            },
            fit: {
                left: function(e, a) {
                    j.ui.pos._trigger(e, a, "posCollide", "fitLeft");
                    var t, s = a.within, r = s.isWindow ? s.scrollLeft : s.offset.left, i = s.width, c = e.left - a.collisionPosition.marginLeft, f = r - c, l = c + a.collisionWidth - i - r;
                    a.collisionWidth > i ? 0 < f && l <= 0 ? (t = e.left + f + a.collisionWidth - i - r,
                    e.left += f - t) : e.left = 0 < l && f <= 0 ? r : l < f ? r + i - a.collisionWidth : r : 0 < f ? e.left += f : 0 < l ? e.left -= l : e.left = y(e.left - c, e.left),
                    j.ui.pos._trigger(e, a, "posCollided", "fitLeft")
                },
                top: function(e, a) {
                    j.ui.pos._trigger(e, a, "posCollide", "fitTop");
                    var t, s = a.within, r = s.isWindow ? s.scrollTop : s.offset.top, i = a.within.height, c = e.top - a.collisionPosition.marginTop, f = r - c, l = c + a.collisionHeight - i - r;
                    a.collisionHeight > i ? 0 < f && l <= 0 ? (t = e.top + f + a.collisionHeight - i - r,
                    e.top += f - t) : e.top = 0 < l && f <= 0 ? r : l < f ? r + i - a.collisionHeight : r : 0 < f ? e.top += f : 0 < l ? e.top -= l : e.top = y(e.top - c, e.top),
                    j.ui.pos._trigger(e, a, "posCollided", "fitTop")
                }
            },
            flip: {
                left: function(e, a) {
                    j.ui.pos._trigger(e, a, "posCollide", "flipLeft");
                    var t, s, r = a.within, i = r.offset.left + r.scrollLeft, c = r.width, f = r.isWindow ? r.scrollLeft : r.offset.left, l = e.left - a.collisionPosition.marginLeft, o = l - f, n = l + a.collisionWidth - c - f, h = "left" === a.my[0] ? -a.elemWidth : "right" === a.my[0] ? a.elemWidth : 0, m = "left" === a.at[0] ? a.targetWidth : "right" === a.at[0] ? -a.targetWidth : 0, p = -2 * a.offset[0];
                    o < 0 ? ((t = e.left + h + m + p + a.collisionWidth - c - i) < 0 || t < x(o)) && (e.left += h + m + p) : 0 < n && (0 < (s = e.left - a.collisionPosition.marginLeft + h + m + p - f) || x(s) < n) && (e.left += h + m + p),
                    j.ui.pos._trigger(e, a, "posCollided", "flipLeft")
                },
                top: function(e, a) {
                    j.ui.pos._trigger(e, a, "posCollide", "flipTop");
                    var t, s, r = a.within, i = r.offset.top + r.scrollTop, c = r.height, f = r.isWindow ? r.scrollTop : r.offset.top, l = e.top - a.collisionPosition.marginTop, o = l - f, n = l + a.collisionHeight - c - f, h = "top" === a.my[1] ? -a.elemHeight : "bottom" === a.my[1] ? a.elemHeight : 0, m = "top" === a.at[1] ? a.targetHeight : "bottom" === a.at[1] ? -a.targetHeight : 0, p = -2 * a.offset[1];
                    o < 0 ? ((s = e.top + h + m + p + a.collisionHeight - c - i) < 0 || s < x(o)) && (e.top += h + m + p) : 0 < n && (0 < (t = e.top - a.collisionPosition.marginTop + h + m + p - f) || x(t) < n) && (e.top += h + m + p),
                    j.ui.pos._trigger(e, a, "posCollided", "flipTop")
                }
            },
            flipfit: {
                left: function() {
                    j.ui.pos.flip.left.apply(this, arguments),
                    j.ui.pos.fit.left.apply(this, arguments)
                },
                top: function() {
                    j.ui.pos.flip.top.apply(this, arguments),
                    j.ui.pos.fit.top.apply(this, arguments)
                }
            }
        },
        function() {
            var e, a, t, s, r, i = document.getElementsByTagName("body")[0], c = document.createElement("div");
            for (r in e = document.createElement(i ? "div" : "body"),
            t = {
                visibility: "hidden",
                width: 0,
                height: 0,
                border: 0,
                margin: 0,
                background: "none"
            },
            i && j.extend(t, {
                position: "absolute",
                left: "-1000px",
                top: "-1000px"
            }),
            t)
                e.style[r] = t[r];
            e.appendChild(c),
            (a = i || document.documentElement).insertBefore(e, a.firstChild),
            c.style.cssText = "position: absolute; left: 10.7432222px;",
            s = j(c).offset().left,
            j.support.offsetFractions = 10 < s && s < 11,
            e.innerHTML = "",
            a.removeChild(e)
        }()
    }();
    j.ui.position
}),
function(e) {
    "use strict";
    "function" == typeof define && define.amd ? define(["jquery"], e) : window.jQuery && !window.jQuery.fn.iconpicker && e(window.jQuery)
}(function(l) {
    "use strict";
    var t = function(e) {
        return !1 === e || "" === e || null == e
    }
      , s = function(e) {
        return 0 < l(e).length
    }
      , r = function(e) {
        return "string" == typeof e || e instanceof String
    }
      , i = function(e, a) {
        return -1 !== l.inArray(e, a)
    }
      , c = function(e, a) {
        this._id = c._idCounter++,
        this.element = l(e).addClass("iconpicker-element"),
        this._trigger("iconpickerCreate", {
            iconpickerValue: this.iconpickerValue
        }),
        this.options = l.extend({}, c.defaultOptions, this.element.data(), a),
        this.options.templates = l.extend({}, c.defaultOptions.templates, this.options.templates),
        this.options.originalPlacement = this.options.placement,
        this.container = !!s(this.options.container) && l(this.options.container),
        !1 === this.container && (this.element.is(".dropdown-toggle") ? this.container = l("~ .dropdown-menu:first", this.element) : this.container = this.element.is("input,textarea,button,.btn") ? this.element.parent() : this.element),
        this.container.addClass("iconpicker-container"),
        this.isDropdownMenu() && (this.options.placement = "inline"),
        this.input = !!this.element.is("input,textarea") && this.element.addClass("iconpicker-input"),
        !1 === this.input && (this.input = this.container.find(this.options.input),
        this.input.is("input,textarea") || (this.input = !1)),
        this.component = this.isDropdownMenu() ? this.container.parent().find(this.options.component) : this.container.find(this.options.component),
        0 === this.component.length ? this.component = !1 : this.component.find("i").addClass("iconpicker-component"),
        this._createPopover(),
        this._createIconpicker(),
        0 === this.getAcceptButton().length && (this.options.mustAccept = !1),
        this.isInputGroup() ? this.container.parent().append(this.popover) : this.container.append(this.popover),
        this._bindElementEvents(),
        this._bindWindowEvents(),
        this.update(this.options.selected),
        this.isInline() && this.show(),
        this._trigger("iconpickerCreated", {
            iconpickerValue: this.iconpickerValue
        })
    };
    c._idCounter = 0,
    c.defaultOptions = {
        title: !1,
        selected: !1,
        defaultValue: !1,
        placement: "bottom",
        collision: "none",
        animation: !0,
        hideOnSelect: !1,
        showFooter: !1,
        searchInFooter: !1,
        mustAccept: !1,
        selectedCustomClass: "bg-primary",
        icons: [],
        fullClassFormatter: function(e) {
            return e
        },
        input: "input,.iconpicker-input",
        inputSearch: !1,
        container: !1,
        component: ".input-group-addon,.iconpicker-component",
        templates: {
            popover: '<div class="iconpicker-popover popover"><div class="arrow"></div><div class="popover-title"></div><div class="popover-content"></div></div>',
            footer: '<div class="popover-footer"></div>',
            buttons: '<button class="iconpicker-btn iconpicker-btn-cancel btn btn-default btn-sm">Cancel</button> <button class="iconpicker-btn iconpicker-btn-accept btn btn-primary btn-sm">Accept</button>',
            search: '<input type="search" class="form-control iconpicker-search" placeholder="Type to filter" />',
            iconpicker: '<div class="iconpicker"><div class="iconpicker-items"></div></div>',
            iconpickerItem: '<a role="button" href="javascript:;" class="iconpicker-item"><i></i></a>'
        }
    },
    c.batch = function(e, a) {
        var t = Array.prototype.slice.call(arguments, 2);
        return l(e).each(function() {
            var e = l(this).data("iconpicker");
            e && e[a].apply(e, t)
        })
    }
    ,
    c.prototype = {
        constructor: c,
        options: {},
        _id: 0,
        _trigger: function(e, a) {
            a = a || {},
            this.element.trigger(l.extend({
                type: e,
                iconpickerInstance: this
            }, a))
        },
        _createPopover: function() {
            this.popover = l(this.options.templates.popover);
            var e = this.popover.find(".popover-title");
            if (this.options.title && e.append(l('<div class="popover-title-text">' + this.options.title + "</div>")),
            this.hasSeparatedSearchInput() && !this.options.searchInFooter ? e.append(this.options.templates.search) : this.options.title || e.remove(),
            this.options.showFooter && !t(this.options.templates.footer)) {
                var a = l(this.options.templates.footer);
                this.hasSeparatedSearchInput() && this.options.searchInFooter && a.append(l(this.options.templates.search)),
                t(this.options.templates.buttons) || a.append(l(this.options.templates.buttons)),
                this.popover.append(a)
            }
            return !0 === this.options.animation && this.popover.addClass("fade"),
            this.popover
        },
        _createIconpicker: function() {
            var t = this;
            this.iconpicker = l(this.options.templates.iconpicker);
            var e = function(e) {
                var a = l(this);
                a.is("i") && (a = a.parent()),
                t._trigger("iconpickerSelect", {
                    iconpickerItem: a,
                    iconpickerValue: t.iconpickerValue
                }),
                !1 === t.options.mustAccept ? (t.update(a.data("iconpickerValue")),
                t._trigger("iconpickerSelected", {
                    iconpickerItem: this,
                    iconpickerValue: t.iconpickerValue
                })) : t.update(a.data("iconpickerValue"), !0),
                t.options.hideOnSelect && !1 === t.options.mustAccept && t.hide()
            }
              , a = l(this.options.templates.iconpickerItem)
              , s = [];
            for (var r in this.options.icons)
                if ("string" == typeof this.options.icons[r].title) {
                    var i = a.clone();
                    if (i.find("i").addClass("fa " + this.options.fullClassFormatter(this.options.icons[r].title)),
                    i.data("iconpickerValue", this.options.icons[r].title).on("click.iconpicker", e),
                    i.attr("title", "." + this.options.icons[r].title),
                    0 < this.options.icons[r].searchTerms.length) {
                        for (var c = "", f = 0; f < this.options.icons[r].searchTerms.length; f++)
                            c = c + this.options.icons[r].searchTerms[f] + " ";
                        i.attr("data-search-terms", c)
                    }
                    s.push(i)
                }
            return this.iconpicker.find(".iconpicker-items").append(s),
            this.popover.find(".popover-content").append(this.iconpicker),
            this.iconpicker
        },
        _isEventInsideIconpicker: function(e) {
            var a = l(e.target);
            return !((!a.hasClass("iconpicker-element") || a.hasClass("iconpicker-element") && !a.is(this.element)) && 0 === a.parents(".iconpicker-popover").length)
        },
        _bindElementEvents: function() {
            var a = this;
            this.getSearchInput().on("keyup.iconpicker", function() {
                a.filter(l(this).val().toLowerCase())
            }),
            this.getAcceptButton().on("click.iconpicker", function() {
                var e = a.iconpicker.find(".iconpicker-selected").get(0);
                a.update(a.iconpickerValue),
                a._trigger("iconpickerSelected", {
                    iconpickerItem: e,
                    iconpickerValue: a.iconpickerValue
                }),
                a.isInline() || a.hide()
            }),
            this.getCancelButton().on("click.iconpicker", function() {
                a.isInline() || a.hide()
            }),
            this.element.on("focus.iconpicker", function(e) {
                a.show(),
                e.stopPropagation()
            }),
            this.hasComponent() && this.component.on("click.iconpicker", function() {
                a.toggle()
            }),
            this.hasInput() && this.input.on("keyup.iconpicker", function(e) {
                i(e.keyCode, [38, 40, 37, 39, 16, 17, 18, 9, 8, 91, 93, 20, 46, 186, 190, 46, 78, 188, 44, 86]) ? a._updateFormGroupStatus(!1 !== a.getValid(this.value)) : a.update(),
                !0 === a.options.inputSearch && a.filter(l(this).val().toLowerCase())
            })
        },
        _bindWindowEvents: function() {
            var e = l(window.document)
              , a = this
              , t = ".iconpicker.inst" + this._id;
            l(window).on("resize.iconpicker" + t + " orientationchange.iconpicker" + t, function(e) {
                a.popover.hasClass("in") && a.updatePlacement()
            }),
            a.isInline() || e.on("mouseup" + t, function(e) {
                a._isEventInsideIconpicker(e) || a.isInline() || a.hide()
            })
        },
        _unbindElementEvents: function() {
            this.popover.off(".iconpicker"),
            this.element.off(".iconpicker"),
            this.hasInput() && this.input.off(".iconpicker"),
            this.hasComponent() && this.component.off(".iconpicker"),
            this.hasContainer() && this.container.off(".iconpicker")
        },
        _unbindWindowEvents: function() {
            l(window).off(".iconpicker.inst" + this._id),
            l(window.document).off(".iconpicker.inst" + this._id)
        },
        updatePlacement: function(e, a) {
            e = e || this.options.placement,
            this.options.placement = e,
            a = !0 === (a = a || this.options.collision) ? "flip" : a;
            var t = {
                at: "right bottom",
                my: "right top",
                of: this.hasInput() && !this.isInputGroup() ? this.input : this.container,
                collision: !0 === a ? "flip" : a,
                within: window
            };
            if (this.popover.removeClass("inline topLeftCorner topLeft top topRight topRightCorner rightTop right rightBottom bottomRight bottomRightCorner bottom bottomLeft bottomLeftCorner leftBottom left leftTop"),
            "object" == typeof e)
                return this.popover.pos(l.extend({}, t, e));
            switch (e) {
            case "inline":
                t = !1;
                break;
            case "topLeftCorner":
                t.my = "right bottom",
                t.at = "left top";
                break;
            case "topLeft":
                t.my = "left bottom",
                t.at = "left top";
                break;
            case "top":
                t.my = "center bottom",
                t.at = "center top";
                break;
            case "topRight":
                t.my = "right bottom",
                t.at = "right top";
                break;
            case "topRightCorner":
                t.my = "left bottom",
                t.at = "right top";
                break;
            case "rightTop":
                t.my = "left bottom",
                t.at = "right center";
                break;
            case "right":
                t.my = "left center",
                t.at = "right center";
                break;
            case "rightBottom":
                t.my = "left top",
                t.at = "right center";
                break;
            case "bottomRightCorner":
                t.my = "left top",
                t.at = "right bottom";
                break;
            case "bottomRight":
                t.my = "right top",
                t.at = "right bottom";
                break;
            case "bottom":
                t.my = "center top",
                t.at = "center bottom";
                break;
            case "bottomLeft":
                t.my = "left top",
                t.at = "left bottom";
                break;
            case "bottomLeftCorner":
                t.my = "right top",
                t.at = "left bottom";
                break;
            case "leftBottom":
                t.my = "right top",
                t.at = "left center";
                break;
            case "left":
                t.my = "right center",
                t.at = "left center";
                break;
            case "leftTop":
                t.my = "right bottom",
                t.at = "left center";
                break;
            default:
                return !1
            }
            return this.popover.css({
                display: "inline" === this.options.placement ? "" : "block"
            }),
            !1 !== t ? this.popover.pos(t).css("maxWidth", l(window).width() - this.container.offset().left - 5) : this.popover.css({
                top: "auto",
                right: "auto",
                bottom: "auto",
                left: "auto",
                maxWidth: "none"
            }),
            this.popover.addClass(this.options.placement),
            !0
        },
        _updateComponents: function() {
            if (this.iconpicker.find(".iconpicker-item.iconpicker-selected").removeClass("iconpicker-selected " + this.options.selectedCustomClass),
            this.iconpickerValue && this.iconpicker.find("." + this.options.fullClassFormatter(this.iconpickerValue).replace(/ /g, ".")).parent().addClass("iconpicker-selected " + this.options.selectedCustomClass),
            this.hasComponent()) {
                var e = this.component.find("i");
                0 < e.length ? e.attr("class", "fa " + this.options.fullClassFormatter(this.iconpickerValue)) : this.component.html(this.getHtml())
            }
        },
        _updateFormGroupStatus: function(e) {
            return !!this.hasInput() && (!1 !== e ? this.input.parents(".form-group:first").removeClass("has-error") : this.input.parents(".form-group:first").addClass("has-error"),
            !0)
        },
        getValid: function(e) {
            r(e) || (e = "");
            var a = "" === e;
            e = l.trim(e);
            for (var t = !1, s = 0; s < this.options.icons.length; s++)
                if (this.options.icons[s].title === e) {
                    t = !0;
                    break
                }
            return !(!t && !a) && e
        },
        setValue: function(e) {
            var a = this.getValid(e);
            return !1 !== a ? (this.iconpickerValue = a,
            this._trigger("iconpickerSetValue", {
                iconpickerValue: a
            }),
            this.iconpickerValue) : (this._trigger("iconpickerInvalid", {
                iconpickerValue: e
            }),
            !1)
        },
        getHtml: function() {
            return '<i class="fa ' + this.options.fullClassFormatter(this.iconpickerValue) + '"></i>'
        },
        setSourceValue: function(e) {
            return !1 !== (e = this.setValue(e)) && "" !== e && (this.hasInput() ? this.input.val(this.iconpickerValue) : this.element.data("iconpickerValue", this.iconpickerValue),
            this._trigger("iconpickerSetSourceValue", {
                iconpickerValue: e
            })),
            e
        },
        getSourceValue: function(e) {
            var a = e = e || this.options.defaultValue;
            return void 0 !== (a = this.hasInput() ? this.input.val() : this.element.data("iconpickerValue")) && "" !== a && null !== a && !1 !== a || (a = e),
            a
        },
        hasInput: function() {
            return !1 !== this.input
        },
        isInputSearch: function() {
            return this.hasInput() && !0 === this.options.inputSearch
        },
        isInputGroup: function() {
            return this.container.is(".input-group")
        },
        isDropdownMenu: function() {
            return this.container.is(".dropdown-menu")
        },
        hasSeparatedSearchInput: function() {
            return !1 !== this.options.templates.search && !this.isInputSearch()
        },
        hasComponent: function() {
            return !1 !== this.component
        },
        hasContainer: function() {
            return !1 !== this.container
        },
        getAcceptButton: function() {
            return this.popover.find(".iconpicker-btn-accept")
        },
        getCancelButton: function() {
            return this.popover.find(".iconpicker-btn-cancel")
        },
        getSearchInput: function() {
            return this.popover.find(".iconpicker-search")
        },
        filter: function(s) {
            if (t(s))
                return this.iconpicker.find(".iconpicker-item").show(),
                l(!1);
            var r = [];
            return this.iconpicker.find(".iconpicker-item").each(function() {
                var e = l(this)
                  , a = e.attr("title").toLowerCase();
                a = a + " " + (e.attr("data-search-terms") ? e.attr("data-search-terms").toLowerCase() : "");
                var t = !1;
                try {
                    t = new RegExp("(^|\\W)" + s,"g")
                } catch (e) {
                    t = !1
                }
                !1 !== t && a.match(t) ? (r.push(e),
                e.show()) : e.hide()
            }),
            r
        },
        show: function() {
            if (this.popover.hasClass("in"))
                return !1;
            l.iconpicker.batch(l(".iconpicker-popover.in:not(.inline)").not(this.popover), "hide"),
            this._trigger("iconpickerShow", {
                iconpickerValue: this.iconpickerValue
            }),
            this.updatePlacement(),
            this.popover.addClass("in"),
            setTimeout(l.proxy(function() {
                this.popover.css("display", this.isInline() ? "" : "block"),
                this._trigger("iconpickerShown", {
                    iconpickerValue: this.iconpickerValue
                })
            }, this), this.options.animation ? 300 : 1)
        },
        hide: function() {
            if (!this.popover.hasClass("in"))
                return !1;
            this._trigger("iconpickerHide", {
                iconpickerValue: this.iconpickerValue
            }),
            this.popover.removeClass("in"),
            setTimeout(l.proxy(function() {
                this.popover.css("display", "none"),
                this.getSearchInput().val(""),
                this.filter(""),
                this._trigger("iconpickerHidden", {
                    iconpickerValue: this.iconpickerValue
                })
            }, this), this.options.animation ? 300 : 1)
        },
        toggle: function() {
            this.popover.is(":visible") ? this.hide() : this.show(!0)
        },
        update: function(e, a) {
            return e = e || this.getSourceValue(this.iconpickerValue),
            this._trigger("iconpickerUpdate", {
                iconpickerValue: this.iconpickerValue
            }),
            !0 === a ? e = this.setValue(e) : (e = this.setSourceValue(e),
            this._updateFormGroupStatus(!1 !== e)),
            !1 !== e && this._updateComponents(),
            this._trigger("iconpickerUpdated", {
                iconpickerValue: this.iconpickerValue
            }),
            e
        },
        destroy: function() {
            this._trigger("iconpickerDestroy", {
                iconpickerValue: this.iconpickerValue
            }),
            this.element.removeData("iconpicker").removeData("iconpickerValue").removeClass("iconpicker-element"),
            this._unbindElementEvents(),
            this._unbindWindowEvents(),
            l(this.popover).remove(),
            this._trigger("iconpickerDestroyed", {
                iconpickerValue: this.iconpickerValue
            })
        },
        disable: function() {
            return !!this.hasInput() && (this.input.prop("disabled", !0),
            !0)
        },
        enable: function() {
            return !!this.hasInput() && (this.input.prop("disabled", !1),
            !0)
        },
        isDisabled: function() {
            return !!this.hasInput() && !0 === this.input.prop("disabled")
        },
        isInline: function() {
            return "inline" === this.options.placement || this.popover.hasClass("inline")
        }
    },
    l.iconpicker = c,
    l.fn.iconpicker = function(a) {
        return this.each(function() {
            var e = l(this);
            e.data("iconpicker") || e.data("iconpicker", new c(this,"object" == typeof a ? a : {}))
        })
    }
    ,
    c.defaultOptions = l.extend(c.defaultOptions, {
        icons: [{
            title: "fa-500px",
            searchTerms: []
        }, {
            title: "fa-adjust",
            searchTerms: []
        }, {
            title: "fa-adn",
            searchTerms: []
        }, {
            title: "fa-align-center",
            searchTerms: []
        }, {
            title: "fa-align-justify",
            searchTerms: []
        }, {
            title: "fa-align-left",
            searchTerms: []
        }, {
            title: "fa-align-right",
            searchTerms: []
        }, {
            title: "fa-amazon",
            searchTerms: []
        }, {
            title: "fa-ambulance",
            searchTerms: []
        }, {
            title: "fa-american-sign-language-interpreting",
            searchTerms: []
        }, {
            title: "fa-anchor",
            searchTerms: []
        }, {
            title: "fa-android",
            searchTerms: []
        }, {
            title: "fa-angellist",
            searchTerms: []
        }, {
            title: "fa-angle-double-down",
            searchTerms: []
        }, {
            title: "fa-angle-double-left",
            searchTerms: []
        }, {
            title: "fa-angle-double-right",
            searchTerms: []
        }, {
            title: "fa-angle-double-up",
            searchTerms: []
        }, {
            title: "fa-angle-down",
            searchTerms: []
        }, {
            title: "fa-angle-left",
            searchTerms: []
        }, {
            title: "fa-angle-right",
            searchTerms: []
        }, {
            title: "fa-angle-up",
            searchTerms: []
        }, {
            title: "fa-apple",
            searchTerms: []
        }, {
            title: "fa-archive",
            searchTerms: []
        }, {
            title: "fa-area-chart",
            searchTerms: []
        }, {
            title: "fa-arrow-circle-down",
            searchTerms: []
        }, {
            title: "fa-arrow-circle-left",
            searchTerms: []
        }, {
            title: "fa-arrow-circle-o-down",
            searchTerms: []
        }, {
            title: "fa-arrow-circle-o-left",
            searchTerms: []
        }, {
            title: "fa-arrow-circle-o-right",
            searchTerms: []
        }, {
            title: "fa-arrow-circle-o-up",
            searchTerms: []
        }, {
            title: "fa-arrow-circle-right",
            searchTerms: []
        }, {
            title: "fa-arrow-circle-up",
            searchTerms: []
        }, {
            title: "fa-arrow-down",
            searchTerms: []
        }, {
            title: "fa-arrow-left",
            searchTerms: []
        }, {
            title: "fa-arrow-right",
            searchTerms: []
        }, {
            title: "fa-arrow-up",
            searchTerms: []
        }, {
            title: "fa-arrows",
            searchTerms: []
        }, {
            title: "fa-arrows-alt",
            searchTerms: []
        }, {
            title: "fa-arrows-h",
            searchTerms: []
        }, {
            title: "fa-arrows-v",
            searchTerms: []
        }, {
            title: "fa-asl-interpreting",
            searchTerms: []
        }, {
            title: "fa-assistive-listening-systems",
            searchTerms: []
        }, {
            title: "fa-asterisk",
            searchTerms: []
        }, {
            title: "fa-at",
            searchTerms: []
        }, {
            title: "fa-audio-description",
            searchTerms: []
        }, {
            title: "fa-automobile",
            searchTerms: []
        }, {
            title: "fa-backward",
            searchTerms: []
        }, {
            title: "fa-balance-scale",
            searchTerms: []
        }, {
            title: "fa-ban",
            searchTerms: []
        }, {
            title: "fa-bank",
            searchTerms: []
        }, {
            title: "fa-bar-chart",
            searchTerms: []
        }, {
            title: "fa-bar-chart-o",
            searchTerms: []
        }, {
            title: "fa-barcode",
            searchTerms: []
        }, {
            title: "fa-bars",
            searchTerms: []
        }, {
            title: "fa-battery-0",
            searchTerms: []
        }, {
            title: "fa-battery-1",
            searchTerms: []
        }, {
            title: "fa-battery-2",
            searchTerms: []
        }, {
            title: "fa-battery-3",
            searchTerms: []
        }, {
            title: "fa-battery-4",
            searchTerms: []
        }, {
            title: "fa-battery-empty",
            searchTerms: []
        }, {
            title: "fa-battery-full",
            searchTerms: []
        }, {
            title: "fa-battery-half",
            searchTerms: []
        }, {
            title: "fa-battery-quarter",
            searchTerms: []
        }, {
            title: "fa-battery-three-quarters",
            searchTerms: []
        }, {
            title: "fa-bed",
            searchTerms: []
        }, {
            title: "fa-beer",
            searchTerms: []
        }, {
            title: "fa-behance",
            searchTerms: []
        }, {
            title: "fa-behance-square",
            searchTerms: []
        }, {
            title: "fa-bell",
            searchTerms: []
        }, {
            title: "fa-bell-o",
            searchTerms: []
        }, {
            title: "fa-bell-slash",
            searchTerms: []
        }, {
            title: "fa-bell-slash-o",
            searchTerms: []
        }, {
            title: "fa-bicycle",
            searchTerms: []
        }, {
            title: "fa-binoculars",
            searchTerms: []
        }, {
            title: "fa-birthday-cake",
            searchTerms: []
        }, {
            title: "fa-bitbucket",
            searchTerms: []
        }, {
            title: "fa-bitbucket-square",
            searchTerms: []
        }, {
            title: "fa-bitcoin",
            searchTerms: []
        }, {
            title: "fa-black-tie",
            searchTerms: []
        }, {
            title: "fa-blind",
            searchTerms: []
        }, {
            title: "fa-bluetooth",
            searchTerms: []
        }, {
            title: "fa-bluetooth-b",
            searchTerms: []
        }, {
            title: "fa-bold",
            searchTerms: []
        }, {
            title: "fa-bolt",
            searchTerms: []
        }, {
            title: "fa-bomb",
            searchTerms: []
        }, {
            title: "fa-book",
            searchTerms: []
        }, {
            title: "fa-bookmark",
            searchTerms: []
        }, {
            title: "fa-bookmark-o",
            searchTerms: []
        }, {
            title: "fa-braille",
            searchTerms: []
        }, {
            title: "fa-briefcase",
            searchTerms: []
        }, {
            title: "fa-btc",
            searchTerms: []
        }, {
            title: "fa-bug",
            searchTerms: []
        }, {
            title: "fa-building",
            searchTerms: []
        }, {
            title: "fa-building-o",
            searchTerms: []
        }, {
            title: "fa-bullhorn",
            searchTerms: []
        }, {
            title: "fa-bullseye",
            searchTerms: []
        }, {
            title: "fa-bus",
            searchTerms: []
        }, {
            title: "fa-buysellads",
            searchTerms: []
        }, {
            title: "fa-cab",
            searchTerms: []
        }, {
            title: "fa-calculator",
            searchTerms: []
        }, {
            title: "fa-calendar",
            searchTerms: []
        }, {
            title: "fa-calendar-check-o",
            searchTerms: []
        }, {
            title: "fa-calendar-minus-o",
            searchTerms: []
        }, {
            title: "fa-calendar-o",
            searchTerms: []
        }, {
            title: "fa-calendar-plus-o",
            searchTerms: []
        }, {
            title: "fa-calendar-times-o",
            searchTerms: []
        }, {
            title: "fa-camera",
            searchTerms: []
        }, {
            title: "fa-camera-retro",
            searchTerms: []
        }, {
            title: "fa-car",
            searchTerms: []
        }, {
            title: "fa-caret-down",
            searchTerms: []
        }, {
            title: "fa-caret-left",
            searchTerms: []
        }, {
            title: "fa-caret-right",
            searchTerms: []
        }, {
            title: "fa-caret-square-o-down",
            searchTerms: []
        }, {
            title: "fa-caret-square-o-left",
            searchTerms: []
        }, {
            title: "fa-caret-square-o-right",
            searchTerms: []
        }, {
            title: "fa-caret-square-o-up",
            searchTerms: []
        }, {
            title: "fa-caret-up",
            searchTerms: []
        }, {
            title: "fa-cart-arrow-down",
            searchTerms: []
        }, {
            title: "fa-cart-plus",
            searchTerms: []
        }, {
            title: "fa-cc",
            searchTerms: []
        }, {
            title: "fa-cc-amex",
            searchTerms: []
        }, {
            title: "fa-cc-diners-club",
            searchTerms: []
        }, {
            title: "fa-cc-discover",
            searchTerms: []
        }, {
            title: "fa-cc-jcb",
            searchTerms: []
        }, {
            title: "fa-cc-mastercard",
            searchTerms: []
        }, {
            title: "fa-cc-paypal",
            searchTerms: []
        }, {
            title: "fa-cc-stripe",
            searchTerms: []
        }, {
            title: "fa-cc-visa",
            searchTerms: []
        }, {
            title: "fa-certificate",
            searchTerms: []
        }, {
            title: "fa-chain",
            searchTerms: []
        }, {
            title: "fa-chain-broken",
            searchTerms: []
        }, {
            title: "fa-check",
            searchTerms: []
        }, {
            title: "fa-check-circle",
            searchTerms: []
        }, {
            title: "fa-check-circle-o",
            searchTerms: []
        }, {
            title: "fa-check-square",
            searchTerms: []
        }, {
            title: "fa-check-square-o",
            searchTerms: []
        }, {
            title: "fa-chevron-circle-down",
            searchTerms: []
        }, {
            title: "fa-chevron-circle-left",
            searchTerms: []
        }, {
            title: "fa-chevron-circle-right",
            searchTerms: []
        }, {
            title: "fa-chevron-circle-up",
            searchTerms: []
        }, {
            title: "fa-chevron-down",
            searchTerms: []
        }, {
            title: "fa-chevron-left",
            searchTerms: []
        }, {
            title: "fa-chevron-right",
            searchTerms: []
        }, {
            title: "fa-chevron-up",
            searchTerms: []
        }, {
            title: "fa-child",
            searchTerms: []
        }, {
            title: "fa-chrome",
            searchTerms: []
        }, {
            title: "fa-circle",
            searchTerms: []
        }, {
            title: "fa-circle-o",
            searchTerms: []
        }, {
            title: "fa-circle-o-notch",
            searchTerms: []
        }, {
            title: "fa-circle-thin",
            searchTerms: []
        }, {
            title: "fa-clipboard",
            searchTerms: []
        }, {
            title: "fa-clock-o",
            searchTerms: []
        }, {
            title: "fa-clone",
            searchTerms: []
        }, {
            title: "fa-close",
            searchTerms: []
        }, {
            title: "fa-cloud",
            searchTerms: []
        }, {
            title: "fa-cloud-download",
            searchTerms: []
        }, {
            title: "fa-cloud-upload",
            searchTerms: []
        }, {
            title: "fa-cny",
            searchTerms: []
        }, {
            title: "fa-code",
            searchTerms: []
        }, {
            title: "fa-code-fork",
            searchTerms: []
        }, {
            title: "fa-codepen",
            searchTerms: []
        }, {
            title: "fa-codiepie",
            searchTerms: []
        }, {
            title: "fa-coffee",
            searchTerms: []
        }, {
            title: "fa-cog",
            searchTerms: []
        }, {
            title: "fa-cogs",
            searchTerms: []
        }, {
            title: "fa-columns",
            searchTerms: []
        }, {
            title: "fa-comment",
            searchTerms: []
        }, {
            title: "fa-comment-o",
            searchTerms: []
        }, {
            title: "fa-commenting",
            searchTerms: []
        }, {
            title: "fa-commenting-o",
            searchTerms: []
        }, {
            title: "fa-comments",
            searchTerms: []
        }, {
            title: "fa-comments-o",
            searchTerms: []
        }, {
            title: "fa-compass",
            searchTerms: []
        }, {
            title: "fa-compress",
            searchTerms: []
        }, {
            title: "fa-connectdevelop",
            searchTerms: []
        }, {
            title: "fa-contao",
            searchTerms: []
        }, {
            title: "fa-copy",
            searchTerms: []
        }, {
            title: "fa-copyright",
            searchTerms: []
        }, {
            title: "fa-creative-commons",
            searchTerms: []
        }, {
            title: "fa-credit-card",
            searchTerms: []
        }, {
            title: "fa-credit-card-alt",
            searchTerms: []
        }, {
            title: "fa-crop",
            searchTerms: []
        }, {
            title: "fa-crosshairs",
            searchTerms: []
        }, {
            title: "fa-css3",
            searchTerms: []
        }, {
            title: "fa-cube",
            searchTerms: []
        }, {
            title: "fa-cubes",
            searchTerms: []
        }, {
            title: "fa-cut",
            searchTerms: []
        }, {
            title: "fa-cutlery",
            searchTerms: []
        }, {
            title: "fa-dashboard",
            searchTerms: []
        }, {
            title: "fa-dashcube",
            searchTerms: []
        }, {
            title: "fa-database",
            searchTerms: []
        }, {
            title: "fa-deaf",
            searchTerms: []
        }, {
            title: "fa-deafness",
            searchTerms: []
        }, {
            title: "fa-dedent",
            searchTerms: []
        }, {
            title: "fa-delicious",
            searchTerms: []
        }, {
            title: "fa-desktop",
            searchTerms: []
        }, {
            title: "fa-deviantart",
            searchTerms: []
        }, {
            title: "fa-diamond",
            searchTerms: []
        }, {
            title: "fa-digg",
            searchTerms: []
        }, {
            title: "fa-dollar",
            searchTerms: []
        }, {
            title: "fa-dot-circle-o",
            searchTerms: []
        }, {
            title: "fa-download",
            searchTerms: []
        }, {
            title: "fa-dribbble",
            searchTerms: []
        }, {
            title: "fa-dropbox",
            searchTerms: []
        }, {
            title: "fa-drupal",
            searchTerms: []
        }, {
            title: "fa-edge",
            searchTerms: []
        }, {
            title: "fa-edit",
            searchTerms: []
        }, {
            title: "fa-eject",
            searchTerms: []
        }, {
            title: "fa-ellipsis-h",
            searchTerms: []
        }, {
            title: "fa-ellipsis-v",
            searchTerms: []
        }, {
            title: "fa-empire",
            searchTerms: []
        }, {
            title: "fa-envelope",
            searchTerms: []
        }, {
            title: "fa-envelope-o",
            searchTerms: []
        }, {
            title: "fa-envelope-square",
            searchTerms: []
        }, {
            title: "fa-envira",
            searchTerms: []
        }, {
            title: "fa-eraser",
            searchTerms: []
        }, {
            title: "fa-eur",
            searchTerms: []
        }, {
            title: "fa-euro",
            searchTerms: []
        }, {
            title: "fa-exchange",
            searchTerms: []
        }, {
            title: "fa-exclamation",
            searchTerms: []
        }, {
            title: "fa-exclamation-circle",
            searchTerms: []
        }, {
            title: "fa-exclamation-triangle",
            searchTerms: []
        }, {
            title: "fa-expand",
            searchTerms: []
        }, {
            title: "fa-expeditedssl",
            searchTerms: []
        }, {
            title: "fa-external-link",
            searchTerms: []
        }, {
            title: "fa-external-link-square",
            searchTerms: []
        }, {
            title: "fa-eye",
            searchTerms: []
        }, {
            title: "fa-eye-slash",
            searchTerms: []
        }, {
            title: "fa-eyedropper",
            searchTerms: []
        }, {
            title: "fa-fa",
            searchTerms: []
        }, {
            title: "fa-facebook",
            searchTerms: []
        }, {
            title: "fa-facebook-f",
            searchTerms: []
        }, {
            title: "fa-facebook-official",
            searchTerms: []
        }, {
            title: "fa-facebook-square",
            searchTerms: []
        }, {
            title: "fa-fast-backward",
            searchTerms: []
        }, {
            title: "fa-fast-forward",
            searchTerms: []
        }, {
            title: "fa-fax",
            searchTerms: []
        }, {
            title: "fa-feed",
            searchTerms: []
        }, {
            title: "fa-female",
            searchTerms: []
        }, {
            title: "fa-fighter-jet",
            searchTerms: []
        }, {
            title: "fa-file",
            searchTerms: []
        }, {
            title: "fa-file-archive-o",
            searchTerms: []
        }, {
            title: "fa-file-audio-o",
            searchTerms: []
        }, {
            title: "fa-file-code-o",
            searchTerms: []
        }, {
            title: "fa-file-excel-o",
            searchTerms: []
        }, {
            title: "fa-file-image-o",
            searchTerms: []
        }, {
            title: "fa-file-movie-o",
            searchTerms: []
        }, {
            title: "fa-file-o",
            searchTerms: []
        }, {
            title: "fa-file-pdf-o",
            searchTerms: []
        }, {
            title: "fa-file-photo-o",
            searchTerms: []
        }, {
            title: "fa-file-picture-o",
            searchTerms: []
        }, {
            title: "fa-file-powerpoint-o",
            searchTerms: []
        }, {
            title: "fa-file-sound-o",
            searchTerms: []
        }, {
            title: "fa-file-text",
            searchTerms: []
        }, {
            title: "fa-file-text-o",
            searchTerms: []
        }, {
            title: "fa-file-video-o",
            searchTerms: []
        }, {
            title: "fa-file-word-o",
            searchTerms: []
        }, {
            title: "fa-file-zip-o",
            searchTerms: []
        }, {
            title: "fa-files-o",
            searchTerms: []
        }, {
            title: "fa-film",
            searchTerms: []
        }, {
            title: "fa-filter",
            searchTerms: []
        }, {
            title: "fa-fire",
            searchTerms: []
        }, {
            title: "fa-fire-extinguisher",
            searchTerms: []
        }, {
            title: "fa-firefox",
            searchTerms: []
        }, {
            title: "fa-first-order",
            searchTerms: []
        }, {
            title: "fa-flag",
            searchTerms: []
        }, {
            title: "fa-flag-checkered",
            searchTerms: []
        }, {
            title: "fa-flag-o",
            searchTerms: []
        }, {
            title: "fa-flash",
            searchTerms: []
        }, {
            title: "fa-flask",
            searchTerms: []
        }, {
            title: "fa-flickr",
            searchTerms: []
        }, {
            title: "fa-floppy-o",
            searchTerms: []
        }, {
            title: "fa-folder",
            searchTerms: []
        }, {
            title: "fa-folder-o",
            searchTerms: []
        }, {
            title: "fa-folder-open",
            searchTerms: []
        }, {
            title: "fa-folder-open-o",
            searchTerms: []
        }, {
            title: "fa-font",
            searchTerms: []
        }, {
            title: "fa-font-awesome",
            searchTerms: []
        }, {
            title: "fa-fonticons",
            searchTerms: []
        }, {
            title: "fa-fort-awesome",
            searchTerms: []
        }, {
            title: "fa-forumbee",
            searchTerms: []
        }, {
            title: "fa-forward",
            searchTerms: []
        }, {
            title: "fa-foursquare",
            searchTerms: []
        }, {
            title: "fa-frown-o",
            searchTerms: []
        }, {
            title: "fa-futbol-o",
            searchTerms: []
        }, {
            title: "fa-gamepad",
            searchTerms: []
        }, {
            title: "fa-gavel",
            searchTerms: []
        }, {
            title: "fa-gbp",
            searchTerms: []
        }, {
            title: "fa-ge",
            searchTerms: []
        }, {
            title: "fa-gear",
            searchTerms: []
        }, {
            title: "fa-gears",
            searchTerms: []
        }, {
            title: "fa-genderless",
            searchTerms: []
        }, {
            title: "fa-get-pocket",
            searchTerms: []
        }, {
            title: "fa-gg",
            searchTerms: []
        }, {
            title: "fa-gg-circle",
            searchTerms: []
        }, {
            title: "fa-gift",
            searchTerms: []
        }, {
            title: "fa-git",
            searchTerms: []
        }, {
            title: "fa-git-square",
            searchTerms: []
        }, {
            title: "fa-github",
            searchTerms: []
        }, {
            title: "fa-github-alt",
            searchTerms: []
        }, {
            title: "fa-github-square",
            searchTerms: []
        }, {
            title: "fa-gitlab",
            searchTerms: []
        }, {
            title: "fa-gittip",
            searchTerms: []
        }, {
            title: "fa-glass",
            searchTerms: []
        }, {
            title: "fa-glide",
            searchTerms: []
        }, {
            title: "fa-glide-g",
            searchTerms: []
        }, {
            title: "fa-globe",
            searchTerms: []
        }, {
            title: "fa-google",
            searchTerms: []
        }, {
            title: "fa-google-plus",
            searchTerms: []
        }, {
            title: "fa-google-plus-circle",
            searchTerms: []
        }, {
            title: "fa-google-plus-official",
            searchTerms: []
        }, {
            title: "fa-google-plus-square",
            searchTerms: []
        }, {
            title: "fa-google-wallet",
            searchTerms: []
        }, {
            title: "fa-graduation-cap",
            searchTerms: []
        }, {
            title: "fa-gratipay",
            searchTerms: []
        }, {
            title: "fa-group",
            searchTerms: []
        }, {
            title: "fa-h-square",
            searchTerms: []
        }, {
            title: "fa-hacker-news",
            searchTerms: []
        }, {
            title: "fa-hand-grab-o",
            searchTerms: []
        }, {
            title: "fa-hand-lizard-o",
            searchTerms: []
        }, {
            title: "fa-hand-o-down",
            searchTerms: []
        }, {
            title: "fa-hand-o-left",
            searchTerms: []
        }, {
            title: "fa-hand-o-right",
            searchTerms: []
        }, {
            title: "fa-hand-o-up",
            searchTerms: []
        }, {
            title: "fa-hand-paper-o",
            searchTerms: []
        }, {
            title: "fa-hand-peace-o",
            searchTerms: []
        }, {
            title: "fa-hand-pointer-o",
            searchTerms: []
        }, {
            title: "fa-hand-rock-o",
            searchTerms: []
        }, {
            title: "fa-hand-scissors-o",
            searchTerms: []
        }, {
            title: "fa-hand-spock-o",
            searchTerms: []
        }, {
            title: "fa-hand-stop-o",
            searchTerms: []
        }, {
            title: "fa-hard-of-hearing",
            searchTerms: []
        }, {
            title: "fa-hashtag",
            searchTerms: []
        }, {
            title: "fa-hdd-o",
            searchTerms: []
        }, {
            title: "fa-header",
            searchTerms: []
        }, {
            title: "fa-headphones",
            searchTerms: []
        }, {
            title: "fa-heart",
            searchTerms: []
        }, {
            title: "fa-heart-o",
            searchTerms: []
        }, {
            title: "fa-heartbeat",
            searchTerms: []
        }, {
            title: "fa-history",
            searchTerms: []
        }, {
            title: "fa-home",
            searchTerms: []
        }, {
            title: "fa-hospital-o",
            searchTerms: []
        }, {
            title: "fa-hotel",
            searchTerms: []
        }, {
            title: "fa-hourglass",
            searchTerms: []
        }, {
            title: "fa-hourglass-1",
            searchTerms: []
        }, {
            title: "fa-hourglass-2",
            searchTerms: []
        }, {
            title: "fa-hourglass-3",
            searchTerms: []
        }, {
            title: "fa-hourglass-end",
            searchTerms: []
        }, {
            title: "fa-hourglass-half",
            searchTerms: []
        }, {
            title: "fa-hourglass-o",
            searchTerms: []
        }, {
            title: "fa-hourglass-start",
            searchTerms: []
        }, {
            title: "fa-houzz",
            searchTerms: []
        }, {
            title: "fa-html5",
            searchTerms: []
        }, {
            title: "fa-i-cursor",
            searchTerms: []
        }, {
            title: "fa-ils",
            searchTerms: []
        }, {
            title: "fa-image",
            searchTerms: []
        }, {
            title: "fa-inbox",
            searchTerms: []
        }, {
            title: "fa-indent",
            searchTerms: []
        }, {
            title: "fa-industry",
            searchTerms: []
        }, {
            title: "fa-info",
            searchTerms: []
        }, {
            title: "fa-info-circle",
            searchTerms: []
        }, {
            title: "fa-inr",
            searchTerms: []
        }, {
            title: "fa-instagram",
            searchTerms: []
        }, {
            title: "fa-institution",
            searchTerms: []
        }, {
            title: "fa-internet-explorer",
            searchTerms: []
        }, {
            title: "fa-intersex",
            searchTerms: []
        }, {
            title: "fa-ioxhost",
            searchTerms: []
        }, {
            title: "fa-italic",
            searchTerms: []
        }, {
            title: "fa-joomla",
            searchTerms: []
        }, {
            title: "fa-jpy",
            searchTerms: []
        }, {
            title: "fa-jsfiddle",
            searchTerms: []
        }, {
            title: "fa-key",
            searchTerms: []
        }, {
            title: "fa-keyboard-o",
            searchTerms: []
        }, {
            title: "fa-krw",
            searchTerms: []
        }, {
            title: "fa-language",
            searchTerms: []
        }, {
            title: "fa-laptop",
            searchTerms: []
        }, {
            title: "fa-lastfm",
            searchTerms: []
        }, {
            title: "fa-lastfm-square",
            searchTerms: []
        }, {
            title: "fa-leaf",
            searchTerms: []
        }, {
            title: "fa-leanpub",
            searchTerms: []
        }, {
            title: "fa-legal",
            searchTerms: []
        }, {
            title: "fa-lemon-o",
            searchTerms: []
        }, {
            title: "fa-level-down",
            searchTerms: []
        }, {
            title: "fa-level-up",
            searchTerms: []
        }, {
            title: "fa-life-bouy",
            searchTerms: []
        }, {
            title: "fa-life-buoy",
            searchTerms: []
        }, {
            title: "fa-life-ring",
            searchTerms: []
        }, {
            title: "fa-life-saver",
            searchTerms: []
        }, {
            title: "fa-lightbulb-o",
            searchTerms: []
        }, {
            title: "fa-line-chart",
            searchTerms: []
        }, {
            title: "fa-link",
            searchTerms: []
        }, {
            title: "fa-linkedin",
            searchTerms: []
        }, {
            title: "fa-linkedin-square",
            searchTerms: []
        }, {
            title: "fa-linux",
            searchTerms: []
        }, {
            title: "fa-list",
            searchTerms: []
        }, {
            title: "fa-list-alt",
            searchTerms: []
        }, {
            title: "fa-list-ol",
            searchTerms: []
        }, {
            title: "fa-list-ul",
            searchTerms: []
        }, {
            title: "fa-location-arrow",
            searchTerms: []
        }, {
            title: "fa-lock",
            searchTerms: []
        }, {
            title: "fa-long-arrow-down",
            searchTerms: []
        }, {
            title: "fa-long-arrow-left",
            searchTerms: []
        }, {
            title: "fa-long-arrow-right",
            searchTerms: []
        }, {
            title: "fa-long-arrow-up",
            searchTerms: []
        }, {
            title: "fa-low-vision",
            searchTerms: []
        }, {
            title: "fa-magic",
            searchTerms: []
        }, {
            title: "fa-magnet",
            searchTerms: []
        }, {
            title: "fa-mail-forward",
            searchTerms: []
        }, {
            title: "fa-mail-reply",
            searchTerms: []
        }, {
            title: "fa-mail-reply-all",
            searchTerms: []
        }, {
            title: "fa-male",
            searchTerms: []
        }, {
            title: "fa-map",
            searchTerms: []
        }, {
            title: "fa-map-marker",
            searchTerms: []
        }, {
            title: "fa-map-o",
            searchTerms: []
        }, {
            title: "fa-map-pin",
            searchTerms: []
        }, {
            title: "fa-map-signs",
            searchTerms: []
        }, {
            title: "fa-mars",
            searchTerms: []
        }, {
            title: "fa-mars-double",
            searchTerms: []
        }, {
            title: "fa-mars-stroke",
            searchTerms: []
        }, {
            title: "fa-mars-stroke-h",
            searchTerms: []
        }, {
            title: "fa-mars-stroke-v",
            searchTerms: []
        }, {
            title: "fa-maxcdn",
            searchTerms: []
        }, {
            title: "fa-meanpath",
            searchTerms: []
        }, {
            title: "fa-medium",
            searchTerms: []
        }, {
            title: "fa-medkit",
            searchTerms: []
        }, {
            title: "fa-meh-o",
            searchTerms: []
        }, {
            title: "fa-mercury",
            searchTerms: []
        }, {
            title: "fa-microphone",
            searchTerms: []
        }, {
            title: "fa-microphone-slash",
            searchTerms: []
        }, {
            title: "fa-minus",
            searchTerms: []
        }, {
            title: "fa-minus-circle",
            searchTerms: []
        }, {
            title: "fa-minus-square",
            searchTerms: []
        }, {
            title: "fa-minus-square-o",
            searchTerms: []
        }, {
            title: "fa-mixcloud",
            searchTerms: []
        }, {
            title: "fa-mobile",
            searchTerms: []
        }, {
            title: "fa-mobile-phone",
            searchTerms: []
        }, {
            title: "fa-modx",
            searchTerms: []
        }, {
            title: "fa-money",
            searchTerms: []
        }, {
            title: "fa-moon-o",
            searchTerms: []
        }, {
            title: "fa-mortar-board",
            searchTerms: []
        }, {
            title: "fa-motorcycle",
            searchTerms: []
        }, {
            title: "fa-mouse-pointer",
            searchTerms: []
        }, {
            title: "fa-music",
            searchTerms: []
        }, {
            title: "fa-navicon",
            searchTerms: []
        }, {
            title: "fa-neuter",
            searchTerms: []
        }, {
            title: "fa-newspaper-o",
            searchTerms: []
        }, {
            title: "fa-object-group",
            searchTerms: []
        }, {
            title: "fa-object-ungroup",
            searchTerms: []
        }, {
            title: "fa-odnoklassniki",
            searchTerms: []
        }, {
            title: "fa-odnoklassniki-square",
            searchTerms: []
        }, {
            title: "fa-opencart",
            searchTerms: []
        }, {
            title: "fa-openid",
            searchTerms: []
        }, {
            title: "fa-opera",
            searchTerms: []
        }, {
            title: "fa-optin-monster",
            searchTerms: []
        }, {
            title: "fa-outdent",
            searchTerms: []
        }, {
            title: "fa-pagelines",
            searchTerms: []
        }, {
            title: "fa-paint-brush",
            searchTerms: []
        }, {
            title: "fa-paper-plane",
            searchTerms: []
        }, {
            title: "fa-paper-plane-o",
            searchTerms: []
        }, {
            title: "fa-paperclip",
            searchTerms: []
        }, {
            title: "fa-paragraph",
            searchTerms: []
        }, {
            title: "fa-paste",
            searchTerms: []
        }, {
            title: "fa-pause",
            searchTerms: []
        }, {
            title: "fa-pause-circle",
            searchTerms: []
        }, {
            title: "fa-pause-circle-o",
            searchTerms: []
        }, {
            title: "fa-paw",
            searchTerms: []
        }, {
            title: "fa-paypal",
            searchTerms: []
        }, {
            title: "fa-pencil",
            searchTerms: []
        }, {
            title: "fa-pencil-square",
            searchTerms: []
        }, {
            title: "fa-pencil-square-o",
            searchTerms: []
        }, {
            title: "fa-percent",
            searchTerms: []
        }, {
            title: "fa-phone",
            searchTerms: []
        }, {
            title: "fa-phone-square",
            searchTerms: []
        }, {
            title: "fa-photo",
            searchTerms: []
        }, {
            title: "fa-picture-o",
            searchTerms: []
        }, {
            title: "fa-pie-chart",
            searchTerms: []
        }, {
            title: "fa-pied-piper",
            searchTerms: []
        }, {
            title: "fa-pied-piper-alt",
            searchTerms: []
        }, {
            title: "fa-pied-piper-pp",
            searchTerms: []
        }, {
            title: "fa-pinterest",
            searchTerms: []
        }, {
            title: "fa-pinterest-p",
            searchTerms: []
        }, {
            title: "fa-pinterest-square",
            searchTerms: []
        }, {
            title: "fa-plane",
            searchTerms: []
        }, {
            title: "fa-play",
            searchTerms: []
        }, {
            title: "fa-play-circle",
            searchTerms: []
        }, {
            title: "fa-play-circle-o",
            searchTerms: []
        }, {
            title: "fa-plug",
            searchTerms: []
        }, {
            title: "fa-plus",
            searchTerms: []
        }, {
            title: "fa-plus-circle",
            searchTerms: []
        }, {
            title: "fa-plus-square",
            searchTerms: []
        }, {
            title: "fa-plus-square-o",
            searchTerms: []
        }, {
            title: "fa-power-off",
            searchTerms: []
        }, {
            title: "fa-print",
            searchTerms: []
        }, {
            title: "fa-product-hunt",
            searchTerms: []
        }, {
            title: "fa-puzzle-piece",
            searchTerms: []
        }, {
            title: "fa-qq",
            searchTerms: []
        }, {
            title: "fa-qrcode",
            searchTerms: []
        }, {
            title: "fa-question",
            searchTerms: []
        }, {
            title: "fa-question-circle",
            searchTerms: []
        }, {
            title: "fa-question-circle-o",
            searchTerms: []
        }, {
            title: "fa-quote-left",
            searchTerms: []
        }, {
            title: "fa-quote-right",
            searchTerms: []
        }, {
            title: "fa-ra",
            searchTerms: []
        }, {
            title: "fa-random",
            searchTerms: []
        }, {
            title: "fa-rebel",
            searchTerms: []
        }, {
            title: "fa-recycle",
            searchTerms: []
        }, {
            title: "fa-reddit",
            searchTerms: []
        }, {
            title: "fa-reddit-alien",
            searchTerms: []
        }, {
            title: "fa-reddit-square",
            searchTerms: []
        }, {
            title: "fa-refresh",
            searchTerms: []
        }, {
            title: "fa-registered",
            searchTerms: []
        }, {
            title: "fa-remove",
            searchTerms: []
        }, {
            title: "fa-renren",
            searchTerms: []
        }, {
            title: "fa-reorder",
            searchTerms: []
        }, {
            title: "fa-repeat",
            searchTerms: []
        }, {
            title: "fa-reply",
            searchTerms: []
        }, {
            title: "fa-reply-all",
            searchTerms: []
        }, {
            title: "fa-resistance",
            searchTerms: []
        }, {
            title: "fa-retweet",
            searchTerms: []
        }, {
            title: "fa-rmb",
            searchTerms: []
        }, {
            title: "fa-road",
            searchTerms: []
        }, {
            title: "fa-rocket",
            searchTerms: []
        }, {
            title: "fa-rotate-left",
            searchTerms: []
        }, {
            title: "fa-rotate-right",
            searchTerms: []
        }, {
            title: "fa-rouble",
            searchTerms: []
        }, {
            title: "fa-rss",
            searchTerms: []
        }, {
            title: "fa-rss-square",
            searchTerms: []
        }, {
            title: "fa-rub",
            searchTerms: []
        }, {
            title: "fa-ruble",
            searchTerms: []
        }, {
            title: "fa-rupee",
            searchTerms: []
        }, {
            title: "fa-safari",
            searchTerms: []
        }, {
            title: "fa-save",
            searchTerms: []
        }, {
            title: "fa-scissors",
            searchTerms: []
        }, {
            title: "fa-scribd",
            searchTerms: []
        }, {
            title: "fa-search",
            searchTerms: []
        }, {
            title: "fa-search-minus",
            searchTerms: []
        }, {
            title: "fa-search-plus",
            searchTerms: []
        }, {
            title: "fa-sellsy",
            searchTerms: []
        }, {
            title: "fa-send",
            searchTerms: []
        }, {
            title: "fa-send-o",
            searchTerms: []
        }, {
            title: "fa-server",
            searchTerms: []
        }, {
            title: "fa-share",
            searchTerms: []
        }, {
            title: "fa-share-alt",
            searchTerms: []
        }, {
            title: "fa-share-alt-square",
            searchTerms: []
        }, {
            title: "fa-share-square",
            searchTerms: []
        }, {
            title: "fa-share-square-o",
            searchTerms: []
        }, {
            title: "fa-shekel",
            searchTerms: []
        }, {
            title: "fa-sheqel",
            searchTerms: []
        }, {
            title: "fa-shield",
            searchTerms: []
        }, {
            title: "fa-ship",
            searchTerms: []
        }, {
            title: "fa-shirtsinbulk",
            searchTerms: []
        }, {
            title: "fa-shopping-bag",
            searchTerms: []
        }, {
            title: "fa-shopping-basket",
            searchTerms: []
        }, {
            title: "fa-shopping-cart",
            searchTerms: []
        }, {
            title: "fa-sign-in",
            searchTerms: []
        }, {
            title: "fa-sign-language",
            searchTerms: []
        }, {
            title: "fa-sign-out",
            searchTerms: []
        }, {
            title: "fa-signal",
            searchTerms: []
        }, {
            title: "fa-signing",
            searchTerms: []
        }, {
            title: "fa-simplybuilt",
            searchTerms: []
        }, {
            title: "fa-sitemap",
            searchTerms: []
        }, {
            title: "fa-skyatlas",
            searchTerms: []
        }, {
            title: "fa-skype",
            searchTerms: []
        }, {
            title: "fa-slack",
            searchTerms: []
        }, {
            title: "fa-sliders",
            searchTerms: []
        }, {
            title: "fa-slideshare",
            searchTerms: []
        }, {
            title: "fa-smile-o",
            searchTerms: []
        }, {
            title: "fa-snapchat",
            searchTerms: []
        }, {
            title: "fa-snapchat-ghost",
            searchTerms: []
        }, {
            title: "fa-snapchat-square",
            searchTerms: []
        }, {
            title: "fa-soccer-ball-o",
            searchTerms: []
        }, {
            title: "fa-sort",
            searchTerms: []
        }, {
            title: "fa-sort-alpha-asc",
            searchTerms: []
        }, {
            title: "fa-sort-alpha-desc",
            searchTerms: []
        }, {
            title: "fa-sort-amount-asc",
            searchTerms: []
        }, {
            title: "fa-sort-amount-desc",
            searchTerms: []
        }, {
            title: "fa-sort-asc",
            searchTerms: []
        }, {
            title: "fa-sort-desc",
            searchTerms: []
        }, {
            title: "fa-sort-down",
            searchTerms: []
        }, {
            title: "fa-sort-numeric-asc",
            searchTerms: []
        }, {
            title: "fa-sort-numeric-desc",
            searchTerms: []
        }, {
            title: "fa-sort-up",
            searchTerms: []
        }, {
            title: "fa-soundcloud",
            searchTerms: []
        }, {
            title: "fa-space-shuttle",
            searchTerms: []
        }, {
            title: "fa-spinner",
            searchTerms: []
        }, {
            title: "fa-spoon",
            searchTerms: []
        }, {
            title: "fa-spotify",
            searchTerms: []
        }, {
            title: "fa-square",
            searchTerms: []
        }, {
            title: "fa-square-o",
            searchTerms: []
        }, {
            title: "fa-stack-exchange",
            searchTerms: []
        }, {
            title: "fa-stack-overflow",
            searchTerms: []
        }, {
            title: "fa-star",
            searchTerms: []
        }, {
            title: "fa-star-half",
            searchTerms: []
        }, {
            title: "fa-star-half-empty",
            searchTerms: []
        }, {
            title: "fa-star-half-full",
            searchTerms: []
        }, {
            title: "fa-star-half-o",
            searchTerms: []
        }, {
            title: "fa-star-o",
            searchTerms: []
        }, {
            title: "fa-steam",
            searchTerms: []
        }, {
            title: "fa-steam-square",
            searchTerms: []
        }, {
            title: "fa-step-backward",
            searchTerms: []
        }, {
            title: "fa-step-forward",
            searchTerms: []
        }, {
            title: "fa-stethoscope",
            searchTerms: []
        }, {
            title: "fa-sticky-note",
            searchTerms: []
        }, {
            title: "fa-sticky-note-o",
            searchTerms: []
        }, {
            title: "fa-stop",
            searchTerms: []
        }, {
            title: "fa-stop-circle",
            searchTerms: []
        }, {
            title: "fa-stop-circle-o",
            searchTerms: []
        }, {
            title: "fa-street-view",
            searchTerms: []
        }, {
            title: "fa-strikethrough",
            searchTerms: []
        }, {
            title: "fa-stumbleupon",
            searchTerms: []
        }, {
            title: "fa-stumbleupon-circle",
            searchTerms: []
        }, {
            title: "fa-subscript",
            searchTerms: []
        }, {
            title: "fa-subway",
            searchTerms: []
        }, {
            title: "fa-suitcase",
            searchTerms: []
        }, {
            title: "fa-sun-o",
            searchTerms: []
        }, {
            title: "fa-superscript",
            searchTerms: []
        }, {
            title: "fa-support",
            searchTerms: []
        }, {
            title: "fa-table",
            searchTerms: []
        }, {
            title: "fa-tablet",
            searchTerms: []
        }, {
            title: "fa-tachometer",
            searchTerms: []
        }, {
            title: "fa-tag",
            searchTerms: []
        }, {
            title: "fa-tags",
            searchTerms: []
        }, {
            title: "fa-tasks",
            searchTerms: []
        }, {
            title: "fa-taxi",
            searchTerms: []
        }, {
            title: "fa-television",
            searchTerms: []
        }, {
            title: "fa-tencent-weibo",
            searchTerms: []
        }, {
            title: "fa-terminal",
            searchTerms: []
        }, {
            title: "fa-text-height",
            searchTerms: []
        }, {
            title: "fa-text-width",
            searchTerms: []
        }, {
            title: "fa-th",
            searchTerms: []
        }, {
            title: "fa-th-large",
            searchTerms: []
        }, {
            title: "fa-th-list",
            searchTerms: []
        }, {
            title: "fa-themeisle",
            searchTerms: []
        }, {
            title: "fa-thumb-tack",
            searchTerms: []
        }, {
            title: "fa-thumbs-down",
            searchTerms: []
        }, {
            title: "fa-thumbs-o-down",
            searchTerms: []
        }, {
            title: "fa-thumbs-o-up",
            searchTerms: []
        }, {
            title: "fa-thumbs-up",
            searchTerms: []
        }, {
            title: "fa-ticket",
            searchTerms: []
        }, {
            title: "fa-times",
            searchTerms: []
        }, {
            title: "fa-times-circle",
            searchTerms: []
        }, {
            title: "fa-times-circle-o",
            searchTerms: []
        }, {
            title: "fa-tint",
            searchTerms: []
        }, {
            title: "fa-toggle-down",
            searchTerms: []
        }, {
            title: "fa-toggle-left",
            searchTerms: []
        }, {
            title: "fa-toggle-off",
            searchTerms: []
        }, {
            title: "fa-toggle-on",
            searchTerms: []
        }, {
            title: "fa-toggle-right",
            searchTerms: []
        }, {
            title: "fa-toggle-up",
            searchTerms: []
        }, {
            title: "fa-trademark",
            searchTerms: []
        }, {
            title: "fa-train",
            searchTerms: []
        }, {
            title: "fa-transgender",
            searchTerms: []
        }, {
            title: "fa-transgender-alt",
            searchTerms: []
        }, {
            title: "fa-trash",
            searchTerms: []
        }, {
            title: "fa-trash-o",
            searchTerms: []
        }, {
            title: "fa-tree",
            searchTerms: []
        }, {
            title: "fa-trello",
            searchTerms: []
        }, {
            title: "fa-tripadvisor",
            searchTerms: []
        }, {
            title: "fa-trophy",
            searchTerms: []
        }, {
            title: "fa-truck",
            searchTerms: []
        }, {
            title: "fa-try",
            searchTerms: []
        }, {
            title: "fa-tty",
            searchTerms: []
        }, {
            title: "fa-tumblr",
            searchTerms: []
        }, {
            title: "fa-tumblr-square",
            searchTerms: []
        }, {
            title: "fa-turkish-lira",
            searchTerms: []
        }, {
            title: "fa-tv",
            searchTerms: []
        }, {
            title: "fa-twitch",
            searchTerms: []
        }, {
            title: "fa-twitter",
            searchTerms: []
        }, {
            title: "fa-twitter-square",
            searchTerms: []
        }, {
            title: "fa-umbrella",
            searchTerms: []
        }, {
            title: "fa-underline",
            searchTerms: []
        }, {
            title: "fa-undo",
            searchTerms: []
        }, {
            title: "fa-universal-access",
            searchTerms: []
        }, {
            title: "fa-university",
            searchTerms: []
        }, {
            title: "fa-unlink",
            searchTerms: []
        }, {
            title: "fa-unlock",
            searchTerms: []
        }, {
            title: "fa-unlock-alt",
            searchTerms: []
        }, {
            title: "fa-unsorted",
            searchTerms: []
        }, {
            title: "fa-upload",
            searchTerms: []
        }, {
            title: "fa-usb",
            searchTerms: []
        }, {
            title: "fa-usd",
            searchTerms: []
        }, {
            title: "fa-user",
            searchTerms: []
        }, {
            title: "fa-user-md",
            searchTerms: []
        }, {
            title: "fa-user-plus",
            searchTerms: []
        }, {
            title: "fa-user-secret",
            searchTerms: []
        }, {
            title: "fa-user-times",
            searchTerms: []
        }, {
            title: "fa-users",
            searchTerms: []
        }, {
            title: "fa-venus",
            searchTerms: []
        }, {
            title: "fa-venus-double",
            searchTerms: []
        }, {
            title: "fa-venus-mars",
            searchTerms: []
        }, {
            title: "fa-viacoin",
            searchTerms: []
        }, {
            title: "fa-viadeo",
            searchTerms: []
        }, {
            title: "fa-viadeo-square",
            searchTerms: []
        }, {
            title: "fa-video-camera",
            searchTerms: []
        }, {
            title: "fa-vimeo",
            searchTerms: []
        }, {
            title: "fa-vimeo-square",
            searchTerms: []
        }, {
            title: "fa-vine",
            searchTerms: []
        }, {
            title: "fa-vk",
            searchTerms: []
        }, {
            title: "fa-volume-control-phone",
            searchTerms: []
        }, {
            title: "fa-volume-down",
            searchTerms: []
        }, {
            title: "fa-volume-off",
            searchTerms: []
        }, {
            title: "fa-volume-up",
            searchTerms: []
        }, {
            title: "fa-warning",
            searchTerms: []
        }, {
            title: "fa-wechat",
            searchTerms: []
        }, {
            title: "fa-weibo",
            searchTerms: []
        }, {
            title: "fa-weixin",
            searchTerms: []
        }, {
            title: "fa-whatsapp",
            searchTerms: []
        }, {
            title: "fa-wheelchair",
            searchTerms: []
        }, {
            title: "fa-wheelchair-alt",
            searchTerms: []
        }, {
            title: "fa-wifi",
            searchTerms: []
        }, {
            title: "fa-wikipedia-w",
            searchTerms: []
        }, {
            title: "fa-windows",
            searchTerms: []
        }, {
            title: "fa-won",
            searchTerms: []
        }, {
            title: "fa-wordpress",
            searchTerms: []
        }, {
            title: "fa-wpbeginner",
            searchTerms: []
        }, {
            title: "fa-wpforms",
            searchTerms: []
        }, {
            title: "fa-wrench",
            searchTerms: []
        }, {
            title: "fa-xing",
            searchTerms: []
        }, {
            title: "fa-xing-square",
            searchTerms: []
        }, {
            title: "fa-y-combinator",
            searchTerms: []
        }, {
            title: "fa-y-combinator-square",
            searchTerms: []
        }, {
            title: "fa-yahoo",
            searchTerms: []
        }, {
            title: "fa-yc",
            searchTerms: []
        }, {
            title: "fa-yc-square",
            searchTerms: []
        }, {
            title: "fa-yelp",
            searchTerms: []
        }, {
            title: "fa-yen",
            searchTerms: []
        }, {
            title: "fa-yoast",
            searchTerms: []
        }, {
            title: "fa-youtube",
            searchTerms: []
        }, {
            title: "fa-youtube-play",
            searchTerms: []
        }, {
            title: "fa-youtube-square",
            searchTerms: []
        }]
    })
});
!function(a, b) {
    "object" == typeof exports && "undefined" != typeof module ? module.exports = b() : "function" == typeof define && define.amd ? define(b) : a.moment = b()
}(this, function() {
    "use strict";
    function a() {
        return Md.apply(null, arguments)
    }
    function b(a) {
        Md = a
    }
    function c(a) {
        return "[object Array]" === Object.prototype.toString.call(a)
    }
    function d(a) {
        return a instanceof Date || "[object Date]" === Object.prototype.toString.call(a)
    }
    function e(a, b) {
        var c, d = [];
        for (c = 0; c < a.length; ++c)
            d.push(b(a[c], c));
        return d
    }
    function f(a, b) {
        return Object.prototype.hasOwnProperty.call(a, b)
    }
    function g(a, b) {
        for (var c in b)
            f(b, c) && (a[c] = b[c]);
        return f(b, "toString") && (a.toString = b.toString),
        f(b, "valueOf") && (a.valueOf = b.valueOf),
        a
    }
    function h(a, b, c, d) {
        return Ca(a, b, c, d, !0).utc()
    }
    function i() {
        return {
            empty: !1,
            unusedTokens: [],
            unusedInput: [],
            overflow: -2,
            charsLeftOver: 0,
            nullInput: !1,
            invalidMonth: null,
            invalidFormat: !1,
            userInvalidated: !1,
            iso: !1
        }
    }
    function j(a) {
        return null == a._pf && (a._pf = i()),
        a._pf
    }
    function k(a) {
        if (null == a._isValid) {
            var b = j(a);
            a._isValid = !(isNaN(a._d.getTime()) || !(b.overflow < 0) || b.empty || b.invalidMonth || b.invalidWeekday || b.nullInput || b.invalidFormat || b.userInvalidated),
            a._strict && (a._isValid = a._isValid && 0 === b.charsLeftOver && 0 === b.unusedTokens.length && void 0 === b.bigHour)
        }
        return a._isValid
    }
    function l(a) {
        var b = h(NaN);
        return null != a ? g(j(b), a) : j(b).userInvalidated = !0,
        b
    }
    function m(a, b) {
        var c, d, e;
        if ("undefined" != typeof b._isAMomentObject && (a._isAMomentObject = b._isAMomentObject),
        "undefined" != typeof b._i && (a._i = b._i),
        "undefined" != typeof b._f && (a._f = b._f),
        "undefined" != typeof b._l && (a._l = b._l),
        "undefined" != typeof b._strict && (a._strict = b._strict),
        "undefined" != typeof b._tzm && (a._tzm = b._tzm),
        "undefined" != typeof b._isUTC && (a._isUTC = b._isUTC),
        "undefined" != typeof b._offset && (a._offset = b._offset),
        "undefined" != typeof b._pf && (a._pf = j(b)),
        "undefined" != typeof b._locale && (a._locale = b._locale),
        Od.length > 0)
            for (c in Od)
                d = Od[c],
                e = b[d],
                "undefined" != typeof e && (a[d] = e);
        return a
    }
    function n(b) {
        m(this, b),
        this._d = new Date(null != b._d ? b._d.getTime() : NaN),
        Pd === !1 && (Pd = !0,
        a.updateOffset(this),
        Pd = !1)
    }
    function o(a) {
        return a instanceof n || null != a && null != a._isAMomentObject
    }
    function p(a) {
        return 0 > a ? Math.ceil(a) : Math.floor(a)
    }
    function q(a) {
        var b = +a
          , c = 0;
        return 0 !== b && isFinite(b) && (c = p(b)),
        c
    }
    function r(a, b, c) {
        var d, e = Math.min(a.length, b.length), f = Math.abs(a.length - b.length), g = 0;
        for (d = 0; e > d; d++)
            (c && a[d] !== b[d] || !c && q(a[d]) !== q(b[d])) && g++;
        return g + f
    }
    function s() {}
    function t(a) {
        return a ? a.toLowerCase().replace("_", "-") : a
    }
    function u(a) {
        for (var b, c, d, e, f = 0; f < a.length; ) {
            for (e = t(a[f]).split("-"),
            b = e.length,
            c = t(a[f + 1]),
            c = c ? c.split("-") : null; b > 0; ) {
                if (d = v(e.slice(0, b).join("-")))
                    return d;
                if (c && c.length >= b && r(e, c, !0) >= b - 1)
                    break;
                b--
            }
            f++
        }
        return null
    }
    function v(a) {
        var b = null;
        if (!Qd[a] && "undefined" != typeof module && module && module.exports)
            try {
                b = Nd._abbr,
                require("./locale/" + a),
                w(b)
            } catch (c) {}
        return Qd[a]
    }
    function w(a, b) {
        var c;
        return a && (c = "undefined" == typeof b ? y(a) : x(a, b),
        c && (Nd = c)),
        Nd._abbr
    }
    function x(a, b) {
        return null !== b ? (b.abbr = a,
        Qd[a] = Qd[a] || new s,
        Qd[a].set(b),
        w(a),
        Qd[a]) : (delete Qd[a],
        null)
    }
    function y(a) {
        var b;
        if (a && a._locale && a._locale._abbr && (a = a._locale._abbr),
        !a)
            return Nd;
        if (!c(a)) {
            if (b = v(a))
                return b;
            a = [a]
        }
        return u(a)
    }
    function z(a, b) {
        var c = a.toLowerCase();
        Rd[c] = Rd[c + "s"] = Rd[b] = a
    }
    function A(a) {
        return "string" == typeof a ? Rd[a] || Rd[a.toLowerCase()] : void 0
    }
    function B(a) {
        var b, c, d = {};
        for (c in a)
            f(a, c) && (b = A(c),
            b && (d[b] = a[c]));
        return d
    }
    function C(b, c) {
        return function(d) {
            return null != d ? (E(this, b, d),
            a.updateOffset(this, c),
            this) : D(this, b)
        }
    }
    function D(a, b) {
        return a._d["get" + (a._isUTC ? "UTC" : "") + b]()
    }
    function E(a, b, c) {
        return a._d["set" + (a._isUTC ? "UTC" : "") + b](c)
    }
    function F(a, b) {
        var c;
        if ("object" == typeof a)
            for (c in a)
                this.set(c, a[c]);
        else if (a = A(a),
        "function" == typeof this[a])
            return this[a](b);
        return this
    }
    function G(a, b, c) {
        var d = "" + Math.abs(a)
          , e = b - d.length
          , f = a >= 0;
        return (f ? c ? "+" : "" : "-") + Math.pow(10, Math.max(0, e)).toString().substr(1) + d
    }
    function H(a, b, c, d) {
        var e = d;
        "string" == typeof d && (e = function() {
            return this[d]()
        }
        ),
        a && (Vd[a] = e),
        b && (Vd[b[0]] = function() {
            return G(e.apply(this, arguments), b[1], b[2])
        }
        ),
        c && (Vd[c] = function() {
            return this.localeData().ordinal(e.apply(this, arguments), a)
        }
        )
    }
    function I(a) {
        return a.match(/\[[\s\S]/) ? a.replace(/^\[|\]$/g, "") : a.replace(/\\/g, "")
    }
    function J(a) {
        var b, c, d = a.match(Sd);
        for (b = 0,
        c = d.length; c > b; b++)
            Vd[d[b]] ? d[b] = Vd[d[b]] : d[b] = I(d[b]);
        return function(e) {
            var f = "";
            for (b = 0; c > b; b++)
                f += d[b]instanceof Function ? d[b].call(e, a) : d[b];
            return f
        }
    }
    function K(a, b) {
        return a.isValid() ? (b = L(b, a.localeData()),
        Ud[b] = Ud[b] || J(b),
        Ud[b](a)) : a.localeData().invalidDate()
    }
    function L(a, b) {
        function c(a) {
            return b.longDateFormat(a) || a
        }
        var d = 5;
        for (Td.lastIndex = 0; d >= 0 && Td.test(a); )
            a = a.replace(Td, c),
            Td.lastIndex = 0,
            d -= 1;
        return a
    }
    function M(a) {
        return "function" == typeof a && "[object Function]" === Object.prototype.toString.call(a)
    }
    function N(a, b, c) {
        ie[a] = M(b) ? b : function(a) {
            return a && c ? c : b
        }
    }
    function O(a, b) {
        return f(ie, a) ? ie[a](b._strict, b._locale) : new RegExp(P(a))
    }
    function P(a) {
        return a.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(a, b, c, d, e) {
            return b || c || d || e
        }).replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")
    }
    function Q(a, b) {
        var c, d = b;
        for ("string" == typeof a && (a = [a]),
        "number" == typeof b && (d = function(a, c) {
            c[b] = q(a)
        }
        ),
        c = 0; c < a.length; c++)
            je[a[c]] = d
    }
    function R(a, b) {
        Q(a, function(a, c, d, e) {
            d._w = d._w || {},
            b(a, d._w, d, e)
        })
    }
    function S(a, b, c) {
        null != b && f(je, a) && je[a](b, c._a, c, a)
    }
    function T(a, b) {
        return new Date(Date.UTC(a, b + 1, 0)).getUTCDate()
    }
    function U(a) {
        return this._months[a.month()]
    }
    function V(a) {
        return this._monthsShort[a.month()]
    }
    function W(a, b, c) {
        var d, e, f;
        for (this._monthsParse || (this._monthsParse = [],
        this._longMonthsParse = [],
        this._shortMonthsParse = []),
        d = 0; 12 > d; d++) {
            if (e = h([2e3, d]),
            c && !this._longMonthsParse[d] && (this._longMonthsParse[d] = new RegExp("^" + this.months(e, "").replace(".", "") + "$","i"),
            this._shortMonthsParse[d] = new RegExp("^" + this.monthsShort(e, "").replace(".", "") + "$","i")),
            c || this._monthsParse[d] || (f = "^" + this.months(e, "") + "|^" + this.monthsShort(e, ""),
            this._monthsParse[d] = new RegExp(f.replace(".", ""),"i")),
            c && "MMMM" === b && this._longMonthsParse[d].test(a))
                return d;
            if (c && "MMM" === b && this._shortMonthsParse[d].test(a))
                return d;
            if (!c && this._monthsParse[d].test(a))
                return d
        }
    }
    function X(a, b) {
        var c;
        return "string" == typeof b && (b = a.localeData().monthsParse(b),
        "number" != typeof b) ? a : (c = Math.min(a.date(), T(a.year(), b)),
        a._d["set" + (a._isUTC ? "UTC" : "") + "Month"](b, c),
        a)
    }
    function Y(b) {
        return null != b ? (X(this, b),
        a.updateOffset(this, !0),
        this) : D(this, "Month")
    }
    function Z() {
        return T(this.year(), this.month())
    }
    function $(a) {
        var b, c = a._a;
        return c && -2 === j(a).overflow && (b = c[le] < 0 || c[le] > 11 ? le : c[me] < 1 || c[me] > T(c[ke], c[le]) ? me : c[ne] < 0 || c[ne] > 24 || 24 === c[ne] && (0 !== c[oe] || 0 !== c[pe] || 0 !== c[qe]) ? ne : c[oe] < 0 || c[oe] > 59 ? oe : c[pe] < 0 || c[pe] > 59 ? pe : c[qe] < 0 || c[qe] > 999 ? qe : -1,
        j(a)._overflowDayOfYear && (ke > b || b > me) && (b = me),
        j(a).overflow = b),
        a
    }
    function _(b) {
        a.suppressDeprecationWarnings === !1 && "undefined" != typeof console && console.warn && console.warn("Deprecation warning: " + b)
    }
    function aa(a, b) {
        var c = !0;
        return g(function() {
            return c && (_(a + "\n" + (new Error).stack),
            c = !1),
            b.apply(this, arguments)
        }, b)
    }
    function ba(a, b) {
        te[a] || (_(b),
        te[a] = !0)
    }
    function ca(a) {
        var b, c, d = a._i, e = ue.exec(d);
        if (e) {
            for (j(a).iso = !0,
            b = 0,
            c = ve.length; c > b; b++)
                if (ve[b][1].exec(d)) {
                    a._f = ve[b][0];
                    break
                }
            for (b = 0,
            c = we.length; c > b; b++)
                if (we[b][1].exec(d)) {
                    a._f += (e[6] || " ") + we[b][0];
                    break
                }
            d.match(fe) && (a._f += "Z"),
            va(a)
        } else
            a._isValid = !1
    }
    function da(b) {
        var c = xe.exec(b._i);
        return null !== c ? void (b._d = new Date(+c[1])) : (ca(b),
        void (b._isValid === !1 && (delete b._isValid,
        a.createFromInputFallback(b))))
    }
    function ea(a, b, c, d, e, f, g) {
        var h = new Date(a,b,c,d,e,f,g);
        return 1970 > a && h.setFullYear(a),
        h
    }
    function fa(a) {
        var b = new Date(Date.UTC.apply(null, arguments));
        return 1970 > a && b.setUTCFullYear(a),
        b
    }
    function ga(a) {
        return ha(a) ? 366 : 365
    }
    function ha(a) {
        return a % 4 === 0 && a % 100 !== 0 || a % 400 === 0
    }
    function ia() {
        return ha(this.year())
    }
    function ja(a, b, c) {
        var d, e = c - b, f = c - a.day();
        return f > e && (f -= 7),
        e - 7 > f && (f += 7),
        d = Da(a).add(f, "d"),
        {
            week: Math.ceil(d.dayOfYear() / 7),
            year: d.year()
        }
    }
    function ka(a) {
        return ja(a, this._week.dow, this._week.doy).week
    }
    function la() {
        return this._week.dow
    }
    function ma() {
        return this._week.doy
    }
    function na(a) {
        var b = this.localeData().week(this);
        return null == a ? b : this.add(7 * (a - b), "d")
    }
    function oa(a) {
        var b = ja(this, 1, 4).week;
        return null == a ? b : this.add(7 * (a - b), "d")
    }
    function pa(a, b, c, d, e) {
        var f, g = 6 + e - d, h = fa(a, 0, 1 + g), i = h.getUTCDay();
        return e > i && (i += 7),
        c = null != c ? 1 * c : e,
        f = 1 + g + 7 * (b - 1) - i + c,
        {
            year: f > 0 ? a : a - 1,
            dayOfYear: f > 0 ? f : ga(a - 1) + f
        }
    }
    function qa(a) {
        var b = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1;
        return null == a ? b : this.add(a - b, "d")
    }
    function ra(a, b, c) {
        return null != a ? a : null != b ? b : c
    }
    function sa(a) {
        var b = new Date;
        return a._useUTC ? [b.getUTCFullYear(), b.getUTCMonth(), b.getUTCDate()] : [b.getFullYear(), b.getMonth(), b.getDate()]
    }
    function ta(a) {
        var b, c, d, e, f = [];
        if (!a._d) {
            for (d = sa(a),
            a._w && null == a._a[me] && null == a._a[le] && ua(a),
            a._dayOfYear && (e = ra(a._a[ke], d[ke]),
            a._dayOfYear > ga(e) && (j(a)._overflowDayOfYear = !0),
            c = fa(e, 0, a._dayOfYear),
            a._a[le] = c.getUTCMonth(),
            a._a[me] = c.getUTCDate()),
            b = 0; 3 > b && null == a._a[b]; ++b)
                a._a[b] = f[b] = d[b];
            for (; 7 > b; b++)
                a._a[b] = f[b] = null == a._a[b] ? 2 === b ? 1 : 0 : a._a[b];
            24 === a._a[ne] && 0 === a._a[oe] && 0 === a._a[pe] && 0 === a._a[qe] && (a._nextDay = !0,
            a._a[ne] = 0),
            a._d = (a._useUTC ? fa : ea).apply(null, f),
            null != a._tzm && a._d.setUTCMinutes(a._d.getUTCMinutes() - a._tzm),
            a._nextDay && (a._a[ne] = 24)
        }
    }
    function ua(a) {
        var b, c, d, e, f, g, h;
        b = a._w,
        null != b.GG || null != b.W || null != b.E ? (f = 1,
        g = 4,
        c = ra(b.GG, a._a[ke], ja(Da(), 1, 4).year),
        d = ra(b.W, 1),
        e = ra(b.E, 1)) : (f = a._locale._week.dow,
        g = a._locale._week.doy,
        c = ra(b.gg, a._a[ke], ja(Da(), f, g).year),
        d = ra(b.w, 1),
        null != b.d ? (e = b.d,
        f > e && ++d) : e = null != b.e ? b.e + f : f),
        h = pa(c, d, e, g, f),
        a._a[ke] = h.year,
        a._dayOfYear = h.dayOfYear
    }
    function va(b) {
        if (b._f === a.ISO_8601)
            return void ca(b);
        b._a = [],
        j(b).empty = !0;
        var c, d, e, f, g, h = "" + b._i, i = h.length, k = 0;
        for (e = L(b._f, b._locale).match(Sd) || [],
        c = 0; c < e.length; c++)
            f = e[c],
            d = (h.match(O(f, b)) || [])[0],
            d && (g = h.substr(0, h.indexOf(d)),
            g.length > 0 && j(b).unusedInput.push(g),
            h = h.slice(h.indexOf(d) + d.length),
            k += d.length),
            Vd[f] ? (d ? j(b).empty = !1 : j(b).unusedTokens.push(f),
            S(f, d, b)) : b._strict && !d && j(b).unusedTokens.push(f);
        j(b).charsLeftOver = i - k,
        h.length > 0 && j(b).unusedInput.push(h),
        j(b).bigHour === !0 && b._a[ne] <= 12 && b._a[ne] > 0 && (j(b).bigHour = void 0),
        b._a[ne] = wa(b._locale, b._a[ne], b._meridiem),
        ta(b),
        $(b)
    }
    function wa(a, b, c) {
        var d;
        return null == c ? b : null != a.meridiemHour ? a.meridiemHour(b, c) : null != a.isPM ? (d = a.isPM(c),
        d && 12 > b && (b += 12),
        d || 12 !== b || (b = 0),
        b) : b
    }
    function xa(a) {
        var b, c, d, e, f;
        if (0 === a._f.length)
            return j(a).invalidFormat = !0,
            void (a._d = new Date(NaN));
        for (e = 0; e < a._f.length; e++)
            f = 0,
            b = m({}, a),
            null != a._useUTC && (b._useUTC = a._useUTC),
            b._f = a._f[e],
            va(b),
            k(b) && (f += j(b).charsLeftOver,
            f += 10 * j(b).unusedTokens.length,
            j(b).score = f,
            (null == d || d > f) && (d = f,
            c = b));
        g(a, c || b)
    }
    function ya(a) {
        if (!a._d) {
            var b = B(a._i);
            a._a = [b.year, b.month, b.day || b.date, b.hour, b.minute, b.second, b.millisecond],
            ta(a)
        }
    }
    function za(a) {
        var b = new n($(Aa(a)));
        return b._nextDay && (b.add(1, "d"),
        b._nextDay = void 0),
        b
    }
    function Aa(a) {
        var b = a._i
          , e = a._f;
        return a._locale = a._locale || y(a._l),
        null === b || void 0 === e && "" === b ? l({
            nullInput: !0
        }) : ("string" == typeof b && (a._i = b = a._locale.preparse(b)),
        o(b) ? new n($(b)) : (c(e) ? xa(a) : e ? va(a) : d(b) ? a._d = b : Ba(a),
        a))
    }
    function Ba(b) {
        var f = b._i;
        void 0 === f ? b._d = new Date : d(f) ? b._d = new Date(+f) : "string" == typeof f ? da(b) : c(f) ? (b._a = e(f.slice(0), function(a) {
            return parseInt(a, 10)
        }),
        ta(b)) : "object" == typeof f ? ya(b) : "number" == typeof f ? b._d = new Date(f) : a.createFromInputFallback(b)
    }
    function Ca(a, b, c, d, e) {
        var f = {};
        return "boolean" == typeof c && (d = c,
        c = void 0),
        f._isAMomentObject = !0,
        f._useUTC = f._isUTC = e,
        f._l = c,
        f._i = a,
        f._f = b,
        f._strict = d,
        za(f)
    }
    function Da(a, b, c, d) {
        return Ca(a, b, c, d, !1)
    }
    function Ea(a, b) {
        var d, e;
        if (1 === b.length && c(b[0]) && (b = b[0]),
        !b.length)
            return Da();
        for (d = b[0],
        e = 1; e < b.length; ++e)
            (!b[e].isValid() || b[e][a](d)) && (d = b[e]);
        return d
    }
    function Fa() {
        var a = [].slice.call(arguments, 0);
        return Ea("isBefore", a)
    }
    function Ga() {
        var a = [].slice.call(arguments, 0);
        return Ea("isAfter", a)
    }
    function Ha(a) {
        var b = B(a)
          , c = b.year || 0
          , d = b.quarter || 0
          , e = b.month || 0
          , f = b.week || 0
          , g = b.day || 0
          , h = b.hour || 0
          , i = b.minute || 0
          , j = b.second || 0
          , k = b.millisecond || 0;
        this._milliseconds = +k + 1e3 * j + 6e4 * i + 36e5 * h,
        this._days = +g + 7 * f,
        this._months = +e + 3 * d + 12 * c,
        this._data = {},
        this._locale = y(),
        this._bubble()
    }
    function Ia(a) {
        return a instanceof Ha
    }
    function Ja(a, b) {
        H(a, 0, 0, function() {
            var a = this.utcOffset()
              , c = "+";
            return 0 > a && (a = -a,
            c = "-"),
            c + G(~~(a / 60), 2) + b + G(~~a % 60, 2)
        })
    }
    function Ka(a) {
        var b = (a || "").match(fe) || []
          , c = b[b.length - 1] || []
          , d = (c + "").match(Ce) || ["-", 0, 0]
          , e = +(60 * d[1]) + q(d[2]);
        return "+" === d[0] ? e : -e
    }
    function La(b, c) {
        var e, f;
        return c._isUTC ? (e = c.clone(),
        f = (o(b) || d(b) ? +b : +Da(b)) - +e,
        e._d.setTime(+e._d + f),
        a.updateOffset(e, !1),
        e) : Da(b).local()
    }
    function Ma(a) {
        return 15 * -Math.round(a._d.getTimezoneOffset() / 15)
    }
    function Na(b, c) {
        var d, e = this._offset || 0;
        return null != b ? ("string" == typeof b && (b = Ka(b)),
        Math.abs(b) < 16 && (b = 60 * b),
        !this._isUTC && c && (d = Ma(this)),
        this._offset = b,
        this._isUTC = !0,
        null != d && this.add(d, "m"),
        e !== b && (!c || this._changeInProgress ? bb(this, Ya(b - e, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0,
        a.updateOffset(this, !0),
        this._changeInProgress = null)),
        this) : this._isUTC ? e : Ma(this)
    }
    function Oa(a, b) {
        return null != a ? ("string" != typeof a && (a = -a),
        this.utcOffset(a, b),
        this) : -this.utcOffset()
    }
    function Pa(a) {
        return this.utcOffset(0, a)
    }
    function Qa(a) {
        return this._isUTC && (this.utcOffset(0, a),
        this._isUTC = !1,
        a && this.subtract(Ma(this), "m")),
        this
    }
    function Ra() {
        return this._tzm ? this.utcOffset(this._tzm) : "string" == typeof this._i && this.utcOffset(Ka(this._i)),
        this
    }
    function Sa(a) {
        return a = a ? Da(a).utcOffset() : 0,
        (this.utcOffset() - a) % 60 === 0
    }
    function Ta() {
        return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset()
    }
    function Ua() {
        if ("undefined" != typeof this._isDSTShifted)
            return this._isDSTShifted;
        var a = {};
        if (m(a, this),
        a = Aa(a),
        a._a) {
            var b = a._isUTC ? h(a._a) : Da(a._a);
            this._isDSTShifted = this.isValid() && r(a._a, b.toArray()) > 0
        } else
            this._isDSTShifted = !1;
        return this._isDSTShifted
    }
    function Va() {
        return !this._isUTC
    }
    function Wa() {
        return this._isUTC
    }
    function Xa() {
        return this._isUTC && 0 === this._offset
    }
    function Ya(a, b) {
        var c, d, e, g = a, h = null;
        return Ia(a) ? g = {
            ms: a._milliseconds,
            d: a._days,
            M: a._months
        } : "number" == typeof a ? (g = {},
        b ? g[b] = a : g.milliseconds = a) : (h = De.exec(a)) ? (c = "-" === h[1] ? -1 : 1,
        g = {
            y: 0,
            d: q(h[me]) * c,
            h: q(h[ne]) * c,
            m: q(h[oe]) * c,
            s: q(h[pe]) * c,
            ms: q(h[qe]) * c
        }) : (h = Ee.exec(a)) ? (c = "-" === h[1] ? -1 : 1,
        g = {
            y: Za(h[2], c),
            M: Za(h[3], c),
            d: Za(h[4], c),
            h: Za(h[5], c),
            m: Za(h[6], c),
            s: Za(h[7], c),
            w: Za(h[8], c)
        }) : null == g ? g = {} : "object" == typeof g && ("from"in g || "to"in g) && (e = _a(Da(g.from), Da(g.to)),
        g = {},
        g.ms = e.milliseconds,
        g.M = e.months),
        d = new Ha(g),
        Ia(a) && f(a, "_locale") && (d._locale = a._locale),
        d
    }
    function Za(a, b) {
        var c = a && parseFloat(a.replace(",", "."));
        return (isNaN(c) ? 0 : c) * b
    }
    function $a(a, b) {
        var c = {
            milliseconds: 0,
            months: 0
        };
        return c.months = b.month() - a.month() + 12 * (b.year() - a.year()),
        a.clone().add(c.months, "M").isAfter(b) && --c.months,
        c.milliseconds = +b - +a.clone().add(c.months, "M"),
        c
    }
    function _a(a, b) {
        var c;
        return b = La(b, a),
        a.isBefore(b) ? c = $a(a, b) : (c = $a(b, a),
        c.milliseconds = -c.milliseconds,
        c.months = -c.months),
        c
    }
    function ab(a, b) {
        return function(c, d) {
            var e, f;
            return null === d || isNaN(+d) || (ba(b, "moment()." + b + "(period, number) is deprecated. Please use moment()." + b + "(number, period)."),
            f = c,
            c = d,
            d = f),
            c = "string" == typeof c ? +c : c,
            e = Ya(c, d),
            bb(this, e, a),
            this
        }
    }
    function bb(b, c, d, e) {
        var f = c._milliseconds
          , g = c._days
          , h = c._months;
        e = null == e ? !0 : e,
        f && b._d.setTime(+b._d + f * d),
        g && E(b, "Date", D(b, "Date") + g * d),
        h && X(b, D(b, "Month") + h * d),
        e && a.updateOffset(b, g || h)
    }
    function cb(a, b) {
        var c = a || Da()
          , d = La(c, this).startOf("day")
          , e = this.diff(d, "days", !0)
          , f = -6 > e ? "sameElse" : -1 > e ? "lastWeek" : 0 > e ? "lastDay" : 1 > e ? "sameDay" : 2 > e ? "nextDay" : 7 > e ? "nextWeek" : "sameElse";
        return this.format(b && b[f] || this.localeData().calendar(f, this, Da(c)))
    }
    function db() {
        return new n(this)
    }
    function eb(a, b) {
        var c;
        return b = A("undefined" != typeof b ? b : "millisecond"),
        "millisecond" === b ? (a = o(a) ? a : Da(a),
        +this > +a) : (c = o(a) ? +a : +Da(a),
        c < +this.clone().startOf(b))
    }
    function fb(a, b) {
        var c;
        return b = A("undefined" != typeof b ? b : "millisecond"),
        "millisecond" === b ? (a = o(a) ? a : Da(a),
        +a > +this) : (c = o(a) ? +a : +Da(a),
        +this.clone().endOf(b) < c)
    }
    function gb(a, b, c) {
        return this.isAfter(a, c) && this.isBefore(b, c)
    }
    function hb(a, b) {
        var c;
        return b = A(b || "millisecond"),
        "millisecond" === b ? (a = o(a) ? a : Da(a),
        +this === +a) : (c = +Da(a),
        +this.clone().startOf(b) <= c && c <= +this.clone().endOf(b))
    }
    function ib(a, b, c) {
        var d, e, f = La(a, this), g = 6e4 * (f.utcOffset() - this.utcOffset());
        return b = A(b),
        "year" === b || "month" === b || "quarter" === b ? (e = jb(this, f),
        "quarter" === b ? e /= 3 : "year" === b && (e /= 12)) : (d = this - f,
        e = "second" === b ? d / 1e3 : "minute" === b ? d / 6e4 : "hour" === b ? d / 36e5 : "day" === b ? (d - g) / 864e5 : "week" === b ? (d - g) / 6048e5 : d),
        c ? e : p(e)
    }
    function jb(a, b) {
        var c, d, e = 12 * (b.year() - a.year()) + (b.month() - a.month()), f = a.clone().add(e, "months");
        return 0 > b - f ? (c = a.clone().add(e - 1, "months"),
        d = (b - f) / (f - c)) : (c = a.clone().add(e + 1, "months"),
        d = (b - f) / (c - f)),
        -(e + d)
    }
    function kb() {
        return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")
    }
    function lb() {
        var a = this.clone().utc();
        return 0 < a.year() && a.year() <= 9999 ? "function" == typeof Date.prototype.toISOString ? this.toDate().toISOString() : K(a, "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]") : K(a, "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")
    }
    function mb(b) {
        var c = K(this, b || a.defaultFormat);
        return this.localeData().postformat(c)
    }
    function nb(a, b) {
        return this.isValid() ? Ya({
            to: this,
            from: a
        }).locale(this.locale()).humanize(!b) : this.localeData().invalidDate()
    }
    function ob(a) {
        return this.from(Da(), a)
    }
    function pb(a, b) {
        return this.isValid() ? Ya({
            from: this,
            to: a
        }).locale(this.locale()).humanize(!b) : this.localeData().invalidDate()
    }
    function qb(a) {
        return this.to(Da(), a)
    }
    function rb(a) {
        var b;
        return void 0 === a ? this._locale._abbr : (b = y(a),
        null != b && (this._locale = b),
        this)
    }
    function sb() {
        return this._locale
    }
    function tb(a) {
        switch (a = A(a)) {
        case "year":
            this.month(0);
        case "quarter":
        case "month":
            this.date(1);
        case "week":
        case "isoWeek":
        case "day":
            this.hours(0);
        case "hour":
            this.minutes(0);
        case "minute":
            this.seconds(0);
        case "second":
            this.milliseconds(0)
        }
        return "week" === a && this.weekday(0),
        "isoWeek" === a && this.isoWeekday(1),
        "quarter" === a && this.month(3 * Math.floor(this.month() / 3)),
        this
    }
    function ub(a) {
        return a = A(a),
        void 0 === a || "millisecond" === a ? this : this.startOf(a).add(1, "isoWeek" === a ? "week" : a).subtract(1, "ms")
    }
    function vb() {
        return +this._d - 6e4 * (this._offset || 0)
    }
    function wb() {
        return Math.floor(+this / 1e3)
    }
    function xb() {
        return this._offset ? new Date(+this) : this._d
    }
    function yb() {
        var a = this;
        return [a.year(), a.month(), a.date(), a.hour(), a.minute(), a.second(), a.millisecond()]
    }
    function zb() {
        var a = this;
        return {
            years: a.year(),
            months: a.month(),
            date: a.date(),
            hours: a.hours(),
            minutes: a.minutes(),
            seconds: a.seconds(),
            milliseconds: a.milliseconds()
        }
    }
    function Ab() {
        return k(this)
    }
    function Bb() {
        return g({}, j(this))
    }
    function Cb() {
        return j(this).overflow
    }
    function Db(a, b) {
        H(0, [a, a.length], 0, b)
    }
    function Eb(a, b, c) {
        return ja(Da([a, 11, 31 + b - c]), b, c).week
    }
    function Fb(a) {
        var b = ja(this, this.localeData()._week.dow, this.localeData()._week.doy).year;
        return null == a ? b : this.add(a - b, "y")
    }
    function Gb(a) {
        var b = ja(this, 1, 4).year;
        return null == a ? b : this.add(a - b, "y")
    }
    function Hb() {
        return Eb(this.year(), 1, 4)
    }
    function Ib() {
        var a = this.localeData()._week;
        return Eb(this.year(), a.dow, a.doy)
    }
    function Jb(a) {
        return null == a ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (a - 1) + this.month() % 3)
    }
    function Kb(a, b) {
        return "string" != typeof a ? a : isNaN(a) ? (a = b.weekdaysParse(a),
        "number" == typeof a ? a : null) : parseInt(a, 10)
    }
    function Lb(a) {
        return this._weekdays[a.day()]
    }
    function Mb(a) {
        return this._weekdaysShort[a.day()]
    }
    function Nb(a) {
        return this._weekdaysMin[a.day()]
    }
    function Ob(a) {
        var b, c, d;
        for (this._weekdaysParse = this._weekdaysParse || [],
        b = 0; 7 > b; b++)
            if (this._weekdaysParse[b] || (c = Da([2e3, 1]).day(b),
            d = "^" + this.weekdays(c, "") + "|^" + this.weekdaysShort(c, "") + "|^" + this.weekdaysMin(c, ""),
            this._weekdaysParse[b] = new RegExp(d.replace(".", ""),"i")),
            this._weekdaysParse[b].test(a))
                return b
    }
    function Pb(a) {
        var b = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
        return null != a ? (a = Kb(a, this.localeData()),
        this.add(a - b, "d")) : b
    }
    function Qb(a) {
        var b = (this.day() + 7 - this.localeData()._week.dow) % 7;
        return null == a ? b : this.add(a - b, "d")
    }
    function Rb(a) {
        return null == a ? this.day() || 7 : this.day(this.day() % 7 ? a : a - 7)
    }
    function Sb(a, b) {
        H(a, 0, 0, function() {
            return this.localeData().meridiem(this.hours(), this.minutes(), b)
        })
    }
    function Tb(a, b) {
        return b._meridiemParse
    }
    function Ub(a) {
        return "p" === (a + "").toLowerCase().charAt(0)
    }
    function Vb(a, b, c) {
        return a > 11 ? c ? "pm" : "PM" : c ? "am" : "AM"
    }
    function Wb(a, b) {
        b[qe] = q(1e3 * ("0." + a))
    }
    function Xb() {
        return this._isUTC ? "UTC" : ""
    }
    function Yb() {
        return this._isUTC ? "Coordinated Universal Time" : ""
    }
    function Zb(a) {
        return Da(1e3 * a)
    }
    function $b() {
        return Da.apply(null, arguments).parseZone()
    }
    function _b(a, b, c) {
        var d = this._calendar[a];
        return "function" == typeof d ? d.call(b, c) : d
    }
    function ac(a) {
        var b = this._longDateFormat[a]
          , c = this._longDateFormat[a.toUpperCase()];
        return b || !c ? b : (this._longDateFormat[a] = c.replace(/MMMM|MM|DD|dddd/g, function(a) {
            return a.slice(1)
        }),
        this._longDateFormat[a])
    }
    function bc() {
        return this._invalidDate
    }
    function cc(a) {
        return this._ordinal.replace("%d", a)
    }
    function dc(a) {
        return a
    }
    function ec(a, b, c, d) {
        var e = this._relativeTime[c];
        return "function" == typeof e ? e(a, b, c, d) : e.replace(/%d/i, a)
    }
    function fc(a, b) {
        var c = this._relativeTime[a > 0 ? "future" : "past"];
        return "function" == typeof c ? c(b) : c.replace(/%s/i, b)
    }
    function gc(a) {
        var b, c;
        for (c in a)
            b = a[c],
            "function" == typeof b ? this[c] = b : this["_" + c] = b;
        this._ordinalParseLenient = new RegExp(this._ordinalParse.source + "|" + /\d{1,2}/.source)
    }
    function hc(a, b, c, d) {
        var e = y()
          , f = h().set(d, b);
        return e[c](f, a)
    }
    function ic(a, b, c, d, e) {
        if ("number" == typeof a && (b = a,
        a = void 0),
        a = a || "",
        null != b)
            return hc(a, b, c, e);
        var f, g = [];
        for (f = 0; d > f; f++)
            g[f] = hc(a, f, c, e);
        return g
    }
    function jc(a, b) {
        return ic(a, b, "months", 12, "month")
    }
    function kc(a, b) {
        return ic(a, b, "monthsShort", 12, "month")
    }
    function lc(a, b) {
        return ic(a, b, "weekdays", 7, "day")
    }
    function mc(a, b) {
        return ic(a, b, "weekdaysShort", 7, "day")
    }
    function nc(a, b) {
        return ic(a, b, "weekdaysMin", 7, "day")
    }
    function oc() {
        var a = this._data;
        return this._milliseconds = _e(this._milliseconds),
        this._days = _e(this._days),
        this._months = _e(this._months),
        a.milliseconds = _e(a.milliseconds),
        a.seconds = _e(a.seconds),
        a.minutes = _e(a.minutes),
        a.hours = _e(a.hours),
        a.months = _e(a.months),
        a.years = _e(a.years),
        this
    }
    function pc(a, b, c, d) {
        var e = Ya(b, c);
        return a._milliseconds += d * e._milliseconds,
        a._days += d * e._days,
        a._months += d * e._months,
        a._bubble()
    }
    function qc(a, b) {
        return pc(this, a, b, 1)
    }
    function rc(a, b) {
        return pc(this, a, b, -1)
    }
    function sc(a) {
        return 0 > a ? Math.floor(a) : Math.ceil(a)
    }
    function tc() {
        var a, b, c, d, e, f = this._milliseconds, g = this._days, h = this._months, i = this._data;
        return f >= 0 && g >= 0 && h >= 0 || 0 >= f && 0 >= g && 0 >= h || (f += 864e5 * sc(vc(h) + g),
        g = 0,
        h = 0),
        i.milliseconds = f % 1e3,
        a = p(f / 1e3),
        i.seconds = a % 60,
        b = p(a / 60),
        i.minutes = b % 60,
        c = p(b / 60),
        i.hours = c % 24,
        g += p(c / 24),
        e = p(uc(g)),
        h += e,
        g -= sc(vc(e)),
        d = p(h / 12),
        h %= 12,
        i.days = g,
        i.months = h,
        i.years = d,
        this
    }
    function uc(a) {
        return 4800 * a / 146097
    }
    function vc(a) {
        return 146097 * a / 4800
    }
    function wc(a) {
        var b, c, d = this._milliseconds;
        if (a = A(a),
        "month" === a || "year" === a)
            return b = this._days + d / 864e5,
            c = this._months + uc(b),
            "month" === a ? c : c / 12;
        switch (b = this._days + Math.round(vc(this._months)),
        a) {
        case "week":
            return b / 7 + d / 6048e5;
        case "day":
            return b + d / 864e5;
        case "hour":
            return 24 * b + d / 36e5;
        case "minute":
            return 1440 * b + d / 6e4;
        case "second":
            return 86400 * b + d / 1e3;
        case "millisecond":
            return Math.floor(864e5 * b) + d;
        default:
            throw new Error("Unknown unit " + a)
        }
    }
    function xc() {
        return this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * q(this._months / 12)
    }
    function yc(a) {
        return function() {
            return this.as(a)
        }
    }
    function zc(a) {
        return a = A(a),
        this[a + "s"]()
    }
    function Ac(a) {
        return function() {
            return this._data[a]
        }
    }
    function Bc() {
        return p(this.days() / 7)
    }
    function Cc(a, b, c, d, e) {
        return e.relativeTime(b || 1, !!c, a, d)
    }
    function Dc(a, b, c) {
        var d = Ya(a).abs()
          , e = qf(d.as("s"))
          , f = qf(d.as("m"))
          , g = qf(d.as("h"))
          , h = qf(d.as("d"))
          , i = qf(d.as("M"))
          , j = qf(d.as("y"))
          , k = e < rf.s && ["s", e] || 1 === f && ["m"] || f < rf.m && ["mm", f] || 1 === g && ["h"] || g < rf.h && ["hh", g] || 1 === h && ["d"] || h < rf.d && ["dd", h] || 1 === i && ["M"] || i < rf.M && ["MM", i] || 1 === j && ["y"] || ["yy", j];
        return k[2] = b,
        k[3] = +a > 0,
        k[4] = c,
        Cc.apply(null, k)
    }
    function Ec(a, b) {
        return void 0 === rf[a] ? !1 : void 0 === b ? rf[a] : (rf[a] = b,
        !0)
    }
    function Fc(a) {
        var b = this.localeData()
          , c = Dc(this, !a, b);
        return a && (c = b.pastFuture(+this, c)),
        b.postformat(c)
    }
    function Gc() {
        var a, b, c, d = sf(this._milliseconds) / 1e3, e = sf(this._days), f = sf(this._months);
        a = p(d / 60),
        b = p(a / 60),
        d %= 60,
        a %= 60,
        c = p(f / 12),
        f %= 12;
        var g = c
          , h = f
          , i = e
          , j = b
          , k = a
          , l = d
          , m = this.asSeconds();
        return m ? (0 > m ? "-" : "") + "P" + (g ? g + "Y" : "") + (h ? h + "M" : "") + (i ? i + "D" : "") + (j || k || l ? "T" : "") + (j ? j + "H" : "") + (k ? k + "M" : "") + (l ? l + "S" : "") : "P0D"
    }
    function Hc(a, b) {
        var c = a.split("_");
        return b % 10 === 1 && b % 100 !== 11 ? c[0] : b % 10 >= 2 && 4 >= b % 10 && (10 > b % 100 || b % 100 >= 20) ? c[1] : c[2]
    }
    function Ic(a, b, c) {
        var d = {
            mm: b ? "хвіліна_хвіліны_хвілін" : "хвіліну_хвіліны_хвілін",
            hh: b ? "гадзіна_гадзіны_гадзін" : "гадзіну_гадзіны_гадзін",
            dd: "дзень_дні_дзён",
            MM: "месяц_месяцы_месяцаў",
            yy: "год_гады_гадоў"
        };
        return "m" === c ? b ? "хвіліна" : "хвіліну" : "h" === c ? b ? "гадзіна" : "гадзіну" : a + " " + Hc(d[c], +a)
    }
    function Jc(a, b) {
        var c = {
            nominative: "студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_"),
            accusative: "студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_")
        }
          , d = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(b) ? "accusative" : "nominative";
        return c[d][a.month()]
    }
    function Kc(a, b) {
        var c = {
            nominative: "нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),
            accusative: "нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_")
        }
          , d = /\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/.test(b) ? "accusative" : "nominative";
        return c[d][a.day()]
    }
    function Lc(a, b, c) {
        var d = {
            mm: "munutenn",
            MM: "miz",
            dd: "devezh"
        };
        return a + " " + Oc(d[c], a)
    }
    function Mc(a) {
        switch (Nc(a)) {
        case 1:
        case 3:
        case 4:
        case 5:
        case 9:
            return a + " bloaz";
        default:
            return a + " vloaz"
        }
    }
    function Nc(a) {
        return a > 9 ? Nc(a % 10) : a
    }
    function Oc(a, b) {
        return 2 === b ? Pc(a) : a
    }
    function Pc(a) {
        var b = {
            m: "v",
            b: "v",
            d: "z"
        };
        return void 0 === b[a.charAt(0)] ? a : b[a.charAt(0)] + a.substring(1)
    }
    function Qc(a, b, c) {
        var d = a + " ";
        switch (c) {
        case "m":
            return b ? "jedna minuta" : "jedne minute";
        case "mm":
            return d += 1 === a ? "minuta" : 2 === a || 3 === a || 4 === a ? "minute" : "minuta";
        case "h":
            return b ? "jedan sat" : "jednog sata";
        case "hh":
            return d += 1 === a ? "sat" : 2 === a || 3 === a || 4 === a ? "sata" : "sati";
        case "dd":
            return d += 1 === a ? "dan" : "dana";
        case "MM":
            return d += 1 === a ? "mjesec" : 2 === a || 3 === a || 4 === a ? "mjeseca" : "mjeseci";
        case "yy":
            return d += 1 === a ? "godina" : 2 === a || 3 === a || 4 === a ? "godine" : "godina"
        }
    }
    function Rc(a) {
        return a > 1 && 5 > a && 1 !== ~~(a / 10)
    }
    function Sc(a, b, c, d) {
        var e = a + " ";
        switch (c) {
        case "s":
            return b || d ? "pár sekund" : "pár sekundami";
        case "m":
            return b ? "minuta" : d ? "minutu" : "minutou";
        case "mm":
            return b || d ? e + (Rc(a) ? "minuty" : "minut") : e + "minutami";
            break;
        case "h":
            return b ? "hodina" : d ? "hodinu" : "hodinou";
        case "hh":
            return b || d ? e + (Rc(a) ? "hodiny" : "hodin") : e + "hodinami";
            break;
        case "d":
            return b || d ? "den" : "dnem";
        case "dd":
            return b || d ? e + (Rc(a) ? "dny" : "dní") : e + "dny";
            break;
        case "M":
            return b || d ? "měsíc" : "měsícem";
        case "MM":
            return b || d ? e + (Rc(a) ? "měsíce" : "měsíců") : e + "měsíci";
            break;
        case "y":
            return b || d ? "rok" : "rokem";
        case "yy":
            return b || d ? e + (Rc(a) ? "roky" : "let") : e + "lety"
        }
    }
    function Tc(a, b, c, d) {
        var e = {
            m: ["eine Minute", "einer Minute"],
            h: ["eine Stunde", "einer Stunde"],
            d: ["ein Tag", "einem Tag"],
            dd: [a + " Tage", a + " Tagen"],
            M: ["ein Monat", "einem Monat"],
            MM: [a + " Monate", a + " Monaten"],
            y: ["ein Jahr", "einem Jahr"],
            yy: [a + " Jahre", a + " Jahren"]
        };
        return b ? e[c][0] : e[c][1]
    }
    function Uc(a, b, c, d) {
        var e = {
            m: ["eine Minute", "einer Minute"],
            h: ["eine Stunde", "einer Stunde"],
            d: ["ein Tag", "einem Tag"],
            dd: [a + " Tage", a + " Tagen"],
            M: ["ein Monat", "einem Monat"],
            MM: [a + " Monate", a + " Monaten"],
            y: ["ein Jahr", "einem Jahr"],
            yy: [a + " Jahre", a + " Jahren"]
        };
        return b ? e[c][0] : e[c][1]
    }
    function Vc(a, b, c, d) {
        var e = {
            s: ["mõne sekundi", "mõni sekund", "paar sekundit"],
            m: ["ühe minuti", "üks minut"],
            mm: [a + " minuti", a + " minutit"],
            h: ["ühe tunni", "tund aega", "üks tund"],
            hh: [a + " tunni", a + " tundi"],
            d: ["ühe päeva", "üks päev"],
            M: ["kuu aja", "kuu aega", "üks kuu"],
            MM: [a + " kuu", a + " kuud"],
            y: ["ühe aasta", "aasta", "üks aasta"],
            yy: [a + " aasta", a + " aastat"]
        };
        return b ? e[c][2] ? e[c][2] : e[c][1] : d ? e[c][0] : e[c][1]
    }
    function Wc(a, b, c, d) {
        var e = "";
        switch (c) {
        case "s":
            return d ? "muutaman sekunnin" : "muutama sekunti";
        case "m":
            return d ? "minuutin" : "minuutti";
        case "mm":
            e = d ? "minuutin" : "minuuttia";
            break;
        case "h":
            return d ? "tunnin" : "tunti";
        case "hh":
            e = d ? "tunnin" : "tuntia";
            break;
        case "d":
            return d ? "päivän" : "päivä";
        case "dd":
            e = d ? "päivän" : "päivää";
            break;
        case "M":
            return d ? "kuukauden" : "kuukausi";
        case "MM":
            e = d ? "kuukauden" : "kuukautta";
            break;
        case "y":
            return d ? "vuoden" : "vuosi";
        case "yy":
            e = d ? "vuoden" : "vuotta"
        }
        return e = Xc(a, d) + " " + e
    }
    function Xc(a, b) {
        return 10 > a ? b ? Pf[a] : Of[a] : a
    }
    function Yc(a, b, c) {
        var d = a + " ";
        switch (c) {
        case "m":
            return b ? "jedna minuta" : "jedne minute";
        case "mm":
            return d += 1 === a ? "minuta" : 2 === a || 3 === a || 4 === a ? "minute" : "minuta";
        case "h":
            return b ? "jedan sat" : "jednog sata";
        case "hh":
            return d += 1 === a ? "sat" : 2 === a || 3 === a || 4 === a ? "sata" : "sati";
        case "dd":
            return d += 1 === a ? "dan" : "dana";
        case "MM":
            return d += 1 === a ? "mjesec" : 2 === a || 3 === a || 4 === a ? "mjeseca" : "mjeseci";
        case "yy":
            return d += 1 === a ? "godina" : 2 === a || 3 === a || 4 === a ? "godine" : "godina"
        }
    }
    function Zc(a, b, c, d) {
        var e = a;
        switch (c) {
        case "s":
            return d || b ? "néhány másodperc" : "néhány másodperce";
        case "m":
            return "egy" + (d || b ? " perc" : " perce");
        case "mm":
            return e + (d || b ? " perc" : " perce");
        case "h":
            return "egy" + (d || b ? " óra" : " órája");
        case "hh":
            return e + (d || b ? " óra" : " órája");
        case "d":
            return "egy" + (d || b ? " nap" : " napja");
        case "dd":
            return e + (d || b ? " nap" : " napja");
        case "M":
            return "egy" + (d || b ? " hónap" : " hónapja");
        case "MM":
            return e + (d || b ? " hónap" : " hónapja");
        case "y":
            return "egy" + (d || b ? " év" : " éve");
        case "yy":
            return e + (d || b ? " év" : " éve")
        }
        return ""
    }
    function $c(a) {
        return (a ? "" : "[múlt] ") + "[" + Uf[this.day()] + "] LT[-kor]"
    }
    function _c(a, b) {
        var c = {
            nominative: "հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_"),
            accusative: "հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_")
        }
          , d = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(b) ? "accusative" : "nominative";
        return c[d][a.month()]
    }
    function ad(a, b) {
        var c = "հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_");
        return c[a.month()]
    }
    function bd(a, b) {
        var c = "կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_");
        return c[a.day()]
    }
    function cd(a) {
        return a % 100 === 11 ? !0 : a % 10 === 1 ? !1 : !0
    }
    function dd(a, b, c, d) {
        var e = a + " ";
        switch (c) {
        case "s":
            return b || d ? "nokkrar sekúndur" : "nokkrum sekúndum";
        case "m":
            return b ? "mínúta" : "mínútu";
        case "mm":
            return cd(a) ? e + (b || d ? "mínútur" : "mínútum") : b ? e + "mínúta" : e + "mínútu";
        case "hh":
            return cd(a) ? e + (b || d ? "klukkustundir" : "klukkustundum") : e + "klukkustund";
        case "d":
            return b ? "dagur" : d ? "dag" : "degi";
        case "dd":
            return cd(a) ? b ? e + "dagar" : e + (d ? "daga" : "dögum") : b ? e + "dagur" : e + (d ? "dag" : "degi");
        case "M":
            return b ? "mánuður" : d ? "mánuð" : "mánuði";
        case "MM":
            return cd(a) ? b ? e + "mánuðir" : e + (d ? "mánuði" : "mánuðum") : b ? e + "mánuður" : e + (d ? "mánuð" : "mánuði");
        case "y":
            return b || d ? "ár" : "ári";
        case "yy":
            return cd(a) ? e + (b || d ? "ár" : "árum") : e + (b || d ? "ár" : "ári")
        }
    }
    function ed(a, b) {
        var c = {
            nominative: "იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),
            accusative: "იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")
        }
          , d = /D[oD] *MMMM?/.test(b) ? "accusative" : "nominative";
        return c[d][a.month()]
    }
    function fd(a, b) {
        var c = {
            nominative: "კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),
            accusative: "კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_")
        }
          , d = /(წინა|შემდეგ)/.test(b) ? "accusative" : "nominative";
        return c[d][a.day()]
    }
    function gd(a, b, c, d) {
        var e = {
            m: ["eng Minutt", "enger Minutt"],
            h: ["eng Stonn", "enger Stonn"],
            d: ["een Dag", "engem Dag"],
            M: ["ee Mount", "engem Mount"],
            y: ["ee Joer", "engem Joer"]
        };
        return b ? e[c][0] : e[c][1]
    }
    function hd(a) {
        var b = a.substr(0, a.indexOf(" "));
        return jd(b) ? "a " + a : "an " + a
    }
    function id(a) {
        var b = a.substr(0, a.indexOf(" "));
        return jd(b) ? "viru " + a : "virun " + a
    }
    function jd(a) {
        if (a = parseInt(a, 10),
        isNaN(a))
            return !1;
        if (0 > a)
            return !0;
        if (10 > a)
            return a >= 4 && 7 >= a ? !0 : !1;
        if (100 > a) {
            var b = a % 10
              , c = a / 10;
            return jd(0 === b ? c : b)
        }
        if (1e4 > a) {
            for (; a >= 10; )
                a /= 10;
            return jd(a)
        }
        return a /= 1e3,
        jd(a)
    }
    function kd(a, b, c, d) {
        return b ? "kelios sekundės" : d ? "kelių sekundžių" : "kelias sekundes"
    }
    function ld(a, b) {
        var c = {
            nominative: "sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),
            accusative: "sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_")
        }
          , d = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(b) ? "accusative" : "nominative";
        return c[d][a.month()]
    }
    function md(a, b, c, d) {
        return b ? od(c)[0] : d ? od(c)[1] : od(c)[2]
    }
    function nd(a) {
        return a % 10 === 0 || a > 10 && 20 > a
    }
    function od(a) {
        return Vf[a].split("_")
    }
    function pd(a, b, c, d) {
        var e = a + " ";
        return 1 === a ? e + md(a, b, c[0], d) : b ? e + (nd(a) ? od(c)[1] : od(c)[0]) : d ? e + od(c)[1] : e + (nd(a) ? od(c)[1] : od(c)[2])
    }
    function qd(a, b) {
        var c = -1 === b.indexOf("dddd HH:mm")
          , d = Wf[a.day()];
        return c ? d : d.substring(0, d.length - 2) + "į"
    }
    function rd(a, b, c) {
        return c ? b % 10 === 1 && 11 !== b ? a[2] : a[3] : b % 10 === 1 && 11 !== b ? a[0] : a[1]
    }
    function sd(a, b, c) {
        return a + " " + rd(Xf[c], a, b)
    }
    function td(a, b, c) {
        return rd(Xf[c], a, b)
    }
    function ud(a, b) {
        return b ? "dažas sekundes" : "dažām sekundēm"
    }
    function vd(a) {
        return 5 > a % 10 && a % 10 > 1 && ~~(a / 10) % 10 !== 1
    }
    function wd(a, b, c) {
        var d = a + " ";
        switch (c) {
        case "m":
            return b ? "minuta" : "minutę";
        case "mm":
            return d + (vd(a) ? "minuty" : "minut");
        case "h":
            return b ? "godzina" : "godzinę";
        case "hh":
            return d + (vd(a) ? "godziny" : "godzin");
        case "MM":
            return d + (vd(a) ? "miesiące" : "miesięcy");
        case "yy":
            return d + (vd(a) ? "lata" : "lat")
        }
    }
    function xd(a, b, c) {
        var d = {
            mm: "minute",
            hh: "ore",
            dd: "zile",
            MM: "luni",
            yy: "ani"
        }
          , e = " ";
        return (a % 100 >= 20 || a >= 100 && a % 100 === 0) && (e = " de "),
        a + e + d[c]
    }
    function yd(a, b) {
        var c = a.split("_");
        return b % 10 === 1 && b % 100 !== 11 ? c[0] : b % 10 >= 2 && 4 >= b % 10 && (10 > b % 100 || b % 100 >= 20) ? c[1] : c[2]
    }
    function zd(a, b, c) {
        var d = {
            mm: b ? "минута_минуты_минут" : "минуту_минуты_минут",
            hh: "час_часа_часов",
            dd: "день_дня_дней",
            MM: "месяц_месяца_месяцев",
            yy: "год_года_лет"
        };
        return "m" === c ? b ? "минута" : "минуту" : a + " " + yd(d[c], +a)
    }
    function Ad(a, b) {
        var c = {
            nominative: "январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),
            accusative: "января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_")
        }
          , d = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(b) ? "accusative" : "nominative";
        return c[d][a.month()]
    }
    function Bd(a, b) {
        var c = {
            nominative: "янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),
            accusative: "янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек".split("_")
        }
          , d = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/.test(b) ? "accusative" : "nominative";
        return c[d][a.month()]
    }
    function Cd(a, b) {
        var c = {
            nominative: "воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),
            accusative: "воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_")
        }
          , d = /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/.test(b) ? "accusative" : "nominative";
        return c[d][a.day()]
    }
    function Dd(a) {
        return a > 1 && 5 > a
    }
    function Ed(a, b, c, d) {
        var e = a + " ";
        switch (c) {
        case "s":
            return b || d ? "pár sekúnd" : "pár sekundami";
        case "m":
            return b ? "minúta" : d ? "minútu" : "minútou";
        case "mm":
            return b || d ? e + (Dd(a) ? "minúty" : "minút") : e + "minútami";
            break;
        case "h":
            return b ? "hodina" : d ? "hodinu" : "hodinou";
        case "hh":
            return b || d ? e + (Dd(a) ? "hodiny" : "hodín") : e + "hodinami";
            break;
        case "d":
            return b || d ? "deň" : "dňom";
        case "dd":
            return b || d ? e + (Dd(a) ? "dni" : "dní") : e + "dňami";
            break;
        case "M":
            return b || d ? "mesiac" : "mesiacom";
        case "MM":
            return b || d ? e + (Dd(a) ? "mesiace" : "mesiacov") : e + "mesiacmi";
            break;
        case "y":
            return b || d ? "rok" : "rokom";
        case "yy":
            return b || d ? e + (Dd(a) ? "roky" : "rokov") : e + "rokmi"
        }
    }
    function Fd(a, b, c, d) {
        var e = a + " ";
        switch (c) {
        case "s":
            return b || d ? "nekaj sekund" : "nekaj sekundami";
        case "m":
            return b ? "ena minuta" : "eno minuto";
        case "mm":
            return e += 1 === a ? b ? "minuta" : "minuto" : 2 === a ? b || d ? "minuti" : "minutama" : 5 > a ? b || d ? "minute" : "minutami" : b || d ? "minut" : "minutami";
        case "h":
            return b ? "ena ura" : "eno uro";
        case "hh":
            return e += 1 === a ? b ? "ura" : "uro" : 2 === a ? b || d ? "uri" : "urama" : 5 > a ? b || d ? "ure" : "urami" : b || d ? "ur" : "urami";
        case "d":
            return b || d ? "en dan" : "enim dnem";
        case "dd":
            return e += 1 === a ? b || d ? "dan" : "dnem" : 2 === a ? b || d ? "dni" : "dnevoma" : b || d ? "dni" : "dnevi";
        case "M":
            return b || d ? "en mesec" : "enim mesecem";
        case "MM":
            return e += 1 === a ? b || d ? "mesec" : "mesecem" : 2 === a ? b || d ? "meseca" : "mesecema" : 5 > a ? b || d ? "mesece" : "meseci" : b || d ? "mesecev" : "meseci";
        case "y":
            return b || d ? "eno leto" : "enim letom";
        case "yy":
            return e += 1 === a ? b || d ? "leto" : "letom" : 2 === a ? b || d ? "leti" : "letoma" : 5 > a ? b || d ? "leta" : "leti" : b || d ? "let" : "leti"
        }
    }
    function Gd(a, b, c, d) {
        var e = {
            s: ["viensas secunds", "'iensas secunds"],
            m: ["'n míut", "'iens míut"],
            mm: [a + " míuts", " " + a + " míuts"],
            h: ["'n þora", "'iensa þora"],
            hh: [a + " þoras", " " + a + " þoras"],
            d: ["'n ziua", "'iensa ziua"],
            dd: [a + " ziuas", " " + a + " ziuas"],
            M: ["'n mes", "'iens mes"],
            MM: [a + " mesen", " " + a + " mesen"],
            y: ["'n ar", "'iens ar"],
            yy: [a + " ars", " " + a + " ars"]
        };
        return d ? e[c][0] : b ? e[c][0] : e[c][1].trim()
    }
    function Hd(a, b) {
        var c = a.split("_");
        return b % 10 === 1 && b % 100 !== 11 ? c[0] : b % 10 >= 2 && 4 >= b % 10 && (10 > b % 100 || b % 100 >= 20) ? c[1] : c[2]
    }
    function Id(a, b, c) {
        var d = {
            mm: "хвилина_хвилини_хвилин",
            hh: "година_години_годин",
            dd: "день_дні_днів",
            MM: "місяць_місяці_місяців",
            yy: "рік_роки_років"
        };
        return "m" === c ? b ? "хвилина" : "хвилину" : "h" === c ? b ? "година" : "годину" : a + " " + Hd(d[c], +a)
    }
    function Jd(a, b) {
        var c = {
            nominative: "січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_"),
            accusative: "січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_")
        }
          , d = /D[oD]? *MMMM?/.test(b) ? "accusative" : "nominative";
        return c[d][a.month()]
    }
    function Kd(a, b) {
        var c = {
            nominative: "неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),
            accusative: "неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),
            genitive: "неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")
        }
          , d = /(\[[ВвУу]\]) ?dddd/.test(b) ? "accusative" : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(b) ? "genitive" : "nominative";
        return c[d][a.day()]
    }
    function Ld(a) {
        return function() {
            return a + "о" + (11 === this.hours() ? "б" : "") + "] LT"
        }
    }
    var Md, Nd, Od = a.momentProperties = [], Pd = !1, Qd = {}, Rd = {}, Sd = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, Td = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, Ud = {}, Vd = {}, Wd = /\d/, Xd = /\d\d/, Yd = /\d{3}/, Zd = /\d{4}/, $d = /[+-]?\d{6}/, _d = /\d\d?/, ae = /\d{1,3}/, be = /\d{1,4}/, ce = /[+-]?\d{1,6}/, de = /\d+/, ee = /[+-]?\d+/, fe = /Z|[+-]\d\d:?\d\d/gi, ge = /[+-]?\d+(\.\d{1,3})?/, he = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, ie = {}, je = {}, ke = 0, le = 1, me = 2, ne = 3, oe = 4, pe = 5, qe = 6;
    H("M", ["MM", 2], "Mo", function() {
        return this.month() + 1
    }),
    H("MMM", 0, 0, function(a) {
        return this.localeData().monthsShort(this, a)
    }),
    H("MMMM", 0, 0, function(a) {
        return this.localeData().months(this, a)
    }),
    z("month", "M"),
    N("M", _d),
    N("MM", _d, Xd),
    N("MMM", he),
    N("MMMM", he),
    Q(["M", "MM"], function(a, b) {
        b[le] = q(a) - 1
    }),
    Q(["MMM", "MMMM"], function(a, b, c, d) {
        var e = c._locale.monthsParse(a, d, c._strict);
        null != e ? b[le] = e : j(c).invalidMonth = a
    });
    var re = "January_February_March_April_May_June_July_August_September_October_November_December".split("_")
      , se = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_")
      , te = {};
    a.suppressDeprecationWarnings = !1;
    var ue = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/
      , ve = [["YYYYYY-MM-DD", /[+-]\d{6}-\d{2}-\d{2}/], ["YYYY-MM-DD", /\d{4}-\d{2}-\d{2}/], ["GGGG-[W]WW-E", /\d{4}-W\d{2}-\d/], ["GGGG-[W]WW", /\d{4}-W\d{2}/], ["YYYY-DDD", /\d{4}-\d{3}/]]
      , we = [["HH:mm:ss.SSSS", /(T| )\d\d:\d\d:\d\d\.\d+/], ["HH:mm:ss", /(T| )\d\d:\d\d:\d\d/], ["HH:mm", /(T| )\d\d:\d\d/], ["HH", /(T| )\d\d/]]
      , xe = /^\/?Date\((\-?\d+)/i;
    a.createFromInputFallback = aa("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.", function(a) {
        a._d = new Date(a._i + (a._useUTC ? " UTC" : ""))
    }),
    H(0, ["YY", 2], 0, function() {
        return this.year() % 100
    }),
    H(0, ["YYYY", 4], 0, "year"),
    H(0, ["YYYYY", 5], 0, "year"),
    H(0, ["YYYYYY", 6, !0], 0, "year"),
    z("year", "y"),
    N("Y", ee),
    N("YY", _d, Xd),
    N("YYYY", be, Zd),
    N("YYYYY", ce, $d),
    N("YYYYYY", ce, $d),
    Q(["YYYYY", "YYYYYY"], ke),
    Q("YYYY", function(b, c) {
        c[ke] = 2 === b.length ? a.parseTwoDigitYear(b) : q(b)
    }),
    Q("YY", function(b, c) {
        c[ke] = a.parseTwoDigitYear(b)
    }),
    a.parseTwoDigitYear = function(a) {
        return q(a) + (q(a) > 68 ? 1900 : 2e3)
    }
    ;
    var ye = C("FullYear", !1);
    H("w", ["ww", 2], "wo", "week"),
    H("W", ["WW", 2], "Wo", "isoWeek"),
    z("week", "w"),
    z("isoWeek", "W"),
    N("w", _d),
    N("ww", _d, Xd),
    N("W", _d),
    N("WW", _d, Xd),
    R(["w", "ww", "W", "WW"], function(a, b, c, d) {
        b[d.substr(0, 1)] = q(a)
    });
    var ze = {
        dow: 0,
        doy: 6
    };
    H("DDD", ["DDDD", 3], "DDDo", "dayOfYear"),
    z("dayOfYear", "DDD"),
    N("DDD", ae),
    N("DDDD", Yd),
    Q(["DDD", "DDDD"], function(a, b, c) {
        c._dayOfYear = q(a)
    }),
    a.ISO_8601 = function() {}
    ;
    var Ae = aa("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548", function() {
        var a = Da.apply(null, arguments);
        return this > a ? this : a
    })
      , Be = aa("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548", function() {
        var a = Da.apply(null, arguments);
        return a > this ? this : a
    });
    Ja("Z", ":"),
    Ja("ZZ", ""),
    N("Z", fe),
    N("ZZ", fe),
    Q(["Z", "ZZ"], function(a, b, c) {
        c._useUTC = !0,
        c._tzm = Ka(a)
    });
    var Ce = /([\+\-]|\d\d)/gi;
    a.updateOffset = function() {}
    ;
    var De = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/
      , Ee = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;
    Ya.fn = Ha.prototype;
    var Fe = ab(1, "add")
      , Ge = ab(-1, "subtract");
    a.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
    var He = aa("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function(a) {
        return void 0 === a ? this.localeData() : this.locale(a)
    });
    H(0, ["gg", 2], 0, function() {
        return this.weekYear() % 100
    }),
    H(0, ["GG", 2], 0, function() {
        return this.isoWeekYear() % 100
    }),
    Db("gggg", "weekYear"),
    Db("ggggg", "weekYear"),
    Db("GGGG", "isoWeekYear"),
    Db("GGGGG", "isoWeekYear"),
    z("weekYear", "gg"),
    z("isoWeekYear", "GG"),
    N("G", ee),
    N("g", ee),
    N("GG", _d, Xd),
    N("gg", _d, Xd),
    N("GGGG", be, Zd),
    N("gggg", be, Zd),
    N("GGGGG", ce, $d),
    N("ggggg", ce, $d),
    R(["gggg", "ggggg", "GGGG", "GGGGG"], function(a, b, c, d) {
        b[d.substr(0, 2)] = q(a)
    }),
    R(["gg", "GG"], function(b, c, d, e) {
        c[e] = a.parseTwoDigitYear(b)
    }),
    H("Q", 0, 0, "quarter"),
    z("quarter", "Q"),
    N("Q", Wd),
    Q("Q", function(a, b) {
        b[le] = 3 * (q(a) - 1)
    }),
    H("D", ["DD", 2], "Do", "date"),
    z("date", "D"),
    N("D", _d),
    N("DD", _d, Xd),
    N("Do", function(a, b) {
        return a ? b._ordinalParse : b._ordinalParseLenient
    }),
    Q(["D", "DD"], me),
    Q("Do", function(a, b) {
        b[me] = q(a.match(_d)[0], 10)
    });
    var Ie = C("Date", !0);
    H("d", 0, "do", "day"),
    H("dd", 0, 0, function(a) {
        return this.localeData().weekdaysMin(this, a)
    }),
    H("ddd", 0, 0, function(a) {
        return this.localeData().weekdaysShort(this, a)
    }),
    H("dddd", 0, 0, function(a) {
        return this.localeData().weekdays(this, a)
    }),
    H("e", 0, 0, "weekday"),
    H("E", 0, 0, "isoWeekday"),
    z("day", "d"),
    z("weekday", "e"),
    z("isoWeekday", "E"),
    N("d", _d),
    N("e", _d),
    N("E", _d),
    N("dd", he),
    N("ddd", he),
    N("dddd", he),
    R(["dd", "ddd", "dddd"], function(a, b, c) {
        var d = c._locale.weekdaysParse(a);
        null != d ? b.d = d : j(c).invalidWeekday = a
    }),
    R(["d", "e", "E"], function(a, b, c, d) {
        b[d] = q(a)
    });
    var Je = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_")
      , Ke = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_")
      , Le = "Su_Mo_Tu_We_Th_Fr_Sa".split("_");
    H("H", ["HH", 2], 0, "hour"),
    H("h", ["hh", 2], 0, function() {
        return this.hours() % 12 || 12
    }),
    Sb("a", !0),
    Sb("A", !1),
    z("hour", "h"),
    N("a", Tb),
    N("A", Tb),
    N("H", _d),
    N("h", _d),
    N("HH", _d, Xd),
    N("hh", _d, Xd),
    Q(["H", "HH"], ne),
    Q(["a", "A"], function(a, b, c) {
        c._isPm = c._locale.isPM(a),
        c._meridiem = a
    }),
    Q(["h", "hh"], function(a, b, c) {
        b[ne] = q(a),
        j(c).bigHour = !0
    });
    var Me = /[ap]\.?m?\.?/i
      , Ne = C("Hours", !0);
    H("m", ["mm", 2], 0, "minute"),
    z("minute", "m"),
    N("m", _d),
    N("mm", _d, Xd),
    Q(["m", "mm"], oe);
    var Oe = C("Minutes", !1);
    H("s", ["ss", 2], 0, "second"),
    z("second", "s"),
    N("s", _d),
    N("ss", _d, Xd),
    Q(["s", "ss"], pe);
    var Pe = C("Seconds", !1);
    H("S", 0, 0, function() {
        return ~~(this.millisecond() / 100)
    }),
    H(0, ["SS", 2], 0, function() {
        return ~~(this.millisecond() / 10)
    }),
    H(0, ["SSS", 3], 0, "millisecond"),
    H(0, ["SSSS", 4], 0, function() {
        return 10 * this.millisecond()
    }),
    H(0, ["SSSSS", 5], 0, function() {
        return 100 * this.millisecond()
    }),
    H(0, ["SSSSSS", 6], 0, function() {
        return 1e3 * this.millisecond()
    }),
    H(0, ["SSSSSSS", 7], 0, function() {
        return 1e4 * this.millisecond()
    }),
    H(0, ["SSSSSSSS", 8], 0, function() {
        return 1e5 * this.millisecond()
    }),
    H(0, ["SSSSSSSSS", 9], 0, function() {
        return 1e6 * this.millisecond()
    }),
    z("millisecond", "ms"),
    N("S", ae, Wd),
    N("SS", ae, Xd),
    N("SSS", ae, Yd);
    var Qe;
    for (Qe = "SSSS"; Qe.length <= 9; Qe += "S")
        N(Qe, de);
    for (Qe = "S"; Qe.length <= 9; Qe += "S")
        Q(Qe, Wb);
    var Re = C("Milliseconds", !1);
    H("z", 0, 0, "zoneAbbr"),
    H("zz", 0, 0, "zoneName");
    var Se = n.prototype;
    Se.add = Fe,
    Se.calendar = cb,
    Se.clone = db,
    Se.diff = ib,
    Se.endOf = ub,
    Se.format = mb,
    Se.from = nb,
    Se.fromNow = ob,
    Se.to = pb,
    Se.toNow = qb,
    Se.get = F,
    Se.invalidAt = Cb,
    Se.isAfter = eb,
    Se.isBefore = fb,
    Se.isBetween = gb,
    Se.isSame = hb,
    Se.isValid = Ab,
    Se.lang = He,
    Se.locale = rb,
    Se.localeData = sb,
    Se.max = Be,
    Se.min = Ae,
    Se.parsingFlags = Bb,
    Se.set = F,
    Se.startOf = tb,
    Se.subtract = Ge,
    Se.toArray = yb,
    Se.toObject = zb,
    Se.toDate = xb,
    Se.toISOString = lb,
    Se.toJSON = lb,
    Se.toString = kb,
    Se.unix = wb,
    Se.valueOf = vb,
    Se.year = ye,
    Se.isLeapYear = ia,
    Se.weekYear = Fb,
    Se.isoWeekYear = Gb,
    Se.quarter = Se.quarters = Jb,
    Se.month = Y,
    Se.daysInMonth = Z,
    Se.week = Se.weeks = na,
    Se.isoWeek = Se.isoWeeks = oa,
    Se.weeksInYear = Ib,
    Se.isoWeeksInYear = Hb,
    Se.date = Ie,
    Se.day = Se.days = Pb,
    Se.weekday = Qb,
    Se.isoWeekday = Rb,
    Se.dayOfYear = qa,
    Se.hour = Se.hours = Ne,
    Se.minute = Se.minutes = Oe,
    Se.second = Se.seconds = Pe,
    Se.millisecond = Se.milliseconds = Re,
    Se.utcOffset = Na,
    Se.utc = Pa,
    Se.local = Qa,
    Se.parseZone = Ra,
    Se.hasAlignedHourOffset = Sa,
    Se.isDST = Ta,
    Se.isDSTShifted = Ua,
    Se.isLocal = Va,
    Se.isUtcOffset = Wa,
    Se.isUtc = Xa,
    Se.isUTC = Xa,
    Se.zoneAbbr = Xb,
    Se.zoneName = Yb,
    Se.dates = aa("dates accessor is deprecated. Use date instead.", Ie),
    Se.months = aa("months accessor is deprecated. Use month instead", Y),
    Se.years = aa("years accessor is deprecated. Use year instead", ye),
    Se.zone = aa("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779", Oa);
    var Te = Se
      , Ue = {
        sameDay: "[Today at] LT",
        nextDay: "[Tomorrow at] LT",
        nextWeek: "dddd [at] LT",
        lastDay: "[Yesterday at] LT",
        lastWeek: "[Last] dddd [at] LT",
        sameElse: "L"
    }
      , Ve = {
        LTS: "h:mm:ss A",
        LT: "h:mm A",
        L: "MM/DD/YYYY",
        LL: "MMMM D, YYYY",
        LLL: "MMMM D, YYYY h:mm A",
        LLLL: "dddd, MMMM D, YYYY h:mm A"
    }
      , We = "Invalid date"
      , Xe = "%d"
      , Ye = /\d{1,2}/
      , Ze = {
        future: "in %s",
        past: "%s ago",
        s: "a few seconds",
        m: "a minute",
        mm: "%d minutes",
        h: "an hour",
        hh: "%d hours",
        d: "a day",
        dd: "%d days",
        M: "a month",
        MM: "%d months",
        y: "a year",
        yy: "%d years"
    }
      , $e = s.prototype;
    $e._calendar = Ue,
    $e.calendar = _b,
    $e._longDateFormat = Ve,
    $e.longDateFormat = ac,
    $e._invalidDate = We,
    $e.invalidDate = bc,
    $e._ordinal = Xe,
    $e.ordinal = cc,
    $e._ordinalParse = Ye,
    $e.preparse = dc,
    $e.postformat = dc,
    $e._relativeTime = Ze,
    $e.relativeTime = ec,
    $e.pastFuture = fc,
    $e.set = gc,
    $e.months = U,
    $e._months = re,
    $e.monthsShort = V,
    $e._monthsShort = se,
    $e.monthsParse = W,
    $e.week = ka,
    $e._week = ze,
    $e.firstDayOfYear = ma,
    $e.firstDayOfWeek = la,
    $e.weekdays = Lb,
    $e._weekdays = Je,
    $e.weekdaysMin = Nb,
    $e._weekdaysMin = Le,
    $e.weekdaysShort = Mb,
    $e._weekdaysShort = Ke,
    $e.weekdaysParse = Ob,
    $e.isPM = Ub,
    $e._meridiemParse = Me,
    $e.meridiem = Vb,
    w("en", {
        ordinalParse: /\d{1,2}(th|st|nd|rd)/,
        ordinal: function(a) {
            var b = a % 10
              , c = 1 === q(a % 100 / 10) ? "th" : 1 === b ? "st" : 2 === b ? "nd" : 3 === b ? "rd" : "th";
            return a + c
        }
    }),
    a.lang = aa("moment.lang is deprecated. Use moment.locale instead.", w),
    a.langData = aa("moment.langData is deprecated. Use moment.localeData instead.", y);
    var _e = Math.abs
      , af = yc("ms")
      , bf = yc("s")
      , cf = yc("m")
      , df = yc("h")
      , ef = yc("d")
      , ff = yc("w")
      , gf = yc("M")
      , hf = yc("y")
      , jf = Ac("milliseconds")
      , kf = Ac("seconds")
      , lf = Ac("minutes")
      , mf = Ac("hours")
      , nf = Ac("days")
      , of = Ac("months")
      , pf = Ac("years")
      , qf = Math.round
      , rf = {
        s: 45,
        m: 45,
        h: 22,
        d: 26,
        M: 11
    }
      , sf = Math.abs
      , tf = Ha.prototype;
    tf.abs = oc,
    tf.add = qc,
    tf.subtract = rc,
    tf.as = wc,
    tf.asMilliseconds = af,
    tf.asSeconds = bf,
    tf.asMinutes = cf,
    tf.asHours = df,
    tf.asDays = ef,
    tf.asWeeks = ff,
    tf.asMonths = gf,
    tf.asYears = hf,
    tf.valueOf = xc,
    tf._bubble = tc,
    tf.get = zc,
    tf.milliseconds = jf,
    tf.seconds = kf,
    tf.minutes = lf,
    tf.hours = mf,
    tf.days = nf,
    tf.weeks = Bc,
    tf.months = of,
    tf.years = pf,
    tf.humanize = Fc,
    tf.toISOString = Gc,
    tf.toString = Gc,
    tf.toJSON = Gc,
    tf.locale = rb,
    tf.localeData = sb,
    tf.toIsoString = aa("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", Gc),
    tf.lang = He,
    H("X", 0, 0, "unix"),
    H("x", 0, 0, "valueOf"),
    N("x", ee),
    N("X", ge),
    Q("X", function(a, b, c) {
        c._d = new Date(1e3 * parseFloat(a, 10))
    }),
    Q("x", function(a, b, c) {
        c._d = new Date(q(a))
    }),
    a.version = "2.10.6",
    b(Da),
    a.fn = Te,
    a.min = Fa,
    a.max = Ga,
    a.utc = h,
    a.unix = Zb,
    a.months = jc,
    a.isDate = d,
    a.locale = w,
    a.invalid = l,
    a.duration = Ya,
    a.isMoment = o,
    a.weekdays = lc,
    a.parseZone = $b,
    a.localeData = y,
    a.isDuration = Ia,
    a.monthsShort = kc,
    a.weekdaysMin = nc,
    a.defineLocale = x,
    a.weekdaysShort = mc,
    a.normalizeUnits = A,
    a.relativeTimeThreshold = Ec;
    var uf = a
      , vf = (uf.defineLocale("af", {
        months: "Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),
        monthsShort: "Jan_Feb_Mar_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),
        weekdays: "Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),
        weekdaysShort: "Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),
        weekdaysMin: "So_Ma_Di_Wo_Do_Vr_Sa".split("_"),
        meridiemParse: /vm|nm/i,
        isPM: function(a) {
            return /^nm$/i.test(a)
        },
        meridiem: function(a, b, c) {
            return 12 > a ? c ? "vm" : "VM" : c ? "nm" : "NM"
        },
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd, D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Vandag om] LT",
            nextDay: "[Môre om] LT",
            nextWeek: "dddd [om] LT",
            lastDay: "[Gister om] LT",
            lastWeek: "[Laas] dddd [om] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "oor %s",
            past: "%s gelede",
            s: "'n paar sekondes",
            m: "'n minuut",
            mm: "%d minute",
            h: "'n uur",
            hh: "%d ure",
            d: "'n dag",
            dd: "%d dae",
            M: "'n maand",
            MM: "%d maande",
            y: "'n jaar",
            yy: "%d jaar"
        },
        ordinalParse: /\d{1,2}(ste|de)/,
        ordinal: function(a) {
            return a + (1 === a || 8 === a || a >= 20 ? "ste" : "de")
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("ar-ma", {
        months: "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),
        monthsShort: "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),
        weekdays: "الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
        weekdaysShort: "احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),
        weekdaysMin: "ح_ن_ث_ر_خ_ج_س".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[اليوم على الساعة] LT",
            nextDay: "[غدا على الساعة] LT",
            nextWeek: "dddd [على الساعة] LT",
            lastDay: "[أمس على الساعة] LT",
            lastWeek: "dddd [على الساعة] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "في %s",
            past: "منذ %s",
            s: "ثوان",
            m: "دقيقة",
            mm: "%d دقائق",
            h: "ساعة",
            hh: "%d ساعات",
            d: "يوم",
            dd: "%d أيام",
            M: "شهر",
            MM: "%d أشهر",
            y: "سنة",
            yy: "%d سنوات"
        },
        week: {
            dow: 6,
            doy: 12
        }
    }),
    {
        1: "١",
        2: "٢",
        3: "٣",
        4: "٤",
        5: "٥",
        6: "٦",
        7: "٧",
        8: "٨",
        9: "٩",
        0: "٠"
    })
      , wf = {
        "١": "1",
        "٢": "2",
        "٣": "3",
        "٤": "4",
        "٥": "5",
        "٦": "6",
        "٧": "7",
        "٨": "8",
        "٩": "9",
        "٠": "0"
    }
      , xf = (uf.defineLocale("ar-sa", {
        months: "يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),
        monthsShort: "يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),
        weekdays: "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
        weekdaysShort: "أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),
        weekdaysMin: "ح_ن_ث_ر_خ_ج_س".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D MMMM YYYY HH:mm"
        },
        meridiemParse: /ص|م/,
        isPM: function(a) {
            return "م" === a
        },
        meridiem: function(a, b, c) {
            return 12 > a ? "ص" : "م"
        },
        calendar: {
            sameDay: "[اليوم على الساعة] LT",
            nextDay: "[غدا على الساعة] LT",
            nextWeek: "dddd [على الساعة] LT",
            lastDay: "[أمس على الساعة] LT",
            lastWeek: "dddd [على الساعة] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "في %s",
            past: "منذ %s",
            s: "ثوان",
            m: "دقيقة",
            mm: "%d دقائق",
            h: "ساعة",
            hh: "%d ساعات",
            d: "يوم",
            dd: "%d أيام",
            M: "شهر",
            MM: "%d أشهر",
            y: "سنة",
            yy: "%d سنوات"
        },
        preparse: function(a) {
            return a.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function(a) {
                return wf[a]
            }).replace(/،/g, ",")
        },
        postformat: function(a) {
            return a.replace(/\d/g, function(a) {
                return vf[a]
            }).replace(/,/g, "،")
        },
        week: {
            dow: 6,
            doy: 12
        }
    }),
    uf.defineLocale("ar-tn", {
        months: "جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),
        monthsShort: "جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),
        weekdays: "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
        weekdaysShort: "أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),
        weekdaysMin: "ح_ن_ث_ر_خ_ج_س".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[اليوم على الساعة] LT",
            nextDay: "[غدا على الساعة] LT",
            nextWeek: "dddd [على الساعة] LT",
            lastDay: "[أمس على الساعة] LT",
            lastWeek: "dddd [على الساعة] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "في %s",
            past: "منذ %s",
            s: "ثوان",
            m: "دقيقة",
            mm: "%d دقائق",
            h: "ساعة",
            hh: "%d ساعات",
            d: "يوم",
            dd: "%d أيام",
            M: "شهر",
            MM: "%d أشهر",
            y: "سنة",
            yy: "%d سنوات"
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    {
        1: "١",
        2: "٢",
        3: "٣",
        4: "٤",
        5: "٥",
        6: "٦",
        7: "٧",
        8: "٨",
        9: "٩",
        0: "٠"
    })
      , yf = {
        "١": "1",
        "٢": "2",
        "٣": "3",
        "٤": "4",
        "٥": "5",
        "٦": "6",
        "٧": "7",
        "٨": "8",
        "٩": "9",
        "٠": "0"
    }
      , zf = function(a) {
        return 0 === a ? 0 : 1 === a ? 1 : 2 === a ? 2 : a % 100 >= 3 && 10 >= a % 100 ? 3 : a % 100 >= 11 ? 4 : 5
    }
      , Af = {
        s: ["أقل من ثانية", "ثانية واحدة", ["ثانيتان", "ثانيتين"], "%d ثوان", "%d ثانية", "%d ثانية"],
        m: ["أقل من دقيقة", "دقيقة واحدة", ["دقيقتان", "دقيقتين"], "%d دقائق", "%d دقيقة", "%d دقيقة"],
        h: ["أقل من ساعة", "ساعة واحدة", ["ساعتان", "ساعتين"], "%d ساعات", "%d ساعة", "%d ساعة"],
        d: ["أقل من يوم", "يوم واحد", ["يومان", "يومين"], "%d أيام", "%d يومًا", "%d يوم"],
        M: ["أقل من شهر", "شهر واحد", ["شهران", "شهرين"], "%d أشهر", "%d شهرا", "%d شهر"],
        y: ["أقل من عام", "عام واحد", ["عامان", "عامين"], "%d أعوام", "%d عامًا", "%d عام"]
    }
      , Bf = function(a) {
        return function(b, c, d, e) {
            var f = zf(b)
              , g = Af[a][zf(b)];
            return 2 === f && (g = g[c ? 0 : 1]),
            g.replace(/%d/i, b)
        }
    }
      , Cf = ["كانون الثاني يناير", "شباط فبراير", "آذار مارس", "نيسان أبريل", "أيار مايو", "حزيران يونيو", "تموز يوليو", "آب أغسطس", "أيلول سبتمبر", "تشرين الأول أكتوبر", "تشرين الثاني نوفمبر", "كانون الأول ديسمبر"]
      , Df = (uf.defineLocale("ar", {
        months: Cf,
        monthsShort: Cf,
        weekdays: "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
        weekdaysShort: "أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),
        weekdaysMin: "ح_ن_ث_ر_خ_ج_س".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "D/‏M/‏YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D MMMM YYYY HH:mm"
        },
        meridiemParse: /ص|م/,
        isPM: function(a) {
            return "م" === a
        },
        meridiem: function(a, b, c) {
            return 12 > a ? "ص" : "م"
        },
        calendar: {
            sameDay: "[اليوم عند الساعة] LT",
            nextDay: "[غدًا عند الساعة] LT",
            nextWeek: "dddd [عند الساعة] LT",
            lastDay: "[أمس عند الساعة] LT",
            lastWeek: "dddd [عند الساعة] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "بعد %s",
            past: "منذ %s",
            s: Bf("s"),
            m: Bf("m"),
            mm: Bf("m"),
            h: Bf("h"),
            hh: Bf("h"),
            d: Bf("d"),
            dd: Bf("d"),
            M: Bf("M"),
            MM: Bf("M"),
            y: Bf("y"),
            yy: Bf("y")
        },
        preparse: function(a) {
            return a.replace(/\u200f/g, "").replace(/[١٢٣٤٥٦٧٨٩٠]/g, function(a) {
                return yf[a]
            }).replace(/،/g, ",")
        },
        postformat: function(a) {
            return a.replace(/\d/g, function(a) {
                return xf[a]
            }).replace(/,/g, "،")
        },
        week: {
            dow: 6,
            doy: 12
        }
    }),
    {
        1: "-inci",
        5: "-inci",
        8: "-inci",
        70: "-inci",
        80: "-inci",
        2: "-nci",
        7: "-nci",
        20: "-nci",
        50: "-nci",
        3: "-üncü",
        4: "-üncü",
        100: "-üncü",
        6: "-ncı",
        9: "-uncu",
        10: "-uncu",
        30: "-uncu",
        60: "-ıncı",
        90: "-ıncı"
    })
      , Ef = (uf.defineLocale("az", {
        months: "yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),
        monthsShort: "yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),
        weekdays: "Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),
        weekdaysShort: "Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),
        weekdaysMin: "Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd, D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[bugün saat] LT",
            nextDay: "[sabah saat] LT",
            nextWeek: "[gələn həftə] dddd [saat] LT",
            lastDay: "[dünən] LT",
            lastWeek: "[keçən həftə] dddd [saat] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s sonra",
            past: "%s əvvəl",
            s: "birneçə saniyyə",
            m: "bir dəqiqə",
            mm: "%d dəqiqə",
            h: "bir saat",
            hh: "%d saat",
            d: "bir gün",
            dd: "%d gün",
            M: "bir ay",
            MM: "%d ay",
            y: "bir il",
            yy: "%d il"
        },
        meridiemParse: /gecə|səhər|gündüz|axşam/,
        isPM: function(a) {
            return /^(gündüz|axşam)$/.test(a)
        },
        meridiem: function(a, b, c) {
            return 4 > a ? "gecə" : 12 > a ? "səhər" : 17 > a ? "gündüz" : "axşam"
        },
        ordinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
        ordinal: function(a) {
            if (0 === a)
                return a + "-ıncı";
            var b = a % 10
              , c = a % 100 - b
              , d = a >= 100 ? 100 : null;
            return a + (Df[b] || Df[c] || Df[d])
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("be", {
        months: Jc,
        monthsShort: "студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),
        weekdays: Kc,
        weekdaysShort: "нд_пн_ат_ср_чц_пт_сб".split("_"),
        weekdaysMin: "нд_пн_ат_ср_чц_пт_сб".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D MMMM YYYY г.",
            LLL: "D MMMM YYYY г., HH:mm",
            LLLL: "dddd, D MMMM YYYY г., HH:mm"
        },
        calendar: {
            sameDay: "[Сёння ў] LT",
            nextDay: "[Заўтра ў] LT",
            lastDay: "[Учора ў] LT",
            nextWeek: function() {
                return "[У] dddd [ў] LT"
            },
            lastWeek: function() {
                switch (this.day()) {
                case 0:
                case 3:
                case 5:
                case 6:
                    return "[У мінулую] dddd [ў] LT";
                case 1:
                case 2:
                case 4:
                    return "[У мінулы] dddd [ў] LT"
                }
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "праз %s",
            past: "%s таму",
            s: "некалькі секунд",
            m: Ic,
            mm: Ic,
            h: Ic,
            hh: Ic,
            d: "дзень",
            dd: Ic,
            M: "месяц",
            MM: Ic,
            y: "год",
            yy: Ic
        },
        meridiemParse: /ночы|раніцы|дня|вечара/,
        isPM: function(a) {
            return /^(дня|вечара)$/.test(a)
        },
        meridiem: function(a, b, c) {
            return 4 > a ? "ночы" : 12 > a ? "раніцы" : 17 > a ? "дня" : "вечара"
        },
        ordinalParse: /\d{1,2}-(і|ы|га)/,
        ordinal: function(a, b) {
            switch (b) {
            case "M":
            case "d":
            case "DDD":
            case "w":
            case "W":
                return a % 10 !== 2 && a % 10 !== 3 || a % 100 === 12 || a % 100 === 13 ? a + "-ы" : a + "-і";
            case "D":
                return a + "-га";
            default:
                return a
            }
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("bg", {
        months: "януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),
        monthsShort: "янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),
        weekdays: "неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),
        weekdaysShort: "нед_пон_вто_сря_чет_пет_съб".split("_"),
        weekdaysMin: "нд_пн_вт_ср_чт_пт_сб".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "D.MM.YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY H:mm",
            LLLL: "dddd, D MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: "[Днес в] LT",
            nextDay: "[Утре в] LT",
            nextWeek: "dddd [в] LT",
            lastDay: "[Вчера в] LT",
            lastWeek: function() {
                switch (this.day()) {
                case 0:
                case 3:
                case 6:
                    return "[В изминалата] dddd [в] LT";
                case 1:
                case 2:
                case 4:
                case 5:
                    return "[В изминалия] dddd [в] LT"
                }
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "след %s",
            past: "преди %s",
            s: "няколко секунди",
            m: "минута",
            mm: "%d минути",
            h: "час",
            hh: "%d часа",
            d: "ден",
            dd: "%d дни",
            M: "месец",
            MM: "%d месеца",
            y: "година",
            yy: "%d години"
        },
        ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
        ordinal: function(a) {
            var b = a % 10
              , c = a % 100;
            return 0 === a ? a + "-ев" : 0 === c ? a + "-ен" : c > 10 && 20 > c ? a + "-ти" : 1 === b ? a + "-ви" : 2 === b ? a + "-ри" : 7 === b || 8 === b ? a + "-ми" : a + "-ти"
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    {
        1: "১",
        2: "২",
        3: "৩",
        4: "৪",
        5: "৫",
        6: "৬",
        7: "৭",
        8: "৮",
        9: "৯",
        0: "০"
    })
      , Ff = {
        "১": "1",
        "২": "2",
        "৩": "3",
        "৪": "4",
        "৫": "5",
        "৬": "6",
        "৭": "7",
        "৮": "8",
        "৯": "9",
        "০": "0"
    }
      , Gf = (uf.defineLocale("bn", {
        months: "জানুয়ারী_ফেবুয়ারী_মার্চ_এপ্রিল_মে_জুন_জুলাই_অগাস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),
        monthsShort: "জানু_ফেব_মার্চ_এপর_মে_জুন_জুল_অগ_সেপ্ট_অক্টো_নভ_ডিসেম্".split("_"),
        weekdays: "রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পত্তিবার_শুক্রুবার_শনিবার".split("_"),
        weekdaysShort: "রবি_সোম_মঙ্গল_বুধ_বৃহস্পত্তি_শুক্রু_শনি".split("_"),
        weekdaysMin: "রব_সম_মঙ্গ_বু_ব্রিহ_শু_শনি".split("_"),
        longDateFormat: {
            LT: "A h:mm সময়",
            LTS: "A h:mm:ss সময়",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY, A h:mm সময়",
            LLLL: "dddd, D MMMM YYYY, A h:mm সময়"
        },
        calendar: {
            sameDay: "[আজ] LT",
            nextDay: "[আগামীকাল] LT",
            nextWeek: "dddd, LT",
            lastDay: "[গতকাল] LT",
            lastWeek: "[গত] dddd, LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s পরে",
            past: "%s আগে",
            s: "কএক সেকেন্ড",
            m: "এক মিনিট",
            mm: "%d মিনিট",
            h: "এক ঘন্টা",
            hh: "%d ঘন্টা",
            d: "এক দিন",
            dd: "%d দিন",
            M: "এক মাস",
            MM: "%d মাস",
            y: "এক বছর",
            yy: "%d বছর"
        },
        preparse: function(a) {
            return a.replace(/[১২৩৪৫৬৭৮৯০]/g, function(a) {
                return Ff[a]
            })
        },
        postformat: function(a) {
            return a.replace(/\d/g, function(a) {
                return Ef[a]
            })
        },
        meridiemParse: /রাত|সকাল|দুপুর|বিকেল|রাত/,
        isPM: function(a) {
            return /^(দুপুর|বিকেল|রাত)$/.test(a)
        },
        meridiem: function(a, b, c) {
            return 4 > a ? "রাত" : 10 > a ? "সকাল" : 17 > a ? "দুপুর" : 20 > a ? "বিকেল" : "রাত"
        },
        week: {
            dow: 0,
            doy: 6
        }
    }),
    {
        1: "༡",
        2: "༢",
        3: "༣",
        4: "༤",
        5: "༥",
        6: "༦",
        7: "༧",
        8: "༨",
        9: "༩",
        0: "༠"
    })
      , Hf = {
        "༡": "1",
        "༢": "2",
        "༣": "3",
        "༤": "4",
        "༥": "5",
        "༦": "6",
        "༧": "7",
        "༨": "8",
        "༩": "9",
        "༠": "0"
    }
      , If = (uf.defineLocale("bo", {
        months: "ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),
        monthsShort: "ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),
        weekdays: "གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),
        weekdaysShort: "ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),
        weekdaysMin: "ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),
        longDateFormat: {
            LT: "A h:mm",
            LTS: "A h:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY, A h:mm",
            LLLL: "dddd, D MMMM YYYY, A h:mm"
        },
        calendar: {
            sameDay: "[དི་རིང] LT",
            nextDay: "[སང་ཉིན] LT",
            nextWeek: "[བདུན་ཕྲག་རྗེས་མ], LT",
            lastDay: "[ཁ་སང] LT",
            lastWeek: "[བདུན་ཕྲག་མཐའ་མ] dddd, LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s ལ་",
            past: "%s སྔན་ལ",
            s: "ལམ་སང",
            m: "སྐར་མ་གཅིག",
            mm: "%d སྐར་མ",
            h: "ཆུ་ཚོད་གཅིག",
            hh: "%d ཆུ་ཚོད",
            d: "ཉིན་གཅིག",
            dd: "%d ཉིན་",
            M: "ཟླ་བ་གཅིག",
            MM: "%d ཟླ་བ",
            y: "ལོ་གཅིག",
            yy: "%d ལོ"
        },
        preparse: function(a) {
            return a.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function(a) {
                return Hf[a]
            })
        },
        postformat: function(a) {
            return a.replace(/\d/g, function(a) {
                return Gf[a]
            })
        },
        meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
        isPM: function(a) {
            return /^(ཉིན་གུང|དགོང་དག|མཚན་མོ)$/.test(a)
        },
        meridiem: function(a, b, c) {
            return 4 > a ? "མཚན་མོ" : 10 > a ? "ཞོགས་ཀས" : 17 > a ? "ཉིན་གུང" : 20 > a ? "དགོང་དག" : "མཚན་མོ"
        },
        week: {
            dow: 0,
            doy: 6
        }
    }),
    uf.defineLocale("br", {
        months: "Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),
        monthsShort: "Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),
        weekdays: "Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),
        weekdaysShort: "Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),
        weekdaysMin: "Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),
        longDateFormat: {
            LT: "h[e]mm A",
            LTS: "h[e]mm:ss A",
            L: "DD/MM/YYYY",
            LL: "D [a viz] MMMM YYYY",
            LLL: "D [a viz] MMMM YYYY h[e]mm A",
            LLLL: "dddd, D [a viz] MMMM YYYY h[e]mm A"
        },
        calendar: {
            sameDay: "[Hiziv da] LT",
            nextDay: "[Warc'hoazh da] LT",
            nextWeek: "dddd [da] LT",
            lastDay: "[Dec'h da] LT",
            lastWeek: "dddd [paset da] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "a-benn %s",
            past: "%s 'zo",
            s: "un nebeud segondennoù",
            m: "ur vunutenn",
            mm: Lc,
            h: "un eur",
            hh: "%d eur",
            d: "un devezh",
            dd: Lc,
            M: "ur miz",
            MM: Lc,
            y: "ur bloaz",
            yy: Mc
        },
        ordinalParse: /\d{1,2}(añ|vet)/,
        ordinal: function(a) {
            var b = 1 === a ? "añ" : "vet";
            return a + b
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("bs", {
        months: "januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),
        monthsShort: "jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),
        weekdays: "nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),
        weekdaysShort: "ned._pon._uto._sri._čet._pet._sub.".split("_"),
        weekdaysMin: "ne_po_ut_sr_če_pe_su".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "DD. MM. YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY H:mm",
            LLLL: "dddd, D. MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: "[danas u] LT",
            nextDay: "[sutra u] LT",
            nextWeek: function() {
                switch (this.day()) {
                case 0:
                    return "[u] [nedjelju] [u] LT";
                case 3:
                    return "[u] [srijedu] [u] LT";
                case 6:
                    return "[u] [subotu] [u] LT";
                case 1:
                case 2:
                case 4:
                case 5:
                    return "[u] dddd [u] LT"
                }
            },
            lastDay: "[jučer u] LT",
            lastWeek: function() {
                switch (this.day()) {
                case 0:
                case 3:
                    return "[prošlu] dddd [u] LT";
                case 6:
                    return "[prošle] [subote] [u] LT";
                case 1:
                case 2:
                case 4:
                case 5:
                    return "[prošli] dddd [u] LT"
                }
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "za %s",
            past: "prije %s",
            s: "par sekundi",
            m: Qc,
            mm: Qc,
            h: Qc,
            hh: Qc,
            d: "dan",
            dd: Qc,
            M: "mjesec",
            MM: Qc,
            y: "godinu",
            yy: Qc
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("ca", {
        months: "gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),
        monthsShort: "gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.".split("_"),
        weekdays: "diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),
        weekdaysShort: "dg._dl._dt._dc._dj._dv._ds.".split("_"),
        weekdaysMin: "Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "LT:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY H:mm",
            LLLL: "dddd D MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: function() {
                return "[avui a " + (1 !== this.hours() ? "les" : "la") + "] LT"
            },
            nextDay: function() {
                return "[demà a " + (1 !== this.hours() ? "les" : "la") + "] LT"
            },
            nextWeek: function() {
                return "dddd [a " + (1 !== this.hours() ? "les" : "la") + "] LT"
            },
            lastDay: function() {
                return "[ahir a " + (1 !== this.hours() ? "les" : "la") + "] LT"
            },
            lastWeek: function() {
                return "[el] dddd [passat a " + (1 !== this.hours() ? "les" : "la") + "] LT"
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "en %s",
            past: "fa %s",
            s: "uns segons",
            m: "un minut",
            mm: "%d minuts",
            h: "una hora",
            hh: "%d hores",
            d: "un dia",
            dd: "%d dies",
            M: "un mes",
            MM: "%d mesos",
            y: "un any",
            yy: "%d anys"
        },
        ordinalParse: /\d{1,2}(r|n|t|è|a)/,
        ordinal: function(a, b) {
            var c = 1 === a ? "r" : 2 === a ? "n" : 3 === a ? "r" : 4 === a ? "t" : "è";
            return ("w" === b || "W" === b) && (c = "a"),
            a + c
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    "leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"))
      , Jf = "led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_")
      , Kf = (uf.defineLocale("cs", {
        months: If,
        monthsShort: Jf,
        monthsParse: function(a, b) {
            var c, d = [];
            for (c = 0; 12 > c; c++)
                d[c] = new RegExp("^" + a[c] + "$|^" + b[c] + "$","i");
            return d
        }(If, Jf),
        weekdays: "neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),
        weekdaysShort: "ne_po_út_st_čt_pá_so".split("_"),
        weekdaysMin: "ne_po_út_st_čt_pá_so".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY H:mm",
            LLLL: "dddd D. MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: "[dnes v] LT",
            nextDay: "[zítra v] LT",
            nextWeek: function() {
                switch (this.day()) {
                case 0:
                    return "[v neděli v] LT";
                case 1:
                case 2:
                    return "[v] dddd [v] LT";
                case 3:
                    return "[ve středu v] LT";
                case 4:
                    return "[ve čtvrtek v] LT";
                case 5:
                    return "[v pátek v] LT";
                case 6:
                    return "[v sobotu v] LT"
                }
            },
            lastDay: "[včera v] LT",
            lastWeek: function() {
                switch (this.day()) {
                case 0:
                    return "[minulou neděli v] LT";
                case 1:
                case 2:
                    return "[minulé] dddd [v] LT";
                case 3:
                    return "[minulou středu v] LT";
                case 4:
                case 5:
                    return "[minulý] dddd [v] LT";
                case 6:
                    return "[minulou sobotu v] LT"
                }
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "za %s",
            past: "před %s",
            s: Sc,
            m: Sc,
            mm: Sc,
            h: Sc,
            hh: Sc,
            d: Sc,
            dd: Sc,
            M: Sc,
            MM: Sc,
            y: Sc,
            yy: Sc
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("cv", {
        months: "кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),
        monthsShort: "кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),
        weekdays: "вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),
        weekdaysShort: "выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),
        weekdaysMin: "вр_тн_ыт_юн_кҫ_эр_шм".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD-MM-YYYY",
            LL: "YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",
            LLL: "YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",
            LLLL: "dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"
        },
        calendar: {
            sameDay: "[Паян] LT [сехетре]",
            nextDay: "[Ыран] LT [сехетре]",
            lastDay: "[Ӗнер] LT [сехетре]",
            nextWeek: "[Ҫитес] dddd LT [сехетре]",
            lastWeek: "[Иртнӗ] dddd LT [сехетре]",
            sameElse: "L"
        },
        relativeTime: {
            future: function(a) {
                var b = /сехет$/i.exec(a) ? "рен" : /ҫул$/i.exec(a) ? "тан" : "ран";
                return a + b
            },
            past: "%s каялла",
            s: "пӗр-ик ҫеккунт",
            m: "пӗр минут",
            mm: "%d минут",
            h: "пӗр сехет",
            hh: "%d сехет",
            d: "пӗр кун",
            dd: "%d кун",
            M: "пӗр уйӑх",
            MM: "%d уйӑх",
            y: "пӗр ҫул",
            yy: "%d ҫул"
        },
        ordinalParse: /\d{1,2}-мӗш/,
        ordinal: "%d-мӗш",
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("cy", {
        months: "Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),
        monthsShort: "Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),
        weekdays: "Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),
        weekdaysShort: "Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),
        weekdaysMin: "Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd, D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Heddiw am] LT",
            nextDay: "[Yfory am] LT",
            nextWeek: "dddd [am] LT",
            lastDay: "[Ddoe am] LT",
            lastWeek: "dddd [diwethaf am] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "mewn %s",
            past: "%s yn ôl",
            s: "ychydig eiliadau",
            m: "munud",
            mm: "%d munud",
            h: "awr",
            hh: "%d awr",
            d: "diwrnod",
            dd: "%d diwrnod",
            M: "mis",
            MM: "%d mis",
            y: "blwyddyn",
            yy: "%d flynedd"
        },
        ordinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
        ordinal: function(a) {
            var b = a
              , c = ""
              , d = ["", "af", "il", "ydd", "ydd", "ed", "ed", "ed", "fed", "fed", "fed", "eg", "fed", "eg", "eg", "fed", "eg", "eg", "fed", "eg", "fed"];
            return b > 20 ? c = 40 === b || 50 === b || 60 === b || 80 === b || 100 === b ? "fed" : "ain" : b > 0 && (c = d[b]),
            a + c
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("da", {
        months: "januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),
        monthsShort: "jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),
        weekdays: "søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),
        weekdaysShort: "søn_man_tir_ons_tor_fre_lør".split("_"),
        weekdaysMin: "sø_ma_ti_on_to_fr_lø".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY HH:mm",
            LLLL: "dddd [d.] D. MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[I dag kl.] LT",
            nextDay: "[I morgen kl.] LT",
            nextWeek: "dddd [kl.] LT",
            lastDay: "[I går kl.] LT",
            lastWeek: "[sidste] dddd [kl] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "om %s",
            past: "%s siden",
            s: "få sekunder",
            m: "et minut",
            mm: "%d minutter",
            h: "en time",
            hh: "%d timer",
            d: "en dag",
            dd: "%d dage",
            M: "en måned",
            MM: "%d måneder",
            y: "et år",
            yy: "%d år"
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("de-at", {
        months: "Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),
        monthsShort: "Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),
        weekdays: "Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),
        weekdaysShort: "So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),
        weekdaysMin: "So_Mo_Di_Mi_Do_Fr_Sa".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY HH:mm",
            LLLL: "dddd, D. MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Heute um] LT [Uhr]",
            sameElse: "L",
            nextDay: "[Morgen um] LT [Uhr]",
            nextWeek: "dddd [um] LT [Uhr]",
            lastDay: "[Gestern um] LT [Uhr]",
            lastWeek: "[letzten] dddd [um] LT [Uhr]"
        },
        relativeTime: {
            future: "in %s",
            past: "vor %s",
            s: "ein paar Sekunden",
            m: Tc,
            mm: "%d Minuten",
            h: Tc,
            hh: "%d Stunden",
            d: Tc,
            dd: Tc,
            M: Tc,
            MM: Tc,
            y: Tc,
            yy: Tc
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("de", {
        months: "Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),
        monthsShort: "Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),
        weekdays: "Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),
        weekdaysShort: "So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),
        weekdaysMin: "So_Mo_Di_Mi_Do_Fr_Sa".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY HH:mm",
            LLLL: "dddd, D. MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Heute um] LT [Uhr]",
            sameElse: "L",
            nextDay: "[Morgen um] LT [Uhr]",
            nextWeek: "dddd [um] LT [Uhr]",
            lastDay: "[Gestern um] LT [Uhr]",
            lastWeek: "[letzten] dddd [um] LT [Uhr]"
        },
        relativeTime: {
            future: "in %s",
            past: "vor %s",
            s: "ein paar Sekunden",
            m: Uc,
            mm: "%d Minuten",
            h: Uc,
            hh: "%d Stunden",
            d: Uc,
            dd: Uc,
            M: Uc,
            MM: Uc,
            y: Uc,
            yy: Uc
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("el", {
        monthsNominativeEl: "Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),
        monthsGenitiveEl: "Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),
        months: function(a, b) {
            return /D/.test(b.substring(0, b.indexOf("MMMM"))) ? this._monthsGenitiveEl[a.month()] : this._monthsNominativeEl[a.month()]
        },
        monthsShort: "Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),
        weekdays: "Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),
        weekdaysShort: "Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),
        weekdaysMin: "Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),
        meridiem: function(a, b, c) {
            return a > 11 ? c ? "μμ" : "ΜΜ" : c ? "πμ" : "ΠΜ"
        },
        isPM: function(a) {
            return "μ" === (a + "").toLowerCase()[0]
        },
        meridiemParse: /[ΠΜ]\.?Μ?\.?/i,
        longDateFormat: {
            LT: "h:mm A",
            LTS: "h:mm:ss A",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY h:mm A",
            LLLL: "dddd, D MMMM YYYY h:mm A"
        },
        calendarEl: {
            sameDay: "[Σήμερα {}] LT",
            nextDay: "[Αύριο {}] LT",
            nextWeek: "dddd [{}] LT",
            lastDay: "[Χθες {}] LT",
            lastWeek: function() {
                switch (this.day()) {
                case 6:
                    return "[το προηγούμενο] dddd [{}] LT";
                default:
                    return "[την προηγούμενη] dddd [{}] LT"
                }
            },
            sameElse: "L"
        },
        calendar: function(a, b) {
            var c = this._calendarEl[a]
              , d = b && b.hours();
            return "function" == typeof c && (c = c.apply(b)),
            c.replace("{}", d % 12 === 1 ? "στη" : "στις")
        },
        relativeTime: {
            future: "σε %s",
            past: "%s πριν",
            s: "λίγα δευτερόλεπτα",
            m: "ένα λεπτό",
            mm: "%d λεπτά",
            h: "μία ώρα",
            hh: "%d ώρες",
            d: "μία μέρα",
            dd: "%d μέρες",
            M: "ένας μήνας",
            MM: "%d μήνες",
            y: "ένας χρόνος",
            yy: "%d χρόνια"
        },
        ordinalParse: /\d{1,2}η/,
        ordinal: "%dη",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("en-au", {
        months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
        monthsShort: "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
        weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
        weekdaysShort: "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
        weekdaysMin: "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
        longDateFormat: {
            LT: "h:mm A",
            LTS: "h:mm:ss A",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY h:mm A",
            LLLL: "dddd, D MMMM YYYY h:mm A"
        },
        calendar: {
            sameDay: "[Today at] LT",
            nextDay: "[Tomorrow at] LT",
            nextWeek: "dddd [at] LT",
            lastDay: "[Yesterday at] LT",
            lastWeek: "[Last] dddd [at] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "in %s",
            past: "%s ago",
            s: "a few seconds",
            m: "a minute",
            mm: "%d minutes",
            h: "an hour",
            hh: "%d hours",
            d: "a day",
            dd: "%d days",
            M: "a month",
            MM: "%d months",
            y: "a year",
            yy: "%d years"
        },
        ordinalParse: /\d{1,2}(st|nd|rd|th)/,
        ordinal: function(a) {
            var b = a % 10
              , c = 1 === ~~(a % 100 / 10) ? "th" : 1 === b ? "st" : 2 === b ? "nd" : 3 === b ? "rd" : "th";
            return a + c
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("en-ca", {
        months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
        monthsShort: "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
        weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
        weekdaysShort: "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
        weekdaysMin: "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
        longDateFormat: {
            LT: "h:mm A",
            LTS: "h:mm:ss A",
            L: "YYYY-MM-DD",
            LL: "D MMMM, YYYY",
            LLL: "D MMMM, YYYY h:mm A",
            LLLL: "dddd, D MMMM, YYYY h:mm A"
        },
        calendar: {
            sameDay: "[Today at] LT",
            nextDay: "[Tomorrow at] LT",
            nextWeek: "dddd [at] LT",
            lastDay: "[Yesterday at] LT",
            lastWeek: "[Last] dddd [at] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "in %s",
            past: "%s ago",
            s: "a few seconds",
            m: "a minute",
            mm: "%d minutes",
            h: "an hour",
            hh: "%d hours",
            d: "a day",
            dd: "%d days",
            M: "a month",
            MM: "%d months",
            y: "a year",
            yy: "%d years"
        },
        ordinalParse: /\d{1,2}(st|nd|rd|th)/,
        ordinal: function(a) {
            var b = a % 10
              , c = 1 === ~~(a % 100 / 10) ? "th" : 1 === b ? "st" : 2 === b ? "nd" : 3 === b ? "rd" : "th";
            return a + c
        }
    }),
    uf.defineLocale("en-gb", {
        months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
        monthsShort: "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
        weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
        weekdaysShort: "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
        weekdaysMin: "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd, D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Today at] LT",
            nextDay: "[Tomorrow at] LT",
            nextWeek: "dddd [at] LT",
            lastDay: "[Yesterday at] LT",
            lastWeek: "[Last] dddd [at] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "in %s",
            past: "%s ago",
            s: "a few seconds",
            m: "a minute",
            mm: "%d minutes",
            h: "an hour",
            hh: "%d hours",
            d: "a day",
            dd: "%d days",
            M: "a month",
            MM: "%d months",
            y: "a year",
            yy: "%d years"
        },
        ordinalParse: /\d{1,2}(st|nd|rd|th)/,
        ordinal: function(a) {
            var b = a % 10
              , c = 1 === ~~(a % 100 / 10) ? "th" : 1 === b ? "st" : 2 === b ? "nd" : 3 === b ? "rd" : "th";
            return a + c
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("eo", {
        months: "januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),
        monthsShort: "jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),
        weekdays: "Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato".split("_"),
        weekdaysShort: "Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab".split("_"),
        weekdaysMin: "Di_Lu_Ma_Me_Ĵa_Ve_Sa".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "YYYY-MM-DD",
            LL: "D[-an de] MMMM, YYYY",
            LLL: "D[-an de] MMMM, YYYY HH:mm",
            LLLL: "dddd, [la] D[-an de] MMMM, YYYY HH:mm"
        },
        meridiemParse: /[ap]\.t\.m/i,
        isPM: function(a) {
            return "p" === a.charAt(0).toLowerCase()
        },
        meridiem: function(a, b, c) {
            return a > 11 ? c ? "p.t.m." : "P.T.M." : c ? "a.t.m." : "A.T.M."
        },
        calendar: {
            sameDay: "[Hodiaŭ je] LT",
            nextDay: "[Morgaŭ je] LT",
            nextWeek: "dddd [je] LT",
            lastDay: "[Hieraŭ je] LT",
            lastWeek: "[pasinta] dddd [je] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "je %s",
            past: "antaŭ %s",
            s: "sekundoj",
            m: "minuto",
            mm: "%d minutoj",
            h: "horo",
            hh: "%d horoj",
            d: "tago",
            dd: "%d tagoj",
            M: "monato",
            MM: "%d monatoj",
            y: "jaro",
            yy: "%d jaroj"
        },
        ordinalParse: /\d{1,2}a/,
        ordinal: "%da",
        week: {
            dow: 1,
            doy: 7
        }
    }),
    "Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"))
      , Lf = "Ene_Feb_Mar_Abr_May_Jun_Jul_Ago_Sep_Oct_Nov_Dic".split("_")
      , Mf = (uf.defineLocale("es", {
        months: "Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),
        monthsShort: function(a, b) {
            return /-MMM-/.test(b) ? Lf[a.month()] : Kf[a.month()]
        },
        weekdays: "Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),
        weekdaysShort: "Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),
        weekdaysMin: "Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D [de] MMMM [de] YYYY",
            LLL: "D [de] MMMM [de] YYYY H:mm",
            LLLL: "dddd, D [de] MMMM [de] YYYY H:mm"
        },
        calendar: {
            sameDay: function() {
                return "[hoy a la" + (1 !== this.hours() ? "s" : "") + "] LT"
            },
            nextDay: function() {
                return "[mañana a la" + (1 !== this.hours() ? "s" : "") + "] LT"
            },
            nextWeek: function() {
                return "dddd [a la" + (1 !== this.hours() ? "s" : "") + "] LT"
            },
            lastDay: function() {
                return "[ayer a la" + (1 !== this.hours() ? "s" : "") + "] LT"
            },
            lastWeek: function() {
                return "[el] dddd [pasado a la" + (1 !== this.hours() ? "s" : "") + "] LT"
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "en %s",
            past: "hace %s",
            s: "unos segundos",
            m: "un minuto",
            mm: "%d minutos",
            h: "una hora",
            hh: "%d horas",
            d: "un día",
            dd: "%d días",
            M: "un mes",
            MM: "%d meses",
            y: "un año",
            yy: "%d años"
        },
        ordinalParse: /\d{1,2}º/,
        ordinal: "%dº",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("et", {
        months: "jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),
        monthsShort: "jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),
        weekdays: "pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),
        weekdaysShort: "P_E_T_K_N_R_L".split("_"),
        weekdaysMin: "P_E_T_K_N_R_L".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY H:mm",
            LLLL: "dddd, D. MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: "[Täna,] LT",
            nextDay: "[Homme,] LT",
            nextWeek: "[Järgmine] dddd LT",
            lastDay: "[Eile,] LT",
            lastWeek: "[Eelmine] dddd LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s pärast",
            past: "%s tagasi",
            s: Vc,
            m: Vc,
            mm: Vc,
            h: Vc,
            hh: Vc,
            d: Vc,
            dd: "%d päeva",
            M: Vc,
            MM: Vc,
            y: Vc,
            yy: Vc
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("eu", {
        months: "urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),
        monthsShort: "urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),
        weekdays: "igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),
        weekdaysShort: "ig._al._ar._az._og._ol._lr.".split("_"),
        weekdaysMin: "ig_al_ar_az_og_ol_lr".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "YYYY-MM-DD",
            LL: "YYYY[ko] MMMM[ren] D[a]",
            LLL: "YYYY[ko] MMMM[ren] D[a] HH:mm",
            LLLL: "dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",
            l: "YYYY-M-D",
            ll: "YYYY[ko] MMM D[a]",
            lll: "YYYY[ko] MMM D[a] HH:mm",
            llll: "ddd, YYYY[ko] MMM D[a] HH:mm"
        },
        calendar: {
            sameDay: "[gaur] LT[etan]",
            nextDay: "[bihar] LT[etan]",
            nextWeek: "dddd LT[etan]",
            lastDay: "[atzo] LT[etan]",
            lastWeek: "[aurreko] dddd LT[etan]",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s barru",
            past: "duela %s",
            s: "segundo batzuk",
            m: "minutu bat",
            mm: "%d minutu",
            h: "ordu bat",
            hh: "%d ordu",
            d: "egun bat",
            dd: "%d egun",
            M: "hilabete bat",
            MM: "%d hilabete",
            y: "urte bat",
            yy: "%d urte"
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 7
        }
    }),
    {
        1: "۱",
        2: "۲",
        3: "۳",
        4: "۴",
        5: "۵",
        6: "۶",
        7: "۷",
        8: "۸",
        9: "۹",
        0: "۰"
    })
      , Nf = {
        "۱": "1",
        "۲": "2",
        "۳": "3",
        "۴": "4",
        "۵": "5",
        "۶": "6",
        "۷": "7",
        "۸": "8",
        "۹": "9",
        "۰": "0"
    }
      , Of = (uf.defineLocale("fa", {
        months: "ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),
        monthsShort: "ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),
        weekdays: "یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),
        weekdaysShort: "یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),
        weekdaysMin: "ی_د_س_چ_پ_ج_ش".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd, D MMMM YYYY HH:mm"
        },
        meridiemParse: /قبل از ظهر|بعد از ظهر/,
        isPM: function(a) {
            return /بعد از ظهر/.test(a)
        },
        meridiem: function(a, b, c) {
            return 12 > a ? "قبل از ظهر" : "بعد از ظهر"
        },
        calendar: {
            sameDay: "[امروز ساعت] LT",
            nextDay: "[فردا ساعت] LT",
            nextWeek: "dddd [ساعت] LT",
            lastDay: "[دیروز ساعت] LT",
            lastWeek: "dddd [پیش] [ساعت] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "در %s",
            past: "%s پیش",
            s: "چندین ثانیه",
            m: "یک دقیقه",
            mm: "%d دقیقه",
            h: "یک ساعت",
            hh: "%d ساعت",
            d: "یک روز",
            dd: "%d روز",
            M: "یک ماه",
            MM: "%d ماه",
            y: "یک سال",
            yy: "%d سال"
        },
        preparse: function(a) {
            return a.replace(/[۰-۹]/g, function(a) {
                return Nf[a]
            }).replace(/،/g, ",")
        },
        postformat: function(a) {
            return a.replace(/\d/g, function(a) {
                return Mf[a]
            }).replace(/,/g, "،")
        },
        ordinalParse: /\d{1,2}م/,
        ordinal: "%dم",
        week: {
            dow: 6,
            doy: 12
        }
    }),
    "nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "))
      , Pf = ["nolla", "yhden", "kahden", "kolmen", "neljän", "viiden", "kuuden", Of[7], Of[8], Of[9]]
      , Qf = (uf.defineLocale("fi", {
        months: "tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),
        monthsShort: "tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),
        weekdays: "sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),
        weekdaysShort: "su_ma_ti_ke_to_pe_la".split("_"),
        weekdaysMin: "su_ma_ti_ke_to_pe_la".split("_"),
        longDateFormat: {
            LT: "HH.mm",
            LTS: "HH.mm.ss",
            L: "DD.MM.YYYY",
            LL: "Do MMMM[ta] YYYY",
            LLL: "Do MMMM[ta] YYYY, [klo] HH.mm",
            LLLL: "dddd, Do MMMM[ta] YYYY, [klo] HH.mm",
            l: "D.M.YYYY",
            ll: "Do MMM YYYY",
            lll: "Do MMM YYYY, [klo] HH.mm",
            llll: "ddd, Do MMM YYYY, [klo] HH.mm"
        },
        calendar: {
            sameDay: "[tänään] [klo] LT",
            nextDay: "[huomenna] [klo] LT",
            nextWeek: "dddd [klo] LT",
            lastDay: "[eilen] [klo] LT",
            lastWeek: "[viime] dddd[na] [klo] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s päästä",
            past: "%s sitten",
            s: Wc,
            m: Wc,
            mm: Wc,
            h: Wc,
            hh: Wc,
            d: Wc,
            dd: Wc,
            M: Wc,
            MM: Wc,
            y: Wc,
            yy: Wc
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("fo", {
        months: "januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),
        monthsShort: "jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),
        weekdays: "sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),
        weekdaysShort: "sun_mán_týs_mik_hós_frí_ley".split("_"),
        weekdaysMin: "su_má_tý_mi_hó_fr_le".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D. MMMM, YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Í dag kl.] LT",
            nextDay: "[Í morgin kl.] LT",
            nextWeek: "dddd [kl.] LT",
            lastDay: "[Í gjár kl.] LT",
            lastWeek: "[síðstu] dddd [kl] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "um %s",
            past: "%s síðani",
            s: "fá sekund",
            m: "ein minutt",
            mm: "%d minuttir",
            h: "ein tími",
            hh: "%d tímar",
            d: "ein dagur",
            dd: "%d dagar",
            M: "ein mánaði",
            MM: "%d mánaðir",
            y: "eitt ár",
            yy: "%d ár"
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("fr-ca", {
        months: "janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),
        monthsShort: "janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),
        weekdays: "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),
        weekdaysShort: "dim._lun._mar._mer._jeu._ven._sam.".split("_"),
        weekdaysMin: "Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "YYYY-MM-DD",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Aujourd'hui à] LT",
            nextDay: "[Demain à] LT",
            nextWeek: "dddd [à] LT",
            lastDay: "[Hier à] LT",
            lastWeek: "dddd [dernier à] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "dans %s",
            past: "il y a %s",
            s: "quelques secondes",
            m: "une minute",
            mm: "%d minutes",
            h: "une heure",
            hh: "%d heures",
            d: "un jour",
            dd: "%d jours",
            M: "un mois",
            MM: "%d mois",
            y: "un an",
            yy: "%d ans"
        },
        ordinalParse: /\d{1,2}(er|e)/,
        ordinal: function(a) {
            return a + (1 === a ? "er" : "e")
        }
    }),
    uf.defineLocale("fr", {
        months: "janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),
        monthsShort: "janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),
        weekdays: "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),
        weekdaysShort: "dim._lun._mar._mer._jeu._ven._sam.".split("_"),
        weekdaysMin: "Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Aujourd'hui à] LT",
            nextDay: "[Demain à] LT",
            nextWeek: "dddd [à] LT",
            lastDay: "[Hier à] LT",
            lastWeek: "dddd [dernier à] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "dans %s",
            past: "il y a %s",
            s: "quelques secondes",
            m: "une minute",
            mm: "%d minutes",
            h: "une heure",
            hh: "%d heures",
            d: "un jour",
            dd: "%d jours",
            M: "un mois",
            MM: "%d mois",
            y: "un an",
            yy: "%d ans"
        },
        ordinalParse: /\d{1,2}(er|)/,
        ordinal: function(a) {
            return a + (1 === a ? "er" : "")
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    "jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"))
      , Rf = "jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_")
      , Sf = (uf.defineLocale("fy", {
        months: "jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),
        monthsShort: function(a, b) {
            return /-MMM-/.test(b) ? Rf[a.month()] : Qf[a.month()]
        },
        weekdays: "snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),
        weekdaysShort: "si._mo._ti._wo._to._fr._so.".split("_"),
        weekdaysMin: "Si_Mo_Ti_Wo_To_Fr_So".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD-MM-YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[hjoed om] LT",
            nextDay: "[moarn om] LT",
            nextWeek: "dddd [om] LT",
            lastDay: "[juster om] LT",
            lastWeek: "[ôfrûne] dddd [om] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "oer %s",
            past: "%s lyn",
            s: "in pear sekonden",
            m: "ien minút",
            mm: "%d minuten",
            h: "ien oere",
            hh: "%d oeren",
            d: "ien dei",
            dd: "%d dagen",
            M: "ien moanne",
            MM: "%d moannen",
            y: "ien jier",
            yy: "%d jierren"
        },
        ordinalParse: /\d{1,2}(ste|de)/,
        ordinal: function(a) {
            return a + (1 === a || 8 === a || a >= 20 ? "ste" : "de")
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("gl", {
        months: "Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro".split("_"),
        monthsShort: "Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),
        weekdays: "Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),
        weekdaysShort: "Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),
        weekdaysMin: "Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY H:mm",
            LLLL: "dddd D MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: function() {
                return "[hoxe " + (1 !== this.hours() ? "ás" : "á") + "] LT"
            },
            nextDay: function() {
                return "[mañá " + (1 !== this.hours() ? "ás" : "á") + "] LT"
            },
            nextWeek: function() {
                return "dddd [" + (1 !== this.hours() ? "ás" : "a") + "] LT"
            },
            lastDay: function() {
                return "[onte " + (1 !== this.hours() ? "á" : "a") + "] LT"
            },
            lastWeek: function() {
                return "[o] dddd [pasado " + (1 !== this.hours() ? "ás" : "a") + "] LT"
            },
            sameElse: "L"
        },
        relativeTime: {
            future: function(a) {
                return "uns segundos" === a ? "nuns segundos" : "en " + a
            },
            past: "hai %s",
            s: "uns segundos",
            m: "un minuto",
            mm: "%d minutos",
            h: "unha hora",
            hh: "%d horas",
            d: "un día",
            dd: "%d días",
            M: "un mes",
            MM: "%d meses",
            y: "un ano",
            yy: "%d anos"
        },
        ordinalParse: /\d{1,2}º/,
        ordinal: "%dº",
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("he", {
        months: "ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),
        monthsShort: "ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),
        weekdays: "ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),
        weekdaysShort: "א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),
        weekdaysMin: "א_ב_ג_ד_ה_ו_ש".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D [ב]MMMM YYYY",
            LLL: "D [ב]MMMM YYYY HH:mm",
            LLLL: "dddd, D [ב]MMMM YYYY HH:mm",
            l: "D/M/YYYY",
            ll: "D MMM YYYY",
            lll: "D MMM YYYY HH:mm",
            llll: "ddd, D MMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[היום ב־]LT",
            nextDay: "[מחר ב־]LT",
            nextWeek: "dddd [בשעה] LT",
            lastDay: "[אתמול ב־]LT",
            lastWeek: "[ביום] dddd [האחרון בשעה] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "בעוד %s",
            past: "לפני %s",
            s: "מספר שניות",
            m: "דקה",
            mm: "%d דקות",
            h: "שעה",
            hh: function(a) {
                return 2 === a ? "שעתיים" : a + " שעות"
            },
            d: "יום",
            dd: function(a) {
                return 2 === a ? "יומיים" : a + " ימים"
            },
            M: "חודש",
            MM: function(a) {
                return 2 === a ? "חודשיים" : a + " חודשים"
            },
            y: "שנה",
            yy: function(a) {
                return 2 === a ? "שנתיים" : a % 10 === 0 && 10 !== a ? a + " שנה" : a + " שנים"
            }
        }
    }),
    {
        1: "१",
        2: "२",
        3: "३",
        4: "४",
        5: "५",
        6: "६",
        7: "७",
        8: "८",
        9: "९",
        0: "०"
    })
      , Tf = {
        "१": "1",
        "२": "2",
        "३": "3",
        "४": "4",
        "५": "5",
        "६": "6",
        "७": "7",
        "८": "8",
        "९": "9",
        "०": "0"
    }
      , Uf = (uf.defineLocale("hi", {
        months: "जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),
        monthsShort: "जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),
        weekdays: "रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),
        weekdaysShort: "रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),
        weekdaysMin: "र_सो_मं_बु_गु_शु_श".split("_"),
        longDateFormat: {
            LT: "A h:mm बजे",
            LTS: "A h:mm:ss बजे",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY, A h:mm बजे",
            LLLL: "dddd, D MMMM YYYY, A h:mm बजे"
        },
        calendar: {
            sameDay: "[आज] LT",
            nextDay: "[कल] LT",
            nextWeek: "dddd, LT",
            lastDay: "[कल] LT",
            lastWeek: "[पिछले] dddd, LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s में",
            past: "%s पहले",
            s: "कुछ ही क्षण",
            m: "एक मिनट",
            mm: "%d मिनट",
            h: "एक घंटा",
            hh: "%d घंटे",
            d: "एक दिन",
            dd: "%d दिन",
            M: "एक महीने",
            MM: "%d महीने",
            y: "एक वर्ष",
            yy: "%d वर्ष"
        },
        preparse: function(a) {
            return a.replace(/[१२३४५६७८९०]/g, function(a) {
                return Tf[a]
            })
        },
        postformat: function(a) {
            return a.replace(/\d/g, function(a) {
                return Sf[a]
            })
        },
        meridiemParse: /रात|सुबह|दोपहर|शाम/,
        meridiemHour: function(a, b) {
            return 12 === a && (a = 0),
            "रात" === b ? 4 > a ? a : a + 12 : "सुबह" === b ? a : "दोपहर" === b ? a >= 10 ? a : a + 12 : "शाम" === b ? a + 12 : void 0
        },
        meridiem: function(a, b, c) {
            return 4 > a ? "रात" : 10 > a ? "सुबह" : 17 > a ? "दोपहर" : 20 > a ? "शाम" : "रात"
        },
        week: {
            dow: 0,
            doy: 6
        }
    }),
    uf.defineLocale("hr", {
        months: "siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),
        monthsShort: "sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),
        weekdays: "nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),
        weekdaysShort: "ned._pon._uto._sri._čet._pet._sub.".split("_"),
        weekdaysMin: "ne_po_ut_sr_če_pe_su".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "DD. MM. YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY H:mm",
            LLLL: "dddd, D. MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: "[danas u] LT",
            nextDay: "[sutra u] LT",
            nextWeek: function() {
                switch (this.day()) {
                case 0:
                    return "[u] [nedjelju] [u] LT";
                case 3:
                    return "[u] [srijedu] [u] LT";
                case 6:
                    return "[u] [subotu] [u] LT";
                case 1:
                case 2:
                case 4:
                case 5:
                    return "[u] dddd [u] LT"
                }
            },
            lastDay: "[jučer u] LT",
            lastWeek: function() {
                switch (this.day()) {
                case 0:
                case 3:
                    return "[prošlu] dddd [u] LT";
                case 6:
                    return "[prošle] [subote] [u] LT";
                case 1:
                case 2:
                case 4:
                case 5:
                    return "[prošli] dddd [u] LT"
                }
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "za %s",
            past: "prije %s",
            s: "par sekundi",
            m: Yc,
            mm: Yc,
            h: Yc,
            hh: Yc,
            d: "dan",
            dd: Yc,
            M: "mjesec",
            MM: Yc,
            y: "godinu",
            yy: Yc
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 7
        }
    }),
    "vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" "))
      , Vf = (uf.defineLocale("hu", {
        months: "január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),
        monthsShort: "jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),
        weekdays: "vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),
        weekdaysShort: "vas_hét_kedd_sze_csüt_pén_szo".split("_"),
        weekdaysMin: "v_h_k_sze_cs_p_szo".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "YYYY.MM.DD.",
            LL: "YYYY. MMMM D.",
            LLL: "YYYY. MMMM D. H:mm",
            LLLL: "YYYY. MMMM D., dddd H:mm"
        },
        meridiemParse: /de|du/i,
        isPM: function(a) {
            return "u" === a.charAt(1).toLowerCase()
        },
        meridiem: function(a, b, c) {
            return 12 > a ? c === !0 ? "de" : "DE" : c === !0 ? "du" : "DU"
        },
        calendar: {
            sameDay: "[ma] LT[-kor]",
            nextDay: "[holnap] LT[-kor]",
            nextWeek: function() {
                return $c.call(this, !0)
            },
            lastDay: "[tegnap] LT[-kor]",
            lastWeek: function() {
                return $c.call(this, !1)
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "%s múlva",
            past: "%s",
            s: Zc,
            m: Zc,
            mm: Zc,
            h: Zc,
            hh: Zc,
            d: Zc,
            dd: Zc,
            M: Zc,
            MM: Zc,
            y: Zc,
            yy: Zc
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("hy-am", {
        months: _c,
        monthsShort: ad,
        weekdays: bd,
        weekdaysShort: "կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),
        weekdaysMin: "կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D MMMM YYYY թ.",
            LLL: "D MMMM YYYY թ., HH:mm",
            LLLL: "dddd, D MMMM YYYY թ., HH:mm"
        },
        calendar: {
            sameDay: "[այսօր] LT",
            nextDay: "[վաղը] LT",
            lastDay: "[երեկ] LT",
            nextWeek: function() {
                return "dddd [օրը ժամը] LT"
            },
            lastWeek: function() {
                return "[անցած] dddd [օրը ժամը] LT"
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "%s հետո",
            past: "%s առաջ",
            s: "մի քանի վայրկյան",
            m: "րոպե",
            mm: "%d րոպե",
            h: "ժամ",
            hh: "%d ժամ",
            d: "օր",
            dd: "%d օր",
            M: "ամիս",
            MM: "%d ամիս",
            y: "տարի",
            yy: "%d տարի"
        },
        meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
        isPM: function(a) {
            return /^(ցերեկվա|երեկոյան)$/.test(a)
        },
        meridiem: function(a) {
            return 4 > a ? "գիշերվա" : 12 > a ? "առավոտվա" : 17 > a ? "ցերեկվա" : "երեկոյան"
        },
        ordinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
        ordinal: function(a, b) {
            switch (b) {
            case "DDD":
            case "w":
            case "W":
            case "DDDo":
                return 1 === a ? a + "-ին" : a + "-րդ";
            default:
                return a
            }
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("id", {
        months: "Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),
        monthsShort: "Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),
        weekdays: "Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),
        weekdaysShort: "Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),
        weekdaysMin: "Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),
        longDateFormat: {
            LT: "HH.mm",
            LTS: "HH.mm.ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY [pukul] HH.mm",
            LLLL: "dddd, D MMMM YYYY [pukul] HH.mm"
        },
        meridiemParse: /pagi|siang|sore|malam/,
        meridiemHour: function(a, b) {
            return 12 === a && (a = 0),
            "pagi" === b ? a : "siang" === b ? a >= 11 ? a : a + 12 : "sore" === b || "malam" === b ? a + 12 : void 0
        },
        meridiem: function(a, b, c) {
            return 11 > a ? "pagi" : 15 > a ? "siang" : 19 > a ? "sore" : "malam"
        },
        calendar: {
            sameDay: "[Hari ini pukul] LT",
            nextDay: "[Besok pukul] LT",
            nextWeek: "dddd [pukul] LT",
            lastDay: "[Kemarin pukul] LT",
            lastWeek: "dddd [lalu pukul] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "dalam %s",
            past: "%s yang lalu",
            s: "beberapa detik",
            m: "semenit",
            mm: "%d menit",
            h: "sejam",
            hh: "%d jam",
            d: "sehari",
            dd: "%d hari",
            M: "sebulan",
            MM: "%d bulan",
            y: "setahun",
            yy: "%d tahun"
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("is", {
        months: "janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),
        monthsShort: "jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),
        weekdays: "sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),
        weekdaysShort: "sun_mán_þri_mið_fim_fös_lau".split("_"),
        weekdaysMin: "Su_Má_Þr_Mi_Fi_Fö_La".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY [kl.] H:mm",
            LLLL: "dddd, D. MMMM YYYY [kl.] H:mm"
        },
        calendar: {
            sameDay: "[í dag kl.] LT",
            nextDay: "[á morgun kl.] LT",
            nextWeek: "dddd [kl.] LT",
            lastDay: "[í gær kl.] LT",
            lastWeek: "[síðasta] dddd [kl.] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "eftir %s",
            past: "fyrir %s síðan",
            s: dd,
            m: dd,
            mm: dd,
            h: "klukkustund",
            hh: dd,
            d: dd,
            dd: dd,
            M: dd,
            MM: dd,
            y: dd,
            yy: dd
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("it", {
        months: "gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),
        monthsShort: "gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),
        weekdays: "Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),
        weekdaysShort: "Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),
        weekdaysMin: "D_L_Ma_Me_G_V_S".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd, D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Oggi alle] LT",
            nextDay: "[Domani alle] LT",
            nextWeek: "dddd [alle] LT",
            lastDay: "[Ieri alle] LT",
            lastWeek: function() {
                switch (this.day()) {
                case 0:
                    return "[la scorsa] dddd [alle] LT";
                default:
                    return "[lo scorso] dddd [alle] LT"
                }
            },
            sameElse: "L"
        },
        relativeTime: {
            future: function(a) {
                return (/^[0-9].+$/.test(a) ? "tra" : "in") + " " + a
            },
            past: "%s fa",
            s: "alcuni secondi",
            m: "un minuto",
            mm: "%d minuti",
            h: "un'ora",
            hh: "%d ore",
            d: "un giorno",
            dd: "%d giorni",
            M: "un mese",
            MM: "%d mesi",
            y: "un anno",
            yy: "%d anni"
        },
        ordinalParse: /\d{1,2}º/,
        ordinal: "%dº",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("ja", {
        months: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
        monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
        weekdays: "日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),
        weekdaysShort: "日_月_火_水_木_金_土".split("_"),
        weekdaysMin: "日_月_火_水_木_金_土".split("_"),
        longDateFormat: {
            LT: "Ah時m分",
            LTS: "Ah時m分s秒",
            L: "YYYY/MM/DD",
            LL: "YYYY年M月D日",
            LLL: "YYYY年M月D日Ah時m分",
            LLLL: "YYYY年M月D日Ah時m分 dddd"
        },
        meridiemParse: /午前|午後/i,
        isPM: function(a) {
            return "午後" === a
        },
        meridiem: function(a, b, c) {
            return 12 > a ? "午前" : "午後"
        },
        calendar: {
            sameDay: "[今日] LT",
            nextDay: "[明日] LT",
            nextWeek: "[来週]dddd LT",
            lastDay: "[昨日] LT",
            lastWeek: "[前週]dddd LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s後",
            past: "%s前",
            s: "数秒",
            m: "1分",
            mm: "%d分",
            h: "1時間",
            hh: "%d時間",
            d: "1日",
            dd: "%d日",
            M: "1ヶ月",
            MM: "%dヶ月",
            y: "1年",
            yy: "%d年"
        }
    }),
    uf.defineLocale("jv", {
        months: "Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),
        monthsShort: "Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),
        weekdays: "Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),
        weekdaysShort: "Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),
        weekdaysMin: "Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),
        longDateFormat: {
            LT: "HH.mm",
            LTS: "HH.mm.ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY [pukul] HH.mm",
            LLLL: "dddd, D MMMM YYYY [pukul] HH.mm"
        },
        meridiemParse: /enjing|siyang|sonten|ndalu/,
        meridiemHour: function(a, b) {
            return 12 === a && (a = 0),
            "enjing" === b ? a : "siyang" === b ? a >= 11 ? a : a + 12 : "sonten" === b || "ndalu" === b ? a + 12 : void 0
        },
        meridiem: function(a, b, c) {
            return 11 > a ? "enjing" : 15 > a ? "siyang" : 19 > a ? "sonten" : "ndalu"
        },
        calendar: {
            sameDay: "[Dinten puniko pukul] LT",
            nextDay: "[Mbenjang pukul] LT",
            nextWeek: "dddd [pukul] LT",
            lastDay: "[Kala wingi pukul] LT",
            lastWeek: "dddd [kepengker pukul] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "wonten ing %s",
            past: "%s ingkang kepengker",
            s: "sawetawis detik",
            m: "setunggal menit",
            mm: "%d menit",
            h: "setunggal jam",
            hh: "%d jam",
            d: "sedinten",
            dd: "%d dinten",
            M: "sewulan",
            MM: "%d wulan",
            y: "setaun",
            yy: "%d taun"
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("ka", {
        months: ed,
        monthsShort: "იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),
        weekdays: fd,
        weekdaysShort: "კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),
        weekdaysMin: "კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),
        longDateFormat: {
            LT: "h:mm A",
            LTS: "h:mm:ss A",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY h:mm A",
            LLLL: "dddd, D MMMM YYYY h:mm A"
        },
        calendar: {
            sameDay: "[დღეს] LT[-ზე]",
            nextDay: "[ხვალ] LT[-ზე]",
            lastDay: "[გუშინ] LT[-ზე]",
            nextWeek: "[შემდეგ] dddd LT[-ზე]",
            lastWeek: "[წინა] dddd LT-ზე",
            sameElse: "L"
        },
        relativeTime: {
            future: function(a) {
                return /(წამი|წუთი|საათი|წელი)/.test(a) ? a.replace(/ი$/, "ში") : a + "ში"
            },
            past: function(a) {
                return /(წამი|წუთი|საათი|დღე|თვე)/.test(a) ? a.replace(/(ი|ე)$/, "ის წინ") : /წელი/.test(a) ? a.replace(/წელი$/, "წლის წინ") : void 0
            },
            s: "რამდენიმე წამი",
            m: "წუთი",
            mm: "%d წუთი",
            h: "საათი",
            hh: "%d საათი",
            d: "დღე",
            dd: "%d დღე",
            M: "თვე",
            MM: "%d თვე",
            y: "წელი",
            yy: "%d წელი"
        },
        ordinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
        ordinal: function(a) {
            return 0 === a ? a : 1 === a ? a + "-ლი" : 20 > a || 100 >= a && a % 20 === 0 || a % 100 === 0 ? "მე-" + a : a + "-ე"
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("km", {
        months: "មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),
        monthsShort: "មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),
        weekdays: "អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),
        weekdaysShort: "អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),
        weekdaysMin: "អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd, D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[ថ្ងៃនៈ ម៉ោង] LT",
            nextDay: "[ស្អែក ម៉ោង] LT",
            nextWeek: "dddd [ម៉ោង] LT",
            lastDay: "[ម្សិលមិញ ម៉ោង] LT",
            lastWeek: "dddd [សប្តាហ៍មុន] [ម៉ោង] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%sទៀត",
            past: "%sមុន",
            s: "ប៉ុន្មានវិនាទី",
            m: "មួយនាទី",
            mm: "%d នាទី",
            h: "មួយម៉ោង",
            hh: "%d ម៉ោង",
            d: "មួយថ្ងៃ",
            dd: "%d ថ្ងៃ",
            M: "មួយខែ",
            MM: "%d ខែ",
            y: "មួយឆ្នាំ",
            yy: "%d ឆ្នាំ"
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("ko", {
        months: "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),
        monthsShort: "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),
        weekdays: "일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),
        weekdaysShort: "일_월_화_수_목_금_토".split("_"),
        weekdaysMin: "일_월_화_수_목_금_토".split("_"),
        longDateFormat: {
            LT: "A h시 m분",
            LTS: "A h시 m분 s초",
            L: "YYYY.MM.DD",
            LL: "YYYY년 MMMM D일",
            LLL: "YYYY년 MMMM D일 A h시 m분",
            LLLL: "YYYY년 MMMM D일 dddd A h시 m분"
        },
        calendar: {
            sameDay: "오늘 LT",
            nextDay: "내일 LT",
            nextWeek: "dddd LT",
            lastDay: "어제 LT",
            lastWeek: "지난주 dddd LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s 후",
            past: "%s 전",
            s: "몇초",
            ss: "%d초",
            m: "일분",
            mm: "%d분",
            h: "한시간",
            hh: "%d시간",
            d: "하루",
            dd: "%d일",
            M: "한달",
            MM: "%d달",
            y: "일년",
            yy: "%d년"
        },
        ordinalParse: /\d{1,2}일/,
        ordinal: "%d일",
        meridiemParse: /오전|오후/,
        isPM: function(a) {
            return "오후" === a
        },
        meridiem: function(a, b, c) {
            return 12 > a ? "오전" : "오후"
        }
    }),
    uf.defineLocale("lb", {
        months: "Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),
        monthsShort: "Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),
        weekdays: "Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),
        weekdaysShort: "So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),
        weekdaysMin: "So_Mé_Dë_Më_Do_Fr_Sa".split("_"),
        longDateFormat: {
            LT: "H:mm [Auer]",
            LTS: "H:mm:ss [Auer]",
            L: "DD.MM.YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY H:mm [Auer]",
            LLLL: "dddd, D. MMMM YYYY H:mm [Auer]"
        },
        calendar: {
            sameDay: "[Haut um] LT",
            sameElse: "L",
            nextDay: "[Muer um] LT",
            nextWeek: "dddd [um] LT",
            lastDay: "[Gëschter um] LT",
            lastWeek: function() {
                switch (this.day()) {
                case 2:
                case 4:
                    return "[Leschten] dddd [um] LT";
                default:
                    return "[Leschte] dddd [um] LT"
                }
            }
        },
        relativeTime: {
            future: hd,
            past: id,
            s: "e puer Sekonnen",
            m: gd,
            mm: "%d Minutten",
            h: gd,
            hh: "%d Stonnen",
            d: gd,
            dd: "%d Deeg",
            M: gd,
            MM: "%d Méint",
            y: gd,
            yy: "%d Joer"
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    {
        m: "minutė_minutės_minutę",
        mm: "minutės_minučių_minutes",
        h: "valanda_valandos_valandą",
        hh: "valandos_valandų_valandas",
        d: "diena_dienos_dieną",
        dd: "dienos_dienų_dienas",
        M: "mėnuo_mėnesio_mėnesį",
        MM: "mėnesiai_mėnesių_mėnesius",
        y: "metai_metų_metus",
        yy: "metai_metų_metus"
    })
      , Wf = "sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_")
      , Xf = (uf.defineLocale("lt", {
        months: ld,
        monthsShort: "sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),
        weekdays: qd,
        weekdaysShort: "Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),
        weekdaysMin: "S_P_A_T_K_Pn_Š".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "YYYY-MM-DD",
            LL: "YYYY [m.] MMMM D [d.]",
            LLL: "YYYY [m.] MMMM D [d.], HH:mm [val.]",
            LLLL: "YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",
            l: "YYYY-MM-DD",
            ll: "YYYY [m.] MMMM D [d.]",
            lll: "YYYY [m.] MMMM D [d.], HH:mm [val.]",
            llll: "YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"
        },
        calendar: {
            sameDay: "[Šiandien] LT",
            nextDay: "[Rytoj] LT",
            nextWeek: "dddd LT",
            lastDay: "[Vakar] LT",
            lastWeek: "[Praėjusį] dddd LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "po %s",
            past: "prieš %s",
            s: kd,
            m: md,
            mm: pd,
            h: md,
            hh: pd,
            d: md,
            dd: pd,
            M: md,
            MM: pd,
            y: md,
            yy: pd
        },
        ordinalParse: /\d{1,2}-oji/,
        ordinal: function(a) {
            return a + "-oji"
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    {
        m: "minūtes_minūtēm_minūte_minūtes".split("_"),
        mm: "minūtes_minūtēm_minūte_minūtes".split("_"),
        h: "stundas_stundām_stunda_stundas".split("_"),
        hh: "stundas_stundām_stunda_stundas".split("_"),
        d: "dienas_dienām_diena_dienas".split("_"),
        dd: "dienas_dienām_diena_dienas".split("_"),
        M: "mēneša_mēnešiem_mēnesis_mēneši".split("_"),
        MM: "mēneša_mēnešiem_mēnesis_mēneši".split("_"),
        y: "gada_gadiem_gads_gadi".split("_"),
        yy: "gada_gadiem_gads_gadi".split("_")
    })
      , Yf = (uf.defineLocale("lv", {
        months: "janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),
        monthsShort: "jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),
        weekdays: "svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),
        weekdaysShort: "Sv_P_O_T_C_Pk_S".split("_"),
        weekdaysMin: "Sv_P_O_T_C_Pk_S".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD.MM.YYYY.",
            LL: "YYYY. [gada] D. MMMM",
            LLL: "YYYY. [gada] D. MMMM, HH:mm",
            LLLL: "YYYY. [gada] D. MMMM, dddd, HH:mm"
        },
        calendar: {
            sameDay: "[Šodien pulksten] LT",
            nextDay: "[Rīt pulksten] LT",
            nextWeek: "dddd [pulksten] LT",
            lastDay: "[Vakar pulksten] LT",
            lastWeek: "[Pagājušā] dddd [pulksten] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "pēc %s",
            past: "pirms %s",
            s: ud,
            m: td,
            mm: sd,
            h: td,
            hh: sd,
            d: td,
            dd: sd,
            M: td,
            MM: sd,
            y: td,
            yy: sd
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    {
        words: {
            m: ["jedan minut", "jednog minuta"],
            mm: ["minut", "minuta", "minuta"],
            h: ["jedan sat", "jednog sata"],
            hh: ["sat", "sata", "sati"],
            dd: ["dan", "dana", "dana"],
            MM: ["mjesec", "mjeseca", "mjeseci"],
            yy: ["godina", "godine", "godina"]
        },
        correctGrammaticalCase: function(a, b) {
            return 1 === a ? b[0] : a >= 2 && 4 >= a ? b[1] : b[2]
        },
        translate: function(a, b, c) {
            var d = Yf.words[c];
            return 1 === c.length ? b ? d[0] : d[1] : a + " " + Yf.correctGrammaticalCase(a, d)
        }
    })
      , Zf = (uf.defineLocale("me", {
        months: ["januar", "februar", "mart", "april", "maj", "jun", "jul", "avgust", "septembar", "oktobar", "novembar", "decembar"],
        monthsShort: ["jan.", "feb.", "mar.", "apr.", "maj", "jun", "jul", "avg.", "sep.", "okt.", "nov.", "dec."],
        weekdays: ["nedjelja", "ponedjeljak", "utorak", "srijeda", "četvrtak", "petak", "subota"],
        weekdaysShort: ["ned.", "pon.", "uto.", "sri.", "čet.", "pet.", "sub."],
        weekdaysMin: ["ne", "po", "ut", "sr", "če", "pe", "su"],
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "DD. MM. YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY H:mm",
            LLLL: "dddd, D. MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: "[danas u] LT",
            nextDay: "[sjutra u] LT",
            nextWeek: function() {
                switch (this.day()) {
                case 0:
                    return "[u] [nedjelju] [u] LT";
                case 3:
                    return "[u] [srijedu] [u] LT";
                case 6:
                    return "[u] [subotu] [u] LT";
                case 1:
                case 2:
                case 4:
                case 5:
                    return "[u] dddd [u] LT"
                }
            },
            lastDay: "[juče u] LT",
            lastWeek: function() {
                var a = ["[prošle] [nedjelje] [u] LT", "[prošlog] [ponedjeljka] [u] LT", "[prošlog] [utorka] [u] LT", "[prošle] [srijede] [u] LT", "[prošlog] [četvrtka] [u] LT", "[prošlog] [petka] [u] LT", "[prošle] [subote] [u] LT"];
                return a[this.day()]
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "za %s",
            past: "prije %s",
            s: "nekoliko sekundi",
            m: Yf.translate,
            mm: Yf.translate,
            h: Yf.translate,
            hh: Yf.translate,
            d: "dan",
            dd: Yf.translate,
            M: "mjesec",
            MM: Yf.translate,
            y: "godinu",
            yy: Yf.translate
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("mk", {
        months: "јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),
        monthsShort: "јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),
        weekdays: "недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),
        weekdaysShort: "нед_пон_вто_сре_чет_пет_саб".split("_"),
        weekdaysMin: "нe_пo_вт_ср_че_пе_сa".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "D.MM.YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY H:mm",
            LLLL: "dddd, D MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: "[Денес во] LT",
            nextDay: "[Утре во] LT",
            nextWeek: "dddd [во] LT",
            lastDay: "[Вчера во] LT",
            lastWeek: function() {
                switch (this.day()) {
                case 0:
                case 3:
                case 6:
                    return "[Во изминатата] dddd [во] LT";
                case 1:
                case 2:
                case 4:
                case 5:
                    return "[Во изминатиот] dddd [во] LT"
                }
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "после %s",
            past: "пред %s",
            s: "неколку секунди",
            m: "минута",
            mm: "%d минути",
            h: "час",
            hh: "%d часа",
            d: "ден",
            dd: "%d дена",
            M: "месец",
            MM: "%d месеци",
            y: "година",
            yy: "%d години"
        },
        ordinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
        ordinal: function(a) {
            var b = a % 10
              , c = a % 100;
            return 0 === a ? a + "-ев" : 0 === c ? a + "-ен" : c > 10 && 20 > c ? a + "-ти" : 1 === b ? a + "-ви" : 2 === b ? a + "-ри" : 7 === b || 8 === b ? a + "-ми" : a + "-ти"
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("ml", {
        months: "ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),
        monthsShort: "ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),
        weekdays: "ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),
        weekdaysShort: "ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),
        weekdaysMin: "ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),
        longDateFormat: {
            LT: "A h:mm -നു",
            LTS: "A h:mm:ss -നു",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY, A h:mm -നു",
            LLLL: "dddd, D MMMM YYYY, A h:mm -നു"
        },
        calendar: {
            sameDay: "[ഇന്ന്] LT",
            nextDay: "[നാളെ] LT",
            nextWeek: "dddd, LT",
            lastDay: "[ഇന്നലെ] LT",
            lastWeek: "[കഴിഞ്ഞ] dddd, LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s കഴിഞ്ഞ്",
            past: "%s മുൻപ്",
            s: "അൽപ നിമിഷങ്ങൾ",
            m: "ഒരു മിനിറ്റ്",
            mm: "%d മിനിറ്റ്",
            h: "ഒരു മണിക്കൂർ",
            hh: "%d മണിക്കൂർ",
            d: "ഒരു ദിവസം",
            dd: "%d ദിവസം",
            M: "ഒരു മാസം",
            MM: "%d മാസം",
            y: "ഒരു വർഷം",
            yy: "%d വർഷം"
        },
        meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
        isPM: function(a) {
            return /^(ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി)$/.test(a)
        },
        meridiem: function(a, b, c) {
            return 4 > a ? "രാത്രി" : 12 > a ? "രാവിലെ" : 17 > a ? "ഉച്ച കഴിഞ്ഞ്" : 20 > a ? "വൈകുന്നേരം" : "രാത്രി"
        }
    }),
    {
        1: "१",
        2: "२",
        3: "३",
        4: "४",
        5: "५",
        6: "६",
        7: "७",
        8: "८",
        9: "९",
        0: "०"
    })
      , $f = {
        "१": "1",
        "२": "2",
        "३": "3",
        "४": "4",
        "५": "5",
        "६": "6",
        "७": "7",
        "८": "8",
        "९": "9",
        "०": "0"
    }
      , _f = (uf.defineLocale("mr", {
        months: "जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),
        monthsShort: "जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),
        weekdays: "रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),
        weekdaysShort: "रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),
        weekdaysMin: "र_सो_मं_बु_गु_शु_श".split("_"),
        longDateFormat: {
            LT: "A h:mm वाजता",
            LTS: "A h:mm:ss वाजता",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY, A h:mm वाजता",
            LLLL: "dddd, D MMMM YYYY, A h:mm वाजता"
        },
        calendar: {
            sameDay: "[आज] LT",
            nextDay: "[उद्या] LT",
            nextWeek: "dddd, LT",
            lastDay: "[काल] LT",
            lastWeek: "[मागील] dddd, LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s नंतर",
            past: "%s पूर्वी",
            s: "सेकंद",
            m: "एक मिनिट",
            mm: "%d मिनिटे",
            h: "एक तास",
            hh: "%d तास",
            d: "एक दिवस",
            dd: "%d दिवस",
            M: "एक महिना",
            MM: "%d महिने",
            y: "एक वर्ष",
            yy: "%d वर्षे"
        },
        preparse: function(a) {
            return a.replace(/[१२३४५६७८९०]/g, function(a) {
                return $f[a]
            })
        },
        postformat: function(a) {
            return a.replace(/\d/g, function(a) {
                return Zf[a]
            })
        },
        meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/,
        meridiemHour: function(a, b) {
            return 12 === a && (a = 0),
            "रात्री" === b ? 4 > a ? a : a + 12 : "सकाळी" === b ? a : "दुपारी" === b ? a >= 10 ? a : a + 12 : "सायंकाळी" === b ? a + 12 : void 0
        },
        meridiem: function(a, b, c) {
            return 4 > a ? "रात्री" : 10 > a ? "सकाळी" : 17 > a ? "दुपारी" : 20 > a ? "सायंकाळी" : "रात्री"
        },
        week: {
            dow: 0,
            doy: 6
        }
    }),
    uf.defineLocale("ms-my", {
        months: "Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),
        monthsShort: "Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),
        weekdays: "Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),
        weekdaysShort: "Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),
        weekdaysMin: "Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),
        longDateFormat: {
            LT: "HH.mm",
            LTS: "HH.mm.ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY [pukul] HH.mm",
            LLLL: "dddd, D MMMM YYYY [pukul] HH.mm"
        },
        meridiemParse: /pagi|tengahari|petang|malam/,
        meridiemHour: function(a, b) {
            return 12 === a && (a = 0),
            "pagi" === b ? a : "tengahari" === b ? a >= 11 ? a : a + 12 : "petang" === b || "malam" === b ? a + 12 : void 0
        },
        meridiem: function(a, b, c) {
            return 11 > a ? "pagi" : 15 > a ? "tengahari" : 19 > a ? "petang" : "malam"
        },
        calendar: {
            sameDay: "[Hari ini pukul] LT",
            nextDay: "[Esok pukul] LT",
            nextWeek: "dddd [pukul] LT",
            lastDay: "[Kelmarin pukul] LT",
            lastWeek: "dddd [lepas pukul] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "dalam %s",
            past: "%s yang lepas",
            s: "beberapa saat",
            m: "seminit",
            mm: "%d minit",
            h: "sejam",
            hh: "%d jam",
            d: "sehari",
            dd: "%d hari",
            M: "sebulan",
            MM: "%d bulan",
            y: "setahun",
            yy: "%d tahun"
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("ms", {
        months: "Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),
        monthsShort: "Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),
        weekdays: "Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),
        weekdaysShort: "Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),
        weekdaysMin: "Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),
        longDateFormat: {
            LT: "HH.mm",
            LTS: "HH.mm.ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY [pukul] HH.mm",
            LLLL: "dddd, D MMMM YYYY [pukul] HH.mm"
        },
        meridiemParse: /pagi|tengahari|petang|malam/,
        meridiemHour: function(a, b) {
            return 12 === a && (a = 0),
            "pagi" === b ? a : "tengahari" === b ? a >= 11 ? a : a + 12 : "petang" === b || "malam" === b ? a + 12 : void 0
        },
        meridiem: function(a, b, c) {
            return 11 > a ? "pagi" : 15 > a ? "tengahari" : 19 > a ? "petang" : "malam"
        },
        calendar: {
            sameDay: "[Hari ini pukul] LT",
            nextDay: "[Esok pukul] LT",
            nextWeek: "dddd [pukul] LT",
            lastDay: "[Kelmarin pukul] LT",
            lastWeek: "dddd [lepas pukul] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "dalam %s",
            past: "%s yang lepas",
            s: "beberapa saat",
            m: "seminit",
            mm: "%d minit",
            h: "sejam",
            hh: "%d jam",
            d: "sehari",
            dd: "%d hari",
            M: "sebulan",
            MM: "%d bulan",
            y: "setahun",
            yy: "%d tahun"
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    {
        1: "၁",
        2: "၂",
        3: "၃",
        4: "၄",
        5: "၅",
        6: "၆",
        7: "၇",
        8: "၈",
        9: "၉",
        0: "၀"
    })
      , ag = {
        "၁": "1",
        "၂": "2",
        "၃": "3",
        "၄": "4",
        "၅": "5",
        "၆": "6",
        "၇": "7",
        "၈": "8",
        "၉": "9",
        "၀": "0"
    }
      , bg = (uf.defineLocale("my", {
        months: "ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),
        monthsShort: "ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),
        weekdays: "တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),
        weekdaysShort: "နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),
        weekdaysMin: "နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[ယနေ.] LT [မှာ]",
            nextDay: "[မနက်ဖြန်] LT [မှာ]",
            nextWeek: "dddd LT [မှာ]",
            lastDay: "[မနေ.က] LT [မှာ]",
            lastWeek: "[ပြီးခဲ့သော] dddd LT [မှာ]",
            sameElse: "L"
        },
        relativeTime: {
            future: "လာမည့် %s မှာ",
            past: "လွန်ခဲ့သော %s က",
            s: "စက္ကန်.အနည်းငယ်",
            m: "တစ်မိနစ်",
            mm: "%d မိနစ်",
            h: "တစ်နာရီ",
            hh: "%d နာရီ",
            d: "တစ်ရက်",
            dd: "%d ရက်",
            M: "တစ်လ",
            MM: "%d လ",
            y: "တစ်နှစ်",
            yy: "%d နှစ်"
        },
        preparse: function(a) {
            return a.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function(a) {
                return ag[a]
            })
        },
        postformat: function(a) {
            return a.replace(/\d/g, function(a) {
                return _f[a]
            })
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("nb", {
        months: "januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),
        monthsShort: "jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),
        weekdays: "søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),
        weekdaysShort: "søn_man_tirs_ons_tors_fre_lør".split("_"),
        weekdaysMin: "sø_ma_ti_on_to_fr_lø".split("_"),
        longDateFormat: {
            LT: "H.mm",
            LTS: "H.mm.ss",
            L: "DD.MM.YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY [kl.] H.mm",
            LLLL: "dddd D. MMMM YYYY [kl.] H.mm"
        },
        calendar: {
            sameDay: "[i dag kl.] LT",
            nextDay: "[i morgen kl.] LT",
            nextWeek: "dddd [kl.] LT",
            lastDay: "[i går kl.] LT",
            lastWeek: "[forrige] dddd [kl.] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "om %s",
            past: "for %s siden",
            s: "noen sekunder",
            m: "ett minutt",
            mm: "%d minutter",
            h: "en time",
            hh: "%d timer",
            d: "en dag",
            dd: "%d dager",
            M: "en måned",
            MM: "%d måneder",
            y: "ett år",
            yy: "%d år"
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    {
        1: "१",
        2: "२",
        3: "३",
        4: "४",
        5: "५",
        6: "६",
        7: "७",
        8: "८",
        9: "९",
        0: "०"
    })
      , cg = {
        "१": "1",
        "२": "2",
        "३": "3",
        "४": "4",
        "५": "5",
        "६": "6",
        "७": "7",
        "८": "8",
        "९": "9",
        "०": "0"
    }
      , dg = (uf.defineLocale("ne", {
        months: "जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),
        monthsShort: "जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),
        weekdays: "आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),
        weekdaysShort: "आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),
        weekdaysMin: "आइ._सो._मङ्_बु._बि._शु._श.".split("_"),
        longDateFormat: {
            LT: "Aको h:mm बजे",
            LTS: "Aको h:mm:ss बजे",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY, Aको h:mm बजे",
            LLLL: "dddd, D MMMM YYYY, Aको h:mm बजे"
        },
        preparse: function(a) {
            return a.replace(/[१२३४५६७८९०]/g, function(a) {
                return cg[a]
            })
        },
        postformat: function(a) {
            return a.replace(/\d/g, function(a) {
                return bg[a]
            })
        },
        meridiemParse: /राती|बिहान|दिउँसो|बेलुका|साँझ|राती/,
        meridiemHour: function(a, b) {
            return 12 === a && (a = 0),
            "राती" === b ? 3 > a ? a : a + 12 : "बिहान" === b ? a : "दिउँसो" === b ? a >= 10 ? a : a + 12 : "बेलुका" === b || "साँझ" === b ? a + 12 : void 0
        },
        meridiem: function(a, b, c) {
            return 3 > a ? "राती" : 10 > a ? "बिहान" : 15 > a ? "दिउँसो" : 18 > a ? "बेलुका" : 20 > a ? "साँझ" : "राती"
        },
        calendar: {
            sameDay: "[आज] LT",
            nextDay: "[भोली] LT",
            nextWeek: "[आउँदो] dddd[,] LT",
            lastDay: "[हिजो] LT",
            lastWeek: "[गएको] dddd[,] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%sमा",
            past: "%s अगाडी",
            s: "केही समय",
            m: "एक मिनेट",
            mm: "%d मिनेट",
            h: "एक घण्टा",
            hh: "%d घण्टा",
            d: "एक दिन",
            dd: "%d दिन",
            M: "एक महिना",
            MM: "%d महिना",
            y: "एक बर्ष",
            yy: "%d बर्ष"
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    "jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"))
      , eg = "jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_")
      , fg = (uf.defineLocale("nl", {
        months: "januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),
        monthsShort: function(a, b) {
            return /-MMM-/.test(b) ? eg[a.month()] : dg[a.month()]
        },
        weekdays: "zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),
        weekdaysShort: "zo._ma._di._wo._do._vr._za.".split("_"),
        weekdaysMin: "Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD-MM-YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[vandaag om] LT",
            nextDay: "[morgen om] LT",
            nextWeek: "dddd [om] LT",
            lastDay: "[gisteren om] LT",
            lastWeek: "[afgelopen] dddd [om] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "over %s",
            past: "%s geleden",
            s: "een paar seconden",
            m: "één minuut",
            mm: "%d minuten",
            h: "één uur",
            hh: "%d uur",
            d: "één dag",
            dd: "%d dagen",
            M: "één maand",
            MM: "%d maanden",
            y: "één jaar",
            yy: "%d jaar"
        },
        ordinalParse: /\d{1,2}(ste|de)/,
        ordinal: function(a) {
            return a + (1 === a || 8 === a || a >= 20 ? "ste" : "de")
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("nn", {
        months: "januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),
        monthsShort: "jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),
        weekdays: "sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),
        weekdaysShort: "sun_mån_tys_ons_tor_fre_lau".split("_"),
        weekdaysMin: "su_må_ty_on_to_fr_lø".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[I dag klokka] LT",
            nextDay: "[I morgon klokka] LT",
            nextWeek: "dddd [klokka] LT",
            lastDay: "[I går klokka] LT",
            lastWeek: "[Føregåande] dddd [klokka] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "om %s",
            past: "for %s sidan",
            s: "nokre sekund",
            m: "eit minutt",
            mm: "%d minutt",
            h: "ein time",
            hh: "%d timar",
            d: "ein dag",
            dd: "%d dagar",
            M: "ein månad",
            MM: "%d månader",
            y: "eit år",
            yy: "%d år"
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    "styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"))
      , gg = "stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_")
      , hg = (uf.defineLocale("pl", {
        months: function(a, b) {
            return "" === b ? "(" + gg[a.month()] + "|" + fg[a.month()] + ")" : /D MMMM/.test(b) ? gg[a.month()] : fg[a.month()]
        },
        monthsShort: "sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),
        weekdays: "niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),
        weekdaysShort: "nie_pon_wt_śr_czw_pt_sb".split("_"),
        weekdaysMin: "N_Pn_Wt_Śr_Cz_Pt_So".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd, D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Dziś o] LT",
            nextDay: "[Jutro o] LT",
            nextWeek: "[W] dddd [o] LT",
            lastDay: "[Wczoraj o] LT",
            lastWeek: function() {
                switch (this.day()) {
                case 0:
                    return "[W zeszłą niedzielę o] LT";
                case 3:
                    return "[W zeszłą środę o] LT";
                case 6:
                    return "[W zeszłą sobotę o] LT";
                default:
                    return "[W zeszły] dddd [o] LT"
                }
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "za %s",
            past: "%s temu",
            s: "kilka sekund",
            m: wd,
            mm: wd,
            h: wd,
            hh: wd,
            d: "1 dzień",
            dd: "%d dni",
            M: "miesiąc",
            MM: wd,
            y: "rok",
            yy: wd
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("pt-br", {
        months: "Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),
        monthsShort: "Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),
        weekdays: "Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),
        weekdaysShort: "Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),
        weekdaysMin: "Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D [de] MMMM [de] YYYY",
            LLL: "D [de] MMMM [de] YYYY [às] HH:mm",
            LLLL: "dddd, D [de] MMMM [de] YYYY [às] HH:mm"
        },
        calendar: {
            sameDay: "[Hoje às] LT",
            nextDay: "[Amanhã às] LT",
            nextWeek: "dddd [às] LT",
            lastDay: "[Ontem às] LT",
            lastWeek: function() {
                return 0 === this.day() || 6 === this.day() ? "[Último] dddd [às] LT" : "[Última] dddd [às] LT"
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "em %s",
            past: "%s atrás",
            s: "poucos segundos",
            m: "um minuto",
            mm: "%d minutos",
            h: "uma hora",
            hh: "%d horas",
            d: "um dia",
            dd: "%d dias",
            M: "um mês",
            MM: "%d meses",
            y: "um ano",
            yy: "%d anos"
        },
        ordinalParse: /\d{1,2}º/,
        ordinal: "%dº"
    }),
    uf.defineLocale("pt", {
        months: "Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),
        monthsShort: "Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),
        weekdays: "Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),
        weekdaysShort: "Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),
        weekdaysMin: "Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D [de] MMMM [de] YYYY",
            LLL: "D [de] MMMM [de] YYYY HH:mm",
            LLLL: "dddd, D [de] MMMM [de] YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Hoje às] LT",
            nextDay: "[Amanhã às] LT",
            nextWeek: "dddd [às] LT",
            lastDay: "[Ontem às] LT",
            lastWeek: function() {
                return 0 === this.day() || 6 === this.day() ? "[Último] dddd [às] LT" : "[Última] dddd [às] LT"
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "em %s",
            past: "há %s",
            s: "segundos",
            m: "um minuto",
            mm: "%d minutos",
            h: "uma hora",
            hh: "%d horas",
            d: "um dia",
            dd: "%d dias",
            M: "um mês",
            MM: "%d meses",
            y: "um ano",
            yy: "%d anos"
        },
        ordinalParse: /\d{1,2}º/,
        ordinal: "%dº",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("ro", {
        months: "ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),
        monthsShort: "ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),
        weekdays: "duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),
        weekdaysShort: "Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),
        weekdaysMin: "Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY H:mm",
            LLLL: "dddd, D MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: "[azi la] LT",
            nextDay: "[mâine la] LT",
            nextWeek: "dddd [la] LT",
            lastDay: "[ieri la] LT",
            lastWeek: "[fosta] dddd [la] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "peste %s",
            past: "%s în urmă",
            s: "câteva secunde",
            m: "un minut",
            mm: xd,
            h: "o oră",
            hh: xd,
            d: "o zi",
            dd: xd,
            M: "o lună",
            MM: xd,
            y: "un an",
            yy: xd
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("ru", {
        months: Ad,
        monthsShort: Bd,
        weekdays: Cd,
        weekdaysShort: "вс_пн_вт_ср_чт_пт_сб".split("_"),
        weekdaysMin: "вс_пн_вт_ср_чт_пт_сб".split("_"),
        monthsParse: [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[й|я]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i],
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D MMMM YYYY г.",
            LLL: "D MMMM YYYY г., HH:mm",
            LLLL: "dddd, D MMMM YYYY г., HH:mm"
        },
        calendar: {
            sameDay: "[Сегодня в] LT",
            nextDay: "[Завтра в] LT",
            lastDay: "[Вчера в] LT",
            nextWeek: function() {
                return 2 === this.day() ? "[Во] dddd [в] LT" : "[В] dddd [в] LT"
            },
            lastWeek: function(a) {
                if (a.week() === this.week())
                    return 2 === this.day() ? "[Во] dddd [в] LT" : "[В] dddd [в] LT";
                switch (this.day()) {
                case 0:
                    return "[В прошлое] dddd [в] LT";
                case 1:
                case 2:
                case 4:
                    return "[В прошлый] dddd [в] LT";
                case 3:
                case 5:
                case 6:
                    return "[В прошлую] dddd [в] LT"
                }
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "через %s",
            past: "%s назад",
            s: "несколько секунд",
            m: zd,
            mm: zd,
            h: "час",
            hh: zd,
            d: "день",
            dd: zd,
            M: "месяц",
            MM: zd,
            y: "год",
            yy: zd
        },
        meridiemParse: /ночи|утра|дня|вечера/i,
        isPM: function(a) {
            return /^(дня|вечера)$/.test(a)
        },
        meridiem: function(a, b, c) {
            return 4 > a ? "ночи" : 12 > a ? "утра" : 17 > a ? "дня" : "вечера"
        },
        ordinalParse: /\d{1,2}-(й|го|я)/,
        ordinal: function(a, b) {
            switch (b) {
            case "M":
            case "d":
            case "DDD":
                return a + "-й";
            case "D":
                return a + "-го";
            case "w":
            case "W":
                return a + "-я";
            default:
                return a
            }
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("si", {
        months: "ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),
        monthsShort: "ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),
        weekdays: "ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),
        weekdaysShort: "ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),
        weekdaysMin: "ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),
        longDateFormat: {
            LT: "a h:mm",
            LTS: "a h:mm:ss",
            L: "YYYY/MM/DD",
            LL: "YYYY MMMM D",
            LLL: "YYYY MMMM D, a h:mm",
            LLLL: "YYYY MMMM D [වැනි] dddd, a h:mm:ss"
        },
        calendar: {
            sameDay: "[අද] LT[ට]",
            nextDay: "[හෙට] LT[ට]",
            nextWeek: "dddd LT[ට]",
            lastDay: "[ඊයේ] LT[ට]",
            lastWeek: "[පසුගිය] dddd LT[ට]",
            sameElse: "L"
        },
        relativeTime: {
            future: "%sකින්",
            past: "%sකට පෙර",
            s: "තත්පර කිහිපය",
            m: "මිනිත්තුව",
            mm: "මිනිත්තු %d",
            h: "පැය",
            hh: "පැය %d",
            d: "දිනය",
            dd: "දින %d",
            M: "මාසය",
            MM: "මාස %d",
            y: "වසර",
            yy: "වසර %d"
        },
        ordinalParse: /\d{1,2} වැනි/,
        ordinal: function(a) {
            return a + " වැනි"
        },
        meridiem: function(a, b, c) {
            return a > 11 ? c ? "ප.ව." : "පස් වරු" : c ? "පෙ.ව." : "පෙර වරු"
        }
    }),
    "január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"))
      , ig = "jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_")
      , jg = (uf.defineLocale("sk", {
        months: hg,
        monthsShort: ig,
        monthsParse: function(a, b) {
            var c, d = [];
            for (c = 0; 12 > c; c++)
                d[c] = new RegExp("^" + a[c] + "$|^" + b[c] + "$","i");
            return d
        }(hg, ig),
        weekdays: "nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),
        weekdaysShort: "ne_po_ut_st_št_pi_so".split("_"),
        weekdaysMin: "ne_po_ut_st_št_pi_so".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY H:mm",
            LLLL: "dddd D. MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: "[dnes o] LT",
            nextDay: "[zajtra o] LT",
            nextWeek: function() {
                switch (this.day()) {
                case 0:
                    return "[v nedeľu o] LT";
                case 1:
                case 2:
                    return "[v] dddd [o] LT";
                case 3:
                    return "[v stredu o] LT";
                case 4:
                    return "[vo štvrtok o] LT";
                case 5:
                    return "[v piatok o] LT";
                case 6:
                    return "[v sobotu o] LT"
                }
            },
            lastDay: "[včera o] LT",
            lastWeek: function() {
                switch (this.day()) {
                case 0:
                    return "[minulú nedeľu o] LT";
                case 1:
                case 2:
                    return "[minulý] dddd [o] LT";
                case 3:
                    return "[minulú stredu o] LT";
                case 4:
                case 5:
                    return "[minulý] dddd [o] LT";
                case 6:
                    return "[minulú sobotu o] LT"
                }
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "za %s",
            past: "pred %s",
            s: Ed,
            m: Ed,
            mm: Ed,
            h: Ed,
            hh: Ed,
            d: Ed,
            dd: Ed,
            M: Ed,
            MM: Ed,
            y: Ed,
            yy: Ed
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("sl", {
        months: "januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),
        monthsShort: "jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),
        weekdays: "nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),
        weekdaysShort: "ned._pon._tor._sre._čet._pet._sob.".split("_"),
        weekdaysMin: "ne_po_to_sr_če_pe_so".split("_"),
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "DD. MM. YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY H:mm",
            LLLL: "dddd, D. MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: "[danes ob] LT",
            nextDay: "[jutri ob] LT",
            nextWeek: function() {
                switch (this.day()) {
                case 0:
                    return "[v] [nedeljo] [ob] LT";
                case 3:
                    return "[v] [sredo] [ob] LT";
                case 6:
                    return "[v] [soboto] [ob] LT";
                case 1:
                case 2:
                case 4:
                case 5:
                    return "[v] dddd [ob] LT"
                }
            },
            lastDay: "[včeraj ob] LT",
            lastWeek: function() {
                switch (this.day()) {
                case 0:
                    return "[prejšnjo] [nedeljo] [ob] LT";
                case 3:
                    return "[prejšnjo] [sredo] [ob] LT";
                case 6:
                    return "[prejšnjo] [soboto] [ob] LT";
                case 1:
                case 2:
                case 4:
                case 5:
                    return "[prejšnji] dddd [ob] LT"
                }
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "čez %s",
            past: "pred %s",
            s: Fd,
            m: Fd,
            mm: Fd,
            h: Fd,
            hh: Fd,
            d: Fd,
            dd: Fd,
            M: Fd,
            MM: Fd,
            y: Fd,
            yy: Fd
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("sq", {
        months: "Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),
        monthsShort: "Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),
        weekdays: "E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),
        weekdaysShort: "Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),
        weekdaysMin: "D_H_Ma_Më_E_P_Sh".split("_"),
        meridiemParse: /PD|MD/,
        isPM: function(a) {
            return "M" === a.charAt(0)
        },
        meridiem: function(a, b, c) {
            return 12 > a ? "PD" : "MD"
        },
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd, D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Sot në] LT",
            nextDay: "[Nesër në] LT",
            nextWeek: "dddd [në] LT",
            lastDay: "[Dje në] LT",
            lastWeek: "dddd [e kaluar në] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "në %s",
            past: "%s më parë",
            s: "disa sekonda",
            m: "një minutë",
            mm: "%d minuta",
            h: "një orë",
            hh: "%d orë",
            d: "një ditë",
            dd: "%d ditë",
            M: "një muaj",
            MM: "%d muaj",
            y: "një vit",
            yy: "%d vite"
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    {
        words: {
            m: ["један минут", "једне минуте"],
            mm: ["минут", "минуте", "минута"],
            h: ["један сат", "једног сата"],
            hh: ["сат", "сата", "сати"],
            dd: ["дан", "дана", "дана"],
            MM: ["месец", "месеца", "месеци"],
            yy: ["година", "године", "година"]
        },
        correctGrammaticalCase: function(a, b) {
            return 1 === a ? b[0] : a >= 2 && 4 >= a ? b[1] : b[2]
        },
        translate: function(a, b, c) {
            var d = jg.words[c];
            return 1 === c.length ? b ? d[0] : d[1] : a + " " + jg.correctGrammaticalCase(a, d)
        }
    })
      , kg = (uf.defineLocale("sr-cyrl", {
        months: ["јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"],
        monthsShort: ["јан.", "феб.", "мар.", "апр.", "мај", "јун", "јул", "авг.", "сеп.", "окт.", "нов.", "дец."],
        weekdays: ["недеља", "понедељак", "уторак", "среда", "четвртак", "петак", "субота"],
        weekdaysShort: ["нед.", "пон.", "уто.", "сре.", "чет.", "пет.", "суб."],
        weekdaysMin: ["не", "по", "ут", "ср", "че", "пе", "су"],
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "DD. MM. YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY H:mm",
            LLLL: "dddd, D. MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: "[данас у] LT",
            nextDay: "[сутра у] LT",
            nextWeek: function() {
                switch (this.day()) {
                case 0:
                    return "[у] [недељу] [у] LT";
                case 3:
                    return "[у] [среду] [у] LT";
                case 6:
                    return "[у] [суботу] [у] LT";
                case 1:
                case 2:
                case 4:
                case 5:
                    return "[у] dddd [у] LT"
                }
            },
            lastDay: "[јуче у] LT",
            lastWeek: function() {
                var a = ["[прошле] [недеље] [у] LT", "[прошлог] [понедељка] [у] LT", "[прошлог] [уторка] [у] LT", "[прошле] [среде] [у] LT", "[прошлог] [четвртка] [у] LT", "[прошлог] [петка] [у] LT", "[прошле] [суботе] [у] LT"];
                return a[this.day()]
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "за %s",
            past: "пре %s",
            s: "неколико секунди",
            m: jg.translate,
            mm: jg.translate,
            h: jg.translate,
            hh: jg.translate,
            d: "дан",
            dd: jg.translate,
            M: "месец",
            MM: jg.translate,
            y: "годину",
            yy: jg.translate
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 7
        }
    }),
    {
        words: {
            m: ["jedan minut", "jedne minute"],
            mm: ["minut", "minute", "minuta"],
            h: ["jedan sat", "jednog sata"],
            hh: ["sat", "sata", "sati"],
            dd: ["dan", "dana", "dana"],
            MM: ["mesec", "meseca", "meseci"],
            yy: ["godina", "godine", "godina"]
        },
        correctGrammaticalCase: function(a, b) {
            return 1 === a ? b[0] : a >= 2 && 4 >= a ? b[1] : b[2]
        },
        translate: function(a, b, c) {
            var d = kg.words[c];
            return 1 === c.length ? b ? d[0] : d[1] : a + " " + kg.correctGrammaticalCase(a, d)
        }
    })
      , lg = (uf.defineLocale("sr", {
        months: ["januar", "februar", "mart", "april", "maj", "jun", "jul", "avgust", "septembar", "oktobar", "novembar", "decembar"],
        monthsShort: ["jan.", "feb.", "mar.", "apr.", "maj", "jun", "jul", "avg.", "sep.", "okt.", "nov.", "dec."],
        weekdays: ["nedelja", "ponedeljak", "utorak", "sreda", "četvrtak", "petak", "subota"],
        weekdaysShort: ["ned.", "pon.", "uto.", "sre.", "čet.", "pet.", "sub."],
        weekdaysMin: ["ne", "po", "ut", "sr", "če", "pe", "su"],
        longDateFormat: {
            LT: "H:mm",
            LTS: "H:mm:ss",
            L: "DD. MM. YYYY",
            LL: "D. MMMM YYYY",
            LLL: "D. MMMM YYYY H:mm",
            LLLL: "dddd, D. MMMM YYYY H:mm"
        },
        calendar: {
            sameDay: "[danas u] LT",
            nextDay: "[sutra u] LT",
            nextWeek: function() {
                switch (this.day()) {
                case 0:
                    return "[u] [nedelju] [u] LT";
                case 3:
                    return "[u] [sredu] [u] LT";
                case 6:
                    return "[u] [subotu] [u] LT";
                case 1:
                case 2:
                case 4:
                case 5:
                    return "[u] dddd [u] LT"
                }
            },
            lastDay: "[juče u] LT",
            lastWeek: function() {
                var a = ["[prošle] [nedelje] [u] LT", "[prošlog] [ponedeljka] [u] LT", "[prošlog] [utorka] [u] LT", "[prošle] [srede] [u] LT", "[prošlog] [četvrtka] [u] LT", "[prošlog] [petka] [u] LT", "[prošle] [subote] [u] LT"];
                return a[this.day()]
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "za %s",
            past: "pre %s",
            s: "nekoliko sekundi",
            m: kg.translate,
            mm: kg.translate,
            h: kg.translate,
            hh: kg.translate,
            d: "dan",
            dd: kg.translate,
            M: "mesec",
            MM: kg.translate,
            y: "godinu",
            yy: kg.translate
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("sv", {
        months: "januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),
        monthsShort: "jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),
        weekdays: "söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),
        weekdaysShort: "sön_mån_tis_ons_tor_fre_lör".split("_"),
        weekdaysMin: "sö_må_ti_on_to_fr_lö".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "YYYY-MM-DD",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Idag] LT",
            nextDay: "[Imorgon] LT",
            lastDay: "[Igår] LT",
            nextWeek: "[På] dddd LT",
            lastWeek: "[I] dddd[s] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "om %s",
            past: "för %s sedan",
            s: "några sekunder",
            m: "en minut",
            mm: "%d minuter",
            h: "en timme",
            hh: "%d timmar",
            d: "en dag",
            dd: "%d dagar",
            M: "en månad",
            MM: "%d månader",
            y: "ett år",
            yy: "%d år"
        },
        ordinalParse: /\d{1,2}(e|a)/,
        ordinal: function(a) {
            var b = a % 10
              , c = 1 === ~~(a % 100 / 10) ? "e" : 1 === b ? "a" : 2 === b ? "a" : "e";
            return a + c
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("ta", {
        months: "ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),
        monthsShort: "ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),
        weekdays: "ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),
        weekdaysShort: "ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),
        weekdaysMin: "ஞா_தி_செ_பு_வி_வெ_ச".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY, HH:mm",
            LLLL: "dddd, D MMMM YYYY, HH:mm"
        },
        calendar: {
            sameDay: "[இன்று] LT",
            nextDay: "[நாளை] LT",
            nextWeek: "dddd, LT",
            lastDay: "[நேற்று] LT",
            lastWeek: "[கடந்த வாரம்] dddd, LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s இல்",
            past: "%s முன்",
            s: "ஒரு சில விநாடிகள்",
            m: "ஒரு நிமிடம்",
            mm: "%d நிமிடங்கள்",
            h: "ஒரு மணி நேரம்",
            hh: "%d மணி நேரம்",
            d: "ஒரு நாள்",
            dd: "%d நாட்கள்",
            M: "ஒரு மாதம்",
            MM: "%d மாதங்கள்",
            y: "ஒரு வருடம்",
            yy: "%d ஆண்டுகள்"
        },
        ordinalParse: /\d{1,2}வது/,
        ordinal: function(a) {
            return a + "வது"
        },
        meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
        meridiem: function(a, b, c) {
            return 2 > a ? " யாமம்" : 6 > a ? " வைகறை" : 10 > a ? " காலை" : 14 > a ? " நண்பகல்" : 18 > a ? " எற்பாடு" : 22 > a ? " மாலை" : " யாமம்"
        },
        meridiemHour: function(a, b) {
            return 12 === a && (a = 0),
            "யாமம்" === b ? 2 > a ? a : a + 12 : "வைகறை" === b || "காலை" === b ? a : "நண்பகல்" === b && a >= 10 ? a : a + 12
        },
        week: {
            dow: 0,
            doy: 6
        }
    }),
    uf.defineLocale("th", {
        months: "มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),
        monthsShort: "มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),
        weekdays: "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),
        weekdaysShort: "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),
        weekdaysMin: "อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),
        longDateFormat: {
            LT: "H นาฬิกา m นาที",
            LTS: "H นาฬิกา m นาที s วินาที",
            L: "YYYY/MM/DD",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY เวลา H นาฬิกา m นาที",
            LLLL: "วันddddที่ D MMMM YYYY เวลา H นาฬิกา m นาที"
        },
        meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
        isPM: function(a) {
            return "หลังเที่ยง" === a
        },
        meridiem: function(a, b, c) {
            return 12 > a ? "ก่อนเที่ยง" : "หลังเที่ยง"
        },
        calendar: {
            sameDay: "[วันนี้ เวลา] LT",
            nextDay: "[พรุ่งนี้ เวลา] LT",
            nextWeek: "dddd[หน้า เวลา] LT",
            lastDay: "[เมื่อวานนี้ เวลา] LT",
            lastWeek: "[วัน]dddd[ที่แล้ว เวลา] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "อีก %s",
            past: "%sที่แล้ว",
            s: "ไม่กี่วินาที",
            m: "1 นาที",
            mm: "%d นาที",
            h: "1 ชั่วโมง",
            hh: "%d ชั่วโมง",
            d: "1 วัน",
            dd: "%d วัน",
            M: "1 เดือน",
            MM: "%d เดือน",
            y: "1 ปี",
            yy: "%d ปี"
        }
    }),
    uf.defineLocale("tl-ph", {
        months: "Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),
        monthsShort: "Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),
        weekdays: "Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),
        weekdaysShort: "Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),
        weekdaysMin: "Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "MM/D/YYYY",
            LL: "MMMM D, YYYY",
            LLL: "MMMM D, YYYY HH:mm",
            LLLL: "dddd, MMMM DD, YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Ngayon sa] LT",
            nextDay: "[Bukas sa] LT",
            nextWeek: "dddd [sa] LT",
            lastDay: "[Kahapon sa] LT",
            lastWeek: "dddd [huling linggo] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "sa loob ng %s",
            past: "%s ang nakalipas",
            s: "ilang segundo",
            m: "isang minuto",
            mm: "%d minuto",
            h: "isang oras",
            hh: "%d oras",
            d: "isang araw",
            dd: "%d araw",
            M: "isang buwan",
            MM: "%d buwan",
            y: "isang taon",
            yy: "%d taon"
        },
        ordinalParse: /\d{1,2}/,
        ordinal: function(a) {
            return a
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    {
        1: "'inci",
        5: "'inci",
        8: "'inci",
        70: "'inci",
        80: "'inci",
        2: "'nci",
        7: "'nci",
        20: "'nci",
        50: "'nci",
        3: "'üncü",
        4: "'üncü",
        100: "'üncü",
        6: "'ncı",
        9: "'uncu",
        10: "'uncu",
        30: "'uncu",
        60: "'ıncı",
        90: "'ıncı"
    })
      , mg = (uf.defineLocale("tr", {
        months: "Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),
        monthsShort: "Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),
        weekdays: "Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),
        weekdaysShort: "Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),
        weekdaysMin: "Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd, D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[bugün saat] LT",
            nextDay: "[yarın saat] LT",
            nextWeek: "[haftaya] dddd [saat] LT",
            lastDay: "[dün] LT",
            lastWeek: "[geçen hafta] dddd [saat] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s sonra",
            past: "%s önce",
            s: "birkaç saniye",
            m: "bir dakika",
            mm: "%d dakika",
            h: "bir saat",
            hh: "%d saat",
            d: "bir gün",
            dd: "%d gün",
            M: "bir ay",
            MM: "%d ay",
            y: "bir yıl",
            yy: "%d yıl"
        },
        ordinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
        ordinal: function(a) {
            if (0 === a)
                return a + "'ıncı";
            var b = a % 10
              , c = a % 100 - b
              , d = a >= 100 ? 100 : null;
            return a + (lg[b] || lg[c] || lg[d])
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("tzl", {
        months: "Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),
        monthsShort: "Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),
        weekdays: "Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),
        weekdaysShort: "Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),
        weekdaysMin: "Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),
        longDateFormat: {
            LT: "HH.mm",
            LTS: "LT.ss",
            L: "DD.MM.YYYY",
            LL: "D. MMMM [dallas] YYYY",
            LLL: "D. MMMM [dallas] YYYY LT",
            LLLL: "dddd, [li] D. MMMM [dallas] YYYY LT"
        },
        meridiem: function(a, b, c) {
            return a > 11 ? c ? "d'o" : "D'O" : c ? "d'a" : "D'A"
        },
        calendar: {
            sameDay: "[oxhi à] LT",
            nextDay: "[demà à] LT",
            nextWeek: "dddd [à] LT",
            lastDay: "[ieiri à] LT",
            lastWeek: "[sür el] dddd [lasteu à] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "osprei %s",
            past: "ja%s",
            s: Gd,
            m: Gd,
            mm: Gd,
            h: Gd,
            hh: Gd,
            d: Gd,
            dd: Gd,
            M: Gd,
            MM: Gd,
            y: Gd,
            yy: Gd
        },
        ordinalParse: /\d{1,2}\./,
        ordinal: "%d.",
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("tzm-latn", {
        months: "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
        monthsShort: "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
        weekdays: "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
        weekdaysShort: "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
        weekdaysMin: "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[asdkh g] LT",
            nextDay: "[aska g] LT",
            nextWeek: "dddd [g] LT",
            lastDay: "[assant g] LT",
            lastWeek: "dddd [g] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "dadkh s yan %s",
            past: "yan %s",
            s: "imik",
            m: "minuḍ",
            mm: "%d minuḍ",
            h: "saɛa",
            hh: "%d tassaɛin",
            d: "ass",
            dd: "%d ossan",
            M: "ayowr",
            MM: "%d iyyirn",
            y: "asgas",
            yy: "%d isgasn"
        },
        week: {
            dow: 6,
            doy: 12
        }
    }),
    uf.defineLocale("tzm", {
        months: "ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),
        monthsShort: "ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),
        weekdays: "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),
        weekdaysShort: "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),
        weekdaysMin: "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "dddd D MMMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[ⴰⵙⴷⵅ ⴴ] LT",
            nextDay: "[ⴰⵙⴽⴰ ⴴ] LT",
            nextWeek: "dddd [ⴴ] LT",
            lastDay: "[ⴰⵚⴰⵏⵜ ⴴ] LT",
            lastWeek: "dddd [ⴴ] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",
            past: "ⵢⴰⵏ %s",
            s: "ⵉⵎⵉⴽ",
            m: "ⵎⵉⵏⵓⴺ",
            mm: "%d ⵎⵉⵏⵓⴺ",
            h: "ⵙⴰⵄⴰ",
            hh: "%d ⵜⴰⵙⵙⴰⵄⵉⵏ",
            d: "ⴰⵙⵙ",
            dd: "%d oⵙⵙⴰⵏ",
            M: "ⴰⵢoⵓⵔ",
            MM: "%d ⵉⵢⵢⵉⵔⵏ",
            y: "ⴰⵙⴳⴰⵙ",
            yy: "%d ⵉⵙⴳⴰⵙⵏ"
        },
        week: {
            dow: 6,
            doy: 12
        }
    }),
    uf.defineLocale("uk", {
        months: Jd,
        monthsShort: "січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),
        weekdays: Kd,
        weekdaysShort: "нд_пн_вт_ср_чт_пт_сб".split("_"),
        weekdaysMin: "нд_пн_вт_ср_чт_пт_сб".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD.MM.YYYY",
            LL: "D MMMM YYYY р.",
            LLL: "D MMMM YYYY р., HH:mm",
            LLLL: "dddd, D MMMM YYYY р., HH:mm"
        },
        calendar: {
            sameDay: Ld("[Сьогодні "),
            nextDay: Ld("[Завтра "),
            lastDay: Ld("[Вчора "),
            nextWeek: Ld("[У] dddd ["),
            lastWeek: function() {
                switch (this.day()) {
                case 0:
                case 3:
                case 5:
                case 6:
                    return Ld("[Минулої] dddd [").call(this);
                case 1:
                case 2:
                case 4:
                    return Ld("[Минулого] dddd [").call(this)
                }
            },
            sameElse: "L"
        },
        relativeTime: {
            future: "за %s",
            past: "%s тому",
            s: "декілька секунд",
            m: Id,
            mm: Id,
            h: "годину",
            hh: Id,
            d: "день",
            dd: Id,
            M: "місяць",
            MM: Id,
            y: "рік",
            yy: Id
        },
        meridiemParse: /ночі|ранку|дня|вечора/,
        isPM: function(a) {
            return /^(дня|вечора)$/.test(a)
        },
        meridiem: function(a, b, c) {
            return 4 > a ? "ночі" : 12 > a ? "ранку" : 17 > a ? "дня" : "вечора"
        },
        ordinalParse: /\d{1,2}-(й|го)/,
        ordinal: function(a, b) {
            switch (b) {
            case "M":
            case "d":
            case "DDD":
            case "w":
            case "W":
                return a + "-й";
            case "D":
                return a + "-го";
            default:
                return a
            }
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("uz", {
        months: "январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),
        monthsShort: "янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),
        weekdays: "Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),
        weekdaysShort: "Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),
        weekdaysMin: "Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM YYYY",
            LLL: "D MMMM YYYY HH:mm",
            LLLL: "D MMMM YYYY, dddd HH:mm"
        },
        calendar: {
            sameDay: "[Бугун соат] LT [да]",
            nextDay: "[Эртага] LT [да]",
            nextWeek: "dddd [куни соат] LT [да]",
            lastDay: "[Кеча соат] LT [да]",
            lastWeek: "[Утган] dddd [куни соат] LT [да]",
            sameElse: "L"
        },
        relativeTime: {
            future: "Якин %s ичида",
            past: "Бир неча %s олдин",
            s: "фурсат",
            m: "бир дакика",
            mm: "%d дакика",
            h: "бир соат",
            hh: "%d соат",
            d: "бир кун",
            dd: "%d кун",
            M: "бир ой",
            MM: "%d ой",
            y: "бир йил",
            yy: "%d йил"
        },
        week: {
            dow: 1,
            doy: 7
        }
    }),
    uf.defineLocale("vi", {
        months: "tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),
        monthsShort: "Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),
        weekdays: "chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),
        weekdaysShort: "CN_T2_T3_T4_T5_T6_T7".split("_"),
        weekdaysMin: "CN_T2_T3_T4_T5_T6_T7".split("_"),
        longDateFormat: {
            LT: "HH:mm",
            LTS: "HH:mm:ss",
            L: "DD/MM/YYYY",
            LL: "D MMMM [năm] YYYY",
            LLL: "D MMMM [năm] YYYY HH:mm",
            LLLL: "dddd, D MMMM [năm] YYYY HH:mm",
            l: "DD/M/YYYY",
            ll: "D MMM YYYY",
            lll: "D MMM YYYY HH:mm",
            llll: "ddd, D MMM YYYY HH:mm"
        },
        calendar: {
            sameDay: "[Hôm nay lúc] LT",
            nextDay: "[Ngày mai lúc] LT",
            nextWeek: "dddd [tuần tới lúc] LT",
            lastDay: "[Hôm qua lúc] LT",
            lastWeek: "dddd [tuần rồi lúc] LT",
            sameElse: "L"
        },
        relativeTime: {
            future: "%s tới",
            past: "%s trước",
            s: "vài giây",
            m: "một phút",
            mm: "%d phút",
            h: "một giờ",
            hh: "%d giờ",
            d: "một ngày",
            dd: "%d ngày",
            M: "một tháng",
            MM: "%d tháng",
            y: "một năm",
            yy: "%d năm"
        },
        ordinalParse: /\d{1,2}/,
        ordinal: function(a) {
            return a
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("zh-cn", {
        months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
        monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
        weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
        weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
        weekdaysMin: "日_一_二_三_四_五_六".split("_"),
        longDateFormat: {
            LT: "Ah点mm分",
            LTS: "Ah点m分s秒",
            L: "YYYY-MM-DD",
            LL: "YYYY年MMMD日",
            LLL: "YYYY年MMMD日Ah点mm分",
            LLLL: "YYYY年MMMD日ddddAh点mm分",
            l: "YYYY-MM-DD",
            ll: "YYYY年MMMD日",
            lll: "YYYY年MMMD日Ah点mm分",
            llll: "YYYY年MMMD日ddddAh点mm分"
        },
        meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
        meridiemHour: function(a, b) {
            return 12 === a && (a = 0),
            "凌晨" === b || "早上" === b || "上午" === b ? a : "下午" === b || "晚上" === b ? a + 12 : a >= 11 ? a : a + 12
        },
        meridiem: function(a, b, c) {
            var d = 100 * a + b;
            return 600 > d ? "凌晨" : 900 > d ? "早上" : 1130 > d ? "上午" : 1230 > d ? "中午" : 1800 > d ? "下午" : "晚上"
        },
        calendar: {
            sameDay: function() {
                return 0 === this.minutes() ? "[今天]Ah[点整]" : "[今天]LT"
            },
            nextDay: function() {
                return 0 === this.minutes() ? "[明天]Ah[点整]" : "[明天]LT"
            },
            lastDay: function() {
                return 0 === this.minutes() ? "[昨天]Ah[点整]" : "[昨天]LT"
            },
            nextWeek: function() {
                var a, b;
                return a = uf().startOf("week"),
                b = this.unix() - a.unix() >= 604800 ? "[下]" : "[本]",
                0 === this.minutes() ? b + "dddAh点整" : b + "dddAh点mm"
            },
            lastWeek: function() {
                var a, b;
                return a = uf().startOf("week"),
                b = this.unix() < a.unix() ? "[上]" : "[本]",
                0 === this.minutes() ? b + "dddAh点整" : b + "dddAh点mm"
            },
            sameElse: "LL"
        },
        ordinalParse: /\d{1,2}(日|月|周)/,
        ordinal: function(a, b) {
            switch (b) {
            case "d":
            case "D":
            case "DDD":
                return a + "日";
            case "M":
                return a + "月";
            case "w":
            case "W":
                return a + "周";
            default:
                return a
            }
        },
        relativeTime: {
            future: "%s内",
            past: "%s前",
            s: "几秒",
            m: "1 分钟",
            mm: "%d 分钟",
            h: "1 小时",
            hh: "%d 小时",
            d: "1 天",
            dd: "%d 天",
            M: "1 个月",
            MM: "%d 个月",
            y: "1 年",
            yy: "%d 年"
        },
        week: {
            dow: 1,
            doy: 4
        }
    }),
    uf.defineLocale("zh-tw", {
        months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
        monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
        weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
        weekdaysShort: "週日_週一_週二_週三_週四_週五_週六".split("_"),
        weekdaysMin: "日_一_二_三_四_五_六".split("_"),
        longDateFormat: {
            LT: "Ah點mm分",
            LTS: "Ah點m分s秒",
            L: "YYYY年MMMD日",
            LL: "YYYY年MMMD日",
            LLL: "YYYY年MMMD日Ah點mm分",
            LLLL: "YYYY年MMMD日ddddAh點mm分",
            l: "YYYY年MMMD日",
            ll: "YYYY年MMMD日",
            lll: "YYYY年MMMD日Ah點mm分",
            llll: "YYYY年MMMD日ddddAh點mm分"
        },
        meridiemParse: /早上|上午|中午|下午|晚上/,
        meridiemHour: function(a, b) {
            return 12 === a && (a = 0),
            "早上" === b || "上午" === b ? a : "中午" === b ? a >= 11 ? a : a + 12 : "下午" === b || "晚上" === b ? a + 12 : void 0
        },
        meridiem: function(a, b, c) {
            var d = 100 * a + b;
            return 900 > d ? "早上" : 1130 > d ? "上午" : 1230 > d ? "中午" : 1800 > d ? "下午" : "晚上"
        },
        calendar: {
            sameDay: "[今天]LT",
            nextDay: "[明天]LT",
            nextWeek: "[下]ddddLT",
            lastDay: "[昨天]LT",
            lastWeek: "[上]ddddLT",
            sameElse: "L"
        },
        ordinalParse: /\d{1,2}(日|月|週)/,
        ordinal: function(a, b) {
            switch (b) {
            case "d":
            case "D":
            case "DDD":
                return a + "日";
            case "M":
                return a + "月";
            case "w":
            case "W":
                return a + "週";
            default:
                return a
            }
        },
        relativeTime: {
            future: "%s內",
            past: "%s前",
            s: "幾秒",
            m: "一分鐘",
            mm: "%d分鐘",
            h: "一小時",
            hh: "%d小時",
            d: "一天",
            dd: "%d天",
            M: "一個月",
            MM: "%d個月",
            y: "一年",
            yy: "%d年"
        }
    }),
    uf);
    return mg.locale("en"),
    mg
});
/*! version : 4.17.37
=========================================================
bootstrap-datetimejs
https://github.com/Eonasdan/bootstrap-datetimepicker
Copyright (c) 2015 Jonathan Peterson
=========================================================
*/
!function(a) {
    "use strict";
    if ("function" == typeof define && define.amd)
        define(["jquery", "moment"], a);
    else if ("object" == typeof exports)
        a(require("jquery"), require("moment"));
    else {
        if ("undefined" == typeof jQuery)
            throw "bootstrap-datetimepicker requires jQuery to be loaded first";
        if ("undefined" == typeof moment)
            throw "bootstrap-datetimepicker requires Moment.js to be loaded first";
        a(jQuery, moment)
    }
}(function(a, b) {
    "use strict";
    if (!b)
        throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");
    var c = function(c, d) {
        var e, f, g, h, i, j, k, l = {}, m = !0, n = !1, o = !1, p = 0, q = [{
            clsName: "days",
            navFnc: "M",
            navStep: 1
        }, {
            clsName: "months",
            navFnc: "y",
            navStep: 1
        }, {
            clsName: "years",
            navFnc: "y",
            navStep: 10
        }, {
            clsName: "decades",
            navFnc: "y",
            navStep: 100
        }], r = ["days", "months", "years", "decades"], s = ["top", "bottom", "auto"], t = ["left", "right", "auto"], u = ["default", "top", "bottom"], v = {
            up: 38,
            38: "up",
            down: 40,
            40: "down",
            left: 37,
            37: "left",
            right: 39,
            39: "right",
            tab: 9,
            9: "tab",
            escape: 27,
            27: "escape",
            enter: 13,
            13: "enter",
            pageUp: 33,
            33: "pageUp",
            pageDown: 34,
            34: "pageDown",
            shift: 16,
            16: "shift",
            control: 17,
            17: "control",
            space: 32,
            32: "space",
            t: 84,
            84: "t",
            "delete": 46,
            46: "delete"
        }, w = {}, x = function(a) {
            var c, e, f, g, h, i = !1;
            return void 0 !== b.tz && void 0 !== d.timeZone && null !== d.timeZone && "" !== d.timeZone && (i = !0),
            void 0 === a || null === a ? c = i ? b().tz(d.timeZone).startOf("d") : b().startOf("d") : i ? (e = b().tz(d.timeZone).utcOffset(),
            f = b(a, j, d.useStrict).utcOffset(),
            f !== e ? (g = b().tz(d.timeZone).format("Z"),
            h = b(a, j, d.useStrict).format("YYYY-MM-DD[T]HH:mm:ss") + g,
            c = b(h, j, d.useStrict).tz(d.timeZone)) : c = b(a, j, d.useStrict).tz(d.timeZone)) : c = b(a, j, d.useStrict),
            c
        }, y = function(a) {
            if ("string" != typeof a || a.length > 1)
                throw new TypeError("isEnabled expects a single character string parameter");
            switch (a) {
            case "y":
                return -1 !== i.indexOf("Y");
            case "M":
                return -1 !== i.indexOf("M");
            case "d":
                return -1 !== i.toLowerCase().indexOf("d");
            case "h":
            case "H":
                return -1 !== i.toLowerCase().indexOf("h");
            case "m":
                return -1 !== i.indexOf("m");
            case "s":
                return -1 !== i.indexOf("s");
            default:
                return !1
            }
        }, z = function() {
            return y("h") || y("m") || y("s")
        }, A = function() {
            return y("y") || y("M") || y("d")
        }, B = function() {
            var b = a("<thead>").append(a("<tr>").append(a("<th>").addClass("prev").attr("data-action", "previous").append(a("<span>").addClass(d.icons.previous))).append(a("<th>").addClass("picker-switch").attr("data-action", "pickerSwitch").attr("colspan", d.calendarWeeks ? "6" : "5")).append(a("<th>").addClass("next").attr("data-action", "next").append(a("<span>").addClass(d.icons.next))))
              , c = a("<tbody>").append(a("<tr>").append(a("<td>").attr("colspan", d.calendarWeeks ? "8" : "7")));
            return [a("<div>").addClass("datepicker-days").append(a("<table>").addClass("table-condensed").append(b).append(a("<tbody>"))), a("<div>").addClass("datepicker-months").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone())), a("<div>").addClass("datepicker-years").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone())), a("<div>").addClass("datepicker-decades").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone()))]
        }, C = function() {
            var b = a("<tr>")
              , c = a("<tr>")
              , e = a("<tr>");
            return y("h") && (b.append(a("<td>").append(a("<a>").attr({
                href: "#",
                tabindex: "-1",
                title: d.tooltips.incrementHour
            }).addClass("btn").attr("data-action", "incrementHours").append(a("<span>").addClass(d.icons.up)))),
            c.append(a("<td>").append(a("<span>").addClass("timepicker-hour").attr({
                "data-time-component": "hours",
                title: d.tooltips.pickHour
            }).attr("data-action", "showHours"))),
            e.append(a("<td>").append(a("<a>").attr({
                href: "#",
                tabindex: "-1",
                title: d.tooltips.decrementHour
            }).addClass("btn").attr("data-action", "decrementHours").append(a("<span>").addClass(d.icons.down))))),
            y("m") && (y("h") && (b.append(a("<td>").addClass("separator")),
            c.append(a("<td>").addClass("separator").html(":")),
            e.append(a("<td>").addClass("separator"))),
            b.append(a("<td>").append(a("<a>").attr({
                href: "#",
                tabindex: "-1",
                title: d.tooltips.incrementMinute
            }).addClass("btn").attr("data-action", "incrementMinutes").append(a("<span>").addClass(d.icons.up)))),
            c.append(a("<td>").append(a("<span>").addClass("timepicker-minute").attr({
                "data-time-component": "minutes",
                title: d.tooltips.pickMinute
            }).attr("data-action", "showMinutes"))),
            e.append(a("<td>").append(a("<a>").attr({
                href: "#",
                tabindex: "-1",
                title: d.tooltips.decrementMinute
            }).addClass("btn").attr("data-action", "decrementMinutes").append(a("<span>").addClass(d.icons.down))))),
            y("s") && (y("m") && (b.append(a("<td>").addClass("separator")),
            c.append(a("<td>").addClass("separator").html(":")),
            e.append(a("<td>").addClass("separator"))),
            b.append(a("<td>").append(a("<a>").attr({
                href: "#",
                tabindex: "-1",
                title: d.tooltips.incrementSecond
            }).addClass("btn").attr("data-action", "incrementSeconds").append(a("<span>").addClass(d.icons.up)))),
            c.append(a("<td>").append(a("<span>").addClass("timepicker-second").attr({
                "data-time-component": "seconds",
                title: d.tooltips.pickSecond
            }).attr("data-action", "showSeconds"))),
            e.append(a("<td>").append(a("<a>").attr({
                href: "#",
                tabindex: "-1",
                title: d.tooltips.decrementSecond
            }).addClass("btn").attr("data-action", "decrementSeconds").append(a("<span>").addClass(d.icons.down))))),
            h || (b.append(a("<td>").addClass("separator")),
            c.append(a("<td>").append(a("<button>").addClass("btn btn-primary").attr({
                "data-action": "togglePeriod",
                tabindex: "-1",
                title: d.tooltips.togglePeriod
            }))),
            e.append(a("<td>").addClass("separator"))),
            a("<div>").addClass("timepicker-picker").append(a("<table>").addClass("table-condensed").append([b, c, e]))
        }, D = function() {
            var b = a("<div>").addClass("timepicker-hours").append(a("<table>").addClass("table-condensed"))
              , c = a("<div>").addClass("timepicker-minutes").append(a("<table>").addClass("table-condensed"))
              , d = a("<div>").addClass("timepicker-seconds").append(a("<table>").addClass("table-condensed"))
              , e = [C()];
            return y("h") && e.push(b),
            y("m") && e.push(c),
            y("s") && e.push(d),
            e
        }, E = function() {
            var b = [];
            return d.showTodayButton && b.push(a("<td>").append(a("<a>").attr({
                "data-action": "today",
                title: d.tooltips.today
            }).append(a("<span>").addClass(d.icons.today)))),
            !d.sideBySide && A() && z() && b.push(a("<td>").append(a("<a>").attr({
                "data-action": "togglePicker",
                title: d.tooltips.selectTime
            }).append(a("<span>").addClass(d.icons.time)))),
            d.showClear && b.push(a("<td>").append(a("<a>").attr({
                "data-action": "clear",
                title: d.tooltips.clear
            }).append(a("<span>").addClass(d.icons.clear)))),
            d.showClose && b.push(a("<td>").append(a("<a>").attr({
                "data-action": "close",
                title: d.tooltips.close
            }).append(a("<span>").addClass(d.icons.close)))),
            a("<table>").addClass("table-condensed").append(a("<tbody>").append(a("<tr>").append(b)))
        }, F = function() {
            var b = a("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu")
              , c = a("<div>").addClass("datepicker").append(B())
              , e = a("<div>").addClass("timepicker").append(D())
              , f = a("<ul>").addClass("list-unstyled")
              , g = a("<li>").addClass("picker-switch" + (d.collapse ? " accordion-toggle" : "")).append(E());
            return d.inline && b.removeClass("dropdown-menu"),
            h && b.addClass("usetwentyfour"),
            y("s") && !h && b.addClass("wider"),
            d.sideBySide && A() && z() ? (b.addClass("timepicker-sbs"),
            "top" === d.toolbarPlacement && b.append(g),
            b.append(a("<div>").addClass("row").append(c.addClass("col-md-6")).append(e.addClass("col-md-6"))),
            "bottom" === d.toolbarPlacement && b.append(g),
            b) : ("top" === d.toolbarPlacement && f.append(g),
            A() && f.append(a("<li>").addClass(d.collapse && z() ? "collapse in" : "").append(c)),
            "default" === d.toolbarPlacement && f.append(g),
            z() && f.append(a("<li>").addClass(d.collapse && A() ? "collapse" : "").append(e)),
            "bottom" === d.toolbarPlacement && f.append(g),
            b.append(f))
        }, G = function() {
            var b, e = {};
            return b = c.is("input") || d.inline ? c.data() : c.find("input").data(),
            b.dateOptions && b.dateOptions instanceof Object && (e = a.extend(!0, e, b.dateOptions)),
            a.each(d, function(a) {
                var c = "date" + a.charAt(0).toUpperCase() + a.slice(1);
                void 0 !== b[c] && (e[a] = b[c])
            }),
            e
        }, H = function() {
            var b, e = (n || c).position(), f = (n || c).offset(), g = d.widgetPositioning.vertical, h = d.widgetPositioning.horizontal;
            if (d.widgetParent)
                b = d.widgetParent.append(o);
            else if (c.is("input"))
                b = c.after(o).parent();
            else {
                if (d.inline)
                    return void (b = c.append(o));
                b = c,
                c.children().first().after(o)
            }
            if ("auto" === g && (g = f.top + 1.5 * o.height() >= a(window).height() + a(window).scrollTop() && o.height() + c.outerHeight() < f.top ? "top" : "bottom"),
            "auto" === h && (h = b.width() < f.left + o.outerWidth() / 2 && f.left + o.outerWidth() > a(window).width() ? "right" : "left"),
            "top" === g ? o.addClass("top").removeClass("bottom") : o.addClass("bottom").removeClass("top"),
            "right" === h ? o.addClass("pull-right") : o.removeClass("pull-right"),
            "relative" !== b.css("position") && (b = b.parents().filter(function() {
                return "relative" === a(this).css("position")
            }).first()),
            0 === b.length)
                throw new Error("datetimepicker component should be placed within a relative positioned container");
            o.css({
                top: "top" === g ? "auto" : e.top + c.outerHeight(),
                bottom: "top" === g ? e.top + c.outerHeight() : "auto",
                left: "left" === h ? b === c ? 0 : e.left : "auto",
                right: "left" === h ? "auto" : b.outerWidth() - c.outerWidth() - (b === c ? 0 : e.left)
            })
        }, I = function(a) {
            "dp.change" === a.type && (a.date && a.date.isSame(a.oldDate) || !a.date && !a.oldDate) || c.trigger(a)
        }, J = function(a) {
            "y" === a && (a = "YYYY"),
            I({
                type: "dp.update",
                change: a,
                viewDate: f.clone()
            })
        }, K = function(a) {
            o && (a && (k = Math.max(p, Math.min(3, k + a))),
            o.find(".datepicker > div").hide().filter(".datepicker-" + q[k].clsName).show())
        }, L = function() {
            var b = a("<tr>")
              , c = f.clone().startOf("w").startOf("d");
            for (d.calendarWeeks === !0 && b.append(a("<th>").addClass("cw").text("#")); c.isBefore(f.clone().endOf("w")); )
                b.append(a("<th>").addClass("dow").text(c.format("dd"))),
                c.add(1, "d");
            o.find(".datepicker-days thead").append(b)
        }, M = function(a) {
            return d.disabledDates[a.format("YYYY-MM-DD")] === !0
        }, N = function(a) {
            return d.enabledDates[a.format("YYYY-MM-DD")] === !0
        }, O = function(a) {
            return d.disabledHours[a.format("H")] === !0
        }, P = function(a) {
            return d.enabledHours[a.format("H")] === !0
        }, Q = function(b, c) {
            if (!b.isValid())
                return !1;
            if (d.disabledDates && "d" === c && M(b))
                return !1;
            if (d.enabledDates && "d" === c && !N(b))
                return !1;
            if (d.minDate && b.isBefore(d.minDate, c))
                return !1;
            if (d.maxDate && b.isAfter(d.maxDate, c))
                return !1;
            if (d.daysOfWeekDisabled && "d" === c && -1 !== d.daysOfWeekDisabled.indexOf(b.day()))
                return !1;
            if (d.disabledHours && ("h" === c || "m" === c || "s" === c) && O(b))
                return !1;
            if (d.enabledHours && ("h" === c || "m" === c || "s" === c) && !P(b))
                return !1;
            if (d.disabledTimeIntervals && ("h" === c || "m" === c || "s" === c)) {
                var e = !1;
                if (a.each(d.disabledTimeIntervals, function() {
                    return b.isBetween(this[0], this[1]) ? (e = !0,
                    !1) : void 0
                }),
                e)
                    return !1
            }
            return !0
        }, R = function() {
            for (var b = [], c = f.clone().startOf("y").startOf("d"); c.isSame(f, "y"); )
                b.push(a("<span>").attr("data-action", "selectMonth").addClass("month").text(c.format("MMM"))),
                c.add(1, "M");
            o.find(".datepicker-months td").empty().append(b)
        }, S = function() {
            var b = o.find(".datepicker-months")
              , c = b.find("th")
              , g = b.find("tbody").find("span");
            c.eq(0).find("span").attr("title", d.tooltips.prevYear),
            c.eq(1).attr("title", d.tooltips.selectYear),
            c.eq(2).find("span").attr("title", d.tooltips.nextYear),
            b.find(".disabled").removeClass("disabled"),
            Q(f.clone().subtract(1, "y"), "y") || c.eq(0).addClass("disabled"),
            c.eq(1).text(f.year()),
            Q(f.clone().add(1, "y"), "y") || c.eq(2).addClass("disabled"),
            g.removeClass("active"),
            e.isSame(f, "y") && !m && g.eq(e.month()).addClass("active"),
            g.each(function(b) {
                Q(f.clone().month(b), "M") || a(this).addClass("disabled")
            })
        }, T = function() {
            var a = o.find(".datepicker-years")
              , b = a.find("th")
              , c = f.clone().subtract(5, "y")
              , g = f.clone().add(6, "y")
              , h = "";
            for (b.eq(0).find("span").attr("title", d.tooltips.prevDecade),
            b.eq(1).attr("title", d.tooltips.selectDecade),
            b.eq(2).find("span").attr("title", d.tooltips.nextDecade),
            a.find(".disabled").removeClass("disabled"),
            d.minDate && d.minDate.isAfter(c, "y") && b.eq(0).addClass("disabled"),
            b.eq(1).text(c.year() + "-" + g.year()),
            d.maxDate && d.maxDate.isBefore(g, "y") && b.eq(2).addClass("disabled"); !c.isAfter(g, "y"); )
                h += '<span data-action="selectYear" class="year' + (c.isSame(e, "y") && !m ? " active" : "") + (Q(c, "y") ? "" : " disabled") + '">' + c.year() + "</span>",
                c.add(1, "y");
            a.find("td").html(h)
        }, U = function() {
            var a = o.find(".datepicker-decades")
              , c = a.find("th")
              , g = b({
                y: f.year() - f.year() % 100 - 1
            })
              , h = g.clone().add(100, "y")
              , i = g.clone()
              , j = "";
            for (c.eq(0).find("span").attr("title", d.tooltips.prevCentury),
            c.eq(2).find("span").attr("title", d.tooltips.nextCentury),
            a.find(".disabled").removeClass("disabled"),
            (g.isSame(b({
                y: 1900
            })) || d.minDate && d.minDate.isAfter(g, "y")) && c.eq(0).addClass("disabled"),
            c.eq(1).text(g.year() + "-" + h.year()),
            (g.isSame(b({
                y: 2e3
            })) || d.maxDate && d.maxDate.isBefore(h, "y")) && c.eq(2).addClass("disabled"); !g.isAfter(h, "y"); )
                j += '<span data-action="selectDecade" class="decade' + (g.isSame(e, "y") ? " active" : "") + (Q(g, "y") ? "" : " disabled") + '" data-selection="' + (g.year() + 6) + '">' + (g.year() + 1) + " - " + (g.year() + 12) + "</span>",
                g.add(12, "y");
            j += "<span></span><span></span><span></span>",
            a.find("td").html(j),
            c.eq(1).text(i.year() + 1 + "-" + g.year())
        }, V = function() {
            var b, c, g, h, i = o.find(".datepicker-days"), j = i.find("th"), k = [];
            if (A()) {
                for (j.eq(0).find("span").attr("title", d.tooltips.prevMonth),
                j.eq(1).attr("title", d.tooltips.selectMonth),
                j.eq(2).find("span").attr("title", d.tooltips.nextMonth),
                i.find(".disabled").removeClass("disabled"),
                j.eq(1).text(f.format(d.dayViewHeaderFormat)),
                Q(f.clone().subtract(1, "M"), "M") || j.eq(0).addClass("disabled"),
                Q(f.clone().add(1, "M"), "M") || j.eq(2).addClass("disabled"),
                b = f.clone().startOf("M").startOf("w").startOf("d"),
                h = 0; 42 > h; h++)
                    0 === b.weekday() && (c = a("<tr>"),
                    d.calendarWeeks && c.append('<td class="cw">' + b.week() + "</td>"),
                    k.push(c)),
                    g = "",
                    b.isBefore(f, "M") && (g += " old"),
                    b.isAfter(f, "M") && (g += " new"),
                    b.isSame(e, "d") && !m && (g += " active"),
                    Q(b, "d") || (g += " disabled"),
                    b.isSame(x(), "d") && (g += " today"),
                    (0 === b.day() || 6 === b.day()) && (g += " weekend"),
                    c.append('<td data-action="selectDay" data-day="' + b.format("L") + '" class="day' + g + '">' + b.date() + "</td>"),
                    b.add(1, "d");
                i.find("tbody").empty().append(k),
                S(),
                T(),
                U()
            }
        }, W = function() {
            var b = o.find(".timepicker-hours table")
              , c = f.clone().startOf("d")
              , d = []
              , e = a("<tr>");
            for (f.hour() > 11 && !h && c.hour(12); c.isSame(f, "d") && (h || f.hour() < 12 && c.hour() < 12 || f.hour() > 11); )
                c.hour() % 4 === 0 && (e = a("<tr>"),
                d.push(e)),
                e.append('<td data-action="selectHour" class="hour' + (Q(c, "h") ? "" : " disabled") + '">' + c.format(h ? "HH" : "hh") + "</td>"),
                c.add(1, "h");
            b.empty().append(d)
        }, X = function() {
            for (var b = o.find(".timepicker-minutes table"), c = f.clone().startOf("h"), e = [], g = a("<tr>"), h = 1 === d.stepping ? 5 : d.stepping; f.isSame(c, "h"); )
                c.minute() % (4 * h) === 0 && (g = a("<tr>"),
                e.push(g)),
                g.append('<td data-action="selectMinute" class="minute' + (Q(c, "m") ? "" : " disabled") + '">' + c.format("mm") + "</td>"),
                c.add(h, "m");
            b.empty().append(e)
        }, Y = function() {
            for (var b = o.find(".timepicker-seconds table"), c = f.clone().startOf("m"), d = [], e = a("<tr>"); f.isSame(c, "m"); )
                c.second() % 20 === 0 && (e = a("<tr>"),
                d.push(e)),
                e.append('<td data-action="selectSecond" class="second' + (Q(c, "s") ? "" : " disabled") + '">' + c.format("ss") + "</td>"),
                c.add(5, "s");
            b.empty().append(d)
        }, Z = function() {
            var a, b, c = o.find(".timepicker span[data-time-component]");
            h || (a = o.find(".timepicker [data-action=togglePeriod]"),
            b = e.clone().add(e.hours() >= 12 ? -12 : 12, "h"),
            a.text(e.format("A")),
            Q(b, "h") ? a.removeClass("disabled") : a.addClass("disabled")),
            c.filter("[data-time-component=hours]").text(e.format(h ? "HH" : "hh")),
            c.filter("[data-time-component=minutes]").text(e.format("mm")),
            c.filter("[data-time-component=seconds]").text(e.format("ss")),
            W(),
            X(),
            Y()
        }, $ = function() {
            o && (V(),
            Z())
        }, _ = function(a) {
            var b = m ? null : e;
            return a ? (a = a.clone().locale(d.locale),
            1 !== d.stepping && a.minutes(Math.round(a.minutes() / d.stepping) * d.stepping % 60).seconds(0),
            void (Q(a) ? (e = a,
            f = e.clone(),
            g.val(e.format(i)),
            c.data("date", e.format(i)),
            m = !1,
            $(),
            I({
                type: "dp.change",
                date: e.clone(),
                oldDate: b
            })) : (d.keepInvalid || g.val(m ? "" : e.format(i)),
            I({
                type: "dp.error",
                date: a
            })))) : (m = !0,
            g.val(""),
            c.data("date", ""),
            I({
                type: "dp.change",
                date: !1,
                oldDate: b
            }),
            void $())
        }, aa = function() {
            var b = !1;
            return o ? (o.find(".collapse").each(function() {
                var c = a(this).data("collapse");
                return c && c.transitioning ? (b = !0,
                !1) : !0
            }),
            b ? l : (n && n.hasClass("btn") && n.toggleClass("active"),
            o.hide(),
            a(window).off("resize", H),
            o.off("click", "[data-action]"),
            o.off("mousedown", !1),
            o.remove(),
            o = !1,
            I({
                type: "dp.hide",
                date: e.clone()
            }),
            g.blur(),
            l)) : l
        }, ba = function() {
            _(null)
        }, ca = {
            next: function() {
                var a = q[k].navFnc;
                f.add(q[k].navStep, a),
                V(),
                J(a)
            },
            previous: function() {
                var a = q[k].navFnc;
                f.subtract(q[k].navStep, a),
                V(),
                J(a)
            },
            pickerSwitch: function() {
                K(1)
            },
            selectMonth: function(b) {
                var c = a(b.target).closest("tbody").find("span").index(a(b.target));
                f.month(c),
                k === p ? (_(e.clone().year(f.year()).month(f.month())),
                d.inline || aa()) : (K(-1),
                V()),
                J("M")
            },
            selectYear: function(b) {
                var c = parseInt(a(b.target).text(), 10) || 0;
                f.year(c),
                k === p ? (_(e.clone().year(f.year())),
                d.inline || aa()) : (K(-1),
                V()),
                J("YYYY")
            },
            selectDecade: function(b) {
                var c = parseInt(a(b.target).data("selection"), 10) || 0;
                f.year(c),
                k === p ? (_(e.clone().year(f.year())),
                d.inline || aa()) : (K(-1),
                V()),
                J("YYYY")
            },
            selectDay: function(b) {
                var c = f.clone();
                a(b.target).is(".old") && c.subtract(1, "M"),
                a(b.target).is(".new") && c.add(1, "M"),
                _(c.date(parseInt(a(b.target).text(), 10))),
                z() || d.keepOpen || d.inline || aa()
            },
            incrementHours: function() {
                var a = e.clone().add(1, "h");
                Q(a, "h") && _(a)
            },
            incrementMinutes: function() {
                var a = e.clone().add(d.stepping, "m");
                Q(a, "m") && _(a)
            },
            incrementSeconds: function() {
                var a = e.clone().add(1, "s");
                Q(a, "s") && _(a)
            },
            decrementHours: function() {
                var a = e.clone().subtract(1, "h");
                Q(a, "h") && _(a)
            },
            decrementMinutes: function() {
                var a = e.clone().subtract(d.stepping, "m");
                Q(a, "m") && _(a)
            },
            decrementSeconds: function() {
                var a = e.clone().subtract(1, "s");
                Q(a, "s") && _(a)
            },
            togglePeriod: function() {
                _(e.clone().add(e.hours() >= 12 ? -12 : 12, "h"))
            },
            togglePicker: function(b) {
                var c, e = a(b.target), f = e.closest("ul"), g = f.find(".in"), h = f.find(".collapse:not(.in)");
                if (g && g.length) {
                    if (c = g.data("collapse"),
                    c && c.transitioning)
                        return;
                    g.collapse ? (g.collapse("hide"),
                    h.collapse("show")) : (g.removeClass("in"),
                    h.addClass("in")),
                    e.is("span") ? e.toggleClass(d.icons.time + " " + d.icons.date) : e.find("span").toggleClass(d.icons.time + " " + d.icons.date)
                }
            },
            showPicker: function() {
                o.find(".timepicker > div:not(.timepicker-picker)").hide(),
                o.find(".timepicker .timepicker-picker").show()
            },
            showHours: function() {
                o.find(".timepicker .timepicker-picker").hide(),
                o.find(".timepicker .timepicker-hours").show()
            },
            showMinutes: function() {
                o.find(".timepicker .timepicker-picker").hide(),
                o.find(".timepicker .timepicker-minutes").show()
            },
            showSeconds: function() {
                o.find(".timepicker .timepicker-picker").hide(),
                o.find(".timepicker .timepicker-seconds").show()
            },
            selectHour: function(b) {
                var c = parseInt(a(b.target).text(), 10);
                h || (e.hours() >= 12 ? 12 !== c && (c += 12) : 12 === c && (c = 0)),
                _(e.clone().hours(c)),
                ca.showPicker.call(l)
            },
            selectMinute: function(b) {
                _(e.clone().minutes(parseInt(a(b.target).text(), 10))),
                ca.showPicker.call(l)
            },
            selectSecond: function(b) {
                _(e.clone().seconds(parseInt(a(b.target).text(), 10))),
                ca.showPicker.call(l)
            },
            clear: ba,
            today: function() {
                var a = x();
                Q(a, "d") && _(a)
            },
            close: aa
        }, da = function(b) {
            return a(b.currentTarget).is(".disabled") ? !1 : (ca[a(b.currentTarget).data("action")].apply(l, arguments),
            !1)
        }, ea = function() {
            var b, c = {
                year: function(a) {
                    return a.month(0).date(1).hours(0).seconds(0).minutes(0)
                },
                month: function(a) {
                    return a.date(1).hours(0).seconds(0).minutes(0)
                },
                day: function(a) {
                    return a.hours(0).seconds(0).minutes(0)
                },
                hour: function(a) {
                    return a.seconds(0).minutes(0)
                },
                minute: function(a) {
                    return a.seconds(0)
                }
            };
            return g.prop("disabled") || !d.ignoreReadonly && g.prop("readonly") || o ? l : (void 0 !== g.val() && 0 !== g.val().trim().length ? _(ga(g.val().trim())) : d.useCurrent && m && (g.is("input") && 0 === g.val().trim().length || d.inline) && (b = x(),
            "string" == typeof d.useCurrent && (b = c[d.useCurrent](b)),
            _(b)),
            o = F(),
            L(),
            R(),
            o.find(".timepicker-hours").hide(),
            o.find(".timepicker-minutes").hide(),
            o.find(".timepicker-seconds").hide(),
            $(),
            K(),
            a(window).on("resize", H),
            o.on("click", "[data-action]", da),
            o.on("mousedown", !1),
            n && n.hasClass("btn") && n.toggleClass("active"),
            o.show(),
            H(),
            d.focusOnShow && !g.is(":focus") && g.focus(),
            I({
                type: "dp.show"
            }),
            l)
        }, fa = function() {
            return o ? aa() : ea()
        }, ga = function(a) {
            return a = void 0 === d.parseInputDate ? b.isMoment(a) || a instanceof Date ? b(a) : x(a) : d.parseInputDate(a),
            a.locale(d.locale),
            a
        }, ha = function(a) {
            var b, c, e, f, g = null, h = [], i = {}, j = a.which, k = "p";
            w[j] = k;
            for (b in w)
                w.hasOwnProperty(b) && w[b] === k && (h.push(b),
                parseInt(b, 10) !== j && (i[b] = !0));
            for (b in d.keyBinds)
                if (d.keyBinds.hasOwnProperty(b) && "function" == typeof d.keyBinds[b] && (e = b.split(" "),
                e.length === h.length && v[j] === e[e.length - 1])) {
                    for (f = !0,
                    c = e.length - 2; c >= 0; c--)
                        if (!(v[e[c]]in i)) {
                            f = !1;
                            break
                        }
                    if (f) {
                        g = d.keyBinds[b];
                        break
                    }
                }
            g && (g.call(l, o),
            a.stopPropagation(),
            a.preventDefault())
        }, ia = function(a) {
            w[a.which] = "r",
            a.stopPropagation(),
            a.preventDefault()
        }, ja = function(b) {
            var c = a(b.target).val().trim()
              , d = c ? ga(c) : null;
            return _(d),
            b.stopImmediatePropagation(),
            !1
        }, ka = function() {
            g.on({
                change: ja,
                blur: d.debug ? "" : aa,
                keydown: ha,
                keyup: ia,
                focus: d.allowInputToggle ? ea : ""
            }),
            c.is("input") ? g.on({
                focus: ea
            }) : n && (n.on("click", fa),
            n.on("mousedown", !1))
        }, la = function() {
            g.off({
                change: ja,
                blur: blur,
                keydown: ha,
                keyup: ia,
                focus: d.allowInputToggle ? aa : ""
            }),
            c.is("input") ? g.off({
                focus: ea
            }) : n && (n.off("click", fa),
            n.off("mousedown", !1))
        }, ma = function(b) {
            var c = {};
            return a.each(b, function() {
                var a = ga(this);
                a.isValid() && (c[a.format("YYYY-MM-DD")] = !0)
            }),
            Object.keys(c).length ? c : !1
        }, na = function(b) {
            var c = {};
            return a.each(b, function() {
                c[this] = !0
            }),
            Object.keys(c).length ? c : !1
        }, oa = function() {
            var a = d.format || "L LT";
            i = a.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function(a) {
                var b = e.localeData().longDateFormat(a) || a;
                return b.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function(a) {
                    return e.localeData().longDateFormat(a) || a
                })
            }),
            j = d.extraFormats ? d.extraFormats.slice() : [],
            j.indexOf(a) < 0 && j.indexOf(i) < 0 && j.push(i),
            h = i.toLowerCase().indexOf("a") < 1 && i.replace(/\[.*?\]/g, "").indexOf("h") < 1,
            y("y") && (p = 2),
            y("M") && (p = 1),
            y("d") && (p = 0),
            k = Math.max(p, k),
            m || _(e)
        };
        if (l.destroy = function() {
            aa(),
            la(),
            c.removeData("DateTimePicker"),
            c.removeData("date")
        }
        ,
        l.toggle = fa,
        l.show = ea,
        l.hide = aa,
        l.disable = function() {
            return aa(),
            n && n.hasClass("btn") && n.addClass("disabled"),
            g.prop("disabled", !0),
            l
        }
        ,
        l.enable = function() {
            return n && n.hasClass("btn") && n.removeClass("disabled"),
            g.prop("disabled", !1),
            l
        }
        ,
        l.ignoreReadonly = function(a) {
            if (0 === arguments.length)
                return d.ignoreReadonly;
            if ("boolean" != typeof a)
                throw new TypeError("ignoreReadonly () expects a boolean parameter");
            return d.ignoreReadonly = a,
            l
        }
        ,
        l.options = function(b) {
            if (0 === arguments.length)
                return a.extend(!0, {}, d);
            if (!(b instanceof Object))
                throw new TypeError("options() options parameter should be an object");
            return a.extend(!0, d, b),
            a.each(d, function(a, b) {
                if (void 0 === l[a])
                    throw new TypeError("option " + a + " is not recognized!");
                l[a](b)
            }),
            l
        }
        ,
        l.date = function(a) {
            if (0 === arguments.length)
                return m ? null : e.clone();
            if (!(null === a || "string" == typeof a || b.isMoment(a) || a instanceof Date))
                throw new TypeError("date() parameter must be one of [null, string, moment or Date]");
            return _(null === a ? null : ga(a)),
            l
        }
        ,
        l.format = function(a) {
            if (0 === arguments.length)
                return d.format;
            if ("string" != typeof a && ("boolean" != typeof a || a !== !1))
                throw new TypeError("format() expects a sting or boolean:false parameter " + a);
            return d.format = a,
            i && oa(),
            l
        }
        ,
        l.timeZone = function(a) {
            return 0 === arguments.length ? d.timeZone : (d.timeZone = a,
            l)
        }
        ,
        l.dayViewHeaderFormat = function(a) {
            if (0 === arguments.length)
                return d.dayViewHeaderFormat;
            if ("string" != typeof a)
                throw new TypeError("dayViewHeaderFormat() expects a string parameter");
            return d.dayViewHeaderFormat = a,
            l
        }
        ,
        l.extraFormats = function(a) {
            if (0 === arguments.length)
                return d.extraFormats;
            if (a !== !1 && !(a instanceof Array))
                throw new TypeError("extraFormats() expects an array or false parameter");
            return d.extraFormats = a,
            j && oa(),
            l
        }
        ,
        l.disabledDates = function(b) {
            if (0 === arguments.length)
                return d.disabledDates ? a.extend({}, d.disabledDates) : d.disabledDates;
            if (!b)
                return d.disabledDates = !1,
                $(),
                l;
            if (!(b instanceof Array))
                throw new TypeError("disabledDates() expects an array parameter");
            return d.disabledDates = ma(b),
            d.enabledDates = !1,
            $(),
            l
        }
        ,
        l.enabledDates = function(b) {
            if (0 === arguments.length)
                return d.enabledDates ? a.extend({}, d.enabledDates) : d.enabledDates;
            if (!b)
                return d.enabledDates = !1,
                $(),
                l;
            if (!(b instanceof Array))
                throw new TypeError("enabledDates() expects an array parameter");
            return d.enabledDates = ma(b),
            d.disabledDates = !1,
            $(),
            l
        }
        ,
        l.daysOfWeekDisabled = function(a) {
            if (0 === arguments.length)
                return d.daysOfWeekDisabled.splice(0);
            if ("boolean" == typeof a && !a)
                return d.daysOfWeekDisabled = !1,
                $(),
                l;
            if (!(a instanceof Array))
                throw new TypeError("daysOfWeekDisabled() expects an array parameter");
            if (d.daysOfWeekDisabled = a.reduce(function(a, b) {
                return b = parseInt(b, 10),
                b > 6 || 0 > b || isNaN(b) ? a : (-1 === a.indexOf(b) && a.push(b),
                a)
            }, []).sort(),
            d.useCurrent && !d.keepInvalid) {
                for (var b = 0; !Q(e, "d"); ) {
                    if (e.add(1, "d"),
                    7 === b)
                        throw "Tried 7 times to find a valid date";
                    b++
                }
                _(e)
            }
            return $(),
            l
        }
        ,
        l.maxDate = function(a) {
            if (0 === arguments.length)
                return d.maxDate ? d.maxDate.clone() : d.maxDate;
            if ("boolean" == typeof a && a === !1)
                return d.maxDate = !1,
                $(),
                l;
            "string" == typeof a && ("now" === a || "moment" === a) && (a = x());
            var b = ga(a);
            if (!b.isValid())
                throw new TypeError("maxDate() Could not parse date parameter: " + a);
            if (d.minDate && b.isBefore(d.minDate))
                throw new TypeError("maxDate() date parameter is before options.minDate: " + b.format(i));
            return d.maxDate = b,
            d.useCurrent && !d.keepInvalid && e.isAfter(a) && _(d.maxDate),
            f.isAfter(b) && (f = b.clone().subtract(d.stepping, "m")),
            $(),
            l
        }
        ,
        l.minDate = function(a) {
            if (0 === arguments.length)
                return d.minDate ? d.minDate.clone() : d.minDate;
            if ("boolean" == typeof a && a === !1)
                return d.minDate = !1,
                $(),
                l;
            "string" == typeof a && ("now" === a || "moment" === a) && (a = x());
            var b = ga(a);
            if (!b.isValid())
                throw new TypeError("minDate() Could not parse date parameter: " + a);
            if (d.maxDate && b.isAfter(d.maxDate))
                throw new TypeError("minDate() date parameter is after options.maxDate: " + b.format(i));
            return d.minDate = b,
            d.useCurrent && !d.keepInvalid && e.isBefore(a) && _(d.minDate),
            f.isBefore(b) && (f = b.clone().add(d.stepping, "m")),
            $(),
            l
        }
        ,
        l.defaultDate = function(a) {
            if (0 === arguments.length)
                return d.defaultDate ? d.defaultDate.clone() : d.defaultDate;
            if (!a)
                return d.defaultDate = !1,
                l;
            "string" == typeof a && ("now" === a || "moment" === a) && (a = x());
            var b = ga(a);
            if (!b.isValid())
                throw new TypeError("defaultDate() Could not parse date parameter: " + a);
            if (!Q(b))
                throw new TypeError("defaultDate() date passed is invalid according to component setup validations");
            return d.defaultDate = b,
            (d.defaultDate && d.inline || "" === g.val().trim()) && _(d.defaultDate),
            l
        }
        ,
        l.locale = function(a) {
            if (0 === arguments.length)
                return d.locale;
            if (!b.localeData(a))
                throw new TypeError("locale() locale " + a + " is not loaded from moment locales!");
            return d.locale = a,
            e.locale(d.locale),
            f.locale(d.locale),
            i && oa(),
            o && (aa(),
            ea()),
            l
        }
        ,
        l.stepping = function(a) {
            return 0 === arguments.length ? d.stepping : (a = parseInt(a, 10),
            (isNaN(a) || 1 > a) && (a = 1),
            d.stepping = a,
            l)
        }
        ,
        l.useCurrent = function(a) {
            var b = ["year", "month", "day", "hour", "minute"];
            if (0 === arguments.length)
                return d.useCurrent;
            if ("boolean" != typeof a && "string" != typeof a)
                throw new TypeError("useCurrent() expects a boolean or string parameter");
            if ("string" == typeof a && -1 === b.indexOf(a.toLowerCase()))
                throw new TypeError("useCurrent() expects a string parameter of " + b.join(", "));
            return d.useCurrent = a,
            l
        }
        ,
        l.collapse = function(a) {
            if (0 === arguments.length)
                return d.collapse;
            if ("boolean" != typeof a)
                throw new TypeError("collapse() expects a boolean parameter");
            return d.collapse === a ? l : (d.collapse = a,
            o && (aa(),
            ea()),
            l)
        }
        ,
        l.icons = function(b) {
            if (0 === arguments.length)
                return a.extend({}, d.icons);
            if (!(b instanceof Object))
                throw new TypeError("icons() expects parameter to be an Object");
            return a.extend(d.icons, b),
            o && (aa(),
            ea()),
            l
        }
        ,
        l.tooltips = function(b) {
            if (0 === arguments.length)
                return a.extend({}, d.tooltips);
            if (!(b instanceof Object))
                throw new TypeError("tooltips() expects parameter to be an Object");
            return a.extend(d.tooltips, b),
            o && (aa(),
            ea()),
            l
        }
        ,
        l.useStrict = function(a) {
            if (0 === arguments.length)
                return d.useStrict;
            if ("boolean" != typeof a)
                throw new TypeError("useStrict() expects a boolean parameter");
            return d.useStrict = a,
            l
        }
        ,
        l.sideBySide = function(a) {
            if (0 === arguments.length)
                return d.sideBySide;
            if ("boolean" != typeof a)
                throw new TypeError("sideBySide() expects a boolean parameter");
            return d.sideBySide = a,
            o && (aa(),
            ea()),
            l
        }
        ,
        l.viewMode = function(a) {
            if (0 === arguments.length)
                return d.viewMode;
            if ("string" != typeof a)
                throw new TypeError("viewMode() expects a string parameter");
            if (-1 === r.indexOf(a))
                throw new TypeError("viewMode() parameter must be one of (" + r.join(", ") + ") value");
            return d.viewMode = a,
            k = Math.max(r.indexOf(a), p),
            K(),
            l
        }
        ,
        l.toolbarPlacement = function(a) {
            if (0 === arguments.length)
                return d.toolbarPlacement;
            if ("string" != typeof a)
                throw new TypeError("toolbarPlacement() expects a string parameter");
            if (-1 === u.indexOf(a))
                throw new TypeError("toolbarPlacement() parameter must be one of (" + u.join(", ") + ") value");
            return d.toolbarPlacement = a,
            o && (aa(),
            ea()),
            l
        }
        ,
        l.widgetPositioning = function(b) {
            if (0 === arguments.length)
                return a.extend({}, d.widgetPositioning);
            if ("[object Object]" !== {}.toString.call(b))
                throw new TypeError("widgetPositioning() expects an object variable");
            if (b.horizontal) {
                if ("string" != typeof b.horizontal)
                    throw new TypeError("widgetPositioning() horizontal variable must be a string");
                if (b.horizontal = b.horizontal.toLowerCase(),
                -1 === t.indexOf(b.horizontal))
                    throw new TypeError("widgetPositioning() expects horizontal parameter to be one of (" + t.join(", ") + ")");
                d.widgetPositioning.horizontal = b.horizontal
            }
            if (b.vertical) {
                if ("string" != typeof b.vertical)
                    throw new TypeError("widgetPositioning() vertical variable must be a string");
                if (b.vertical = b.vertical.toLowerCase(),
                -1 === s.indexOf(b.vertical))
                    throw new TypeError("widgetPositioning() expects vertical parameter to be one of (" + s.join(", ") + ")");
                d.widgetPositioning.vertical = b.vertical
            }
            return $(),
            l
        }
        ,
        l.calendarWeeks = function(a) {
            if (0 === arguments.length)
                return d.calendarWeeks;
            if ("boolean" != typeof a)
                throw new TypeError("calendarWeeks() expects parameter to be a boolean value");
            return d.calendarWeeks = a,
            $(),
            l
        }
        ,
        l.showTodayButton = function(a) {
            if (0 === arguments.length)
                return d.showTodayButton;
            if ("boolean" != typeof a)
                throw new TypeError("showTodayButton() expects a boolean parameter");
            return d.showTodayButton = a,
            o && (aa(),
            ea()),
            l
        }
        ,
        l.showClear = function(a) {
            if (0 === arguments.length)
                return d.showClear;
            if ("boolean" != typeof a)
                throw new TypeError("showClear() expects a boolean parameter");
            return d.showClear = a,
            o && (aa(),
            ea()),
            l
        }
        ,
        l.widgetParent = function(b) {
            if (0 === arguments.length)
                return d.widgetParent;
            if ("string" == typeof b && (b = a(b)),
            null !== b && "string" != typeof b && !(b instanceof a))
                throw new TypeError("widgetParent() expects a string or a jQuery object parameter");
            return d.widgetParent = b,
            o && (aa(),
            ea()),
            l
        }
        ,
        l.keepOpen = function(a) {
            if (0 === arguments.length)
                return d.keepOpen;
            if ("boolean" != typeof a)
                throw new TypeError("keepOpen() expects a boolean parameter");
            return d.keepOpen = a,
            l
        }
        ,
        l.focusOnShow = function(a) {
            if (0 === arguments.length)
                return d.focusOnShow;
            if ("boolean" != typeof a)
                throw new TypeError("focusOnShow() expects a boolean parameter");
            return d.focusOnShow = a,
            l
        }
        ,
        l.inline = function(a) {
            if (0 === arguments.length)
                return d.inline;
            if ("boolean" != typeof a)
                throw new TypeError("inline() expects a boolean parameter");
            return d.inline = a,
            l
        }
        ,
        l.clear = function() {
            return ba(),
            l
        }
        ,
        l.keyBinds = function(a) {
            return d.keyBinds = a,
            l
        }
        ,
        l.getMoment = function(a) {
            return x(a)
        }
        ,
        l.debug = function(a) {
            if ("boolean" != typeof a)
                throw new TypeError("debug() expects a boolean parameter");
            return d.debug = a,
            l
        }
        ,
        l.allowInputToggle = function(a) {
            if (0 === arguments.length)
                return d.allowInputToggle;
            if ("boolean" != typeof a)
                throw new TypeError("allowInputToggle() expects a boolean parameter");
            return d.allowInputToggle = a,
            l
        }
        ,
        l.showClose = function(a) {
            if (0 === arguments.length)
                return d.showClose;
            if ("boolean" != typeof a)
                throw new TypeError("showClose() expects a boolean parameter");
            return d.showClose = a,
            l
        }
        ,
        l.keepInvalid = function(a) {
            if (0 === arguments.length)
                return d.keepInvalid;
            if ("boolean" != typeof a)
                throw new TypeError("keepInvalid() expects a boolean parameter");
            return d.keepInvalid = a,
            l
        }
        ,
        l.datepickerInput = function(a) {
            if (0 === arguments.length)
                return d.datepickerInput;
            if ("string" != typeof a)
                throw new TypeError("datepickerInput() expects a string parameter");
            return d.datepickerInput = a,
            l
        }
        ,
        l.parseInputDate = function(a) {
            if (0 === arguments.length)
                return d.parseInputDate;
            if ("function" != typeof a)
                throw new TypeError("parseInputDate() sholud be as function");
            return d.parseInputDate = a,
            l
        }
        ,
        l.disabledTimeIntervals = function(b) {
            if (0 === arguments.length)
                return d.disabledTimeIntervals ? a.extend({}, d.disabledTimeIntervals) : d.disabledTimeIntervals;
            if (!b)
                return d.disabledTimeIntervals = !1,
                $(),
                l;
            if (!(b instanceof Array))
                throw new TypeError("disabledTimeIntervals() expects an array parameter");
            return d.disabledTimeIntervals = b,
            $(),
            l
        }
        ,
        l.disabledHours = function(b) {
            if (0 === arguments.length)
                return d.disabledHours ? a.extend({}, d.disabledHours) : d.disabledHours;
            if (!b)
                return d.disabledHours = !1,
                $(),
                l;
            if (!(b instanceof Array))
                throw new TypeError("disabledHours() expects an array parameter");
            if (d.disabledHours = na(b),
            d.enabledHours = !1,
            d.useCurrent && !d.keepInvalid) {
                for (var c = 0; !Q(e, "h"); ) {
                    if (e.add(1, "h"),
                    24 === c)
                        throw "Tried 24 times to find a valid date";
                    c++
                }
                _(e)
            }
            return $(),
            l
        }
        ,
        l.enabledHours = function(b) {
            if (0 === arguments.length)
                return d.enabledHours ? a.extend({}, d.enabledHours) : d.enabledHours;
            if (!b)
                return d.enabledHours = !1,
                $(),
                l;
            if (!(b instanceof Array))
                throw new TypeError("enabledHours() expects an array parameter");
            if (d.enabledHours = na(b),
            d.disabledHours = !1,
            d.useCurrent && !d.keepInvalid) {
                for (var c = 0; !Q(e, "h"); ) {
                    if (e.add(1, "h"),
                    24 === c)
                        throw "Tried 24 times to find a valid date";
                    c++
                }
                _(e)
            }
            return $(),
            l
        }
        ,
        l.viewDate = function(a) {
            if (0 === arguments.length)
                return f.clone();
            if (!a)
                return f = e.clone(),
                l;
            if (!("string" == typeof a || b.isMoment(a) || a instanceof Date))
                throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");
            return f = ga(a),
            J(),
            l
        }
        ,
        c.is("input"))
            g = c;
        else if (g = c.find(d.datepickerInput),
        0 === g.size())
            g = c.find("input");
        else if (!g.is("input"))
            throw new Error('CSS class "' + d.datepickerInput + '" cannot be applied to non input element');
        if (c.hasClass("input-group") && (n = 0 === c.find(".datepickerbutton").size() ? c.find(".input-group-addon") : c.find(".datepickerbutton")),
        !d.inline && !g.is("input"))
            throw new Error("Could not initialize DateTimePicker without an input element");
        return e = x(),
        f = e.clone(),
        a.extend(!0, d, G()),
        l.options(d),
        oa(),
        ka(),
        g.prop("disabled") && l.disable(),
        g.is("input") && 0 !== g.val().trim().length ? _(ga(g.val().trim())) : d.defaultDate && void 0 === g.attr("placeholder") && _(d.defaultDate),
        d.inline && ea(),
        l
    };
    a.fn.datetimepicker = function(b) {
        return this.each(function() {
            var d = a(this);
            d.data("DateTimePicker") || (b = a.extend(!0, {}, a.fn.datetimepicker.defaults, b),
            d.data("DateTimePicker", c(d, b)))
        })
    }
    ,
    a.fn.datetimepicker.defaults = {
        timeZone: "Etc/UTC",
        format: !1,
        dayViewHeaderFormat: "MMMM YYYY",
        extraFormats: !1,
        stepping: 1,
        minDate: !1,
        maxDate: !1,
        useCurrent: !0,
        collapse: !0,
        locale: b.locale(),
        defaultDate: !1,
        disabledDates: !1,
        enabledDates: !1,
        icons: {
            time: "glyphicon glyphicon-time",
            date: "glyphicon glyphicon-calendar",
            up: "glyphicon glyphicon-chevron-up",
            down: "glyphicon glyphicon-chevron-down",
            previous: "glyphicon glyphicon-chevron-left",
            next: "glyphicon glyphicon-chevron-right",
            today: "glyphicon glyphicon-screenshot",
            clear: "glyphicon glyphicon-trash",
            close: "glyphicon glyphicon-remove"
        },
        tooltips: {
            today: "Go to today",
            clear: "Clear selection",
            close: "Close the picker",
            selectMonth: "Select Month",
            prevMonth: "Previous Month",
            nextMonth: "Next Month",
            selectYear: "Select Year",
            prevYear: "Previous Year",
            nextYear: "Next Year",
            selectDecade: "Select Decade",
            prevDecade: "Previous Decade",
            nextDecade: "Next Decade",
            prevCentury: "Previous Century",
            nextCentury: "Next Century",
            pickHour: "Pick Hour",
            incrementHour: "Increment Hour",
            decrementHour: "Decrement Hour",
            pickMinute: "Pick Minute",
            incrementMinute: "Increment Minute",
            decrementMinute: "Decrement Minute",
            pickSecond: "Pick Second",
            incrementSecond: "Increment Second",
            decrementSecond: "Decrement Second",
            togglePeriod: "Toggle Period",
            selectTime: "Select Time"
        },
        useStrict: !1,
        sideBySide: !1,
        daysOfWeekDisabled: !1,
        calendarWeeks: !1,
        viewMode: "days",
        toolbarPlacement: "default",
        showTodayButton: !1,
        showClear: !1,
        showClose: !1,
        widgetPositioning: {
            horizontal: "auto",
            vertical: "auto"
        },
        widgetParent: null,
        ignoreReadonly: !1,
        keepOpen: !1,
        focusOnShow: !0,
        inline: !1,
        keepInvalid: !1,
        datepickerInput: ".datepickerinput",
        keyBinds: {
            up: function(a) {
                if (a) {
                    var b = this.date() || this.getMoment();
                    a.find(".datepicker").is(":visible") ? this.date(b.clone().subtract(7, "d")) : this.date(b.clone().add(this.stepping(), "m"))
                }
            },
            down: function(a) {
                if (!a)
                    return void this.show();
                var b = this.date() || this.getMoment();
                a.find(".datepicker").is(":visible") ? this.date(b.clone().add(7, "d")) : this.date(b.clone().subtract(this.stepping(), "m"))
            },
            "control up": function(a) {
                if (a) {
                    var b = this.date() || this.getMoment();
                    a.find(".datepicker").is(":visible") ? this.date(b.clone().subtract(1, "y")) : this.date(b.clone().add(1, "h"))
                }
            },
            "control down": function(a) {
                if (a) {
                    var b = this.date() || this.getMoment();
                    a.find(".datepicker").is(":visible") ? this.date(b.clone().add(1, "y")) : this.date(b.clone().subtract(1, "h"))
                }
            },
            left: function(a) {
                if (a) {
                    var b = this.date() || this.getMoment();
                    a.find(".datepicker").is(":visible") && this.date(b.clone().subtract(1, "d"))
                }
            },
            right: function(a) {
                if (a) {
                    var b = this.date() || this.getMoment();
                    a.find(".datepicker").is(":visible") && this.date(b.clone().add(1, "d"))
                }
            },
            pageUp: function(a) {
                if (a) {
                    var b = this.date() || this.getMoment();
                    a.find(".datepicker").is(":visible") && this.date(b.clone().subtract(1, "M"))
                }
            },
            pageDown: function(a) {
                if (a) {
                    var b = this.date() || this.getMoment();
                    a.find(".datepicker").is(":visible") && this.date(b.clone().add(1, "M"))
                }
            },
            enter: function() {
                this.hide()
            },
            escape: function() {
                this.hide()
            },
            "control space": function(a) {
                a.find(".timepicker").is(":visible") && a.find('.btn[data-action="togglePeriod"]').click()
            },
            t: function() {
                this.date(this.getMoment())
            },
            "delete": function() {
                this.clear()
            }
        },
        debug: !1,
        allowInputToggle: !1,
        disabledTimeIntervals: !1,
        disabledHours: !1,
        enabledHours: !1,
        viewDate: !1
    }
});
(function() {
    function o(n) {
        var i = e;
        n && (e[n] || (e[n] = {}),
        i = e[n]);
        if (!i.define || !i.define.packaged)
            t.original = i.define,
            i.define = t,
            i.define.packaged = !0;
        if (!i.require || !i.require.packaged)
            r.original = i.require,
            i.require = r,
            i.require.packaged = !0
    }
    var ACE_NAMESPACE = ""
      , e = function() {
        return this
    }();
    !e && typeof window != "undefined" && (e = window);
    if (!ACE_NAMESPACE && typeof requirejs != "undefined")
        return;
    var t = function(e, n, r) {
        if (typeof e != "string") {
            t.original ? t.original.apply(this, arguments) : (console.error("dropping module because define wasn't a string."),
            console.trace());
            return
        }
        arguments.length == 2 && (r = n),
        t.modules[e] || (t.payloads[e] = r,
        t.modules[e] = null)
    };
    t.modules = {},
    t.payloads = {};
    var n = function(e, t, n) {
        if (typeof t == "string") {
            var i = s(e, t);
            if (i != undefined)
                return n && n(),
                i
        } else if (Object.prototype.toString.call(t) === "[object Array]") {
            var o = [];
            for (var u = 0, a = t.length; u < a; ++u) {
                var f = s(e, t[u]);
                if (f == undefined && r.original)
                    return;
                o.push(f)
            }
            return n && n.apply(null, o) || !0
        }
    }
      , r = function(e, t) {
        var i = n("", e, t);
        return i == undefined && r.original ? r.original.apply(this, arguments) : i
    }
      , i = function(e, t) {
        if (t.indexOf("!") !== -1) {
            var n = t.split("!");
            return i(e, n[0]) + "!" + i(e, n[1])
        }
        if (t.charAt(0) == ".") {
            var r = e.split("/").slice(0, -1).join("/");
            t = r + "/" + t;
            while (t.indexOf(".") !== -1 && s != t) {
                var s = t;
                t = t.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "")
            }
        }
        return t
    }
      , s = function(e, r) {
        r = i(e, r);
        var s = t.modules[r];
        if (!s) {
            s = t.payloads[r];
            if (typeof s == "function") {
                var o = {}
                  , u = {
                    id: r,
                    uri: "",
                    exports: o,
                    packaged: !0
                }
                  , a = function(e, t) {
                    return n(r, e, t)
                }
                  , f = s(a, o, u);
                o = f || u.exports,
                t.modules[r] = o,
                delete t.payloads[r]
            }
            s = t.modules[r] = o || s
        }
        return s
    };
    o(ACE_NAMESPACE)
}
)(),
define("ace/lib/regexp", ["require", "exports", "module"], function(e, t, n) {
    "use strict";
    function o(e) {
        return (e.global ? "g" : "") + (e.ignoreCase ? "i" : "") + (e.multiline ? "m" : "") + (e.extended ? "x" : "") + (e.sticky ? "y" : "")
    }
    function u(e, t, n) {
        if (Array.prototype.indexOf)
            return e.indexOf(t, n);
        for (var r = n || 0; r < e.length; r++)
            if (e[r] === t)
                return r;
        return -1
    }
    var r = {
        exec: RegExp.prototype.exec,
        test: RegExp.prototype.test,
        match: String.prototype.match,
        replace: String.prototype.replace,
        split: String.prototype.split
    }
      , i = r.exec.call(/()??/, "")[1] === undefined
      , s = function() {
        var e = /^/g;
        return r.test.call(e, ""),
        !e.lastIndex
    }();
    if (s && i)
        return;
    RegExp.prototype.exec = function(e) {
        var t = r.exec.apply(this, arguments), n, a;
        if (typeof e == "string" && t) {
            !i && t.length > 1 && u(t, "") > -1 && (a = RegExp(this.source, r.replace.call(o(this), "g", "")),
            r.replace.call(e.slice(t.index), a, function() {
                for (var e = 1; e < arguments.length - 2; e++)
                    arguments[e] === undefined && (t[e] = undefined)
            }));
            if (this._xregexp && this._xregexp.captureNames)
                for (var f = 1; f < t.length; f++)
                    n = this._xregexp.captureNames[f - 1],
                    n && (t[n] = t[f]);
            !s && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--
        }
        return t
    }
    ,
    s || (RegExp.prototype.test = function(e) {
        var t = r.exec.call(this, e);
        return t && this.global && !t[0].length && this.lastIndex > t.index && this.lastIndex--,
        !!t
    }
    )
}),
define("ace/lib/es5-shim", ["require", "exports", "module"], function(e, t, n) {
    function r() {}
    function w(e) {
        try {
            return Object.defineProperty(e, "sentinel", {}),
            "sentinel"in e
        } catch (t) {}
    }
    function H(e) {
        return e = +e,
        e !== e ? e = 0 : e !== 0 && e !== 1 / 0 && e !== -1 / 0 && (e = (e > 0 || -1) * Math.floor(Math.abs(e))),
        e
    }
    function B(e) {
        var t = typeof e;
        return e === null || t === "undefined" || t === "boolean" || t === "number" || t === "string"
    }
    function j(e) {
        var t, n, r;
        if (B(e))
            return e;
        n = e.valueOf;
        if (typeof n == "function") {
            t = n.call(e);
            if (B(t))
                return t
        }
        r = e.toString;
        if (typeof r == "function") {
            t = r.call(e);
            if (B(t))
                return t
        }
        throw new TypeError
    }
    Function.prototype.bind || (Function.prototype.bind = function(t) {
        var n = this;
        if (typeof n != "function")
            throw new TypeError("Function.prototype.bind called on incompatible " + n);
        var i = u.call(arguments, 1)
          , s = function() {
            if (this instanceof s) {
                var e = n.apply(this, i.concat(u.call(arguments)));
                return Object(e) === e ? e : this
            }
            return n.apply(t, i.concat(u.call(arguments)))
        };
        return n.prototype && (r.prototype = n.prototype,
        s.prototype = new r,
        r.prototype = null),
        s
    }
    );
    var i = Function.prototype.call, s = Array.prototype, o = Object.prototype, u = s.slice, a = i.bind(o.toString), f = i.bind(o.hasOwnProperty), l, c, h, p, d;
    if (d = f(o, "__defineGetter__"))
        l = i.bind(o.__defineGetter__),
        c = i.bind(o.__defineSetter__),
        h = i.bind(o.__lookupGetter__),
        p = i.bind(o.__lookupSetter__);
    if ([1, 2].splice(0).length != 2)
        if (!function() {
            function e(e) {
                var t = new Array(e + 2);
                return t[0] = t[1] = 0,
                t
            }
            var t = [], n;
            t.splice.apply(t, e(20)),
            t.splice.apply(t, e(26)),
            n = t.length,
            t.splice(5, 0, "XXX"),
            n + 1 == t.length;
            if (n + 1 == t.length)
                return !0
        }())
            Array.prototype.splice = function(e, t) {
                var n = this.length;
                e > 0 ? e > n && (e = n) : e == void 0 ? e = 0 : e < 0 && (e = Math.max(n + e, 0)),
                e + t < n || (t = n - e);
                var r = this.slice(e, e + t)
                  , i = u.call(arguments, 2)
                  , s = i.length;
                if (e === n)
                    s && this.push.apply(this, i);
                else {
                    var o = Math.min(t, n - e)
                      , a = e + o
                      , f = a + s - o
                      , l = n - a
                      , c = n - o;
                    if (f < a)
                        for (var h = 0; h < l; ++h)
                            this[f + h] = this[a + h];
                    else if (f > a)
                        for (h = l; h--; )
                            this[f + h] = this[a + h];
                    if (s && e === c)
                        this.length = c,
                        this.push.apply(this, i);
                    else {
                        this.length = c + s;
                        for (h = 0; h < s; ++h)
                            this[e + h] = i[h]
                    }
                }
                return r
            }
            ;
        else {
            var v = Array.prototype.splice;
            Array.prototype.splice = function(e, t) {
                return arguments.length ? v.apply(this, [e === void 0 ? 0 : e, t === void 0 ? this.length - e : t].concat(u.call(arguments, 2))) : []
            }
        }
    Array.isArray || (Array.isArray = function(t) {
        return a(t) == "[object Array]"
    }
    );
    var m = Object("a")
      , g = m[0] != "a" || !(0 in m);
    Array.prototype.forEach || (Array.prototype.forEach = function(t) {
        var n = F(this)
          , r = g && a(this) == "[object String]" ? this.split("") : n
          , i = arguments[1]
          , s = -1
          , o = r.length >>> 0;
        if (a(t) != "[object Function]")
            throw new TypeError;
        while (++s < o)
            s in r && t.call(i, r[s], s, n)
    }
    ),
    Array.prototype.map || (Array.prototype.map = function(t) {
        var n = F(this)
          , r = g && a(this) == "[object String]" ? this.split("") : n
          , i = r.length >>> 0
          , s = Array(i)
          , o = arguments[1];
        if (a(t) != "[object Function]")
            throw new TypeError(t + " is not a function");
        for (var u = 0; u < i; u++)
            u in r && (s[u] = t.call(o, r[u], u, n));
        return s
    }
    ),
    Array.prototype.filter || (Array.prototype.filter = function(t) {
        var n = F(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = [], o, u = arguments[1];
        if (a(t) != "[object Function]")
            throw new TypeError(t + " is not a function");
        for (var f = 0; f < i; f++)
            f in r && (o = r[f],
            t.call(u, o, f, n) && s.push(o));
        return s
    }
    ),
    Array.prototype.every || (Array.prototype.every = function(t) {
        var n = F(this)
          , r = g && a(this) == "[object String]" ? this.split("") : n
          , i = r.length >>> 0
          , s = arguments[1];
        if (a(t) != "[object Function]")
            throw new TypeError(t + " is not a function");
        for (var o = 0; o < i; o++)
            if (o in r && !t.call(s, r[o], o, n))
                return !1;
        return !0
    }
    ),
    Array.prototype.some || (Array.prototype.some = function(t) {
        var n = F(this)
          , r = g && a(this) == "[object String]" ? this.split("") : n
          , i = r.length >>> 0
          , s = arguments[1];
        if (a(t) != "[object Function]")
            throw new TypeError(t + " is not a function");
        for (var o = 0; o < i; o++)
            if (o in r && t.call(s, r[o], o, n))
                return !0;
        return !1
    }
    ),
    Array.prototype.reduce || (Array.prototype.reduce = function(t) {
        var n = F(this)
          , r = g && a(this) == "[object String]" ? this.split("") : n
          , i = r.length >>> 0;
        if (a(t) != "[object Function]")
            throw new TypeError(t + " is not a function");
        if (!i && arguments.length == 1)
            throw new TypeError("reduce of empty array with no initial value");
        var s = 0, o;
        if (arguments.length >= 2)
            o = arguments[1];
        else
            do {
                if (s in r) {
                    o = r[s++];
                    break
                }
                if (++s >= i)
                    throw new TypeError("reduce of empty array with no initial value")
            } while (!0);
        for (; s < i; s++)
            s in r && (o = t.call(void 0, o, r[s], s, n));
        return o
    }
    ),
    Array.prototype.reduceRight || (Array.prototype.reduceRight = function(t) {
        var n = F(this)
          , r = g && a(this) == "[object String]" ? this.split("") : n
          , i = r.length >>> 0;
        if (a(t) != "[object Function]")
            throw new TypeError(t + " is not a function");
        if (!i && arguments.length == 1)
            throw new TypeError("reduceRight of empty array with no initial value");
        var s, o = i - 1;
        if (arguments.length >= 2)
            s = arguments[1];
        else
            do {
                if (o in r) {
                    s = r[o--];
                    break
                }
                if (--o < 0)
                    throw new TypeError("reduceRight of empty array with no initial value")
            } while (!0);
        do
            o in this && (s = t.call(void 0, s, r[o], o, n));
        while (o--);
        return s
    }
    );
    if (!Array.prototype.indexOf || [0, 1].indexOf(1, 2) != -1)
        Array.prototype.indexOf = function(t) {
            var n = g && a(this) == "[object String]" ? this.split("") : F(this)
              , r = n.length >>> 0;
            if (!r)
                return -1;
            var i = 0;
            arguments.length > 1 && (i = H(arguments[1])),
            i = i >= 0 ? i : Math.max(0, r + i);
            for (; i < r; i++)
                if (i in n && n[i] === t)
                    return i;
            return -1
        }
        ;
    if (!Array.prototype.lastIndexOf || [0, 1].lastIndexOf(0, -3) != -1)
        Array.prototype.lastIndexOf = function(t) {
            var n = g && a(this) == "[object String]" ? this.split("") : F(this)
              , r = n.length >>> 0;
            if (!r)
                return -1;
            var i = r - 1;
            arguments.length > 1 && (i = Math.min(i, H(arguments[1]))),
            i = i >= 0 ? i : r - Math.abs(i);
            for (; i >= 0; i--)
                if (i in n && t === n[i])
                    return i;
            return -1
        }
        ;
    Object.getPrototypeOf || (Object.getPrototypeOf = function(t) {
        return t.__proto__ || (t.constructor ? t.constructor.prototype : o)
    }
    );
    if (!Object.getOwnPropertyDescriptor) {
        var y = "Object.getOwnPropertyDescriptor called on a non-object: ";
        Object.getOwnPropertyDescriptor = function(t, n) {
            if (typeof t != "object" && typeof t != "function" || t === null)
                throw new TypeError(y + t);
            if (!f(t, n))
                return;
            var r, i, s;
            r = {
                enumerable: !0,
                configurable: !0
            };
            if (d) {
                var u = t.__proto__;
                t.__proto__ = o;
                var i = h(t, n)
                  , s = p(t, n);
                t.__proto__ = u;
                if (i || s)
                    return i && (r.get = i),
                    s && (r.set = s),
                    r
            }
            return r.value = t[n],
            r
        }
    }
    Object.getOwnPropertyNames || (Object.getOwnPropertyNames = function(t) {
        return Object.keys(t)
    }
    );
    if (!Object.create) {
        var b;
        Object.prototype.__proto__ === null ? b = function() {
            return {
                __proto__: null
            }
        }
        : b = function() {
            var e = {};
            for (var t in e)
                e[t] = null;
            return e.constructor = e.hasOwnProperty = e.propertyIsEnumerable = e.isPrototypeOf = e.toLocaleString = e.toString = e.valueOf = e.__proto__ = null,
            e
        }
        ,
        Object.create = function(t, n) {
            var r;
            if (t === null)
                r = b();
            else {
                if (typeof t != "object")
                    throw new TypeError("typeof prototype[" + typeof t + "] != 'object'");
                var i = function() {};
                i.prototype = t,
                r = new i,
                r.__proto__ = t
            }
            return n !== void 0 && Object.defineProperties(r, n),
            r
        }
    }
    if (Object.defineProperty) {
        var E = w({})
          , S = typeof document == "undefined" || w(document.createElement("div"));
        if (!E || !S)
            var x = Object.defineProperty
    }
    if (!Object.defineProperty || x) {
        var T = "Property description must be an object: "
          , N = "Object.defineProperty called on non-object: "
          , C = "getters & setters can not be defined on this javascript engine";
        Object.defineProperty = function(t, n, r) {
            if (typeof t != "object" && typeof t != "function" || t === null)
                throw new TypeError(N + t);
            if (typeof r != "object" && typeof r != "function" || r === null)
                throw new TypeError(T + r);
            if (x)
                try {
                    return x.call(Object, t, n, r)
                } catch (i) {}
            if (f(r, "value"))
                if (d && (h(t, n) || p(t, n))) {
                    var s = t.__proto__;
                    t.__proto__ = o,
                    delete t[n],
                    t[n] = r.value,
                    t.__proto__ = s
                } else
                    t[n] = r.value;
            else {
                if (!d)
                    throw new TypeError(C);
                f(r, "get") && l(t, n, r.get),
                f(r, "set") && c(t, n, r.set)
            }
            return t
        }
    }
    Object.defineProperties || (Object.defineProperties = function(t, n) {
        for (var r in n)
            f(n, r) && Object.defineProperty(t, r, n[r]);
        return t
    }
    ),
    Object.seal || (Object.seal = function(t) {
        return t
    }
    ),
    Object.freeze || (Object.freeze = function(t) {
        return t
    }
    );
    try {
        Object.freeze(function() {})
    } catch (k) {
        Object.freeze = function(t) {
            return function(n) {
                return typeof n == "function" ? n : t(n)
            }
        }(Object.freeze)
    }
    Object.preventExtensions || (Object.preventExtensions = function(t) {
        return t
    }
    ),
    Object.isSealed || (Object.isSealed = function(t) {
        return !1
    }
    ),
    Object.isFrozen || (Object.isFrozen = function(t) {
        return !1
    }
    ),
    Object.isExtensible || (Object.isExtensible = function(t) {
        if (Object(t) === t)
            throw new TypeError;
        var n = "";
        while (f(t, n))
            n += "?";
        t[n] = !0;
        var r = f(t, n);
        return delete t[n],
        r
    }
    );
    if (!Object.keys) {
        var L = !0
          , A = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"]
          , O = A.length;
        for (var M in {
            toString: null
        })
            L = !1;
        Object.keys = function I(e) {
            if (typeof e != "object" && typeof e != "function" || e === null)
                throw new TypeError("Object.keys called on a non-object");
            var I = [];
            for (var t in e)
                f(e, t) && I.push(t);
            if (L)
                for (var n = 0, r = O; n < r; n++) {
                    var i = A[n];
                    f(e, i) && I.push(i)
                }
            return I
        }
    }
    Date.now || (Date.now = function() {
        return (new Date).getTime()
    }
    );
    var _ = "	\n\x0b\f\r \u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";
    if (!String.prototype.trim) {
        _ = "[" + _ + "]";
        var D = new RegExp("^" + _ + _ + "*")
          , P = new RegExp(_ + _ + "*$");
        String.prototype.trim = function() {
            return String(this).replace(D, "").replace(P, "")
        }
    }
    var F = function(e) {
        if (e == null)
            throw new TypeError("can't convert " + e + " to object");
        return Object(e)
    }
}),
define("ace/lib/fixoldbrowsers", ["require", "exports", "module", "ace/lib/regexp", "ace/lib/es5-shim"], function(e, t, n) {
    "use strict";
    e("./regexp"),
    e("./es5-shim"),
    typeof Element != "undefined" && !Element.prototype.remove && Object.defineProperty(Element.prototype, "remove", {
        enumerable: !1,
        writable: !0,
        configurable: !0,
        value: function() {
            this.parentNode && this.parentNode.removeChild(this)
        }
    })
}),
define("ace/lib/useragent", ["require", "exports", "module"], function(e, t, n) {
    "use strict";
    t.OS = {
        LINUX: "LINUX",
        MAC: "MAC",
        WINDOWS: "WINDOWS"
    },
    t.getOS = function() {
        return t.isMac ? t.OS.MAC : t.isLinux ? t.OS.LINUX : t.OS.WINDOWS
    }
    ;
    var r = typeof navigator == "object" ? navigator : {}
      , i = (/mac|win|linux/i.exec(r.platform) || ["other"])[0].toLowerCase()
      , s = r.userAgent || ""
      , o = r.appName || "";
    t.isWin = i == "win",
    t.isMac = i == "mac",
    t.isLinux = i == "linux",
    t.isIE = o == "Microsoft Internet Explorer" || o.indexOf("MSAppHost") >= 0 ? parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/) || [])[1]) : parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/) || [])[1]),
    t.isOldIE = t.isIE && t.isIE < 9,
    t.isGecko = t.isMozilla = s.match(/ Gecko\/\d+/),
    t.isOpera = typeof opera == "object" && Object.prototype.toString.call(window.opera) == "[object Opera]",
    t.isWebKit = parseFloat(s.split("WebKit/")[1]) || undefined,
    t.isChrome = parseFloat(s.split(" Chrome/")[1]) || undefined,
    t.isEdge = parseFloat(s.split(" Edge/")[1]) || undefined,
    t.isAIR = s.indexOf("AdobeAIR") >= 0,
    t.isAndroid = s.indexOf("Android") >= 0,
    t.isChromeOS = s.indexOf(" CrOS ") >= 0,
    t.isIOS = /iPad|iPhone|iPod/.test(s) && !window.MSStream,
    t.isIOS && (t.isMac = !0),
    t.isMobile = t.isIOS || t.isAndroid
}),
define("ace/lib/dom", ["require", "exports", "module", "ace/lib/useragent"], function(e, t, n) {
    "use strict";
    var r = e("./useragent")
      , i = "http://www.w3.org/1999/xhtml";
    t.buildDom = function o(e, t, n) {
        if (typeof e == "string" && e) {
            var r = document.createTextNode(e);
            return t && t.appendChild(r),
            r
        }
        if (!Array.isArray(e))
            return e;
        if (typeof e[0] != "string" || !e[0]) {
            var i = [];
            for (var s = 0; s < e.length; s++) {
                var u = o(e[s], t, n);
                u && i.push(u)
            }
            return i
        }
        var a = document.createElement(e[0])
          , f = e[1]
          , l = 1;
        f && typeof f == "object" && !Array.isArray(f) && (l = 2);
        for (var s = l; s < e.length; s++)
            o(e[s], a, n);
        return l == 2 && Object.keys(f).forEach(function(e) {
            var t = f[e];
            e === "class" ? a.className = Array.isArray(t) ? t.join(" ") : t : typeof t == "function" || e == "value" ? a[e] = t : e === "ref" ? n && (n[t] = a) : t != null && a.setAttribute(e, t)
        }),
        t && t.appendChild(a),
        a
    }
    ,
    t.getDocumentHead = function(e) {
        return e || (e = document),
        e.head || e.getElementsByTagName("head")[0] || e.documentElement
    }
    ,
    t.createElement = function(e, t) {
        return document.createElementNS ? document.createElementNS(t || i, e) : document.createElement(e)
    }
    ,
    t.removeChildren = function(e) {
        e.innerHTML = ""
    }
    ,
    t.createTextNode = function(e, t) {
        var n = t ? t.ownerDocument : document;
        return n.createTextNode(e)
    }
    ,
    t.createFragment = function(e) {
        var t = e ? e.ownerDocument : document;
        return t.createDocumentFragment()
    }
    ,
    t.hasCssClass = function(e, t) {
        var n = (e.className + "").split(/\s+/g);
        return n.indexOf(t) !== -1
    }
    ,
    t.addCssClass = function(e, n) {
        t.hasCssClass(e, n) || (e.className += " " + n)
    }
    ,
    t.removeCssClass = function(e, t) {
        var n = e.className.split(/\s+/g);
        for (; ; ) {
            var r = n.indexOf(t);
            if (r == -1)
                break;
            n.splice(r, 1)
        }
        e.className = n.join(" ")
    }
    ,
    t.toggleCssClass = function(e, t) {
        var n = e.className.split(/\s+/g)
          , r = !0;
        for (; ; ) {
            var i = n.indexOf(t);
            if (i == -1)
                break;
            r = !1,
            n.splice(i, 1)
        }
        return r && n.push(t),
        e.className = n.join(" "),
        r
    }
    ,
    t.setCssClass = function(e, n, r) {
        r ? t.addCssClass(e, n) : t.removeCssClass(e, n)
    }
    ,
    t.hasCssString = function(e, t) {
        var n = 0, r;
        t = t || document;
        if (r = t.querySelectorAll("style"))
            while (n < r.length)
                if (r[n++].id === e)
                    return !0
    }
    ,
    t.importCssString = function(n, r, i) {
        var s = i;
        if (!i || !i.getRootNode)
            s = document;
        else {
            s = i.getRootNode();
            if (!s || s == i)
                s = document
        }
        var o = s.ownerDocument || s;
        if (r && t.hasCssString(r, s))
            return null;
        r && (n += "\n/*# sourceURL=ace/css/" + r + " */");
        var u = t.createElement("style");
        u.appendChild(o.createTextNode(n)),
        r && (u.id = r),
        s == o && (s = t.getDocumentHead(o)),
        s.insertBefore(u, s.firstChild)
    }
    ,
    t.importCssStylsheet = function(e, n) {
        t.buildDom(["link", {
            rel: "stylesheet",
            href: e
        }], t.getDocumentHead(n))
    }
    ,
    t.scrollbarWidth = function(e) {
        var n = t.createElement("ace_inner");
        n.style.width = "100%",
        n.style.minWidth = "0px",
        n.style.height = "200px",
        n.style.display = "block";
        var r = t.createElement("ace_outer")
          , i = r.style;
        i.position = "absolute",
        i.left = "-10000px",
        i.overflow = "hidden",
        i.width = "200px",
        i.minWidth = "0px",
        i.height = "150px",
        i.display = "block",
        r.appendChild(n);
        var s = e.documentElement;
        s.appendChild(r);
        var o = n.offsetWidth;
        i.overflow = "scroll";
        var u = n.offsetWidth;
        return o == u && (u = r.clientWidth),
        s.removeChild(r),
        o - u
    }
    ,
    typeof document == "undefined" && (t.importCssString = function() {}
    ),
    t.computedStyle = function(e, t) {
        return window.getComputedStyle(e, "") || {}
    }
    ,
    t.setStyle = function(e, t, n) {
        e[t] !== n && (e[t] = n)
    }
    ,
    t.HAS_CSS_ANIMATION = !1,
    t.HAS_CSS_TRANSFORMS = !1,
    t.HI_DPI = r.isWin ? typeof window != "undefined" && window.devicePixelRatio >= 1.5 : !0;
    if (typeof document != "undefined") {
        var s = document.createElement("div");
        t.HI_DPI && s.style.transform !== undefined && (t.HAS_CSS_TRANSFORMS = !0),
        !r.isEdge && typeof s.style.animationName != "undefined" && (t.HAS_CSS_ANIMATION = !0),
        s = null
    }
    t.HAS_CSS_TRANSFORMS ? t.translate = function(e, t, n) {
        e.style.transform = "translate(" + Math.round(t) + "px, " + Math.round(n) + "px)"
    }
    : t.translate = function(e, t, n) {
        e.style.top = Math.round(n) + "px",
        e.style.left = Math.round(t) + "px"
    }
}),
define("ace/lib/oop", ["require", "exports", "module"], function(e, t, n) {
    "use strict";
    t.inherits = function(e, t) {
        e.super_ = t,
        e.prototype = Object.create(t.prototype, {
            constructor: {
                value: e,
                enumerable: !1,
                writable: !0,
                configurable: !0
            }
        })
    }
    ,
    t.mixin = function(e, t) {
        for (var n in t)
            e[n] = t[n];
        return e
    }
    ,
    t.implement = function(e, n) {
        t.mixin(e, n)
    }
}),
define("ace/lib/keys", ["require", "exports", "module", "ace/lib/oop"], function(e, t, n) {
    "use strict";
    var r = e("./oop")
      , i = function() {
        var e = {
            MODIFIER_KEYS: {
                16: "Shift",
                17: "Ctrl",
                18: "Alt",
                224: "Meta",
                91: "MetaLeft",
                92: "MetaRight",
                93: "ContextMenu"
            },
            KEY_MODS: {
                ctrl: 1,
                alt: 2,
                option: 2,
                shift: 4,
                "super": 8,
                meta: 8,
                command: 8,
                cmd: 8,
                control: 1
            },
            FUNCTION_KEYS: {
                8: "Backspace",
                9: "Tab",
                13: "Return",
                19: "Pause",
                27: "Esc",
                32: "Space",
                33: "PageUp",
                34: "PageDown",
                35: "End",
                36: "Home",
                37: "Left",
                38: "Up",
                39: "Right",
                40: "Down",
                44: "Print",
                45: "Insert",
                46: "Delete",
                96: "Numpad0",
                97: "Numpad1",
                98: "Numpad2",
                99: "Numpad3",
                100: "Numpad4",
                101: "Numpad5",
                102: "Numpad6",
                103: "Numpad7",
                104: "Numpad8",
                105: "Numpad9",
                "-13": "NumpadEnter",
                112: "F1",
                113: "F2",
                114: "F3",
                115: "F4",
                116: "F5",
                117: "F6",
                118: "F7",
                119: "F8",
                120: "F9",
                121: "F10",
                122: "F11",
                123: "F12",
                144: "Numlock",
                145: "Scrolllock"
            },
            PRINTABLE_KEYS: {
                32: " ",
                48: "0",
                49: "1",
                50: "2",
                51: "3",
                52: "4",
                53: "5",
                54: "6",
                55: "7",
                56: "8",
                57: "9",
                59: ";",
                61: "=",
                65: "a",
                66: "b",
                67: "c",
                68: "d",
                69: "e",
                70: "f",
                71: "g",
                72: "h",
                73: "i",
                74: "j",
                75: "k",
                76: "l",
                77: "m",
                78: "n",
                79: "o",
                80: "p",
                81: "q",
                82: "r",
                83: "s",
                84: "t",
                85: "u",
                86: "v",
                87: "w",
                88: "x",
                89: "y",
                90: "z",
                107: "+",
                109: "-",
                110: ".",
                186: ";",
                187: "=",
                188: ",",
                189: "-",
                190: ".",
                191: "/",
                192: "`",
                219: "[",
                220: "\\",
                221: "]",
                222: "'",
                111: "/",
                106: "*"
            }
        }, t, n;
        for (n in e.FUNCTION_KEYS)
            t = e.FUNCTION_KEYS[n].toLowerCase(),
            e[t] = parseInt(n, 10);
        for (n in e.PRINTABLE_KEYS)
            t = e.PRINTABLE_KEYS[n].toLowerCase(),
            e[t] = parseInt(n, 10);
        return r.mixin(e, e.MODIFIER_KEYS),
        r.mixin(e, e.PRINTABLE_KEYS),
        r.mixin(e, e.FUNCTION_KEYS),
        e.enter = e["return"],
        e.escape = e.esc,
        e.del = e["delete"],
        e[173] = "-",
        function() {
            var t = ["cmd", "ctrl", "alt", "shift"];
            for (var n = Math.pow(2, t.length); n--; )
                e.KEY_MODS[n] = t.filter(function(t) {
                    return n & e.KEY_MODS[t]
                }).join("-") + "-"
        }(),
        e.KEY_MODS[0] = "",
        e.KEY_MODS[-1] = "input-",
        e
    }();
    r.mixin(t, i),
    t.keyCodeToString = function(e) {
        var t = i[e];
        return typeof t != "string" && (t = String.fromCharCode(e)),
        t.toLowerCase()
    }
}),
define("ace/lib/event", ["require", "exports", "module", "ace/lib/keys", "ace/lib/useragent"], function(e, t, n) {
    "use strict";
    function a() {
        u = !1;
        try {
            document.createComment("").addEventListener("test", function() {}, {
                get passive() {
                    u = {
                        passive: !1
                    }
                }
            })
        } catch (e) {}
    }
    function f() {
        return u == undefined && a(),
        u
    }
    function c(e, t, n) {
        var u = l(t);
        if (!i.isMac && s) {
            t.getModifierState && (t.getModifierState("OS") || t.getModifierState("Win")) && (u |= 8);
            if (s.altGr) {
                if ((3 & u) == 3)
                    return;
                s.altGr = 0
            }
            if (n === 18 || n === 17) {
                var a = "location"in t ? t.location : t.keyLocation;
                if (n === 17 && a === 1)
                    s[n] == 1 && (o = t.timeStamp);
                else if (n === 18 && u === 3 && a === 2) {
                    var f = t.timeStamp - o;
                    f < 50 && (s.altGr = !0)
                }
            }
        }
        n in r.MODIFIER_KEYS && (n = -1);
        if (!u && n === 13) {
            var a = "location"in t ? t.location : t.keyLocation;
            if (a === 3) {
                e(t, u, -n);
                if (t.defaultPrevented)
                    return
            }
        }
        if (i.isChromeOS && u & 8) {
            e(t, u, n);
            if (t.defaultPrevented)
                return;
            u &= -9
        }
        return !!u || n in r.FUNCTION_KEYS || n in r.PRINTABLE_KEYS ? e(t, u, n) : !1
    }
    function h() {
        s = Object.create(null)
    }
    var r = e("./keys"), i = e("./useragent"), s = null, o = 0, u;
    t.addListener = function(e, t, n) {
        return e.addEventListener(t, n, f())
    }
    ,
    t.removeListener = function(e, t, n) {
        return e.removeEventListener(t, n, f())
    }
    ,
    t.stopEvent = function(e) {
        return t.stopPropagation(e),
        t.preventDefault(e),
        !1
    }
    ,
    t.stopPropagation = function(e) {
        e.stopPropagation && e.stopPropagation()
    }
    ,
    t.preventDefault = function(e) {
        e.preventDefault && e.preventDefault()
    }
    ,
    t.getButton = function(e) {
        return e.type == "dblclick" ? 0 : e.type == "contextmenu" || i.isMac && e.ctrlKey && !e.altKey && !e.shiftKey ? 2 : e.button
    }
    ,
    t.capture = function(e, n, r) {
        function i(e) {
            n && n(e),
            r && r(e),
            t.removeListener(document, "mousemove", n, !0),
            t.removeListener(document, "mouseup", i, !0),
            t.removeListener(document, "dragstart", i, !0)
        }
        return t.addListener(document, "mousemove", n, !0),
        t.addListener(document, "mouseup", i, !0),
        t.addListener(document, "dragstart", i, !0),
        i
    }
    ,
    t.addMouseWheelListener = function(e, n) {
        "onmousewheel"in e ? t.addListener(e, "mousewheel", function(e) {
            var t = 8;
            e.wheelDeltaX !== undefined ? (e.wheelX = -e.wheelDeltaX / t,
            e.wheelY = -e.wheelDeltaY / t) : (e.wheelX = 0,
            e.wheelY = -e.wheelDelta / t),
            n(e)
        }) : "onwheel"in e ? t.addListener(e, "wheel", function(e) {
            var t = .35;
            switch (e.deltaMode) {
            case e.DOM_DELTA_PIXEL:
                e.wheelX = e.deltaX * t || 0,
                e.wheelY = e.deltaY * t || 0;
                break;
            case e.DOM_DELTA_LINE:
            case e.DOM_DELTA_PAGE:
                e.wheelX = (e.deltaX || 0) * 5,
                e.wheelY = (e.deltaY || 0) * 5
            }
            n(e)
        }) : t.addListener(e, "DOMMouseScroll", function(e) {
            e.axis && e.axis == e.HORIZONTAL_AXIS ? (e.wheelX = (e.detail || 0) * 5,
            e.wheelY = 0) : (e.wheelX = 0,
            e.wheelY = (e.detail || 0) * 5),
            n(e)
        })
    }
    ,
    t.addMultiMouseDownListener = function(e, n, r, s) {
        function c(e) {
            t.getButton(e) !== 0 ? o = 0 : e.detail > 1 ? (o++,
            o > 4 && (o = 1)) : o = 1;
            if (i.isIE) {
                var c = Math.abs(e.clientX - u) > 5 || Math.abs(e.clientY - a) > 5;
                if (!f || c)
                    o = 1;
                f && clearTimeout(f),
                f = setTimeout(function() {
                    f = null
                }, n[o - 1] || 600),
                o == 1 && (u = e.clientX,
                a = e.clientY)
            }
            e._clicks = o,
            r[s]("mousedown", e);
            if (o > 4)
                o = 0;
            else if (o > 1)
                return r[s](l[o], e)
        }
        var o = 0, u, a, f, l = {
            2: "dblclick",
            3: "tripleclick",
            4: "quadclick"
        };
        Array.isArray(e) || (e = [e]),
        e.forEach(function(e) {
            t.addListener(e, "mousedown", c)
        })
    }
    ;
    var l = function(e) {
        return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0)
    };
    t.getModifierString = function(e) {
        return r.KEY_MODS[l(e)]
    }
    ,
    t.addCommandKeyListener = function(e, n) {
        var r = t.addListener;
        if (i.isOldGecko || i.isOpera && !("KeyboardEvent"in window)) {
            var o = null;
            r(e, "keydown", function(e) {
                o = e.keyCode
            }),
            r(e, "keypress", function(e) {
                return c(n, e, o)
            })
        } else {
            var u = null;
            r(e, "keydown", function(e) {
                s[e.keyCode] = (s[e.keyCode] || 0) + 1;
                var t = c(n, e, e.keyCode);
                return u = e.defaultPrevented,
                t
            }),
            r(e, "keypress", function(e) {
                u && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && (t.stopEvent(e),
                u = null)
            }),
            r(e, "keyup", function(e) {
                s[e.keyCode] = null
            }),
            s || (h(),
            r(window, "focus", h))
        }
    }
    ;
    if (typeof window == "object" && window.postMessage && !i.isOldIE) {
        var p = 1;
        t.nextTick = function(e, n) {
            n = n || window;
            var r = "zero-timeout-message-" + p++
              , i = function(s) {
                s.data == r && (t.stopPropagation(s),
                t.removeListener(n, "message", i),
                e())
            };
            t.addListener(n, "message", i),
            n.postMessage(r, "*")
        }
    }
    t.$idleBlocked = !1,
    t.onIdle = function(e, n) {
        return setTimeout(function r() {
            t.$idleBlocked ? setTimeout(r, 100) : e()
        }, n)
    }
    ,
    t.$idleBlockId = null,
    t.blockIdle = function(e) {
        t.$idleBlockId && clearTimeout(t.$idleBlockId),
        t.$idleBlocked = !0,
        t.$idleBlockId = setTimeout(function() {
            t.$idleBlocked = !1
        }, e || 100)
    }
    ,
    t.nextFrame = typeof window == "object" && (window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame),
    t.nextFrame ? t.nextFrame = t.nextFrame.bind(window) : t.nextFrame = function(e) {
        setTimeout(e, 17)
    }
}),
define("ace/range", ["require", "exports", "module"], function(e, t, n) {
    "use strict";
    var r = function(e, t) {
        return e.row - t.row || e.column - t.column
    }
      , i = function(e, t, n, r) {
        this.start = {
            row: e,
            column: t
        },
        this.end = {
            row: n,
            column: r
        }
    };
    (function() {
        this.isEqual = function(e) {
            return this.start.row === e.start.row && this.end.row === e.end.row && this.start.column === e.start.column && this.end.column === e.end.column
        }
        ,
        this.toString = function() {
            return "Range: [" + this.start.row + "/" + this.start.column + "] -> [" + this.end.row + "/" + this.end.column + "]"
        }
        ,
        this.contains = function(e, t) {
            return this.compare(e, t) == 0
        }
        ,
        this.compareRange = function(e) {
            var t, n = e.end, r = e.start;
            return t = this.compare(n.row, n.column),
            t == 1 ? (t = this.compare(r.row, r.column),
            t == 1 ? 2 : t == 0 ? 1 : 0) : t == -1 ? -2 : (t = this.compare(r.row, r.column),
            t == -1 ? -1 : t == 1 ? 42 : 0)
        }
        ,
        this.comparePoint = function(e) {
            return this.compare(e.row, e.column)
        }
        ,
        this.containsRange = function(e) {
            return this.comparePoint(e.start) == 0 && this.comparePoint(e.end) == 0
        }
        ,
        this.intersects = function(e) {
            var t = this.compareRange(e);
            return t == -1 || t == 0 || t == 1
        }
        ,
        this.isEnd = function(e, t) {
            return this.end.row == e && this.end.column == t
        }
        ,
        this.isStart = function(e, t) {
            return this.start.row == e && this.start.column == t
        }
        ,
        this.setStart = function(e, t) {
            typeof e == "object" ? (this.start.column = e.column,
            this.start.row = e.row) : (this.start.row = e,
            this.start.column = t)
        }
        ,
        this.setEnd = function(e, t) {
            typeof e == "object" ? (this.end.column = e.column,
            this.end.row = e.row) : (this.end.row = e,
            this.end.column = t)
        }
        ,
        this.inside = function(e, t) {
            return this.compare(e, t) == 0 ? this.isEnd(e, t) || this.isStart(e, t) ? !1 : !0 : !1
        }
        ,
        this.insideStart = function(e, t) {
            return this.compare(e, t) == 0 ? this.isEnd(e, t) ? !1 : !0 : !1
        }
        ,
        this.insideEnd = function(e, t) {
            return this.compare(e, t) == 0 ? this.isStart(e, t) ? !1 : !0 : !1
        }
        ,
        this.compare = function(e, t) {
            return !this.isMultiLine() && e === this.start.row ? t < this.start.column ? -1 : t > this.end.column ? 1 : 0 : e < this.start.row ? -1 : e > this.end.row ? 1 : this.start.row === e ? t >= this.start.column ? 0 : -1 : this.end.row === e ? t <= this.end.column ? 0 : 1 : 0
        }
        ,
        this.compareStart = function(e, t) {
            return this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
        }
        ,
        this.compareEnd = function(e, t) {
            return this.end.row == e && this.end.column == t ? 1 : this.compare(e, t)
        }
        ,
        this.compareInside = function(e, t) {
            return this.end.row == e && this.end.column == t ? 1 : this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
        }
        ,
        this.clipRows = function(e, t) {
            if (this.end.row > t)
                var n = {
                    row: t + 1,
                    column: 0
                };
            else if (this.end.row < e)
                var n = {
                    row: e,
                    column: 0
                };
            if (this.start.row > t)
                var r = {
                    row: t + 1,
                    column: 0
                };
            else if (this.start.row < e)
                var r = {
                    row: e,
                    column: 0
                };
            return i.fromPoints(r || this.start, n || this.end)
        }
        ,
        this.extend = function(e, t) {
            var n = this.compare(e, t);
            if (n == 0)
                return this;
            if (n == -1)
                var r = {
                    row: e,
                    column: t
                };
            else
                var s = {
                    row: e,
                    column: t
                };
            return i.fromPoints(r || this.start, s || this.end)
        }
        ,
        this.isEmpty = function() {
            return this.start.row === this.end.row && this.start.column === this.end.column
        }
        ,
        this.isMultiLine = function() {
            return this.start.row !== this.end.row
        }
        ,
        this.clone = function() {
            return i.fromPoints(this.start, this.end)
        }
        ,
        this.collapseRows = function() {
            return this.end.column == 0 ? new i(this.start.row,0,Math.max(this.start.row, this.end.row - 1),0) : new i(this.start.row,0,this.end.row,0)
        }
        ,
        this.toScreenRange = function(e) {
            var t = e.documentToScreenPosition(this.start)
              , n = e.documentToScreenPosition(this.end);
            return new i(t.row,t.column,n.row,n.column)
        }
        ,
        this.moveBy = function(e, t) {
            this.start.row += e,
            this.start.column += t,
            this.end.row += e,
            this.end.column += t
        }
    }
    ).call(i.prototype),
    i.fromPoints = function(e, t) {
        return new i(e.row,e.column,t.row,t.column)
    }
    ,
    i.comparePoints = r,
    i.comparePoints = function(e, t) {
        return e.row - t.row || e.column - t.column
    }
    ,
    t.Range = i
}),
define("ace/lib/lang", ["require", "exports", "module"], function(e, t, n) {
    "use strict";
    t.last = function(e) {
        return e[e.length - 1]
    }
    ,
    t.stringReverse = function(e) {
        return e.split("").reverse().join("")
    }
    ,
    t.stringRepeat = function(e, t) {
        var n = "";
        while (t > 0) {
            t & 1 && (n += e);
            if (t >>= 1)
                e += e
        }
        return n
    }
    ;
    var r = /^\s\s*/
      , i = /\s\s*$/;
    t.stringTrimLeft = function(e) {
        return e.replace(r, "")
    }
    ,
    t.stringTrimRight = function(e) {
        return e.replace(i, "")
    }
    ,
    t.copyObject = function(e) {
        var t = {};
        for (var n in e)
            t[n] = e[n];
        return t
    }
    ,
    t.copyArray = function(e) {
        var t = [];
        for (var n = 0, r = e.length; n < r; n++)
            e[n] && typeof e[n] == "object" ? t[n] = this.copyObject(e[n]) : t[n] = e[n];
        return t
    }
    ,
    t.deepCopy = function s(e) {
        if (typeof e != "object" || !e)
            return e;
        var t;
        if (Array.isArray(e)) {
            t = [];
            for (var n = 0; n < e.length; n++)
                t[n] = s(e[n]);
            return t
        }
        if (Object.prototype.toString.call(e) !== "[object Object]")
            return e;
        t = {};
        for (var n in e)
            t[n] = s(e[n]);
        return t
    }
    ,
    t.arrayToMap = function(e) {
        var t = {};
        for (var n = 0; n < e.length; n++)
            t[e[n]] = 1;
        return t
    }
    ,
    t.createMap = function(e) {
        var t = Object.create(null);
        for (var n in e)
            t[n] = e[n];
        return t
    }
    ,
    t.arrayRemove = function(e, t) {
        for (var n = 0; n <= e.length; n++)
            t === e[n] && e.splice(n, 1)
    }
    ,
    t.escapeRegExp = function(e) {
        return e.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1")
    }
    ,
    t.escapeHTML = function(e) {
        return ("" + e).replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;")
    }
    ,
    t.getMatchOffsets = function(e, t) {
        var n = [];
        return e.replace(t, function(e) {
            n.push({
                offset: arguments[arguments.length - 2],
                length: e.length
            })
        }),
        n
    }
    ,
    t.deferredCall = function(e) {
        var t = null
          , n = function() {
            t = null,
            e()
        }
          , r = function(e) {
            return r.cancel(),
            t = setTimeout(n, e || 0),
            r
        };
        return r.schedule = r,
        r.call = function() {
            return this.cancel(),
            e(),
            r
        }
        ,
        r.cancel = function() {
            return clearTimeout(t),
            t = null,
            r
        }
        ,
        r.isPending = function() {
            return t
        }
        ,
        r
    }
    ,
    t.delayedCall = function(e, t) {
        var n = null
          , r = function() {
            n = null,
            e()
        }
          , i = function(e) {
            n == null && (n = setTimeout(r, e || t))
        };
        return i.delay = function(e) {
            n && clearTimeout(n),
            n = setTimeout(r, e || t)
        }
        ,
        i.schedule = i,
        i.call = function() {
            this.cancel(),
            e()
        }
        ,
        i.cancel = function() {
            n && clearTimeout(n),
            n = null
        }
        ,
        i.isPending = function() {
            return n
        }
        ,
        i
    }
}),
define("ace/clipboard", ["require", "exports", "module"], function(e, t, n) {
    "use strict";
    var r;
    n.exports = {
        lineMode: !1,
        pasteCancelled: function() {
            return r && r > Date.now() - 50 ? !0 : r = !1
        },
        cancel: function() {
            r = Date.now()
        }
    }
}),
define("ace/keyboard/textinput", ["require", "exports", "module", "ace/lib/event", "ace/lib/useragent", "ace/lib/dom", "ace/lib/lang", "ace/clipboard", "ace/lib/keys"], function(e, t, n) {
    "use strict";
    var r = e("../lib/event")
      , i = e("../lib/useragent")
      , s = e("../lib/dom")
      , o = e("../lib/lang")
      , u = e("../clipboard")
      , a = i.isChrome < 18
      , f = i.isIE
      , l = i.isChrome > 63
      , c = 400
      , h = e("../lib/keys")
      , p = h.KEY_MODS
      , d = i.isIOS
      , v = d ? /\s/ : /\n/
      , m = i.isMobile
      , g = function(e, t) {
        function X() {
            x = !0,
            n.blur(),
            n.focus(),
            x = !1
        }
        function $(e) {
            e.keyCode == 27 && n.value.length < n.selectionStart && (b || (T = n.value),
            N = C = -1,
            O()),
            V()
        }
        function K() {
            clearTimeout(J),
            J = setTimeout(function() {
                E && (n.style.cssText = E,
                E = ""),
                t.renderer.$isMousePressed = !1,
                t.renderer.$keepTextAreaAtCursor && t.renderer.$moveTextAreaToCursor()
            }, 0)
        }
        function G(e, t, n) {
            var r = null
              , i = !1;
            n.addEventListener("keydown", function(e) {
                r && clearTimeout(r),
                i = !0
            }, !0),
            n.addEventListener("keyup", function(e) {
                r = setTimeout(function() {
                    i = !1
                }, 100)
            }, !0);
            var s = function(e) {
                if (document.activeElement !== n)
                    return;
                if (i || b || t.$mouseHandler.isMousePressed)
                    return;
                if (g)
                    return;
                var r = n.selectionStart
                  , s = n.selectionEnd
                  , o = null
                  , u = 0;
                if (r == 0)
                    o = h.up;
                else if (r == 1)
                    o = h.home;
                else if (s > C && T[s] == "\n")
                    o = h.end;
                else if (r < N && T[r - 1] == " ")
                    o = h.left,
                    u = p.option;
                else if (r < N || r == N && C != N && r == s)
                    o = h.left;
                else if (s > C && T.slice(0, s).split("\n").length > 2)
                    o = h.down;
                else if (s > C && T[s - 1] == " ")
                    o = h.right,
                    u = p.option;
                else if (s > C || s == C && C != N && r == s)
                    o = h.right;
                r !== s && (u |= p.shift);
                if (o) {
                    var a = t.onCommandKey({}, u, o);
                    if (!a && t.commands) {
                        o = h.keyCodeToString(o);
                        var f = t.commands.findKeyCommand(u, o);
                        f && t.execCommand(f)
                    }
                    N = r,
                    C = s,
                    O("")
                }
            };
            document.addEventListener("selectionchange", s),
            t.on("destroy", function() {
                document.removeEventListener("selectionchange", s)
            })
        }
        var n = s.createElement("textarea");
        n.className = "ace_text-input",
        n.setAttribute("wrap", "off"),
        n.setAttribute("autocorrect", "off"),
        n.setAttribute("autocapitalize", "off"),
        n.setAttribute("spellcheck", !1),
        n.style.opacity = "0",
        e.insertBefore(n, e.firstChild);
        var g = !1
          , y = !1
          , b = !1
          , w = !1
          , E = "";
        m || (n.style.fontSize = "1px");
        var S = !1
          , x = !1
          , T = ""
          , N = 0
          , C = 0
          , k = 0;
        try {
            var L = document.activeElement === n
        } catch (A) {}
        r.addListener(n, "blur", function(e) {
            if (x)
                return;
            t.onBlur(e),
            L = !1
        }),
        r.addListener(n, "focus", function(e) {
            if (x)
                return;
            L = !0;
            if (i.isEdge)
                try {
                    if (!document.hasFocus())
                        return
                } catch (e) {}
            t.onFocus(e),
            i.isEdge ? setTimeout(O) : O()
        }),
        this.$focusScroll = !1,
        this.focus = function() {
            if (E || l || this.$focusScroll == "browser")
                return n.focus({
                    preventScroll: !0
                });
            var e = n.style.top;
            n.style.position = "fixed",
            n.style.top = "0px";
            try {
                var t = n.getBoundingClientRect().top != 0
            } catch (r) {
                return
            }
            var i = [];
            if (t) {
                var s = n.parentElement;
                while (s && s.nodeType == 1)
                    i.push(s),
                    s.setAttribute("ace_nocontext", !0),
                    !s.parentElement && s.getRootNode ? s = s.getRootNode().host : s = s.parentElement
            }
            n.focus({
                preventScroll: !0
            }),
            t && i.forEach(function(e) {
                e.removeAttribute("ace_nocontext")
            }),
            setTimeout(function() {
                n.style.position = "",
                n.style.top == "0px" && (n.style.top = e)
            }, 0)
        }
        ,
        this.blur = function() {
            n.blur()
        }
        ,
        this.isFocused = function() {
            return L
        }
        ,
        t.on("beforeEndOperation", function() {
            if (t.curOp && t.curOp.command.name == "insertstring")
                return;
            b && (T = n.value = "",
            W()),
            O()
        });
        var O = d ? function(e) {
            if (!L || g && !e || w)
                return;
            e || (e = "");
            var r = "\n ab" + e + "cde fg\n";
            r != n.value && (n.value = T = r);
            var i = 4
              , s = 4 + (e.length || (t.selection.isEmpty() ? 0 : 1));
            (N != i || C != s) && n.setSelectionRange(i, s),
            N = i,
            C = s
        }
        : function() {
            if (b || w)
                return;
            if (!L && !P)
                return;
            b = !0;
            var e = t.selection
              , r = e.getRange()
              , i = e.cursor.row
              , s = r.start.column
              , o = r.end.column
              , u = t.session.getLine(i);
            if (r.start.row != i) {
                var a = t.session.getLine(i - 1);
                s = r.start.row < i - 1 ? 0 : s,
                o += a.length + 1,
                u = a + "\n" + u
            } else if (r.end.row != i) {
                var f = t.session.getLine(i + 1);
                o = r.end.row > i + 1 ? f.length : o,
                o += u.length + 1,
                u = u + "\n" + f
            } else
                m && (u = "\n" + u,
                o += 1,
                s += 1);
            u.length > c && (s < c && o < c ? u = u.slice(0, c) : (u = "\n",
            s = 0,
            o = 1));
            var l = u + "\n\n";
            l != T && (n.value = T = l,
            N = C = l.length),
            P && (N = n.selectionStart,
            C = n.selectionEnd);
            if (C != o || N != s || n.selectionEnd != C)
                try {
                    n.setSelectionRange(s, o),
                    N = s,
                    C = o
                } catch (h) {}
            b = !1
        }
        ;
        L && t.onFocus();
        var M = function(e) {
            return e.selectionStart === 0 && e.selectionEnd >= T.length && e.value === T && T && e.selectionEnd !== C
        }
          , _ = function(e) {
            if (b)
                return;
            g ? g = !1 : M(n) ? (t.selectAll(),
            O()) : m && n.selectionStart != N && O()
        }
          , D = null;
        this.setInputHandler = function(e) {
            D = e
        }
        ,
        this.getInputHandler = function() {
            return D
        }
        ;
        var P = !1
          , H = function(e, r) {
            P && (P = !1);
            if (y)
                return O(),
                e && t.onPaste(e),
                y = !1,
                "";
            var i = n.selectionStart
              , s = n.selectionEnd
              , o = N
              , u = T.length - C
              , a = e
              , f = e.length - i
              , l = e.length - s
              , c = 0;
            while (o > 0 && T[c] == e[c])
                c++,
                o--;
            a = a.slice(c),
            c = 1;
            while (u > 0 && T.length - c > N - 1 && T[T.length - c] == e[e.length - c])
                c++,
                u--;
            f -= c - 1,
            l -= c - 1;
            var h = a.length - c + 1;
            return h < 0 && (o = -h,
            h = 0),
            a = a.slice(0, h),
            !r && !a && !f && !o && !u && !l ? "" : (w = !0,
            a && !o && !u && !f && !l || S ? t.onTextInput(a) : t.onTextInput(a, {
                extendLeft: o,
                extendRight: u,
                restoreStart: f,
                restoreEnd: l
            }),
            w = !1,
            T = e,
            N = i,
            C = s,
            k = l,
            a)
        }
          , B = function(e) {
            if (b)
                return z();
            if (e && e.inputType) {
                if (e.inputType == "historyUndo")
                    return t.execCommand("undo");
                if (e.inputType == "historyRedo")
                    return t.execCommand("redo")
            }
            var r = n.value
              , i = H(r, !0);
            (r.length > c + 100 || v.test(i) || m && N < 1 && N == C) && O()
        }
          , j = function(e, t, n) {
            var r = e.clipboardData || window.clipboardData;
            if (!r || a)
                return;
            var i = f || n ? "Text" : "text/plain";
            try {
                return t ? r.setData(i, t) !== !1 : r.getData(i)
            } catch (e) {
                if (!n)
                    return j(e, t, !0)
            }
        }
          , F = function(e, i) {
            var s = t.getCopyText();
            if (!s)
                return r.preventDefault(e);
            j(e, s) ? (d && (O(s),
            g = s,
            setTimeout(function() {
                g = !1
            }, 10)),
            i ? t.onCut() : t.onCopy(),
            r.preventDefault(e)) : (g = !0,
            n.value = s,
            n.select(),
            setTimeout(function() {
                g = !1,
                O(),
                i ? t.onCut() : t.onCopy()
            }))
        }
          , I = function(e) {
            F(e, !0)
        }
          , q = function(e) {
            F(e, !1)
        }
          , R = function(e) {
            var s = j(e);
            if (u.pasteCancelled())
                return;
            typeof s == "string" ? (s && t.onPaste(s, e),
            i.isIE && setTimeout(O),
            r.preventDefault(e)) : (n.value = "",
            y = !0)
        };
        r.addCommandKeyListener(n, t.onCommandKey.bind(t)),
        r.addListener(n, "select", _),
        r.addListener(n, "input", B),
        r.addListener(n, "cut", I),
        r.addListener(n, "copy", q),
        r.addListener(n, "paste", R),
        (!("oncut"in n) || !("oncopy"in n) || !("onpaste"in n)) && r.addListener(e, "keydown", function(e) {
            if (i.isMac && !e.metaKey || !e.ctrlKey)
                return;
            switch (e.keyCode) {
            case 67:
                q(e);
                break;
            case 86:
                R(e);
                break;
            case 88:
                I(e)
            }
        });
        var U = function(e) {
            if (b || !t.onCompositionStart || t.$readOnly)
                return;
            b = {};
            if (S)
                return;
            setTimeout(z, 0),
            t.on("mousedown", X);
            var r = t.getSelectionRange();
            r.end.row = r.start.row,
            r.end.column = r.start.column,
            b.markerRange = r,
            b.selectionStart = N,
            t.onCompositionStart(b),
            b.useTextareaForIME ? (n.value = "",
            T = "",
            N = 0,
            C = 0) : (n.msGetInputContext && (b.context = n.msGetInputContext()),
            n.getInputContext && (b.context = n.getInputContext()))
        }
          , z = function() {
            if (!b || !t.onCompositionUpdate || t.$readOnly)
                return;
            if (S)
                return X();
            if (b.useTextareaForIME)
                t.onCompositionUpdate(n.value);
            else {
                var e = n.value;
                H(e),
                b.markerRange && (b.context && (b.markerRange.start.column = b.selectionStart = b.context.compositionStartOffset),
                b.markerRange.end.column = b.markerRange.start.column + C - b.selectionStart + k)
            }
        }
          , W = function(e) {
            if (!t.onCompositionEnd || t.$readOnly)
                return;
            b = !1,
            t.onCompositionEnd(),
            t.off("mousedown", X),
            e && B()
        }
          , V = o.delayedCall(z, 50).schedule.bind(null, null);
        r.addListener(n, "compositionstart", U),
        r.addListener(n, "compositionupdate", z),
        r.addListener(n, "keyup", $),
        r.addListener(n, "keydown", V),
        r.addListener(n, "compositionend", W),
        this.getElement = function() {
            return n
        }
        ,
        this.setCommandMode = function(e) {
            S = e,
            n.readOnly = !1
        }
        ,
        this.setReadOnly = function(e) {
            S || (n.readOnly = e)
        }
        ,
        this.setCopyWithEmptySelection = function(e) {}
        ,
        this.onContextMenu = function(e) {
            P = !0,
            O(),
            t._emit("nativecontextmenu", {
                target: t,
                domEvent: e
            }),
            this.moveToMouse(e, !0)
        }
        ,
        this.moveToMouse = function(e, o) {
            E || (E = n.style.cssText),
            n.style.cssText = (o ? "z-index:100000;" : "") + (i.isIE ? "opacity:0.1;" : "") + "text-indent: -" + (N + C) * t.renderer.characterWidth * .5 + "px;";
            var u = t.container.getBoundingClientRect()
              , a = s.computedStyle(t.container)
              , f = u.top + (parseInt(a.borderTopWidth) || 0)
              , l = u.left + (parseInt(u.borderLeftWidth) || 0)
              , c = u.bottom - f - n.clientHeight - 2
              , h = function(e) {
                s.translate(n, e.clientX - l - 2, Math.min(e.clientY - f - 2, c))
            };
            h(e);
            if (e.type != "mousedown")
                return;
            t.renderer.$isMousePressed = !0,
            clearTimeout(J),
            i.isWin && r.capture(t.container, h, K)
        }
        ,
        this.onContextMenuClose = K;
        var J, Q = function(e) {
            t.textInput.onContextMenu(e),
            K()
        };
        r.addListener(n, "mouseup", Q),
        r.addListener(n, "mousedown", function(e) {
            e.preventDefault(),
            K()
        }),
        r.addListener(t.renderer.scroller, "contextmenu", Q),
        r.addListener(n, "contextmenu", Q),
        d && G(e, t, n)
    };
    t.TextInput = g
}),
define("ace/mouse/default_handlers", ["require", "exports", "module", "ace/lib/useragent"], function(e, t, n) {
    "use strict";
    function o(e) {
        e.$clickSelection = null;
        var t = e.editor;
        t.setDefaultHandler("mousedown", this.onMouseDown.bind(e)),
        t.setDefaultHandler("dblclick", this.onDoubleClick.bind(e)),
        t.setDefaultHandler("tripleclick", this.onTripleClick.bind(e)),
        t.setDefaultHandler("quadclick", this.onQuadClick.bind(e)),
        t.setDefaultHandler("mousewheel", this.onMouseWheel.bind(e));
        var n = ["select", "startSelect", "selectEnd", "selectAllEnd", "selectByWordsEnd", "selectByLinesEnd", "dragWait", "dragWaitEnd", "focusWait"];
        n.forEach(function(t) {
            e[t] = this[t]
        }, this),
        e.selectByLines = this.extendSelectionBy.bind(e, "getLineRange"),
        e.selectByWords = this.extendSelectionBy.bind(e, "getWordRange")
    }
    function u(e, t, n, r) {
        return Math.sqrt(Math.pow(n - e, 2) + Math.pow(r - t, 2))
    }
    function a(e, t) {
        if (e.start.row == e.end.row)
            var n = 2 * t.column - e.start.column - e.end.column;
        else if (e.start.row == e.end.row - 1 && !e.start.column && !e.end.column)
            var n = t.column - 4;
        else
            var n = 2 * t.row - e.start.row - e.end.row;
        return n < 0 ? {
            cursor: e.start,
            anchor: e.end
        } : {
            cursor: e.end,
            anchor: e.start
        }
    }
    var r = e("../lib/useragent")
      , i = 0
      , s = 550;
    (function() {
        this.onMouseDown = function(e) {
            var t = e.inSelection()
              , n = e.getDocumentPosition();
            this.mousedownEvent = e;
            var i = this.editor
              , s = e.getButton();
            if (s !== 0) {
                var o = i.getSelectionRange()
                  , u = o.isEmpty();
                (u || s == 1) && i.selection.moveToPosition(n),
                s == 2 && (i.textInput.onContextMenu(e.domEvent),
                r.isMozilla || e.preventDefault());
                return
            }
            this.mousedownEvent.time = Date.now();
            if (t && !i.isFocused()) {
                i.focus();
                if (this.$focusTimeout && !this.$clickSelection && !i.inMultiSelectMode) {
                    this.setState("focusWait"),
                    this.captureMouse(e);
                    return
                }
            }
            return this.captureMouse(e),
            this.startSelect(n, e.domEvent._clicks > 1),
            e.preventDefault()
        }
        ,
        this.startSelect = function(e, t) {
            e = e || this.editor.renderer.screenToTextCoordinates(this.x, this.y);
            var n = this.editor;
            if (!this.mousedownEvent)
                return;
            this.mousedownEvent.getShiftKey() ? n.selection.selectToPosition(e) : t || n.selection.moveToPosition(e),
            t || this.select(),
            n.renderer.scroller.setCapture && n.renderer.scroller.setCapture(),
            n.setStyle("ace_selecting"),
            this.setState("select")
        }
        ,
        this.select = function() {
            var e, t = this.editor, n = t.renderer.screenToTextCoordinates(this.x, this.y);
            if (this.$clickSelection) {
                var r = this.$clickSelection.comparePoint(n);
                if (r == -1)
                    e = this.$clickSelection.end;
                else if (r == 1)
                    e = this.$clickSelection.start;
                else {
                    var i = a(this.$clickSelection, n);
                    n = i.cursor,
                    e = i.anchor
                }
                t.selection.setSelectionAnchor(e.row, e.column)
            }
            t.selection.selectToPosition(n),
            t.renderer.scrollCursorIntoView()
        }
        ,
        this.extendSelectionBy = function(e) {
            var t, n = this.editor, r = n.renderer.screenToTextCoordinates(this.x, this.y), i = n.selection[e](r.row, r.column);
            if (this.$clickSelection) {
                var s = this.$clickSelection.comparePoint(i.start)
                  , o = this.$clickSelection.comparePoint(i.end);
                if (s == -1 && o <= 0) {
                    t = this.$clickSelection.end;
                    if (i.end.row != r.row || i.end.column != r.column)
                        r = i.start
                } else if (o == 1 && s >= 0) {
                    t = this.$clickSelection.start;
                    if (i.start.row != r.row || i.start.column != r.column)
                        r = i.end
                } else if (s == -1 && o == 1)
                    r = i.end,
                    t = i.start;
                else {
                    var u = a(this.$clickSelection, r);
                    r = u.cursor,
                    t = u.anchor
                }
                n.selection.setSelectionAnchor(t.row, t.column)
            }
            n.selection.selectToPosition(r),
            n.renderer.scrollCursorIntoView()
        }
        ,
        this.selectEnd = this.selectAllEnd = this.selectByWordsEnd = this.selectByLinesEnd = function() {
            this.$clickSelection = null,
            this.editor.unsetStyle("ace_selecting"),
            this.editor.renderer.scroller.releaseCapture && this.editor.renderer.scroller.releaseCapture()
        }
        ,
        this.focusWait = function() {
            var e = u(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y)
              , t = Date.now();
            (e > i || t - this.mousedownEvent.time > this.$focusTimeout) && this.startSelect(this.mousedownEvent.getDocumentPosition())
        }
        ,
        this.onDoubleClick = function(e) {
            var t = e.getDocumentPosition()
              , n = this.editor
              , r = n.session
              , i = r.getBracketRange(t);
            i ? (i.isEmpty() && (i.start.column--,
            i.end.column++),
            this.setState("select")) : (i = n.selection.getWordRange(t.row, t.column),
            this.setState("selectByWords")),
            this.$clickSelection = i,
            this.select()
        }
        ,
        this.onTripleClick = function(e) {
            var t = e.getDocumentPosition()
              , n = this.editor;
            this.setState("selectByLines");
            var r = n.getSelectionRange();
            r.isMultiLine() && r.contains(t.row, t.column) ? (this.$clickSelection = n.selection.getLineRange(r.start.row),
            this.$clickSelection.end = n.selection.getLineRange(r.end.row).end) : this.$clickSelection = n.selection.getLineRange(t.row),
            this.select()
        }
        ,
        this.onQuadClick = function(e) {
            var t = this.editor;
            t.selectAll(),
            this.$clickSelection = t.getSelectionRange(),
            this.setState("selectAll")
        }
        ,
        this.onMouseWheel = function(e) {
            if (e.getAccelKey())
                return;
            e.getShiftKey() && e.wheelY && !e.wheelX && (e.wheelX = e.wheelY,
            e.wheelY = 0);
            var t = this.editor;
            this.$lastScroll || (this.$lastScroll = {
                t: 0,
                vx: 0,
                vy: 0,
                allowed: 0
            });
            var n = this.$lastScroll
              , r = e.domEvent.timeStamp
              , i = r - n.t
              , o = i ? e.wheelX / i : n.vx
              , u = i ? e.wheelY / i : n.vy;
            i < s && (o = (o + n.vx) / 2,
            u = (u + n.vy) / 2);
            var a = Math.abs(o / u)
              , f = !1;
            a >= 1 && t.renderer.isScrollableBy(e.wheelX * e.speed, 0) && (f = !0),
            a <= 1 && t.renderer.isScrollableBy(0, e.wheelY * e.speed) && (f = !0);
            if (f)
                n.allowed = r;
            else if (r - n.allowed < s) {
                var l = Math.abs(o) <= 1.5 * Math.abs(n.vx) && Math.abs(u) <= 1.5 * Math.abs(n.vy);
                l ? (f = !0,
                n.allowed = r) : n.allowed = 0
            }
            n.t = r,
            n.vx = o,
            n.vy = u;
            if (f)
                return t.renderer.scrollBy(e.wheelX * e.speed, e.wheelY * e.speed),
                e.stop()
        }
    }
    ).call(o.prototype),
    t.DefaultHandlers = o
}),
define("ace/tooltip", ["require", "exports", "module", "ace/lib/oop", "ace/lib/dom"], function(e, t, n) {
    "use strict";
    function s(e) {
        this.isOpen = !1,
        this.$element = null,
        this.$parentNode = e
    }
    var r = e("./lib/oop")
      , i = e("./lib/dom");
    (function() {
        this.$init = function() {
            return this.$element = i.createElement("div"),
            this.$element.className = "ace_tooltip",
            this.$element.style.display = "none",
            this.$parentNode.appendChild(this.$element),
            this.$element
        }
        ,
        this.getElement = function() {
            return this.$element || this.$init()
        }
        ,
        this.setText = function(e) {
            this.getElement().textContent = e
        }
        ,
        this.setHtml = function(e) {
            this.getElement().innerHTML = e
        }
        ,
        this.setPosition = function(e, t) {
            this.getElement().style.left = e + "px",
            this.getElement().style.top = t + "px"
        }
        ,
        this.setClassName = function(e) {
            i.addCssClass(this.getElement(), e)
        }
        ,
        this.show = function(e, t, n) {
            e != null && this.setText(e),
            t != null && n != null && this.setPosition(t, n),
            this.isOpen || (this.getElement().style.display = "block",
            this.isOpen = !0)
        }
        ,
        this.hide = function() {
            this.isOpen && (this.getElement().style.display = "none",
            this.isOpen = !1)
        }
        ,
        this.getHeight = function() {
            return this.getElement().offsetHeight
        }
        ,
        this.getWidth = function() {
            return this.getElement().offsetWidth
        }
        ,
        this.destroy = function() {
            this.isOpen = !1,
            this.$element && this.$element.parentNode && this.$element.parentNode.removeChild(this.$element)
        }
    }
    ).call(s.prototype),
    t.Tooltip = s
}),
define("ace/mouse/default_gutter_handler", ["require", "exports", "module", "ace/lib/dom", "ace/lib/oop", "ace/lib/event", "ace/tooltip"], function(e, t, n) {
    "use strict";
    function u(e) {
        function l() {
            var r = u.getDocumentPosition().row
              , s = n.$annotations[r];
            if (!s)
                return c();
            var o = t.session.getLength();
            if (r == o) {
                var a = t.renderer.pixelToScreenCoordinates(0, u.y).row
                  , l = u.$pos;
                if (a > t.session.documentToScreenRow(l.row, l.column))
                    return c()
            }
            if (f == s)
                return;
            f = s.text.join("<br/>"),
            i.setHtml(f),
            i.show(),
            t._signal("showGutterTooltip", i),
            t.on("mousewheel", c);
            if (e.$tooltipFollowsMouse)
                h(u);
            else {
                var p = u.domEvent.target
                  , d = p.getBoundingClientRect()
                  , v = i.getElement().style;
                v.left = d.right + "px",
                v.top = d.bottom + "px"
            }
        }
        function c() {
            o && (o = clearTimeout(o)),
            f && (i.hide(),
            f = null,
            t._signal("hideGutterTooltip", i),
            t.removeEventListener("mousewheel", c))
        }
        function h(e) {
            i.setPosition(e.x, e.y)
        }
        var t = e.editor
          , n = t.renderer.$gutterLayer
          , i = new a(t.container);
        e.editor.setDefaultHandler("guttermousedown", function(r) {
            if (!t.isFocused() || r.getButton() != 0)
                return;
            var i = n.getRegion(r);
            if (i == "foldWidgets")
                return;
            var s = r.getDocumentPosition().row
              , o = t.session.selection;
            if (r.getShiftKey())
                o.selectTo(s, 0);
            else {
                if (r.domEvent.detail == 2)
                    return t.selectAll(),
                    r.preventDefault();
                e.$clickSelection = t.selection.getLineRange(s)
            }
            return e.setState("selectByLines"),
            e.captureMouse(r),
            r.preventDefault()
        });
        var o, u, f;
        e.editor.setDefaultHandler("guttermousemove", function(t) {
            var n = t.domEvent.target || t.domEvent.srcElement;
            if (r.hasCssClass(n, "ace_fold-widget"))
                return c();
            f && e.$tooltipFollowsMouse && h(t),
            u = t;
            if (o)
                return;
            o = setTimeout(function() {
                o = null,
                u && !e.isMousePressed ? l() : c()
            }, 50)
        }),
        s.addListener(t.renderer.$gutter, "mouseout", function(e) {
            u = null;
            if (!f || o)
                return;
            o = setTimeout(function() {
                o = null,
                c()
            }, 50)
        }),
        t.on("changeSession", c)
    }
    function a(e) {
        o.call(this, e)
    }
    var r = e("../lib/dom")
      , i = e("../lib/oop")
      , s = e("../lib/event")
      , o = e("../tooltip").Tooltip;
    i.inherits(a, o),
    function() {
        this.setPosition = function(e, t) {
            var n = window.innerWidth || document.documentElement.clientWidth
              , r = window.innerHeight || document.documentElement.clientHeight
              , i = this.getWidth()
              , s = this.getHeight();
            e += 15,
            t += 15,
            e + i > n && (e -= e + i - n),
            t + s > r && (t -= 20 + s),
            o.prototype.setPosition.call(this, e, t)
        }
    }
    .call(a.prototype),
    t.GutterHandler = u
}),
define("ace/mouse/mouse_event", ["require", "exports", "module", "ace/lib/event", "ace/lib/useragent"], function(e, t, n) {
    "use strict";
    var r = e("../lib/event")
      , i = e("../lib/useragent")
      , s = t.MouseEvent = function(e, t) {
        this.domEvent = e,
        this.editor = t,
        this.x = this.clientX = e.clientX,
        this.y = this.clientY = e.clientY,
        this.$pos = null,
        this.$inSelection = null,
        this.propagationStopped = !1,
        this.defaultPrevented = !1
    }
    ;
    (function() {
        this.stopPropagation = function() {
            r.stopPropagation(this.domEvent),
            this.propagationStopped = !0
        }
        ,
        this.preventDefault = function() {
            r.preventDefault(this.domEvent),
            this.defaultPrevented = !0
        }
        ,
        this.stop = function() {
            this.stopPropagation(),
            this.preventDefault()
        }
        ,
        this.getDocumentPosition = function() {
            return this.$pos ? this.$pos : (this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY),
            this.$pos)
        }
        ,
        this.inSelection = function() {
            if (this.$inSelection !== null)
                return this.$inSelection;
            var e = this.editor
              , t = e.getSelectionRange();
            if (t.isEmpty())
                this.$inSelection = !1;
            else {
                var n = this.getDocumentPosition();
                this.$inSelection = t.contains(n.row, n.column)
            }
            return this.$inSelection
        }
        ,
        this.getButton = function() {
            return r.getButton(this.domEvent)
        }
        ,
        this.getShiftKey = function() {
            return this.domEvent.shiftKey
        }
        ,
        this.getAccelKey = i.isMac ? function() {
            return this.domEvent.metaKey
        }
        : function() {
            return this.domEvent.ctrlKey
        }
    }
    ).call(s.prototype)
}),
define("ace/mouse/dragdrop_handler", ["require", "exports", "module", "ace/lib/dom", "ace/lib/event", "ace/lib/useragent"], function(e, t, n) {
    "use strict";
    function f(e) {
        function T(e, n) {
            var r = Date.now()
              , i = !n || e.row != n.row
              , s = !n || e.column != n.column;
            if (!S || i || s)
                t.moveCursorToPosition(e),
                S = r,
                x = {
                    x: p,
                    y: d
                };
            else {
                var o = l(x.x, x.y, p, d);
                o > a ? S = null : r - S >= u && (t.renderer.scrollCursorIntoView(),
                S = null)
            }
        }
        function N(e, n) {
            var r = Date.now()
              , i = t.renderer.layerConfig.lineHeight
              , s = t.renderer.layerConfig.characterWidth
              , u = t.renderer.scroller.getBoundingClientRect()
              , a = {
                x: {
                    left: p - u.left,
                    right: u.right - p
                },
                y: {
                    top: d - u.top,
                    bottom: u.bottom - d
                }
            }
              , f = Math.min(a.x.left, a.x.right)
              , l = Math.min(a.y.top, a.y.bottom)
              , c = {
                row: e.row,
                column: e.column
            };
            f / s <= 2 && (c.column += a.x.left < a.x.right ? -3 : 2),
            l / i <= 1 && (c.row += a.y.top < a.y.bottom ? -1 : 1);
            var h = e.row != c.row
              , v = e.column != c.column
              , m = !n || e.row != n.row;
            h || v && !m ? E ? r - E >= o && t.renderer.scrollCursorIntoView(c) : E = r : E = null
        }
        function C() {
            var e = g;
            g = t.renderer.screenToTextCoordinates(p, d),
            T(g, e),
            N(g, e)
        }
        function k() {
            m = t.selection.toOrientedRange(),
            h = t.session.addMarker(m, "ace_selection", t.getSelectionStyle()),
            t.clearSelection(),
            t.isFocused() && t.renderer.$cursorLayer.setBlinking(!1),
            clearInterval(v),
            C(),
            v = setInterval(C, 20),
            y = 0,
            i.addListener(document, "mousemove", O)
        }
        function L() {
            clearInterval(v),
            t.session.removeMarker(h),
            h = null,
            t.selection.fromOrientedRange(m),
            t.isFocused() && !w && t.$resetCursorStyle(),
            m = null,
            g = null,
            y = 0,
            E = null,
            S = null,
            i.removeListener(document, "mousemove", O)
        }
        function O() {
            A == null && (A = setTimeout(function() {
                A != null && h && L()
            }, 20))
        }
        function M(e) {
            var t = e.types;
            return !t || Array.prototype.some.call(t, function(e) {
                return e == "text/plain" || e == "Text"
            })
        }
        function _(e) {
            var t = ["copy", "copymove", "all", "uninitialized"]
              , n = ["move", "copymove", "linkmove", "all", "uninitialized"]
              , r = s.isMac ? e.altKey : e.ctrlKey
              , i = "uninitialized";
            try {
                i = e.dataTransfer.effectAllowed.toLowerCase()
            } catch (e) {}
            var o = "none";
            return r && t.indexOf(i) >= 0 ? o = "copy" : n.indexOf(i) >= 0 ? o = "move" : t.indexOf(i) >= 0 && (o = "copy"),
            o
        }
        var t = e.editor
          , n = r.createElement("img");
        n.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",
        s.isOpera && (n.style.cssText = "width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");
        var f = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"];
        f.forEach(function(t) {
            e[t] = this[t]
        }, this),
        t.addEventListener("mousedown", this.onMouseDown.bind(e));
        var c = t.container, h, p, d, v, m, g, y = 0, b, w, E, S, x;
        this.onDragStart = function(e) {
            if (this.cancelDrag || !c.draggable) {
                var r = this;
                return setTimeout(function() {
                    r.startSelect(),
                    r.captureMouse(e)
                }, 0),
                e.preventDefault()
            }
            m = t.getSelectionRange();
            var i = e.dataTransfer;
            i.effectAllowed = t.getReadOnly() ? "copy" : "copyMove",
            s.isOpera && (t.container.appendChild(n),
            n.scrollTop = 0),
            i.setDragImage && i.setDragImage(n, 0, 0),
            s.isOpera && t.container.removeChild(n),
            i.clearData(),
            i.setData("Text", t.session.getTextRange()),
            w = !0,
            this.setState("drag")
        }
        ,
        this.onDragEnd = function(e) {
            c.draggable = !1,
            w = !1,
            this.setState(null);
            if (!t.getReadOnly()) {
                var n = e.dataTransfer.dropEffect;
                !b && n == "move" && t.session.remove(t.getSelectionRange()),
                t.$resetCursorStyle()
            }
            this.editor.unsetStyle("ace_dragging"),
            this.editor.renderer.setCursorStyle("")
        }
        ,
        this.onDragEnter = function(e) {
            if (t.getReadOnly() || !M(e.dataTransfer))
                return;
            return p = e.clientX,
            d = e.clientY,
            h || k(),
            y++,
            e.dataTransfer.dropEffect = b = _(e),
            i.preventDefault(e)
        }
        ,
        this.onDragOver = function(e) {
            if (t.getReadOnly() || !M(e.dataTransfer))
                return;
            return p = e.clientX,
            d = e.clientY,
            h || (k(),
            y++),
            A !== null && (A = null),
            e.dataTransfer.dropEffect = b = _(e),
            i.preventDefault(e)
        }
        ,
        this.onDragLeave = function(e) {
            y--;
            if (y <= 0 && h)
                return L(),
                b = null,
                i.preventDefault(e)
        }
        ,
        this.onDrop = function(e) {
            if (!g)
                return;
            var n = e.dataTransfer;
            if (w)
                switch (b) {
                case "move":
                    m.contains(g.row, g.column) ? m = {
                        start: g,
                        end: g
                    } : m = t.moveText(m, g);
                    break;
                case "copy":
                    m = t.moveText(m, g, !0)
                }
            else {
                var r = n.getData("Text");
                m = {
                    start: g,
                    end: t.session.insert(g, r)
                },
                t.focus(),
                b = null
            }
            return L(),
            i.preventDefault(e)
        }
        ,
        i.addListener(c, "dragstart", this.onDragStart.bind(e)),
        i.addListener(c, "dragend", this.onDragEnd.bind(e)),
        i.addListener(c, "dragenter", this.onDragEnter.bind(e)),
        i.addListener(c, "dragover", this.onDragOver.bind(e)),
        i.addListener(c, "dragleave", this.onDragLeave.bind(e)),
        i.addListener(c, "drop", this.onDrop.bind(e));
        var A = null
    }
    function l(e, t, n, r) {
        return Math.sqrt(Math.pow(n - e, 2) + Math.pow(r - t, 2))
    }
    var r = e("../lib/dom")
      , i = e("../lib/event")
      , s = e("../lib/useragent")
      , o = 200
      , u = 200
      , a = 5;
    (function() {
        this.dragWait = function() {
            var e = Date.now() - this.mousedownEvent.time;
            e > this.editor.getDragDelay() && this.startDrag()
        }
        ,
        this.dragWaitEnd = function() {
            var e = this.editor.container;
            e.draggable = !1,
            this.startSelect(this.mousedownEvent.getDocumentPosition()),
            this.selectEnd()
        }
        ,
        this.dragReadyEnd = function(e) {
            this.editor.$resetCursorStyle(),
            this.editor.unsetStyle("ace_dragging"),
            this.editor.renderer.setCursorStyle(""),
            this.dragWaitEnd()
        }
        ,
        this.startDrag = function() {
            this.cancelDrag = !1;
            var e = this.editor
              , t = e.container;
            t.draggable = !0,
            e.renderer.$cursorLayer.setBlinking(!1),
            e.setStyle("ace_dragging");
            var n = s.isWin ? "default" : "move";
            e.renderer.setCursorStyle(n),
            this.setState("dragReady")
        }
        ,
        this.onMouseDrag = function(e) {
            var t = this.editor.container;
            if (s.isIE && this.state == "dragReady") {
                var n = l(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
                n > 3 && t.dragDrop()
            }
            if (this.state === "dragWait") {
                var n = l(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
                n > 0 && (t.draggable = !1,
                this.startSelect(this.mousedownEvent.getDocumentPosition()))
            }
        }
        ,
        this.onMouseDown = function(e) {
            if (!this.$dragEnabled)
                return;
            this.mousedownEvent = e;
            var t = this.editor
              , n = e.inSelection()
              , r = e.getButton()
              , i = e.domEvent.detail || 1;
            if (i === 1 && r === 0 && n) {
                if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey()))
                    return;
                this.mousedownEvent.time = Date.now();
                var o = e.domEvent.target || e.domEvent.srcElement;
                "unselectable"in o && (o.unselectable = "on");
                if (t.getDragDelay()) {
                    if (s.isWebKit) {
                        this.cancelDrag = !0;
                        var u = t.container;
                        u.draggable = !0
                    }
                    this.setState("dragWait")
                } else
                    this.startDrag();
                this.captureMouse(e, this.onMouseDrag.bind(this)),
                e.defaultPrevented = !0
            }
        }
    }
    ).call(f.prototype),
    t.DragdropHandler = f
}),
define("ace/mouse/touch_handler", ["require", "exports", "module", "ace/mouse/mouse_event", "ace/lib/event", "ace/lib/dom"], function(e, t, n) {
    "use strict";
    var r = e("./mouse_event").MouseEvent
      , i = e("../lib/event")
      , s = e("../lib/dom");
    t.addTouchListeners = function(e, t) {
        function b() {
            var e = window.navigator && window.navigator.clipboard
              , r = !1
              , i = function() {
                var n = t.getCopyText()
                  , i = t.session.getUndoManager().hasUndo();
                y.replaceChild(s.buildDom(r ? ["span", !n && ["span", {
                    "class": "ace_mobile-button",
                    action: "selectall"
                }, "Select All"], n && ["span", {
                    "class": "ace_mobile-button",
                    action: "copy"
                }, "Copy"], n && ["span", {
                    "class": "ace_mobile-button",
                    action: "cut"
                }, "Cut"], e && ["span", {
                    "class": "ace_mobile-button",
                    action: "paste"
                }, "Paste"], i && ["span", {
                    "class": "ace_mobile-button",
                    action: "undo"
                }, "Undo"], ["span", {
                    "class": "ace_mobile-button",
                    action: "find"
                }, "Find"], ["span", {
                    "class": "ace_mobile-button",
                    action: "openCommandPallete"
                }, "Pallete"]] : ["span"]), y.firstChild)
            }
              , o = function(n) {
                var s = n.target.getAttribute("action");
                if (s == "more" || !r)
                    return r = !r,
                    i();
                if (s == "paste")
                    e.readText().then(function(e) {
                        t.execCommand(s, e)
                    });
                else if (s) {
                    if (s == "cut" || s == "copy")
                        e ? e.writeText(t.getCopyText()) : document.execCommand("copy");
                    t.execCommand(s)
                }
                y.firstChild.style.display = "none",
                r = !1,
                s != "openCommandPallete" && t.focus()
            };
            y = s.buildDom(["div", {
                "class": "ace_mobile-menu",
                ontouchstart: function(e) {
                    n = "menu",
                    e.stopPropagation(),
                    e.preventDefault(),
                    t.textInput.focus()
                },
                ontouchend: function(e) {
                    e.stopPropagation(),
                    e.preventDefault(),
                    o(e)
                },
                onclick: o
            }, ["span"], ["span", {
                "class": "ace_mobile-button",
                action: "more"
            }, "..."]], t.container)
        }
        function w() {
            y || b();
            var e = t.selection.cursor
              , n = t.renderer.textToScreenCoordinates(e.row, e.column)
              , r = t.container.getBoundingClientRect();
            y.style.top = n.pageY - r.top - 3 + "px",
            y.style.right = "10px",
            y.style.display = "",
            y.firstChild.style.display = "none",
            t.on("input", E)
        }
        function E(e) {
            y && (y.style.display = "none"),
            t.off("input", E)
        }
        function S() {
            l = null,
            clearTimeout(l);
            var e = t.selection.getRange()
              , r = e.contains(p.row, p.column);
            if (e.isEmpty() || !r)
                t.selection.moveToPosition(p),
                t.selection.selectWord();
            n = "wait",
            w()
        }
        function x() {
            l = null,
            clearTimeout(l),
            t.selection.moveToPosition(p);
            var e = d >= 2 ? t.selection.getLineRange(p.row) : t.session.getBracketRange(p);
            e && !e.isEmpty() ? t.selection.setRange(e) : t.selection.selectWord(),
            n = "wait"
        }
        function T() {
            h += 60,
            c = setInterval(function() {
                h-- <= 0 && (clearInterval(c),
                c = null),
                Math.abs(v) < .01 && (v = 0),
                Math.abs(m) < .01 && (m = 0),
                h < 20 && (v = .9 * v),
                h < 20 && (m = .9 * m);
                var e = t.session.getScrollTop();
                t.renderer.scrollBy(10 * v, 10 * m),
                e == t.session.getScrollTop() && (h = 0)
            }, 10)
        }
        var n = "scroll", o, u, a, f, l, c, h = 0, p, d = 0, v = 0, m = 0, g, y;
        i.addListener(e, "contextmenu", function(e) {
            if (!g)
                return;
            var n = t.textInput.getElement();
            n.focus()
        }),
        i.addListener(e, "touchstart", function(e) {
            var i = e.touches;
            if (l || i.length > 1) {
                clearTimeout(l),
                l = null,
                a = -1,
                n = "zoom";
                return
            }
            g = t.$mouseHandler.isMousePressed = !0;
            var s = t.renderer.layerConfig.lineHeight
              , c = t.renderer.layerConfig.lineHeight
              , y = e.timeStamp;
            f = y;
            var b = i[0]
              , w = b.clientX
              , E = b.clientY;
            Math.abs(o - w) + Math.abs(u - E) > s && (a = -1),
            o = e.clientX = w,
            u = e.clientY = E,
            v = m = 0;
            var T = new r(e,t);
            p = T.getDocumentPosition();
            if (y - a < 500 && i.length == 1 && !h)
                d++,
                e.preventDefault(),
                e.button = 0,
                x();
            else {
                d = 0;
                var N = t.selection.cursor
                  , C = t.selection.isEmpty() ? N : t.selection.anchor
                  , k = t.renderer.$cursorLayer.getPixelPosition(N, !0)
                  , L = t.renderer.$cursorLayer.getPixelPosition(C, !0)
                  , A = t.renderer.scroller.getBoundingClientRect()
                  , O = function(e, t) {
                    return e /= c,
                    t = t / s - .75,
                    e * e + t * t
                };
                if (e.clientX < A.left) {
                    n = "zoom";
                    return
                }
                var M = O(e.clientX - A.left - k.left, e.clientY - A.top - k.top)
                  , _ = O(e.clientX - A.left - L.left, e.clientY - A.top - L.top);
                M < 3.5 && _ < 3.5 && (n = M > _ ? "cursor" : "anchor"),
                _ < 3.5 ? n = "anchor" : M < 3.5 ? n = "cursor" : n = "scroll",
                l = setTimeout(S, 450)
            }
            a = y
        }),
        i.addListener(e, "touchend", function(e) {
            g = t.$mouseHandler.isMousePressed = !1,
            c && clearInterval(c),
            n == "zoom" ? (n = "",
            h = 0) : l ? (t.selection.moveToPosition(p),
            h = 0,
            w()) : n == "scroll" ? (T(),
            E()) : w(),
            clearTimeout(l),
            l = null
        }),
        i.addListener(e, "touchmove", function(e) {
            l && (clearTimeout(l),
            l = null);
            var i = e.touches;
            if (i.length > 1 || n == "zoom")
                return;
            var s = i[0]
              , a = o - s.clientX
              , c = u - s.clientY;
            if (n == "wait") {
                if (!(a * a + c * c > 4))
                    return e.preventDefault();
                n = "cursor"
            }
            o = s.clientX,
            u = s.clientY,
            e.clientX = s.clientX,
            e.clientY = s.clientY;
            var h = e.timeStamp
              , p = h - f;
            f = h;
            if (n == "scroll") {
                var d = new r(e,t);
                d.speed = 1,
                d.wheelX = a,
                d.wheelY = c,
                10 * Math.abs(a) < Math.abs(c) && (a = 0),
                10 * Math.abs(c) < Math.abs(a) && (c = 0),
                p != 0 && (v = a / p,
                m = c / p),
                t._emit("mousewheel", d),
                d.propagationStopped || (v = m = 0)
            } else {
                var g = new r(e,t)
                  , y = g.getDocumentPosition();
                n == "cursor" ? t.selection.moveCursorToPosition(y) : n == "anchor" && t.selection.setSelectionAnchor(y.row, y.column),
                t.renderer.scrollCursorIntoView(y),
                e.preventDefault()
            }
        })
    }
}),
define("ace/lib/net", ["require", "exports", "module", "ace/lib/dom"], function(e, t, n) {
    "use strict";
    var r = e("./dom");
    t.get = function(e, t) {
        var n = new XMLHttpRequest;
        n.open("GET", e, !0),
        n.onreadystatechange = function() {
            n.readyState === 4 && t(n.responseText)
        }
        ,
        n.send(null)
    }
    ,
    t.loadScript = function(e, t) {
        var n = r.getDocumentHead()
          , i = document.createElement("script");
        i.src = e,
        n.appendChild(i),
        i.onload = i.onreadystatechange = function(e, n) {
            if (n || !i.readyState || i.readyState == "loaded" || i.readyState == "complete")
                i = i.onload = i.onreadystatechange = null,
                n || t()
        }
    }
    ,
    t.qualifyURL = function(e) {
        var t = document.createElement("a");
        return t.href = e,
        t.href
    }
}),
define("ace/lib/event_emitter", ["require", "exports", "module"], function(e, t, n) {
    "use strict";
    var r = {}
      , i = function() {
        this.propagationStopped = !0
    }
      , s = function() {
        this.defaultPrevented = !0
    };
    r._emit = r._dispatchEvent = function(e, t) {
        this._eventRegistry || (this._eventRegistry = {}),
        this._defaultHandlers || (this._defaultHandlers = {});
        var n = this._eventRegistry[e] || []
          , r = this._defaultHandlers[e];
        if (!n.length && !r)
            return;
        if (typeof t != "object" || !t)
            t = {};
        t.type || (t.type = e),
        t.stopPropagation || (t.stopPropagation = i),
        t.preventDefault || (t.preventDefault = s),
        n = n.slice();
        for (var o = 0; o < n.length; o++) {
            n[o](t, this);
            if (t.propagationStopped)
                break
        }
        if (r && !t.defaultPrevented)
            return r(t, this)
    }
    ,
    r._signal = function(e, t) {
        var n = (this._eventRegistry || {})[e];
        if (!n)
            return;
        n = n.slice();
        for (var r = 0; r < n.length; r++)
            n[r](t, this)
    }
    ,
    r.once = function(e, t) {
        var n = this;
        this.addEventListener(e, function r() {
            n.removeEventListener(e, r),
            t.apply(null, arguments)
        });
        if (!t)
            return new Promise(function(e) {
                t = e
            }
            )
    }
    ,
    r.setDefaultHandler = function(e, t) {
        var n = this._defaultHandlers;
        n || (n = this._defaultHandlers = {
            _disabled_: {}
        });
        if (n[e]) {
            var r = n[e]
              , i = n._disabled_[e];
            i || (n._disabled_[e] = i = []),
            i.push(r);
            var s = i.indexOf(t);
            s != -1 && i.splice(s, 1)
        }
        n[e] = t
    }
    ,
    r.removeDefaultHandler = function(e, t) {
        var n = this._defaultHandlers;
        if (!n)
            return;
        var r = n._disabled_[e];
        if (n[e] == t)
            r && this.setDefaultHandler(e, r.pop());
        else if (r) {
            var i = r.indexOf(t);
            i != -1 && r.splice(i, 1)
        }
    }
    ,
    r.on = r.addEventListener = function(e, t, n) {
        this._eventRegistry = this._eventRegistry || {};
        var r = this._eventRegistry[e];
        return r || (r = this._eventRegistry[e] = []),
        r.indexOf(t) == -1 && r[n ? "unshift" : "push"](t),
        t
    }
    ,
    r.off = r.removeListener = r.removeEventListener = function(e, t) {
        this._eventRegistry = this._eventRegistry || {};
        var n = this._eventRegistry[e];
        if (!n)
            return;
        var r = n.indexOf(t);
        r !== -1 && n.splice(r, 1)
    }
    ,
    r.removeAllListeners = function(e) {
        this._eventRegistry && (this._eventRegistry[e] = [])
    }
    ,
    t.EventEmitter = r
}),
define("ace/lib/app_config", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter"], function(e, t, n) {
    "no use strict";
    function o(e) {
        typeof console != "undefined" && console.warn && console.warn.apply(console, arguments)
    }
    function u(e, t) {
        var n = new Error(e);
        n.data = t,
        typeof console == "object" && console.error && console.error(n),
        setTimeout(function() {
            throw n
        })
    }
    var r = e("./oop")
      , i = e("./event_emitter").EventEmitter
      , s = {
        setOptions: function(e) {
            Object.keys(e).forEach(function(t) {
                this.setOption(t, e[t])
            }, this)
        },
        getOptions: function(e) {
            var t = {};
            if (!e) {
                var n = this.$options;
                e = Object.keys(n).filter(function(e) {
                    return !n[e].hidden
                })
            } else
                Array.isArray(e) || (t = e,
                e = Object.keys(t));
            return e.forEach(function(e) {
                t[e] = this.getOption(e)
            }, this),
            t
        },
        setOption: function(e, t) {
            if (this["$" + e] === t)
                return;
            var n = this.$options[e];
            if (!n)
                return o('misspelled option "' + e + '"');
            if (n.forwardTo)
                return this[n.forwardTo] && this[n.forwardTo].setOption(e, t);
            n.handlesSet || (this["$" + e] = t),
            n && n.set && n.set.call(this, t)
        },
        getOption: function(e) {
            var t = this.$options[e];
            return t ? t.forwardTo ? this[t.forwardTo] && this[t.forwardTo].getOption(e) : t && t.get ? t.get.call(this) : this["$" + e] : o('misspelled option "' + e + '"')
        }
    }
      , a = function() {
        this.$defaultOptions = {}
    };
    (function() {
        r.implement(this, i),
        this.defineOptions = function(e, t, n) {
            return e.$options || (this.$defaultOptions[t] = e.$options = {}),
            Object.keys(n).forEach(function(t) {
                var r = n[t];
                typeof r == "string" && (r = {
                    forwardTo: r
                }),
                r.name || (r.name = t),
                e.$options[r.name] = r,
                "initialValue"in r && (e["$" + r.name] = r.initialValue)
            }),
            r.implement(e, s),
            this
        }
        ,
        this.resetOptions = function(e) {
            Object.keys(e.$options).forEach(function(t) {
                var n = e.$options[t];
                "value"in n && e.setOption(t, n.value)
            })
        }
        ,
        this.setDefaultValue = function(e, t, n) {
            if (!e) {
                for (e in this.$defaultOptions)
                    if (this.$defaultOptions[e][t])
                        break;
                if (!this.$defaultOptions[e][t])
                    return !1
            }
            var r = this.$defaultOptions[e] || (this.$defaultOptions[e] = {});
            r[t] && (r.forwardTo ? this.setDefaultValue(r.forwardTo, t, n) : r[t].value = n)
        }
        ,
        this.setDefaultValues = function(e, t) {
            Object.keys(t).forEach(function(n) {
                this.setDefaultValue(e, n, t[n])
            }, this)
        }
        ,
        this.warn = o,
        this.reportError = u
    }
    ).call(a.prototype),
    t.AppConfig = a
}),
define("ace/config", ["require", "exports", "module", "ace/lib/lang", "ace/lib/oop", "ace/lib/net", "ace/lib/app_config"], function(e, t, n) {
    "no use strict";
    function l(r) {
        if (!u || !u.document)
            return;
        a.packaged = r || e.packaged || n.packaged || u.define && define.packaged;
        var i = {}
          , s = ""
          , o = document.currentScript || document._currentScript
          , f = o && o.ownerDocument || document
          , l = f.getElementsByTagName("script");
        for (var h = 0; h < l.length; h++) {
            var p = l[h]
              , d = p.src || p.getAttribute("src");
            if (!d)
                continue;
            var v = p.attributes;
            for (var m = 0, g = v.length; m < g; m++) {
                var y = v[m];
                y.name.indexOf("data-ace-") === 0 && (i[c(y.name.replace(/^data-ace-/, ""))] = y.value)
            }
            var b = d.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);
            b && (s = b[1])
        }
        s && (i.base = i.base || s,
        i.packaged = !0),
        i.basePath = i.base,
        i.workerPath = i.workerPath || i.base,
        i.modePath = i.modePath || i.base,
        i.themePath = i.themePath || i.base,
        delete i.base;
        for (var w in i)
            typeof i[w] != "undefined" && t.set(w, i[w])
    }
    function c(e) {
        return e.replace(/-(.)/g, function(e, t) {
            return t.toUpperCase()
        })
    }
    var r = e("./lib/lang")
      , i = e("./lib/oop")
      , s = e("./lib/net")
      , o = e("./lib/app_config").AppConfig;
    n.exports = t = new o;
    var u = function() {
        return this || typeof window != "undefined" && window
    }()
      , a = {
        packaged: !1,
        workerPath: null,
        modePath: null,
        themePath: null,
        basePath: "",
        suffix: ".js",
        $moduleUrls: {},
        loadWorkerFromBlob: !0,
        sharedPopups: !1
    };
    t.get = function(e) {
        if (!a.hasOwnProperty(e))
            throw new Error("Unknown config key: " + e);
        return a[e]
    }
    ,
    t.set = function(e, t) {
        if (a.hasOwnProperty(e))
            a[e] = t;
        else if (this.setDefaultValue("", e, t) == 0)
            throw new Error("Unknown config key: " + e)
    }
    ,
    t.all = function() {
        return r.copyObject(a)
    }
    ,
    t.$modes = {},
    t.moduleUrl = function(e, t) {
        if (a.$moduleUrls[e])
            return a.$moduleUrls[e];
        var n = e.split("/");
        t = t || n[n.length - 2] || "";
        var r = t == "snippets" ? "/" : "-"
          , i = n[n.length - 1];
        if (t == "worker" && r == "-") {
            var s = new RegExp("^" + t + "[\\-_]|[\\-_]" + t + "$","g");
            i = i.replace(s, "")
        }
        (!i || i == t) && n.length > 1 && (i = n[n.length - 2]);
        var o = a[t + "Path"];
        return o == null ? o = a.basePath : r == "/" && (t = r = ""),
        o && o.slice(-1) != "/" && (o += "/"),
        o + t + r + i + this.get("suffix")
    }
    ,
    t.setModuleUrl = function(e, t) {
        return a.$moduleUrls[e] = t
    }
    ,
    t.$loading = {},
    t.loadModule = function(n, r) {
        var i, o;
        Array.isArray(n) && (o = n[0],
        n = n[1]);
        try {
            i = e(n)
        } catch (u) {}
        if (i && !t.$loading[n])
            return r && r(i);
        t.$loading[n] || (t.$loading[n] = []),
        t.$loading[n].push(r);
        if (t.$loading[n].length > 1)
            return;
        var a = function() {
            e([n], function(e) {
                t._emit("load.module", {
                    name: n,
                    module: e
                });
                var r = t.$loading[n];
                t.$loading[n] = null,
                r.forEach(function(t) {
                    t && t(e)
                })
            })
        };
        if (!t.get("packaged"))
            return a();
        s.loadScript(t.moduleUrl(n, o), a),
        f()
    }
    ;
    var f = function() {
        !a.basePath && !a.workerPath && !a.modePath && !a.themePath && !Object.keys(a.$moduleUrls).length && (console.error("Unable to infer path to ace from script src,", "use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes", "or with webpack use ace/webpack-resolver"),
        f = function() {}
        )
    };
    t.init = l,
    t.version = "1.4.9"
}),
define("ace/mouse/mouse_handler", ["require", "exports", "module", "ace/lib/event", "ace/lib/useragent", "ace/mouse/default_handlers", "ace/mouse/default_gutter_handler", "ace/mouse/mouse_event", "ace/mouse/dragdrop_handler", "ace/mouse/touch_handler", "ace/config"], function(e, t, n) {
    "use strict";
    var r = e("../lib/event")
      , i = e("../lib/useragent")
      , s = e("./default_handlers").DefaultHandlers
      , o = e("./default_gutter_handler").GutterHandler
      , u = e("./mouse_event").MouseEvent
      , a = e("./dragdrop_handler").DragdropHandler
      , f = e("./touch_handler").addTouchListeners
      , l = e("../config")
      , c = function(e) {
        var t = this;
        this.editor = e,
        new s(this),
        new o(this),
        new a(this);
        var n = function(t) {
            var n = !document.hasFocus || !document.hasFocus() || !e.isFocused() && document.activeElement == (e.textInput && e.textInput.getElement());
            n && window.focus(),
            e.focus()
        }
          , u = e.renderer.getMouseEventTarget();
        r.addListener(u, "click", this.onMouseEvent.bind(this, "click")),
        r.addListener(u, "mousemove", this.onMouseMove.bind(this, "mousemove")),
        r.addMultiMouseDownListener([u, e.renderer.scrollBarV && e.renderer.scrollBarV.inner, e.renderer.scrollBarH && e.renderer.scrollBarH.inner, e.textInput && e.textInput.getElement()].filter(Boolean), [400, 300, 250], this, "onMouseEvent"),
        r.addMouseWheelListener(e.container, this.onMouseWheel.bind(this, "mousewheel")),
        f(e.container, e);
        var l = e.renderer.$gutter;
        r.addListener(l, "mousedown", this.onMouseEvent.bind(this, "guttermousedown")),
        r.addListener(l, "click", this.onMouseEvent.bind(this, "gutterclick")),
        r.addListener(l, "dblclick", this.onMouseEvent.bind(this, "gutterdblclick")),
        r.addListener(l, "mousemove", this.onMouseEvent.bind(this, "guttermousemove")),
        r.addListener(u, "mousedown", n),
        r.addListener(l, "mousedown", n),
        i.isIE && e.renderer.scrollBarV && (r.addListener(e.renderer.scrollBarV.element, "mousedown", n),
        r.addListener(e.renderer.scrollBarH.element, "mousedown", n)),
        e.on("mousemove", function(n) {
            if (t.state || t.$dragDelay || !t.$dragEnabled)
                return;
            var r = e.renderer.screenToTextCoordinates(n.x, n.y)
              , i = e.session.selection.getRange()
              , s = e.renderer;
            !i.isEmpty() && i.insideStart(r.row, r.column) ? s.setCursorStyle("default") : s.setCursorStyle("")
        })
    };
    (function() {
        this.onMouseEvent = function(e, t) {
            this.editor._emit(e, new u(t,this.editor))
        }
        ,
        this.onMouseMove = function(e, t) {
            var n = this.editor._eventRegistry && this.editor._eventRegistry.mousemove;
            if (!n || !n.length)
                return;
            this.editor._emit(e, new u(t,this.editor))
        }
        ,
        this.onMouseWheel = function(e, t) {
            var n = new u(t,this.editor);
            n.speed = this.$scrollSpeed * 2,
            n.wheelX = t.wheelX,
            n.wheelY = t.wheelY,
            this.editor._emit(e, n)
        }
        ,
        this.setState = function(e) {
            this.state = e
        }
        ,
        this.captureMouse = function(e, t) {
            this.x = e.x,
            this.y = e.y,
            this.isMousePressed = !0;
            var n = this.editor
              , s = this.editor.renderer;
            s.$isMousePressed = !0;
            var o = this
              , a = function(e) {
                if (!e)
                    return;
                if (i.isWebKit && !e.which && o.releaseMouse)
                    return o.releaseMouse();
                o.x = e.clientX,
                o.y = e.clientY,
                t && t(e),
                o.mouseEvent = new u(e,o.editor),
                o.$mouseMoved = !0
            }
              , f = function(e) {
                n.off("beforeEndOperation", c),
                clearInterval(h),
                l(),
                o[o.state + "End"] && o[o.state + "End"](e),
                o.state = "",
                o.isMousePressed = s.$isMousePressed = !1,
                s.$keepTextAreaAtCursor && s.$moveTextAreaToCursor(),
                o.$onCaptureMouseMove = o.releaseMouse = null,
                e && o.onMouseEvent("mouseup", e),
                n.endOperation()
            }
              , l = function() {
                o[o.state] && o[o.state](),
                o.$mouseMoved = !1
            };
            if (i.isOldIE && e.domEvent.type == "dblclick")
                return setTimeout(function() {
                    f(e)
                });
            var c = function(e) {
                if (!o.releaseMouse)
                    return;
                n.curOp.command.name && n.curOp.selectionChanged && (o[o.state + "End"] && o[o.state + "End"](),
                o.state = "",
                o.releaseMouse())
            };
            n.on("beforeEndOperation", c),
            n.startOperation({
                command: {
                    name: "mouse"
                }
            }),
            o.$onCaptureMouseMove = a,
            o.releaseMouse = r.capture(this.editor.container, a, f);
            var h = setInterval(l, 20)
        }
        ,
        this.releaseMouse = null,
        this.cancelContextMenu = function() {
            var e = function(t) {
                if (t && t.domEvent && t.domEvent.type != "contextmenu")
                    return;
                this.editor.off("nativecontextmenu", e),
                t && t.domEvent && r.stopEvent(t.domEvent)
            }
            .bind(this);
            setTimeout(e, 10),
            this.editor.on("nativecontextmenu", e)
        }
    }
    ).call(c.prototype),
    l.defineOptions(c.prototype, "mouseHandler", {
        scrollSpeed: {
            initialValue: 2
        },
        dragDelay: {
            initialValue: i.isMac ? 150 : 0
        },
        dragEnabled: {
            initialValue: !0
        },
        focusTimeout: {
            initialValue: 0
        },
        tooltipFollowsMouse: {
            initialValue: !0
        }
    }),
    t.MouseHandler = c
}),
define("ace/mouse/fold_handler", ["require", "exports", "module", "ace/lib/dom"], function(e, t, n) {
    "use strict";
    function i(e) {
        e.on("click", function(t) {
            var n = t.getDocumentPosition()
              , i = e.session
              , s = i.getFoldAt(n.row, n.column, 1);
            s && (t.getAccelKey() ? i.removeFold(s) : i.expandFold(s),
            t.stop());
            var o = t.domEvent && t.domEvent.target;
            o && r.hasCssClass(o, "ace_inline_button") && r.hasCssClass(o, "ace_toggle_wrap") && (i.setOption("wrap", !i.getUseWrapMode()),
            e.renderer.scrollCursorIntoView())
        }),
        e.on("gutterclick", function(t) {
            var n = e.renderer.$gutterLayer.getRegion(t);
            if (n == "foldWidgets") {
                var r = t.getDocumentPosition().row
                  , i = e.session;
                i.foldWidgets && i.foldWidgets[r] && e.session.onFoldWidgetClick(r, t),
                e.isFocused() || e.focus(),
                t.stop()
            }
        }),
        e.on("gutterdblclick", function(t) {
            var n = e.renderer.$gutterLayer.getRegion(t);
            if (n == "foldWidgets") {
                var r = t.getDocumentPosition().row
                  , i = e.session
                  , s = i.getParentFoldRangeData(r, !0)
                  , o = s.range || s.firstRange;
                if (o) {
                    r = o.start.row;
                    var u = i.getFoldAt(r, i.getLine(r).length, 1);
                    u ? i.removeFold(u) : (i.addFold("...", o),
                    e.renderer.scrollCursorIntoView({
                        row: o.start.row,
                        column: 0
                    }))
                }
                t.stop()
            }
        })
    }
    var r = e("../lib/dom");
    t.FoldHandler = i
}),
define("ace/keyboard/keybinding", ["require", "exports", "module", "ace/lib/keys", "ace/lib/event"], function(e, t, n) {
    "use strict";
    var r = e("../lib/keys")
      , i = e("../lib/event")
      , s = function(e) {
        this.$editor = e,
        this.$data = {
            editor: e
        },
        this.$handlers = [],
        this.setDefaultHandler(e.commands)
    };
    (function() {
        this.setDefaultHandler = function(e) {
            this.removeKeyboardHandler(this.$defaultHandler),
            this.$defaultHandler = e,
            this.addKeyboardHandler(e, 0)
        }
        ,
        this.setKeyboardHandler = function(e) {
            var t = this.$handlers;
            if (t[t.length - 1] == e)
                return;
            while (t[t.length - 1] && t[t.length - 1] != this.$defaultHandler)
                this.removeKeyboardHandler(t[t.length - 1]);
            this.addKeyboardHandler(e, 1)
        }
        ,
        this.addKeyboardHandler = function(e, t) {
            if (!e)
                return;
            typeof e == "function" && !e.handleKeyboard && (e.handleKeyboard = e);
            var n = this.$handlers.indexOf(e);
            n != -1 && this.$handlers.splice(n, 1),
            t == undefined ? this.$handlers.push(e) : this.$handlers.splice(t, 0, e),
            n == -1 && e.attach && e.attach(this.$editor)
        }
        ,
        this.removeKeyboardHandler = function(e) {
            var t = this.$handlers.indexOf(e);
            return t == -1 ? !1 : (this.$handlers.splice(t, 1),
            e.detach && e.detach(this.$editor),
            !0)
        }
        ,
        this.getKeyboardHandler = function() {
            return this.$handlers[this.$handlers.length - 1]
        }
        ,
        this.getStatusText = function() {
            var e = this.$data
              , t = e.editor;
            return this.$handlers.map(function(n) {
                return n.getStatusText && n.getStatusText(t, e) || ""
            }).filter(Boolean).join(" ")
        }
        ,
        this.$callKeyboardHandlers = function(e, t, n, r) {
            var s, o = !1, u = this.$editor.commands;
            for (var a = this.$handlers.length; a--; ) {
                s = this.$handlers[a].handleKeyboard(this.$data, e, t, n, r);
                if (!s || !s.command)
                    continue;
                s.command == "null" ? o = !0 : o = u.exec(s.command, this.$editor, s.args, r),
                o && r && e != -1 && s.passEvent != 1 && s.command.passEvent != 1 && i.stopEvent(r);
                if (o)
                    break
            }
            return !o && e == -1 && (s = {
                command: "insertstring"
            },
            o = u.exec("insertstring", this.$editor, t)),
            o && this.$editor._signal && this.$editor._signal("keyboardActivity", s),
            o
        }
        ,
        this.onCommandKey = function(e, t, n) {
            var i = r.keyCodeToString(n);
            return this.$callKeyboardHandlers(t, i, n, e)
        }
        ,
        this.onTextInput = function(e) {
            return this.$callKeyboardHandlers(-1, e)
        }
    }
    ).call(s.prototype),
    t.KeyBinding = s
}),
define("ace/lib/bidiutil", ["require", "exports", "module"], function(e, t, n) {
    "use strict";
    function F(e, t, n, r) {
        var i = s ? d : p
          , c = null
          , h = null
          , v = null
          , m = 0
          , g = null
          , y = null
          , b = -1
          , w = null
          , E = null
          , T = [];
        if (!r)
            for (w = 0,
            r = []; w < n; w++)
                r[w] = R(e[w]);
        o = s,
        u = !1,
        a = !1,
        f = !1,
        l = !1;
        for (E = 0; E < n; E++) {
            c = m,
            T[E] = h = q(e, r, T, E),
            m = i[c][h],
            g = m & 240,
            m &= 15,
            t[E] = v = i[m][5];
            if (g > 0)
                if (g == 16) {
                    for (w = b; w < E; w++)
                        t[w] = 1;
                    b = -1
                } else
                    b = -1;
            y = i[m][6];
            if (y)
                b == -1 && (b = E);
            else if (b > -1) {
                for (w = b; w < E; w++)
                    t[w] = v;
                b = -1
            }
            r[E] == S && (t[E] = 0),
            o |= v
        }
        if (l)
            for (w = 0; w < n; w++)
                if (r[w] == x) {
                    t[w] = s;
                    for (var C = w - 1; C >= 0; C--) {
                        if (r[C] != N)
                            break;
                        t[C] = s
                    }
                }
    }
    function I(e, t, n) {
        if (o < e)
            return;
        if (e == 1 && s == m && !f) {
            n.reverse();
            return
        }
        var r = n.length, i = 0, u, a, l, c;
        while (i < r) {
            if (t[i] >= e) {
                u = i + 1;
                while (u < r && t[u] >= e)
                    u++;
                for (a = i,
                l = u - 1; a < l; a++,
                l--)
                    c = n[a],
                    n[a] = n[l],
                    n[l] = c;
                i = u
            }
            i++
        }
    }
    function q(e, t, n, r) {
        var i = t[r], o, c, h, p;
        switch (i) {
        case g:
        case y:
            u = !1;
        case E:
        case w:
            return i;
        case b:
            return u ? w : b;
        case T:
            return u = !0,
            a = !0,
            y;
        case N:
            return E;
        case C:
            if (r < 1 || r + 1 >= t.length || (o = n[r - 1]) != b && o != w || (c = t[r + 1]) != b && c != w)
                return E;
            return u && (c = w),
            c == o ? c : E;
        case k:
            o = r > 0 ? n[r - 1] : S;
            if (o == b && r + 1 < t.length && t[r + 1] == b)
                return b;
            return E;
        case L:
            if (r > 0 && n[r - 1] == b)
                return b;
            if (u)
                return E;
            p = r + 1,
            h = t.length;
            while (p < h && t[p] == L)
                p++;
            if (p < h && t[p] == b)
                return b;
            return E;
        case A:
            h = t.length,
            p = r + 1;
            while (p < h && t[p] == A)
                p++;
            if (p < h) {
                var d = e[r]
                  , v = d >= 1425 && d <= 2303 || d == 64286;
                o = t[p];
                if (v && (o == y || o == T))
                    return y
            }
            if (r < 1 || (o = t[r - 1]) == S)
                return E;
            return n[r - 1];
        case S:
            return u = !1,
            f = !0,
            s;
        case x:
            return l = !0,
            E;
        case O:
        case M:
        case D:
        case P:
        case _:
            u = !1;
        case H:
            return E
        }
    }
    function R(e) {
        var t = e.charCodeAt(0)
          , n = t >> 8;
        return n == 0 ? t > 191 ? g : B[t] : n == 5 ? /[\u0591-\u05f4]/.test(e) ? y : g : n == 6 ? /[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e) ? A : /[\u0660-\u0669\u066b-\u066c]/.test(e) ? w : t == 1642 ? L : /[\u06f0-\u06f9]/.test(e) ? b : T : n == 32 && t <= 8287 ? j[t & 255] : n == 254 ? t >= 65136 ? T : E : E
    }
    function U(e) {
        return e >= "\u064b" && e <= "\u0655"
    }
    var r = ["\u0621", "\u0641"]
      , i = ["\u063a", "\u064a"]
      , s = 0
      , o = 0
      , u = !1
      , a = !1
      , f = !1
      , l = !1
      , c = !1
      , h = !1
      , p = [[0, 3, 0, 1, 0, 0, 0], [0, 3, 0, 1, 2, 2, 0], [0, 3, 0, 17, 2, 0, 1], [0, 3, 5, 5, 4, 1, 0], [0, 3, 21, 21, 4, 0, 1], [0, 3, 5, 5, 4, 2, 0]]
      , d = [[2, 0, 1, 1, 0, 1, 0], [2, 0, 1, 1, 0, 2, 0], [2, 0, 2, 1, 3, 2, 0], [2, 0, 2, 33, 3, 1, 1]]
      , v = 0
      , m = 1
      , g = 0
      , y = 1
      , b = 2
      , w = 3
      , E = 4
      , S = 5
      , x = 6
      , T = 7
      , N = 8
      , C = 9
      , k = 10
      , L = 11
      , A = 12
      , O = 13
      , M = 14
      , _ = 15
      , D = 16
      , P = 17
      , H = 18
      , B = [H, H, H, H, H, H, H, H, H, x, S, x, N, S, H, H, H, H, H, H, H, H, H, H, H, H, H, H, S, S, S, x, N, E, E, L, L, L, E, E, E, E, E, k, C, k, C, C, b, b, b, b, b, b, b, b, b, b, C, E, E, E, E, E, E, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, E, E, E, E, E, E, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, g, E, E, E, E, H, H, H, H, H, H, S, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, H, C, E, L, L, L, L, E, E, E, E, g, E, E, H, E, E, L, L, b, b, E, g, E, E, E, b, g, E, E, E, E, E]
      , j = [N, N, N, N, N, N, N, N, N, N, N, H, H, H, g, y, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, N, S, O, M, _, D, P, C, L, L, L, L, L, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, C, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, E, N];
    t.L = g,
    t.R = y,
    t.EN = b,
    t.ON_R = 3,
    t.AN = 4,
    t.R_H = 5,
    t.B = 6,
    t.RLE = 7,
    t.DOT = "\u00b7",
    t.doBidiReorder = function(e, n, r) {
        if (e.length < 2)
            return {};
        var i = e.split("")
          , o = new Array(i.length)
          , u = new Array(i.length)
          , a = [];
        s = r ? m : v,
        F(i, a, i.length, n);
        for (var f = 0; f < o.length; o[f] = f,
        f++)
            ;
        I(2, a, o),
        I(1, a, o);
        for (var f = 0; f < o.length - 1; f++)
            n[f] === w ? a[f] = t.AN : a[f] === y && (n[f] > T && n[f] < O || n[f] === E || n[f] === H) ? a[f] = t.ON_R : f > 0 && i[f - 1] === "\u0644" && /\u0622|\u0623|\u0625|\u0627/.test(i[f]) && (a[f - 1] = a[f] = t.R_H,
            f++);
        i[i.length - 1] === t.DOT && (a[i.length - 1] = t.B),
        i[0] === "\u202b" && (a[0] = t.RLE);
        for (var f = 0; f < o.length; f++)
            u[f] = a[o[f]];
        return {
            logicalFromVisual: o,
            bidiLevels: u
        }
    }
    ,
    t.hasBidiCharacters = function(e, t) {
        var n = !1;
        for (var r = 0; r < e.length; r++)
            t[r] = R(e.charAt(r)),
            !n && (t[r] == y || t[r] == T || t[r] == w) && (n = !0);
        return n
    }
    ,
    t.getVisualFromLogicalIdx = function(e, t) {
        for (var n = 0; n < t.logicalFromVisual.length; n++)
            if (t.logicalFromVisual[n] == e)
                return n;
        return 0
    }
}),
define("ace/bidihandler", ["require", "exports", "module", "ace/lib/bidiutil", "ace/lib/lang"], function(e, t, n) {
    "use strict";
    var r = e("./lib/bidiutil")
      , i = e("./lib/lang")
      , s = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/
      , o = function(e) {
        this.session = e,
        this.bidiMap = {},
        this.currentRow = null,
        this.bidiUtil = r,
        this.charWidths = [],
        this.EOL = "\u00ac",
        this.showInvisibles = !0,
        this.isRtlDir = !1,
        this.$isRtl = !1,
        this.line = "",
        this.wrapIndent = 0,
        this.EOF = "\u00b6",
        this.RLE = "\u202b",
        this.contentWidth = 0,
        this.fontMetrics = null,
        this.rtlLineOffset = 0,
        this.wrapOffset = 0,
        this.isMoveLeftOperation = !1,
        this.seenBidi = s.test(e.getValue())
    };
    (function() {
        this.isBidiRow = function(e, t, n) {
            return this.seenBidi ? (e !== this.currentRow && (this.currentRow = e,
            this.updateRowLine(t, n),
            this.updateBidiMap()),
            this.bidiMap.bidiLevels) : !1
        }
        ,
        this.onChange = function(e) {
            this.seenBidi ? this.currentRow = null : e.action == "insert" && s.test(e.lines.join("\n")) && (this.seenBidi = !0,
            this.currentRow = null)
        }
        ,
        this.getDocumentRow = function() {
            var e = 0
              , t = this.session.$screenRowCache;
            if (t.length) {
                var n = this.session.$getRowCacheIndex(t, this.currentRow);
                n >= 0 && (e = this.session.$docRowCache[n])
            }
            return e
        }
        ,
        this.getSplitIndex = function() {
            var e = 0
              , t = this.session.$screenRowCache;
            if (t.length) {
                var n, r = this.session.$getRowCacheIndex(t, this.currentRow);
                while (this.currentRow - e > 0) {
                    n = this.session.$getRowCacheIndex(t, this.currentRow - e - 1);
                    if (n !== r)
                        break;
                    r = n,
                    e++
                }
            } else
                e = this.currentRow;
            return e
        }
        ,
        this.updateRowLine = function(e, t) {
            e === undefined && (e = this.getDocumentRow());
            var n = e === this.session.getLength() - 1
              , s = n ? this.EOF : this.EOL;
            this.wrapIndent = 0,
            this.line = this.session.getLine(e),
            this.isRtlDir = this.$isRtl || this.line.charAt(0) === this.RLE;
            if (this.session.$useWrapMode) {
                var o = this.session.$wrapData[e];
                o && (t === undefined && (t = this.getSplitIndex()),
                t > 0 && o.length ? (this.wrapIndent = o.indent,
                this.wrapOffset = this.wrapIndent * this.charWidths[r.L],
                this.line = t < o.length ? this.line.substring(o[t - 1], o[t]) : this.line.substring(o[o.length - 1])) : this.line = this.line.substring(0, o[t])),
                t == o.length && (this.line += this.showInvisibles ? s : r.DOT)
            } else
                this.line += this.showInvisibles ? s : r.DOT;
            var u = this.session, a = 0, f;
            this.line = this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g, function(e, t) {
                return e === "	" || u.isFullWidth(e.charCodeAt(0)) ? (f = e === "	" ? u.getScreenTabSize(t + a) : 2,
                a += f - 1,
                i.stringRepeat(r.DOT, f)) : e
            }),
            this.isRtlDir && (this.fontMetrics.$main.textContent = this.line.charAt(this.line.length - 1) == r.DOT ? this.line.substr(0, this.line.length - 1) : this.line,
            this.rtlLineOffset = this.contentWidth - this.fontMetrics.$main.getBoundingClientRect().width)
        }
        ,
        this.updateBidiMap = function() {
            var e = [];
            r.hasBidiCharacters(this.line, e) || this.isRtlDir ? this.bidiMap = r.doBidiReorder(this.line, e, this.isRtlDir) : this.bidiMap = {}
        }
        ,
        this.markAsDirty = function() {
            this.currentRow = null
        }
        ,
        this.updateCharacterWidths = function(e) {
            if (this.characterWidth === e.$characterSize.width)
                return;
            this.fontMetrics = e;
            var t = this.characterWidth = e.$characterSize.width
              , n = e.$measureCharWidth("\u05d4");
            this.charWidths[r.L] = this.charWidths[r.EN] = this.charWidths[r.ON_R] = t,
            this.charWidths[r.R] = this.charWidths[r.AN] = n,
            this.charWidths[r.R_H] = n * .45,
            this.charWidths[r.B] = this.charWidths[r.RLE] = 0,
            this.currentRow = null
        }
        ,
        this.setShowInvisibles = function(e) {
            this.showInvisibles = e,
            this.currentRow = null
        }
        ,
        this.setEolChar = function(e) {
            this.EOL = e
        }
        ,
        this.setContentWidth = function(e) {
            this.contentWidth = e
        }
        ,
        this.isRtlLine = function(e) {
            return this.$isRtl ? !0 : e != undefined ? this.session.getLine(e).charAt(0) == this.RLE : this.isRtlDir
        }
        ,
        this.setRtlDirection = function(e, t) {
            var n = e.getCursorPosition();
            for (var r = e.selection.getSelectionAnchor().row; r <= n.row; r++)
                !t && e.session.getLine(r).charAt(0) === e.session.$bidiHandler.RLE ? e.session.doc.removeInLine(r, 0, 1) : t && e.session.getLine(r).charAt(0) !== e.session.$bidiHandler.RLE && e.session.doc.insert({
                    column: 0,
                    row: r
                }, e.session.$bidiHandler.RLE)
        }
        ,
        this.getPosLeft = function(e) {
            e -= this.wrapIndent;
            var t = this.line.charAt(0) === this.RLE ? 1 : 0
              , n = e > t ? this.session.getOverwrite() ? e : e - 1 : t
              , i = r.getVisualFromLogicalIdx(n, this.bidiMap)
              , s = this.bidiMap.bidiLevels
              , o = 0;
            !this.session.getOverwrite() && e <= t && s[i] % 2 !== 0 && i++;
            for (var u = 0; u < i; u++)
                o += this.charWidths[s[u]];
            return !this.session.getOverwrite() && e > t && s[i] % 2 === 0 && (o += this.charWidths[s[i]]),
            this.wrapIndent && (o += this.isRtlDir ? -1 * this.wrapOffset : this.wrapOffset),
            this.isRtlDir && (o += this.rtlLineOffset),
            o
        }
        ,
        this.getSelections = function(e, t) {
            var n = this.bidiMap, r = n.bidiLevels, i, s = [], o = 0, u = Math.min(e, t) - this.wrapIndent, a = Math.max(e, t) - this.wrapIndent, f = !1, l = !1, c = 0;
            this.wrapIndent && (o += this.isRtlDir ? -1 * this.wrapOffset : this.wrapOffset);
            for (var h, p = 0; p < r.length; p++)
                h = n.logicalFromVisual[p],
                i = r[p],
                f = h >= u && h < a,
                f && !l ? c = o : !f && l && s.push({
                    left: c,
                    width: o - c
                }),
                o += this.charWidths[i],
                l = f;
            f && p === r.length && s.push({
                left: c,
                width: o - c
            });
            if (this.isRtlDir)
                for (var d = 0; d < s.length; d++)
                    s[d].left += this.rtlLineOffset;
            return s
        }
        ,
        this.offsetToCol = function(e) {
            this.isRtlDir && (e -= this.rtlLineOffset);
            var t = 0
              , e = Math.max(e, 0)
              , n = 0
              , r = 0
              , i = this.bidiMap.bidiLevels
              , s = this.charWidths[i[r]];
            this.wrapIndent && (e -= this.isRtlDir ? -1 * this.wrapOffset : this.wrapOffset);
            while (e > n + s / 2) {
                n += s;
                if (r === i.length - 1) {
                    s = 0;
                    break
                }
                s = this.charWidths[i[++r]]
            }
            return r > 0 && i[r - 1] % 2 !== 0 && i[r] % 2 === 0 ? (e < n && r--,
            t = this.bidiMap.logicalFromVisual[r]) : r > 0 && i[r - 1] % 2 === 0 && i[r] % 2 !== 0 ? t = 1 + (e > n ? this.bidiMap.logicalFromVisual[r] : this.bidiMap.logicalFromVisual[r - 1]) : this.isRtlDir && r === i.length - 1 && s === 0 && i[r - 1] % 2 === 0 || !this.isRtlDir && r === 0 && i[r] % 2 !== 0 ? t = 1 + this.bidiMap.logicalFromVisual[r] : (r > 0 && i[r - 1] % 2 !== 0 && s !== 0 && r--,
            t = this.bidiMap.logicalFromVisual[r]),
            t === 0 && this.isRtlDir && t++,
            t + this.wrapIndent
        }
    }
    ).call(o.prototype),
    t.BidiHandler = o
}),
define("ace/selection", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/lib/event_emitter", "ace/range"], function(e, t, n) {
    "use strict";
    var r = e("./lib/oop")
      , i = e("./lib/lang")
      , s = e("./lib/event_emitter").EventEmitter
      , o = e("./range").Range
      , u = function(e) {
        this.session = e,
        this.doc = e.getDocument(),
        this.clearSelection(),
        this.cursor = this.lead = this.doc.createAnchor(0, 0),
        this.anchor = this.doc.createAnchor(0, 0),
        this.$silent = !1;
        var t = this;
        this.cursor.on("change", function(e) {
            t.$cursorChanged = !0,
            t.$silent || t._emit("changeCursor"),
            !t.$isEmpty && !t.$silent && t._emit("changeSelection"),
            !t.$keepDesiredColumnOnChange && e.old.column != e.value.column && (t.$desiredColumn = null)
        }),
        this.anchor.on("change", function() {
            t.$anchorChanged = !0,
            !t.$isEmpty && !t.$silent && t._emit("changeSelection")
        })
    };
    (function() {
        r.implement(this, s),
        this.isEmpty = function() {
            return this.$isEmpty || this.anchor.row == this.lead.row && this.anchor.column == this.lead.column
        }
        ,
        this.isMultiLine = function() {
            return !this.$isEmpty && this.anchor.row != this.cursor.row
        }
        ,
        this.getCursor = function() {
            return this.lead.getPosition()
        }
        ,
        this.setSelectionAnchor = function(e, t) {
            this.$isEmpty = !1,
            this.anchor.setPosition(e, t)
        }
        ,
        this.getAnchor = this.getSelectionAnchor = function() {
            return this.$isEmpty ? this.getSelectionLead() : this.anchor.getPosition()
        }
        ,
        this.getSelectionLead = function() {
            return this.lead.getPosition()
        }
        ,
        this.isBackwards = function() {
            var e = this.anchor
              , t = this.lead;
            return e.row > t.row || e.row == t.row && e.column > t.column
        }
        ,
        this.getRange = function() {
            var e = this.anchor
              , t = this.lead;
            return this.$isEmpty ? o.fromPoints(t, t) : this.isBackwards() ? o.fromPoints(t, e) : o.fromPoints(e, t)
        }
        ,
        this.clearSelection = function() {
            this.$isEmpty || (this.$isEmpty = !0,
            this._emit("changeSelection"))
        }
        ,
        this.selectAll = function() {
            this.$setSelection(0, 0, Number.MAX_VALUE, Number.MAX_VALUE)
        }
        ,
        this.setRange = this.setSelectionRange = function(e, t) {
            var n = t ? e.end : e.start
              , r = t ? e.start : e.end;
            this.$setSelection(n.row, n.column, r.row, r.column)
        }
        ,
        this.$setSelection = function(e, t, n, r) {
            if (this.$silent)
                return;
            var i = this.$isEmpty
              , s = this.inMultiSelectMode;
            this.$silent = !0,
            this.$cursorChanged = this.$anchorChanged = !1,
            this.anchor.setPosition(e, t),
            this.cursor.setPosition(n, r),
            this.$isEmpty = !o.comparePoints(this.anchor, this.cursor),
            this.$silent = !1,
            this.$cursorChanged && this._emit("changeCursor"),
            (this.$cursorChanged || this.$anchorChanged || i != this.$isEmpty || s) && this._emit("changeSelection")
        }
        ,
        this.$moveSelection = function(e) {
            var t = this.lead;
            this.$isEmpty && this.setSelectionAnchor(t.row, t.column),
            e.call(this)
        }
        ,
        this.selectTo = function(e, t) {
            this.$moveSelection(function() {
                this.moveCursorTo(e, t)
            })
        }
        ,
        this.selectToPosition = function(e) {
            this.$moveSelection(function() {
                this.moveCursorToPosition(e)
            })
        }
        ,
        this.moveTo = function(e, t) {
            this.clearSelection(),
            this.moveCursorTo(e, t)
        }
        ,
        this.moveToPosition = function(e) {
            this.clearSelection(),
            this.moveCursorToPosition(e)
        }
        ,
        this.selectUp = function() {
            this.$moveSelection(this.moveCursorUp)
        }
        ,
        this.selectDown = function() {
            this.$moveSelection(this.moveCursorDown)
        }
        ,
        this.selectRight = function() {
            this.$moveSelection(this.moveCursorRight)
        }
        ,
        this.selectLeft = function() {
            this.$moveSelection(this.moveCursorLeft)
        }
        ,
        this.selectLineStart = function() {
            this.$moveSelection(this.moveCursorLineStart)
        }
        ,
        this.selectLineEnd = function() {
            this.$moveSelection(this.moveCursorLineEnd)
        }
        ,
        this.selectFileEnd = function() {
            this.$moveSelection(this.moveCursorFileEnd)
        }
        ,
        this.selectFileStart = function() {
            this.$moveSelection(this.moveCursorFileStart)
        }
        ,
        this.selectWordRight = function() {
            this.$moveSelection(this.moveCursorWordRight)
        }
        ,
        this.selectWordLeft = function() {
            this.$moveSelection(this.moveCursorWordLeft)
        }
        ,
        this.getWordRange = function(e, t) {
            if (typeof t == "undefined") {
                var n = e || this.lead;
                e = n.row,
                t = n.column
            }
            return this.session.getWordRange(e, t)
        }
        ,
        this.selectWord = function() {
            this.setSelectionRange(this.getWordRange())
        }
        ,
        this.selectAWord = function() {
            var e = this.getCursor()
              , t = this.session.getAWordRange(e.row, e.column);
            this.setSelectionRange(t)
        }
        ,
        this.getLineRange = function(e, t) {
            var n = typeof e == "number" ? e : this.lead.row, r, i = this.session.getFoldLine(n);
            return i ? (n = i.start.row,
            r = i.end.row) : r = n,
            t === !0 ? new o(n,0,r,this.session.getLine(r).length) : new o(n,0,r + 1,0)
        }
        ,
        this.selectLine = function() {
            this.setSelectionRange(this.getLineRange())
        }
        ,
        this.moveCursorUp = function() {
            this.moveCursorBy(-1, 0)
        }
        ,
        this.moveCursorDown = function() {
            this.moveCursorBy(1, 0)
        }
        ,
        this.wouldMoveIntoSoftTab = function(e, t, n) {
            var r = e.column
              , i = e.column + t;
            return n < 0 && (r = e.column - t,
            i = e.column),
            this.session.isTabStop(e) && this.doc.getLine(e.row).slice(r, i).split(" ").length - 1 == t
        }
        ,
        this.moveCursorLeft = function() {
            var e = this.lead.getPosition(), t;
            if (t = this.session.getFoldAt(e.row, e.column, -1))
                this.moveCursorTo(t.start.row, t.start.column);
            else if (e.column === 0)
                e.row > 0 && this.moveCursorTo(e.row - 1, this.doc.getLine(e.row - 1).length);
            else {
                var n = this.session.getTabSize();
                this.wouldMoveIntoSoftTab(e, n, -1) && !this.session.getNavigateWithinSoftTabs() ? this.moveCursorBy(0, -n) : this.moveCursorBy(0, -1)
            }
        }
        ,
        this.moveCursorRight = function() {
            var e = this.lead.getPosition(), t;
            if (t = this.session.getFoldAt(e.row, e.column, 1))
                this.moveCursorTo(t.end.row, t.end.column);
            else if (this.lead.column == this.doc.getLine(this.lead.row).length)
                this.lead.row < this.doc.getLength() - 1 && this.moveCursorTo(this.lead.row + 1, 0);
            else {
                var n = this.session.getTabSize()
                  , e = this.lead;
                this.wouldMoveIntoSoftTab(e, n, 1) && !this.session.getNavigateWithinSoftTabs() ? this.moveCursorBy(0, n) : this.moveCursorBy(0, 1)
            }
        }
        ,
        this.moveCursorLineStart = function() {
            var e = this.lead.row
              , t = this.lead.column
              , n = this.session.documentToScreenRow(e, t)
              , r = this.session.screenToDocumentPosition(n, 0)
              , i = this.session.getDisplayLine(e, null, r.row, r.column)
              , s = i.match(/^\s*/);
            s[0].length != t && !this.session.$useEmacsStyleLineStart && (r.column += s[0].length),
            this.moveCursorToPosition(r)
        }
        ,
        this.moveCursorLineEnd = function() {
            var e = this.lead
              , t = this.session.getDocumentLastRowColumnPosition(e.row, e.column);
            if (this.lead.column == t.column) {
                var n = this.session.getLine(t.row);
                if (t.column == n.length) {
                    var r = n.search(/\s+$/);
                    r > 0 && (t.column = r)
                }
            }
            this.moveCursorTo(t.row, t.column)
        }
        ,
        this.moveCursorFileEnd = function() {
            var e = this.doc.getLength() - 1
              , t = this.doc.getLine(e).length;
            this.moveCursorTo(e, t)
        }
        ,
        this.moveCursorFileStart = function() {
            this.moveCursorTo(0, 0)
        }
        ,
        this.moveCursorLongWordRight = function() {
            var e = this.lead.row
              , t = this.lead.column
              , n = this.doc.getLine(e)
              , r = n.substring(t);
            this.session.nonTokenRe.lastIndex = 0,
            this.session.tokenRe.lastIndex = 0;
            var i = this.session.getFoldAt(e, t, 1);
            if (i) {
                this.moveCursorTo(i.end.row, i.end.column);
                return
            }
            this.session.nonTokenRe.exec(r) && (t += this.session.nonTokenRe.lastIndex,
            this.session.nonTokenRe.lastIndex = 0,
            r = n.substring(t));
            if (t >= n.length) {
                this.moveCursorTo(e, n.length),
                this.moveCursorRight(),
                e < this.doc.getLength() - 1 && this.moveCursorWordRight();
                return
            }
            this.session.tokenRe.exec(r) && (t += this.session.tokenRe.lastIndex,
            this.session.tokenRe.lastIndex = 0),
            this.moveCursorTo(e, t)
        }
        ,
        this.moveCursorLongWordLeft = function() {
            var e = this.lead.row, t = this.lead.column, n;
            if (n = this.session.getFoldAt(e, t, -1)) {
                this.moveCursorTo(n.start.row, n.start.column);
                return
            }
            var r = this.session.getFoldStringAt(e, t, -1);
            r == null && (r = this.doc.getLine(e).substring(0, t));
            var s = i.stringReverse(r);
            this.session.nonTokenRe.lastIndex = 0,
            this.session.tokenRe.lastIndex = 0,
            this.session.nonTokenRe.exec(s) && (t -= this.session.nonTokenRe.lastIndex,
            s = s.slice(this.session.nonTokenRe.lastIndex),
            this.session.nonTokenRe.lastIndex = 0);
            if (t <= 0) {
                this.moveCursorTo(e, 0),
                this.moveCursorLeft(),
                e > 0 && this.moveCursorWordLeft();
                return
            }
            this.session.tokenRe.exec(s) && (t -= this.session.tokenRe.lastIndex,
            this.session.tokenRe.lastIndex = 0),
            this.moveCursorTo(e, t)
        }
        ,
        this.$shortWordEndIndex = function(e) {
            var t = 0, n, r = /\s/, i = this.session.tokenRe;
            i.lastIndex = 0;
            if (this.session.tokenRe.exec(e))
                t = this.session.tokenRe.lastIndex;
            else {
                while ((n = e[t]) && r.test(n))
                    t++;
                if (t < 1) {
                    i.lastIndex = 0;
                    while ((n = e[t]) && !i.test(n)) {
                        i.lastIndex = 0,
                        t++;
                        if (r.test(n)) {
                            if (t > 2) {
                                t--;
                                break
                            }
                            while ((n = e[t]) && r.test(n))
                                t++;
                            if (t > 2)
                                break
                        }
                    }
                }
            }
            return i.lastIndex = 0,
            t
        }
        ,
        this.moveCursorShortWordRight = function() {
            var e = this.lead.row
              , t = this.lead.column
              , n = this.doc.getLine(e)
              , r = n.substring(t)
              , i = this.session.getFoldAt(e, t, 1);
            if (i)
                return this.moveCursorTo(i.end.row, i.end.column);
            if (t == n.length) {
                var s = this.doc.getLength();
                do
                    e++,
                    r = this.doc.getLine(e);
                while (e < s && /^\s*$/.test(r));
                /^\s+/.test(r) || (r = ""),
                t = 0
            }
            var o = this.$shortWordEndIndex(r);
            this.moveCursorTo(e, t + o)
        }
        ,
        this.moveCursorShortWordLeft = function() {
            var e = this.lead.row, t = this.lead.column, n;
            if (n = this.session.getFoldAt(e, t, -1))
                return this.moveCursorTo(n.start.row, n.start.column);
            var r = this.session.getLine(e).substring(0, t);
            if (t === 0) {
                do
                    e--,
                    r = this.doc.getLine(e);
                while (e > 0 && /^\s*$/.test(r));
                t = r.length,
                /\s+$/.test(r) || (r = "")
            }
            var s = i.stringReverse(r)
              , o = this.$shortWordEndIndex(s);
            return this.moveCursorTo(e, t - o)
        }
        ,
        this.moveCursorWordRight = function() {
            this.session.$selectLongWords ? this.moveCursorLongWordRight() : this.moveCursorShortWordRight()
        }
        ,
        this.moveCursorWordLeft = function() {
            this.session.$selectLongWords ? this.moveCursorLongWordLeft() : this.moveCursorShortWordLeft()
        }
        ,
        this.moveCursorBy = function(e, t) {
            var n = this.session.documentToScreenPosition(this.lead.row, this.lead.column), r;
            t === 0 && (e !== 0 && (this.session.$bidiHandler.isBidiRow(n.row, this.lead.row) ? (r = this.session.$bidiHandler.getPosLeft(n.column),
            n.column = Math.round(r / this.session.$bidiHandler.charWidths[0])) : r = n.column * this.session.$bidiHandler.charWidths[0]),
            this.$desiredColumn ? n.column = this.$desiredColumn : this.$desiredColumn = n.column);
            if (e != 0 && this.session.lineWidgets && this.session.lineWidgets[this.lead.row]) {
                var i = this.session.lineWidgets[this.lead.row];
                e < 0 ? e -= i.rowsAbove || 0 : e > 0 && (e += i.rowCount - (i.rowsAbove || 0))
            }
            var s = this.session.screenToDocumentPosition(n.row + e, n.column, r);
            e !== 0 && t === 0 && s.row === this.lead.row && s.column === this.lead.column,
            this.moveCursorTo(s.row, s.column + t, t === 0)
        }
        ,
        this.moveCursorToPosition = function(e) {
            this.moveCursorTo(e.row, e.column)
        }
        ,
        this.moveCursorTo = function(e, t, n) {
            var r = this.session.getFoldAt(e, t, 1);
            r && (e = r.start.row,
            t = r.start.column),
            this.$keepDesiredColumnOnChange = !0;
            var i = this.session.getLine(e);
            /[\uDC00-\uDFFF]/.test(i.charAt(t)) && i.charAt(t - 1) && (this.lead.row == e && this.lead.column == t + 1 ? t -= 1 : t += 1),
            this.lead.setPosition(e, t),
            this.$keepDesiredColumnOnChange = !1,
            n || (this.$desiredColumn = null)
        }
        ,
        this.moveCursorToScreen = function(e, t, n) {
            var r = this.session.screenToDocumentPosition(e, t);
            this.moveCursorTo(r.row, r.column, n)
        }
        ,
        this.detach = function() {
            this.lead.detach(),
            this.anchor.detach(),
            this.session = this.doc = null
        }
        ,
        this.fromOrientedRange = function(e) {
            this.setSelectionRange(e, e.cursor == e.start),
            this.$desiredColumn = e.desiredColumn || this.$desiredColumn
        }
        ,
        this.toOrientedRange = function(e) {
            var t = this.getRange();
            return e ? (e.start.column = t.start.column,
            e.start.row = t.start.row,
            e.end.column = t.end.column,
            e.end.row = t.end.row) : e = t,
            e.cursor = this.isBackwards() ? e.start : e.end,
            e.desiredColumn = this.$desiredColumn,
            e
        }
        ,
        this.getRangeOfMovements = function(e) {
            var t = this.getCursor();
            try {
                e(this);
                var n = this.getCursor();
                return o.fromPoints(t, n)
            } catch (r) {
                return o.fromPoints(t, t)
            } finally {
                this.moveCursorToPosition(t)
            }
        }
        ,
        this.toJSON = function() {
            if (this.rangeCount)
                var e = this.ranges.map(function(e) {
                    var t = e.clone();
                    return t.isBackwards = e.cursor == e.start,
                    t
                });
            else {
                var e = this.getRange();
                e.isBackwards = this.isBackwards()
            }
            return e
        }
        ,
        this.fromJSON = function(e) {
            if (e.start == undefined) {
                if (this.rangeList && e.length > 1) {
                    this.toSingleRange(e[0]);
                    for (var t = e.length; t--; ) {
                        var n = o.fromPoints(e[t].start, e[t].end);
                        e[t].isBackwards && (n.cursor = n.start),
                        this.addRange(n, !0)
                    }
                    return
                }
                e = e[0]
            }
            this.rangeList && this.toSingleRange(e),
            this.setSelectionRange(e, e.isBackwards)
        }
        ,
        this.isEqual = function(e) {
            if ((e.length || this.rangeCount) && e.length != this.rangeCount)
                return !1;
            if (!e.length || !this.ranges)
                return this.getRange().isEqual(e);
            for (var t = this.ranges.length; t--; )
                if (!this.ranges[t].isEqual(e[t]))
                    return !1;
            return !0
        }
    }
    ).call(u.prototype),
    t.Selection = u
}),
define("ace/tokenizer", ["require", "exports", "module", "ace/config"], function(e, t, n) {
    "use strict";
    var r = e("./config")
      , i = 2e3
      , s = function(e) {
        this.states = e,
        this.regExps = {},
        this.matchMappings = {};
        for (var t in this.states) {
            var n = this.states[t]
              , r = []
              , i = 0
              , s = this.matchMappings[t] = {
                defaultToken: "text"
            }
              , o = "g"
              , u = [];
            for (var a = 0; a < n.length; a++) {
                var f = n[a];
                f.defaultToken && (s.defaultToken = f.defaultToken),
                f.caseInsensitive && (o = "gi");
                if (f.regex == null)
                    continue;
                f.regex instanceof RegExp && (f.regex = f.regex.toString().slice(1, -1));
                var l = f.regex
                  , c = (new RegExp("(?:(" + l + ")|(.))")).exec("a").length - 2;
                Array.isArray(f.token) ? f.token.length == 1 || c == 1 ? f.token = f.token[0] : c - 1 != f.token.length ? (this.reportError("number of classes and regexp groups doesn't match", {
                    rule: f,
                    groupCount: c - 1
                }),
                f.token = f.token[0]) : (f.tokenArray = f.token,
                f.token = null,
                f.onMatch = this.$arrayTokens) : typeof f.token == "function" && !f.onMatch && (c > 1 ? f.onMatch = this.$applyToken : f.onMatch = f.token),
                c > 1 && (/\\\d/.test(f.regex) ? l = f.regex.replace(/\\([0-9]+)/g, function(e, t) {
                    return "\\" + (parseInt(t, 10) + i + 1)
                }) : (c = 1,
                l = this.removeCapturingGroups(f.regex)),
                !f.splitRegex && typeof f.token != "string" && u.push(f)),
                s[i] = a,
                i += c,
                r.push(l),
                f.onMatch || (f.onMatch = null)
            }
            r.length || (s[0] = 0,
            r.push("$")),
            u.forEach(function(e) {
                e.splitRegex = this.createSplitterRegexp(e.regex, o)
            }, this),
            this.regExps[t] = new RegExp("(" + r.join(")|(") + ")|($)",o)
        }
    };
    (function() {
        this.$setMaxTokenCount = function(e) {
            i = e | 0
        }
        ,
        this.$applyToken = function(e) {
            var t = this.splitRegex.exec(e).slice(1)
              , n = this.token.apply(this, t);
            if (typeof n == "string")
                return [{
                    type: n,
                    value: e
                }];
            var r = [];
            for (var i = 0, s = n.length; i < s; i++)
                t[i] && (r[r.length] = {
                    type: n[i],
                    value: t[i]
                });
            return r
        }
        ,
        this.$arrayTokens = function(e) {
            if (!e)
                return [];
            var t = this.splitRegex.exec(e);
            if (!t)
                return "text";
            var n = []
              , r = this.tokenArray;
            for (var i = 0, s = r.length; i < s; i++)
                t[i + 1] && (n[n.length] = {
                    type: r[i],
                    value: t[i + 1]
                });
            return n
        }
        ,
        this.removeCapturingGroups = function(e) {
            var t = e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g, function(e, t) {
                return t ? "(?:" : e
            });
            return t
        }
        ,
        this.createSplitterRegexp = function(e, t) {
            if (e.indexOf("(?=") != -1) {
                var n = 0
                  , r = !1
                  , i = {};
                e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g, function(e, t, s, o, u, a) {
                    return r ? r = u != "]" : u ? r = !0 : o ? (n == i.stack && (i.end = a + 1,
                    i.stack = -1),
                    n--) : s && (n++,
                    s.length != 1 && (i.stack = n,
                    i.start = a)),
                    e
                }),
                i.end != null && /^\)*$/.test(e.substr(i.end)) && (e = e.substring(0, i.start) + e.substr(i.end))
            }
            return e.charAt(0) != "^" && (e = "^" + e),
            e.charAt(e.length - 1) != "$" && (e += "$"),
            new RegExp(e,(t || "").replace("g", ""))
        }
        ,
        this.getLineTokens = function(e, t) {
            if (t && typeof t != "string") {
                var n = t.slice(0);
                t = n[0],
                t === "#tmp" && (n.shift(),
                t = n.shift())
            } else
                var n = [];
            var r = t || "start"
              , s = this.states[r];
            s || (r = "start",
            s = this.states[r]);
            var o = this.matchMappings[r]
              , u = this.regExps[r];
            u.lastIndex = 0;
            var a, f = [], l = 0, c = 0, h = {
                type: null,
                value: ""
            };
            while (a = u.exec(e)) {
                var p = o.defaultToken
                  , d = null
                  , v = a[0]
                  , m = u.lastIndex;
                if (m - v.length > l) {
                    var g = e.substring(l, m - v.length);
                    h.type == p ? h.value += g : (h.type && f.push(h),
                    h = {
                        type: p,
                        value: g
                    })
                }
                for (var y = 0; y < a.length - 2; y++) {
                    if (a[y + 1] === undefined)
                        continue;
                    d = s[o[y]],
                    d.onMatch ? p = d.onMatch(v, r, n, e) : p = d.token,
                    d.next && (typeof d.next == "string" ? r = d.next : r = d.next(r, n),
                    s = this.states[r],
                    s || (this.reportError("state doesn't exist", r),
                    r = "start",
                    s = this.states[r]),
                    o = this.matchMappings[r],
                    l = m,
                    u = this.regExps[r],
                    u.lastIndex = m),
                    d.consumeLineEnd && (l = m);
                    break
                }
                if (v)
                    if (typeof p == "string")
                        !!d && d.merge === !1 || h.type !== p ? (h.type && f.push(h),
                        h = {
                            type: p,
                            value: v
                        }) : h.value += v;
                    else if (p) {
                        h.type && f.push(h),
                        h = {
                            type: null,
                            value: ""
                        };
                        for (var y = 0; y < p.length; y++)
                            f.push(p[y])
                    }
                if (l == e.length)
                    break;
                l = m;
                if (c++ > i) {
                    c > 2 * e.length && this.reportError("infinite loop with in ace tokenizer", {
                        startState: t,
                        line: e
                    });
                    while (l < e.length)
                        h.type && f.push(h),
                        h = {
                            value: e.substring(l, l += 500),
                            type: "overflow"
                        };
                    r = "start",
                    n = [];
                    break
                }
            }
            return h.type && f.push(h),
            n.length > 1 && n[0] !== r && n.unshift("#tmp", r),
            {
                tokens: f,
                state: n.length ? n : r
            }
        }
        ,
        this.reportError = r.reportError
    }
    ).call(s.prototype),
    t.Tokenizer = s
}),
define("ace/mode/text_highlight_rules", ["require", "exports", "module", "ace/lib/lang"], function(e, t, n) {
    "use strict";
    var r = e("../lib/lang")
      , i = function() {
        this.$rules = {
            start: [{
                token: "empty_line",
                regex: "^$"
            }, {
                defaultToken: "text"
            }]
        }
    };
    (function() {
        this.addRules = function(e, t) {
            if (!t) {
                for (var n in e)
                    this.$rules[n] = e[n];
                return
            }
            for (var n in e) {
                var r = e[n];
                for (var i = 0; i < r.length; i++) {
                    var s = r[i];
                    if (s.next || s.onMatch)
                        typeof s.next == "string" && s.next.indexOf(t) !== 0 && (s.next = t + s.next),
                        s.nextState && s.nextState.indexOf(t) !== 0 && (s.nextState = t + s.nextState)
                }
                this.$rules[t + n] = r
            }
        }
        ,
        this.getRules = function() {
            return this.$rules
        }
        ,
        this.embedRules = function(e, t, n, i, s) {
            var o = typeof e == "function" ? (new e).getRules() : e;
            if (i)
                for (var u = 0; u < i.length; u++)
                    i[u] = t + i[u];
            else {
                i = [];
                for (var a in o)
                    i.push(t + a)
            }
            this.addRules(o, t);
            if (n) {
                var f = Array.prototype[s ? "push" : "unshift"];
                for (var u = 0; u < i.length; u++)
                    f.apply(this.$rules[i[u]], r.deepCopy(n))
            }
            this.$embeds || (this.$embeds = []),
            this.$embeds.push(t)
        }
        ,
        this.getEmbeds = function() {
            return this.$embeds
        }
        ;
        var e = function(e, t) {
            return (e != "start" || t.length) && t.unshift(this.nextState, e),
            this.nextState
        }
          , t = function(e, t) {
            return t.shift(),
            t.shift() || "start"
        };
        this.normalizeRules = function() {
            function i(s) {
                var o = r[s];
                o.processed = !0;
                for (var u = 0; u < o.length; u++) {
                    var a = o[u]
                      , f = null;
                    Array.isArray(a) && (f = a,
                    a = {}),
                    !a.regex && a.start && (a.regex = a.start,
                    a.next || (a.next = []),
                    a.next.push({
                        defaultToken: a.token
                    }, {
                        token: a.token + ".end",
                        regex: a.end || a.start,
                        next: "pop"
                    }),
                    a.token = a.token + ".start",
                    a.push = !0);
                    var l = a.next || a.push;
                    if (l && Array.isArray(l)) {
                        var c = a.stateName;
                        c || (c = a.token,
                        typeof c != "string" && (c = c[0] || ""),
                        r[c] && (c += n++)),
                        r[c] = l,
                        a.next = c,
                        i(c)
                    } else
                        l == "pop" && (a.next = t);
                    a.push && (a.nextState = a.next || a.push,
                    a.next = e,
                    delete a.push);
                    if (a.rules)
                        for (var h in a.rules)
                            r[h] ? r[h].push && r[h].push.apply(r[h], a.rules[h]) : r[h] = a.rules[h];
                    var p = typeof a == "string" ? a : a.include;
                    p && (Array.isArray(p) ? f = p.map(function(e) {
                        return r[e]
                    }) : f = r[p]);
                    if (f) {
                        var d = [u, 1].concat(f);
                        a.noEscape && (d = d.filter(function(e) {
                            return !e.next
                        })),
                        o.splice.apply(o, d),
                        u--
                    }
                    a.keywordMap && (a.token = this.createKeywordMapper(a.keywordMap, a.defaultToken || "text", a.caseInsensitive),
                    delete a.defaultToken)
                }
            }
            var n = 0
              , r = this.$rules;
            Object.keys(r).forEach(i, this)
        }
        ,
        this.createKeywordMapper = function(e, t, n, r) {
            var i = Object.create(null);
            return Object.keys(e).forEach(function(t) {
                var s = e[t];
                n && (s = s.toLowerCase());
                var o = s.split(r || "|");
                for (var u = o.length; u--; )
                    i[o[u]] = t
            }),
            Object.getPrototypeOf(i) && (i.__proto__ = null),
            this.$keywordList = Object.keys(i),
            e = null,
            n ? function(e) {
                return i[e.toLowerCase()] || t
            }
            : function(e) {
                return i[e] || t
            }
        }
        ,
        this.getKeywords = function() {
            return this.$keywords
        }
    }
    ).call(i.prototype),
    t.TextHighlightRules = i
}),
define("ace/mode/behaviour", ["require", "exports", "module"], function(e, t, n) {
    "use strict";
    var r = function() {
        this.$behaviours = {}
    };
    (function() {
        this.add = function(e, t, n) {
            switch (undefined) {
            case this.$behaviours:
                this.$behaviours = {};
            case this.$behaviours[e]:
                this.$behaviours[e] = {}
            }
            this.$behaviours[e][t] = n
        }
        ,
        this.addBehaviours = function(e) {
            for (var t in e)
                for (var n in e[t])
                    this.add(t, n, e[t][n])
        }
        ,
        this.remove = function(e) {
            this.$behaviours && this.$behaviours[e] && delete this.$behaviours[e]
        }
        ,
        this.inherit = function(e, t) {
            if (typeof e == "function")
                var n = (new e).getBehaviours(t);
            else
                var n = e.getBehaviours(t);
            this.addBehaviours(n)
        }
        ,
        this.getBehaviours = function(e) {
            if (!e)
                return this.$behaviours;
            var t = {};
            for (var n = 0; n < e.length; n++)
                this.$behaviours[e[n]] && (t[e[n]] = this.$behaviours[e[n]]);
            return t
        }
    }
    ).call(r.prototype),
    t.Behaviour = r
}),
define("ace/token_iterator", ["require", "exports", "module", "ace/range"], function(e, t, n) {
    "use strict";
    var r = e("./range").Range
      , i = function(e, t, n) {
        this.$session = e,
        this.$row = t,
        this.$rowTokens = e.getTokens(t);
        var r = e.getTokenAt(t, n);
        this.$tokenIndex = r ? r.index : -1
    };
    (function() {
        this.stepBackward = function() {
            this.$tokenIndex -= 1;
            while (this.$tokenIndex < 0) {
                this.$row -= 1;
                if (this.$row < 0)
                    return this.$row = 0,
                    null;
                this.$rowTokens = this.$session.getTokens(this.$row),
                this.$tokenIndex = this.$rowTokens.length - 1
            }
            return this.$rowTokens[this.$tokenIndex]
        }
        ,
        this.stepForward = function() {
            this.$tokenIndex += 1;
            var e;
            while (this.$tokenIndex >= this.$rowTokens.length) {
                this.$row += 1,
                e || (e = this.$session.getLength());
                if (this.$row >= e)
                    return this.$row = e - 1,
                    null;
                this.$rowTokens = this.$session.getTokens(this.$row),
                this.$tokenIndex = 0
            }
            return this.$rowTokens[this.$tokenIndex]
        }
        ,
        this.getCurrentToken = function() {
            return this.$rowTokens[this.$tokenIndex]
        }
        ,
        this.getCurrentTokenRow = function() {
            return this.$row
        }
        ,
        this.getCurrentTokenColumn = function() {
            var e = this.$rowTokens
              , t = this.$tokenIndex
              , n = e[t].start;
            if (n !== undefined)
                return n;
            n = 0;
            while (t > 0)
                t -= 1,
                n += e[t].value.length;
            return n
        }
        ,
        this.getCurrentTokenPosition = function() {
            return {
                row: this.$row,
                column: this.getCurrentTokenColumn()
            }
        }
        ,
        this.getCurrentTokenRange = function() {
            var e = this.$rowTokens[this.$tokenIndex]
              , t = this.getCurrentTokenColumn();
            return new r(this.$row,t,this.$row,t + e.value.length)
        }
    }
    ).call(i.prototype),
    t.TokenIterator = i
}),
define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function(e, t, n) {
    "use strict";
    var r = e("../../lib/oop"), i = e("../behaviour").Behaviour, s = e("../../token_iterator").TokenIterator, o = e("../../lib/lang"), u = ["text", "paren.rparen", "rparen", "paren", "punctuation.operator"], a = ["text", "paren.rparen", "rparen", "paren", "punctuation.operator", "comment"], f, l = {}, c = {
        '"': '"',
        "'": "'"
    }, h = function(e) {
        var t = -1;
        e.multiSelect && (t = e.selection.index,
        l.rangeCount != e.multiSelect.rangeCount && (l = {
            rangeCount: e.multiSelect.rangeCount
        }));
        if (l[t])
            return f = l[t];
        f = l[t] = {
            autoInsertedBrackets: 0,
            autoInsertedRow: -1,
            autoInsertedLineEnd: "",
            maybeInsertedBrackets: 0,
            maybeInsertedRow: -1,
            maybeInsertedLineStart: "",
            maybeInsertedLineEnd: ""
        }
    }, p = function(e, t, n, r) {
        var i = e.end.row - e.start.row;
        return {
            text: n + t + r,
            selection: [0, e.start.column + 1, i, e.end.column + (i ? 0 : 1)]
        }
    }, d = function(e) {
        this.add("braces", "insertion", function(t, n, r, i, s) {
            var u = r.getCursorPosition()
              , a = i.doc.getLine(u.row);
            if (s == "{") {
                h(r);
                var l = r.getSelectionRange()
                  , c = i.doc.getTextRange(l);
                if (c !== "" && c !== "{" && r.getWrapBehavioursEnabled())
                    return p(l, c, "{", "}");
                if (d.isSaneInsertion(r, i))
                    return /[\]\}\)]/.test(a[u.column]) || r.inMultiSelectMode || e && e.braces ? (d.recordAutoInsert(r, i, "}"),
                    {
                        text: "{}",
                        selection: [1, 1]
                    }) : (d.recordMaybeInsert(r, i, "{"),
                    {
                        text: "{",
                        selection: [1, 1]
                    })
            } else if (s == "}") {
                h(r);
                var v = a.substring(u.column, u.column + 1);
                if (v == "}") {
                    var m = i.$findOpeningBracket("}", {
                        column: u.column + 1,
                        row: u.row
                    });
                    if (m !== null && d.isAutoInsertedClosing(u, a, s))
                        return d.popAutoInsertedClosing(),
                        {
                            text: "",
                            selection: [1, 1]
                        }
                }
            } else {
                if (s == "\n" || s == "\r\n") {
                    h(r);
                    var g = "";
                    d.isMaybeInsertedClosing(u, a) && (g = o.stringRepeat("}", f.maybeInsertedBrackets),
                    d.clearMaybeInsertedClosing());
                    var v = a.substring(u.column, u.column + 1);
                    if (v === "}") {
                        var y = i.findMatchingBracket({
                            row: u.row,
                            column: u.column + 1
                        }, "}");
                        if (!y)
                            return null;
                        var b = this.$getIndent(i.getLine(y.row))
                    } else {
                        if (!g) {
                            d.clearMaybeInsertedClosing();
                            return
                        }
                        var b = this.$getIndent(a)
                    }
                    var w = b + i.getTabString();
                    return {
                        text: "\n" + w + "\n" + b + g,
                        selection: [1, w.length, 1, w.length]
                    }
                }
                d.clearMaybeInsertedClosing()
            }
        }),
        this.add("braces", "deletion", function(e, t, n, r, i) {
            var s = r.doc.getTextRange(i);
            if (!i.isMultiLine() && s == "{") {
                h(n);
                var o = r.doc.getLine(i.start.row)
                  , u = o.substring(i.end.column, i.end.column + 1);
                if (u == "}")
                    return i.end.column++,
                    i;
                f.maybeInsertedBrackets--
            }
        }),
        this.add("parens", "insertion", function(e, t, n, r, i) {
            if (i == "(") {
                h(n);
                var s = n.getSelectionRange()
                  , o = r.doc.getTextRange(s);
                if (o !== "" && n.getWrapBehavioursEnabled())
                    return p(s, o, "(", ")");
                if (d.isSaneInsertion(n, r))
                    return d.recordAutoInsert(n, r, ")"),
                    {
                        text: "()",
                        selection: [1, 1]
                    }
            } else if (i == ")") {
                h(n);
                var u = n.getCursorPosition()
                  , a = r.doc.getLine(u.row)
                  , f = a.substring(u.column, u.column + 1);
                if (f == ")") {
                    var l = r.$findOpeningBracket(")", {
                        column: u.column + 1,
                        row: u.row
                    });
                    if (l !== null && d.isAutoInsertedClosing(u, a, i))
                        return d.popAutoInsertedClosing(),
                        {
                            text: "",
                            selection: [1, 1]
                        }
                }
            }
        }),
        this.add("parens", "deletion", function(e, t, n, r, i) {
            var s = r.doc.getTextRange(i);
            if (!i.isMultiLine() && s == "(") {
                h(n);
                var o = r.doc.getLine(i.start.row)
                  , u = o.substring(i.start.column + 1, i.start.column + 2);
                if (u == ")")
                    return i.end.column++,
                    i
            }
        }),
        this.add("brackets", "insertion", function(e, t, n, r, i) {
            if (i == "[") {
                h(n);
                var s = n.getSelectionRange()
                  , o = r.doc.getTextRange(s);
                if (o !== "" && n.getWrapBehavioursEnabled())
                    return p(s, o, "[", "]");
                if (d.isSaneInsertion(n, r))
                    return d.recordAutoInsert(n, r, "]"),
                    {
                        text: "[]",
                        selection: [1, 1]
                    }
            } else if (i == "]") {
                h(n);
                var u = n.getCursorPosition()
                  , a = r.doc.getLine(u.row)
                  , f = a.substring(u.column, u.column + 1);
                if (f == "]") {
                    var l = r.$findOpeningBracket("]", {
                        column: u.column + 1,
                        row: u.row
                    });
                    if (l !== null && d.isAutoInsertedClosing(u, a, i))
                        return d.popAutoInsertedClosing(),
                        {
                            text: "",
                            selection: [1, 1]
                        }
                }
            }
        }),
        this.add("brackets", "deletion", function(e, t, n, r, i) {
            var s = r.doc.getTextRange(i);
            if (!i.isMultiLine() && s == "[") {
                h(n);
                var o = r.doc.getLine(i.start.row)
                  , u = o.substring(i.start.column + 1, i.start.column + 2);
                if (u == "]")
                    return i.end.column++,
                    i
            }
        }),
        this.add("string_dquotes", "insertion", function(e, t, n, r, i) {
            var s = r.$mode.$quotes || c;
            if (i.length == 1 && s[i]) {
                if (this.lineCommentStart && this.lineCommentStart.indexOf(i) != -1)
                    return;
                h(n);
                var o = i
                  , u = n.getSelectionRange()
                  , a = r.doc.getTextRange(u);
                if (a !== "" && (a.length != 1 || !s[a]) && n.getWrapBehavioursEnabled())
                    return p(u, a, o, o);
                if (!a) {
                    var f = n.getCursorPosition()
                      , l = r.doc.getLine(f.row)
                      , d = l.substring(f.column - 1, f.column)
                      , v = l.substring(f.column, f.column + 1)
                      , m = r.getTokenAt(f.row, f.column)
                      , g = r.getTokenAt(f.row, f.column + 1);
                    if (d == "\\" && m && /escape/.test(m.type))
                        return null;
                    var y = m && /string|escape/.test(m.type), b = !g || /string|escape/.test(g.type), w;
                    if (v == o)
                        w = y !== b,
                        w && /string\.end/.test(g.type) && (w = !1);
                    else {
                        if (y && !b)
                            return null;
                        if (y && b)
                            return null;
                        var E = r.$mode.tokenRe;
                        E.lastIndex = 0;
                        var S = E.test(d);
                        E.lastIndex = 0;
                        var x = E.test(d);
                        if (S || x)
                            return null;
                        if (v && !/[\s;,.})\]\\]/.test(v))
                            return null;
                        var T = l[f.column - 2];
                        if (!(d != o || T != o && !E.test(T)))
                            return null;
                        w = !0
                    }
                    return {
                        text: w ? o + o : "",
                        selection: [1, 1]
                    }
                }
            }
        }),
        this.add("string_dquotes", "deletion", function(e, t, n, r, i) {
            var s = r.$mode.$quotes || c
              , o = r.doc.getTextRange(i);
            if (!i.isMultiLine() && s.hasOwnProperty(o)) {
                h(n);
                var u = r.doc.getLine(i.start.row)
                  , a = u.substring(i.start.column + 1, i.start.column + 2);
                if (a == o)
                    return i.end.column++,
                    i
            }
        })
    };
    d.isSaneInsertion = function(e, t) {
        var n = e.getCursorPosition()
          , r = new s(t,n.row,n.column);
        if (!this.$matchTokenType(r.getCurrentToken() || "text", u)) {
            if (/[)}\]]/.test(e.session.getLine(n.row)[n.column]))
                return !0;
            var i = new s(t,n.row,n.column + 1);
            if (!this.$matchTokenType(i.getCurrentToken() || "text", u))
                return !1
        }
        return r.stepForward(),
        r.getCurrentTokenRow() !== n.row || this.$matchTokenType(r.getCurrentToken() || "text", a)
    }
    ,
    d.$matchTokenType = function(e, t) {
        return t.indexOf(e.type || e) > -1
    }
    ,
    d.recordAutoInsert = function(e, t, n) {
        var r = e.getCursorPosition()
          , i = t.doc.getLine(r.row);
        this.isAutoInsertedClosing(r, i, f.autoInsertedLineEnd[0]) || (f.autoInsertedBrackets = 0),
        f.autoInsertedRow = r.row,
        f.autoInsertedLineEnd = n + i.substr(r.column),
        f.autoInsertedBrackets++
    }
    ,
    d.recordMaybeInsert = function(e, t, n) {
        var r = e.getCursorPosition()
          , i = t.doc.getLine(r.row);
        this.isMaybeInsertedClosing(r, i) || (f.maybeInsertedBrackets = 0),
        f.maybeInsertedRow = r.row,
        f.maybeInsertedLineStart = i.substr(0, r.column) + n,
        f.maybeInsertedLineEnd = i.substr(r.column),
        f.maybeInsertedBrackets++
    }
    ,
    d.isAutoInsertedClosing = function(e, t, n) {
        return f.autoInsertedBrackets > 0 && e.row === f.autoInsertedRow && n === f.autoInsertedLineEnd[0] && t.substr(e.column) === f.autoInsertedLineEnd
    }
    ,
    d.isMaybeInsertedClosing = function(e, t) {
        return f.maybeInsertedBrackets > 0 && e.row === f.maybeInsertedRow && t.substr(e.column) === f.maybeInsertedLineEnd && t.substr(0, e.column) == f.maybeInsertedLineStart
    }
    ,
    d.popAutoInsertedClosing = function() {
        f.autoInsertedLineEnd = f.autoInsertedLineEnd.substr(1),
        f.autoInsertedBrackets--
    }
    ,
    d.clearMaybeInsertedClosing = function() {
        f && (f.maybeInsertedBrackets = 0,
        f.maybeInsertedRow = -1)
    }
    ,
    r.inherits(d, i),
    t.CstyleBehaviour = d
}),
define("ace/unicode", ["require", "exports", "module"], function(e, t, n) {
    "use strict";
    var r = [48, 9, 8, 25, 5, 0, 2, 25, 48, 0, 11, 0, 5, 0, 6, 22, 2, 30, 2, 457, 5, 11, 15, 4, 8, 0, 2, 0, 18, 116, 2, 1, 3, 3, 9, 0, 2, 2, 2, 0, 2, 19, 2, 82, 2, 138, 2, 4, 3, 155, 12, 37, 3, 0, 8, 38, 10, 44, 2, 0, 2, 1, 2, 1, 2, 0, 9, 26, 6, 2, 30, 10, 7, 61, 2, 9, 5, 101, 2, 7, 3, 9, 2, 18, 3, 0, 17, 58, 3, 100, 15, 53, 5, 0, 6, 45, 211, 57, 3, 18, 2, 5, 3, 11, 3, 9, 2, 1, 7, 6, 2, 2, 2, 7, 3, 1, 3, 21, 2, 6, 2, 0, 4, 3, 3, 8, 3, 1, 3, 3, 9, 0, 5, 1, 2, 4, 3, 11, 16, 2, 2, 5, 5, 1, 3, 21, 2, 6, 2, 1, 2, 1, 2, 1, 3, 0, 2, 4, 5, 1, 3, 2, 4, 0, 8, 3, 2, 0, 8, 15, 12, 2, 2, 8, 2, 2, 2, 21, 2, 6, 2, 1, 2, 4, 3, 9, 2, 2, 2, 2, 3, 0, 16, 3, 3, 9, 18, 2, 2, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 3, 8, 3, 1, 3, 2, 9, 1, 5, 1, 2, 4, 3, 9, 2, 0, 17, 1, 2, 5, 4, 2, 2, 3, 4, 1, 2, 0, 2, 1, 4, 1, 4, 2, 4, 11, 5, 4, 4, 2, 2, 3, 3, 0, 7, 0, 15, 9, 18, 2, 2, 7, 2, 2, 2, 22, 2, 9, 2, 4, 4, 7, 2, 2, 2, 3, 8, 1, 2, 1, 7, 3, 3, 9, 19, 1, 2, 7, 2, 2, 2, 22, 2, 9, 2, 4, 3, 8, 2, 2, 2, 3, 8, 1, 8, 0, 2, 3, 3, 9, 19, 1, 2, 7, 2, 2, 2, 22, 2, 15, 4, 7, 2, 2, 2, 3, 10, 0, 9, 3, 3, 9, 11, 5, 3, 1, 2, 17, 4, 23, 2, 8, 2, 0, 3, 6, 4, 0, 5, 5, 2, 0, 2, 7, 19, 1, 14, 57, 6, 14, 2, 9, 40, 1, 2, 0, 3, 1, 2, 0, 3, 0, 7, 3, 2, 6, 2, 2, 2, 0, 2, 0, 3, 1, 2, 12, 2, 2, 3, 4, 2, 0, 2, 5, 3, 9, 3, 1, 35, 0, 24, 1, 7, 9, 12, 0, 2, 0, 2, 0, 5, 9, 2, 35, 5, 19, 2, 5, 5, 7, 2, 35, 10, 0, 58, 73, 7, 77, 3, 37, 11, 42, 2, 0, 4, 328, 2, 3, 3, 6, 2, 0, 2, 3, 3, 40, 2, 3, 3, 32, 2, 3, 3, 6, 2, 0, 2, 3, 3, 14, 2, 56, 2, 3, 3, 66, 5, 0, 33, 15, 17, 84, 13, 619, 3, 16, 2, 25, 6, 74, 22, 12, 2, 6, 12, 20, 12, 19, 13, 12, 2, 2, 2, 1, 13, 51, 3, 29, 4, 0, 5, 1, 3, 9, 34, 2, 3, 9, 7, 87, 9, 42, 6, 69, 11, 28, 4, 11, 5, 11, 11, 39, 3, 4, 12, 43, 5, 25, 7, 10, 38, 27, 5, 62, 2, 28, 3, 10, 7, 9, 14, 0, 89, 75, 5, 9, 18, 8, 13, 42, 4, 11, 71, 55, 9, 9, 4, 48, 83, 2, 2, 30, 14, 230, 23, 280, 3, 5, 3, 37, 3, 5, 3, 7, 2, 0, 2, 0, 2, 0, 2, 30, 3, 52, 2, 6, 2, 0, 4, 2, 2, 6, 4, 3, 3, 5, 5, 12, 6, 2, 2, 6, 67, 1, 20, 0, 29, 0, 14, 0, 17, 4, 60, 12, 5, 0, 4, 11, 18, 0, 5, 0, 3, 9, 2, 0, 4, 4, 7, 0, 2, 0, 2, 0, 2, 3, 2, 10, 3, 3, 6, 4, 5, 0, 53, 1, 2684, 46, 2, 46, 2, 132, 7, 6, 15, 37, 11, 53, 10, 0, 17, 22, 10, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 6, 2, 31, 48, 0, 470, 1, 36, 5, 2, 4, 6, 1, 5, 85, 3, 1, 3, 2, 2, 89, 2, 3, 6, 40, 4, 93, 18, 23, 57, 15, 513, 6581, 75, 20939, 53, 1164, 68, 45, 3, 268, 4, 27, 21, 31, 3, 13, 13, 1, 2, 24, 9, 69, 11, 1, 38, 8, 3, 102, 3, 1, 111, 44, 25, 51, 13, 68, 12, 9, 7, 23, 4, 0, 5, 45, 3, 35, 13, 28, 4, 64, 15, 10, 39, 54, 10, 13, 3, 9, 7, 22, 4, 1, 5, 66, 25, 2, 227, 42, 2, 1, 3, 9, 7, 11171, 13, 22, 5, 48, 8453, 301, 3, 61, 3, 105, 39, 6, 13, 4, 6, 11, 2, 12, 2, 4, 2, 0, 2, 1, 2, 1, 2, 107, 34, 362, 19, 63, 3, 53, 41, 11, 5, 15, 17, 6, 13, 1, 25, 2, 33, 4, 2, 134, 20, 9, 8, 25, 5, 0, 2, 25, 12, 88, 4, 5, 3, 5, 3, 5, 3, 2]
      , i = 0
      , s = [];
    for (var o = 0; o < r.length; o += 2)
        s.push(i += r[o]),
        r[o + 1] && s.push(45, i += r[o + 1]);
    t.wordChars = String.fromCharCode.apply(null, s)
}),
define("ace/mode/text", ["require", "exports", "module", "ace/config", "ace/tokenizer", "ace/mode/text_highlight_rules", "ace/mode/behaviour/cstyle", "ace/unicode", "ace/lib/lang", "ace/token_iterator", "ace/range"], function(e, t, n) {
    "use strict";
    var r = e("../config")
      , i = e("../tokenizer").Tokenizer
      , s = e("./text_highlight_rules").TextHighlightRules
      , o = e("./behaviour/cstyle").CstyleBehaviour
      , u = e("../unicode")
      , a = e("../lib/lang")
      , f = e("../token_iterator").TokenIterator
      , l = e("../range").Range
      , c = function() {
        this.HighlightRules = s
    };
    (function() {
        this.$defaultBehaviour = new o,
        this.tokenRe = new RegExp("^[" + u.wordChars + "\\$_]+","g"),
        this.nonTokenRe = new RegExp("^(?:[^" + u.wordChars + "\\$_]|\\s])+","g"),
        this.getTokenizer = function() {
            return this.$tokenizer || (this.$highlightRules = this.$highlightRules || new this.HighlightRules(this.$highlightRuleConfig),
            this.$tokenizer = new i(this.$highlightRules.getRules())),
            this.$tokenizer
        }
        ,
        this.lineCommentStart = "",
        this.blockComment = "",
        this.toggleCommentLines = function(e, t, n, r) {
            function w(e) {
                for (var t = n; t <= r; t++)
                    e(i.getLine(t), t)
            }
            var i = t.doc
              , s = !0
              , o = !0
              , u = Infinity
              , f = t.getTabSize()
              , l = !1;
            if (!this.lineCommentStart) {
                if (!this.blockComment)
                    return !1;
                var c = this.blockComment.start
                  , h = this.blockComment.end
                  , p = new RegExp("^(\\s*)(?:" + a.escapeRegExp(c) + ")")
                  , d = new RegExp("(?:" + a.escapeRegExp(h) + ")\\s*$")
                  , v = function(e, t) {
                    if (g(e, t))
                        return;
                    if (!s || /\S/.test(e))
                        i.insertInLine({
                            row: t,
                            column: e.length
                        }, h),
                        i.insertInLine({
                            row: t,
                            column: u
                        }, c)
                }
                  , m = function(e, t) {
                    var n;
                    (n = e.match(d)) && i.removeInLine(t, e.length - n[0].length, e.length),
                    (n = e.match(p)) && i.removeInLine(t, n[1].length, n[0].length)
                }
                  , g = function(e, n) {
                    if (p.test(e))
                        return !0;
                    var r = t.getTokens(n);
                    for (var i = 0; i < r.length; i++)
                        if (r[i].type === "comment")
                            return !0
                }
            } else {
                if (Array.isArray(this.lineCommentStart))
                    var p = this.lineCommentStart.map(a.escapeRegExp).join("|")
                      , c = this.lineCommentStart[0];
                else
                    var p = a.escapeRegExp(this.lineCommentStart)
                      , c = this.lineCommentStart;
                p = new RegExp("^(\\s*)(?:" + p + ") ?"),
                l = t.getUseSoftTabs();
                var m = function(e, t) {
                    var n = e.match(p);
                    if (!n)
                        return;
                    var r = n[1].length
                      , s = n[0].length;
                    !b(e, r, s) && n[0][s - 1] == " " && s--,
                    i.removeInLine(t, r, s)
                }
                  , y = c + " "
                  , v = function(e, t) {
                    if (!s || /\S/.test(e))
                        b(e, u, u) ? i.insertInLine({
                            row: t,
                            column: u
                        }, y) : i.insertInLine({
                            row: t,
                            column: u
                        }, c)
                }
                  , g = function(e, t) {
                    return p.test(e)
                }
                  , b = function(e, t, n) {
                    var r = 0;
                    while (t-- && e.charAt(t) == " ")
                        r++;
                    if (r % f != 0)
                        return !1;
                    var r = 0;
                    while (e.charAt(n++) == " ")
                        r++;
                    return f > 2 ? r % f != f - 1 : r % f == 0
                }
            }
            var E = Infinity;
            w(function(e, t) {
                var n = e.search(/\S/);
                n !== -1 ? (n < u && (u = n),
                o && !g(e, t) && (o = !1)) : E > e.length && (E = e.length)
            }),
            u == Infinity && (u = E,
            s = !1,
            o = !1),
            l && u % f != 0 && (u = Math.floor(u / f) * f),
            w(o ? m : v)
        }
        ,
        this.toggleBlockComment = function(e, t, n, r) {
            var i = this.blockComment;
            if (!i)
                return;
            !i.start && i[0] && (i = i[0]);
            var s = new f(t,r.row,r.column), o = s.getCurrentToken(), u = t.selection, a = t.selection.toOrientedRange(), c, h;
            if (o && /comment/.test(o.type)) {
                var p, d;
                while (o && /comment/.test(o.type)) {
                    var v = o.value.indexOf(i.start);
                    if (v != -1) {
                        var m = s.getCurrentTokenRow()
                          , g = s.getCurrentTokenColumn() + v;
                        p = new l(m,g,m,g + i.start.length);
                        break
                    }
                    o = s.stepBackward()
                }
                var s = new f(t,r.row,r.column)
                  , o = s.getCurrentToken();
                while (o && /comment/.test(o.type)) {
                    var v = o.value.indexOf(i.end);
                    if (v != -1) {
                        var m = s.getCurrentTokenRow()
                          , g = s.getCurrentTokenColumn() + v;
                        d = new l(m,g,m,g + i.end.length);
                        break
                    }
                    o = s.stepForward()
                }
                d && t.remove(d),
                p && (t.remove(p),
                c = p.start.row,
                h = -i.start.length)
            } else
                h = i.start.length,
                c = n.start.row,
                t.insert(n.end, i.end),
                t.insert(n.start, i.start);
            a.start.row == c && (a.start.column += h),
            a.end.row == c && (a.end.column += h),
            t.selection.fromOrientedRange(a)
        }
        ,
        this.getNextLineIndent = function(e, t, n) {
            return this.$getIndent(t)
        }
        ,
        this.checkOutdent = function(e, t, n) {
            return !1
        }
        ,
        this.autoOutdent = function(e, t, n) {}
        ,
        this.$getIndent = function(e) {
            return e.match(/^\s*/)[0]
        }
        ,
        this.createWorker = function(e) {
            return null
        }
        ,
        this.createModeDelegates = function(e) {
            this.$embeds = [],
            this.$modes = {};
            for (var t in e)
                if (e[t]) {
                    var n = e[t]
                      , i = n.prototype.$id
                      , s = r.$modes[i];
                    s || (r.$modes[i] = s = new n),
                    r.$modes[t] || (r.$modes[t] = s),
                    this.$embeds.push(t),
                    this.$modes[t] = s
                }
            var o = ["toggleBlockComment", "toggleCommentLines", "getNextLineIndent", "checkOutdent", "autoOutdent", "transformAction", "getCompletions"];
            for (var t = 0; t < o.length; t++)
                (function(e) {
                    var n = o[t]
                      , r = e[n];
                    e[o[t]] = function() {
                        return this.$delegator(n, arguments, r)
                    }
                }
                )(this)
        }
        ,
        this.$delegator = function(e, t, n) {
            var r = t[0] || "start";
            if (typeof r != "string") {
                if (Array.isArray(r[2])) {
                    var i = r[2][r[2].length - 1]
                      , s = this.$modes[i];
                    if (s)
                        return s[e].apply(s, [r[1]].concat([].slice.call(t, 1)))
                }
                r = r[0] || "start"
            }
            for (var o = 0; o < this.$embeds.length; o++) {
                if (!this.$modes[this.$embeds[o]])
                    continue;
                var u = r.split(this.$embeds[o]);
                if (!u[0] && u[1]) {
                    t[0] = u[1];
                    var s = this.$modes[this.$embeds[o]];
                    return s[e].apply(s, t)
                }
            }
            var a = n.apply(this, t);
            return n ? a : undefined
        }
        ,
        this.transformAction = function(e, t, n, r, i) {
            if (this.$behaviour) {
                var s = this.$behaviour.getBehaviours();
                for (var o in s)
                    if (s[o][t]) {
                        var u = s[o][t].apply(this, arguments);
                        if (u)
                            return u
                    }
            }
        }
        ,
        this.getKeywords = function(e) {
            if (!this.completionKeywords) {
                var t = this.$tokenizer.rules
                  , n = [];
                for (var r in t) {
                    var i = t[r];
                    for (var s = 0, o = i.length; s < o; s++)
                        if (typeof i[s].token == "string")
                            /keyword|support|storage/.test(i[s].token) && n.push(i[s].regex);
                        else if (typeof i[s].token == "object")
                            for (var u = 0, a = i[s].token.length; u < a; u++)
                                if (/keyword|support|storage/.test(i[s].token[u])) {
                                    var r = i[s].regex.match(/\(.+?\)/g)[u];
                                    n.push(r.substr(1, r.length - 2))
                                }
                }
                this.completionKeywords = n
            }
            return e ? n.concat(this.$keywordList || []) : this.$keywordList
        }
        ,
        this.$createKeywordList = function() {
            return this.$highlightRules || this.getTokenizer(),
            this.$keywordList = this.$highlightRules.$keywordList || []
        }
        ,
        this.getCompletions = function(e, t, n, r) {
            var i = this.$keywordList || this.$createKeywordList();
            return i.map(function(e) {
                return {
                    name: e,
                    value: e,
                    score: 0,
                    meta: "keyword"
                }
            })
        }
        ,
        this.$id = "ace/mode/text"
    }
    ).call(c.prototype),
    t.Mode = c
}),
define("ace/apply_delta", ["require", "exports", "module"], function(e, t, n) {
    "use strict";
    function r(e, t) {
        throw console.log("Invalid Delta:", e),
        "Invalid Delta: " + t
    }
    function i(e, t) {
        return t.row >= 0 && t.row < e.length && t.column >= 0 && t.column <= e[t.row].length
    }
    function s(e, t) {
        t.action != "insert" && t.action != "remove" && r(t, "delta.action must be 'insert' or 'remove'"),
        t.lines instanceof Array || r(t, "delta.lines must be an Array"),
        (!t.start || !t.end) && r(t, "delta.start/end must be an present");
        var n = t.start;
        i(e, t.start) || r(t, "delta.start must be contained in document");
        var s = t.end;
        t.action == "remove" && !i(e, s) && r(t, "delta.end must contained in document for 'remove' actions");
        var o = s.row - n.row
          , u = s.column - (o == 0 ? n.column : 0);
        (o != t.lines.length - 1 || t.lines[o].length != u) && r(t, "delta.range must match delta lines")
    }
    t.applyDelta = function(e, t, n) {
        var r = t.start.row
          , i = t.start.column
          , s = e[r] || "";
        switch (t.action) {
        case "insert":
            var o = t.lines;
            if (o.length === 1)
                e[r] = s.substring(0, i) + t.lines[0] + s.substring(i);
            else {
                var u = [r, 1].concat(t.lines);
                e.splice.apply(e, u),
                e[r] = s.substring(0, i) + e[r],
                e[r + t.lines.length - 1] += s.substring(i)
            }
            break;
        case "remove":
            var a = t.end.column
              , f = t.end.row;
            r === f ? e[r] = s.substring(0, i) + s.substring(a) : e.splice(r, f - r + 1, s.substring(0, i) + e[f].substring(a))
        }
    }
}),
define("ace/anchor", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter"], function(e, t, n) {
    "use strict";
    var r = e("./lib/oop")
      , i = e("./lib/event_emitter").EventEmitter
      , s = t.Anchor = function(e, t, n) {
        this.$onChange = this.onChange.bind(this),
        this.attach(e),
        typeof n == "undefined" ? this.setPosition(t.row, t.column) : this.setPosition(t, n)
    }
    ;
    (function() {
        function e(e, t, n) {
            var r = n ? e.column <= t.column : e.column < t.column;
            return e.row < t.row || e.row == t.row && r
        }
        function t(t, n, r) {
            var i = t.action == "insert"
              , s = (i ? 1 : -1) * (t.end.row - t.start.row)
              , o = (i ? 1 : -1) * (t.end.column - t.start.column)
              , u = t.start
              , a = i ? u : t.end;
            return e(n, u, r) ? {
                row: n.row,
                column: n.column
            } : e(a, n, !r) ? {
                row: n.row + s,
                column: n.column + (n.row == a.row ? o : 0)
            } : {
                row: u.row,
                column: u.column
            }
        }
        r.implement(this, i),
        this.getPosition = function() {
            return this.$clipPositionToDocument(this.row, this.column)
        }
        ,
        this.getDocument = function() {
            return this.document
        }
        ,
        this.$insertRight = !1,
        this.onChange = function(e) {
            if (e.start.row == e.end.row && e.start.row != this.row)
                return;
            if (e.start.row > this.row)
                return;
            var n = t(e, {
                row: this.row,
                column: this.column
            }, this.$insertRight);
            this.setPosition(n.row, n.column, !0)
        }
        ,
        this.setPosition = function(e, t, n) {
            var r;
            n ? r = {
                row: e,
                column: t
            } : r = this.$clipPositionToDocument(e, t);
            if (this.row == r.row && this.column == r.column)
                return;
            var i = {
                row: this.row,
                column: this.column
            };
            this.row = r.row,
            this.column = r.column,
            this._signal("change", {
                old: i,
                value: r
            })
        }
        ,
        this.detach = function() {
            this.document.removeEventListener("change", this.$onChange)
        }
        ,
        this.attach = function(e) {
            this.document = e || this.document,
            this.document.on("change", this.$onChange)
        }
        ,
        this.$clipPositionToDocument = function(e, t) {
            var n = {};
            return e >= this.document.getLength() ? (n.row = Math.max(0, this.document.getLength() - 1),
            n.column = this.document.getLine(n.row).length) : e < 0 ? (n.row = 0,
            n.column = 0) : (n.row = e,
            n.column = Math.min(this.document.getLine(n.row).length, Math.max(0, t))),
            t < 0 && (n.column = 0),
            n
        }
    }
    ).call(s.prototype)
}),
define("ace/document", ["require", "exports", "module", "ace/lib/oop", "ace/apply_delta", "ace/lib/event_emitter", "ace/range", "ace/anchor"], function(e, t, n) {
    "use strict";
    var r = e("./lib/oop")
      , i = e("./apply_delta").applyDelta
      , s = e("./lib/event_emitter").EventEmitter
      , o = e("./range").Range
      , u = e("./anchor").Anchor
      , a = function(e) {
        this.$lines = [""],
        e.length === 0 ? this.$lines = [""] : Array.isArray(e) ? this.insertMergedLines({
            row: 0,
            column: 0
        }, e) : this.insert({
            row: 0,
            column: 0
        }, e)
    };
    (function() {
        r.implement(this, s),
        this.setValue = function(e) {
            var t = this.getLength() - 1;
            this.remove(new o(0,0,t,this.getLine(t).length)),
            this.insert({
                row: 0,
                column: 0
            }, e)
        }
        ,
        this.getValue = function() {
            return this.getAllLines().join(this.getNewLineCharacter())
        }
        ,
        this.createAnchor = function(e, t) {
            return new u(this,e,t)
        }
        ,
        "aaa".split(/a/).length === 0 ? this.$split = function(e) {
            return e.replace(/\r\n|\r/g, "\n").split("\n")
        }
        : this.$split = function(e) {
            return e.split(/\r\n|\r|\n/)
        }
        ,
        this.$detectNewLine = function(e) {
            var t = e.match(/^.*?(\r\n|\r|\n)/m);
            this.$autoNewLine = t ? t[1] : "\n",
            this._signal("changeNewLineMode")
        }
        ,
        this.getNewLineCharacter = function() {
            switch (this.$newLineMode) {
            case "windows":
                return "\r\n";
            case "unix":
                return "\n";
            default:
                return this.$autoNewLine || "\n"
            }
        }
        ,
        this.$autoNewLine = "",
        this.$newLineMode = "auto",
        this.setNewLineMode = function(e) {
            if (this.$newLineMode === e)
                return;
            this.$newLineMode = e,
            this._signal("changeNewLineMode")
        }
        ,
        this.getNewLineMode = function() {
            return this.$newLineMode
        }
        ,
        this.isNewLine = function(e) {
            return e == "\r\n" || e == "\r" || e == "\n"
        }
        ,
        this.getLine = function(e) {
            return this.$lines[e] || ""
        }
        ,
        this.getLines = function(e, t) {
            return this.$lines.slice(e, t + 1)
        }
        ,
        this.getAllLines = function() {
            return this.getLines(0, this.getLength())
        }
        ,
        this.getLength = function() {
            return this.$lines.length
        }
        ,
        this.getTextRange = function(e) {
            return this.getLinesForRange(e).join(this.getNewLineCharacter())
        }
        ,
        this.getLinesForRange = function(e) {
            var t;
            if (e.start.row === e.end.row)
                t = [this.getLine(e.start.row).substring(e.start.column, e.end.column)];
            else {
                t = this.getLines(e.start.row, e.end.row),
                t[0] = (t[0] || "").substring(e.start.column);
                var n = t.length - 1;
                e.end.row - e.start.row == n && (t[n] = t[n].substring(0, e.end.column))
            }
            return t
        }
        ,
        this.insertLines = function(e, t) {
            return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),
            this.insertFullLines(e, t)
        }
        ,
        this.removeLines = function(e, t) {
            return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),
            this.removeFullLines(e, t)
        }
        ,
        this.insertNewLine = function(e) {
            return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),
            this.insertMergedLines(e, ["", ""])
        }
        ,
        this.insert = function(e, t) {
            return this.getLength() <= 1 && this.$detectNewLine(t),
            this.insertMergedLines(e, this.$split(t))
        }
        ,
        this.insertInLine = function(e, t) {
            var n = this.clippedPos(e.row, e.column)
              , r = this.pos(e.row, e.column + t.length);
            return this.applyDelta({
                start: n,
                end: r,
                action: "insert",
                lines: [t]
            }, !0),
            this.clonePos(r)
        }
        ,
        this.clippedPos = function(e, t) {
            var n = this.getLength();
            e === undefined ? e = n : e < 0 ? e = 0 : e >= n && (e = n - 1,
            t = undefined);
            var r = this.getLine(e);
            return t == undefined && (t = r.length),
            t = Math.min(Math.max(t, 0), r.length),
            {
                row: e,
                column: t
            }
        }
        ,
        this.clonePos = function(e) {
            return {
                row: e.row,
                column: e.column
            }
        }
        ,
        this.pos = function(e, t) {
            return {
                row: e,
                column: t
            }
        }
        ,
        this.$clipPosition = function(e) {
            var t = this.getLength();
            return e.row >= t ? (e.row = Math.max(0, t - 1),
            e.column = this.getLine(t - 1).length) : (e.row = Math.max(0, e.row),
            e.column = Math.min(Math.max(e.column, 0), this.getLine(e.row).length)),
            e
        }
        ,
        this.insertFullLines = function(e, t) {
            e = Math.min(Math.max(e, 0), this.getLength());
            var n = 0;
            e < this.getLength() ? (t = t.concat([""]),
            n = 0) : (t = [""].concat(t),
            e--,
            n = this.$lines[e].length),
            this.insertMergedLines({
                row: e,
                column: n
            }, t)
        }
        ,
        this.insertMergedLines = function(e, t) {
            var n = this.clippedPos(e.row, e.column)
              , r = {
                row: n.row + t.length - 1,
                column: (t.length == 1 ? n.column : 0) + t[t.length - 1].length
            };
            return this.applyDelta({
                start: n,
                end: r,
                action: "insert",
                lines: t
            }),
            this.clonePos(r)
        }
        ,
        this.remove = function(e) {
            var t = this.clippedPos(e.start.row, e.start.column)
              , n = this.clippedPos(e.end.row, e.end.column);
            return this.applyDelta({
                start: t,
                end: n,
                action: "remove",
                lines: this.getLinesForRange({
                    start: t,
                    end: n
                })
            }),
            this.clonePos(t)
        }
        ,
        this.removeInLine = function(e, t, n) {
            var r = this.clippedPos(e, t)
              , i = this.clippedPos(e, n);
            return this.applyDelta({
                start: r,
                end: i,
                action: "remove",
                lines: this.getLinesForRange({
                    start: r,
                    end: i
                })
            }, !0),
            this.clonePos(r)
        }
        ,
        this.removeFullLines = function(e, t) {
            e = Math.min(Math.max(0, e), this.getLength() - 1),
            t = Math.min(Math.max(0, t), this.getLength() - 1);
            var n = t == this.getLength() - 1 && e > 0
              , r = t < this.getLength() - 1
              , i = n ? e - 1 : e
              , s = n ? this.getLine(i).length : 0
              , u = r ? t + 1 : t
              , a = r ? 0 : this.getLine(u).length
              , f = new o(i,s,u,a)
              , l = this.$lines.slice(e, t + 1);
            return this.applyDelta({
                start: f.start,
                end: f.end,
                action: "remove",
                lines: this.getLinesForRange(f)
            }),
            l
        }
        ,
        this.removeNewLine = function(e) {
            e < this.getLength() - 1 && e >= 0 && this.applyDelta({
                start: this.pos(e, this.getLine(e).length),
                end: this.pos(e + 1, 0),
                action: "remove",
                lines: ["", ""]
            })
        }
        ,
        this.replace = function(e, t) {
            e instanceof o || (e = o.fromPoints(e.start, e.end));
            if (t.length === 0 && e.isEmpty())
                return e.start;
            if (t == this.getTextRange(e))
                return e.end;
            this.remove(e);
            var n;
            return t ? n = this.insert(e.start, t) : n = e.start,
            n
        }
        ,
        this.applyDeltas = function(e) {
            for (var t = 0; t < e.length; t++)
                this.applyDelta(e[t])
        }
        ,
        this.revertDeltas = function(e) {
            for (var t = e.length - 1; t >= 0; t--)
                this.revertDelta(e[t])
        }
        ,
        this.applyDelta = function(e, t) {
            var n = e.action == "insert";
            if (n ? e.lines.length <= 1 && !e.lines[0] : !o.comparePoints(e.start, e.end))
                return;
            n && e.lines.length > 2e4 ? this.$splitAndapplyLargeDelta(e, 2e4) : (i(this.$lines, e, t),
            this._signal("change", e))
        }
        ,
        this.$safeApplyDelta = function(e) {
            var t = this.$lines.length;
            (e.action == "remove" && e.start.row < t && e.end.row < t || e.action == "insert" && e.start.row <= t) && this.applyDelta(e)
        }
        ,
        this.$splitAndapplyLargeDelta = function(e, t) {
            var n = e.lines
              , r = n.length - t + 1
              , i = e.start.row
              , s = e.start.column;
            for (var o = 0, u = 0; o < r; o = u) {
                u += t - 1;
                var a = n.slice(o, u);
                a.push(""),
                this.applyDelta({
                    start: this.pos(i + o, s),
                    end: this.pos(i + u, s = 0),
                    action: e.action,
                    lines: a
                }, !0)
            }
            e.lines = n.slice(o),
            e.start.row = i + o,
            e.start.column = s,
            this.applyDelta(e, !0)
        }
        ,
        this.revertDelta = function(e) {
            this.$safeApplyDelta({
                start: this.clonePos(e.start),
                end: this.clonePos(e.end),
                action: e.action == "insert" ? "remove" : "insert",
                lines: e.lines.slice()
            })
        }
        ,
        this.indexToPosition = function(e, t) {
            var n = this.$lines || this.getAllLines()
              , r = this.getNewLineCharacter().length;
            for (var i = t || 0, s = n.length; i < s; i++) {
                e -= n[i].length + r;
                if (e < 0)
                    return {
                        row: i,
                        column: e + n[i].length + r
                    }
            }
            return {
                row: s - 1,
                column: e + n[s - 1].length + r
            }
        }
        ,
        this.positionToIndex = function(e, t) {
            var n = this.$lines || this.getAllLines()
              , r = this.getNewLineCharacter().length
              , i = 0
              , s = Math.min(e.row, n.length);
            for (var o = t || 0; o < s; ++o)
                i += n[o].length + r;
            return i + e.column
        }
    }
    ).call(a.prototype),
    t.Document = a
}),
define("ace/background_tokenizer", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter"], function(e, t, n) {
    "use strict";
    var r = e("./lib/oop")
      , i = e("./lib/event_emitter").EventEmitter
      , s = function(e, t) {
        this.running = !1,
        this.lines = [],
        this.states = [],
        this.currentLine = 0,
        this.tokenizer = e;
        var n = this;
        this.$worker = function() {
            if (!n.running)
                return;
            var e = new Date
              , t = n.currentLine
              , r = -1
              , i = n.doc
              , s = t;
            while (n.lines[t])
                t++;
            var o = i.getLength()
              , u = 0;
            n.running = !1;
            while (t < o) {
                n.$tokenizeRow(t),
                r = t;
                do
                    t++;
                while (n.lines[t]);
                u++;
                if (u % 5 === 0 && new Date - e > 20) {
                    n.running = setTimeout(n.$worker, 20);
                    break
                }
            }
            n.currentLine = t,
            r == -1 && (r = t),
            s <= r && n.fireUpdateEvent(s, r)
        }
    };
    (function() {
        r.implement(this, i),
        this.setTokenizer = function(e) {
            this.tokenizer = e,
            this.lines = [],
            this.states = [],
            this.start(0)
        }
        ,
        this.setDocument = function(e) {
            this.doc = e,
            this.lines = [],
            this.states = [],
            this.stop()
        }
        ,
        this.fireUpdateEvent = function(e, t) {
            var n = {
                first: e,
                last: t
            };
            this._signal("update", {
                data: n
            })
        }
        ,
        this.start = function(e) {
            this.currentLine = Math.min(e || 0, this.currentLine, this.doc.getLength()),
            this.lines.splice(this.currentLine, this.lines.length),
            this.states.splice(this.currentLine, this.states.length),
            this.stop(),
            this.running = setTimeout(this.$worker, 700)
        }
        ,
        this.scheduleStart = function() {
            this.running || (this.running = setTimeout(this.$worker, 700))
        }
        ,
        this.$updateOnChange = function(e) {
            var t = e.start.row
              , n = e.end.row - t;
            if (n === 0)
                this.lines[t] = null;
            else if (e.action == "remove")
                this.lines.splice(t, n + 1, null),
                this.states.splice(t, n + 1, null);
            else {
                var r = Array(n + 1);
                r.unshift(t, 1),
                this.lines.splice.apply(this.lines, r),
                this.states.splice.apply(this.states, r)
            }
            this.currentLine = Math.min(t, this.currentLine, this.doc.getLength()),
            this.stop()
        }
        ,
        this.stop = function() {
            this.running && clearTimeout(this.running),
            this.running = !1
        }
        ,
        this.getTokens = function(e) {
            return this.lines[e] || this.$tokenizeRow(e)
        }
        ,
        this.getState = function(e) {
            return this.currentLine == e && this.$tokenizeRow(e),
            this.states[e] || "start"
        }
        ,
        this.$tokenizeRow = function(e) {
            var t = this.doc.getLine(e)
              , n = this.states[e - 1]
              , r = this.tokenizer.getLineTokens(t, n, e);
            return this.states[e] + "" != r.state + "" ? (this.states[e] = r.state,
            this.lines[e + 1] = null,
            this.currentLine > e + 1 && (this.currentLine = e + 1)) : this.currentLine == e && (this.currentLine = e + 1),
            this.lines[e] = r.tokens
        }
    }
    ).call(s.prototype),
    t.BackgroundTokenizer = s
}),
define("ace/search_highlight", ["require", "exports", "module", "ace/lib/lang", "ace/lib/oop", "ace/range"], function(e, t, n) {
    "use strict";
    var r = e("./lib/lang")
      , i = e("./lib/oop")
      , s = e("./range").Range
      , o = function(e, t, n) {
        this.setRegexp(e),
        this.clazz = t,
        this.type = n || "text"
    };
    (function() {
        this.MAX_RANGES = 500,
        this.setRegexp = function(e) {
            if (this.regExp + "" == e + "")
                return;
            this.regExp = e,
            this.cache = []
        }
        ,
        this.update = function(e, t, n, i) {
            if (!this.regExp)
                return;
            var o = i.firstRow
              , u = i.lastRow;
            for (var a = o; a <= u; a++) {
                var f = this.cache[a];
                f == null && (f = r.getMatchOffsets(n.getLine(a), this.regExp),
                f.length > this.MAX_RANGES && (f = f.slice(0, this.MAX_RANGES)),
                f = f.map(function(e) {
                    return new s(a,e.offset,a,e.offset + e.length)
                }),
                this.cache[a] = f.length ? f : "");
                for (var l = f.length; l--; )
                    t.drawSingleLineMarker(e, f[l].toScreenRange(n), this.clazz, i)
            }
        }
    }
    ).call(o.prototype),
    t.SearchHighlight = o
}),
define("ace/edit_session/fold_line", ["require", "exports", "module", "ace/range"], function(e, t, n) {
    "use strict";
    function i(e, t) {
        this.foldData = e,
        Array.isArray(t) ? this.folds = t : t = this.folds = [t];
        var n = t[t.length - 1];
        this.range = new r(t[0].start.row,t[0].start.column,n.end.row,n.end.column),
        this.start = this.range.start,
        this.end = this.range.end,
        this.folds.forEach(function(e) {
            e.setFoldLine(this)
        }, this)
    }
    var r = e("../range").Range;
    (function() {
        this.shiftRow = function(e) {
            this.start.row += e,
            this.end.row += e,
            this.folds.forEach(function(t) {
                t.start.row += e,
                t.end.row += e
            })
        }
        ,
        this.addFold = function(e) {
            if (e.sameRow) {
                if (e.start.row < this.startRow || e.endRow > this.endRow)
                    throw new Error("Can't add a fold to this FoldLine as it has no connection");
                this.folds.push(e),
                this.folds.sort(function(e, t) {
                    return -e.range.compareEnd(t.start.row, t.start.column)
                }),
                this.range.compareEnd(e.start.row, e.start.column) > 0 ? (this.end.row = e.end.row,
                this.end.column = e.end.column) : this.range.compareStart(e.end.row, e.end.column) < 0 && (this.start.row = e.start.row,
                this.start.column = e.start.column)
            } else if (e.start.row == this.end.row)
                this.folds.push(e),
                this.end.row = e.end.row,
                this.end.column = e.end.column;
            else {
                if (e.end.row != this.start.row)
                    throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");
                this.folds.unshift(e),
                this.start.row = e.start.row,
                this.start.column = e.start.column
            }
            e.foldLine = this
        }
        ,
        this.containsRow = function(e) {
            return e >= this.start.row && e <= this.end.row
        }
        ,
        this.walk = function(e, t, n) {
            var r = 0, i = this.folds, s, o, u, a = !0;
            t == null && (t = this.end.row,
            n = this.end.column);
            for (var f = 0; f < i.length; f++) {
                s = i[f],
                o = s.range.compareStart(t, n);
                if (o == -1) {
                    e(null, t, n, r, a);
                    return
                }
                u = e(null, s.start.row, s.start.column, r, a),
                u = !u && e(s.placeholder, s.start.row, s.start.column, r);
                if (u || o === 0)
                    return;
                a = !s.sameRow,
                r = s.end.column
            }
            e(null, t, n, r, a)
        }
        ,
        this.getNextFoldTo = function(e, t) {
            var n, r;
            for (var i = 0; i < this.folds.length; i++) {
                n = this.folds[i],
                r = n.range.compareEnd(e, t);
                if (r == -1)
                    return {
                        fold: n,
                        kind: "after"
                    };
                if (r === 0)
                    return {
                        fold: n,
                        kind: "inside"
                    }
            }
            return null
        }
        ,
        this.addRemoveChars = function(e, t, n) {
            var r = this.getNextFoldTo(e, t), i, s;
            if (r) {
                i = r.fold;
                if (r.kind == "inside" && i.start.column != t && i.start.row != e)
                    window.console && window.console.log(e, t, i);
                else if (i.start.row == e) {
                    s = this.folds;
                    var o = s.indexOf(i);
                    o === 0 && (this.start.column += n);
                    for (o; o < s.length; o++) {
                        i = s[o],
                        i.start.column += n;
                        if (!i.sameRow)
                            return;
                        i.end.column += n
                    }
                    this.end.column += n
                }
            }
        }
        ,
        this.split = function(e, t) {
            var n = this.getNextFoldTo(e, t);
            if (!n || n.kind == "inside")
                return null;
            var r = n.fold
              , s = this.folds
              , o = this.foldData
              , u = s.indexOf(r)
              , a = s[u - 1];
            this.end.row = a.end.row,
            this.end.column = a.end.column,
            s = s.splice(u, s.length - u);
            var f = new i(o,s);
            return o.splice(o.indexOf(this) + 1, 0, f),
            f
        }
        ,
        this.merge = function(e) {
            var t = e.folds;
            for (var n = 0; n < t.length; n++)
                this.addFold(t[n]);
            var r = this.foldData;
            r.splice(r.indexOf(e), 1)
        }
        ,
        this.toString = function() {
            var e = [this.range.toString() + ": ["];
            return this.folds.forEach(function(t) {
                e.push("  " + t.toString())
            }),
            e.push("]"),
            e.join("\n")
        }
        ,
        this.idxToPosition = function(e) {
            var t = 0;
            for (var n = 0; n < this.folds.length; n++) {
                var r = this.folds[n];
                e -= r.start.column - t;
                if (e < 0)
                    return {
                        row: r.start.row,
                        column: r.start.column + e
                    };
                e -= r.placeholder.length;
                if (e < 0)
                    return r.start;
                t = r.end.column
            }
            return {
                row: this.end.row,
                column: this.end.column + e
            }
        }
    }
    ).call(i.prototype),
    t.FoldLine = i
}),
define("ace/range_list", ["require", "exports", "module", "ace/range"], function(e, t, n) {
    "use strict";
    var r = e("./range").Range
      , i = r.comparePoints
      , s = function() {
        this.ranges = [],
        this.$bias = 1
    };
    (function() {
        this.comparePoints = i,
        this.pointIndex = function(e, t, n) {
            var r = this.ranges;
            for (var s = n || 0; s < r.length; s++) {
                var o = r[s]
                  , u = i(e, o.end);
                if (u > 0)
                    continue;
                var a = i(e, o.start);
                return u === 0 ? t && a !== 0 ? -s - 2 : s : a > 0 || a === 0 && !t ? s : -s - 1
            }
            return -s - 1
        }
        ,
        this.add = function(e) {
            var t = !e.isEmpty()
              , n = this.pointIndex(e.start, t);
            n < 0 && (n = -n - 1);
            var r = this.pointIndex(e.end, t, n);
            return r < 0 ? r = -r - 1 : r++,
            this.ranges.splice(n, r - n, e)
        }
        ,
        this.addList = function(e) {
            var t = [];
            for (var n = e.length; n--; )
                t.push.apply(t, this.add(e[n]));
            return t
        }
        ,
        this.substractPoint = function(e) {
            var t = this.pointIndex(e);
            if (t >= 0)
                return this.ranges.splice(t, 1)
        }
        ,
        this.merge = function() {
            var e = []
              , t = this.ranges;
            t = t.sort(function(e, t) {
                return i(e.start, t.start)
            });
            var n = t[0], r;
            for (var s = 1; s < t.length; s++) {
                r = n,
                n = t[s];
                var o = i(r.end, n.start);
                if (o < 0)
                    continue;
                if (o == 0 && !r.isEmpty() && !n.isEmpty())
                    continue;
                i(r.end, n.end) < 0 && (r.end.row = n.end.row,
                r.end.column = n.end.column),
                t.splice(s, 1),
                e.push(n),
                n = r,
                s--
            }
            return this.ranges = t,
            e
        }
        ,
        this.contains = function(e, t) {
            return this.pointIndex({
                row: e,
                column: t
            }) >= 0
        }
        ,
        this.containsPoint = function(e) {
            return this.pointIndex(e) >= 0
        }
        ,
        this.rangeAtPoint = function(e) {
            var t = this.pointIndex(e);
            if (t >= 0)
                return this.ranges[t]
        }
        ,
        this.clipRows = function(e, t) {
            var n = this.ranges;
            if (n[0].start.row > t || n[n.length - 1].start.row < e)
                return [];
            var r = this.pointIndex({
                row: e,
                column: 0
            });
            r < 0 && (r = -r - 1);
            var i = this.pointIndex({
                row: t,
                column: 0
            }, r);
            i < 0 && (i = -i - 1);
            var s = [];
            for (var o = r; o < i; o++)
                s.push(n[o]);
            return s
        }
        ,
        this.removeAll = function() {
            return this.ranges.splice(0, this.ranges.length)
        }
        ,
        this.attach = function(e) {
            this.session && this.detach(),
            this.session = e,
            this.onChange = this.$onChange.bind(this),
            this.session.on("change", this.onChange)
        }
        ,
        this.detach = function() {
            if (!this.session)
                return;
            this.session.removeListener("change", this.onChange),
            this.session = null
        }
        ,
        this.$onChange = function(e) {
            var t = e.start
              , n = e.end
              , r = t.row
              , i = n.row
              , s = this.ranges;
            for (var o = 0, u = s.length; o < u; o++) {
                var a = s[o];
                if (a.end.row >= r)
                    break
            }
            if (e.action == "insert") {
                var f = i - r
                  , l = -t.column + n.column;
                for (; o < u; o++) {
                    var a = s[o];
                    if (a.start.row > r)
                        break;
                    a.start.row == r && a.start.column >= t.column && (a.start.column == t.column && this.$bias <= 0 || (a.start.column += l,
                    a.start.row += f));
                    if (a.end.row == r && a.end.column >= t.column) {
                        if (a.end.column == t.column && this.$bias < 0)
                            continue;
                        a.end.column == t.column && l > 0 && o < u - 1 && a.end.column > a.start.column && a.end.column == s[o + 1].start.column && (a.end.column -= l),
                        a.end.column += l,
                        a.end.row += f
                    }
                }
            } else {
                var f = r - i
                  , l = t.column - n.column;
                for (; o < u; o++) {
                    var a = s[o];
                    if (a.start.row > i)
                        break;
                    if (a.end.row < i && (r < a.end.row || r == a.end.row && t.column < a.end.column))
                        a.end.row = r,
                        a.end.column = t.column;
                    else if (a.end.row == i)
                        if (a.end.column <= n.column) {
                            if (f || a.end.column > t.column)
                                a.end.column = t.column,
                                a.end.row = t.row
                        } else
                            a.end.column += l,
                            a.end.row += f;
                    else
                        a.end.row > i && (a.end.row += f);
                    if (a.start.row < i && (r < a.start.row || r == a.start.row && t.column < a.start.column))
                        a.start.row = r,
                        a.start.column = t.column;
                    else if (a.start.row == i)
                        if (a.start.column <= n.column) {
                            if (f || a.start.column > t.column)
                                a.start.column = t.column,
                                a.start.row = t.row
                        } else
                            a.start.column += l,
                            a.start.row += f;
                    else
                        a.start.row > i && (a.start.row += f)
                }
            }
            if (f != 0 && o < u)
                for (; o < u; o++) {
                    var a = s[o];
                    a.start.row += f,
                    a.end.row += f
                }
        }
    }
    ).call(s.prototype),
    t.RangeList = s
}),
define("ace/edit_session/fold", ["require", "exports", "module", "ace/range_list", "ace/lib/oop"], function(e, t, n) {
    "use strict";
    function o(e, t) {
        e.row -= t.row,
        e.row == 0 && (e.column -= t.column)
    }
    function u(e, t) {
        o(e.start, t),
        o(e.end, t)
    }
    function a(e, t) {
        e.row == 0 && (e.column += t.column),
        e.row += t.row
    }
    function f(e, t) {
        a(e.start, t),
        a(e.end, t)
    }
    var r = e("../range_list").RangeList
      , i = e("../lib/oop")
      , s = t.Fold = function(e, t) {
        this.foldLine = null,
        this.placeholder = t,
        this.range = e,
        this.start = e.start,
        this.end = e.end,
        this.sameRow = e.start.row == e.end.row,
        this.subFolds = this.ranges = []
    }
    ;
    i.inherits(s, r),
    function() {
        this.toString = function() {
            return '"' + this.placeholder + '" ' + this.range.toString()
        }
        ,
        this.setFoldLine = function(e) {
            this.foldLine = e,
            this.subFolds.forEach(function(t) {
                t.setFoldLine(e)
            })
        }
        ,
        this.clone = function() {
            var e = this.range.clone()
              , t = new s(e,this.placeholder);
            return this.subFolds.forEach(function(e) {
                t.subFolds.push(e.clone())
            }),
            t.collapseChildren = this.collapseChildren,
            t
        }
        ,
        this.addSubFold = function(e) {
            if (this.range.isEqual(e))
                return;
            u(e, this.start);
            var t = e.start.row
              , n = e.start.column;
            for (var r = 0, i = -1; r < this.subFolds.length; r++) {
                i = this.subFolds[r].range.compare(t, n);
                if (i != 1)
                    break
            }
            var s = this.subFolds[r]
              , o = 0;
            if (i == 0) {
                if (s.range.containsRange(e))
                    return s.addSubFold(e);
                o = 1
            }
            var t = e.range.end.row
              , n = e.range.end.column;
            for (var a = r, i = -1; a < this.subFolds.length; a++) {
                i = this.subFolds[a].range.compare(t, n);
                if (i != 1)
                    break
            }
            i == 0 && a++;
            var f = this.subFolds.splice(r, a - r, e)
              , l = i == 0 ? f.length - 1 : f.length;
            for (var c = o; c < l; c++)
                e.addSubFold(f[c]);
            return e.setFoldLine(this.foldLine),
            e
        }
        ,
        this.restoreRange = function(e) {
            return f(e, this.start)
        }
    }
    .call(s.prototype)
}),
define("ace/edit_session/folding", ["require", "exports", "module", "ace/range", "ace/edit_session/fold_line", "ace/edit_session/fold", "ace/token_iterator"], function(e, t, n) {
    "use strict";
    function u() {
        this.getFoldAt = function(e, t, n) {
            var r = this.getFoldLine(e);
            if (!r)
                return null;
            var i = r.folds;
            for (var s = 0; s < i.length; s++) {
                var o = i[s].range;
                if (o.contains(e, t)) {
                    if (n == 1 && o.isEnd(e, t) && !o.isEmpty())
                        continue;
                    if (n == -1 && o.isStart(e, t) && !o.isEmpty())
                        continue;
                    return i[s]
                }
            }
        }
        ,
        this.getFoldsInRange = function(e) {
            var t = e.start
              , n = e.end
              , r = this.$foldData
              , i = [];
            t.column += 1,
            n.column -= 1;
            for (var s = 0; s < r.length; s++) {
                var o = r[s].range.compareRange(e);
                if (o == 2)
                    continue;
                if (o == -2)
                    break;
                var u = r[s].folds;
                for (var a = 0; a < u.length; a++) {
                    var f = u[a];
                    o = f.range.compareRange(e);
                    if (o == -2)
                        break;
                    if (o == 2)
                        continue;
                    if (o == 42)
                        break;
                    i.push(f)
                }
            }
            return t.column -= 1,
            n.column += 1,
            i
        }
        ,
        this.getFoldsInRangeList = function(e) {
            if (Array.isArray(e)) {
                var t = [];
                e.forEach(function(e) {
                    t = t.concat(this.getFoldsInRange(e))
                }, this)
            } else
                var t = this.getFoldsInRange(e);
            return t
        }
        ,
        this.getAllFolds = function() {
            var e = []
              , t = this.$foldData;
            for (var n = 0; n < t.length; n++)
                for (var r = 0; r < t[n].folds.length; r++)
                    e.push(t[n].folds[r]);
            return e
        }
        ,
        this.getFoldStringAt = function(e, t, n, r) {
            r = r || this.getFoldLine(e);
            if (!r)
                return null;
            var i = {
                end: {
                    column: 0
                }
            }, s, o;
            for (var u = 0; u < r.folds.length; u++) {
                o = r.folds[u];
                var a = o.range.compareEnd(e, t);
                if (a == -1) {
                    s = this.getLine(o.start.row).substring(i.end.column, o.start.column);
                    break
                }
                if (a === 0)
                    return null;
                i = o
            }
            return s || (s = this.getLine(o.start.row).substring(i.end.column)),
            n == -1 ? s.substring(0, t - i.end.column) : n == 1 ? s.substring(t - i.end.column) : s
        }
        ,
        this.getFoldLine = function(e, t) {
            var n = this.$foldData
              , r = 0;
            t && (r = n.indexOf(t)),
            r == -1 && (r = 0);
            for (r; r < n.length; r++) {
                var i = n[r];
                if (i.start.row <= e && i.end.row >= e)
                    return i;
                if (i.end.row > e)
                    return null
            }
            return null
        }
        ,
        this.getNextFoldLine = function(e, t) {
            var n = this.$foldData
              , r = 0;
            t && (r = n.indexOf(t)),
            r == -1 && (r = 0);
            for (r; r < n.length; r++) {
                var i = n[r];
                if (i.end.row >= e)
                    return i
            }
            return null
        }
        ,
        this.getFoldedRowCount = function(e, t) {
            var n = this.$foldData
              , r = t - e + 1;
            for (var i = 0; i < n.length; i++) {
                var s = n[i]
                  , o = s.end.row
                  , u = s.start.row;
                if (o >= t) {
                    u < t && (u >= e ? r -= t - u : r = 0);
                    break
                }
                o >= e && (u >= e ? r -= o - u : r -= o - e + 1)
            }
            return r
        }
        ,
        this.$addFoldLine = function(e) {
            return this.$foldData.push(e),
            this.$foldData.sort(function(e, t) {
                return e.start.row - t.start.row
            }),
            e
        }
        ,
        this.addFold = function(e, t) {
            var n = this.$foldData, r = !1, o;
            e instanceof s ? o = e : (o = new s(t,e),
            o.collapseChildren = t.collapseChildren),
            this.$clipRangeToDocument(o.range);
            var u = o.start.row
              , a = o.start.column
              , f = o.end.row
              , l = o.end.column
              , c = this.getFoldAt(u, a, 1)
              , h = this.getFoldAt(f, l, -1);
            if (c && h == c)
                return c.addSubFold(o);
            c && !c.range.isStart(u, a) && this.removeFold(c),
            h && !h.range.isEnd(f, l) && this.removeFold(h);
            var p = this.getFoldsInRange(o.range);
            p.length > 0 && (this.removeFolds(p),
            p.forEach(function(e) {
                o.addSubFold(e)
            }));
            for (var d = 0; d < n.length; d++) {
                var v = n[d];
                if (f == v.start.row) {
                    v.addFold(o),
                    r = !0;
                    break
                }
                if (u == v.end.row) {
                    v.addFold(o),
                    r = !0;
                    if (!o.sameRow) {
                        var m = n[d + 1];
                        if (m && m.start.row == f) {
                            v.merge(m);
                            break
                        }
                    }
                    break
                }
                if (f <= v.start.row)
                    break
            }
            return r || (v = this.$addFoldLine(new i(this.$foldData,o))),
            this.$useWrapMode ? this.$updateWrapData(v.start.row, v.start.row) : this.$updateRowLengthCache(v.start.row, v.start.row),
            this.$modified = !0,
            this._signal("changeFold", {
                data: o,
                action: "add"
            }),
            o
        }
        ,
        this.addFolds = function(e) {
            e.forEach(function(e) {
                this.addFold(e)
            }, this)
        }
        ,
        this.removeFold = function(e) {
            var t = e.foldLine
              , n = t.start.row
              , r = t.end.row
              , i = this.$foldData
              , s = t.folds;
            if (s.length == 1)
                i.splice(i.indexOf(t), 1);
            else if (t.range.isEnd(e.end.row, e.end.column))
                s.pop(),
                t.end.row = s[s.length - 1].end.row,
                t.end.column = s[s.length - 1].end.column;
            else if (t.range.isStart(e.start.row, e.start.column))
                s.shift(),
                t.start.row = s[0].start.row,
                t.start.column = s[0].start.column;
            else if (e.sameRow)
                s.splice(s.indexOf(e), 1);
            else {
                var o = t.split(e.start.row, e.start.column);
                s = o.folds,
                s.shift(),
                o.start.row = s[0].start.row,
                o.start.column = s[0].start.column
            }
            this.$updating || (this.$useWrapMode ? this.$updateWrapData(n, r) : this.$updateRowLengthCache(n, r)),
            this.$modified = !0,
            this._signal("changeFold", {
                data: e,
                action: "remove"
            })
        }
        ,
        this.removeFolds = function(e) {
            var t = [];
            for (var n = 0; n < e.length; n++)
                t.push(e[n]);
            t.forEach(function(e) {
                this.removeFold(e)
            }, this),
            this.$modified = !0
        }
        ,
        this.expandFold = function(e) {
            this.removeFold(e),
            e.subFolds.forEach(function(t) {
                e.restoreRange(t),
                this.addFold(t)
            }, this),
            e.collapseChildren > 0 && this.foldAll(e.start.row + 1, e.end.row, e.collapseChildren - 1),
            e.subFolds = []
        }
        ,
        this.expandFolds = function(e) {
            e.forEach(function(e) {
                this.expandFold(e)
            }, this)
        }
        ,
        this.unfold = function(e, t) {
            var n, i;
            e == null ? (n = new r(0,0,this.getLength(),0),
            t = !0) : typeof e == "number" ? n = new r(e,0,e,this.getLine(e).length) : "row"in e ? n = r.fromPoints(e, e) : n = e,
            i = this.getFoldsInRangeList(n);
            if (t)
                this.removeFolds(i);
            else {
                var s = i;
                while (s.length)
                    this.expandFolds(s),
                    s = this.getFoldsInRangeList(n)
            }
            if (i.length)
                return i
        }
        ,
        this.isRowFolded = function(e, t) {
            return !!this.getFoldLine(e, t)
        }
        ,
        this.getRowFoldEnd = function(e, t) {
            var n = this.getFoldLine(e, t);
            return n ? n.end.row : e
        }
        ,
        this.getRowFoldStart = function(e, t) {
            var n = this.getFoldLine(e, t);
            return n ? n.start.row : e
        }
        ,
        this.getFoldDisplayLine = function(e, t, n, r, i) {
            r == null && (r = e.start.row),
            i == null && (i = 0),
            t == null && (t = e.end.row),
            n == null && (n = this.getLine(t).length);
            var s = this.doc
              , o = "";
            return e.walk(function(e, t, n, u) {
                if (t < r)
                    return;
                if (t == r) {
                    if (n < i)
                        return;
                    u = Math.max(i, u)
                }
                e != null ? o += e : o += s.getLine(t).substring(u, n)
            }, t, n),
            o
        }
        ,
        this.getDisplayLine = function(e, t, n, r) {
            var i = this.getFoldLine(e);
            if (!i) {
                var s;
                return s = this.doc.getLine(e),
                s.substring(r || 0, t || s.length)
            }
            return this.getFoldDisplayLine(i, e, t, n, r)
        }
        ,
        this.$cloneFoldData = function() {
            var e = [];
            return e = this.$foldData.map(function(t) {
                var n = t.folds.map(function(e) {
                    return e.clone()
                });
                return new i(e,n)
            }),
            e
        }
        ,
        this.toggleFold = function(e) {
            var t = this.selection, n = t.getRange(), r, i;
            if (n.isEmpty()) {
                var s = n.start;
                r = this.getFoldAt(s.row, s.column);
                if (r) {
                    this.expandFold(r);
                    return
                }
                (i = this.findMatchingBracket(s)) ? n.comparePoint(i) == 1 ? n.end = i : (n.start = i,
                n.start.column++,
                n.end.column--) : (i = this.findMatchingBracket({
                    row: s.row,
                    column: s.column + 1
                })) ? (n.comparePoint(i) == 1 ? n.end = i : n.start = i,
                n.start.column++) : n = this.getCommentFoldRange(s.row, s.column) || n
            } else {
                var o = this.getFoldsInRange(n);
                if (e && o.length) {
                    this.expandFolds(o);
                    return
                }
                o.length == 1 && (r = o[0])
            }
            r || (r = this.getFoldAt(n.start.row, n.start.column));
            if (r && r.range.toString() == n.toString()) {
                this.expandFold(r);
                return
            }
            var u = "...";
            if (!n.isMultiLine()) {
                u = this.getTextRange(n);
                if (u.length < 4)
                    return;
                u = u.trim().substring(0, 2) + ".."
            }
            this.addFold(u, n)
        }
        ,
        this.getCommentFoldRange = function(e, t, n) {
            var i = new o(this,e,t)
              , s = i.getCurrentToken()
              , u = s.type;
            if (s && /^comment|string/.test(u)) {
                u = u.match(/comment|string/)[0],
                u == "comment" && (u += "|doc-start");
                var a = new RegExp(u)
                  , f = new r;
                if (n != 1) {
                    do
                        s = i.stepBackward();
                    while (s && a.test(s.type));
                    i.stepForward()
                }
                f.start.row = i.getCurrentTokenRow(),
                f.start.column = i.getCurrentTokenColumn() + 2,
                i = new o(this,e,t);
                if (n != -1) {
                    var l = -1;
                    do {
                        s = i.stepForward();
                        if (l == -1) {
                            var c = this.getState(i.$row);
                            a.test(c) || (l = i.$row)
                        } else if (i.$row > l)
                            break
                    } while (s && a.test(s.type));
                    s = i.stepBackward()
                } else
                    s = i.getCurrentToken();
                return f.end.row = i.getCurrentTokenRow(),
                f.end.column = i.getCurrentTokenColumn() + s.value.length - 2,
                f
            }
        }
        ,
        this.foldAll = function(e, t, n) {
            n == undefined && (n = 1e5);
            var r = this.foldWidgets;
            if (!r)
                return;
            t = t || this.getLength(),
            e = e || 0;
            for (var i = e; i < t; i++) {
                r[i] == null && (r[i] = this.getFoldWidget(i));
                if (r[i] != "start")
                    continue;
                var s = this.getFoldWidgetRange(i);
                if (s && s.isMultiLine() && s.end.row <= t && s.start.row >= e) {
                    i = s.end.row;
                    try {
                        var o = this.addFold("...", s);
                        o && (o.collapseChildren = n)
                    } catch (u) {}
                }
            }
        }
        ,
        this.$foldStyles = {
            manual: 1,
            markbegin: 1,
            markbeginend: 1
        },
        this.$foldStyle = "markbegin",
        this.setFoldStyle = function(e) {
            if (!this.$foldStyles[e])
                throw new Error("invalid fold style: " + e + "[" + Object.keys(this.$foldStyles).join(", ") + "]");
            if (this.$foldStyle == e)
                return;
            this.$foldStyle = e,
            e == "manual" && this.unfold();
            var t = this.$foldMode;
            this.$setFolding(null),
            this.$setFolding(t)
        }
        ,
        this.$setFolding = function(e) {
            if (this.$foldMode == e)
                return;
            this.$foldMode = e,
            this.off("change", this.$updateFoldWidgets),
            this.off("tokenizerUpdate", this.$tokenizerUpdateFoldWidgets),
            this._signal("changeAnnotation");
            if (!e || this.$foldStyle == "manual") {
                this.foldWidgets = null;
                return
            }
            this.foldWidgets = [],
            this.getFoldWidget = e.getFoldWidget.bind(e, this, this.$foldStyle),
            this.getFoldWidgetRange = e.getFoldWidgetRange.bind(e, this, this.$foldStyle),
            this.$updateFoldWidgets = this.updateFoldWidgets.bind(this),
            this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this),
            this.on("change", this.$updateFoldWidgets),
            this.on("tokenizerUpdate", this.$tokenizerUpdateFoldWidgets)
        }
        ,
        this.getParentFoldRangeData = function(e, t) {
            var n = this.foldWidgets;
            if (!n || t && n[e])
                return {};
            var r = e - 1, i;
            while (r >= 0) {
                var s = n[r];
                s == null && (s = n[r] = this.getFoldWidget(r));
                if (s == "start") {
                    var o = this.getFoldWidgetRange(r);
                    i || (i = o);
                    if (o && o.end.row >= e)
                        break
                }
                r--
            }
            return {
                range: r !== -1 && o,
                firstRange: i
            }
        }
        ,
        this.onFoldWidgetClick = function(e, t) {
            t = t.domEvent;
            var n = {
                children: t.shiftKey,
                all: t.ctrlKey || t.metaKey,
                siblings: t.altKey
            }
              , r = this.$toggleFoldWidget(e, n);
            if (!r) {
                var i = t.target || t.srcElement;
                i && /ace_fold-widget/.test(i.className) && (i.className += " ace_invalid")
            }
        }
        ,
        this.$toggleFoldWidget = function(e, t) {
            if (!this.getFoldWidget)
                return;
            var n = this.getFoldWidget(e)
              , r = this.getLine(e)
              , i = n === "end" ? -1 : 1
              , s = this.getFoldAt(e, i === -1 ? 0 : r.length, i);
            if (s)
                return t.children || t.all ? this.removeFold(s) : this.expandFold(s),
                s;
            var o = this.getFoldWidgetRange(e, !0);
            if (o && !o.isMultiLine()) {
                s = this.getFoldAt(o.start.row, o.start.column, 1);
                if (s && o.isEqual(s.range))
                    return this.removeFold(s),
                    s
            }
            if (t.siblings) {
                var u = this.getParentFoldRangeData(e);
                if (u.range)
                    var a = u.range.start.row + 1
                      , f = u.range.end.row;
                this.foldAll(a, f, t.all ? 1e4 : 0)
            } else
                t.children ? (f = o ? o.end.row : this.getLength(),
                this.foldAll(e + 1, f, t.all ? 1e4 : 0)) : o && (t.all && (o.collapseChildren = 1e4),
                this.addFold("...", o));
            return o
        }
        ,
        this.toggleFoldWidget = function(e) {
            var t = this.selection.getCursor().row;
            t = this.getRowFoldStart(t);
            var n = this.$toggleFoldWidget(t, {});
            if (n)
                return;
            var r = this.getParentFoldRangeData(t, !0);
            n = r.range || r.firstRange;
            if (n) {
                t = n.start.row;
                var i = this.getFoldAt(t, this.getLine(t).length, 1);
                i ? this.removeFold(i) : this.addFold("...", n)
            }
        }
        ,
        this.updateFoldWidgets = function(e) {
            var t = e.start.row
              , n = e.end.row - t;
            if (n === 0)
                this.foldWidgets[t] = null;
            else if (e.action == "remove")
                this.foldWidgets.splice(t, n + 1, null);
            else {
                var r = Array(n + 1);
                r.unshift(t, 1),
                this.foldWidgets.splice.apply(this.foldWidgets, r)
            }
        }
        ,
        this.tokenizerUpdateFoldWidgets = function(e) {
            var t = e.data;
            t.first != t.last && this.foldWidgets.length > t.first && this.foldWidgets.splice(t.first, this.foldWidgets.length)
        }
    }
    var r = e("../range").Range
      , i = e("./fold_line").FoldLine
      , s = e("./fold").Fold
      , o = e("../token_iterator").TokenIterator;
    t.Folding = u
}),
define("ace/edit_session/bracket_match", ["require", "exports", "module", "ace/token_iterator", "ace/range"], function(e, t, n) {
    "use strict";
    function s() {
        this.findMatchingBracket = function(e, t) {
            if (e.column == 0)
                return null;
            var n = t || this.getLine(e.row).charAt(e.column - 1);
            if (n == "")
                return null;
            var r = n.match(/([\(\[\{])|([\)\]\}])/);
            return r ? r[1] ? this.$findClosingBracket(r[1], e) : this.$findOpeningBracket(r[2], e) : null
        }
        ,
        this.getBracketRange = function(e) {
            var t = this.getLine(e.row), n = !0, r, s = t.charAt(e.column - 1), o = s && s.match(/([\(\[\{])|([\)\]\}])/);
            o || (s = t.charAt(e.column),
            e = {
                row: e.row,
                column: e.column + 1
            },
            o = s && s.match(/([\(\[\{])|([\)\]\}])/),
            n = !1);
            if (!o)
                return null;
            if (o[1]) {
                var u = this.$findClosingBracket(o[1], e);
                if (!u)
                    return null;
                r = i.fromPoints(e, u),
                n || (r.end.column++,
                r.start.column--),
                r.cursor = r.end
            } else {
                var u = this.$findOpeningBracket(o[2], e);
                if (!u)
                    return null;
                r = i.fromPoints(u, e),
                n || (r.start.column++,
                r.end.column--),
                r.cursor = r.start
            }
            return r
        }
        ,
        this.getMatchingBracketRanges = function(e) {
            var t = this.getLine(e.row)
              , n = t.charAt(e.column - 1)
              , r = n && n.match(/([\(\[\{])|([\)\]\}])/);
            r || (n = t.charAt(e.column),
            e = {
                row: e.row,
                column: e.column + 1
            },
            r = n && n.match(/([\(\[\{])|([\)\]\}])/));
            if (!r)
                return null;
            var s = new i(e.row,e.column - 1,e.row,e.column)
              , o = r[1] ? this.$findClosingBracket(r[1], e) : this.$findOpeningBracket(r[2], e);
            if (!o)
                return [s];
            var u = new i(o.row,o.column,o.row,o.column + 1);
            return [s, u]
        }
        ,
        this.$brackets = {
            ")": "(",
            "(": ")",
            "]": "[",
            "[": "]",
            "{": "}",
            "}": "{",
            "<": ">",
            ">": "<"
        },
        this.$findOpeningBracket = function(e, t, n) {
            var i = this.$brackets[e]
              , s = 1
              , o = new r(this,t.row,t.column)
              , u = o.getCurrentToken();
            u || (u = o.stepForward());
            if (!u)
                return;
            n || (n = new RegExp("(\\.?" + u.type.replace(".", "\\.").replace("rparen", ".paren").replace(/\b(?:end)\b/, "(?:start|begin|end)") + ")+"));
            var a = t.column - o.getCurrentTokenColumn() - 2
              , f = u.value;
            for (; ; ) {
                while (a >= 0) {
                    var l = f.charAt(a);
                    if (l == i) {
                        s -= 1;
                        if (s == 0)
                            return {
                                row: o.getCurrentTokenRow(),
                                column: a + o.getCurrentTokenColumn()
                            }
                    } else
                        l == e && (s += 1);
                    a -= 1
                }
                do
                    u = o.stepBackward();
                while (u && !n.test(u.type));
                if (u == null)
                    break;
                f = u.value,
                a = f.length - 1
            }
            return null
        }
        ,
        this.$findClosingBracket = function(e, t, n) {
            var i = this.$brackets[e]
              , s = 1
              , o = new r(this,t.row,t.column)
              , u = o.getCurrentToken();
            u || (u = o.stepForward());
            if (!u)
                return;
            n || (n = new RegExp("(\\.?" + u.type.replace(".", "\\.").replace("lparen", ".paren").replace(/\b(?:start|begin)\b/, "(?:start|begin|end)") + ")+"));
            var a = t.column - o.getCurrentTokenColumn();
            for (; ; ) {
                var f = u.value
                  , l = f.length;
                while (a < l) {
                    var c = f.charAt(a);
                    if (c == i) {
                        s -= 1;
                        if (s == 0)
                            return {
                                row: o.getCurrentTokenRow(),
                                column: a + o.getCurrentTokenColumn()
                            }
                    } else
                        c == e && (s += 1);
                    a += 1
                }
                do
                    u = o.stepForward();
                while (u && !n.test(u.type));
                if (u == null)
                    break;
                a = 0
            }
            return null
        }
    }
    var r = e("../token_iterator").TokenIterator
      , i = e("../range").Range;
    t.BracketMatch = s
}),
define("ace/edit_session", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/bidihandler", "ace/config", "ace/lib/event_emitter", "ace/selection", "ace/mode/text", "ace/range", "ace/document", "ace/background_tokenizer", "ace/search_highlight", "ace/edit_session/folding", "ace/edit_session/bracket_match"], function(e, t, n) {
    "use strict";
    var r = e("./lib/oop")
      , i = e("./lib/lang")
      , s = e("./bidihandler").BidiHandler
      , o = e("./config")
      , u = e("./lib/event_emitter").EventEmitter
      , a = e("./selection").Selection
      , f = e("./mode/text").Mode
      , l = e("./range").Range
      , c = e("./document").Document
      , h = e("./background_tokenizer").BackgroundTokenizer
      , p = e("./search_highlight").SearchHighlight
      , d = function(e, t) {
        this.$breakpoints = [],
        this.$decorations = [],
        this.$frontMarkers = {},
        this.$backMarkers = {},
        this.$markerId = 1,
        this.$undoSelect = !0,
        this.$foldData = [],
        this.id = "session" + ++d.$uid,
        this.$foldData.toString = function() {
            return this.join("\n")
        }
        ,
        this.on("changeFold", this.onChangeFold.bind(this)),
        this.$onChange = this.onChange.bind(this);
        if (typeof e != "object" || !e.getLine)
            e = new c(e);
        this.setDocument(e),
        this.selection = new a(this),
        this.$bidiHandler = new s(this),
        o.resetOptions(this),
        this.setMode(t),
        o._signal("session", this)
    };
    d.$uid = 0,
    function() {
        function m(e) {
            return e < 4352 ? !1 : e >= 4352 && e <= 4447 || e >= 4515 && e <= 4519 || e >= 4602 && e <= 4607 || e >= 9001 && e <= 9002 || e >= 11904 && e <= 11929 || e >= 11931 && e <= 12019 || e >= 12032 && e <= 12245 || e >= 12272 && e <= 12283 || e >= 12288 && e <= 12350 || e >= 12353 && e <= 12438 || e >= 12441 && e <= 12543 || e >= 12549 && e <= 12589 || e >= 12593 && e <= 12686 || e >= 12688 && e <= 12730 || e >= 12736 && e <= 12771 || e >= 12784 && e <= 12830 || e >= 12832 && e <= 12871 || e >= 12880 && e <= 13054 || e >= 13056 && e <= 19903 || e >= 19968 && e <= 42124 || e >= 42128 && e <= 42182 || e >= 43360 && e <= 43388 || e >= 44032 && e <= 55203 || e >= 55216 && e <= 55238 || e >= 55243 && e <= 55291 || e >= 63744 && e <= 64255 || e >= 65040 && e <= 65049 || e >= 65072 && e <= 65106 || e >= 65108 && e <= 65126 || e >= 65128 && e <= 65131 || e >= 65281 && e <= 65376 || e >= 65504 && e <= 65510
        }
        r.implement(this, u),
        this.setDocument = function(e) {
            this.doc && this.doc.removeListener("change", this.$onChange),
            this.doc = e,
            e.on("change", this.$onChange),
            this.bgTokenizer && this.bgTokenizer.setDocument(this.getDocument()),
            this.resetCaches()
        }
        ,
        this.getDocument = function() {
            return this.doc
        }
        ,
        this.$resetRowCache = function(e) {
            if (!e) {
                this.$docRowCache = [],
                this.$screenRowCache = [];
                return
            }
            var t = this.$docRowCache.length
              , n = this.$getRowCacheIndex(this.$docRowCache, e) + 1;
            t > n && (this.$docRowCache.splice(n, t),
            this.$screenRowCache.splice(n, t))
        }
        ,
        this.$getRowCacheIndex = function(e, t) {
            var n = 0
              , r = e.length - 1;
            while (n <= r) {
                var i = n + r >> 1
                  , s = e[i];
                if (t > s)
                    n = i + 1;
                else {
                    if (!(t < s))
                        return i;
                    r = i - 1
                }
            }
            return n - 1
        }
        ,
        this.resetCaches = function() {
            this.$modified = !0,
            this.$wrapData = [],
            this.$rowLengthCache = [],
            this.$resetRowCache(0),
            this.bgTokenizer && this.bgTokenizer.start(0)
        }
        ,
        this.onChangeFold = function(e) {
            var t = e.data;
            this.$resetRowCache(t.start.row)
        }
        ,
        this.onChange = function(e) {
            this.$modified = !0,
            this.$bidiHandler.onChange(e),
            this.$resetRowCache(e.start.row);
            var t = this.$updateInternalDataOnChange(e);
            !this.$fromUndo && this.$undoManager && (t && t.length && (this.$undoManager.add({
                action: "removeFolds",
                folds: t
            }, this.mergeUndoDeltas),
            this.mergeUndoDeltas = !0),
            this.$undoManager.add(e, this.mergeUndoDeltas),
            this.mergeUndoDeltas = !0,
            this.$informUndoManager.schedule()),
            this.bgTokenizer && this.bgTokenizer.$updateOnChange(e),
            this._signal("change", e)
        }
        ,
        this.setValue = function(e) {
            this.doc.setValue(e),
            this.selection.moveTo(0, 0),
            this.$resetRowCache(0),
            this.setUndoManager(this.$undoManager),
            this.getUndoManager().reset()
        }
        ,
        this.getValue = this.toString = function() {
            return this.doc.getValue()
        }
        ,
        this.getSelection = function() {
            return this.selection
        }
        ,
        this.getState = function(e) {
            return this.bgTokenizer.getState(e)
        }
        ,
        this.getTokens = function(e) {
            return this.bgTokenizer.getTokens(e)
        }
        ,
        this.getTokenAt = function(e, t) {
            var n = this.bgTokenizer.getTokens(e), r, i = 0;
            if (t == null) {
                var s = n.length - 1;
                i = this.getLine(e).length
            } else
                for (var s = 0; s < n.length; s++) {
                    i += n[s].value.length;
                    if (i >= t)
                        break
                }
            return r = n[s],
            r ? (r.index = s,
            r.start = i - r.value.length,
            r) : null
        }
        ,
        this.setUndoManager = function(e) {
            this.$undoManager = e,
            this.$informUndoManager && this.$informUndoManager.cancel();
            if (e) {
                var t = this;
                e.addSession(this),
                this.$syncInformUndoManager = function() {
                    t.$informUndoManager.cancel(),
                    t.mergeUndoDeltas = !1
                }
                ,
                this.$informUndoManager = i.delayedCall(this.$syncInformUndoManager)
            } else
                this.$syncInformUndoManager = function() {}
        }
        ,
        this.markUndoGroup = function() {
            this.$syncInformUndoManager && this.$syncInformUndoManager()
        }
        ,
        this.$defaultUndoManager = {
            undo: function() {},
            redo: function() {},
            hasUndo: function() {},
            hasRedo: function() {},
            reset: function() {},
            add: function() {},
            addSelection: function() {},
            startNewGroup: function() {},
            addSession: function() {}
        },
        this.getUndoManager = function() {
            return this.$undoManager || this.$defaultUndoManager
        }
        ,
        this.getTabString = function() {
            return this.getUseSoftTabs() ? i.stringRepeat(" ", this.getTabSize()) : "	"
        }
        ,
        this.setUseSoftTabs = function(e) {
            this.setOption("useSoftTabs", e)
        }
        ,
        this.getUseSoftTabs = function() {
            return this.$useSoftTabs && !this.$mode.$indentWithTabs
        }
        ,
        this.setTabSize = function(e) {
            this.setOption("tabSize", e)
        }
        ,
        this.getTabSize = function() {
            return this.$tabSize
        }
        ,
        this.isTabStop = function(e) {
            return this.$useSoftTabs && e.column % this.$tabSize === 0
        }
        ,
        this.setNavigateWithinSoftTabs = function(e) {
            this.setOption("navigateWithinSoftTabs", e)
        }
        ,
        this.getNavigateWithinSoftTabs = function() {
            return this.$navigateWithinSoftTabs
        }
        ,
        this.$overwrite = !1,
        this.setOverwrite = function(e) {
            this.setOption("overwrite", e)
        }
        ,
        this.getOverwrite = function() {
            return this.$overwrite
        }
        ,
        this.toggleOverwrite = function() {
            this.setOverwrite(!this.$overwrite)
        }
        ,
        this.addGutterDecoration = function(e, t) {
            this.$decorations[e] || (this.$decorations[e] = ""),
            this.$decorations[e] += " " + t,
            this._signal("changeBreakpoint", {})
        }
        ,
        this.removeGutterDecoration = function(e, t) {
            this.$decorations[e] = (this.$decorations[e] || "").replace(" " + t, ""),
            this._signal("changeBreakpoint", {})
        }
        ,
        this.getBreakpoints = function() {
            return this.$breakpoints
        }
        ,
        this.setBreakpoints = function(e) {
            this.$breakpoints = [];
            for (var t = 0; t < e.length; t++)
                this.$breakpoints[e[t]] = "ace_breakpoint";
            this._signal("changeBreakpoint", {})
        }
        ,
        this.clearBreakpoints = function() {
            this.$breakpoints = [],
            this._signal("changeBreakpoint", {})
        }
        ,
        this.setBreakpoint = function(e, t) {
            t === undefined && (t = "ace_breakpoint"),
            t ? this.$breakpoints[e] = t : delete this.$breakpoints[e],
            this._signal("changeBreakpoint", {})
        }
        ,
        this.clearBreakpoint = function(e) {
            delete this.$breakpoints[e],
            this._signal("changeBreakpoint", {})
        }
        ,
        this.addMarker = function(e, t, n, r) {
            var i = this.$markerId++
              , s = {
                range: e,
                type: n || "line",
                renderer: typeof n == "function" ? n : null,
                clazz: t,
                inFront: !!r,
                id: i
            };
            return r ? (this.$frontMarkers[i] = s,
            this._signal("changeFrontMarker")) : (this.$backMarkers[i] = s,
            this._signal("changeBackMarker")),
            i
        }
        ,
        this.addDynamicMarker = function(e, t) {
            if (!e.update)
                return;
            var n = this.$markerId++;
            return e.id = n,
            e.inFront = !!t,
            t ? (this.$frontMarkers[n] = e,
            this._signal("changeFrontMarker")) : (this.$backMarkers[n] = e,
            this._signal("changeBackMarker")),
            e
        }
        ,
        this.removeMarker = function(e) {
            var t = this.$frontMarkers[e] || this.$backMarkers[e];
            if (!t)
                return;
            var n = t.inFront ? this.$frontMarkers : this.$backMarkers;
            delete n[e],
            this._signal(t.inFront ? "changeFrontMarker" : "changeBackMarker")
        }
        ,
        this.getMarkers = function(e) {
            return e ? this.$frontMarkers : this.$backMarkers
        }
        ,
        this.highlight = function(e) {
            if (!this.$searchHighlight) {
                var t = new p(null,"ace_selected-word","text");
                this.$searchHighlight = this.addDynamicMarker(t)
            }
            this.$searchHighlight.setRegexp(e)
        }
        ,
        this.highlightLines = function(e, t, n, r) {
            typeof t != "number" && (n = t,
            t = e),
            n || (n = "ace_step");
            var i = new l(e,0,t,Infinity);
            return i.id = this.addMarker(i, n, "fullLine", r),
            i
        }
        ,
        this.setAnnotations = function(e) {
            this.$annotations = e,
            this._signal("changeAnnotation", {})
        }
        ,
        this.getAnnotations = function() {
            return this.$annotations || []
        }
        ,
        this.clearAnnotations = function() {
            this.setAnnotations([])
        }
        ,
        this.$detectNewLine = function(e) {
            var t = e.match(/^.*?(\r?\n)/m);
            t ? this.$autoNewLine = t[1] : this.$autoNewLine = "\n"
        }
        ,
        this.getWordRange = function(e, t) {
            var n = this.getLine(e)
              , r = !1;
            t > 0 && (r = !!n.charAt(t - 1).match(this.tokenRe)),
            r || (r = !!n.charAt(t).match(this.tokenRe));
            if (r)
                var i = this.tokenRe;
            else if (/^\s+$/.test(n.slice(t - 1, t + 1)))
                var i = /\s/;
            else
                var i = this.nonTokenRe;
            var s = t;
            if (s > 0) {
                do
                    s--;
                while (s >= 0 && n.charAt(s).match(i));
                s++
            }
            var o = t;
            while (o < n.length && n.charAt(o).match(i))
                o++;
            return new l(e,s,e,o)
        }
        ,
        this.getAWordRange = function(e, t) {
            var n = this.getWordRange(e, t)
              , r = this.getLine(n.end.row);
            while (r.charAt(n.end.column).match(/[ \t]/))
                n.end.column += 1;
            return n
        }
        ,
        this.setNewLineMode = function(e) {
            this.doc.setNewLineMode(e)
        }
        ,
        this.getNewLineMode = function() {
            return this.doc.getNewLineMode()
        }
        ,
        this.setUseWorker = function(e) {
            this.setOption("useWorker", e)
        }
        ,
        this.getUseWorker = function() {
            return this.$useWorker
        }
        ,
        this.onReloadTokenizer = function(e) {
            var t = e.data;
            this.bgTokenizer.start(t.first),
            this._signal("tokenizerUpdate", e)
        }
        ,
        this.$modes = o.$modes,
        this.$mode = null,
        this.$modeId = null,
        this.setMode = function(e, t) {
            if (e && typeof e == "object") {
                if (e.getTokenizer)
                    return this.$onChangeMode(e);
                var n = e
                  , r = n.path
            } else
                r = e || "ace/mode/text";
            this.$modes["ace/mode/text"] || (this.$modes["ace/mode/text"] = new f);
            if (this.$modes[r] && !n) {
                this.$onChangeMode(this.$modes[r]),
                t && t();
                return
            }
            this.$modeId = r,
            o.loadModule(["mode", r], function(e) {
                if (this.$modeId !== r)
                    return t && t();
                this.$modes[r] && !n ? this.$onChangeMode(this.$modes[r]) : e && e.Mode && (e = new e.Mode(n),
                n || (this.$modes[r] = e,
                e.$id = r),
                this.$onChangeMode(e)),
                t && t()
            }
            .bind(this)),
            this.$mode || this.$onChangeMode(this.$modes["ace/mode/text"], !0)
        }
        ,
        this.$onChangeMode = function(e, t) {
            t || (this.$modeId = e.$id);
            if (this.$mode === e)
                return;
            this.$mode = e,
            this.$stopWorker(),
            this.$useWorker && this.$startWorker();
            var n = e.getTokenizer();
            if (n.addEventListener !== undefined) {
                var r = this.onReloadTokenizer.bind(this);
                n.addEventListener("update", r)
            }
            if (!this.bgTokenizer) {
                this.bgTokenizer = new h(n);
                var i = this;
                this.bgTokenizer.addEventListener("update", function(e) {
                    i._signal("tokenizerUpdate", e)
                })
            } else
                this.bgTokenizer.setTokenizer(n);
            this.bgTokenizer.setDocument(this.getDocument()),
            this.tokenRe = e.tokenRe,
            this.nonTokenRe = e.nonTokenRe,
            t || (e.attachToSession && e.attachToSession(this),
            this.$options.wrapMethod.set.call(this, this.$wrapMethod),
            this.$setFolding(e.foldingRules),
            this.bgTokenizer.start(0),
            this._emit("changeMode"))
        }
        ,
        this.$stopWorker = function() {
            this.$worker && (this.$worker.terminate(),
            this.$worker = null)
        }
        ,
        this.$startWorker = function() {
            try {
                this.$worker = this.$mode.createWorker(this)
            } catch (e) {
                o.warn("Could not load worker", e),
                this.$worker = null
            }
        }
        ,
        this.getMode = function() {
            return this.$mode
        }
        ,
        this.$scrollTop = 0,
        this.setScrollTop = function(e) {
            if (this.$scrollTop === e || isNaN(e))
                return;
            this.$scrollTop = e,
            this._signal("changeScrollTop", e)
        }
        ,
        this.getScrollTop = function() {
            return this.$scrollTop
        }
        ,
        this.$scrollLeft = 0,
        this.setScrollLeft = function(e) {
            if (this.$scrollLeft === e || isNaN(e))
                return;
            this.$scrollLeft = e,
            this._signal("changeScrollLeft", e)
        }
        ,
        this.getScrollLeft = function() {
            return this.$scrollLeft
        }
        ,
        this.getScreenWidth = function() {
            return this.$computeWidth(),
            this.lineWidgets ? Math.max(this.getLineWidgetMaxWidth(), this.screenWidth) : this.screenWidth
        }
        ,
        this.getLineWidgetMaxWidth = function() {
            if (this.lineWidgetsWidth != null)
                return this.lineWidgetsWidth;
            var e = 0;
            return this.lineWidgets.forEach(function(t) {
                t && t.screenWidth > e && (e = t.screenWidth)
            }),
            this.lineWidgetWidth = e
        }
        ,
        this.$computeWidth = function(e) {
            if (this.$modified || e) {
                this.$modified = !1;
                if (this.$useWrapMode)
                    return this.screenWidth = this.$wrapLimit;
                var t = this.doc.getAllLines()
                  , n = this.$rowLengthCache
                  , r = 0
                  , i = 0
                  , s = this.$foldData[i]
                  , o = s ? s.start.row : Infinity
                  , u = t.length;
                for (var a = 0; a < u; a++) {
                    if (a > o) {
                        a = s.end.row + 1;
                        if (a >= u)
                            break;
                        s = this.$foldData[i++],
                        o = s ? s.start.row : Infinity
                    }
                    n[a] == null && (n[a] = this.$getStringScreenWidth(t[a])[0]),
                    n[a] > r && (r = n[a])
                }
                this.screenWidth = r
            }
        }
        ,
        this.getLine = function(e) {
            return this.doc.getLine(e)
        }
        ,
        this.getLines = function(e, t) {
            return this.doc.getLines(e, t)
        }
        ,
        this.getLength = function() {
            return this.doc.getLength()
        }
        ,
        this.getTextRange = function(e) {
            return this.doc.getTextRange(e || this.selection.getRange())
        }
        ,
        this.insert = function(e, t) {
            return this.doc.insert(e, t)
        }
        ,
        this.remove = function(e) {
            return this.doc.remove(e)
        }
        ,
        this.removeFullLines = function(e, t) {
            return this.doc.removeFullLines(e, t)
        }
        ,
        this.undoChanges = function(e, t) {
            if (!e.length)
                return;
            this.$fromUndo = !0;
            for (var n = e.length - 1; n != -1; n--) {
                var r = e[n];
                r.action == "insert" || r.action == "remove" ? this.doc.revertDelta(r) : r.folds && this.addFolds(r.folds)
            }
            !t && this.$undoSelect && (e.selectionBefore ? this.selection.fromJSON(e.selectionBefore) : this.selection.setRange(this.$getUndoSelection(e, !0))),
            this.$fromUndo = !1
        }
        ,
        this.redoChanges = function(e, t) {
            if (!e.length)
                return;
            this.$fromUndo = !0;
            for (var n = 0; n < e.length; n++) {
                var r = e[n];
                (r.action == "insert" || r.action == "remove") && this.doc.$safeApplyDelta(r)
            }
            !t && this.$undoSelect && (e.selectionAfter ? this.selection.fromJSON(e.selectionAfter) : this.selection.setRange(this.$getUndoSelection(e, !1))),
            this.$fromUndo = !1
        }
        ,
        this.setUndoSelect = function(e) {
            this.$undoSelect = e
        }
        ,
        this.$getUndoSelection = function(e, t) {
            function n(e) {
                return t ? e.action !== "insert" : e.action === "insert"
            }
            var r, i;
            for (var s = 0; s < e.length; s++) {
                var o = e[s];
                if (!o.start)
                    continue;
                if (!r) {
                    n(o) ? r = l.fromPoints(o.start, o.end) : r = l.fromPoints(o.start, o.start);
                    continue
                }
                n(o) ? (i = o.start,
                r.compare(i.row, i.column) == -1 && r.setStart(i),
                i = o.end,
                r.compare(i.row, i.column) == 1 && r.setEnd(i)) : (i = o.start,
                r.compare(i.row, i.column) == -1 && (r = l.fromPoints(o.start, o.start)))
            }
            return r
        }
        ,
        this.replace = function(e, t) {
            return this.doc.replace(e, t)
        }
        ,
        this.moveText = function(e, t, n) {
            var r = this.getTextRange(e)
              , i = this.getFoldsInRange(e)
              , s = l.fromPoints(t, t);
            if (!n) {
                this.remove(e);
                var o = e.start.row - e.end.row
                  , u = o ? -e.end.column : e.start.column - e.end.column;
                u && (s.start.row == e.end.row && s.start.column > e.end.column && (s.start.column += u),
                s.end.row == e.end.row && s.end.column > e.end.column && (s.end.column += u)),
                o && s.start.row >= e.end.row && (s.start.row += o,
                s.end.row += o)
            }
            s.end = this.insert(s.start, r);
            if (i.length) {
                var a = e.start
                  , f = s.start
                  , o = f.row - a.row
                  , u = f.column - a.column;
                this.addFolds(i.map(function(e) {
                    return e = e.clone(),
                    e.start.row == a.row && (e.start.column += u),
                    e.end.row == a.row && (e.end.column += u),
                    e.start.row += o,
                    e.end.row += o,
                    e
                }))
            }
            return s
        }
        ,
        this.indentRows = function(e, t, n) {
            n = n.replace(/\t/g, this.getTabString());
            for (var r = e; r <= t; r++)
                this.doc.insertInLine({
                    row: r,
                    column: 0
                }, n)
        }
        ,
        this.outdentRows = function(e) {
            var t = e.collapseRows()
              , n = new l(0,0,0,0)
              , r = this.getTabSize();
            for (var i = t.start.row; i <= t.end.row; ++i) {
                var s = this.getLine(i);
                n.start.row = i,
                n.end.row = i;
                for (var o = 0; o < r; ++o)
                    if (s.charAt(o) != " ")
                        break;
                o < r && s.charAt(o) == "	" ? (n.start.column = o,
                n.end.column = o + 1) : (n.start.column = 0,
                n.end.column = o),
                this.remove(n)
            }
        }
        ,
        this.$moveLines = function(e, t, n) {
            e = this.getRowFoldStart(e),
            t = this.getRowFoldEnd(t);
            if (n < 0) {
                var r = this.getRowFoldStart(e + n);
                if (r < 0)
                    return 0;
                var i = r - e
            } else if (n > 0) {
                var r = this.getRowFoldEnd(t + n);
                if (r > this.doc.getLength() - 1)
                    return 0;
                var i = r - t
            } else {
                e = this.$clipRowToDocument(e),
                t = this.$clipRowToDocument(t);
                var i = t - e + 1
            }
            var s = new l(e,0,t,Number.MAX_VALUE)
              , o = this.getFoldsInRange(s).map(function(e) {
                return e = e.clone(),
                e.start.row += i,
                e.end.row += i,
                e
            })
              , u = n == 0 ? this.doc.getLines(e, t) : this.doc.removeFullLines(e, t);
            return this.doc.insertFullLines(e + i, u),
            o.length && this.addFolds(o),
            i
        }
        ,
        this.moveLinesUp = function(e, t) {
            return this.$moveLines(e, t, -1)
        }
        ,
        this.moveLinesDown = function(e, t) {
            return this.$moveLines(e, t, 1)
        }
        ,
        this.duplicateLines = function(e, t) {
            return this.$moveLines(e, t, 0)
        }
        ,
        this.$clipRowToDocument = function(e) {
            return Math.max(0, Math.min(e, this.doc.getLength() - 1))
        }
        ,
        this.$clipColumnToRow = function(e, t) {
            return t < 0 ? 0 : Math.min(this.doc.getLine(e).length, t)
        }
        ,
        this.$clipPositionToDocument = function(e, t) {
            t = Math.max(0, t);
            if (e < 0)
                e = 0,
                t = 0;
            else {
                var n = this.doc.getLength();
                e >= n ? (e = n - 1,
                t = this.doc.getLine(n - 1).length) : t = Math.min(this.doc.getLine(e).length, t)
            }
            return {
                row: e,
                column: t
            }
        }
        ,
        this.$clipRangeToDocument = function(e) {
            e.start.row < 0 ? (e.start.row = 0,
            e.start.column = 0) : e.start.column = this.$clipColumnToRow(e.start.row, e.start.column);
            var t = this.doc.getLength() - 1;
            return e.end.row > t ? (e.end.row = t,
            e.end.column = this.doc.getLine(t).length) : e.end.column = this.$clipColumnToRow(e.end.row, e.end.column),
            e
        }
        ,
        this.$wrapLimit = 80,
        this.$useWrapMode = !1,
        this.$wrapLimitRange = {
            min: null,
            max: null
        },
        this.setUseWrapMode = function(e) {
            if (e != this.$useWrapMode) {
                this.$useWrapMode = e,
                this.$modified = !0,
                this.$resetRowCache(0);
                if (e) {
                    var t = this.getLength();
                    this.$wrapData = Array(t),
                    this.$updateWrapData(0, t - 1)
                }
                this._signal("changeWrapMode")
            }
        }
        ,
        this.getUseWrapMode = function() {
            return this.$useWrapMode
        }
        ,
        this.setWrapLimitRange = function(e, t) {
            if (this.$wrapLimitRange.min !== e || this.$wrapLimitRange.max !== t)
                this.$wrapLimitRange = {
                    min: e,
                    max: t
                },
                this.$modified = !0,
                this.$bidiHandler.markAsDirty(),
                this.$useWrapMode && this._signal("changeWrapMode")
        }
        ,
        this.adjustWrapLimit = function(e, t) {
            var n = this.$wrapLimitRange;
            n.max < 0 && (n = {
                min: t,
                max: t
            });
            var r = this.$constrainWrapLimit(e, n.min, n.max);
            return r != this.$wrapLimit && r > 1 ? (this.$wrapLimit = r,
            this.$modified = !0,
            this.$useWrapMode && (this.$updateWrapData(0, this.getLength() - 1),
            this.$resetRowCache(0),
            this._signal("changeWrapLimit")),
            !0) : !1
        }
        ,
        this.$constrainWrapLimit = function(e, t, n) {
            return t && (e = Math.max(t, e)),
            n && (e = Math.min(n, e)),
            e
        }
        ,
        this.getWrapLimit = function() {
            return this.$wrapLimit
        }
        ,
        this.setWrapLimit = function(e) {
            this.setWrapLimitRange(e, e)
        }
        ,
        this.getWrapLimitRange = function() {
            return {
                min: this.$wrapLimitRange.min,
                max: this.$wrapLimitRange.max
            }
        }
        ,
        this.$updateInternalDataOnChange = function(e) {
            var t = this.$useWrapMode
              , n = e.action
              , r = e.start
              , i = e.end
              , s = r.row
              , o = i.row
              , u = o - s
              , a = null;
            this.$updating = !0;
            if (u != 0)
                if (n === "remove") {
                    this[t ? "$wrapData" : "$rowLengthCache"].splice(s, u);
                    var f = this.$foldData;
                    a = this.getFoldsInRange(e),
                    this.removeFolds(a);
                    var l = this.getFoldLine(i.row)
                      , c = 0;
                    if (l) {
                        l.addRemoveChars(i.row, i.column, r.column - i.column),
                        l.shiftRow(-u);
                        var h = this.getFoldLine(s);
                        h && h !== l && (h.merge(l),
                        l = h),
                        c = f.indexOf(l) + 1
                    }
                    for (c; c < f.length; c++) {
                        var l = f[c];
                        l.start.row >= i.row && l.shiftRow(-u)
                    }
                    o = s
                } else {
                    var p = Array(u);
                    p.unshift(s, 0);
                    var d = t ? this.$wrapData : this.$rowLengthCache;
                    d.splice.apply(d, p);
                    var f = this.$foldData
                      , l = this.getFoldLine(s)
                      , c = 0;
                    if (l) {
                        var v = l.range.compareInside(r.row, r.column);
                        v == 0 ? (l = l.split(r.row, r.column),
                        l && (l.shiftRow(u),
                        l.addRemoveChars(o, 0, i.column - r.column))) : v == -1 && (l.addRemoveChars(s, 0, i.column - r.column),
                        l.shiftRow(u)),
                        c = f.indexOf(l) + 1
                    }
                    for (c; c < f.length; c++) {
                        var l = f[c];
                        l.start.row >= s && l.shiftRow(u)
                    }
                }
            else {
                u = Math.abs(e.start.column - e.end.column),
                n === "remove" && (a = this.getFoldsInRange(e),
                this.removeFolds(a),
                u = -u);
                var l = this.getFoldLine(s);
                l && l.addRemoveChars(s, r.column, u)
            }
            return t && this.$wrapData.length != this.doc.getLength() && console.error("doc.getLength() and $wrapData.length have to be the same!"),
            this.$updating = !1,
            t ? this.$updateWrapData(s, o) : this.$updateRowLengthCache(s, o),
            a
        }
        ,
        this.$updateRowLengthCache = function(e, t, n) {
            this.$rowLengthCache[e] = null,
            this.$rowLengthCache[t] = null
        }
        ,
        this.$updateWrapData = function(e, t) {
            var r = this.doc.getAllLines(), i = this.getTabSize(), o = this.$wrapData, u = this.$wrapLimit, a, f, l = e;
            t = Math.min(t, r.length - 1);
            while (l <= t)
                f = this.getFoldLine(l, f),
                f ? (a = [],
                f.walk(function(e, t, i, o) {
                    var u;
                    if (e != null) {
                        u = this.$getDisplayTokens(e, a.length),
                        u[0] = n;
                        for (var f = 1; f < u.length; f++)
                            u[f] = s
                    } else
                        u = this.$getDisplayTokens(r[t].substring(o, i), a.length);
                    a = a.concat(u)
                }
                .bind(this), f.end.row, r[f.end.row].length + 1),
                o[f.start.row] = this.$computeWrapSplits(a, u, i),
                l = f.end.row + 1) : (a = this.$getDisplayTokens(r[l]),
                o[l] = this.$computeWrapSplits(a, u, i),
                l++)
        }
        ;
        var e = 1
          , t = 2
          , n = 3
          , s = 4
          , a = 9
          , c = 10
          , d = 11
          , v = 12;
        this.$computeWrapSplits = function(e, r, i) {
            function g() {
                var t = 0;
                if (m === 0)
                    return t;
                if (p)
                    for (var n = 0; n < e.length; n++) {
                        var r = e[n];
                        if (r == c)
                            t += 1;
                        else {
                            if (r != d) {
                                if (r == v)
                                    continue;
                                break
                            }
                            t += i
                        }
                    }
                return h && p !== !1 && (t += i),
                Math.min(t, m)
            }
            function y(t) {
                var n = t - f;
                for (var r = f; r < t; r++) {
                    var i = e[r];
                    if (i === 12 || i === 2)
                        n -= 1
                }
                o.length || (b = g(),
                o.indent = b),
                l += n,
                o.push(l),
                f = t
            }
            if (e.length == 0)
                return [];
            var o = []
              , u = e.length
              , f = 0
              , l = 0
              , h = this.$wrapAsCode
              , p = this.$indentedSoftWrap
              , m = r <= Math.max(2 * i, 8) || p === !1 ? 0 : Math.floor(r / 2)
              , b = 0;
            while (u - f > r - b) {
                var w = f + r - b;
                if (e[w - 1] >= c && e[w] >= c) {
                    y(w);
                    continue
                }
                if (e[w] == n || e[w] == s) {
                    for (w; w != f - 1; w--)
                        if (e[w] == n)
                            break;
                    if (w > f) {
                        y(w);
                        continue
                    }
                    w = f + r;
                    for (w; w < e.length; w++)
                        if (e[w] != s)
                            break;
                    if (w == e.length)
                        break;
                    y(w);
                    continue
                }
                var E = Math.max(w - (r - (r >> 2)), f - 1);
                while (w > E && e[w] < n)
                    w--;
                if (h) {
                    while (w > E && e[w] < n)
                        w--;
                    while (w > E && e[w] == a)
                        w--
                } else
                    while (w > E && e[w] < c)
                        w--;
                if (w > E) {
                    y(++w);
                    continue
                }
                w = f + r,
                e[w] == t && w--,
                y(w - b)
            }
            return o
        }
        ,
        this.$getDisplayTokens = function(n, r) {
            var i = [], s;
            r = r || 0;
            for (var o = 0; o < n.length; o++) {
                var u = n.charCodeAt(o);
                if (u == 9) {
                    s = this.getScreenTabSize(i.length + r),
                    i.push(d);
                    for (var f = 1; f < s; f++)
                        i.push(v)
                } else
                    u == 32 ? i.push(c) : u > 39 && u < 48 || u > 57 && u < 64 ? i.push(a) : u >= 4352 && m(u) ? i.push(e, t) : i.push(e)
            }
            return i
        }
        ,
        this.$getStringScreenWidth = function(e, t, n) {
            if (t == 0)
                return [0, 0];
            t == null && (t = Infinity),
            n = n || 0;
            var r, i;
            for (i = 0; i < e.length; i++) {
                r = e.charCodeAt(i),
                r == 9 ? n += this.getScreenTabSize(n) : r >= 4352 && m(r) ? n += 2 : n += 1;
                if (n > t)
                    break
            }
            return [n, i]
        }
        ,
        this.lineWidgets = null,
        this.getRowLength = function(e) {
            var t = 1;
            return this.lineWidgets && (t += this.lineWidgets[e] && this.lineWidgets[e].rowCount || 0),
            !this.$useWrapMode || !this.$wrapData[e] ? t : this.$wrapData[e].length + t
        }
        ,
        this.getRowLineCount = function(e) {
            return !this.$useWrapMode || !this.$wrapData[e] ? 1 : this.$wrapData[e].length + 1
        }
        ,
        this.getRowWrapIndent = function(e) {
            if (this.$useWrapMode) {
                var t = this.screenToDocumentPosition(e, Number.MAX_VALUE)
                  , n = this.$wrapData[t.row];
                return n.length && n[0] < t.column ? n.indent : 0
            }
            return 0
        }
        ,
        this.getScreenLastRowColumn = function(e) {
            var t = this.screenToDocumentPosition(e, Number.MAX_VALUE);
            return this.documentToScreenColumn(t.row, t.column)
        }
        ,
        this.getDocumentLastRowColumn = function(e, t) {
            var n = this.documentToScreenRow(e, t);
            return this.getScreenLastRowColumn(n)
        }
        ,
        this.getDocumentLastRowColumnPosition = function(e, t) {
            var n = this.documentToScreenRow(e, t);
            return this.screenToDocumentPosition(n, Number.MAX_VALUE / 10)
        }
        ,
        this.getRowSplitData = function(e) {
            return this.$useWrapMode ? this.$wrapData[e] : undefined
        }
        ,
        this.getScreenTabSize = function(e) {
            return this.$tabSize - (e % this.$tabSize | 0)
        }
        ,
        this.screenToDocumentRow = function(e, t) {
            return this.screenToDocumentPosition(e, t).row
        }
        ,
        this.screenToDocumentColumn = function(e, t) {
            return this.screenToDocumentPosition(e, t).column
        }
        ,
        this.screenToDocumentPosition = function(e, t, n) {
            if (e < 0)
                return {
                    row: 0,
                    column: 0
                };
            var r, i = 0, s = 0, o, u = 0, a = 0, f = this.$screenRowCache, l = this.$getRowCacheIndex(f, e), c = f.length;
            if (c && l >= 0)
                var u = f[l]
                  , i = this.$docRowCache[l]
                  , h = e > f[c - 1];
            else
                var h = !c;
            var p = this.getLength() - 1
              , d = this.getNextFoldLine(i)
              , v = d ? d.start.row : Infinity;
            while (u <= e) {
                a = this.getRowLength(i);
                if (u + a > e || i >= p)
                    break;
                u += a,
                i++,
                i > v && (i = d.end.row + 1,
                d = this.getNextFoldLine(i, d),
                v = d ? d.start.row : Infinity),
                h && (this.$docRowCache.push(i),
                this.$screenRowCache.push(u))
            }
            if (d && d.start.row <= i)
                r = this.getFoldDisplayLine(d),
                i = d.start.row;
            else {
                if (u + a <= e || i > p)
                    return {
                        row: p,
                        column: this.getLine(p).length
                    };
                r = this.getLine(i),
                d = null
            }
            var m = 0
              , g = Math.floor(e - u);
            if (this.$useWrapMode) {
                var y = this.$wrapData[i];
                y && (o = y[g],
                g > 0 && y.length && (m = y.indent,
                s = y[g - 1] || y[y.length - 1],
                r = r.substring(s)))
            }
            return n !== undefined && this.$bidiHandler.isBidiRow(u + g, i, g) && (t = this.$bidiHandler.offsetToCol(n)),
            s += this.$getStringScreenWidth(r, t - m)[1],
            this.$useWrapMode && s >= o && (s = o - 1),
            d ? d.idxToPosition(s) : {
                row: i,
                column: s
            }
        }
        ,
        this.documentToScreenPosition = function(e, t) {
            if (typeof t == "undefined")
                var n = this.$clipPositionToDocument(e.row, e.column);
            else
                n = this.$clipPositionToDocument(e, t);
            e = n.row,
            t = n.column;
            var r = 0
              , i = null
              , s = null;
            s = this.getFoldAt(e, t, 1),
            s && (e = s.start.row,
            t = s.start.column);
            var o, u = 0, a = this.$docRowCache, f = this.$getRowCacheIndex(a, e), l = a.length;
            if (l && f >= 0)
                var u = a[f]
                  , r = this.$screenRowCache[f]
                  , c = e > a[l - 1];
            else
                var c = !l;
            var h = this.getNextFoldLine(u)
              , p = h ? h.start.row : Infinity;
            while (u < e) {
                if (u >= p) {
                    o = h.end.row + 1;
                    if (o > e)
                        break;
                    h = this.getNextFoldLine(o, h),
                    p = h ? h.start.row : Infinity
                } else
                    o = u + 1;
                r += this.getRowLength(u),
                u = o,
                c && (this.$docRowCache.push(u),
                this.$screenRowCache.push(r))
            }
            var d = "";
            h && u >= p ? (d = this.getFoldDisplayLine(h, e, t),
            i = h.start.row) : (d = this.getLine(e).substring(0, t),
            i = e);
            var v = 0;
            if (this.$useWrapMode) {
                var m = this.$wrapData[i];
                if (m) {
                    var g = 0;
                    while (d.length >= m[g])
                        r++,
                        g++;
                    d = d.substring(m[g - 1] || 0, d.length),
                    v = g > 0 ? m.indent : 0
                }
            }
            return this.lineWidgets && this.lineWidgets[u] && this.lineWidgets[u].rowsAbove && (r += this.lineWidgets[u].rowsAbove),
            {
                row: r,
                column: v + this.$getStringScreenWidth(d)[0]
            }
        }
        ,
        this.documentToScreenColumn = function(e, t) {
            return this.documentToScreenPosition(e, t).column
        }
        ,
        this.documentToScreenRow = function(e, t) {
            return this.documentToScreenPosition(e, t).row
        }
        ,
        this.getScreenLength = function() {
            var e = 0
              , t = null;
            if (!this.$useWrapMode) {
                e = this.getLength();
                var n = this.$foldData;
                for (var r = 0; r < n.length; r++)
                    t = n[r],
                    e -= t.end.row - t.start.row
            } else {
                var i = this.$wrapData.length
                  , s = 0
                  , r = 0
                  , t = this.$foldData[r++]
                  , o = t ? t.start.row : Infinity;
                while (s < i) {
                    var u = this.$wrapData[s];
                    e += u ? u.length + 1 : 1,
                    s++,
                    s > o && (s = t.end.row + 1,
                    t = this.$foldData[r++],
                    o = t ? t.start.row : Infinity)
                }
            }
            return this.lineWidgets && (e += this.$getWidgetScreenLength()),
            e
        }
        ,
        this.$setFontMetrics = function(e) {
            if (!this.$enableVarChar)
                return;
            this.$getStringScreenWidth = function(t, n, r) {
                if (n === 0)
                    return [0, 0];
                n || (n = Infinity),
                r = r || 0;
                var i, s;
                for (s = 0; s < t.length; s++) {
                    i = t.charAt(s),
                    i === "	" ? r += this.getScreenTabSize(r) : r += e.getCharacterWidth(i);
                    if (r > n)
                        break
                }
                return [r, s]
            }
        }
        ,
        this.destroy = function() {
            this.bgTokenizer && (this.bgTokenizer.setDocument(null),
            this.bgTokenizer = null),
            this.$stopWorker()
        }
        ,
        this.isFullWidth = m
    }
    .call(d.prototype),
    e("./edit_session/folding").Folding.call(d.prototype),
    e("./edit_session/bracket_match").BracketMatch.call(d.prototype),
    o.defineOptions(d.prototype, "session", {
        wrap: {
            set: function(e) {
                !e || e == "off" ? e = !1 : e == "free" ? e = !0 : e == "printMargin" ? e = -1 : typeof e == "string" && (e = parseInt(e, 10) || !1);
                if (this.$wrap == e)
                    return;
                this.$wrap = e;
                if (!e)
                    this.setUseWrapMode(!1);
                else {
                    var t = typeof e == "number" ? e : null;
                    this.setWrapLimitRange(t, t),
                    this.setUseWrapMode(!0)
                }
            },
            get: function() {
                return this.getUseWrapMode() ? this.$wrap == -1 ? "printMargin" : this.getWrapLimitRange().min ? this.$wrap : "free" : "off"
            },
            handlesSet: !0
        },
        wrapMethod: {
            set: function(e) {
                e = e == "auto" ? this.$mode.type != "text" : e != "text",
                e != this.$wrapAsCode && (this.$wrapAsCode = e,
                this.$useWrapMode && (this.$useWrapMode = !1,
                this.setUseWrapMode(!0)))
            },
            initialValue: "auto"
        },
        indentedSoftWrap: {
            set: function() {
                this.$useWrapMode && (this.$useWrapMode = !1,
                this.setUseWrapMode(!0))
            },
            initialValue: !0
        },
        firstLineNumber: {
            set: function() {
                this._signal("changeBreakpoint")
            },
            initialValue: 1
        },
        useWorker: {
            set: function(e) {
                this.$useWorker = e,
                this.$stopWorker(),
                e && this.$startWorker()
            },
            initialValue: !0
        },
        useSoftTabs: {
            initialValue: !0
        },
        tabSize: {
            set: function(e) {
                e = parseInt(e),
                e > 0 && this.$tabSize !== e && (this.$modified = !0,
                this.$rowLengthCache = [],
                this.$tabSize = e,
                this._signal("changeTabSize"))
            },
            initialValue: 4,
            handlesSet: !0
        },
        navigateWithinSoftTabs: {
            initialValue: !1
        },
        foldStyle: {
            set: function(e) {
                this.setFoldStyle(e)
            },
            handlesSet: !0
        },
        overwrite: {
            set: function(e) {
                this._signal("changeOverwrite")
            },
            initialValue: !1
        },
        newLineMode: {
            set: function(e) {
                this.doc.setNewLineMode(e)
            },
            get: function() {
                return this.doc.getNewLineMode()
            },
            handlesSet: !0
        },
        mode: {
            set: function(e) {
                this.setMode(e)
            },
            get: function() {
                return this.$modeId
            },
            handlesSet: !0
        }
    }),
    t.EditSession = d
}),
define("ace/search", ["require", "exports", "module", "ace/lib/lang", "ace/lib/oop", "ace/range"], function(e, t, n) {
    "use strict";
    function u(e, t) {
        function n(e) {
            return /\w/.test(e) || t.regExp ? "\\b" : ""
        }
        return n(e[0]) + e + n(e[e.length - 1])
    }
    var r = e("./lib/lang")
      , i = e("./lib/oop")
      , s = e("./range").Range
      , o = function() {
        this.$options = {}
    };
    (function() {
        this.set = function(e) {
            return i.mixin(this.$options, e),
            this
        }
        ,
        this.getOptions = function() {
            return r.copyObject(this.$options)
        }
        ,
        this.setOptions = function(e) {
            this.$options = e
        }
        ,
        this.find = function(e) {
            var t = this.$options
              , n = this.$matchIterator(e, t);
            if (!n)
                return !1;
            var r = null;
            return n.forEach(function(e, n, i, o) {
                return r = new s(e,n,i,o),
                n == o && t.start && t.start.start && t.skipCurrent != 0 && r.isEqual(t.start) ? (r = null,
                !1) : !0
            }),
            r
        }
        ,
        this.findAll = function(e) {
            var t = this.$options;
            if (!t.needle)
                return [];
            this.$assembleRegExp(t);
            var n = t.range
              , i = n ? e.getLines(n.start.row, n.end.row) : e.doc.getAllLines()
              , o = []
              , u = t.re;
            if (t.$isMultiLine) {
                var a = u.length, f = i.length - a, l;
                e: for (var c = u.offset || 0; c <= f; c++) {
                    for (var h = 0; h < a; h++)
                        if (i[c + h].search(u[h]) == -1)
                            continue e;
                    var p = i[c]
                      , d = i[c + a - 1]
                      , v = p.length - p.match(u[0])[0].length
                      , m = d.match(u[a - 1])[0].length;
                    if (l && l.end.row === c && l.end.column > v)
                        continue;
                    o.push(l = new s(c,v,c + a - 1,m)),
                    a > 2 && (c = c + a - 2)
                }
            } else
                for (var g = 0; g < i.length; g++) {
                    var y = r.getMatchOffsets(i[g], u);
                    for (var h = 0; h < y.length; h++) {
                        var b = y[h];
                        o.push(new s(g,b.offset,g,b.offset + b.length))
                    }
                }
            if (n) {
                var w = n.start.column
                  , E = n.start.column
                  , g = 0
                  , h = o.length - 1;
                while (g < h && o[g].start.column < w && o[g].start.row == n.start.row)
                    g++;
                while (g < h && o[h].end.column > E && o[h].end.row == n.end.row)
                    h--;
                o = o.slice(g, h + 1);
                for (g = 0,
                h = o.length; g < h; g++)
                    o[g].start.row += n.start.row,
                    o[g].end.row += n.start.row
            }
            return o
        }
        ,
        this.replace = function(e, t) {
            var n = this.$options
              , r = this.$assembleRegExp(n);
            if (n.$isMultiLine)
                return t;
            if (!r)
                return;
            var i = r.exec(e);
            if (!i || i[0].length != e.length)
                return null;
            t = e.replace(r, t);
            if (n.preserveCase) {
                t = t.split("");
                for (var s = Math.min(e.length, e.length); s--; ) {
                    var o = e[s];
                    o && o.toLowerCase() != o ? t[s] = t[s].toUpperCase() : t[s] = t[s].toLowerCase()
                }
                t = t.join("")
            }
            return t
        }
        ,
        this.$assembleRegExp = function(e, t) {
            if (e.needle instanceof RegExp)
                return e.re = e.needle;
            var n = e.needle;
            if (!e.needle)
                return e.re = !1;
            e.regExp || (n = r.escapeRegExp(n)),
            e.wholeWord && (n = u(n, e));
            var i = e.caseSensitive ? "gm" : "gmi";
            e.$isMultiLine = !t && /[\n\r]/.test(n);
            if (e.$isMultiLine)
                return e.re = this.$assembleMultilineRegExp(n, i);
            try {
                var s = new RegExp(n,i)
            } catch (o) {
                s = !1
            }
            return e.re = s
        }
        ,
        this.$assembleMultilineRegExp = function(e, t) {
            var n = e.replace(/\r\n|\r|\n/g, "$\n^").split("\n")
              , r = [];
            for (var i = 0; i < n.length; i++)
                try {
                    r.push(new RegExp(n[i],t))
                } catch (s) {
                    return !1
                }
            return r
        }
        ,
        this.$matchIterator = function(e, t) {
            var n = this.$assembleRegExp(t);
            if (!n)
                return !1;
            var r = t.backwards == 1
              , i = t.skipCurrent != 0
              , s = t.range
              , o = t.start;
            o || (o = s ? s[r ? "end" : "start"] : e.selection.getRange()),
            o.start && (o = o[i != r ? "end" : "start"]);
            var u = s ? s.start.row : 0
              , a = s ? s.end.row : e.getLength() - 1;
            if (r)
                var f = function(e) {
                    var n = o.row;
                    if (c(n, o.column, e))
                        return;
                    for (n--; n >= u; n--)
                        if (c(n, Number.MAX_VALUE, e))
                            return;
                    if (t.wrap == 0)
                        return;
                    for (n = a,
                    u = o.row; n >= u; n--)
                        if (c(n, Number.MAX_VALUE, e))
                            return
                };
            else
                var f = function(e) {
                    var n = o.row;
                    if (c(n, o.column, e))
                        return;
                    for (n += 1; n <= a; n++)
                        if (c(n, 0, e))
                            return;
                    if (t.wrap == 0)
                        return;
                    for (n = u,
                    a = o.row; n <= a; n++)
                        if (c(n, 0, e))
                            return
                };
            if (t.$isMultiLine)
                var l = n.length
                  , c = function(t, i, s) {
                    var o = r ? t - l + 1 : t;
                    if (o < 0)
                        return;
                    var u = e.getLine(o)
                      , a = u.search(n[0]);
                    if (!r && a < i || a === -1)
                        return;
                    for (var f = 1; f < l; f++) {
                        u = e.getLine(o + f);
                        if (u.search(n[f]) == -1)
                            return
                    }
                    var c = u.match(n[l - 1])[0].length;
                    if (r && c > i)
                        return;
                    if (s(o, a, o + l - 1, c))
                        return !0
                };
            else if (r)
                var c = function(t, r, i) {
                    var s = e.getLine(t), o = [], u, a = 0;
                    n.lastIndex = 0;
                    while (u = n.exec(s)) {
                        var f = u[0].length;
                        a = u.index;
                        if (!f) {
                            if (a >= s.length)
                                break;
                            n.lastIndex = a += 1
                        }
                        if (u.index + f > r)
                            break;
                        o.push(u.index, f)
                    }
                    for (var l = o.length - 1; l >= 0; l -= 2) {
                        var c = o[l - 1]
                          , f = o[l];
                        if (i(t, c, t, c + f))
                            return !0
                    }
                };
            else
                var c = function(t, r, i) {
                    var s = e.getLine(t), o, u;
                    n.lastIndex = r;
                    while (u = n.exec(s)) {
                        var a = u[0].length;
                        o = u.index;
                        if (i(t, o, t, o + a))
                            return !0;
                        if (!a) {
                            n.lastIndex = o += 1;
                            if (o >= s.length)
                                return !1
                        }
                    }
                };
            return {
                forEach: f
            }
        }
    }
    ).call(o.prototype),
    t.Search = o
}),
define("ace/keyboard/hash_handler", ["require", "exports", "module", "ace/lib/keys", "ace/lib/useragent"], function(e, t, n) {
    "use strict";
    function o(e, t) {
        this.platform = t || (i.isMac ? "mac" : "win"),
        this.commands = {},
        this.commandKeyBinding = {},
        this.addCommands(e),
        this.$singleCommand = !0
    }
    function u(e, t) {
        o.call(this, e, t),
        this.$singleCommand = !1
    }
    var r = e("../lib/keys")
      , i = e("../lib/useragent")
      , s = r.KEY_MODS;
    u.prototype = o.prototype,
    function() {
        function e(e) {
            return typeof e == "object" && e.bindKey && e.bindKey.position || (e.isDefault ? -100 : 0)
        }
        this.addCommand = function(e) {
            this.commands[e.name] && this.removeCommand(e),
            this.commands[e.name] = e,
            e.bindKey && this._buildKeyHash(e)
        }
        ,
        this.removeCommand = function(e, t) {
            var n = e && (typeof e == "string" ? e : e.name);
            e = this.commands[n],
            t || delete this.commands[n];
            var r = this.commandKeyBinding;
            for (var i in r) {
                var s = r[i];
                if (s == e)
                    delete r[i];
                else if (Array.isArray(s)) {
                    var o = s.indexOf(e);
                    o != -1 && (s.splice(o, 1),
                    s.length == 1 && (r[i] = s[0]))
                }
            }
        }
        ,
        this.bindKey = function(e, t, n) {
            typeof e == "object" && e && (n == undefined && (n = e.position),
            e = e[this.platform]);
            if (!e)
                return;
            if (typeof t == "function")
                return this.addCommand({
                    exec: t,
                    bindKey: e,
                    name: t.name || e
                });
            e.split("|").forEach(function(e) {
                var r = "";
                if (e.indexOf(" ") != -1) {
                    var i = e.split(/\s+/);
                    e = i.pop(),
                    i.forEach(function(e) {
                        var t = this.parseKeys(e)
                          , n = s[t.hashId] + t.key;
                        r += (r ? " " : "") + n,
                        this._addCommandToBinding(r, "chainKeys")
                    }, this),
                    r += " "
                }
                var o = this.parseKeys(e)
                  , u = s[o.hashId] + o.key;
                this._addCommandToBinding(r + u, t, n)
            }, this)
        }
        ,
        this._addCommandToBinding = function(t, n, r) {
            var i = this.commandKeyBinding, s;
            if (!n)
                delete i[t];
            else if (!i[t] || this.$singleCommand)
                i[t] = n;
            else {
                Array.isArray(i[t]) ? (s = i[t].indexOf(n)) != -1 && i[t].splice(s, 1) : i[t] = [i[t]],
                typeof r != "number" && (r = e(n));
                var o = i[t];
                for (s = 0; s < o.length; s++) {
                    var u = o[s]
                      , a = e(u);
                    if (a > r)
                        break
                }
                o.splice(s, 0, n)
            }
        }
        ,
        this.addCommands = function(e) {
            e && Object.keys(e).forEach(function(t) {
                var n = e[t];
                if (!n)
                    return;
                if (typeof n == "string")
                    return this.bindKey(n, t);
                typeof n == "function" && (n = {
                    exec: n
                });
                if (typeof n != "object")
                    return;
                n.name || (n.name = t),
                this.addCommand(n)
            }, this)
        }
        ,
        this.removeCommands = function(e) {
            Object.keys(e).forEach(function(t) {
                this.removeCommand(e[t])
            }, this)
        }
        ,
        this.bindKeys = function(e) {
            Object.keys(e).forEach(function(t) {
                this.bindKey(t, e[t])
            }, this)
        }
        ,
        this._buildKeyHash = function(e) {
            this.bindKey(e.bindKey, e)
        }
        ,
        this.parseKeys = function(e) {
            var t = e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e) {
                return e
            })
              , n = t.pop()
              , i = r[n];
            if (r.FUNCTION_KEYS[i])
                n = r.FUNCTION_KEYS[i].toLowerCase();
            else {
                if (!t.length)
                    return {
                        key: n,
                        hashId: -1
                    };
                if (t.length == 1 && t[0] == "shift")
                    return {
                        key: n.toUpperCase(),
                        hashId: -1
                    }
            }
            var s = 0;
            for (var o = t.length; o--; ) {
                var u = r.KEY_MODS[t[o]];
                if (u == null)
                    return typeof console != "undefined" && console.error("invalid modifier " + t[o] + " in " + e),
                    !1;
                s |= u
            }
            return {
                key: n,
                hashId: s
            }
        }
        ,
        this.findKeyCommand = function(t, n) {
            var r = s[t] + n;
            return this.commandKeyBinding[r]
        }
        ,
        this.handleKeyboard = function(e, t, n, r) {
            if (r < 0)
                return;
            var i = s[t] + n
              , o = this.commandKeyBinding[i];
            e.$keyChain && (e.$keyChain += " " + i,
            o = this.commandKeyBinding[e.$keyChain] || o);
            if (o)
                if (o == "chainKeys" || o[o.length - 1] == "chainKeys")
                    return e.$keyChain = e.$keyChain || i,
                    {
                        command: "null"
                    };
            if (e.$keyChain)
                if (!!t && t != 4 || n.length != 1) {
                    if (t == -1 || r > 0)
                        e.$keyChain = ""
                } else
                    e.$keyChain = e.$keyChain.slice(0, -i.length - 1);
            return {
                command: o
            }
        }
        ,
        this.getStatusText = function(e, t) {
            return t.$keyChain || ""
        }
    }
    .call(o.prototype),
    t.HashHandler = o,
    t.MultiHashHandler = u
}),
define("ace/commands/command_manager", ["require", "exports", "module", "ace/lib/oop", "ace/keyboard/hash_handler", "ace/lib/event_emitter"], function(e, t, n) {
    "use strict";
    var r = e("../lib/oop")
      , i = e("../keyboard/hash_handler").MultiHashHandler
      , s = e("../lib/event_emitter").EventEmitter
      , o = function(e, t) {
        i.call(this, t, e),
        this.byName = this.commands,
        this.setDefaultHandler("exec", function(e) {
            return e.command.exec(e.editor, e.args || {})
        })
    };
    r.inherits(o, i),
    function() {
        r.implement(this, s),
        this.exec = function(e, t, n) {
            if (Array.isArray(e)) {
                for (var r = e.length; r--; )
                    if (this.exec(e[r], t, n))
                        return !0;
                return !1
            }
            typeof e == "string" && (e = this.commands[e]);
            if (!e)
                return !1;
            if (t && t.$readOnly && !e.readOnly)
                return !1;
            if (this.$checkCommandState != 0 && e.isAvailable && !e.isAvailable(t))
                return !1;
            var i = {
                editor: t,
                command: e,
                args: n
            };
            return i.returnValue = this._emit("exec", i),
            this._signal("afterExec", i),
            i.returnValue === !1 ? !1 : !0
        }
        ,
        this.toggleRecording = function(e) {
            if (this.$inReplay)
                return;
            return e && e._emit("changeStatus"),
            this.recording ? (this.macro.pop(),
            this.removeEventListener("exec", this.$addCommandToMacro),
            this.macro.length || (this.macro = this.oldMacro),
            this.recording = !1) : (this.$addCommandToMacro || (this.$addCommandToMacro = function(e) {
                this.macro.push([e.command, e.args])
            }
            .bind(this)),
            this.oldMacro = this.macro,
            this.macro = [],
            this.on("exec", this.$addCommandToMacro),
            this.recording = !0)
        }
        ,
        this.replay = function(e) {
            if (this.$inReplay || !this.macro)
                return;
            if (this.recording)
                return this.toggleRecording(e);
            try {
                this.$inReplay = !0,
                this.macro.forEach(function(t) {
                    typeof t == "string" ? this.exec(t, e) : this.exec(t[0], e, t[1])
                }, this)
            } finally {
                this.$inReplay = !1
            }
        }
        ,
        this.trimMacro = function(e) {
            return e.map(function(e) {
                return typeof e[0] != "string" && (e[0] = e[0].name),
                e[1] || (e = e[0]),
                e
            })
        }
    }
    .call(o.prototype),
    t.CommandManager = o
}),
define("ace/commands/default_commands", ["require", "exports", "module", "ace/lib/lang", "ace/config", "ace/range"], function(e, t, n) {
    "use strict";
    function o(e, t) {
        return {
            win: e,
            mac: t
        }
    }
    var r = e("../lib/lang")
      , i = e("../config")
      , s = e("../range").Range;
    t.commands = [{
        name: "showSettingsMenu",
        bindKey: o("Ctrl-,", "Command-,"),
        exec: function(e) {
            i.loadModule("ace/ext/settings_menu", function(t) {
                t.init(e),
                e.showSettingsMenu()
            })
        },
        readOnly: !0
    }, {
        name: "goToNextError",
        bindKey: o("Alt-E", "F4"),
        exec: function(e) {
            i.loadModule("./ext/error_marker", function(t) {
                t.showErrorMarker(e, 1)
            })
        },
        scrollIntoView: "animate",
        readOnly: !0
    }, {
        name: "goToPreviousError",
        bindKey: o("Alt-Shift-E", "Shift-F4"),
        exec: function(e) {
            i.loadModule("./ext/error_marker", function(t) {
                t.showErrorMarker(e, -1)
            })
        },
        scrollIntoView: "animate",
        readOnly: !0
    }, {
        name: "selectall",
        description: "Select all",
        bindKey: o("Ctrl-A", "Command-A"),
        exec: function(e) {
            e.selectAll()
        },
        readOnly: !0
    }, {
        name: "centerselection",
        description: "Center selection",
        bindKey: o(null, "Ctrl-L"),
        exec: function(e) {
            e.centerSelection()
        },
        readOnly: !0
    }, {
        name: "gotoline",
        description: "Go to line...",
        bindKey: o("Ctrl-L", "Command-L"),
        exec: function(e, t) {
            typeof t == "number" && !isNaN(t) && e.gotoLine(t),
            e.prompt({
                $type: "gotoLine"
            })
        },
        readOnly: !0
    }, {
        name: "fold",
        bindKey: o("Alt-L|Ctrl-F1", "Command-Alt-L|Command-F1"),
        exec: function(e) {
            e.session.toggleFold(!1)
        },
        multiSelectAction: "forEach",
        scrollIntoView: "center",
        readOnly: !0
    }, {
        name: "unfold",
        bindKey: o("Alt-Shift-L|Ctrl-Shift-F1", "Command-Alt-Shift-L|Command-Shift-F1"),
        exec: function(e) {
            e.session.toggleFold(!0)
        },
        multiSelectAction: "forEach",
        scrollIntoView: "center",
        readOnly: !0
    }, {
        name: "toggleFoldWidget",
        bindKey: o("F2", "F2"),
        exec: function(e) {
            e.session.toggleFoldWidget()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "center",
        readOnly: !0
    }, {
        name: "toggleParentFoldWidget",
        bindKey: o("Alt-F2", "Alt-F2"),
        exec: function(e) {
            e.session.toggleFoldWidget(!0)
        },
        multiSelectAction: "forEach",
        scrollIntoView: "center",
        readOnly: !0
    }, {
        name: "foldall",
        description: "Fold all",
        bindKey: o(null, "Ctrl-Command-Option-0"),
        exec: function(e) {
            e.session.foldAll()
        },
        scrollIntoView: "center",
        readOnly: !0
    }, {
        name: "foldOther",
        description: "Fold other",
        bindKey: o("Alt-0", "Command-Option-0"),
        exec: function(e) {
            e.session.foldAll(),
            e.session.unfold(e.selection.getAllRanges())
        },
        scrollIntoView: "center",
        readOnly: !0
    }, {
        name: "unfoldall",
        description: "Unfold all",
        bindKey: o("Alt-Shift-0", "Command-Option-Shift-0"),
        exec: function(e) {
            e.session.unfold()
        },
        scrollIntoView: "center",
        readOnly: !0
    }, {
        name: "findnext",
        description: "Find next",
        bindKey: o("Ctrl-K", "Command-G"),
        exec: function(e) {
            e.findNext()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "center",
        readOnly: !0
    }, {
        name: "findprevious",
        description: "Find previous",
        bindKey: o("Ctrl-Shift-K", "Command-Shift-G"),
        exec: function(e) {
            e.findPrevious()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "center",
        readOnly: !0
    }, {
        name: "selectOrFindNext",
        description: "Select or find next",
        bindKey: o("Alt-K", "Ctrl-G"),
        exec: function(e) {
            e.selection.isEmpty() ? e.selection.selectWord() : e.findNext()
        },
        readOnly: !0
    }, {
        name: "selectOrFindPrevious",
        description: "Select or find previous",
        bindKey: o("Alt-Shift-K", "Ctrl-Shift-G"),
        exec: function(e) {
            e.selection.isEmpty() ? e.selection.selectWord() : e.findPrevious()
        },
        readOnly: !0
    }, {
        name: "find",
        description: "Find",
        bindKey: o("Ctrl-F", "Command-F"),
        exec: function(e) {
            i.loadModule("ace/ext/searchbox", function(t) {
                t.Search(e)
            })
        },
        readOnly: !0
    }, {
        name: "overwrite",
        description: "Overwrite",
        bindKey: "Insert",
        exec: function(e) {
            e.toggleOverwrite()
        },
        readOnly: !0
    }, {
        name: "selecttostart",
        description: "Select to start",
        bindKey: o("Ctrl-Shift-Home", "Command-Shift-Home|Command-Shift-Up"),
        exec: function(e) {
            e.getSelection().selectFileStart()
        },
        multiSelectAction: "forEach",
        readOnly: !0,
        scrollIntoView: "animate",
        aceCommandGroup: "fileJump"
    }, {
        name: "gotostart",
        description: "Go to start",
        bindKey: o("Ctrl-Home", "Command-Home|Command-Up"),
        exec: function(e) {
            e.navigateFileStart()
        },
        multiSelectAction: "forEach",
        readOnly: !0,
        scrollIntoView: "animate",
        aceCommandGroup: "fileJump"
    }, {
        name: "selectup",
        description: "Select up",
        bindKey: o("Shift-Up", "Shift-Up|Ctrl-Shift-P"),
        exec: function(e) {
            e.getSelection().selectUp()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "golineup",
        description: "Go line up",
        bindKey: o("Up", "Up|Ctrl-P"),
        exec: function(e, t) {
            e.navigateUp(t.times)
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "selecttoend",
        description: "Select to end",
        bindKey: o("Ctrl-Shift-End", "Command-Shift-End|Command-Shift-Down"),
        exec: function(e) {
            e.getSelection().selectFileEnd()
        },
        multiSelectAction: "forEach",
        readOnly: !0,
        scrollIntoView: "animate",
        aceCommandGroup: "fileJump"
    }, {
        name: "gotoend",
        description: "Go to end",
        bindKey: o("Ctrl-End", "Command-End|Command-Down"),
        exec: function(e) {
            e.navigateFileEnd()
        },
        multiSelectAction: "forEach",
        readOnly: !0,
        scrollIntoView: "animate",
        aceCommandGroup: "fileJump"
    }, {
        name: "selectdown",
        description: "Select down",
        bindKey: o("Shift-Down", "Shift-Down|Ctrl-Shift-N"),
        exec: function(e) {
            e.getSelection().selectDown()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "golinedown",
        description: "Go line down",
        bindKey: o("Down", "Down|Ctrl-N"),
        exec: function(e, t) {
            e.navigateDown(t.times)
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "selectwordleft",
        description: "Select word left",
        bindKey: o("Ctrl-Shift-Left", "Option-Shift-Left"),
        exec: function(e) {
            e.getSelection().selectWordLeft()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "gotowordleft",
        description: "Go to word left",
        bindKey: o("Ctrl-Left", "Option-Left"),
        exec: function(e) {
            e.navigateWordLeft()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "selecttolinestart",
        description: "Select to line start",
        bindKey: o("Alt-Shift-Left", "Command-Shift-Left|Ctrl-Shift-A"),
        exec: function(e) {
            e.getSelection().selectLineStart()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "gotolinestart",
        description: "Go to line start",
        bindKey: o("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
        exec: function(e) {
            e.navigateLineStart()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "selectleft",
        description: "Select left",
        bindKey: o("Shift-Left", "Shift-Left|Ctrl-Shift-B"),
        exec: function(e) {
            e.getSelection().selectLeft()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "gotoleft",
        description: "Go to left",
        bindKey: o("Left", "Left|Ctrl-B"),
        exec: function(e, t) {
            e.navigateLeft(t.times)
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "selectwordright",
        description: "Select word right",
        bindKey: o("Ctrl-Shift-Right", "Option-Shift-Right"),
        exec: function(e) {
            e.getSelection().selectWordRight()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "gotowordright",
        description: "Go to word right",
        bindKey: o("Ctrl-Right", "Option-Right"),
        exec: function(e) {
            e.navigateWordRight()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "selecttolineend",
        description: "Select to line end",
        bindKey: o("Alt-Shift-Right", "Command-Shift-Right|Shift-End|Ctrl-Shift-E"),
        exec: function(e) {
            e.getSelection().selectLineEnd()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "gotolineend",
        description: "Go to line end",
        bindKey: o("Alt-Right|End", "Command-Right|End|Ctrl-E"),
        exec: function(e) {
            e.navigateLineEnd()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "selectright",
        description: "Select right",
        bindKey: o("Shift-Right", "Shift-Right"),
        exec: function(e) {
            e.getSelection().selectRight()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "gotoright",
        description: "Go to right",
        bindKey: o("Right", "Right|Ctrl-F"),
        exec: function(e, t) {
            e.navigateRight(t.times)
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "selectpagedown",
        description: "Select page down",
        bindKey: "Shift-PageDown",
        exec: function(e) {
            e.selectPageDown()
        },
        readOnly: !0
    }, {
        name: "pagedown",
        description: "Page down",
        bindKey: o(null, "Option-PageDown"),
        exec: function(e) {
            e.scrollPageDown()
        },
        readOnly: !0
    }, {
        name: "gotopagedown",
        description: "Go to page down",
        bindKey: o("PageDown", "PageDown|Ctrl-V"),
        exec: function(e) {
            e.gotoPageDown()
        },
        readOnly: !0
    }, {
        name: "selectpageup",
        description: "Select page up",
        bindKey: "Shift-PageUp",
        exec: function(e) {
            e.selectPageUp()
        },
        readOnly: !0
    }, {
        name: "pageup",
        description: "Page up",
        bindKey: o(null, "Option-PageUp"),
        exec: function(e) {
            e.scrollPageUp()
        },
        readOnly: !0
    }, {
        name: "gotopageup",
        description: "Go to page up",
        bindKey: "PageUp",
        exec: function(e) {
            e.gotoPageUp()
        },
        readOnly: !0
    }, {
        name: "scrollup",
        description: "Scroll up",
        bindKey: o("Ctrl-Up", null),
        exec: function(e) {
            e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight)
        },
        readOnly: !0
    }, {
        name: "scrolldown",
        description: "Scroll down",
        bindKey: o("Ctrl-Down", null),
        exec: function(e) {
            e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight)
        },
        readOnly: !0
    }, {
        name: "selectlinestart",
        description: "Select line start",
        bindKey: "Shift-Home",
        exec: function(e) {
            e.getSelection().selectLineStart()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "selectlineend",
        description: "Select line end",
        bindKey: "Shift-End",
        exec: function(e) {
            e.getSelection().selectLineEnd()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "togglerecording",
        description: "Toggle recording",
        bindKey: o("Ctrl-Alt-E", "Command-Option-E"),
        exec: function(e) {
            e.commands.toggleRecording(e)
        },
        readOnly: !0
    }, {
        name: "replaymacro",
        description: "Replay macro",
        bindKey: o("Ctrl-Shift-E", "Command-Shift-E"),
        exec: function(e) {
            e.commands.replay(e)
        },
        readOnly: !0
    }, {
        name: "jumptomatching",
        description: "Jump to matching",
        bindKey: o("Ctrl-\\|Ctrl-P", "Command-\\"),
        exec: function(e) {
            e.jumpToMatching()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "animate",
        readOnly: !0
    }, {
        name: "selecttomatching",
        description: "Select to matching",
        bindKey: o("Ctrl-Shift-\\|Ctrl-Shift-P", "Command-Shift-\\"),
        exec: function(e) {
            e.jumpToMatching(!0)
        },
        multiSelectAction: "forEach",
        scrollIntoView: "animate",
        readOnly: !0
    }, {
        name: "expandToMatching",
        description: "Expand to matching",
        bindKey: o("Ctrl-Shift-M", "Ctrl-Shift-M"),
        exec: function(e) {
            e.jumpToMatching(!0, !0)
        },
        multiSelectAction: "forEach",
        scrollIntoView: "animate",
        readOnly: !0
    }, {
        name: "passKeysToBrowser",
        description: "Pass keys to browser",
        bindKey: o(null, null),
        exec: function() {},
        passEvent: !0,
        readOnly: !0
    }, {
        name: "copy",
        description: "Copy",
        exec: function(e) {},
        readOnly: !0
    }, {
        name: "cut",
        description: "Cut",
        exec: function(e) {
            var t = e.$copyWithEmptySelection && e.selection.isEmpty()
              , n = t ? e.selection.getLineRange() : e.selection.getRange();
            e._emit("cut", n),
            n.isEmpty() || e.session.remove(n),
            e.clearSelection()
        },
        scrollIntoView: "cursor",
        multiSelectAction: "forEach"
    }, {
        name: "paste",
        description: "Paste",
        exec: function(e, t) {
            e.$handlePaste(t)
        },
        scrollIntoView: "cursor"
    }, {
        name: "removeline",
        description: "Remove line",
        bindKey: o("Ctrl-D", "Command-D"),
        exec: function(e) {
            e.removeLines()
        },
        scrollIntoView: "cursor",
        multiSelectAction: "forEachLine"
    }, {
        name: "duplicateSelection",
        description: "Duplicate selection",
        bindKey: o("Ctrl-Shift-D", "Command-Shift-D"),
        exec: function(e) {
            e.duplicateSelection()
        },
        scrollIntoView: "cursor",
        multiSelectAction: "forEach"
    }, {
        name: "sortlines",
        description: "Sort lines",
        bindKey: o("Ctrl-Alt-S", "Command-Alt-S"),
        exec: function(e) {
            e.sortLines()
        },
        scrollIntoView: "selection",
        multiSelectAction: "forEachLine"
    }, {
        name: "togglecomment",
        description: "Toggle comment",
        bindKey: o("Ctrl-/", "Command-/"),
        exec: function(e) {
            e.toggleCommentLines()
        },
        multiSelectAction: "forEachLine",
        scrollIntoView: "selectionPart"
    }, {
        name: "toggleBlockComment",
        description: "Toggle block comment",
        bindKey: o("Ctrl-Shift-/", "Command-Shift-/"),
        exec: function(e) {
            e.toggleBlockComment()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "selectionPart"
    }, {
        name: "modifyNumberUp",
        description: "Modify number up",
        bindKey: o("Ctrl-Shift-Up", "Alt-Shift-Up"),
        exec: function(e) {
            e.modifyNumber(1)
        },
        scrollIntoView: "cursor",
        multiSelectAction: "forEach"
    }, {
        name: "modifyNumberDown",
        description: "Modify number down",
        bindKey: o("Ctrl-Shift-Down", "Alt-Shift-Down"),
        exec: function(e) {
            e.modifyNumber(-1)
        },
        scrollIntoView: "cursor",
        multiSelectAction: "forEach"
    }, {
        name: "replace",
        description: "Replace",
        bindKey: o("Ctrl-H", "Command-Option-F"),
        exec: function(e) {
            i.loadModule("ace/ext/searchbox", function(t) {
                t.Search(e, !0)
            })
        }
    }, {
        name: "undo",
        description: "Undo",
        bindKey: o("Ctrl-Z", "Command-Z"),
        exec: function(e) {
            e.undo()
        }
    }, {
        name: "redo",
        description: "Redo",
        bindKey: o("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"),
        exec: function(e) {
            e.redo()
        }
    }, {
        name: "copylinesup",
        description: "Copy lines up",
        bindKey: o("Alt-Shift-Up", "Command-Option-Up"),
        exec: function(e) {
            e.copyLinesUp()
        },
        scrollIntoView: "cursor"
    }, {
        name: "movelinesup",
        description: "Move lines up",
        bindKey: o("Alt-Up", "Option-Up"),
        exec: function(e) {
            e.moveLinesUp()
        },
        scrollIntoView: "cursor"
    }, {
        name: "copylinesdown",
        description: "Copy lines down",
        bindKey: o("Alt-Shift-Down", "Command-Option-Down"),
        exec: function(e) {
            e.copyLinesDown()
        },
        scrollIntoView: "cursor"
    }, {
        name: "movelinesdown",
        description: "Move lines down",
        bindKey: o("Alt-Down", "Option-Down"),
        exec: function(e) {
            e.moveLinesDown()
        },
        scrollIntoView: "cursor"
    }, {
        name: "del",
        description: "Delete",
        bindKey: o("Delete", "Delete|Ctrl-D|Shift-Delete"),
        exec: function(e) {
            e.remove("right")
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "backspace",
        description: "Backspace",
        bindKey: o("Shift-Backspace|Backspace", "Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),
        exec: function(e) {
            e.remove("left")
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "cut_or_delete",
        description: "Cut or delete",
        bindKey: o("Shift-Delete", null),
        exec: function(e) {
            if (!e.selection.isEmpty())
                return !1;
            e.remove("left")
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "removetolinestart",
        description: "Remove to line start",
        bindKey: o("Alt-Backspace", "Command-Backspace"),
        exec: function(e) {
            e.removeToLineStart()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "removetolineend",
        description: "Remove to line end",
        bindKey: o("Alt-Delete", "Ctrl-K|Command-Delete"),
        exec: function(e) {
            e.removeToLineEnd()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "removetolinestarthard",
        description: "Remove to line start hard",
        bindKey: o("Ctrl-Shift-Backspace", null),
        exec: function(e) {
            var t = e.selection.getRange();
            t.start.column = 0,
            e.session.remove(t)
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "removetolineendhard",
        description: "Remove to line end hard",
        bindKey: o("Ctrl-Shift-Delete", null),
        exec: function(e) {
            var t = e.selection.getRange();
            t.end.column = Number.MAX_VALUE,
            e.session.remove(t)
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "removewordleft",
        description: "Remove word left",
        bindKey: o("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"),
        exec: function(e) {
            e.removeWordLeft()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "removewordright",
        description: "Remove word right",
        bindKey: o("Ctrl-Delete", "Alt-Delete"),
        exec: function(e) {
            e.removeWordRight()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "outdent",
        description: "Outdent",
        bindKey: o("Shift-Tab", "Shift-Tab"),
        exec: function(e) {
            e.blockOutdent()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "selectionPart"
    }, {
        name: "indent",
        description: "Indent",
        bindKey: o("Tab", "Tab"),
        exec: function(e) {
            e.indent()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "selectionPart"
    }, {
        name: "blockoutdent",
        description: "Block outdent",
        bindKey: o("Ctrl-[", "Ctrl-["),
        exec: function(e) {
            e.blockOutdent()
        },
        multiSelectAction: "forEachLine",
        scrollIntoView: "selectionPart"
    }, {
        name: "blockindent",
        description: "Block indent",
        bindKey: o("Ctrl-]", "Ctrl-]"),
        exec: function(e) {
            e.blockIndent()
        },
        multiSelectAction: "forEachLine",
        scrollIntoView: "selectionPart"
    }, {
        name: "insertstring",
        description: "Insert string",
        exec: function(e, t) {
            e.insert(t)
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "inserttext",
        description: "Insert text",
        exec: function(e, t) {
            e.insert(r.stringRepeat(t.text || "", t.times || 1))
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "splitline",
        description: "Split line",
        bindKey: o(null, "Ctrl-O"),
        exec: function(e) {
            e.splitLine()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "transposeletters",
        description: "Transpose letters",
        bindKey: o("Alt-Shift-X", "Ctrl-T"),
        exec: function(e) {
            e.transposeLetters()
        },
        multiSelectAction: function(e) {
            e.transposeSelections(1)
        },
        scrollIntoView: "cursor"
    }, {
        name: "touppercase",
        description: "To uppercase",
        bindKey: o("Ctrl-U", "Ctrl-U"),
        exec: function(e) {
            e.toUpperCase()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "tolowercase",
        description: "To lowercase",
        bindKey: o("Ctrl-Shift-U", "Ctrl-Shift-U"),
        exec: function(e) {
            e.toLowerCase()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "autoindent",
        description: "Auto Indent",
        bindKey: o(null, null),
        exec: function(e) {
            e.autoIndent()
        },
        multiSelectAction: "forEachLine",
        scrollIntoView: "animate"
    }, {
        name: "expandtoline",
        description: "Expand to line",
        bindKey: o("Ctrl-Shift-L", "Command-Shift-L"),
        exec: function(e) {
            var t = e.selection.getRange();
            t.start.column = t.end.column = 0,
            t.end.row++,
            e.selection.setRange(t, !1)
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "joinlines",
        description: "Join lines",
        bindKey: o(null, null),
        exec: function(e) {
            var t = e.selection.isBackwards()
              , n = t ? e.selection.getSelectionLead() : e.selection.getSelectionAnchor()
              , i = t ? e.selection.getSelectionAnchor() : e.selection.getSelectionLead()
              , o = e.session.doc.getLine(n.row).length
              , u = e.session.doc.getTextRange(e.selection.getRange())
              , a = u.replace(/\n\s*/, " ").length
              , f = e.session.doc.getLine(n.row);
            for (var l = n.row + 1; l <= i.row + 1; l++) {
                var c = r.stringTrimLeft(r.stringTrimRight(e.session.doc.getLine(l)));
                c.length !== 0 && (c = " " + c),
                f += c
            }
            i.row + 1 < e.session.doc.getLength() - 1 && (f += e.session.doc.getNewLineCharacter()),
            e.clearSelection(),
            e.session.doc.replace(new s(n.row,0,i.row + 2,0), f),
            a > 0 ? (e.selection.moveCursorTo(n.row, n.column),
            e.selection.selectTo(n.row, n.column + a)) : (o = e.session.doc.getLine(n.row).length > o ? o + 1 : o,
            e.selection.moveCursorTo(n.row, o))
        },
        multiSelectAction: "forEach",
        readOnly: !0
    }, {
        name: "invertSelection",
        description: "Invert selection",
        bindKey: o(null, null),
        exec: function(e) {
            var t = e.session.doc.getLength() - 1
              , n = e.session.doc.getLine(t).length
              , r = e.selection.rangeList.ranges
              , i = [];
            r.length < 1 && (r = [e.selection.getRange()]);
            for (var o = 0; o < r.length; o++)
                o == r.length - 1 && (r[o].end.row !== t || r[o].end.column !== n) && i.push(new s(r[o].end.row,r[o].end.column,t,n)),
                o === 0 ? (r[o].start.row !== 0 || r[o].start.column !== 0) && i.push(new s(0,0,r[o].start.row,r[o].start.column)) : i.push(new s(r[o - 1].end.row,r[o - 1].end.column,r[o].start.row,r[o].start.column));
            e.exitMultiSelectMode(),
            e.clearSelection();
            for (var o = 0; o < i.length; o++)
                e.selection.addRange(i[o], !1)
        },
        readOnly: !0,
        scrollIntoView: "none"
    }, {
        name: "addLineAfter",
        exec: function(e) {
            e.selection.clearSelection(),
            e.navigateLineEnd(),
            e.insert("\n")
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "addLineBefore",
        exec: function(e) {
            e.selection.clearSelection();
            var t = e.getCursorPosition();
            e.selection.moveTo(t.row - 1, Number.MAX_VALUE),
            e.insert("\n"),
            t.row === 0 && e.navigateUp()
        },
        multiSelectAction: "forEach",
        scrollIntoView: "cursor"
    }, {
        name: "openCommandPallete",
        description: "Open command pallete",
        bindKey: o("F1", "F1"),
        exec: function(e) {
            e.prompt({
                $type: "commands"
            })
        },
        readOnly: !0
    }, {
        name: "modeSelect",
        description: "Change language mode...",
        bindKey: o(null, null),
        exec: function(e) {
            e.prompt({
                $type: "modes"
            })
        },
        readOnly: !0
    }]
}),
define("ace/editor", ["require", "exports", "module", "ace/lib/fixoldbrowsers", "ace/lib/oop", "ace/lib/dom", "ace/lib/lang", "ace/lib/useragent", "ace/keyboard/textinput", "ace/mouse/mouse_handler", "ace/mouse/fold_handler", "ace/keyboard/keybinding", "ace/edit_session", "ace/search", "ace/range", "ace/lib/event_emitter", "ace/commands/command_manager", "ace/commands/default_commands", "ace/config", "ace/token_iterator", "ace/clipboard"], function(e, t, n) {
    "use strict";
    e("./lib/fixoldbrowsers");
    var r = e("./lib/oop")
      , i = e("./lib/dom")
      , s = e("./lib/lang")
      , o = e("./lib/useragent")
      , u = e("./keyboard/textinput").TextInput
      , a = e("./mouse/mouse_handler").MouseHandler
      , f = e("./mouse/fold_handler").FoldHandler
      , l = e("./keyboard/keybinding").KeyBinding
      , c = e("./edit_session").EditSession
      , h = e("./search").Search
      , p = e("./range").Range
      , d = e("./lib/event_emitter").EventEmitter
      , v = e("./commands/command_manager").CommandManager
      , m = e("./commands/default_commands").commands
      , g = e("./config")
      , y = e("./token_iterator").TokenIterator
      , b = e("./clipboard")
      , w = function(e, t, n) {
        var r = e.getContainerElement();
        this.container = r,
        this.renderer = e,
        this.id = "editor" + ++w.$uid,
        this.commands = new v(o.isMac ? "mac" : "win",m),
        typeof document == "object" && (this.textInput = new u(e.getTextAreaContainer(),this),
        this.renderer.textarea = this.textInput.getElement(),
        this.$mouseHandler = new a(this),
        new f(this)),
        this.keyBinding = new l(this),
        this.$search = (new h).set({
            wrap: !0
        }),
        this.$historyTracker = this.$historyTracker.bind(this),
        this.commands.on("exec", this.$historyTracker),
        this.$initOperationListeners(),
        this._$emitInputEvent = s.delayedCall(function() {
            this._signal("input", {}),
            this.session && this.session.bgTokenizer && this.session.bgTokenizer.scheduleStart()
        }
        .bind(this)),
        this.on("change", function(e, t) {
            t._$emitInputEvent.schedule(31)
        }),
        this.setSession(t || n && n.session || new c("")),
        g.resetOptions(this),
        n && this.setOptions(n),
        g._signal("editor", this)
    };
    w.$uid = 0,
    function() {
        r.implement(this, d),
        this.$initOperationListeners = function() {
            this.commands.on("exec", this.startOperation.bind(this), !0),
            this.commands.on("afterExec", this.endOperation.bind(this), !0),
            this.$opResetTimer = s.delayedCall(this.endOperation.bind(this, !0)),
            this.on("change", function() {
                this.curOp || (this.startOperation(),
                this.curOp.selectionBefore = this.$lastSel),
                this.curOp.docChanged = !0
            }
            .bind(this), !0),
            this.on("changeSelection", function() {
                this.curOp || (this.startOperation(),
                this.curOp.selectionBefore = this.$lastSel),
                this.curOp.selectionChanged = !0
            }
            .bind(this), !0)
        }
        ,
        this.curOp = null,
        this.prevOp = {},
        this.startOperation = function(e) {
            if (this.curOp) {
                if (!e || this.curOp.command)
                    return;
                this.prevOp = this.curOp
            }
            e || (this.previousCommand = null,
            e = {}),
            this.$opResetTimer.schedule(),
            this.curOp = this.session.curOp = {
                command: e.command || {},
                args: e.args,
                scrollTop: this.renderer.scrollTop
            },
            this.curOp.selectionBefore = this.selection.toJSON()
        }
        ,
        this.endOperation = function(e) {
            if (this.curOp) {
                if (e && e.returnValue === !1 || !this.session)
                    return this.curOp = null;
                if (e == 1 && this.curOp.command && this.curOp.command.name == "mouse")
                    return;
                this._signal("beforeEndOperation");
                if (!this.curOp)
                    return;
                var t = this.curOp.command
                  , n = t && t.scrollIntoView;
                if (n) {
                    switch (n) {
                    case "center-animate":
                        n = "animate";
                    case "center":
                        this.renderer.scrollCursorIntoView(null, .5);
                        break;
                    case "animate":
                    case "cursor":
                        this.renderer.scrollCursorIntoView();
                        break;
                    case "selectionPart":
                        var r = this.selection.getRange()
                          , i = this.renderer.layerConfig;
                        (r.start.row >= i.lastRow || r.end.row <= i.firstRow) && this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead);
                        break;
                    default:
                    }
                    n == "animate" && this.renderer.animateScrolling(this.curOp.scrollTop)
                }
                var s = this.selection.toJSON();
                this.curOp.selectionAfter = s,
                this.$lastSel = this.selection.toJSON(),
                this.session.getUndoManager().addSelection(s),
                this.prevOp = this.curOp,
                this.curOp = null
            }
        }
        ,
        this.$mergeableCommands = ["backspace", "del", "insertstring"],
        this.$historyTracker = function(e) {
            if (!this.$mergeUndoDeltas)
                return;
            var t = this.prevOp
              , n = this.$mergeableCommands
              , r = t.command && e.command.name == t.command.name;
            if (e.command.name == "insertstring") {
                var i = e.args;
                this.mergeNextCommand === undefined && (this.mergeNextCommand = !0),
                r = r && this.mergeNextCommand && (!/\s/.test(i) || /\s/.test(t.args)),
                this.mergeNextCommand = !0
            } else
                r = r && n.indexOf(e.command.name) !== -1;
            this.$mergeUndoDeltas != "always" && Date.now() - this.sequenceStartTime > 2e3 && (r = !1),
            r ? this.session.mergeUndoDeltas = !0 : n.indexOf(e.command.name) !== -1 && (this.sequenceStartTime = Date.now())
        }
        ,
        this.setKeyboardHandler = function(e, t) {
            if (e && typeof e == "string" && e != "ace") {
                this.$keybindingId = e;
                var n = this;
                g.loadModule(["keybinding", e], function(r) {
                    n.$keybindingId == e && n.keyBinding.setKeyboardHandler(r && r.handler),
                    t && t()
                })
            } else
                this.$keybindingId = null,
                this.keyBinding.setKeyboardHandler(e),
                t && t()
        }
        ,
        this.getKeyboardHandler = function() {
            return this.keyBinding.getKeyboardHandler()
        }
        ,
        this.setSession = function(e) {
            if (this.session == e)
                return;
            this.curOp && this.endOperation(),
            this.curOp = {};
            var t = this.session;
            if (t) {
                this.session.off("change", this.$onDocumentChange),
                this.session.off("changeMode", this.$onChangeMode),
                this.session.off("tokenizerUpdate", this.$onTokenizerUpdate),
                this.session.off("changeTabSize", this.$onChangeTabSize),
                this.session.off("changeWrapLimit", this.$onChangeWrapLimit),
                this.session.off("changeWrapMode", this.$onChangeWrapMode),
                this.session.off("changeFold", this.$onChangeFold),
                this.session.off("changeFrontMarker", this.$onChangeFrontMarker),
                this.session.off("changeBackMarker", this.$onChangeBackMarker),
                this.session.off("changeBreakpoint", this.$onChangeBreakpoint),
                this.session.off("changeAnnotation", this.$onChangeAnnotation),
                this.session.off("changeOverwrite", this.$onCursorChange),
                this.session.off("changeScrollTop", this.$onScrollTopChange),
                this.session.off("changeScrollLeft", this.$onScrollLeftChange);
                var n = this.session.getSelection();
                n.off("changeCursor", this.$onCursorChange),
                n.off("changeSelection", this.$onSelectionChange)
            }
            this.session = e,
            e ? (this.$onDocumentChange = this.onDocumentChange.bind(this),
            e.on("change", this.$onDocumentChange),
            this.renderer.setSession(e),
            this.$onChangeMode = this.onChangeMode.bind(this),
            e.on("changeMode", this.$onChangeMode),
            this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this),
            e.on("tokenizerUpdate", this.$onTokenizerUpdate),
            this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer),
            e.on("changeTabSize", this.$onChangeTabSize),
            this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this),
            e.on("changeWrapLimit", this.$onChangeWrapLimit),
            this.$onChangeWrapMode = this.onChangeWrapMode.bind(this),
            e.on("changeWrapMode", this.$onChangeWrapMode),
            this.$onChangeFold = this.onChangeFold.bind(this),
            e.on("changeFold", this.$onChangeFold),
            this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this),
            this.session.on("changeFrontMarker", this.$onChangeFrontMarker),
            this.$onChangeBackMarker = this.onChangeBackMarker.bind(this),
            this.session.on("changeBackMarker", this.$onChangeBackMarker),
            this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this),
            this.session.on("changeBreakpoint", this.$onChangeBreakpoint),
            this.$onChangeAnnotation = this.onChangeAnnotation.bind(this),
            this.session.on("changeAnnotation", this.$onChangeAnnotation),
            this.$onCursorChange = this.onCursorChange.bind(this),
            this.session.on("changeOverwrite", this.$onCursorChange),
            this.$onScrollTopChange = this.onScrollTopChange.bind(this),
            this.session.on("changeScrollTop", this.$onScrollTopChange),
            this.$onScrollLeftChange = this.onScrollLeftChange.bind(this),
            this.session.on("changeScrollLeft", this.$onScrollLeftChange),
            this.selection = e.getSelection(),
            this.selection.on("changeCursor", this.$onCursorChange),
            this.$onSelectionChange = this.onSelectionChange.bind(this),
            this.selection.on("changeSelection", this.$onSelectionChange),
            this.onChangeMode(),
            this.onCursorChange(),
            this.onScrollTopChange(),
            this.onScrollLeftChange(),
            this.onSelectionChange(),
            this.onChangeFrontMarker(),
            this.onChangeBackMarker(),
            this.onChangeBreakpoint(),
            this.onChangeAnnotation(),
            this.session.getUseWrapMode() && this.renderer.adjustWrapLimit(),
            this.renderer.updateFull()) : (this.selection = null,
            this.renderer.setSession(e)),
            this._signal("changeSession", {
                session: e,
                oldSession: t
            }),
            this.curOp = null,
            t && t._signal("changeEditor", {
                oldEditor: this
            }),
            e && e._signal("changeEditor", {
                editor: this
            }),
            e && e.bgTokenizer && e.bgTokenizer.scheduleStart()
        }
        ,
        this.getSession = function() {
            return this.session
        }
        ,
        this.setValue = function(e, t) {
            return this.session.doc.setValue(e),
            t ? t == 1 ? this.navigateFileEnd() : t == -1 && this.navigateFileStart() : this.selectAll(),
            e
        }
        ,
        this.getValue = function() {
            return this.session.getValue()
        }
        ,
        this.getSelection = function() {
            return this.selection
        }
        ,
        this.resize = function(e) {
            this.renderer.onResize(e)
        }
        ,
        this.setTheme = function(e, t) {
            this.renderer.setTheme(e, t)
        }
        ,
        this.getTheme = function() {
            return this.renderer.getTheme()
        }
        ,
        this.setStyle = function(e) {
            this.renderer.setStyle(e)
        }
        ,
        this.unsetStyle = function(e) {
            this.renderer.unsetStyle(e)
        }
        ,
        this.getFontSize = function() {
            return this.getOption("fontSize") || i.computedStyle(this.container).fontSize
        }
        ,
        this.setFontSize = function(e) {
            this.setOption("fontSize", e)
        }
        ,
        this.$highlightBrackets = function() {
            if (this.$highlightPending)
                return;
            var e = this;
            this.$highlightPending = !0,
            setTimeout(function() {
                e.$highlightPending = !1;
                var t = e.session;
                if (!t || !t.bgTokenizer)
                    return;
                t.$bracketHighlight && (t.$bracketHighlight.markerIds.forEach(function(e) {
                    t.removeMarker(e)
                }),
                t.$bracketHighlight = null);
                var n = t.getMatchingBracketRanges(e.getCursorPosition());
                !n && t.$mode.getMatching && (n = t.$mode.getMatching(e.session));
                if (!n)
                    return;
                var r = "ace_bracket";
                Array.isArray(n) ? n.length == 1 && (r = "ace_error_bracket") : n = [n],
                n.length == 2 && (p.comparePoints(n[0].end, n[1].start) == 0 ? n = [p.fromPoints(n[0].start, n[1].end)] : p.comparePoints(n[0].start, n[1].end) == 0 && (n = [p.fromPoints(n[1].start, n[0].end)])),
                t.$bracketHighlight = {
                    ranges: n,
                    markerIds: n.map(function(e) {
                        return t.addMarker(e, r, "text")
                    })
                }
            }, 50)
        }
        ,
        this.$highlightTags = function() {
            if (this.$highlightTagPending)
                return;
            var e = this;
            this.$highlightTagPending = !0,
            setTimeout(function() {
                e.$highlightTagPending = !1;
                var t = e.session;
                if (!t || !t.bgTokenizer)
                    return;
                var n = e.getCursorPosition()
                  , r = new y(e.session,n.row,n.column)
                  , i = r.getCurrentToken();
                if (!i || !/\b(?:tag-open|tag-name)/.test(i.type)) {
                    t.removeMarker(t.$tagHighlight),
                    t.$tagHighlight = null;
                    return
                }
                if (i.type.indexOf("tag-open") != -1) {
                    i = r.stepForward();
                    if (!i)
                        return
                }
                var s = i.value
                  , o = 0
                  , u = r.stepBackward();
                if (u.value == "<") {
                    do
                        u = i,
                        i = r.stepForward(),
                        i && i.value === s && i.type.indexOf("tag-name") !== -1 && (u.value === "<" ? o++ : u.value === "</" && o--);
                    while (i && o >= 0)
                } else {
                    do
                        i = u,
                        u = r.stepBackward(),
                        i && i.value === s && i.type.indexOf("tag-name") !== -1 && (u.value === "<" ? o++ : u.value === "</" && o--);
                    while (u && o <= 0);
                    r.stepForward()
                }
                if (!i) {
                    t.removeMarker(t.$tagHighlight),
                    t.$tagHighlight = null;
                    return
                }
                var a = r.getCurrentTokenRow()
                  , f = r.getCurrentTokenColumn()
                  , l = new p(a,f,a,f + i.value.length)
                  , c = t.$backMarkers[t.$tagHighlight];
                t.$tagHighlight && c != undefined && l.compareRange(c.range) !== 0 && (t.removeMarker(t.$tagHighlight),
                t.$tagHighlight = null),
                t.$tagHighlight || (t.$tagHighlight = t.addMarker(l, "ace_bracket", "text"))
            }, 50)
        }
        ,
        this.focus = function() {
            var e = this;
            setTimeout(function() {
                e.isFocused() || e.textInput.focus()
            }),
            this.textInput.focus()
        }
        ,
        this.isFocused = function() {
            return this.textInput.isFocused()
        }
        ,
        this.blur = function() {
            this.textInput.blur()
        }
        ,
        this.onFocus = function(e) {
            if (this.$isFocused)
                return;
            this.$isFocused = !0,
            this.renderer.showCursor(),
            this.renderer.visualizeFocus(),
            this._emit("focus", e)
        }
        ,
        this.onBlur = function(e) {
            if (!this.$isFocused)
                return;
            this.$isFocused = !1,
            this.renderer.hideCursor(),
            this.renderer.visualizeBlur(),
            this._emit("blur", e)
        }
        ,
        this.$cursorChange = function() {
            this.renderer.updateCursor()
        }
        ,
        this.onDocumentChange = function(e) {
            var t = this.session.$useWrapMode
              , n = e.start.row == e.end.row ? e.end.row : Infinity;
            this.renderer.updateLines(e.start.row, n, t),
            this._signal("change", e),
            this.$cursorChange(),
            this.$updateHighlightActiveLine()
        }
        ,
        this.onTokenizerUpdate = function(e) {
            var t = e.data;
            this.renderer.updateLines(t.first, t.last)
        }
        ,
        this.onScrollTopChange = function() {
            this.renderer.scrollToY(this.session.getScrollTop())
        }
        ,
        this.onScrollLeftChange = function() {
            this.renderer.scrollToX(this.session.getScrollLeft())
        }
        ,
        this.onCursorChange = function() {
            this.$cursorChange(),
            this.$highlightBrackets(),
            this.$highlightTags(),
            this.$updateHighlightActiveLine(),
            this._signal("changeSelection")
        }
        ,
        this.$updateHighlightActiveLine = function() {
            var e = this.getSession(), t;
            if (this.$highlightActiveLine) {
                if (this.$selectionStyle != "line" || !this.selection.isMultiLine())
                    t = this.getCursorPosition();
                this.renderer.theme && this.renderer.theme.$selectionColorConflict && !this.selection.isEmpty() && (t = !1),
                this.renderer.$maxLines && this.session.getLength() === 1 && !(this.renderer.$minLines > 1) && (t = !1)
            }
            if (e.$highlightLineMarker && !t)
                e.removeMarker(e.$highlightLineMarker.id),
                e.$highlightLineMarker = null;
            else if (!e.$highlightLineMarker && t) {
                var n = new p(t.row,t.column,t.row,Infinity);
                n.id = e.addMarker(n, "ace_active-line", "screenLine"),
                e.$highlightLineMarker = n
            } else
                t && (e.$highlightLineMarker.start.row = t.row,
                e.$highlightLineMarker.end.row = t.row,
                e.$highlightLineMarker.start.column = t.column,
                e._signal("changeBackMarker"))
        }
        ,
        this.onSelectionChange = function(e) {
            var t = this.session;
            t.$selectionMarker && t.removeMarker(t.$selectionMarker),
            t.$selectionMarker = null;
            if (!this.selection.isEmpty()) {
                var n = this.selection.getRange()
                  , r = this.getSelectionStyle();
                t.$selectionMarker = t.addMarker(n, "ace_selection", r)
            } else
                this.$updateHighlightActiveLine();
            var i = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp();
            this.session.highlight(i),
            this._signal("changeSelection")
        }
        ,
        this.$getSelectionHighLightRegexp = function() {
            var e = this.session
              , t = this.getSelectionRange();
            if (t.isEmpty() || t.isMultiLine())
                return;
            var n = t.start.column
              , r = t.end.column
              , i = e.getLine(t.start.row)
              , s = i.substring(n, r);
            if (s.length > 5e3 || !/[\w\d]/.test(s))
                return;
            var o = this.$search.$assembleRegExp({
                wholeWord: !0,
                caseSensitive: !0,
                needle: s
            })
              , u = i.substring(n - 1, r + 1);
            if (!o.test(u))
                return;
            return o
        }
        ,
        this.onChangeFrontMarker = function() {
            this.renderer.updateFrontMarkers()
        }
        ,
        this.onChangeBackMarker = function() {
            this.renderer.updateBackMarkers()
        }
        ,
        this.onChangeBreakpoint = function() {
            this.renderer.updateBreakpoints()
        }
        ,
        this.onChangeAnnotation = function() {
            this.renderer.setAnnotations(this.session.getAnnotations())
        }
        ,
        this.onChangeMode = function(e) {
            this.renderer.updateText(),
            this._emit("changeMode", e)
        }
        ,
        this.onChangeWrapLimit = function() {
            this.renderer.updateFull()
        }
        ,
        this.onChangeWrapMode = function() {
            this.renderer.onResize(!0)
        }
        ,
        this.onChangeFold = function() {
            this.$updateHighlightActiveLine(),
            this.renderer.updateFull()
        }
        ,
        this.getSelectedText = function() {
            return this.session.getTextRange(this.getSelectionRange())
        }
        ,
        this.getCopyText = function() {
            var e = this.getSelectedText()
              , t = this.session.doc.getNewLineCharacter()
              , n = !1;
            if (!e && this.$copyWithEmptySelection) {
                n = !0;
                var r = this.selection.getAllRanges();
                for (var i = 0; i < r.length; i++) {
                    var s = r[i];
                    if (i && r[i - 1].start.row == s.start.row)
                        continue;
                    e += this.session.getLine(s.start.row) + t
                }
            }
            var o = {
                text: e
            };
            return this._signal("copy", o),
            b.lineMode = n ? o.text : "",
            o.text
        }
        ,
        this.onCopy = function() {
            this.commands.exec("copy", this)
        }
        ,
        this.onCut = function() {
            this.commands.exec("cut", this)
        }
        ,
        this.onPaste = function(e, t) {
            var n = {
                text: e,
                event: t
            };
            this.commands.exec("paste", this, n)
        }
        ,
        this.$handlePaste = function(e) {
            typeof e == "string" && (e = {
                text: e
            }),
            this._signal("paste", e);
            var t = e.text
              , n = t == b.lineMode
              , r = this.session;
            if (!this.inMultiSelectMode || this.inVirtualSelectionMode)
                n ? r.insert({
                    row: this.selection.lead.row,
                    column: 0
                }, t) : this.insert(t);
            else if (n)
                this.selection.rangeList.ranges.forEach(function(e) {
                    r.insert({
                        row: e.start.row,
                        column: 0
                    }, t)
                });
            else {
                var i = t.split(/\r\n|\r|\n/)
                  , s = this.selection.rangeList.ranges
                  , o = i.length == 2 && (!i[0] || !i[1]);
                if (i.length != s.length || o)
                    return this.commands.exec("insertstring", this, t);
                for (var u = s.length; u--; ) {
                    var a = s[u];
                    a.isEmpty() || r.remove(a),
                    r.insert(a.start, i[u])
                }
            }
        }
        ,
        this.execCommand = function(e, t) {
            return this.commands.exec(e, this, t)
        }
        ,
        this.insert = function(e, t) {
            var n = this.session
              , r = n.getMode()
              , i = this.getCursorPosition();
            if (this.getBehavioursEnabled() && !t) {
                var s = r.transformAction(n.getState(i.row), "insertion", this, n, e);
                s && (e !== s.text && (this.inVirtualSelectionMode || (this.session.mergeUndoDeltas = !1,
                this.mergeNextCommand = !1)),
                e = s.text)
            }
            e == "	" && (e = this.session.getTabString());
            if (!this.selection.isEmpty()) {
                var o = this.getSelectionRange();
                i = this.session.remove(o),
                this.clearSelection()
            } else if (this.session.getOverwrite() && e.indexOf("\n") == -1) {
                var o = new p.fromPoints(i,i);
                o.end.column += e.length,
                this.session.remove(o)
            }
            if (e == "\n" || e == "\r\n") {
                var u = n.getLine(i.row);
                if (i.column > u.search(/\S|$/)) {
                    var a = u.substr(i.column).search(/\S|$/);
                    n.doc.removeInLine(i.row, i.column, i.column + a)
                }
            }
            this.clearSelection();
            var f = i.column
              , l = n.getState(i.row)
              , u = n.getLine(i.row)
              , c = r.checkOutdent(l, u, e);
            n.insert(i, e),
            s && s.selection && (s.selection.length == 2 ? this.selection.setSelectionRange(new p(i.row,f + s.selection[0],i.row,f + s.selection[1])) : this.selection.setSelectionRange(new p(i.row + s.selection[0],s.selection[1],i.row + s.selection[2],s.selection[3])));
            if (this.$enableAutoIndent) {
                if (n.getDocument().isNewLine(e)) {
                    var h = r.getNextLineIndent(l, u.slice(0, i.column), n.getTabString());
                    n.insert({
                        row: i.row + 1,
                        column: 0
                    }, h)
                }
                c && r.autoOutdent(l, n, i.row)
            }
        }
        ,
        this.autoIndent = function() {
            var e = this.session, t = e.getMode(), n, r;
            if (this.selection.isEmpty())
                n = 0,
                r = e.doc.getLength() - 1;
            else {
                var i = this.getSelectionRange();
                n = i.start.row,
                r = i.end.row
            }
            var s = "", o = "", u = "", a, f, l, c = e.getTabString();
            for (var h = n; h <= r; h++)
                h > 0 && (s = e.getState(h - 1),
                o = e.getLine(h - 1),
                u = t.getNextLineIndent(s, o, c)),
                a = e.getLine(h),
                f = t.$getIndent(a),
                u !== f && (f.length > 0 && (l = new p(h,0,h,f.length),
                e.remove(l)),
                u.length > 0 && e.insert({
                    row: h,
                    column: 0
                }, u)),
                t.autoOutdent(s, e, h)
        }
        ,
        this.onTextInput = function(e, t) {
            if (!t)
                return this.keyBinding.onTextInput(e);
            this.startOperation({
                command: {
                    name: "insertstring"
                }
            });
            var n = this.applyComposition.bind(this, e, t);
            this.selection.rangeCount ? this.forEachSelection(n) : n(),
            this.endOperation()
        }
        ,
        this.applyComposition = function(e, t) {
            if (t.extendLeft || t.extendRight) {
                var n = this.selection.getRange();
                n.start.column -= t.extendLeft,
                n.end.column += t.extendRight,
                n.start.column < 0 && (n.start.row--,
                n.start.column += this.session.getLine(n.start.row).length + 1),
                this.selection.setRange(n),
                !e && !n.isEmpty() && this.remove()
            }
            (e || !this.selection.isEmpty()) && this.insert(e, !0);
            if (t.restoreStart || t.restoreEnd) {
                var n = this.selection.getRange();
                n.start.column -= t.restoreStart,
                n.end.column -= t.restoreEnd,
                this.selection.setRange(n)
            }
        }
        ,
        this.onCommandKey = function(e, t, n) {
            return this.keyBinding.onCommandKey(e, t, n)
        }
        ,
        this.setOverwrite = function(e) {
            this.session.setOverwrite(e)
        }
        ,
        this.getOverwrite = function() {
            return this.session.getOverwrite()
        }
        ,
        this.toggleOverwrite = function() {
            this.session.toggleOverwrite()
        }
        ,
        this.setScrollSpeed = function(e) {
            this.setOption("scrollSpeed", e)
        }
        ,
        this.getScrollSpeed = function() {
            return this.getOption("scrollSpeed")
        }
        ,
        this.setDragDelay = function(e) {
            this.setOption("dragDelay", e)
        }
        ,
        this.getDragDelay = function() {
            return this.getOption("dragDelay")
        }
        ,
        this.setSelectionStyle = function(e) {
            this.setOption("selectionStyle", e)
        }
        ,
        this.getSelectionStyle = function() {
            return this.getOption("selectionStyle")
        }
        ,
        this.setHighlightActiveLine = function(e) {
            this.setOption("highlightActiveLine", e)
        }
        ,
        this.getHighlightActiveLine = function() {
            return this.getOption("highlightActiveLine")
        }
        ,
        this.setHighlightGutterLine = function(e) {
            this.setOption("highlightGutterLine", e)
        }
        ,
        this.getHighlightGutterLine = function() {
            return this.getOption("highlightGutterLine")
        }
        ,
        this.setHighlightSelectedWord = function(e) {
            this.setOption("highlightSelectedWord", e)
        }
        ,
        this.getHighlightSelectedWord = function() {
            return this.$highlightSelectedWord
        }
        ,
        this.setAnimatedScroll = function(e) {
            this.renderer.setAnimatedScroll(e)
        }
        ,
        this.getAnimatedScroll = function() {
            return this.renderer.getAnimatedScroll()
        }
        ,
        this.setShowInvisibles = function(e) {
            this.renderer.setShowInvisibles(e)
        }
        ,
        this.getShowInvisibles = function() {
            return this.renderer.getShowInvisibles()
        }
        ,
        this.setDisplayIndentGuides = function(e) {
            this.renderer.setDisplayIndentGuides(e)
        }
        ,
        this.getDisplayIndentGuides = function() {
            return this.renderer.getDisplayIndentGuides()
        }
        ,
        this.setShowPrintMargin = function(e) {
            this.renderer.setShowPrintMargin(e)
        }
        ,
        this.getShowPrintMargin = function() {
            return this.renderer.getShowPrintMargin()
        }
        ,
        this.setPrintMarginColumn = function(e) {
            this.renderer.setPrintMarginColumn(e)
        }
        ,
        this.getPrintMarginColumn = function() {
            return this.renderer.getPrintMarginColumn()
        }
        ,
        this.setReadOnly = function(e) {
            this.setOption("readOnly", e)
        }
        ,
        this.getReadOnly = function() {
            return this.getOption("readOnly")
        }
        ,
        this.setBehavioursEnabled = function(e) {
            this.setOption("behavioursEnabled", e)
        }
        ,
        this.getBehavioursEnabled = function() {
            return this.getOption("behavioursEnabled")
        }
        ,
        this.setWrapBehavioursEnabled = function(e) {
            this.setOption("wrapBehavioursEnabled", e)
        }
        ,
        this.getWrapBehavioursEnabled = function() {
            return this.getOption("wrapBehavioursEnabled")
        }
        ,
        this.setShowFoldWidgets = function(e) {
            this.setOption("showFoldWidgets", e)
        }
        ,
        this.getShowFoldWidgets = function() {
            return this.getOption("showFoldWidgets")
        }
        ,
        this.setFadeFoldWidgets = function(e) {
            this.setOption("fadeFoldWidgets", e)
        }
        ,
        this.getFadeFoldWidgets = function() {
            return this.getOption("fadeFoldWidgets")
        }
        ,
        this.remove = function(e) {
            this.selection.isEmpty() && (e == "left" ? this.selection.selectLeft() : this.selection.selectRight());
            var t = this.getSelectionRange();
            if (this.getBehavioursEnabled()) {
                var n = this.session
                  , r = n.getState(t.start.row)
                  , i = n.getMode().transformAction(r, "deletion", this, n, t);
                if (t.end.column === 0) {
                    var s = n.getTextRange(t);
                    if (s[s.length - 1] == "\n") {
                        var o = n.getLine(t.end.row);
                        /^\s+$/.test(o) && (t.end.column = o.length)
                    }
                }
                i && (t = i)
            }
            this.session.remove(t),
            this.clearSelection()
        }
        ,
        this.removeWordRight = function() {
            this.selection.isEmpty() && this.selection.selectWordRight(),
            this.session.remove(this.getSelectionRange()),
            this.clearSelection()
        }
        ,
        this.removeWordLeft = function() {
            this.selection.isEmpty() && this.selection.selectWordLeft(),
            this.session.remove(this.getSelectionRange()),
            this.clearSelection()
        }
        ,
        this.removeToLineStart = function() {
            this.selection.isEmpty() && this.selection.selectLineStart(),
            this.selection.isEmpty() && this.selection.selectLeft(),
            this.session.remove(this.getSelectionRange()),
            this.clearSelection()
        }
        ,
        this.removeToLineEnd = function() {
            this.selection.isEmpty() && this.selection.selectLineEnd();
            var e = this.getSelectionRange();
            e.start.column == e.end.column && e.start.row == e.end.row && (e.end.column = 0,
            e.end.row++),
            this.session.remove(e),
            this.clearSelection()
        }
        ,
        this.splitLine = function() {
            this.selection.isEmpty() || (this.session.remove(this.getSelectionRange()),
            this.clearSelection());
            var e = this.getCursorPosition();
            this.insert("\n"),
            this.moveCursorToPosition(e)
        }
        ,
        this.transposeLetters = function() {
            if (!this.selection.isEmpty())
                return;
            var e = this.getCursorPosition()
              , t = e.column;
            if (t === 0)
                return;
            var n = this.session.getLine(e.row), r, i;
            t < n.length ? (r = n.charAt(t) + n.charAt(t - 1),
            i = new p(e.row,t - 1,e.row,t + 1)) : (r = n.charAt(t - 1) + n.charAt(t - 2),
            i = new p(e.row,t - 2,e.row,t)),
            this.session.replace(i, r),
            this.session.selection.moveToPosition(i.end)
        }
        ,
        this.toLowerCase = function() {
            var e = this.getSelectionRange();
            this.selection.isEmpty() && this.selection.selectWord();
            var t = this.getSelectionRange()
              , n = this.session.getTextRange(t);
            this.session.replace(t, n.toLowerCase()),
            this.selection.setSelectionRange(e)
        }
        ,
        this.toUpperCase = function() {
            var e = this.getSelectionRange();
            this.selection.isEmpty() && this.selection.selectWord();
            var t = this.getSelectionRange()
              , n = this.session.getTextRange(t);
            this.session.replace(t, n.toUpperCase()),
            this.selection.setSelectionRange(e)
        }
        ,
        this.indent = function() {
            var e = this.session
              , t = this.getSelectionRange();
            if (t.start.row < t.end.row) {
                var n = this.$getSelectedRows();
                e.indentRows(n.first, n.last, "	");
                return
            }
            if (t.start.column < t.end.column) {
                var r = e.getTextRange(t);
                if (!/^\s+$/.test(r)) {
                    var n = this.$getSelectedRows();
                    e.indentRows(n.first, n.last, "	");
                    return
                }
            }
            var i = e.getLine(t.start.row)
              , o = t.start
              , u = e.getTabSize()
              , a = e.documentToScreenColumn(o.row, o.column);
            if (this.session.getUseSoftTabs())
                var f = u - a % u
                  , l = s.stringRepeat(" ", f);
            else {
                var f = a % u;
                while (i[t.start.column - 1] == " " && f)
                    t.start.column--,
                    f--;
                this.selection.setSelectionRange(t),
                l = "	"
            }
            return this.insert(l)
        }
        ,
        this.blockIndent = function() {
            var e = this.$getSelectedRows();
            this.session.indentRows(e.first, e.last, "	")
        }
        ,
        this.blockOutdent = function() {
            var e = this.session.getSelection();
            this.session.outdentRows(e.getRange())
        }
        ,
        this.sortLines = function() {
            var e = this.$getSelectedRows()
              , t = this.session
              , n = [];
            for (var r = e.first; r <= e.last; r++)
                n.push(t.getLine(r));
            n.sort(function(e, t) {
                return e.toLowerCase() < t.toLowerCase() ? -1 : e.toLowerCase() > t.toLowerCase() ? 1 : 0
            });
            var i = new p(0,0,0,0);
            for (var r = e.first; r <= e.last; r++) {
                var s = t.getLine(r);
                i.start.row = r,
                i.end.row = r,
                i.end.column = s.length,
                t.replace(i, n[r - e.first])
            }
        }
        ,
        this.toggleCommentLines = function() {
            var e = this.session.getState(this.getCursorPosition().row)
              , t = this.$getSelectedRows();
            this.session.getMode().toggleCommentLines(e, this.session, t.first, t.last)
        }
        ,
        this.toggleBlockComment = function() {
            var e = this.getCursorPosition()
              , t = this.session.getState(e.row)
              , n = this.getSelectionRange();
            this.session.getMode().toggleBlockComment(t, this.session, n, e)
        }
        ,
        this.getNumberAt = function(e, t) {
            var n = /[\-]?[0-9]+(?:\.[0-9]+)?/g;
            n.lastIndex = 0;
            var r = this.session.getLine(e);
            while (n.lastIndex < t) {
                var i = n.exec(r);
                if (i.index <= t && i.index + i[0].length >= t) {
                    var s = {
                        value: i[0],
                        start: i.index,
                        end: i.index + i[0].length
                    };
                    return s
                }
            }
            return null
        }
        ,
        this.modifyNumber = function(e) {
            var t = this.selection.getCursor().row
              , n = this.selection.getCursor().column
              , r = new p(t,n - 1,t,n)
              , i = this.session.getTextRange(r);
            if (!isNaN(parseFloat(i)) && isFinite(i)) {
                var s = this.getNumberAt(t, n);
                if (s) {
                    var o = s.value.indexOf(".") >= 0 ? s.start + s.value.indexOf(".") + 1 : s.end
                      , u = s.start + s.value.length - o
                      , a = parseFloat(s.value);
                    a *= Math.pow(10, u),
                    o !== s.end && n < o ? e *= Math.pow(10, s.end - n - 1) : e *= Math.pow(10, s.end - n),
                    a += e,
                    a /= Math.pow(10, u);
                    var f = a.toFixed(u)
                      , l = new p(t,s.start,t,s.end);
                    this.session.replace(l, f),
                    this.moveCursorTo(t, Math.max(s.start + 1, n + f.length - s.value.length))
                }
            } else
                this.toggleWord()
        }
        ,
        this.$toggleWordPairs = [["first", "last"], ["true", "false"], ["yes", "no"], ["width", "height"], ["top", "bottom"], ["right", "left"], ["on", "off"], ["x", "y"], ["get", "set"], ["max", "min"], ["horizontal", "vertical"], ["show", "hide"], ["add", "remove"], ["up", "down"], ["before", "after"], ["even", "odd"], ["in", "out"], ["inside", "outside"], ["next", "previous"], ["increase", "decrease"], ["attach", "detach"], ["&&", "||"], ["==", "!="]],
        this.toggleWord = function() {
            var e = this.selection.getCursor().row
              , t = this.selection.getCursor().column;
            this.selection.selectWord();
            var n = this.getSelectedText()
              , r = this.selection.getWordRange().start.column
              , i = n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g, "$1 ").split(/\s/)
              , o = t - r - 1;
            o < 0 && (o = 0);
            var u = 0
              , a = 0
              , f = this;
            n.match(/[A-Za-z0-9_]+/) && i.forEach(function(t, i) {
                a = u + t.length,
                o >= u && o <= a && (n = t,
                f.selection.clearSelection(),
                f.moveCursorTo(e, u + r),
                f.selection.selectTo(e, a + r)),
                u = a
            });
            var l = this.$toggleWordPairs, c;
            for (var h = 0; h < l.length; h++) {
                var p = l[h];
                for (var d = 0; d <= 1; d++) {
                    var v = +!d
                      , m = n.match(new RegExp("^\\s?_?(" + s.escapeRegExp(p[d]) + ")\\s?$","i"));
                    if (m) {
                        var g = n.match(new RegExp("([_]|^|\\s)(" + s.escapeRegExp(m[1]) + ")($|\\s)","g"));
                        g && (c = n.replace(new RegExp(s.escapeRegExp(p[d]),"i"), function(e) {
                            var t = p[v];
                            return e.toUpperCase() == e ? t = t.toUpperCase() : e.charAt(0).toUpperCase() == e.charAt(0) && (t = t.substr(0, 0) + p[v].charAt(0).toUpperCase() + t.substr(1)),
                            t
                        }),
                        this.insert(c),
                        c = "")
                    }
                }
            }
        }
        ,
        this.removeLines = function() {
            var e = this.$getSelectedRows();
            this.session.removeFullLines(e.first, e.last),
            this.clearSelection()
        }
        ,
        this.duplicateSelection = function() {
            var e = this.selection
              , t = this.session
              , n = e.getRange()
              , r = e.isBackwards();
            if (n.isEmpty()) {
                var i = n.start.row;
                t.duplicateLines(i, i)
            } else {
                var s = r ? n.start : n.end
                  , o = t.insert(s, t.getTextRange(n), !1);
                n.start = s,
                n.end = o,
                e.setSelectionRange(n, r)
            }
        }
        ,
        this.moveLinesDown = function() {
            this.$moveLines(1, !1)
        }
        ,
        this.moveLinesUp = function() {
            this.$moveLines(-1, !1)
        }
        ,
        this.moveText = function(e, t, n) {
            return this.session.moveText(e, t, n)
        }
        ,
        this.copyLinesUp = function() {
            this.$moveLines(-1, !0)
        }
        ,
        this.copyLinesDown = function() {
            this.$moveLines(1, !0)
        }
        ,
        this.$moveLines = function(e, t) {
            var n, r, i = this.selection;
            if (!i.inMultiSelectMode || this.inVirtualSelectionMode) {
                var s = i.toOrientedRange();
                n = this.$getSelectedRows(s),
                r = this.session.$moveLines(n.first, n.last, t ? 0 : e),
                t && e == -1 && (r = 0),
                s.moveBy(r, 0),
                i.fromOrientedRange(s)
            } else {
                var o = i.rangeList.ranges;
                i.rangeList.detach(this.session),
                this.inVirtualSelectionMode = !0;
                var u = 0
                  , a = 0
                  , f = o.length;
                for (var l = 0; l < f; l++) {
                    var c = l;
                    o[l].moveBy(u, 0),
                    n = this.$getSelectedRows(o[l]);
                    var h = n.first
                      , p = n.last;
                    while (++l < f) {
                        a && o[l].moveBy(a, 0);
                        var d = this.$getSelectedRows(o[l]);
                        if (t && d.first != p)
                            break;
                        if (!t && d.first > p + 1)
                            break;
                        p = d.last
                    }
                    l--,
                    u = this.session.$moveLines(h, p, t ? 0 : e),
                    t && e == -1 && (c = l + 1);
                    while (c <= l)
                        o[c].moveBy(u, 0),
                        c++;
                    t || (u = 0),
                    a += u
                }
                i.fromOrientedRange(i.ranges[0]),
                i.rangeList.attach(this.session),
                this.inVirtualSelectionMode = !1
            }
        }
        ,
        this.$getSelectedRows = function(e) {
            return e = (e || this.getSelectionRange()).collapseRows(),
            {
                first: this.session.getRowFoldStart(e.start.row),
                last: this.session.getRowFoldEnd(e.end.row)
            }
        }
        ,
        this.onCompositionStart = function(e) {
            this.renderer.showComposition(e)
        }
        ,
        this.onCompositionUpdate = function(e) {
            this.renderer.setCompositionText(e)
        }
        ,
        this.onCompositionEnd = function() {
            this.renderer.hideComposition()
        }
        ,
        this.getFirstVisibleRow = function() {
            return this.renderer.getFirstVisibleRow()
        }
        ,
        this.getLastVisibleRow = function() {
            return this.renderer.getLastVisibleRow()
        }
        ,
        this.isRowVisible = function(e) {
            return e >= this.getFirstVisibleRow() && e <= this.getLastVisibleRow()
        }
        ,
        this.isRowFullyVisible = function(e) {
            return e >= this.renderer.getFirstFullyVisibleRow() && e <= this.renderer.getLastFullyVisibleRow()
        }
        ,
        this.$getVisibleRowCount = function() {
            return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1
        }
        ,
        this.$moveByPage = function(e, t) {
            var n = this.renderer
              , r = this.renderer.layerConfig
              , i = e * Math.floor(r.height / r.lineHeight);
            t === !0 ? this.selection.$moveSelection(function() {
                this.moveCursorBy(i, 0)
            }) : t === !1 && (this.selection.moveCursorBy(i, 0),
            this.selection.clearSelection());
            var s = n.scrollTop;
            n.scrollBy(0, i * r.lineHeight),
            t != null && n.scrollCursorIntoView(null, .5),
            n.animateScrolling(s)
        }
        ,
        this.selectPageDown = function() {
            this.$moveByPage(1, !0)
        }
        ,
        this.selectPageUp = function() {
            this.$moveByPage(-1, !0)
        }
        ,
        this.gotoPageDown = function() {
            this.$moveByPage(1, !1)
        }
        ,
        this.gotoPageUp = function() {
            this.$moveByPage(-1, !1)
        }
        ,
        this.scrollPageDown = function() {
            this.$moveByPage(1)
        }
        ,
        this.scrollPageUp = function() {
            this.$moveByPage(-1)
        }
        ,
        this.scrollToRow = function(e) {
            this.renderer.scrollToRow(e)
        }
        ,
        this.scrollToLine = function(e, t, n, r) {
            this.renderer.scrollToLine(e, t, n, r)
        }
        ,
        this.centerSelection = function() {
            var e = this.getSelectionRange()
              , t = {
                row: Math.floor(e.start.row + (e.end.row - e.start.row) / 2),
                column: Math.floor(e.start.column + (e.end.column - e.start.column) / 2)
            };
            this.renderer.alignCursor(t, .5)
        }
        ,
        this.getCursorPosition = function() {
            return this.selection.getCursor()
        }
        ,
        this.getCursorPositionScreen = function() {
            return this.session.documentToScreenPosition(this.getCursorPosition())
        }
        ,
        this.getSelectionRange = function() {
            return this.selection.getRange()
        }
        ,
        this.selectAll = function() {
            this.selection.selectAll()
        }
        ,
        this.clearSelection = function() {
            this.selection.clearSelection()
        }
        ,
        this.moveCursorTo = function(e, t) {
            this.selection.moveCursorTo(e, t)
        }
        ,
        this.moveCursorToPosition = function(e) {
            this.selection.moveCursorToPosition(e)
        }
        ,
        this.jumpToMatching = function(e, t) {
            var n = this.getCursorPosition()
              , r = new y(this.session,n.row,n.column)
              , i = r.getCurrentToken()
              , s = i || r.stepForward();
            if (!s)
                return;
            var o, u = !1, a = {}, f = n.column - s.start, l, c = {
                ")": "(",
                "(": "(",
                "]": "[",
                "[": "[",
                "{": "{",
                "}": "{"
            };
            do {
                if (s.value.match(/[{}()\[\]]/g))
                    for (; f < s.value.length && !u; f++) {
                        if (!c[s.value[f]])
                            continue;
                        l = c[s.value[f]] + "." + s.type.replace("rparen", "lparen"),
                        isNaN(a[l]) && (a[l] = 0);
                        switch (s.value[f]) {
                        case "(":
                        case "[":
                        case "{":
                            a[l]++;
                            break;
                        case ")":
                        case "]":
                        case "}":
                            a[l]--,
                            a[l] === -1 && (o = "bracket",
                            u = !0)
                        }
                    }
                else
                    s.type.indexOf("tag-name") !== -1 && (isNaN(a[s.value]) && (a[s.value] = 0),
                    i.value === "<" ? a[s.value]++ : i.value === "</" && a[s.value]--,
                    a[s.value] === -1 && (o = "tag",
                    u = !0));
                u || (i = s,
                s = r.stepForward(),
                f = 0)
            } while (s && !u);
            if (!o)
                return;
            var h, d;
            if (o === "bracket") {
                h = this.session.getBracketRange(n);
                if (!h) {
                    h = new p(r.getCurrentTokenRow(),r.getCurrentTokenColumn() + f - 1,r.getCurrentTokenRow(),r.getCurrentTokenColumn() + f - 1),
                    d = h.start;
                    if (t || d.row === n.row && Math.abs(d.column - n.column) < 2)
                        h = this.session.getBracketRange(d)
                }
            } else if (o === "tag") {
                if (!s || s.type.indexOf("tag-name") === -1)
                    return;
                var v = s.value;
                h = new p(r.getCurrentTokenRow(),r.getCurrentTokenColumn() - 2,r.getCurrentTokenRow(),r.getCurrentTokenColumn() - 2);
                if (h.compare(n.row, n.column) === 0) {
                    u = !1;
                    do
                        s = i,
                        i = r.stepBackward(),
                        i && (i.type.indexOf("tag-close") !== -1 && h.setEnd(r.getCurrentTokenRow(), r.getCurrentTokenColumn() + 1),
                        s.value === v && s.type.indexOf("tag-name") !== -1 && (i.value === "<" ? a[v]++ : i.value === "</" && a[v]--,
                        a[v] === 0 && (u = !0)));
                    while (i && !u)
                }
                s && s.type.indexOf("tag-name") && (d = h.start,
                d.row == n.row && Math.abs(d.column - n.column) < 2 && (d = h.end))
            }
            d = h && h.cursor || d,
            d && (e ? h && t ? this.selection.setRange(h) : h && h.isEqual(this.getSelectionRange()) ? this.clearSelection() : this.selection.selectTo(d.row, d.column) : this.selection.moveTo(d.row, d.column))
        }
        ,
        this.gotoLine = function(e, t, n) {
            this.selection.clearSelection(),
            this.session.unfold({
                row: e - 1,
                column: t || 0
            }),
            this.exitMultiSelectMode && this.exitMultiSelectMode(),
            this.moveCursorTo(e - 1, t || 0),
            this.isRowFullyVisible(e - 1) || this.scrollToLine(e - 1, !0, n)
        }
        ,
        this.navigateTo = function(e, t) {
            this.selection.moveTo(e, t)
        }
        ,
        this.navigateUp = function(e) {
            if (this.selection.isMultiLine() && !this.selection.isBackwards()) {
                var t = this.selection.anchor.getPosition();
                return this.moveCursorToPosition(t)
            }
            this.selection.clearSelection(),
            this.selection.moveCursorBy(-e || -1, 0)
        }
        ,
        this.navigateDown = function(e) {
            if (this.selection.isMultiLine() && this.selection.isBackwards()) {
                var t = this.selection.anchor.getPosition();
                return this.moveCursorToPosition(t)
            }
            this.selection.clearSelection(),
            this.selection.moveCursorBy(e || 1, 0)
        }
        ,
        this.navigateLeft = function(e) {
            if (!this.selection.isEmpty()) {
                var t = this.getSelectionRange().start;
                this.moveCursorToPosition(t)
            } else {
                e = e || 1;
                while (e--)
                    this.selection.moveCursorLeft()
            }
            this.clearSelection()
        }
        ,
        this.navigateRight = function(e) {
            if (!this.selection.isEmpty()) {
                var t = this.getSelectionRange().end;
                this.moveCursorToPosition(t)
            } else {
                e = e || 1;
                while (e--)
                    this.selection.moveCursorRight()
            }
            this.clearSelection()
        }
        ,
        this.navigateLineStart = function() {
            this.selection.moveCursorLineStart(),
            this.clearSelection()
        }
        ,
        this.navigateLineEnd = function() {
            this.selection.moveCursorLineEnd(),
            this.clearSelection()
        }
        ,
        this.navigateFileEnd = function() {
            this.selection.moveCursorFileEnd(),
            this.clearSelection()
        }
        ,
        this.navigateFileStart = function() {
            this.selection.moveCursorFileStart(),
            this.clearSelection()
        }
        ,
        this.navigateWordRight = function() {
            this.selection.moveCursorWordRight(),
            this.clearSelection()
        }
        ,
        this.navigateWordLeft = function() {
            this.selection.moveCursorWordLeft(),
            this.clearSelection()
        }
        ,
        this.replace = function(e, t) {
            t && this.$search.set(t);
            var n = this.$search.find(this.session)
              , r = 0;
            return n ? (this.$tryReplace(n, e) && (r = 1),
            this.selection.setSelectionRange(n),
            this.renderer.scrollSelectionIntoView(n.start, n.end),
            r) : r
        }
        ,
        this.replaceAll = function(e, t) {
            t && this.$search.set(t);
            var n = this.$search.findAll(this.session)
              , r = 0;
            if (!n.length)
                return r;
            var i = this.getSelectionRange();
            this.selection.moveTo(0, 0);
            for (var s = n.length - 1; s >= 0; --s)
                this.$tryReplace(n[s], e) && r++;
            return this.selection.setSelectionRange(i),
            r
        }
        ,
        this.$tryReplace = function(e, t) {
            var n = this.session.getTextRange(e);
            return t = this.$search.replace(n, t),
            t !== null ? (e.end = this.session.replace(e, t),
            e) : null
        }
        ,
        this.getLastSearchOptions = function() {
            return this.$search.getOptions()
        }
        ,
        this.find = function(e, t, n) {
            t || (t = {}),
            typeof e == "string" || e instanceof RegExp ? t.needle = e : typeof e == "object" && r.mixin(t, e);
            var i = this.selection.getRange();
            t.needle == null && (e = this.session.getTextRange(i) || this.$search.$options.needle,
            e || (i = this.session.getWordRange(i.start.row, i.start.column),
            e = this.session.getTextRange(i)),
            this.$search.set({
                needle: e
            })),
            this.$search.set(t),
            t.start || this.$search.set({
                start: i
            });
            var s = this.$search.find(this.session);
            if (t.preventScroll)
                return s;
            if (s)
                return this.revealRange(s, n),
                s;
            t.backwards ? i.start = i.end : i.end = i.start,
            this.selection.setRange(i)
        }
        ,
        this.findNext = function(e, t) {
            this.find({
                skipCurrent: !0,
                backwards: !1
            }, e, t)
        }
        ,
        this.findPrevious = function(e, t) {
            this.find(e, {
                skipCurrent: !0,
                backwards: !0
            }, t)
        }
        ,
        this.revealRange = function(e, t) {
            this.session.unfold(e),
            this.selection.setSelectionRange(e);
            var n = this.renderer.scrollTop;
            this.renderer.scrollSelectionIntoView(e.start, e.end, .5),
            t !== !1 && this.renderer.animateScrolling(n)
        }
        ,
        this.undo = function() {
            this.session.getUndoManager().undo(this.session),
            this.renderer.scrollCursorIntoView(null, .5)
        }
        ,
        this.redo = function() {
            this.session.getUndoManager().redo(this.session),
            this.renderer.scrollCursorIntoView(null, .5)
        }
        ,
        this.destroy = function() {
            this.renderer.destroy(),
            this._signal("destroy", this),
            this.session && this.session.destroy(),
            this._$emitInputEvent && this._$emitInputEvent.cancel(),
            this.session = null
        }
        ,
        this.setAutoScrollEditorIntoView = function(e) {
            if (!e)
                return;
            var t, n = this, r = !1;
            this.$scrollAnchor || (this.$scrollAnchor = document.createElement("div"));
            var i = this.$scrollAnchor;
            i.style.cssText = "position:absolute",
            this.container.insertBefore(i, this.container.firstChild);
            var s = this.on("changeSelection", function() {
                r = !0
            })
              , o = this.renderer.on("beforeRender", function() {
                r && (t = n.renderer.container.getBoundingClientRect())
            })
              , u = this.renderer.on("afterRender", function() {
                if (r && t && (n.isFocused() || n.searchBox && n.searchBox.isFocused())) {
                    var e = n.renderer
                      , s = e.$cursorLayer.$pixelPos
                      , o = e.layerConfig
                      , u = s.top - o.offset;
                    s.top >= 0 && u + t.top < 0 ? r = !0 : s.top < o.height && s.top + t.top + o.lineHeight > window.innerHeight ? r = !1 : r = null,
                    r != null && (i.style.top = u + "px",
                    i.style.left = s.left + "px",
                    i.style.height = o.lineHeight + "px",
                    i.scrollIntoView(r)),
                    r = t = null
                }
            });
            this.setAutoScrollEditorIntoView = function(e) {
                if (e)
                    return;
                delete this.setAutoScrollEditorIntoView,
                this.off("changeSelection", s),
                this.renderer.off("afterRender", u),
                this.renderer.off("beforeRender", o)
            }
        }
        ,
        this.$resetCursorStyle = function() {
            var e = this.$cursorStyle || "ace"
              , t = this.renderer.$cursorLayer;
            if (!t)
                return;
            t.setSmoothBlinking(/smooth/.test(e)),
            t.isBlinking = !this.$readOnly && e != "wide",
            i.setCssClass(t.element, "ace_slim-cursors", /slim/.test(e))
        }
        ,
        this.prompt = function(e, t, n) {
            var r = this;
            g.loadModule("./ext/prompt", function(i) {
                i.prompt(r, e, t, n)
            })
        }
    }
    .call(w.prototype),
    g.defineOptions(w.prototype, "editor", {
        selectionStyle: {
            set: function(e) {
                this.onSelectionChange(),
                this._signal("changeSelectionStyle", {
                    data: e
                })
            },
            initialValue: "line"
        },
        highlightActiveLine: {
            set: function() {
                this.$updateHighlightActiveLine()
            },
            initialValue: !0
        },
        highlightSelectedWord: {
            set: function(e) {
                this.$onSelectionChange()
            },
            initialValue: !0
        },
        readOnly: {
            set: function(e) {
                this.textInput.setReadOnly(e),
                this.$resetCursorStyle()
            },
            initialValue: !1
        },
        copyWithEmptySelection: {
            set: function(e) {
                this.textInput.setCopyWithEmptySelection(e)
            },
            initialValue: !1
        },
        cursorStyle: {
            set: function(e) {
                this.$resetCursorStyle()
            },
            values: ["ace", "slim", "smooth", "wide"],
            initialValue: "ace"
        },
        mergeUndoDeltas: {
            values: [!1, !0, "always"],
            initialValue: !0
        },
        behavioursEnabled: {
            initialValue: !0
        },
        wrapBehavioursEnabled: {
            initialValue: !0
        },
        enableAutoIndent: {
            initialValue: !0
        },
        autoScrollEditorIntoView: {
            set: function(e) {
                this.setAutoScrollEditorIntoView(e)
            }
        },
        keyboardHandler: {
            set: function(e) {
                this.setKeyboardHandler(e)
            },
            get: function() {
                return this.$keybindingId
            },
            handlesSet: !0
        },
        value: {
            set: function(e) {
                this.session.setValue(e)
            },
            get: function() {
                return this.getValue()
            },
            handlesSet: !0,
            hidden: !0
        },
        session: {
            set: function(e) {
                this.setSession(e)
            },
            get: function() {
                return this.session
            },
            handlesSet: !0,
            hidden: !0
        },
        showLineNumbers: {
            set: function(e) {
                this.renderer.$gutterLayer.setShowLineNumbers(e),
                this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),
                e && this.$relativeLineNumbers ? E.attach(this) : E.detach(this)
            },
            initialValue: !0
        },
        relativeLineNumbers: {
            set: function(e) {
                this.$showLineNumbers && e ? E.attach(this) : E.detach(this)
            }
        },
        placeholder: {
            set: function(e) {
                this.$updatePlaceholder || (this.$updatePlaceholder = function() {
                    var e = this.session && (this.renderer.$composition || this.getValue());
                    if (e && this.renderer.placeholderNode)
                        this.renderer.off("afterRender", this.$updatePlaceholder),
                        i.removeCssClass(this.container, "ace_hasPlaceholder"),
                        this.renderer.placeholderNode.remove(),
                        this.renderer.placeholderNode = null;
                    else if (!e && !this.renderer.placeholderNode) {
                        this.renderer.on("afterRender", this.$updatePlaceholder),
                        i.addCssClass(this.container, "ace_hasPlaceholder");
                        var t = i.createElement("div");
                        t.className = "ace_placeholder",
                        t.textContent = this.$placeholder || "",
                        this.renderer.placeholderNode = t,
                        this.renderer.content.appendChild(this.renderer.placeholderNode)
                    } else
                        !e && this.renderer.placeholderNode && (this.renderer.placeholderNode.textContent = this.$placeholder || "")
                }
                .bind(this),
                this.on("input", this.$updatePlaceholder)),
                this.$updatePlaceholder()
            }
        },
        hScrollBarAlwaysVisible: "renderer",
        vScrollBarAlwaysVisible: "renderer",
        highlightGutterLine: "renderer",
        animatedScroll: "renderer",
        showInvisibles: "renderer",
        showPrintMargin: "renderer",
        printMarginColumn: "renderer",
        printMargin: "renderer",
        fadeFoldWidgets: "renderer",
        showFoldWidgets: "renderer",
        displayIndentGuides: "renderer",
        showGutter: "renderer",
        fontSize: "renderer",
        fontFamily: "renderer",
        maxLines: "renderer",
        minLines: "renderer",
        scrollPastEnd: "renderer",
        fixedWidthGutter: "renderer",
        theme: "renderer",
        hasCssTransforms: "renderer",
        maxPixelHeight: "renderer",
        useTextareaForIME: "renderer",
        scrollSpeed: "$mouseHandler",
        dragDelay: "$mouseHandler",
        dragEnabled: "$mouseHandler",
        focusTimeout: "$mouseHandler",
        tooltipFollowsMouse: "$mouseHandler",
        firstLineNumber: "session",
        overwrite: "session",
        newLineMode: "session",
        useWorker: "session",
        useSoftTabs: "session",
        navigateWithinSoftTabs: "session",
        tabSize: "session",
        wrap: "session",
        indentedSoftWrap: "session",
        foldStyle: "session",
        mode: "session"
    });
    var E = {
        getText: function(e, t) {
            return (Math.abs(e.selection.lead.row - t) || t + 1 + (t < 9 ? "\u00b7" : "")) + ""
        },
        getWidth: function(e, t, n) {
            return Math.max(t.toString().length, (n.lastRow + 1).toString().length, 2) * n.characterWidth
        },
        update: function(e, t) {
            t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)
        },
        attach: function(e) {
            e.renderer.$gutterLayer.$renderer = this,
            e.on("changeSelection", this.update),
            this.update(null, e)
        },
        detach: function(e) {
            e.renderer.$gutterLayer.$renderer == this && (e.renderer.$gutterLayer.$renderer = null),
            e.off("changeSelection", this.update),
            this.update(null, e)
        }
    };
    t.Editor = w
}),
define("ace/undomanager", ["require", "exports", "module", "ace/range"], function(e, t, n) {
    "use strict";
    function i(e, t) {
        for (var n = t; n--; ) {
            var r = e[n];
            if (r && !r[0].ignore) {
                while (n < t - 1) {
                    var i = d(e[n], e[n + 1]);
                    e[n] = i[0],
                    e[n + 1] = i[1],
                    n++
                }
                return !0
            }
        }
    }
    function a(e) {
        var t = e.action == "insert"
          , n = e.start
          , r = e.end
          , i = (r.row - n.row) * (t ? 1 : -1)
          , s = (r.column - n.column) * (t ? 1 : -1);
        t && (r = n);
        for (var o in this.marks) {
            var a = this.marks[o]
              , f = u(a, n);
            if (f < 0)
                continue;
            if (f === 0 && t) {
                if (a.bias != 1) {
                    a.bias == -1;
                    continue
                }
                f = 1
            }
            var l = t ? f : u(a, r);
            if (l > 0) {
                a.row += i,
                a.column += a.row == r.row ? s : 0;
                continue
            }
            !t && l <= 0 && (a.row = n.row,
            a.column = n.column,
            l === 0 && (a.bias = 1))
        }
    }
    function f(e) {
        return {
            row: e.row,
            column: e.column
        }
    }
    function l(e) {
        return {
            start: f(e.start),
            end: f(e.end),
            action: e.action,
            lines: e.lines.slice()
        }
    }
    function c(e) {
        e = e || this;
        if (Array.isArray(e))
            return e.map(c).join("\n");
        var t = "";
        e.action ? (t = e.action == "insert" ? "+" : "-",
        t += "[" + e.lines + "]") : e.value && (Array.isArray(e.value) ? t = e.value.map(h).join("\n") : t = h(e.value)),
        e.start && (t += h(e));
        if (e.id || e.rev)
            t += "	(" + (e.id || e.rev) + ")";
        return t
    }
    function h(e) {
        return e.start.row + ":" + e.start.column + "=>" + e.end.row + ":" + e.end.column
    }
    function p(e, t) {
        var n = e.action == "insert"
          , r = t.action == "insert";
        if (n && r)
            if (o(t.start, e.end) >= 0)
                m(t, e, -1);
            else {
                if (!(o(t.start, e.start) <= 0))
                    return null;
                m(e, t, 1)
            }
        else if (n && !r)
            if (o(t.start, e.end) >= 0)
                m(t, e, -1);
            else {
                if (!(o(t.end, e.start) <= 0))
                    return null;
                m(e, t, -1)
            }
        else if (!n && r)
            if (o(t.start, e.start) >= 0)
                m(t, e, 1);
            else {
                if (!(o(t.start, e.start) <= 0))
                    return null;
                m(e, t, 1)
            }
        else if (!n && !r)
            if (o(t.start, e.start) >= 0)
                m(t, e, 1);
            else {
                if (!(o(t.end, e.start) <= 0))
                    return null;
                m(e, t, -1)
            }
        return [t, e]
    }
    function d(e, t) {
        for (var n = e.length; n--; )
            for (var r = 0; r < t.length; r++)
                if (!p(e[n], t[r])) {
                    while (n < e.length) {
                        while (r--)
                            p(t[r], e[n]);
                        r = t.length,
                        n++
                    }
                    return [e, t]
                }
        return e.selectionBefore = t.selectionBefore = e.selectionAfter = t.selectionAfter = null,
        [t, e]
    }
    function v(e, t) {
        var n = e.action == "insert"
          , r = t.action == "insert";
        if (n && r)
            o(e.start, t.start) < 0 ? m(t, e, 1) : m(e, t, 1);
        else if (n && !r)
            o(e.start, t.end) >= 0 ? m(e, t, -1) : o(e.start, t.start) <= 0 ? m(t, e, 1) : (m(e, s.fromPoints(t.start, e.start), -1),
            m(t, e, 1));
        else if (!n && r)
            o(t.start, e.end) >= 0 ? m(t, e, -1) : o(t.start, e.start) <= 0 ? m(e, t, 1) : (m(t, s.fromPoints(e.start, t.start), -1),
            m(e, t, 1));
        else if (!n && !r)
            if (o(t.start, e.end) >= 0)
                m(t, e, -1);
            else {
                if (!(o(t.end, e.start) <= 0)) {
                    var i, u;
                    return o(e.start, t.start) < 0 && (i = e,
                    e = y(e, t.start)),
                    o(e.end, t.end) > 0 && (u = y(e, t.end)),
                    g(t.end, e.start, e.end, -1),
                    u && !i && (e.lines = u.lines,
                    e.start = u.start,
                    e.end = u.end,
                    u = e),
                    [t, i, u].filter(Boolean)
                }
                m(e, t, -1)
            }
        return [t, e]
    }
    function m(e, t, n) {
        g(e.start, t.start, t.end, n),
        g(e.end, t.start, t.end, n)
    }
    function g(e, t, n, r) {
        e.row == (r == 1 ? t : n).row && (e.column += r * (n.column - t.column)),
        e.row += r * (n.row - t.row)
    }
    function y(e, t) {
        var n = e.lines
          , r = e.end;
        e.end = f(t);
        var i = e.end.row - e.start.row
          , s = n.splice(i, n.length)
          , o = i ? t.column : t.column - e.start.column;
        n.push(s[0].substring(0, o)),
        s[0] = s[0].substr(o);
        var u = {
            start: f(t),
            end: r,
            lines: s,
            action: e.action
        };
        return u
    }
    function b(e, t) {
        t = l(t);
        for (var n = e.length; n--; ) {
            var r = e[n];
            for (var i = 0; i < r.length; i++) {
                var s = r[i]
                  , o = v(s, t);
                t = o[0],
                o.length != 2 && (o[2] ? (r.splice(i + 1, 1, o[1], o[2]),
                i++) : o[1] || (r.splice(i, 1),
                i--))
            }
            r.length || e.splice(n, 1)
        }
        return e
    }
    function w(e, t) {
        for (var n = 0; n < t.length; n++) {
            var r = t[n];
            for (var i = 0; i < r.length; i++)
                b(e, r[i])
        }
    }
    var r = function() {
        this.$maxRev = 0,
        this.$fromUndo = !1,
        this.reset()
    };
    (function() {
        this.addSession = function(e) {
            this.$session = e
        }
        ,
        this.add = function(e, t, n) {
            if (this.$fromUndo)
                return;
            if (e == this.$lastDelta)
                return;
            this.$keepRedoStack || (this.$redoStack.length = 0);
            if (t === !1 || !this.lastDeltas)
                this.lastDeltas = [],
                this.$undoStack.push(this.lastDeltas),
                e.id = this.$rev = ++this.$maxRev;
            if (e.action == "remove" || e.action == "insert")
                this.$lastDelta = e;
            this.lastDeltas.push(e)
        }
        ,
        this.addSelection = function(e, t) {
            this.selections.push({
                value: e,
                rev: t || this.$rev
            })
        }
        ,
        this.startNewGroup = function() {
            return this.lastDeltas = null,
            this.$rev
        }
        ,
        this.markIgnored = function(e, t) {
            t == null && (t = this.$rev + 1);
            var n = this.$undoStack;
            for (var r = n.length; r--; ) {
                var i = n[r][0];
                if (i.id <= e)
                    break;
                i.id < t && (i.ignore = !0)
            }
            this.lastDeltas = null
        }
        ,
        this.getSelection = function(e, t) {
            var n = this.selections;
            for (var r = n.length; r--; ) {
                var i = n[r];
                if (i.rev < e)
                    return t && (i = n[r + 1]),
                    i
            }
        }
        ,
        this.getRevision = function() {
            return this.$rev
        }
        ,
        this.getDeltas = function(e, t) {
            t == null && (t = this.$rev + 1);
            var n = this.$undoStack
              , r = null
              , i = 0;
            for (var s = n.length; s--; ) {
                var o = n[s][0];
                o.id < t && !r && (r = s + 1);
                if (o.id <= e) {
                    i = s + 1;
                    break
                }
            }
            return n.slice(i, r)
        }
        ,
        this.getChangedRanges = function(e, t) {
            t == null && (t = this.$rev + 1)
        }
        ,
        this.getChangedLines = function(e, t) {
            t == null && (t = this.$rev + 1)
        }
        ,
        this.undo = function(e, t) {
            this.lastDeltas = null;
            var n = this.$undoStack;
            if (!i(n, n.length))
                return;
            e || (e = this.$session),
            this.$redoStackBaseRev !== this.$rev && this.$redoStack.length && (this.$redoStack = []),
            this.$fromUndo = !0;
            var r = n.pop()
              , s = null;
            return r && (s = e.undoChanges(r, t),
            this.$redoStack.push(r),
            this.$syncRev()),
            this.$fromUndo = !1,
            s
        }
        ,
        this.redo = function(e, t) {
            this.lastDeltas = null,
            e || (e = this.$session),
            this.$fromUndo = !0;
            if (this.$redoStackBaseRev != this.$rev) {
                var n = this.getDeltas(this.$redoStackBaseRev, this.$rev + 1);
                w(this.$redoStack, n),
                this.$redoStackBaseRev = this.$rev,
                this.$redoStack.forEach(function(e) {
                    e[0].id = ++this.$maxRev
                }, this)
            }
            var r = this.$redoStack.pop()
              , i = null;
            return r && (i = e.redoChanges(r, t),
            this.$undoStack.push(r),
            this.$syncRev()),
            this.$fromUndo = !1,
            i
        }
        ,
        this.$syncRev = function() {
            var e = this.$undoStack
              , t = e[e.length - 1]
              , n = t && t[0].id || 0;
            this.$redoStackBaseRev = n,
            this.$rev = n
        }
        ,
        this.reset = function() {
            this.lastDeltas = null,
            this.$lastDelta = null,
            this.$undoStack = [],
            this.$redoStack = [],
            this.$rev = 0,
            this.mark = 0,
            this.$redoStackBaseRev = this.$rev,
            this.selections = []
        }
        ,
        this.canUndo = function() {
            return this.$undoStack.length > 0
        }
        ,
        this.canRedo = function() {
            return this.$redoStack.length > 0
        }
        ,
        this.bookmark = function(e) {
            e == undefined && (e = this.$rev),
            this.mark = e
        }
        ,
        this.isAtBookmark = function() {
            return this.$rev === this.mark
        }
        ,
        this.toJSON = function() {}
        ,
        this.fromJSON = function() {}
        ,
        this.hasUndo = this.canUndo,
        this.hasRedo = this.canRedo,
        this.isClean = this.isAtBookmark,
        this.markClean = this.bookmark,
        this.$prettyPrint = function(e) {
            return e ? c(e) : c(this.$undoStack) + "\n---\n" + c(this.$redoStack)
        }
    }
    ).call(r.prototype);
    var s = e("./range").Range
      , o = s.comparePoints
      , u = s.comparePoints;
    t.UndoManager = r
}),
define("ace/layer/lines", ["require", "exports", "module", "ace/lib/dom"], function(e, t, n) {
    "use strict";
    var r = e("../lib/dom")
      , i = function(e, t) {
        this.element = e,
        this.canvasHeight = t || 5e5,
        this.element.style.height = this.canvasHeight * 2 + "px",
        this.cells = [],
        this.cellCache = [],
        this.$offsetCoefficient = 0
    };
    (function() {
        this.moveContainer = function(e) {
            r.translate(this.element, 0, -(e.firstRowScreen * e.lineHeight % this.canvasHeight) - e.offset * this.$offsetCoefficient)
        }
        ,
        this.pageChanged = function(e, t) {
            return Math.floor(e.firstRowScreen * e.lineHeight / this.canvasHeight) !== Math.floor(t.firstRowScreen * t.lineHeight / this.canvasHeight)
        }
        ,
        this.computeLineTop = function(e, t, n) {
            var r = t.firstRowScreen * t.lineHeight
              , i = Math.floor(r / this.canvasHeight)
              , s = n.documentToScreenRow(e, 0) * t.lineHeight;
            return s - i * this.canvasHeight
        }
        ,
        this.computeLineHeight = function(e, t, n) {
            return t.lineHeight * n.getRowLineCount(e)
        }
        ,
        this.getLength = function() {
            return this.cells.length
        }
        ,
        this.get = function(e) {
            return this.cells[e]
        }
        ,
        this.shift = function() {
            this.$cacheCell(this.cells.shift())
        }
        ,
        this.pop = function() {
            this.$cacheCell(this.cells.pop())
        }
        ,
        this.push = function(e) {
            if (Array.isArray(e)) {
                this.cells.push.apply(this.cells, e);
                var t = r.createFragment(this.element);
                for (var n = 0; n < e.length; n++)
                    t.appendChild(e[n].element);
                this.element.appendChild(t)
            } else
                this.cells.push(e),
                this.element.appendChild(e.element)
        }
        ,
        this.unshift = function(e) {
            if (Array.isArray(e)) {
                this.cells.unshift.apply(this.cells, e);
                var t = r.createFragment(this.element);
                for (var n = 0; n < e.length; n++)
                    t.appendChild(e[n].element);
                this.element.firstChild ? this.element.insertBefore(t, this.element.firstChild) : this.element.appendChild(t)
            } else
                this.cells.unshift(e),
                this.element.insertAdjacentElement("afterbegin", e.element)
        }
        ,
        this.last = function() {
            return this.cells.length ? this.cells[this.cells.length - 1] : null
        }
        ,
        this.$cacheCell = function(e) {
            if (!e)
                return;
            e.element.remove(),
            this.cellCache.push(e)
        }
        ,
        this.createCell = function(e, t, n, i) {
            var s = this.cellCache.pop();
            if (!s) {
                var o = r.createElement("div");
                i && i(o),
                this.element.appendChild(o),
                s = {
                    element: o,
                    text: "",
                    row: e
                }
            }
            return s.row = e,
            s
        }
    }
    ).call(i.prototype),
    t.Lines = i
}),
define("ace/layer/gutter", ["require", "exports", "module", "ace/lib/dom", "ace/lib/oop", "ace/lib/lang", "ace/lib/event_emitter", "ace/layer/lines"], function(e, t, n) {
    "use strict";
    function f(e) {
        var t = document.createTextNode("");
        e.appendChild(t);
        var n = r.createElement("span");
        return e.appendChild(n),
        e
    }
    var r = e("../lib/dom")
      , i = e("../lib/oop")
      , s = e("../lib/lang")
      , o = e("../lib/event_emitter").EventEmitter
      , u = e("./lines").Lines
      , a = function(e) {
        this.element = r.createElement("div"),
        this.element.className = "ace_layer ace_gutter-layer",
        e.appendChild(this.element),
        this.setShowFoldWidgets(this.$showFoldWidgets),
        this.gutterWidth = 0,
        this.$annotations = [],
        this.$updateAnnotations = this.$updateAnnotations.bind(this),
        this.$lines = new u(this.element),
        this.$lines.$offsetCoefficient = 1
    };
    (function() {
        i.implement(this, o),
        this.setSession = function(e) {
            this.session && this.session.removeEventListener("change", this.$updateAnnotations),
            this.session = e,
            e && e.on("change", this.$updateAnnotations)
        }
        ,
        this.addGutterDecoration = function(e, t) {
            window.console && console.warn && console.warn("deprecated use session.addGutterDecoration"),
            this.session.addGutterDecoration(e, t)
        }
        ,
        this.removeGutterDecoration = function(e, t) {
            window.console && console.warn && console.warn("deprecated use session.removeGutterDecoration"),
            this.session.removeGutterDecoration(e, t)
        }
        ,
        this.setAnnotations = function(e) {
            this.$annotations = [];
            for (var t = 0; t < e.length; t++) {
                var n = e[t]
                  , r = n.row
                  , i = this.$annotations[r];
                i || (i = this.$annotations[r] = {
                    text: []
                });
                var o = n.text;
                o = o ? s.escapeHTML(o) : n.html || "",
                i.text.indexOf(o) === -1 && i.text.push(o);
                var u = n.type;
                u == "error" ? i.className = " ace_error" : u == "warning" && i.className != " ace_error" ? i.className = " ace_warning" : u == "info" && !i.className && (i.className = " ace_info")
            }
        }
        ,
        this.$updateAnnotations = function(e) {
            if (!this.$annotations.length)
                return;
            var t = e.start.row
              , n = e.end.row - t;
            if (n !== 0)
                if (e.action == "remove")
                    this.$annotations.splice(t, n + 1, null);
                else {
                    var r = new Array(n + 1);
                    r.unshift(t, 1),
                    this.$annotations.splice.apply(this.$annotations, r)
                }
        }
        ,
        this.update = function(e) {
            this.config = e;
            var t = this.session
              , n = e.firstRow
              , r = Math.min(e.lastRow + e.gutterOffset, t.getLength() - 1);
            this.oldLastRow = r,
            this.config = e,
            this.$lines.moveContainer(e),
            this.$updateCursorRow();
            var i = t.getNextFoldLine(n)
              , s = i ? i.start.row : Infinity
              , o = null
              , u = -1
              , a = n;
            for (; ; ) {
                a > s && (a = i.end.row + 1,
                i = t.getNextFoldLine(a, i),
                s = i ? i.start.row : Infinity);
                if (a > r) {
                    while (this.$lines.getLength() > u + 1)
                        this.$lines.pop();
                    break
                }
                o = this.$lines.get(++u),
                o ? o.row = a : (o = this.$lines.createCell(a, e, this.session, f),
                this.$lines.push(o)),
                this.$renderCell(o, e, i, a),
                a++
            }
            this._signal("afterRender"),
            this.$updateGutterWidth(e)
        }
        ,
        this.$updateGutterWidth = function(e) {
            var t = this.session
              , n = t.gutterRenderer || this.$renderer
              , r = t.$firstLineNumber
              , i = this.$lines.last() ? this.$lines.last().text : "";
            if (this.$fixedWidth || t.$useWrapMode)
                i = t.getLength() + r - 1;
            var s = n ? n.getWidth(t, i, e) : i.toString().length * e.characterWidth
              , o = this.$padding || this.$computePadding();
            s += o.left + o.right,
            s !== this.gutterWidth && !isNaN(s) && (this.gutterWidth = s,
            this.element.parentNode.style.width = this.element.style.width = Math.ceil(this.gutterWidth) + "px",
            this._signal("changeGutterWidth", s))
        }
        ,
        this.$updateCursorRow = function() {
            if (!this.$highlightGutterLine)
                return;
            var e = this.session.selection.getCursor();
            if (this.$cursorRow === e.row)
                return;
            this.$cursorRow = e.row
        }
        ,
        this.updateLineHighlight = function() {
            if (!this.$highlightGutterLine)
                return;
            var e = this.session.selection.cursor.row;
            this.$cursorRow = e;
            if (this.$cursorCell && this.$cursorCell.row == e)
                return;
            this.$cursorCell && (this.$cursorCell.element.className = this.$cursorCell.element.className.replace("ace_gutter-active-line ", ""));
            var t = this.$lines.cells;
            this.$cursorCell = null;
            for (var n = 0; n < t.length; n++) {
                var r = t[n];
                if (r.row >= this.$cursorRow) {
                    if (r.row > this.$cursorRow) {
                        var i = this.session.getFoldLine(this.$cursorRow);
                        if (!(n > 0 && i && i.start.row == t[n - 1].row))
                            break;
                        r = t[n - 1]
                    }
                    r.element.className = "ace_gutter-active-line " + r.element.className,
                    this.$cursorCell = r;
                    break
                }
            }
        }
        ,
        this.scrollLines = function(e) {
            var t = this.config;
            this.config = e,
            this.$updateCursorRow();
            if (this.$lines.pageChanged(t, e))
                return this.update(e);
            this.$lines.moveContainer(e);
            var n = Math.min(e.lastRow + e.gutterOffset, this.session.getLength() - 1)
              , r = this.oldLastRow;
            this.oldLastRow = n;
            if (!t || r < e.firstRow)
                return this.update(e);
            if (n < t.firstRow)
                return this.update(e);
            if (t.firstRow < e.firstRow)
                for (var i = this.session.getFoldedRowCount(t.firstRow, e.firstRow - 1); i > 0; i--)
                    this.$lines.shift();
            if (r > n)
                for (var i = this.session.getFoldedRowCount(n + 1, r); i > 0; i--)
                    this.$lines.pop();
            e.firstRow < t.firstRow && this.$lines.unshift(this.$renderLines(e, e.firstRow, t.firstRow - 1)),
            n > r && this.$lines.push(this.$renderLines(e, r + 1, n)),
            this.updateLineHighlight(),
            this._signal("afterRender"),
            this.$updateGutterWidth(e)
        }
        ,
        this.$renderLines = function(e, t, n) {
            var r = []
              , i = t
              , s = this.session.getNextFoldLine(i)
              , o = s ? s.start.row : Infinity;
            for (; ; ) {
                i > o && (i = s.end.row + 1,
                s = this.session.getNextFoldLine(i, s),
                o = s ? s.start.row : Infinity);
                if (i > n)
                    break;
                var u = this.$lines.createCell(i, e, this.session, f);
                this.$renderCell(u, e, s, i),
                r.push(u),
                i++
            }
            return r
        }
        ,
        this.$renderCell = function(e, t, n, i) {
            var s = e.element
              , o = this.session
              , u = s.childNodes[0]
              , a = s.childNodes[1]
              , f = o.$firstLineNumber
              , l = o.$breakpoints
              , c = o.$decorations
              , h = o.gutterRenderer || this.$renderer
              , p = this.$showFoldWidgets && o.foldWidgets
              , d = n ? n.start.row : Number.MAX_VALUE
              , v = "ace_gutter-cell ";
            this.$highlightGutterLine && (i == this.$cursorRow || n && i < this.$cursorRow && i >= d && this.$cursorRow <= n.end.row) && (v += "ace_gutter-active-line ",
            this.$cursorCell != e && (this.$cursorCell && (this.$cursorCell.element.className = this.$cursorCell.element.className.replace("ace_gutter-active-line ", "")),
            this.$cursorCell = e)),
            l[i] && (v += l[i]),
            c[i] && (v += c[i]),
            this.$annotations[i] && (v += this.$annotations[i].className),
            s.className != v && (s.className = v);
            if (p) {
                var m = p[i];
                m == null && (m = p[i] = o.getFoldWidget(i))
            }
            if (m) {
                var v = "ace_fold-widget ace_" + m;
                m == "start" && i == d && i < n.end.row ? v += " ace_closed" : v += " ace_open",
                a.className != v && (a.className = v);
                var g = t.lineHeight + "px";
                r.setStyle(a.style, "height", g),
                r.setStyle(a.style, "display", "inline-block")
            } else
                a && r.setStyle(a.style, "display", "none");
            var y = (h ? h.getText(o, i) : i + f).toString();
            return y !== u.data && (u.data = y),
            r.setStyle(e.element.style, "height", this.$lines.computeLineHeight(i, t, o) + "px"),
            r.setStyle(e.element.style, "top", this.$lines.computeLineTop(i, t, o) + "px"),
            e.text = y,
            e
        }
        ,
        this.$fixedWidth = !1,
        this.$highlightGutterLine = !0,
        this.$renderer = "",
        this.setHighlightGutterLine = function(e) {
            this.$highlightGutterLine = e
        }
        ,
        this.$showLineNumbers = !0,
        this.$renderer = "",
        this.setShowLineNumbers = function(e) {
            this.$renderer = !e && {
                getWidth: function() {
                    return 0
                },
                getText: function() {
                    return ""
                }
            }
        }
        ,
        this.getShowLineNumbers = function() {
            return this.$showLineNumbers
        }
        ,
        this.$showFoldWidgets = !0,
        this.setShowFoldWidgets = function(e) {
            e ? r.addCssClass(this.element, "ace_folding-enabled") : r.removeCssClass(this.element, "ace_folding-enabled"),
            this.$showFoldWidgets = e,
            this.$padding = null
        }
        ,
        this.getShowFoldWidgets = function() {
            return this.$showFoldWidgets
        }
        ,
        this.$computePadding = function() {
            if (!this.element.firstChild)
                return {
                    left: 0,
                    right: 0
                };
            var e = r.computedStyle(this.element.firstChild);
            return this.$padding = {},
            this.$padding.left = (parseInt(e.borderLeftWidth) || 0) + (parseInt(e.paddingLeft) || 0) + 1,
            this.$padding.right = (parseInt(e.borderRightWidth) || 0) + (parseInt(e.paddingRight) || 0),
            this.$padding
        }
        ,
        this.getRegion = function(e) {
            var t = this.$padding || this.$computePadding()
              , n = this.element.getBoundingClientRect();
            if (e.x < t.left + n.left)
                return "markers";
            if (this.$showFoldWidgets && e.x > n.right - t.right)
                return "foldWidgets"
        }
    }
    ).call(a.prototype),
    t.Gutter = a
}),
define("ace/layer/marker", ["require", "exports", "module", "ace/range", "ace/lib/dom"], function(e, t, n) {
    "use strict";
    var r = e("../range").Range
      , i = e("../lib/dom")
      , s = function(e) {
        this.element = i.createElement("div"),
        this.element.className = "ace_layer ace_marker-layer",
        e.appendChild(this.element)
    };
    (function() {
        function e(e, t, n, r) {
            return (e ? 1 : 0) | (t ? 2 : 0) | (n ? 4 : 0) | (r ? 8 : 0)
        }
        this.$padding = 0,
        this.setPadding = function(e) {
            this.$padding = e
        }
        ,
        this.setSession = function(e) {
            this.session = e
        }
        ,
        this.setMarkers = function(e) {
            this.markers = e
        }
        ,
        this.elt = function(e, t) {
            var n = this.i != -1 && this.element.childNodes[this.i];
            n ? this.i++ : (n = document.createElement("div"),
            this.element.appendChild(n),
            this.i = -1),
            n.style.cssText = t,
            n.className = e
        }
        ,
        this.update = function(e) {
            if (!e)
                return;
            this.config = e,
            this.i = 0;
            var t;
            for (var n in this.markers) {
                var r = this.markers[n];
                if (!r.range) {
                    r.update(t, this, this.session, e);
                    continue
                }
                var i = r.range.clipRows(e.firstRow, e.lastRow);
                if (i.isEmpty())
                    continue;
                i = i.toScreenRange(this.session);
                if (r.renderer) {
                    var s = this.$getTop(i.start.row, e)
                      , o = this.$padding + i.start.column * e.characterWidth;
                    r.renderer(t, i, o, s, e)
                } else
                    r.type == "fullLine" ? this.drawFullLineMarker(t, i, r.clazz, e) : r.type == "screenLine" ? this.drawScreenLineMarker(t, i, r.clazz, e) : i.isMultiLine() ? r.type == "text" ? this.drawTextMarker(t, i, r.clazz, e) : this.drawMultiLineMarker(t, i, r.clazz, e) : this.drawSingleLineMarker(t, i, r.clazz + " ace_start" + " ace_br15", e)
            }
            if (this.i != -1)
                while (this.i < this.element.childElementCount)
                    this.element.removeChild(this.element.lastChild)
        }
        ,
        this.$getTop = function(e, t) {
            return (e - t.firstRowScreen) * t.lineHeight
        }
        ,
        this.drawTextMarker = function(t, n, i, s, o) {
            var u = this.session
              , a = n.start.row
              , f = n.end.row
              , l = a
              , c = 0
              , h = 0
              , p = u.getScreenLastRowColumn(l)
              , d = new r(l,n.start.column,l,h);
            for (; l <= f; l++)
                d.start.row = d.end.row = l,
                d.start.column = l == a ? n.start.column : u.getRowWrapIndent(l),
                d.end.column = p,
                c = h,
                h = p,
                p = l + 1 < f ? u.getScreenLastRowColumn(l + 1) : l == f ? 0 : n.end.column,
                this.drawSingleLineMarker(t, d, i + (l == a ? " ace_start" : "") + " ace_br" + e(l == a || l == a + 1 && n.start.column, c < h, h > p, l == f), s, l == f ? 0 : 1, o)
        }
        ,
        this.drawMultiLineMarker = function(e, t, n, r, i) {
            var s = this.$padding
              , o = r.lineHeight
              , u = this.$getTop(t.start.row, r)
              , a = s + t.start.column * r.characterWidth;
            i = i || "";
            if (this.session.$bidiHandler.isBidiRow(t.start.row)) {
                var f = t.clone();
                f.end.row = f.start.row,
                f.end.column = this.session.getLine(f.start.row).length,
                this.drawBidiSingleLineMarker(e, f, n + " ace_br1 ace_start", r, null, i)
            } else
                this.elt(n + " ace_br1 ace_start", "height:" + o + "px;" + "right:0;" + "top:" + u + "px;left:" + a + "px;" + (i || ""));
            if (this.session.$bidiHandler.isBidiRow(t.end.row)) {
                var f = t.clone();
                f.start.row = f.end.row,
                f.start.column = 0,
                this.drawBidiSingleLineMarker(e, f, n + " ace_br12", r, null, i)
            } else {
                u = this.$getTop(t.end.row, r);
                var l = t.end.column * r.characterWidth;
                this.elt(n + " ace_br12", "height:" + o + "px;" + "width:" + l + "px;" + "top:" + u + "px;" + "left:" + s + "px;" + (i || ""))
            }
            o = (t.end.row - t.start.row - 1) * r.lineHeight;
            if (o <= 0)
                return;
            u = this.$getTop(t.start.row + 1, r);
            var c = (t.start.column ? 1 : 0) | (t.end.column ? 0 : 8);
            this.elt(n + (c ? " ace_br" + c : ""), "height:" + o + "px;" + "right:0;" + "top:" + u + "px;" + "left:" + s + "px;" + (i || ""))
        }
        ,
        this.drawSingleLineMarker = function(e, t, n, r, i, s) {
            if (this.session.$bidiHandler.isBidiRow(t.start.row))
                return this.drawBidiSingleLineMarker(e, t, n, r, i, s);
            var o = r.lineHeight
              , u = (t.end.column + (i || 0) - t.start.column) * r.characterWidth
              , a = this.$getTop(t.start.row, r)
              , f = this.$padding + t.start.column * r.characterWidth;
            this.elt(n, "height:" + o + "px;" + "width:" + u + "px;" + "top:" + a + "px;" + "left:" + f + "px;" + (s || ""))
        }
        ,
        this.drawBidiSingleLineMarker = function(e, t, n, r, i, s) {
            var o = r.lineHeight
              , u = this.$getTop(t.start.row, r)
              , a = this.$padding
              , f = this.session.$bidiHandler.getSelections(t.start.column, t.end.column);
            f.forEach(function(e) {
                this.elt(n, "height:" + o + "px;" + "width:" + e.width + (i || 0) + "px;" + "top:" + u + "px;" + "left:" + (a + e.left) + "px;" + (s || ""))
            }, this)
        }
        ,
        this.drawFullLineMarker = function(e, t, n, r, i) {
            var s = this.$getTop(t.start.row, r)
              , o = r.lineHeight;
            t.start.row != t.end.row && (o += this.$getTop(t.end.row, r) - s),
            this.elt(n, "height:" + o + "px;" + "top:" + s + "px;" + "left:0;right:0;" + (i || ""))
        }
        ,
        this.drawScreenLineMarker = function(e, t, n, r, i) {
            var s = this.$getTop(t.start.row, r)
              , o = r.lineHeight;
            this.elt(n, "height:" + o + "px;" + "top:" + s + "px;" + "left:0;right:0;" + (i || ""))
        }
    }
    ).call(s.prototype),
    t.Marker = s
}),
define("ace/layer/text", ["require", "exports", "module", "ace/lib/oop", "ace/lib/dom", "ace/lib/lang", "ace/layer/lines", "ace/lib/event_emitter"], function(e, t, n) {
    "use strict";
    var r = e("../lib/oop")
      , i = e("../lib/dom")
      , s = e("../lib/lang")
      , o = e("./lines").Lines
      , u = e("../lib/event_emitter").EventEmitter
      , a = function(e) {
        this.dom = i,
        this.element = this.dom.createElement("div"),
        this.element.className = "ace_layer ace_text-layer",
        e.appendChild(this.element),
        this.$updateEolChar = this.$updateEolChar.bind(this),
        this.$lines = new o(this.element)
    };
    (function() {
        r.implement(this, u),
        this.EOF_CHAR = "\u00b6",
        this.EOL_CHAR_LF = "\u00ac",
        this.EOL_CHAR_CRLF = "\u00a4",
        this.EOL_CHAR = this.EOL_CHAR_LF,
        this.TAB_CHAR = "\u2014",
        this.SPACE_CHAR = "\u00b7",
        this.$padding = 0,
        this.MAX_LINE_LENGTH = 1e4,
        this.$updateEolChar = function() {
            var e = this.session.doc
              , t = e.getNewLineCharacter() == "\n" && e.getNewLineMode() != "windows"
              , n = t ? this.EOL_CHAR_LF : this.EOL_CHAR_CRLF;
            if (this.EOL_CHAR != n)
                return this.EOL_CHAR = n,
                !0
        }
        ,
        this.setPadding = function(e) {
            this.$padding = e,
            this.element.style.margin = "0 " + e + "px"
        }
        ,
        this.getLineHeight = function() {
            return this.$fontMetrics.$characterSize.height || 0
        }
        ,
        this.getCharacterWidth = function() {
            return this.$fontMetrics.$characterSize.width || 0
        }
        ,
        this.$setFontMetrics = function(e) {
            this.$fontMetrics = e,
            this.$fontMetrics.on("changeCharacterSize", function(e) {
                this._signal("changeCharacterSize", e)
            }
            .bind(this)),
            this.$pollSizeChanges()
        }
        ,
        this.checkForSizeChanges = function() {
            this.$fontMetrics.checkForSizeChanges()
        }
        ,
        this.$pollSizeChanges = function() {
            return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges()
        }
        ,
        this.setSession = function(e) {
            this.session = e,
            e && this.$computeTabString()
        }
        ,
        this.showInvisibles = !1,
        this.showSpaces = !1,
        this.showTabs = !1,
        this.showEOL = !1,
        this.setShowInvisibles = function(e) {
            return this.showInvisibles == e ? !1 : (this.showInvisibles = e,
            typeof e == "string" ? (this.showSpaces = /tab/i.test(e),
            this.showTabs = /space/i.test(e),
            this.showEOL = /eol/i.test(e)) : this.showSpaces = this.showTabs = this.showEOL = e,
            this.$computeTabString(),
            !0)
        }
        ,
        this.displayIndentGuides = !0,
        this.setDisplayIndentGuides = function(e) {
            return this.displayIndentGuides == e ? !1 : (this.displayIndentGuides = e,
            this.$computeTabString(),
            !0)
        }
        ,
        this.$tabStrings = [],
        this.onChangeTabSize = this.$computeTabString = function() {
            var e = this.session.getTabSize();
            this.tabSize = e;
            var t = this.$tabStrings = [0];
            for (var n = 1; n < e + 1; n++)
                if (this.showTabs) {
                    var r = this.dom.createElement("span");
                    r.className = "ace_invisible ace_invisible_tab",
                    r.textContent = s.stringRepeat(this.TAB_CHAR, n),
                    t.push(r)
                } else
                    t.push(this.dom.createTextNode(s.stringRepeat(" ", n), this.element));
            if (this.displayIndentGuides) {
                this.$indentGuideRe = /\s\S| \t|\t |\s$/;
                var i = "ace_indent-guide"
                  , o = this.showSpaces ? " ace_invisible ace_invisible_space" : ""
                  , u = this.showSpaces ? s.stringRepeat(this.SPACE_CHAR, this.tabSize) : s.stringRepeat(" ", this.tabSize)
                  , a = this.showTabs ? " ace_invisible ace_invisible_tab" : ""
                  , f = this.showTabs ? s.stringRepeat(this.TAB_CHAR, this.tabSize) : u
                  , r = this.dom.createElement("span");
                r.className = i + o,
                r.textContent = u,
                this.$tabStrings[" "] = r;
                var r = this.dom.createElement("span");
                r.className = i + a,
                r.textContent = f,
                this.$tabStrings["	"] = r
            }
        }
        ,
        this.updateLines = function(e, t, n) {
            if (this.config.lastRow != e.lastRow || this.config.firstRow != e.firstRow)
                return this.update(e);
            this.config = e;
            var r = Math.max(t, e.firstRow)
              , i = Math.min(n, e.lastRow)
              , s = this.element.childNodes
              , o = 0;
            for (var u = e.firstRow; u < r; u++) {
                var a = this.session.getFoldLine(u);
                if (a) {
                    if (a.containsRow(r)) {
                        r = a.start.row;
                        break
                    }
                    u = a.end.row
                }
                o++
            }
            var f = !1
              , u = r
              , a = this.session.getNextFoldLine(u)
              , l = a ? a.start.row : Infinity;
            for (; ; ) {
                u > l && (u = a.end.row + 1,
                a = this.session.getNextFoldLine(u, a),
                l = a ? a.start.row : Infinity);
                if (u > i)
                    break;
                var c = s[o++];
                if (c) {
                    this.dom.removeChildren(c),
                    this.$renderLine(c, u, u == l ? a : !1),
                    f && (c.style.top = this.$lines.computeLineTop(u, e, this.session) + "px");
                    var h = e.lineHeight * this.session.getRowLength(u) + "px";
                    c.style.height != h && (f = !0,
                    c.style.height = h)
                }
                u++
            }
            if (f)
                while (o < this.$lines.cells.length) {
                    var p = this.$lines.cells[o++];
                    p.element.style.top = this.$lines.computeLineTop(p.row, e, this.session) + "px"
                }
        }
        ,
        this.scrollLines = function(e) {
            var t = this.config;
            this.config = e;
            if (this.$lines.pageChanged(t, e))
                return this.update(e);
            this.$lines.moveContainer(e);
            var n = e.lastRow
              , r = t ? t.lastRow : -1;
            if (!t || r < e.firstRow)
                return this.update(e);
            if (n < t.firstRow)
                return this.update(e);
            if (!t || t.lastRow < e.firstRow)
                return this.update(e);
            if (e.lastRow < t.firstRow)
                return this.update(e);
            if (t.firstRow < e.firstRow)
                for (var i = this.session.getFoldedRowCount(t.firstRow, e.firstRow - 1); i > 0; i--)
                    this.$lines.shift();
            if (t.lastRow > e.lastRow)
                for (var i = this.session.getFoldedRowCount(e.lastRow + 1, t.lastRow); i > 0; i--)
                    this.$lines.pop();
            e.firstRow < t.firstRow && this.$lines.unshift(this.$renderLinesFragment(e, e.firstRow, t.firstRow - 1)),
            e.lastRow > t.lastRow && this.$lines.push(this.$renderLinesFragment(e, t.lastRow + 1, e.lastRow))
        }
        ,
        this.$renderLinesFragment = function(e, t, n) {
            var r = []
              , s = t
              , o = this.session.getNextFoldLine(s)
              , u = o ? o.start.row : Infinity;
            for (; ; ) {
                s > u && (s = o.end.row + 1,
                o = this.session.getNextFoldLine(s, o),
                u = o ? o.start.row : Infinity);
                if (s > n)
                    break;
                var a = this.$lines.createCell(s, e, this.session)
                  , f = a.element;
                this.dom.removeChildren(f),
                i.setStyle(f.style, "height", this.$lines.computeLineHeight(s, e, this.session) + "px"),
                i.setStyle(f.style, "top", this.$lines.computeLineTop(s, e, this.session) + "px"),
                this.$renderLine(f, s, s == u ? o : !1),
                this.$useLineGroups() ? f.className = "ace_line_group" : f.className = "ace_line",
                r.push(a),
                s++
            }
            return r
        }
        ,
        this.update = function(e) {
            this.$lines.moveContainer(e),
            this.config = e;
            var t = e.firstRow
              , n = e.lastRow
              , r = this.$lines;
            while (r.getLength())
                r.pop();
            r.push(this.$renderLinesFragment(e, t, n))
        }
        ,
        this.$textToken = {
            text: !0,
            rparen: !0,
            lparen: !0
        },
        this.$renderToken = function(e, t, n, r) {
            var i = this, o = /(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g, u = this.dom.createFragment(this.element), a, f = 0;
            while (a = o.exec(r)) {
                var l = a[1]
                  , c = a[2]
                  , h = a[3]
                  , p = a[4]
                  , d = a[5];
                if (!i.showSpaces && c)
                    continue;
                var v = f != a.index ? r.slice(f, a.index) : "";
                f = a.index + a[0].length,
                v && u.appendChild(this.dom.createTextNode(v, this.element));
                if (l) {
                    var m = i.session.getScreenTabSize(t + a.index);
                    u.appendChild(i.$tabStrings[m].cloneNode(!0)),
                    t += m - 1
                } else if (c)
                    if (i.showSpaces) {
                        var g = this.dom.createElement("span");
                        g.className = "ace_invisible ace_invisible_space",
                        g.textContent = s.stringRepeat(i.SPACE_CHAR, c.length),
                        u.appendChild(g)
                    } else
                        u.appendChild(this.com.createTextNode(c, this.element));
                else if (h) {
                    var g = this.dom.createElement("span");
                    g.className = "ace_invisible ace_invisible_space ace_invalid",
                    g.textContent = s.stringRepeat(i.SPACE_CHAR, h.length),
                    u.appendChild(g)
                } else if (p) {
                    t += 1;
                    var g = this.dom.createElement("span");
                    g.style.width = i.config.characterWidth * 2 + "px",
                    g.className = i.showSpaces ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk",
                    g.textContent = i.showSpaces ? i.SPACE_CHAR : p,
                    u.appendChild(g)
                } else if (d) {
                    t += 1;
                    var g = this.dom.createElement("span");
                    g.style.width = i.config.characterWidth * 2 + "px",
                    g.className = "ace_cjk",
                    g.textContent = d,
                    u.appendChild(g)
                }
            }
            u.appendChild(this.dom.createTextNode(f ? r.slice(f) : r, this.element));
            if (!this.$textToken[n.type]) {
                var y = "ace_" + n.type.replace(/\./g, " ace_")
                  , g = this.dom.createElement("span");
                n.type == "fold" && (g.style.width = n.value.length * this.config.characterWidth + "px"),
                g.className = y,
                g.appendChild(u),
                e.appendChild(g)
            } else
                e.appendChild(u);
            return t + r.length
        }
        ,
        this.renderIndentGuide = function(e, t, n) {
            var r = t.search(this.$indentGuideRe);
            if (r <= 0 || r >= n)
                return t;
            if (t[0] == " ") {
                r -= r % this.tabSize;
                var i = r / this.tabSize;
                for (var s = 0; s < i; s++)
                    e.appendChild(this.$tabStrings[" "].cloneNode(!0));
                return t.substr(r)
            }
            if (t[0] == "	") {
                for (var s = 0; s < r; s++)
                    e.appendChild(this.$tabStrings["	"].cloneNode(!0));
                return t.substr(r)
            }
            return t
        }
        ,
        this.$createLineElement = function(e) {
            var t = this.dom.createElement("div");
            return t.className = "ace_line",
            t.style.height = this.config.lineHeight + "px",
            t
        }
        ,
        this.$renderWrappedLine = function(e, t, n) {
            var r = 0
              , i = 0
              , o = n[0]
              , u = 0
              , a = this.$createLineElement();
            e.appendChild(a);
            for (var f = 0; f < t.length; f++) {
                var l = t[f]
                  , c = l.value;
                if (f == 0 && this.displayIndentGuides) {
                    r = c.length,
                    c = this.renderIndentGuide(a, c, o);
                    if (!c)
                        continue;
                    r -= c.length
                }
                if (r + c.length < o)
                    u = this.$renderToken(a, u, l, c),
                    r += c.length;
                else {
                    while (r + c.length >= o)
                        u = this.$renderToken(a, u, l, c.substring(0, o - r)),
                        c = c.substring(o - r),
                        r = o,
                        a = this.$createLineElement(),
                        e.appendChild(a),
                        a.appendChild(this.dom.createTextNode(s.stringRepeat("\u00a0", n.indent), this.element)),
                        i++,
                        u = 0,
                        o = n[i] || Number.MAX_VALUE;
                    c.length != 0 && (r += c.length,
                    u = this.$renderToken(a, u, l, c))
                }
            }
            n[n.length - 1] > this.MAX_LINE_LENGTH && this.$renderOverflowMessage(a, u, null, "", !0)
        }
        ,
        this.$renderSimpleLine = function(e, t) {
            var n = 0
              , r = t[0]
              , i = r.value;
            this.displayIndentGuides && (i = this.renderIndentGuide(e, i)),
            i && (n = this.$renderToken(e, n, r, i));
            for (var s = 1; s < t.length; s++) {
                r = t[s],
                i = r.value;
                if (n + i.length > this.MAX_LINE_LENGTH)
                    return this.$renderOverflowMessage(e, n, r, i);
                n = this.$renderToken(e, n, r, i)
            }
        }
        ,
        this.$renderOverflowMessage = function(e, t, n, r, i) {
            n && this.$renderToken(e, t, n, r.slice(0, this.MAX_LINE_LENGTH - t));
            var s = this.dom.createElement("span");
            s.className = "ace_inline_button ace_keyword ace_toggle_wrap",
            s.textContent = i ? "<hide>" : "<click to see more...>",
            e.appendChild(s)
        }
        ,
        this.$renderLine = function(e, t, n) {
            !n && n != 0 && (n = this.session.getFoldLine(t));
            if (n)
                var r = this.$getFoldLineTokens(t, n);
            else
                var r = this.session.getTokens(t);
            var i = e;
            if (r.length) {
                var s = this.session.getRowSplitData(t);
                if (s && s.length) {
                    this.$renderWrappedLine(e, r, s);
                    var i = e.lastChild
                } else {
                    var i = e;
                    this.$useLineGroups() && (i = this.$createLineElement(),
                    e.appendChild(i)),
                    this.$renderSimpleLine(i, r)
                }
            } else
                this.$useLineGroups() && (i = this.$createLineElement(),
                e.appendChild(i));
            if (this.showEOL && i) {
                n && (t = n.end.row);
                var o = this.dom.createElement("span");
                o.className = "ace_invisible ace_invisible_eol",
                o.textContent = t == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR,
                i.appendChild(o)
            }
        }
        ,
        this.$getFoldLineTokens = function(e, t) {
            function i(e, t, n) {
                var i = 0
                  , s = 0;
                while (s + e[i].value.length < t) {
                    s += e[i].value.length,
                    i++;
                    if (i == e.length)
                        return
                }
                if (s != t) {
                    var o = e[i].value.substring(t - s);
                    o.length > n - t && (o = o.substring(0, n - t)),
                    r.push({
                        type: e[i].type,
                        value: o
                    }),
                    s = t + o.length,
                    i += 1
                }
                while (s < n && i < e.length) {
                    var o = e[i].value;
                    o.length + s > n ? r.push({
                        type: e[i].type,
                        value: o.substring(0, n - s)
                    }) : r.push(e[i]),
                    s += o.length,
                    i += 1
                }
            }
            var n = this.session
              , r = []
              , s = n.getTokens(e);
            return t.walk(function(e, t, o, u, a) {
                e != null ? r.push({
                    type: "fold",
                    value: e
                }) : (a && (s = n.getTokens(t)),
                s.length && i(s, u, o))
            }, t.end.row, this.session.getLine(t.end.row).length),
            r
        }
        ,
        this.$useLineGroups = function() {
            return this.session.getUseWrapMode()
        }
        ,
        this.destroy = function() {}
    }
    ).call(a.prototype),
    t.Text = a
}),
define("ace/layer/cursor", ["require", "exports", "module", "ace/lib/dom"], function(e, t, n) {
    "use strict";
    var r = e("../lib/dom")
      , i = function(e) {
        this.element = r.createElement("div"),
        this.element.className = "ace_layer ace_cursor-layer",
        e.appendChild(this.element),
        this.isVisible = !1,
        this.isBlinking = !0,
        this.blinkInterval = 1e3,
        this.smoothBlinking = !1,
        this.cursors = [],
        this.cursor = this.addCursor(),
        r.addCssClass(this.element, "ace_hidden-cursors"),
        this.$updateCursors = this.$updateOpacity.bind(this)
    };
    (function() {
        this.$updateOpacity = function(e) {
            var t = this.cursors;
            for (var n = t.length; n--; )
                r.setStyle(t[n].style, "opacity", e ? "" : "0")
        }
        ,
        this.$startCssAnimation = function() {
            var e = this.cursors;
            for (var t = e.length; t--; )
                e[t].style.animationDuration = this.blinkInterval + "ms";
            setTimeout(function() {
                r.addCssClass(this.element, "ace_animate-blinking")
            }
            .bind(this))
        }
        ,
        this.$stopCssAnimation = function() {
            r.removeCssClass(this.element, "ace_animate-blinking")
        }
        ,
        this.$padding = 0,
        this.setPadding = function(e) {
            this.$padding = e
        }
        ,
        this.setSession = function(e) {
            this.session = e
        }
        ,
        this.setBlinking = function(e) {
            e != this.isBlinking && (this.isBlinking = e,
            this.restartTimer())
        }
        ,
        this.setBlinkInterval = function(e) {
            e != this.blinkInterval && (this.blinkInterval = e,
            this.restartTimer())
        }
        ,
        this.setSmoothBlinking = function(e) {
            e != this.smoothBlinking && (this.smoothBlinking = e,
            r.setCssClass(this.element, "ace_smooth-blinking", e),
            this.$updateCursors(!0),
            this.restartTimer())
        }
        ,
        this.addCursor = function() {
            var e = r.createElement("div");
            return e.className = "ace_cursor",
            this.element.appendChild(e),
            this.cursors.push(e),
            e
        }
        ,
        this.removeCursor = function() {
            if (this.cursors.length > 1) {
                var e = this.cursors.pop();
                return e.parentNode.removeChild(e),
                e
            }
        }
        ,
        this.hideCursor = function() {
            this.isVisible = !1,
            r.addCssClass(this.element, "ace_hidden-cursors"),
            this.restartTimer()
        }
        ,
        this.showCursor = function() {
            this.isVisible = !0,
            r.removeCssClass(this.element, "ace_hidden-cursors"),
            this.restartTimer()
        }
        ,
        this.restartTimer = function() {
            var e = this.$updateCursors;
            clearInterval(this.intervalId),
            clearTimeout(this.timeoutId),
            this.$stopCssAnimation(),
            this.smoothBlinking && r.removeCssClass(this.element, "ace_smooth-blinking"),
            e(!0);
            if (!this.isBlinking || !this.blinkInterval || !this.isVisible) {
                this.$stopCssAnimation();
                return
            }
            this.smoothBlinking && setTimeout(function() {
                r.addCssClass(this.element, "ace_smooth-blinking")
            }
            .bind(this));
            if (r.HAS_CSS_ANIMATION)
                this.$startCssAnimation();
            else {
                var t = function() {
                    this.timeoutId = setTimeout(function() {
                        e(!1)
                    }, .6 * this.blinkInterval)
                }
                .bind(this);
                this.intervalId = setInterval(function() {
                    e(!0),
                    t()
                }, this.blinkInterval),
                t()
            }
        }
        ,
        this.getPixelPosition = function(e, t) {
            if (!this.config || !this.session)
                return {
                    left: 0,
                    top: 0
                };
            e || (e = this.session.selection.getCursor());
            var n = this.session.documentToScreenPosition(e)
              , r = this.$padding + (this.session.$bidiHandler.isBidiRow(n.row, e.row) ? this.session.$bidiHandler.getPosLeft(n.column) : n.column * this.config.characterWidth)
              , i = (n.row - (t ? this.config.firstRowScreen : 0)) * this.config.lineHeight;
            return {
                left: r,
                top: i
            }
        }
        ,
        this.isCursorInView = function(e, t) {
            return e.top >= 0 && e.top < t.maxHeight
        }
        ,
        this.update = function(e) {
            this.config = e;
            var t = this.session.$selectionMarkers
              , n = 0
              , i = 0;
            if (t === undefined || t.length === 0)
                t = [{
                    cursor: null
                }];
            for (var n = 0, s = t.length; n < s; n++) {
                var o = this.getPixelPosition(t[n].cursor, !0);
                if ((o.top > e.height + e.offset || o.top < 0) && n > 1)
                    continue;
                var u = this.cursors[i++] || this.addCursor()
                  , a = u.style;
                this.drawCursor ? this.drawCursor(u, o, e, t[n], this.session) : this.isCursorInView(o, e) ? (r.setStyle(a, "display", "block"),
                r.translate(u, o.left, o.top),
                r.setStyle(a, "width", Math.round(e.characterWidth) + "px"),
                r.setStyle(a, "height", e.lineHeight + "px")) : r.setStyle(a, "display", "none")
            }
            while (this.cursors.length > i)
                this.removeCursor();
            var f = this.session.getOverwrite();
            this.$setOverwrite(f),
            this.$pixelPos = o,
            this.restartTimer()
        }
        ,
        this.drawCursor = null,
        this.$setOverwrite = function(e) {
            e != this.overwrite && (this.overwrite = e,
            e ? r.addCssClass(this.element, "ace_overwrite-cursors") : r.removeCssClass(this.element, "ace_overwrite-cursors"))
        }
        ,
        this.destroy = function() {
            clearInterval(this.intervalId),
            clearTimeout(this.timeoutId)
        }
    }
    ).call(i.prototype),
    t.Cursor = i
}),
define("ace/scrollbar", ["require", "exports", "module", "ace/lib/oop", "ace/lib/dom", "ace/lib/event", "ace/lib/event_emitter"], function(e, t, n) {
    "use strict";
    var r = e("./lib/oop")
      , i = e("./lib/dom")
      , s = e("./lib/event")
      , o = e("./lib/event_emitter").EventEmitter
      , u = 32768
      , a = function(e) {
        this.element = i.createElement("div"),
        this.element.className = "ace_scrollbar ace_scrollbar" + this.classSuffix,
        this.inner = i.createElement("div"),
        this.inner.className = "ace_scrollbar-inner",
        this.inner.textContent = "\u00a0",
        this.element.appendChild(this.inner),
        e.appendChild(this.element),
        this.setVisible(!1),
        this.skipEvent = !1,
        s.addListener(this.element, "scroll", this.onScroll.bind(this)),
        s.addListener(this.element, "mousedown", s.preventDefault)
    };
    (function() {
        r.implement(this, o),
        this.setVisible = function(e) {
            this.element.style.display = e ? "" : "none",
            this.isVisible = e,
            this.coeff = 1
        }
    }
    ).call(a.prototype);
    var f = function(e, t) {
        a.call(this, e),
        this.scrollTop = 0,
        this.scrollHeight = 0,
        t.$scrollbarWidth = this.width = i.scrollbarWidth(e.ownerDocument),
        this.inner.style.width = this.element.style.width = (this.width || 15) + 5 + "px",
        this.$minWidth = 0
    };
    r.inherits(f, a),
    function() {
        this.classSuffix = "-v",
        this.onScroll = function() {
            if (!this.skipEvent) {
                this.scrollTop = this.element.scrollTop;
                if (this.coeff != 1) {
                    var e = this.element.clientHeight / this.scrollHeight;
                    this.scrollTop = this.scrollTop * (1 - e) / (this.coeff - e)
                }
                this._emit("scroll", {
                    data: this.scrollTop
                })
            }
            this.skipEvent = !1
        }
        ,
        this.getWidth = function() {
            return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0)
        }
        ,
        this.setHeight = function(e) {
            this.element.style.height = e + "px"
        }
        ,
        this.setInnerHeight = this.setScrollHeight = function(e) {
            this.scrollHeight = e,
            e > u ? (this.coeff = u / e,
            e = u) : this.coeff != 1 && (this.coeff = 1),
            this.inner.style.height = e + "px"
        }
        ,
        this.setScrollTop = function(e) {
            this.scrollTop != e && (this.skipEvent = !0,
            this.scrollTop = e,
            this.element.scrollTop = e * this.coeff)
        }
    }
    .call(f.prototype);
    var l = function(e, t) {
        a.call(this, e),
        this.scrollLeft = 0,
        this.height = t.$scrollbarWidth,
        this.inner.style.height = this.element.style.height = (this.height || 15) + 5 + "px"
    };
    r.inherits(l, a),
    function() {
        this.classSuffix = "-h",
        this.onScroll = function() {
            this.skipEvent || (this.scrollLeft = this.element.scrollLeft,
            this._emit("scroll", {
                data: this.scrollLeft
            })),
            this.skipEvent = !1
        }
        ,
        this.getHeight = function() {
            return this.isVisible ? this.height : 0
        }
        ,
        this.setWidth = function(e) {
            this.element.style.width = e + "px"
        }
        ,
        this.setInnerWidth = function(e) {
            this.inner.style.width = e + "px"
        }
        ,
        this.setScrollWidth = function(e) {
            this.inner.style.width = e + "px"
        }
        ,
        this.setScrollLeft = function(e) {
            this.scrollLeft != e && (this.skipEvent = !0,
            this.scrollLeft = this.element.scrollLeft = e)
        }
    }
    .call(l.prototype),
    t.ScrollBar = f,
    t.ScrollBarV = f,
    t.ScrollBarH = l,
    t.VScrollBar = f,
    t.HScrollBar = l
}),
define("ace/renderloop", ["require", "exports", "module", "ace/lib/event"], function(e, t, n) {
    "use strict";
    var r = e("./lib/event")
      , i = function(e, t) {
        this.onRender = e,
        this.pending = !1,
        this.changes = 0,
        this.$recursionLimit = 2,
        this.window = t || window;
        var n = this;
        this._flush = function(e) {
            n.pending = !1;
            var t = n.changes;
            t && (r.blockIdle(100),
            n.changes = 0,
            n.onRender(t));
            if (n.changes) {
                if (n.$recursionLimit-- < 0)
                    return;
                n.schedule()
            } else
                n.$recursionLimit = 2
        }
    };
    (function() {
        this.schedule = function(e) {
            this.changes = this.changes | e,
            this.changes && !this.pending && (r.nextFrame(this._flush),
            this.pending = !0)
        }
        ,
        this.clear = function(e) {
            var t = this.changes;
            return this.changes = 0,
            t
        }
    }
    ).call(i.prototype),
    t.RenderLoop = i
}),
define("ace/layer/font_metrics", ["require", "exports", "module", "ace/lib/oop", "ace/lib/dom", "ace/lib/lang", "ace/lib/event", "ace/lib/useragent", "ace/lib/event_emitter"], function(e, t, n) {
    var r = e("../lib/oop")
      , i = e("../lib/dom")
      , s = e("../lib/lang")
      , o = e("../lib/event")
      , u = e("../lib/useragent")
      , a = e("../lib/event_emitter").EventEmitter
      , f = 256
      , l = typeof ResizeObserver == "function"
      , c = 200
      , h = t.FontMetrics = function(e) {
        this.el = i.createElement("div"),
        this.$setMeasureNodeStyles(this.el.style, !0),
        this.$main = i.createElement("div"),
        this.$setMeasureNodeStyles(this.$main.style),
        this.$measureNode = i.createElement("div"),
        this.$setMeasureNodeStyles(this.$measureNode.style),
        this.el.appendChild(this.$main),
        this.el.appendChild(this.$measureNode),
        e.appendChild(this.el),
        this.$measureNode.textContent = s.stringRepeat("X", f),
        this.$characterSize = {
            width: 0,
            height: 0
        },
        l ? this.$addObserver() : this.checkForSizeChanges()
    }
    ;
    (function() {
        r.implement(this, a),
        this.$characterSize = {
            width: 0,
            height: 0
        },
        this.$setMeasureNodeStyles = function(e, t) {
            e.width = e.height = "auto",
            e.left = e.top = "0px",
            e.visibility = "hidden",
            e.position = "absolute",
            e.whiteSpace = "pre",
            u.isIE < 8 ? e["font-family"] = "inherit" : e.font = "inherit",
            e.overflow = t ? "hidden" : "visible"
        }
        ,
        this.checkForSizeChanges = function(e) {
            e === undefined && (e = this.$measureSizes());
            if (e && (this.$characterSize.width !== e.width || this.$characterSize.height !== e.height)) {
                this.$measureNode.style.fontWeight = "bold";
                var t = this.$measureSizes();
                this.$measureNode.style.fontWeight = "",
                this.$characterSize = e,
                this.charSizes = Object.create(null),
                this.allowBoldFonts = t && t.width === e.width && t.height === e.height,
                this._emit("changeCharacterSize", {
                    data: e
                })
            }
        }
        ,
        this.$addObserver = function() {
            var e = this;
            this.$observer = new window.ResizeObserver(function(t) {
                var n = t[0].contentRect;
                e.checkForSizeChanges({
                    height: n.height,
                    width: n.width / f
                })
            }
            ),
            this.$observer.observe(this.$measureNode)
        }
        ,
        this.$pollSizeChanges = function() {
            if (this.$pollSizeChangesTimer || this.$observer)
                return this.$pollSizeChangesTimer;
            var e = this;
            return this.$pollSizeChangesTimer = o.onIdle(function t() {
                e.checkForSizeChanges(),
                o.onIdle(t, 500)
            }, 500)
        }
        ,
        this.setPolling = function(e) {
            e ? this.$pollSizeChanges() : this.$pollSizeChangesTimer && (clearInterval(this.$pollSizeChangesTimer),
            this.$pollSizeChangesTimer = 0)
        }
        ,
        this.$measureSizes = function(e) {
            var t = {
                height: (e || this.$measureNode).clientHeight,
                width: (e || this.$measureNode).clientWidth / f
            };
            return t.width === 0 || t.height === 0 ? null : t
        }
        ,
        this.$measureCharWidth = function(e) {
            this.$main.textContent = s.stringRepeat(e, f);
            var t = this.$main.getBoundingClientRect();
            return t.width / f
        }
        ,
        this.getCharacterWidth = function(e) {
            var t = this.charSizes[e];
            return t === undefined && (t = this.charSizes[e] = this.$measureCharWidth(e) / this.$characterSize.width),
            t
        }
        ,
        this.destroy = function() {
            clearInterval(this.$pollSizeChangesTimer),
            this.$observer && this.$observer.disconnect(),
            this.el && this.el.parentNode && this.el.parentNode.removeChild(this.el)
        }
        ,
        this.$getZoom = function e(t) {
            return t ? (window.getComputedStyle(t).zoom || 1) * e(t.parentElement) : 1
        }
        ,
        this.$initTransformMeasureNodes = function() {
            var e = function(e, t) {
                return ["div", {
                    style: "position: absolute;top:" + e + "px;left:" + t + "px;"
                }]
            };
            this.els = i.buildDom([e(0, 0), e(c, 0), e(0, c), e(c, c)], this.el)
        }
        ,
        this.transformCoordinates = function(e, t) {
            function r(e, t, n) {
                var r = e[1] * t[0] - e[0] * t[1];
                return [(-t[1] * n[0] + t[0] * n[1]) / r, (+e[1] * n[0] - e[0] * n[1]) / r]
            }
            function i(e, t) {
                return [e[0] - t[0], e[1] - t[1]]
            }
            function s(e, t) {
                return [e[0] + t[0], e[1] + t[1]]
            }
            function o(e, t) {
                return [e * t[0], e * t[1]]
            }
            function u(e) {
                var t = e.getBoundingClientRect();
                return [t.left, t.top]
            }
            if (e) {
                var n = this.$getZoom(this.el);
                e = o(1 / n, e)
            }
            this.els || this.$initTransformMeasureNodes();
            var a = u(this.els[0])
              , f = u(this.els[1])
              , l = u(this.els[2])
              , h = u(this.els[3])
              , p = r(i(h, f), i(h, l), i(s(f, l), s(h, a)))
              , d = o(1 + p[0], i(f, a))
              , v = o(1 + p[1], i(l, a));
            if (t) {
                var m = t
                  , g = p[0] * m[0] / c + p[1] * m[1] / c + 1
                  , y = s(o(m[0], d), o(m[1], v));
                return s(o(1 / g / c, y), a)
            }
            var b = i(e, a)
              , w = r(i(d, o(p[0], b)), i(v, o(p[1], b)), b);
            return o(c, w)
        }
    }
    ).call(h.prototype)
}),
define("ace/virtual_renderer", ["require", "exports", "module", "ace/lib/oop", "ace/lib/dom", "ace/config", "ace/layer/gutter", "ace/layer/marker", "ace/layer/text", "ace/layer/cursor", "ace/scrollbar", "ace/scrollbar", "ace/renderloop", "ace/layer/font_metrics", "ace/lib/event_emitter", "ace/lib/useragent"], function(e, t, n) {
    "use strict";
    var r = e("./lib/oop")
      , i = e("./lib/dom")
      , s = e("./config")
      , o = e("./layer/gutter").Gutter
      , u = e("./layer/marker").Marker
      , a = e("./layer/text").Text
      , f = e("./layer/cursor").Cursor
      , l = e("./scrollbar").HScrollBar
      , c = e("./scrollbar").VScrollBar
      , h = e("./renderloop").RenderLoop
      , p = e("./layer/font_metrics").FontMetrics
      , d = e("./lib/event_emitter").EventEmitter
      , v = '.ace_br1 {border-top-left-radius    : 3px;}.ace_br2 {border-top-right-radius   : 3px;}.ace_br3 {border-top-left-radius    : 3px; border-top-right-radius:    3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius    : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius   : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius    : 3px; border-bottom-left-radius:  3px;}.ace_br10{border-top-right-radius   : 3px; border-bottom-left-radius:  3px;}.ace_br11{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-left-radius:  3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}.ace_br13{border-top-left-radius    : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}.ace_br14{border-top-right-radius   : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius:  3px;}.ace_br15{border-top-left-radius    : 3px; border-top-right-radius:    3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block;   }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}'
      , m = e("./lib/useragent")
      , g = m.isIE;
    i.importCssString(v, "ace_editor.css");
    var y = function(e, t) {
        var n = this;
        this.container = e || i.createElement("div"),
        i.addCssClass(this.container, "ace_editor"),
        i.HI_DPI && i.addCssClass(this.container, "ace_hidpi"),
        this.setTheme(t),
        this.$gutter = i.createElement("div"),
        this.$gutter.className = "ace_gutter",
        this.container.appendChild(this.$gutter),
        this.$gutter.setAttribute("aria-hidden", !0),
        this.scroller = i.createElement("div"),
        this.scroller.className = "ace_scroller",
        this.container.appendChild(this.scroller),
        this.content = i.createElement("div"),
        this.content.className = "ace_content",
        this.scroller.appendChild(this.content),
        this.$gutterLayer = new o(this.$gutter),
        this.$gutterLayer.on("changeGutterWidth", this.onGutterResize.bind(this)),
        this.$markerBack = new u(this.content);
        var r = this.$textLayer = new a(this.content);
        this.canvas = r.element,
        this.$markerFront = new u(this.content),
        this.$cursorLayer = new f(this.content),
        this.$horizScroll = !1,
        this.$vScroll = !1,
        this.scrollBar = this.scrollBarV = new c(this.container,this),
        this.scrollBarH = new l(this.container,this),
        this.scrollBarV.addEventListener("scroll", function(e) {
            n.$scrollAnimation || n.session.setScrollTop(e.data - n.scrollMargin.top)
        }),
        this.scrollBarH.addEventListener("scroll", function(e) {
            n.$scrollAnimation || n.session.setScrollLeft(e.data - n.scrollMargin.left)
        }),
        this.scrollTop = 0,
        this.scrollLeft = 0,
        this.cursorPos = {
            row: 0,
            column: 0
        },
        this.$fontMetrics = new p(this.container),
        this.$textLayer.$setFontMetrics(this.$fontMetrics),
        this.$textLayer.addEventListener("changeCharacterSize", function(e) {
            n.updateCharacterSize(),
            n.onResize(!0, n.gutterWidth, n.$size.width, n.$size.height),
            n._signal("changeCharacterSize", e)
        }),
        this.$size = {
            width: 0,
            height: 0,
            scrollerHeight: 0,
            scrollerWidth: 0,
            $dirty: !0
        },
        this.layerConfig = {
            width: 1,
            padding: 0,
            firstRow: 0,
            firstRowScreen: 0,
            lastRow: 0,
            lineHeight: 0,
            characterWidth: 0,
            minHeight: 1,
            maxHeight: 1,
            offset: 0,
            height: 1,
            gutterOffset: 1
        },
        this.scrollMargin = {
            left: 0,
            right: 0,
            top: 0,
            bottom: 0,
            v: 0,
            h: 0
        },
        this.margin = {
            left: 0,
            right: 0,
            top: 0,
            bottom: 0,
            v: 0,
            h: 0
        },
        this.$keepTextAreaAtCursor = !m.isIOS,
        this.$loop = new h(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),
        this.$loop.schedule(this.CHANGE_FULL),
        this.updateCharacterSize(),
        this.setPadding(4),
        s.resetOptions(this),
        s._signal("renderer", this)
    };
    (function() {
        this.CHANGE_CURSOR = 1,
        this.CHANGE_MARKER = 2,
        this.CHANGE_GUTTER = 4,
        this.CHANGE_SCROLL = 8,
        this.CHANGE_LINES = 16,
        this.CHANGE_TEXT = 32,
        this.CHANGE_SIZE = 64,
        this.CHANGE_MARKER_BACK = 128,
        this.CHANGE_MARKER_FRONT = 256,
        this.CHANGE_FULL = 512,
        this.CHANGE_H_SCROLL = 1024,
        r.implement(this, d),
        this.updateCharacterSize = function() {
            this.$textLayer.allowBoldFonts != this.$allowBoldFonts && (this.$allowBoldFonts = this.$textLayer.allowBoldFonts,
            this.setStyle("ace_nobold", !this.$allowBoldFonts)),
            this.layerConfig.characterWidth = this.characterWidth = this.$textLayer.getCharacterWidth(),
            this.layerConfig.lineHeight = this.lineHeight = this.$textLayer.getLineHeight(),
            this.$updatePrintMargin(),
            i.setStyle(this.scroller.style, "line-height", this.lineHeight + "px")
        }
        ,
        this.setSession = function(e) {
            this.session && this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode),
            this.session = e,
            e && this.scrollMargin.top && e.getScrollTop() <= 0 && e.setScrollTop(-this.scrollMargin.top),
            this.$cursorLayer.setSession(e),
            this.$markerBack.setSession(e),
            this.$markerFront.setSession(e),
            this.$gutterLayer.setSession(e),
            this.$textLayer.setSession(e);
            if (!e)
                return;
            this.$loop.schedule(this.CHANGE_FULL),
            this.session.$setFontMetrics(this.$fontMetrics),
            this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null,
            this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this),
            this.onChangeNewLineMode(),
            this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode)
        }
        ,
        this.updateLines = function(e, t, n) {
            t === undefined && (t = Infinity),
            this.$changedLines ? (this.$changedLines.firstRow > e && (this.$changedLines.firstRow = e),
            this.$changedLines.lastRow < t && (this.$changedLines.lastRow = t)) : this.$changedLines = {
                firstRow: e,
                lastRow: t
            };
            if (this.$changedLines.lastRow < this.layerConfig.firstRow) {
                if (!n)
                    return;
                this.$changedLines.lastRow = this.layerConfig.lastRow
            }
            if (this.$changedLines.firstRow > this.layerConfig.lastRow)
                return;
            this.$loop.schedule(this.CHANGE_LINES)
        }
        ,
        this.onChangeNewLineMode = function() {
            this.$loop.schedule(this.CHANGE_TEXT),
            this.$textLayer.$updateEolChar(),
            this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)
        }
        ,
        this.onChangeTabSize = function() {
            this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER),
            this.$textLayer.onChangeTabSize()
        }
        ,
        this.updateText = function() {
            this.$loop.schedule(this.CHANGE_TEXT)
        }
        ,
        this.updateFull = function(e) {
            e ? this.$renderChanges(this.CHANGE_FULL, !0) : this.$loop.schedule(this.CHANGE_FULL)
        }
        ,
        this.updateFontSize = function() {
            this.$textLayer.checkForSizeChanges()
        }
        ,
        this.$changes = 0,
        this.$updateSizeAsync = function() {
            this.$loop.pending ? this.$size.$dirty = !0 : this.onResize()
        }
        ,
        this.onResize = function(e, t, n, r) {
            if (this.resizing > 2)
                return;
            this.resizing > 0 ? this.resizing++ : this.resizing = e ? 1 : 0;
            var i = this.container;
            r || (r = i.clientHeight || i.scrollHeight),
            n || (n = i.clientWidth || i.scrollWidth);
            var s = this.$updateCachedSize(e, t, n, r);
            if (!this.$size.scrollerHeight || !n && !r)
                return this.resizing = 0;
            e && (this.$gutterLayer.$padding = null),
            e ? this.$renderChanges(s | this.$changes, !0) : this.$loop.schedule(s | this.$changes),
            this.resizing && (this.resizing = 0),
            this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null
        }
        ,
        this.$updateCachedSize = function(e, t, n, r) {
            r -= this.$extraHeight || 0;
            var s = 0
              , o = this.$size
              , u = {
                width: o.width,
                height: o.height,
                scrollerHeight: o.scrollerHeight,
                scrollerWidth: o.scrollerWidth
            };
            r && (e || o.height != r) && (o.height = r,
            s |= this.CHANGE_SIZE,
            o.scrollerHeight = o.height,
            this.$horizScroll && (o.scrollerHeight -= this.scrollBarH.getHeight()),
            this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + "px",
            s |= this.CHANGE_SCROLL);
            if (n && (e || o.width != n)) {
                s |= this.CHANGE_SIZE,
                o.width = n,
                t == null && (t = this.$showGutter ? this.$gutter.offsetWidth : 0),
                this.gutterWidth = t,
                i.setStyle(this.scrollBarH.element.style, "left", t + "px"),
                i.setStyle(this.scroller.style, "left", t + this.margin.left + "px"),
                o.scrollerWidth = Math.max(0, n - t - this.scrollBarV.getWidth() - this.margin.h),
                i.setStyle(this.$gutter.style, "left", this.margin.left + "px");
                var a = this.scrollBarV.getWidth() + "px";
                i.setStyle(this.scrollBarH.element.style, "right", a),
                i.setStyle(this.scroller.style, "right", a),
                i.setStyle(this.scroller.style, "bottom", this.scrollBarH.getHeight());
                if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || e)
                    s |= this.CHANGE_FULL
            }
            return o.$dirty = !n || !r,
            s && this._signal("resize", u),
            s
        }
        ,
        this.onGutterResize = function(e) {
            var t = this.$showGutter ? e : 0;
            t != this.gutterWidth && (this.$changes |= this.$updateCachedSize(!0, t, this.$size.width, this.$size.height)),
            this.session.getUseWrapMode() && this.adjustWrapLimit() ? this.$loop.schedule(this.CHANGE_FULL) : this.$size.$dirty ? this.$loop.schedule(this.CHANGE_FULL) : this.$computeLayerConfig()
        }
        ,
        this.adjustWrapLimit = function() {
            var e = this.$size.scrollerWidth - this.$padding * 2
              , t = Math.floor(e / this.characterWidth);
            return this.session.adjustWrapLimit(t, this.$showPrintMargin && this.$printMarginColumn)
        }
        ,
        this.setAnimatedScroll = function(e) {
            this.setOption("animatedScroll", e)
        }
        ,
        this.getAnimatedScroll = function() {
            return this.$animatedScroll
        }
        ,
        this.setShowInvisibles = function(e) {
            this.setOption("showInvisibles", e),
            this.session.$bidiHandler.setShowInvisibles(e)
        }
        ,
        this.getShowInvisibles = function() {
            return this.getOption("showInvisibles")
        }
        ,
        this.getDisplayIndentGuides = function() {
            return this.getOption("displayIndentGuides")
        }
        ,
        this.setDisplayIndentGuides = function(e) {
            this.setOption("displayIndentGuides", e)
        }
        ,
        this.setShowPrintMargin = function(e) {
            this.setOption("showPrintMargin", e)
        }
        ,
        this.getShowPrintMargin = function() {
            return this.getOption("showPrintMargin")
        }
        ,
        this.setPrintMarginColumn = function(e) {
            this.setOption("printMarginColumn", e)
        }
        ,
        this.getPrintMarginColumn = function() {
            return this.getOption("printMarginColumn")
        }
        ,
        this.getShowGutter = function() {
            return this.getOption("showGutter")
        }
        ,
        this.setShowGutter = function(e) {
            return this.setOption("showGutter", e)
        }
        ,
        this.getFadeFoldWidgets = function() {
            return this.getOption("fadeFoldWidgets")
        }
        ,
        this.setFadeFoldWidgets = function(e) {
            this.setOption("fadeFoldWidgets", e)
        }
        ,
        this.setHighlightGutterLine = function(e) {
            this.setOption("highlightGutterLine", e)
        }
        ,
        this.getHighlightGutterLine = function() {
            return this.getOption("highlightGutterLine")
        }
        ,
        this.$updatePrintMargin = function() {
            if (!this.$showPrintMargin && !this.$printMarginEl)
                return;
            if (!this.$printMarginEl) {
                var e = i.createElement("div");
                e.className = "ace_layer ace_print-margin-layer",
                this.$printMarginEl = i.createElement("div"),
                this.$printMarginEl.className = "ace_print-margin",
                e.appendChild(this.$printMarginEl),
                this.content.insertBefore(e, this.content.firstChild)
            }
            var t = this.$printMarginEl.style;
            t.left = Math.round(this.characterWidth * this.$printMarginColumn + this.$padding) + "px",
            t.visibility = this.$showPrintMargin ? "visible" : "hidden",
            this.session && this.session.$wrap == -1 && this.adjustWrapLimit()
        }
        ,
        this.getContainerElement = function() {
            return this.container
        }
        ,
        this.getMouseEventTarget = function() {
            return this.scroller
        }
        ,
        this.getTextAreaContainer = function() {
            return this.container
        }
        ,
        this.$moveTextAreaToCursor = function() {
            if (this.$isMousePressed)
                return;
            var e = this.textarea.style
              , t = this.$composition;
            if (!this.$keepTextAreaAtCursor && !t) {
                i.translate(this.textarea, -100, 0);
                return
            }
            var n = this.$cursorLayer.$pixelPos;
            if (!n)
                return;
            t && t.markerRange && (n = this.$cursorLayer.getPixelPosition(t.markerRange.start, !0));
            var r = this.layerConfig
              , s = n.top
              , o = n.left;
            s -= r.offset;
            var u = t && t.useTextareaForIME ? this.lineHeight : g ? 0 : 1;
            if (s < 0 || s > r.height - u) {
                i.translate(this.textarea, 0, 0);
                return
            }
            var a = 1
              , f = this.$size.height - u;
            if (!t)
                s += this.lineHeight;
            else if (t.useTextareaForIME) {
                var l = this.textarea.value;
                a = this.characterWidth * this.session.$getStringScreenWidth(l)[0]
            } else
                s += this.lineHeight + 2;
            o -= this.scrollLeft,
            o > this.$size.scrollerWidth - a && (o = this.$size.scrollerWidth - a),
            o += this.gutterWidth + this.margin.left,
            i.setStyle(e, "height", u + "px"),
            i.setStyle(e, "width", a + "px"),
            i.translate(this.textarea, Math.min(o, this.$size.scrollerWidth - a), Math.min(s, f))
        }
        ,
        this.getFirstVisibleRow = function() {
            return this.layerConfig.firstRow
        }
        ,
        this.getFirstFullyVisibleRow = function() {
            return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1)
        }
        ,
        this.getLastFullyVisibleRow = function() {
            var e = this.layerConfig
              , t = e.lastRow
              , n = this.session.documentToScreenRow(t, 0) * e.lineHeight;
            return n - this.session.getScrollTop() > e.height - e.lineHeight ? t - 1 : t
        }
        ,
        this.getLastVisibleRow = function() {
            return this.layerConfig.lastRow
        }
        ,
        this.$padding = null,
        this.setPadding = function(e) {
            this.$padding = e,
            this.$textLayer.setPadding(e),
            this.$cursorLayer.setPadding(e),
            this.$markerFront.setPadding(e),
            this.$markerBack.setPadding(e),
            this.$loop.schedule(this.CHANGE_FULL),
            this.$updatePrintMargin()
        }
        ,
        this.setScrollMargin = function(e, t, n, r) {
            var i = this.scrollMargin;
            i.top = e | 0,
            i.bottom = t | 0,
            i.right = r | 0,
            i.left = n | 0,
            i.v = i.top + i.bottom,
            i.h = i.left + i.right,
            i.top && this.scrollTop <= 0 && this.session && this.session.setScrollTop(-i.top),
            this.updateFull()
        }
        ,
        this.setMargin = function(e, t, n, r) {
            var i = this.margin;
            i.top = e | 0,
            i.bottom = t | 0,
            i.right = r | 0,
            i.left = n | 0,
            i.v = i.top + i.bottom,
            i.h = i.left + i.right,
            this.$updateCachedSize(!0, this.gutterWidth, this.$size.width, this.$size.height),
            this.updateFull()
        }
        ,
        this.getHScrollBarAlwaysVisible = function() {
            return this.$hScrollBarAlwaysVisible
        }
        ,
        this.setHScrollBarAlwaysVisible = function(e) {
            this.setOption("hScrollBarAlwaysVisible", e)
        }
        ,
        this.getVScrollBarAlwaysVisible = function() {
            return this.$vScrollBarAlwaysVisible
        }
        ,
        this.setVScrollBarAlwaysVisible = function(e) {
            this.setOption("vScrollBarAlwaysVisible", e)
        }
        ,
        this.$updateScrollBarV = function() {
            var e = this.layerConfig.maxHeight
              , t = this.$size.scrollerHeight;
            !this.$maxLines && this.$scrollPastEnd && (e -= (t - this.lineHeight) * this.$scrollPastEnd,
            this.scrollTop > e - t && (e = this.scrollTop + t,
            this.scrollBarV.scrollTop = null)),
            this.scrollBarV.setScrollHeight(e + this.scrollMargin.v),
            this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top)
        }
        ,
        this.$updateScrollBarH = function() {
            this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h),
            this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left)
        }
        ,
        this.$frozen = !1,
        this.freeze = function() {
            this.$frozen = !0
        }
        ,
        this.unfreeze = function() {
            this.$frozen = !1
        }
        ,
        this.$renderChanges = function(e, t) {
            this.$changes && (e |= this.$changes,
            this.$changes = 0);
            if (!this.session || !this.container.offsetWidth || this.$frozen || !e && !t) {
                this.$changes |= e;
                return
            }
            if (this.$size.$dirty)
                return this.$changes |= e,
                this.onResize(!0);
            this.lineHeight || this.$textLayer.checkForSizeChanges(),
            this._signal("beforeRender", e),
            this.session && this.session.$bidiHandler && this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);
            var n = this.layerConfig;
            if (e & this.CHANGE_FULL || e & this.CHANGE_SIZE || e & this.CHANGE_TEXT || e & this.CHANGE_LINES || e & this.CHANGE_SCROLL || e & this.CHANGE_H_SCROLL) {
                e |= this.$computeLayerConfig() | this.$loop.clear();
                if (n.firstRow != this.layerConfig.firstRow && n.firstRowScreen == this.layerConfig.firstRowScreen) {
                    var r = this.scrollTop + (n.firstRow - this.layerConfig.firstRow) * this.lineHeight;
                    r > 0 && (this.scrollTop = r,
                    e |= this.CHANGE_SCROLL,
                    e |= this.$computeLayerConfig() | this.$loop.clear())
                }
                n = this.layerConfig,
                this.$updateScrollBarV(),
                e & this.CHANGE_H_SCROLL && this.$updateScrollBarH(),
                i.translate(this.content, -this.scrollLeft, -n.offset);
                var s = n.width + 2 * this.$padding + "px"
                  , o = n.minHeight + "px";
                i.setStyle(this.content.style, "width", s),
                i.setStyle(this.content.style, "height", o)
            }
            e & this.CHANGE_H_SCROLL && (i.translate(this.content, -this.scrollLeft, -n.offset),
            this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left");
            if (e & this.CHANGE_FULL) {
                this.$changedLines = null,
                this.$textLayer.update(n),
                this.$showGutter && this.$gutterLayer.update(n),
                this.$markerBack.update(n),
                this.$markerFront.update(n),
                this.$cursorLayer.update(n),
                this.$moveTextAreaToCursor(),
                this._signal("afterRender", e);
                return
            }
            if (e & this.CHANGE_SCROLL) {
                this.$changedLines = null,
                e & this.CHANGE_TEXT || e & this.CHANGE_LINES ? this.$textLayer.update(n) : this.$textLayer.scrollLines(n),
                this.$showGutter && (e & this.CHANGE_GUTTER || e & this.CHANGE_LINES ? this.$gutterLayer.update(n) : this.$gutterLayer.scrollLines(n)),
                this.$markerBack.update(n),
                this.$markerFront.update(n),
                this.$cursorLayer.update(n),
                this.$moveTextAreaToCursor(),
                this._signal("afterRender", e);
                return
            }
            e & this.CHANGE_TEXT ? (this.$changedLines = null,
            this.$textLayer.update(n),
            this.$showGutter && this.$gutterLayer.update(n)) : e & this.CHANGE_LINES ? (this.$updateLines() || e & this.CHANGE_GUTTER && this.$showGutter) && this.$gutterLayer.update(n) : e & this.CHANGE_TEXT || e & this.CHANGE_GUTTER ? this.$showGutter && this.$gutterLayer.update(n) : e & this.CHANGE_CURSOR && this.$highlightGutterLine && this.$gutterLayer.updateLineHighlight(n),
            e & this.CHANGE_CURSOR && (this.$cursorLayer.update(n),
            this.$moveTextAreaToCursor()),
            e & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT) && this.$markerFront.update(n),
            e & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK) && this.$markerBack.update(n),
            this._signal("afterRender", e)
        }
        ,
        this.$autosize = function() {
            var e = this.session.getScreenLength() * this.lineHeight
              , t = this.$maxLines * this.lineHeight
              , n = Math.min(t, Math.max((this.$minLines || 1) * this.lineHeight, e)) + this.scrollMargin.v + (this.$extraHeight || 0);
            this.$horizScroll && (n += this.scrollBarH.getHeight()),
            this.$maxPixelHeight && n > this.$maxPixelHeight && (n = this.$maxPixelHeight);
            var r = n <= 2 * this.lineHeight
              , i = !r && e > t;
            if (n != this.desiredHeight || this.$size.height != this.desiredHeight || i != this.$vScroll) {
                i != this.$vScroll && (this.$vScroll = i,
                this.scrollBarV.setVisible(i));
                var s = this.container.clientWidth;
                this.container.style.height = n + "px",
                this.$updateCachedSize(!0, this.$gutterWidth, s, n),
                this.desiredHeight = n,
                this._signal("autosize")
            }
        }
        ,
        this.$computeLayerConfig = function() {
            var e = this.session
              , t = this.$size
              , n = t.height <= 2 * this.lineHeight
              , r = this.session.getScreenLength()
              , i = r * this.lineHeight
              , s = this.$getLongestLine()
              , o = !n && (this.$hScrollBarAlwaysVisible || t.scrollerWidth - s - 2 * this.$padding < 0)
              , u = this.$horizScroll !== o;
            u && (this.$horizScroll = o,
            this.scrollBarH.setVisible(o));
            var a = this.$vScroll;
            this.$maxLines && this.lineHeight > 1 && this.$autosize();
            var f = t.scrollerHeight + this.lineHeight
              , l = !this.$maxLines && this.$scrollPastEnd ? (t.scrollerHeight - this.lineHeight) * this.$scrollPastEnd : 0;
            i += l;
            var c = this.scrollMargin;
            this.session.setScrollTop(Math.max(-c.top, Math.min(this.scrollTop, i - t.scrollerHeight + c.bottom))),
            this.session.setScrollLeft(Math.max(-c.left, Math.min(this.scrollLeft, s + 2 * this.$padding - t.scrollerWidth + c.right)));
            var h = !n && (this.$vScrollBarAlwaysVisible || t.scrollerHeight - i + l < 0 || this.scrollTop > c.top)
              , p = a !== h;
            p && (this.$vScroll = h,
            this.scrollBarV.setVisible(h));
            var d = this.scrollTop % this.lineHeight, v = Math.ceil(f / this.lineHeight) - 1, m = Math.max(0, Math.round((this.scrollTop - d) / this.lineHeight)), g = m + v, y, b, w = this.lineHeight;
            m = e.screenToDocumentRow(m, 0);
            var E = e.getFoldLine(m);
            E && (m = E.start.row),
            y = e.documentToScreenRow(m, 0),
            b = e.getRowLength(m) * w,
            g = Math.min(e.screenToDocumentRow(g, 0), e.getLength() - 1),
            f = t.scrollerHeight + e.getRowLength(g) * w + b,
            d = this.scrollTop - y * w;
            var S = 0;
            if (this.layerConfig.width != s || u)
                S = this.CHANGE_H_SCROLL;
            if (u || p)
                S |= this.$updateCachedSize(!0, this.gutterWidth, t.width, t.height),
                this._signal("scrollbarVisibilityChanged"),
                p && (s = this.$getLongestLine());
            return this.layerConfig = {
                width: s,
                padding: this.$padding,
                firstRow: m,
                firstRowScreen: y,
                lastRow: g,
                lineHeight: w,
                characterWidth: this.characterWidth,
                minHeight: f,
                maxHeight: i,
                offset: d,
                gutterOffset: w ? Math.max(0, Math.ceil((d + t.height - t.scrollerHeight) / w)) : 0,
                height: this.$size.scrollerHeight
            },
            this.session.$bidiHandler && this.session.$bidiHandler.setContentWidth(s - this.$padding),
            S
        }
        ,
        this.$updateLines = function() {
            if (!this.$changedLines)
                return;
            var e = this.$changedLines.firstRow
              , t = this.$changedLines.lastRow;
            this.$changedLines = null;
            var n = this.layerConfig;
            if (e > n.lastRow + 1)
                return;
            if (t < n.firstRow)
                return;
            if (t === Infinity) {
                this.$showGutter && this.$gutterLayer.update(n),
                this.$textLayer.update(n);
                return
            }
            return this.$textLayer.updateLines(n, e, t),
            !0
        }
        ,
        this.$getLongestLine = function() {
            var e = this.session.getScreenWidth();
            return this.showInvisibles && !this.session.$useWrapMode && (e += 1),
            this.$textLayer && e > this.$textLayer.MAX_LINE_LENGTH && (e = this.$textLayer.MAX_LINE_LENGTH + 30),
            Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(e * this.characterWidth))
        }
        ,
        this.updateFrontMarkers = function() {
            this.$markerFront.setMarkers(this.session.getMarkers(!0)),
            this.$loop.schedule(this.CHANGE_MARKER_FRONT)
        }
        ,
        this.updateBackMarkers = function() {
            this.$markerBack.setMarkers(this.session.getMarkers()),
            this.$loop.schedule(this.CHANGE_MARKER_BACK)
        }
        ,
        this.addGutterDecoration = function(e, t) {
            this.$gutterLayer.addGutterDecoration(e, t)
        }
        ,
        this.removeGutterDecoration = function(e, t) {
            this.$gutterLayer.removeGutterDecoration(e, t)
        }
        ,
        this.updateBreakpoints = function(e) {
            this.$loop.schedule(this.CHANGE_GUTTER)
        }
        ,
        this.setAnnotations = function(e) {
            this.$gutterLayer.setAnnotations(e),
            this.$loop.schedule(this.CHANGE_GUTTER)
        }
        ,
        this.updateCursor = function() {
            this.$loop.schedule(this.CHANGE_CURSOR)
        }
        ,
        this.hideCursor = function() {
            this.$cursorLayer.hideCursor()
        }
        ,
        this.showCursor = function() {
            this.$cursorLayer.showCursor()
        }
        ,
        this.scrollSelectionIntoView = function(e, t, n) {
            this.scrollCursorIntoView(e, n),
            this.scrollCursorIntoView(t, n)
        }
        ,
        this.scrollCursorIntoView = function(e, t, n) {
            if (this.$size.scrollerHeight === 0)
                return;
            var r = this.$cursorLayer.getPixelPosition(e)
              , i = r.left
              , s = r.top
              , o = n && n.top || 0
              , u = n && n.bottom || 0
              , a = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;
            a + o > s ? (t && a + o > s + this.lineHeight && (s -= t * this.$size.scrollerHeight),
            s === 0 && (s = -this.scrollMargin.top),
            this.session.setScrollTop(s)) : a + this.$size.scrollerHeight - u < s + this.lineHeight && (t && a + this.$size.scrollerHeight - u < s - this.lineHeight && (s += t * this.$size.scrollerHeight),
            this.session.setScrollTop(s + this.lineHeight + u - this.$size.scrollerHeight));
            var f = this.scrollLeft;
            f > i ? (i < this.$padding + 2 * this.layerConfig.characterWidth && (i = -this.scrollMargin.left),
            this.session.setScrollLeft(i)) : f + this.$size.scrollerWidth < i + this.characterWidth ? this.session.setScrollLeft(Math.round(i + this.characterWidth - this.$size.scrollerWidth)) : f <= this.$padding && i - f < this.characterWidth && this.session.setScrollLeft(0)
        }
        ,
        this.getScrollTop = function() {
            return this.session.getScrollTop()
        }
        ,
        this.getScrollLeft = function() {
            return this.session.getScrollLeft()
        }
        ,
        this.getScrollTopRow = function() {
            return this.scrollTop / this.lineHeight
        }
        ,
        this.getScrollBottomRow = function() {
            return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1)
        }
        ,
        this.scrollToRow = function(e) {
            this.session.setScrollTop(e * this.lineHeight)
        }
        ,
        this.alignCursor = function(e, t) {
            typeof e == "number" && (e = {
                row: e,
                column: 0
            });
            var n = this.$cursorLayer.getPixelPosition(e)
              , r = this.$size.scrollerHeight - this.lineHeight
              , i = n.top - r * (t || 0);
            return this.session.setScrollTop(i),
            i
        }
        ,
        this.STEPS = 8,
        this.$calcSteps = function(e, t) {
            var n = 0
              , r = this.STEPS
              , i = []
              , s = function(e, t, n) {
                return n * (Math.pow(e - 1, 3) + 1) + t
            };
            for (n = 0; n < r; ++n)
                i.push(s(n / this.STEPS, e, t - e));
            return i
        }
        ,
        this.scrollToLine = function(e, t, n, r) {
            var i = this.$cursorLayer.getPixelPosition({
                row: e,
                column: 0
            })
              , s = i.top;
            t && (s -= this.$size.scrollerHeight / 2);
            var o = this.scrollTop;
            this.session.setScrollTop(s),
            n !== !1 && this.animateScrolling(o, r)
        }
        ,
        this.animateScrolling = function(e, t) {
            var n = this.scrollTop;
            if (!this.$animatedScroll)
                return;
            var r = this;
            if (e == n)
                return;
            if (this.$scrollAnimation) {
                var i = this.$scrollAnimation.steps;
                if (i.length) {
                    e = i[0];
                    if (e == n)
                        return
                }
            }
            var s = r.$calcSteps(e, n);
            this.$scrollAnimation = {
                from: e,
                to: n,
                steps: s
            },
            clearInterval(this.$timer),
            r.session.setScrollTop(s.shift()),
            r.session.$scrollTop = n,
            this.$timer = setInterval(function() {
                s.length ? (r.session.setScrollTop(s.shift()),
                r.session.$scrollTop = n) : n != null ? (r.session.$scrollTop = -1,
                r.session.setScrollTop(n),
                n = null) : (r.$timer = clearInterval(r.$timer),
                r.$scrollAnimation = null,
                t && t())
            }, 10)
        }
        ,
        this.scrollToY = function(e) {
            this.scrollTop !== e && (this.$loop.schedule(this.CHANGE_SCROLL),
            this.scrollTop = e)
        }
        ,
        this.scrollToX = function(e) {
            this.scrollLeft !== e && (this.scrollLeft = e),
            this.$loop.schedule(this.CHANGE_H_SCROLL)
        }
        ,
        this.scrollTo = function(e, t) {
            this.session.setScrollTop(t),
            this.session.setScrollLeft(t)
        }
        ,
        this.scrollBy = function(e, t) {
            t && this.session.setScrollTop(this.session.getScrollTop() + t),
            e && this.session.setScrollLeft(this.session.getScrollLeft() + e)
        }
        ,
        this.isScrollableBy = function(e, t) {
            if (t < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top)
                return !0;
            if (t > 0 && this.session.getScrollTop() + this.$size.scrollerHeight - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom)
                return !0;
            if (e < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)
                return !0;
            if (e > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth - this.layerConfig.width < -1 + this.scrollMargin.right)
                return !0
        }
        ,
        this.pixelToScreenCoordinates = function(e, t) {
            var n;
            if (this.$hasCssTransforms) {
                n = {
                    top: 0,
                    left: 0
                };
                var r = this.$fontMetrics.transformCoordinates([e, t]);
                e = r[1] - this.gutterWidth - this.margin.left,
                t = r[0]
            } else
                n = this.scroller.getBoundingClientRect();
            var i = e + this.scrollLeft - n.left - this.$padding
              , s = i / this.characterWidth
              , o = Math.floor((t + this.scrollTop - n.top) / this.lineHeight)
              , u = this.$blockCursor ? Math.floor(s) : Math.round(s);
            return {
                row: o,
                column: u,
                side: s - u > 0 ? 1 : -1,
                offsetX: i
            }
        }
        ,
        this.screenToTextCoordinates = function(e, t) {
            var n;
            if (this.$hasCssTransforms) {
                n = {
                    top: 0,
                    left: 0
                };
                var r = this.$fontMetrics.transformCoordinates([e, t]);
                e = r[1] - this.gutterWidth - this.margin.left,
                t = r[0]
            } else
                n = this.scroller.getBoundingClientRect();
            var i = e + this.scrollLeft - n.left - this.$padding
              , s = i / this.characterWidth
              , o = this.$blockCursor ? Math.floor(s) : Math.round(s)
              , u = Math.floor((t + this.scrollTop - n.top) / this.lineHeight);
            return this.session.screenToDocumentPosition(u, Math.max(o, 0), i)
        }
        ,
        this.textToScreenCoordinates = function(e, t) {
            var n = this.scroller.getBoundingClientRect()
              , r = this.session.documentToScreenPosition(e, t)
              , i = this.$padding + (this.session.$bidiHandler.isBidiRow(r.row, e) ? this.session.$bidiHandler.getPosLeft(r.column) : Math.round(r.column * this.characterWidth))
              , s = r.row * this.lineHeight;
            return {
                pageX: n.left + i - this.scrollLeft,
                pageY: n.top + s - this.scrollTop
            }
        }
        ,
        this.visualizeFocus = function() {
            i.addCssClass(this.container, "ace_focus")
        }
        ,
        this.visualizeBlur = function() {
            i.removeCssClass(this.container, "ace_focus")
        }
        ,
        this.showComposition = function(e) {
            this.$composition = e,
            e.cssText || (e.cssText = this.textarea.style.cssText),
            e.useTextareaForIME = this.$useTextareaForIME,
            this.$useTextareaForIME ? (i.addCssClass(this.textarea, "ace_composition"),
            this.textarea.style.cssText = "",
            this.$moveTextAreaToCursor(),
            this.$cursorLayer.element.style.display = "none") : e.markerId = this.session.addMarker(e.markerRange, "ace_composition_marker", "text")
        }
        ,
        this.setCompositionText = function(e) {
            var t = this.session.selection.cursor;
            this.addToken(e, "composition_placeholder", t.row, t.column),
            this.$moveTextAreaToCursor()
        }
        ,
        this.hideComposition = function() {
            if (!this.$composition)
                return;
            this.$composition.markerId && this.session.removeMarker(this.$composition.markerId),
            i.removeCssClass(this.textarea, "ace_composition"),
            this.textarea.style.cssText = this.$composition.cssText,
            this.$composition = null,
            this.$cursorLayer.element.style.display = ""
        }
        ,
        this.addToken = function(e, t, n, r) {
            var i = this.session;
            i.bgTokenizer.lines[n] = null;
            var s = {
                type: t,
                value: e
            }
              , o = i.getTokens(n);
            if (r == null)
                o.push(s);
            else {
                var u = 0;
                for (var a = 0; a < o.length; a++) {
                    var f = o[a];
                    u += f.value.length;
                    if (r <= u) {
                        var l = f.value.length - (u - r)
                          , c = f.value.slice(0, l)
                          , h = f.value.slice(l);
                        o.splice(a, 1, {
                            type: f.type,
                            value: c
                        }, s, {
                            type: f.type,
                            value: h
                        });
                        break
                    }
                }
            }
            this.updateLines(n, n)
        }
        ,
        this.setTheme = function(e, t) {
            function o(r) {
                if (n.$themeId != e)
                    return t && t();
                if (!r || !r.cssClass)
                    throw new Error("couldn't load module " + e + " or it didn't call define");
                r.$id && (n.$themeId = r.$id),
                i.importCssString(r.cssText, r.cssClass, n.container),
                n.theme && i.removeCssClass(n.container, n.theme.cssClass);
                var s = "padding"in r ? r.padding : "padding"in (n.theme || {}) ? 4 : n.$padding;
                n.$padding && s != n.$padding && n.setPadding(s),
                n.$theme = r.cssClass,
                n.theme = r,
                i.addCssClass(n.container, r.cssClass),
                i.setCssClass(n.container, "ace_dark", r.isDark),
                n.$size && (n.$size.width = 0,
                n.$updateSizeAsync()),
                n._dispatchEvent("themeLoaded", {
                    theme: r
                }),
                t && t()
            }
            var n = this;
            this.$themeId = e,
            n._dispatchEvent("themeChange", {
                theme: e
            });
            if (!e || typeof e == "string") {
                var r = e || this.$options.theme.initialValue;
                s.loadModule(["theme", r], o)
            } else
                o(e)
        }
        ,
        this.getTheme = function() {
            return this.$themeId
        }
        ,
        this.setStyle = function(e, t) {
            i.setCssClass(this.container, e, t !== !1)
        }
        ,
        this.unsetStyle = function(e) {
            i.removeCssClass(this.container, e)
        }
        ,
        this.setCursorStyle = function(e) {
            i.setStyle(this.scroller.style, "cursor", e)
        }
        ,
        this.setMouseCursor = function(e) {
            i.setStyle(this.scroller.style, "cursor", e)
        }
        ,
        this.attachToShadowRoot = function() {
            i.importCssString(v, "ace_editor.css", this.container)
        }
        ,
        this.destroy = function() {
            this.freeze(),
            this.$fontMetrics.destroy(),
            this.$cursorLayer.destroy()
        }
    }
    ).call(y.prototype),
    s.defineOptions(y.prototype, "renderer", {
        animatedScroll: {
            initialValue: !1
        },
        showInvisibles: {
            set: function(e) {
                this.$textLayer.setShowInvisibles(e) && this.$loop.schedule(this.CHANGE_TEXT)
            },
            initialValue: !1
        },
        showPrintMargin: {
            set: function() {
                this.$updatePrintMargin()
            },
            initialValue: !0
        },
        printMarginColumn: {
            set: function() {
                this.$updatePrintMargin()
            },
            initialValue: 80
        },
        printMargin: {
            set: function(e) {
                typeof e == "number" && (this.$printMarginColumn = e),
                this.$showPrintMargin = !!e,
                this.$updatePrintMargin()
            },
            get: function() {
                return this.$showPrintMargin && this.$printMarginColumn
            }
        },
        showGutter: {
            set: function(e) {
                this.$gutter.style.display = e ? "block" : "none",
                this.$loop.schedule(this.CHANGE_FULL),
                this.onGutterResize()
            },
            initialValue: !0
        },
        fadeFoldWidgets: {
            set: function(e) {
                i.setCssClass(this.$gutter, "ace_fade-fold-widgets", e)
            },
            initialValue: !1
        },
        showFoldWidgets: {
            set: function(e) {
                this.$gutterLayer.setShowFoldWidgets(e),
                this.$loop.schedule(this.CHANGE_GUTTER)
            },
            initialValue: !0
        },
        displayIndentGuides: {
            set: function(e) {
                this.$textLayer.setDisplayIndentGuides(e) && this.$loop.schedule(this.CHANGE_TEXT)
            },
            initialValue: !0
        },
        highlightGutterLine: {
            set: function(e) {
                this.$gutterLayer.setHighlightGutterLine(e),
                this.$loop.schedule(this.CHANGE_GUTTER)
            },
            initialValue: !0
        },
        hScrollBarAlwaysVisible: {
            set: function(e) {
                (!this.$hScrollBarAlwaysVisible || !this.$horizScroll) && this.$loop.schedule(this.CHANGE_SCROLL)
            },
            initialValue: !1
        },
        vScrollBarAlwaysVisible: {
            set: function(e) {
                (!this.$vScrollBarAlwaysVisible || !this.$vScroll) && this.$loop.schedule(this.CHANGE_SCROLL)
            },
            initialValue: !1
        },
        fontSize: {
            set: function(e) {
                typeof e == "number" && (e += "px"),
                this.container.style.fontSize = e,
                this.updateFontSize()
            },
            initialValue: 12
        },
        fontFamily: {
            set: function(e) {
                this.container.style.fontFamily = e,
                this.updateFontSize()
            }
        },
        maxLines: {
            set: function(e) {
                this.updateFull()
            }
        },
        minLines: {
            set: function(e) {
                this.$minLines < 562949953421311 || (this.$minLines = 0),
                this.updateFull()
            }
        },
        maxPixelHeight: {
            set: function(e) {
                this.updateFull()
            },
            initialValue: 0
        },
        scrollPastEnd: {
            set: function(e) {
                e = +e || 0;
                if (this.$scrollPastEnd == e)
                    return;
                this.$scrollPastEnd = e,
                this.$loop.schedule(this.CHANGE_SCROLL)
            },
            initialValue: 0,
            handlesSet: !0
        },
        fixedWidthGutter: {
            set: function(e) {
                this.$gutterLayer.$fixedWidth = !!e,
                this.$loop.schedule(this.CHANGE_GUTTER)
            }
        },
        theme: {
            set: function(e) {
                this.setTheme(e)
            },
            get: function() {
                return this.$themeId || this.theme
            },
            initialValue: "./theme/textmate",
            handlesSet: !0
        },
        hasCssTransforms: {},
        useTextareaForIME: {
            initialValue: !m.isMobile && !m.isIE
        }
    }),
    t.VirtualRenderer = y
}),
define("ace/worker/worker_client", ["require", "exports", "module", "ace/lib/oop", "ace/lib/net", "ace/lib/event_emitter", "ace/config"], function(e, t, n) {
    "use strict";
    function u(e) {
        var t = "importScripts('" + i.qualifyURL(e) + "');";
        try {
            return new Blob([t],{
                type: "application/javascript"
            })
        } catch (n) {
            var r = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder
              , s = new r;
            return s.append(t),
            s.getBlob("application/javascript")
        }
    }
    function a(e) {
        if (typeof Worker == "undefined")
            return {
                postMessage: function() {},
                terminate: function() {}
            };
        if (o.get("loadWorkerFromBlob")) {
            var t = u(e)
              , n = window.URL || window.webkitURL
              , r = n.createObjectURL(t);
            return new Worker(r)
        }
        return new Worker(e)
    }
    var r = e("../lib/oop")
      , i = e("../lib/net")
      , s = e("../lib/event_emitter").EventEmitter
      , o = e("../config")
      , f = function(e) {
        e.postMessage || (e = this.$createWorkerFromOldConfig.apply(this, arguments)),
        this.$worker = e,
        this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this),
        this.changeListener = this.changeListener.bind(this),
        this.onMessage = this.onMessage.bind(this),
        this.callbackId = 1,
        this.callbacks = {},
        this.$worker.onmessage = this.onMessage
    };
    (function() {
        r.implement(this, s),
        this.$createWorkerFromOldConfig = function(t, n, r, i, s) {
            e.nameToUrl && !e.toUrl && (e.toUrl = e.nameToUrl);
            if (o.get("packaged") || !e.toUrl)
                i = i || o.moduleUrl(n, "worker");
            else {
                var u = this.$normalizePath;
                i = i || u(e.toUrl("ace/worker/worker.js", null, "_"));
                var f = {};
                t.forEach(function(t) {
                    f[t] = u(e.toUrl(t, null, "_").replace(/(\.js)?(\?.*)?$/, ""))
                })
            }
            return this.$worker = a(i),
            s && this.send("importScripts", s),
            this.$worker.postMessage({
                init: !0,
                tlns: f,
                module: n,
                classname: r
            }),
            this.$worker
        }
        ,
        this.onMessage = function(e) {
            var t = e.data;
            switch (t.type) {
            case "event":
                this._signal(t.name, {
                    data: t.data
                });
                break;
            case "call":
                var n = this.callbacks[t.id];
                n && (n(t.data),
                delete this.callbacks[t.id]);
                break;
            case "error":
                this.reportError(t.data);
                break;
            case "log":
                window.console && console.log && console.log.apply(console, t.data)
            }
        }
        ,
        this.reportError = function(e) {
            window.console && console.error && console.error(e)
        }
        ,
        this.$normalizePath = function(e) {
            return i.qualifyURL(e)
        }
        ,
        this.terminate = function() {
            this._signal("terminate", {}),
            this.deltaQueue = null,
            this.$worker.terminate(),
            this.$worker = null,
            this.$doc && this.$doc.off("change", this.changeListener),
            this.$doc = null
        }
        ,
        this.send = function(e, t) {
            this.$worker.postMessage({
                command: e,
                args: t
            })
        }
        ,
        this.call = function(e, t, n) {
            if (n) {
                var r = this.callbackId++;
                this.callbacks[r] = n,
                t.push(r)
            }
            this.send(e, t)
        }
        ,
        this.emit = function(e, t) {
            try {
                t.data && t.data.err && (t.data.err = {
                    message: t.data.err.message,
                    stack: t.data.err.stack,
                    code: t.data.err.code
                }),
                this.$worker.postMessage({
                    event: e,
                    data: {
                        data: t.data
                    }
                })
            } catch (n) {
                console.error(n.stack)
            }
        }
        ,
        this.attachToDocument = function(e) {
            this.$doc && this.terminate(),
            this.$doc = e,
            this.call("setValue", [e.getValue()]),
            e.on("change", this.changeListener)
        }
        ,
        this.changeListener = function(e) {
            this.deltaQueue || (this.deltaQueue = [],
            setTimeout(this.$sendDeltaQueue, 0)),
            e.action == "insert" ? this.deltaQueue.push(e.start, e.lines) : this.deltaQueue.push(e.start, e.end)
        }
        ,
        this.$sendDeltaQueue = function() {
            var e = this.deltaQueue;
            if (!e)
                return;
            this.deltaQueue = null,
            e.length > 50 && e.length > this.$doc.getLength() >> 1 ? this.call("setValue", [this.$doc.getValue()]) : this.emit("change", {
                data: e
            })
        }
    }
    ).call(f.prototype);
    var l = function(e, t, n) {
        var r = null
          , i = !1
          , u = Object.create(s)
          , a = []
          , l = new f({
            messageBuffer: a,
            terminate: function() {},
            postMessage: function(e) {
                a.push(e);
                if (!r)
                    return;
                i ? setTimeout(c) : c()
            }
        });
        l.setEmitSync = function(e) {
            i = e
        }
        ;
        var c = function() {
            var e = a.shift();
            e.command ? r[e.command].apply(r, e.args) : e.event && u._signal(e.event, e.data)
        };
        return u.postMessage = function(e) {
            l.onMessage({
                data: e
            })
        }
        ,
        u.callback = function(e, t) {
            this.postMessage({
                type: "call",
                id: t,
                data: e
            })
        }
        ,
        u.emit = function(e, t) {
            this.postMessage({
                type: "event",
                name: e,
                data: t
            })
        }
        ,
        o.loadModule(["worker", t], function(e) {
            r = new e[n](u);
            while (a.length)
                c()
        }),
        l
    };
    t.UIWorkerClient = l,
    t.WorkerClient = f,
    t.createWorker = a
}),
define("ace/placeholder", ["require", "exports", "module", "ace/range", "ace/lib/event_emitter", "ace/lib/oop"], function(e, t, n) {
    "use strict";
    var r = e("./range").Range
      , i = e("./lib/event_emitter").EventEmitter
      , s = e("./lib/oop")
      , o = function(e, t, n, r, i, s) {
        var o = this;
        this.length = t,
        this.session = e,
        this.doc = e.getDocument(),
        this.mainClass = i,
        this.othersClass = s,
        this.$onUpdate = this.onUpdate.bind(this),
        this.doc.on("change", this.$onUpdate),
        this.$others = r,
        this.$onCursorChange = function() {
            setTimeout(function() {
                o.onCursorChange()
            })
        }
        ,
        this.$pos = n;
        var u = e.getUndoManager().$undoStack || e.getUndoManager().$undostack || {
            length: -1
        };
        this.$undoStackDepth = u.length,
        this.setup(),
        e.selection.on("changeCursor", this.$onCursorChange)
    };
    (function() {
        s.implement(this, i),
        this.setup = function() {
            var e = this
              , t = this.doc
              , n = this.session;
            this.selectionBefore = n.selection.toJSON(),
            n.selection.inMultiSelectMode && n.selection.toSingleRange(),
            this.pos = t.createAnchor(this.$pos.row, this.$pos.column);
            var i = this.pos;
            i.$insertRight = !0,
            i.detach(),
            i.markerId = n.addMarker(new r(i.row,i.column,i.row,i.column + this.length), this.mainClass, null, !1),
            this.others = [],
            this.$others.forEach(function(n) {
                var r = t.createAnchor(n.row, n.column);
                r.$insertRight = !0,
                r.detach(),
                e.others.push(r)
            }),
            n.setUndoSelect(!1)
        }
        ,
        this.showOtherMarkers = function() {
            if (this.othersActive)
                return;
            var e = this.session
              , t = this;
            this.othersActive = !0,
            this.others.forEach(function(n) {
                n.markerId = e.addMarker(new r(n.row,n.column,n.row,n.column + t.length), t.othersClass, null, !1)
            })
        }
        ,
        this.hideOtherMarkers = function() {
            if (!this.othersActive)
                return;
            this.othersActive = !1;
            for (var e = 0; e < this.others.length; e++)
                this.session.removeMarker(this.others[e].markerId)
        }
        ,
        this.onUpdate = function(e) {
            if (this.$updating)
                return this.updateAnchors(e);
            var t = e;
            if (t.start.row !== t.end.row)
                return;
            if (t.start.row !== this.pos.row)
                return;
            this.$updating = !0;
            var n = e.action === "insert" ? t.end.column - t.start.column : t.start.column - t.end.column
              , i = t.start.column >= this.pos.column && t.start.column <= this.pos.column + this.length + 1
              , s = t.start.column - this.pos.column;
            this.updateAnchors(e),
            i && (this.length += n);
            if (i && !this.session.$fromUndo)
                if (e.action === "insert")
                    for (var o = this.others.length - 1; o >= 0; o--) {
                        var u = this.others[o]
                          , a = {
                            row: u.row,
                            column: u.column + s
                        };
                        this.doc.insertMergedLines(a, e.lines)
                    }
                else if (e.action === "remove")
                    for (var o = this.others.length - 1; o >= 0; o--) {
                        var u = this.others[o]
                          , a = {
                            row: u.row,
                            column: u.column + s
                        };
                        this.doc.remove(new r(a.row,a.column,a.row,a.column - n))
                    }
            this.$updating = !1,
            this.updateMarkers()
        }
        ,
        this.updateAnchors = function(e) {
            this.pos.onChange(e);
            for (var t = this.others.length; t--; )
                this.others[t].onChange(e);
            this.updateMarkers()
        }
        ,
        this.updateMarkers = function() {
            if (this.$updating)
                return;
            var e = this
              , t = this.session
              , n = function(n, i) {
                t.removeMarker(n.markerId),
                n.markerId = t.addMarker(new r(n.row,n.column,n.row,n.column + e.length), i, null, !1)
            };
            n(this.pos, this.mainClass);
            for (var i = this.others.length; i--; )
                n(this.others[i], this.othersClass)
        }
        ,
        this.onCursorChange = function(e) {
            if (this.$updating || !this.session)
                return;
            var t = this.session.selection.getCursor();
            t.row === this.pos.row && t.column >= this.pos.column && t.column <= this.pos.column + this.length ? (this.showOtherMarkers(),
            this._emit("cursorEnter", e)) : (this.hideOtherMarkers(),
            this._emit("cursorLeave", e))
        }
        ,
        this.detach = function() {
            this.session.removeMarker(this.pos && this.pos.markerId),
            this.hideOtherMarkers(),
            this.doc.removeEventListener("change", this.$onUpdate),
            this.session.selection.removeEventListener("changeCursor", this.$onCursorChange),
            this.session.setUndoSelect(!0),
            this.session = null
        }
        ,
        this.cancel = function() {
            if (this.$undoStackDepth === -1)
                return;
            var e = this.session.getUndoManager()
              , t = (e.$undoStack || e.$undostack).length - this.$undoStackDepth;
            for (var n = 0; n < t; n++)
                e.undo(this.session, !0);
            this.selectionBefore && this.session.selection.fromJSON(this.selectionBefore)
        }
    }
    ).call(o.prototype),
    t.PlaceHolder = o
}),
define("ace/mouse/multi_select_handler", ["require", "exports", "module", "ace/lib/event", "ace/lib/useragent"], function(e, t, n) {
    function s(e, t) {
        return e.row == t.row && e.column == t.column
    }
    function o(e) {
        var t = e.domEvent
          , n = t.altKey
          , o = t.shiftKey
          , u = t.ctrlKey
          , a = e.getAccelKey()
          , f = e.getButton();
        u && i.isMac && (f = t.button);
        if (e.editor.inMultiSelectMode && f == 2) {
            e.editor.textInput.onContextMenu(e.domEvent);
            return
        }
        if (!u && !n && !a) {
            f === 0 && e.editor.inMultiSelectMode && e.editor.exitMultiSelectMode();
            return
        }
        if (f !== 0)
            return;
        var l = e.editor, c = l.selection, h = l.inMultiSelectMode, p = e.getDocumentPosition(), d = c.getCursor(), v = e.inSelection() || c.isEmpty() && s(p, d), m = e.x, g = e.y, y = function(e) {
            m = e.clientX,
            g = e.clientY
        }, b = l.session, w = l.renderer.pixelToScreenCoordinates(m, g), E = w, S;
        if (l.$mouseHandler.$enableJumpToDef)
            u && n || a && n ? S = o ? "block" : "add" : n && l.$blockSelectEnabled && (S = "block");
        else if (a && !n) {
            S = "add";
            if (!h && o)
                return
        } else
            n && l.$blockSelectEnabled && (S = "block");
        S && i.isMac && t.ctrlKey && l.$mouseHandler.cancelContextMenu();
        if (S == "add") {
            if (!h && v)
                return;
            if (!h) {
                var x = c.toOrientedRange();
                l.addSelectionMarker(x)
            }
            var T = c.rangeList.rangeAtPoint(p);
            l.inVirtualSelectionMode = !0,
            o && (T = null,
            x = c.ranges[0] || x,
            l.removeSelectionMarker(x)),
            l.once("mouseup", function() {
                var e = c.toOrientedRange();
                T && e.isEmpty() && s(T.cursor, e.cursor) ? c.substractPoint(e.cursor) : (o ? c.substractPoint(x.cursor) : x && (l.removeSelectionMarker(x),
                c.addRange(x)),
                c.addRange(e)),
                l.inVirtualSelectionMode = !1
            })
        } else if (S == "block") {
            e.stop(),
            l.inVirtualSelectionMode = !0;
            var N, C = [], k = function() {
                var e = l.renderer.pixelToScreenCoordinates(m, g)
                  , t = b.screenToDocumentPosition(e.row, e.column, e.offsetX);
                if (s(E, e) && s(t, c.lead))
                    return;
                E = e,
                l.selection.moveToPosition(t),
                l.renderer.scrollCursorIntoView(),
                l.removeSelectionMarkers(C),
                C = c.rectangularRangeBlock(E, w),
                l.$mouseHandler.$clickSelection && C.length == 1 && C[0].isEmpty() && (C[0] = l.$mouseHandler.$clickSelection.clone()),
                C.forEach(l.addSelectionMarker, l),
                l.updateSelectionMarkers()
            };
            h && !a ? c.toSingleRange() : !h && a && (N = c.toOrientedRange(),
            l.addSelectionMarker(N)),
            o ? w = b.documentToScreenPosition(c.lead) : c.moveToPosition(p),
            E = {
                row: -1,
                column: -1
            };
            var L = function(e) {
                k(),
                clearInterval(O),
                l.removeSelectionMarkers(C),
                C.length || (C = [c.toOrientedRange()]),
                N && (l.removeSelectionMarker(N),
                c.toSingleRange(N));
                for (var t = 0; t < C.length; t++)
                    c.addRange(C[t]);
                l.inVirtualSelectionMode = !1,
                l.$mouseHandler.$clickSelection = null
            }
              , A = k;
            r.capture(l.container, y, L);
            var O = setInterval(function() {
                A()
            }, 20);
            return e.preventDefault()
        }
    }
    var r = e("../lib/event")
      , i = e("../lib/useragent");
    t.onMouseDown = o
}),
define("ace/commands/multi_select_commands", ["require", "exports", "module", "ace/keyboard/hash_handler"], function(e, t, n) {
    t.defaultCommands = [{
        name: "addCursorAbove",
        description: "Add cursor above",
        exec: function(e) {
            e.selectMoreLines(-1)
        },
        bindKey: {
            win: "Ctrl-Alt-Up",
            mac: "Ctrl-Alt-Up"
        },
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "addCursorBelow",
        description: "Add cursor below",
        exec: function(e) {
            e.selectMoreLines(1)
        },
        bindKey: {
            win: "Ctrl-Alt-Down",
            mac: "Ctrl-Alt-Down"
        },
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "addCursorAboveSkipCurrent",
        description: "Add cursor above (skip current)",
        exec: function(e) {
            e.selectMoreLines(-1, !0)
        },
        bindKey: {
            win: "Ctrl-Alt-Shift-Up",
            mac: "Ctrl-Alt-Shift-Up"
        },
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "addCursorBelowSkipCurrent",
        description: "Add cursor below (skip current)",
        exec: function(e) {
            e.selectMoreLines(1, !0)
        },
        bindKey: {
            win: "Ctrl-Alt-Shift-Down",
            mac: "Ctrl-Alt-Shift-Down"
        },
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "selectMoreBefore",
        description: "Select more before",
        exec: function(e) {
            e.selectMore(-1)
        },
        bindKey: {
            win: "Ctrl-Alt-Left",
            mac: "Ctrl-Alt-Left"
        },
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "selectMoreAfter",
        description: "Select more after",
        exec: function(e) {
            e.selectMore(1)
        },
        bindKey: {
            win: "Ctrl-Alt-Right",
            mac: "Ctrl-Alt-Right"
        },
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "selectNextBefore",
        description: "Select next before",
        exec: function(e) {
            e.selectMore(-1, !0)
        },
        bindKey: {
            win: "Ctrl-Alt-Shift-Left",
            mac: "Ctrl-Alt-Shift-Left"
        },
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "selectNextAfter",
        description: "Select next after",
        exec: function(e) {
            e.selectMore(1, !0)
        },
        bindKey: {
            win: "Ctrl-Alt-Shift-Right",
            mac: "Ctrl-Alt-Shift-Right"
        },
        scrollIntoView: "cursor",
        readOnly: !0
    }, {
        name: "toggleSplitSelectionIntoLines",
        description: "Split into lines",
        exec: function(e) {
            e.multiSelect.rangeCount > 1 ? e.multiSelect.joinSelections() : e.multiSelect.splitIntoLines()
        },
        bindKey: {
            win: "Ctrl-Alt-L",
            mac: "Ctrl-Alt-L"
        },
        readOnly: !0
    }, {
        name: "splitSelectionIntoLines",
        description: "Split into lines",
        exec: function(e) {
            e.multiSelect.splitIntoLines()
        },
        readOnly: !0
    }, {
        name: "alignCursors",
        description: "Align cursors",
        exec: function(e) {
            e.alignCursors()
        },
        bindKey: {
            win: "Ctrl-Alt-A",
            mac: "Ctrl-Alt-A"
        },
        scrollIntoView: "cursor"
    }, {
        name: "findAll",
        description: "Find all",
        exec: function(e) {
            e.findAll()
        },
        bindKey: {
            win: "Ctrl-Alt-K",
            mac: "Ctrl-Alt-G"
        },
        scrollIntoView: "cursor",
        readOnly: !0
    }],
    t.multiSelectCommands = [{
        name: "singleSelection",
        description: "Single selection",
        bindKey: "esc",
        exec: function(e) {
            e.exitMultiSelectMode()
        },
        scrollIntoView: "cursor",
        readOnly: !0,
        isAvailable: function(e) {
            return e && e.inMultiSelectMode
        }
    }];
    var r = e("../keyboard/hash_handler").HashHandler;
    t.keyboardHandler = new r(t.multiSelectCommands)
}),
define("ace/multi_select", ["require", "exports", "module", "ace/range_list", "ace/range", "ace/selection", "ace/mouse/multi_select_handler", "ace/lib/event", "ace/lib/lang", "ace/commands/multi_select_commands", "ace/search", "ace/edit_session", "ace/editor", "ace/config"], function(e, t, n) {
    function h(e, t, n) {
        return c.$options.wrap = !0,
        c.$options.needle = t,
        c.$options.backwards = n == -1,
        c.find(e)
    }
    function v(e, t) {
        return e.row == t.row && e.column == t.column
    }
    function m(e) {
        if (e.$multiselectOnSessionChange)
            return;
        e.$onAddRange = e.$onAddRange.bind(e),
        e.$onRemoveRange = e.$onRemoveRange.bind(e),
        e.$onMultiSelect = e.$onMultiSelect.bind(e),
        e.$onSingleSelect = e.$onSingleSelect.bind(e),
        e.$multiselectOnSessionChange = t.onSessionChange.bind(e),
        e.$checkMultiselectChange = e.$checkMultiselectChange.bind(e),
        e.$multiselectOnSessionChange(e),
        e.on("changeSession", e.$multiselectOnSessionChange),
        e.on("mousedown", o),
        e.commands.addCommands(f.defaultCommands),
        g(e)
    }
    function g(e) {
        function r(t) {
            n && (e.renderer.setMouseCursor(""),
            n = !1)
        }
        if (!e.textInput)
            return;
        var t = e.textInput.getElement()
          , n = !1;
        u.addListener(t, "keydown", function(t) {
            var i = t.keyCode == 18 && !(t.ctrlKey || t.shiftKey || t.metaKey);
            e.$blockSelectEnabled && i ? n || (e.renderer.setMouseCursor("crosshair"),
            n = !0) : n && r()
        }),
        u.addListener(t, "keyup", r),
        u.addListener(t, "blur", r)
    }
    var r = e("./range_list").RangeList
      , i = e("./range").Range
      , s = e("./selection").Selection
      , o = e("./mouse/multi_select_handler").onMouseDown
      , u = e("./lib/event")
      , a = e("./lib/lang")
      , f = e("./commands/multi_select_commands");
    t.commands = f.defaultCommands.concat(f.multiSelectCommands);
    var l = e("./search").Search
      , c = new l
      , p = e("./edit_session").EditSession;
    (function() {
        this.getSelectionMarkers = function() {
            return this.$selectionMarkers
        }
    }
    ).call(p.prototype),
    function() {
        this.ranges = null,
        this.rangeList = null,
        this.addRange = function(e, t) {
            if (!e)
                return;
            if (!this.inMultiSelectMode && this.rangeCount === 0) {
                var n = this.toOrientedRange();
                this.rangeList.add(n),
                this.rangeList.add(e);
                if (this.rangeList.ranges.length != 2)
                    return this.rangeList.removeAll(),
                    t || this.fromOrientedRange(e);
                this.rangeList.removeAll(),
                this.rangeList.add(n),
                this.$onAddRange(n)
            }
            e.cursor || (e.cursor = e.end);
            var r = this.rangeList.add(e);
            return this.$onAddRange(e),
            r.length && this.$onRemoveRange(r),
            this.rangeCount > 1 && !this.inMultiSelectMode && (this._signal("multiSelect"),
            this.inMultiSelectMode = !0,
            this.session.$undoSelect = !1,
            this.rangeList.attach(this.session)),
            t || this.fromOrientedRange(e)
        }
        ,
        this.toSingleRange = function(e) {
            e = e || this.ranges[0];
            var t = this.rangeList.removeAll();
            t.length && this.$onRemoveRange(t),
            e && this.fromOrientedRange(e)
        }
        ,
        this.substractPoint = function(e) {
            var t = this.rangeList.substractPoint(e);
            if (t)
                return this.$onRemoveRange(t),
                t[0]
        }
        ,
        this.mergeOverlappingRanges = function() {
            var e = this.rangeList.merge();
            e.length && this.$onRemoveRange(e)
        }
        ,
        this.$onAddRange = function(e) {
            this.rangeCount = this.rangeList.ranges.length,
            this.ranges.unshift(e),
            this._signal("addRange", {
                range: e
            })
        }
        ,
        this.$onRemoveRange = function(e) {
            this.rangeCount = this.rangeList.ranges.length;
            if (this.rangeCount == 1 && this.inMultiSelectMode) {
                var t = this.rangeList.ranges.pop();
                e.push(t),
                this.rangeCount = 0
            }
            for (var n = e.length; n--; ) {
                var r = this.ranges.indexOf(e[n]);
                this.ranges.splice(r, 1)
            }
            this._signal("removeRange", {
                ranges: e
            }),
            this.rangeCount === 0 && this.inMultiSelectMode && (this.inMultiSelectMode = !1,
            this._signal("singleSelect"),
            this.session.$undoSelect = !0,
            this.rangeList.detach(this.session)),
            t = t || this.ranges[0],
            t && !t.isEqual(this.getRange()) && this.fromOrientedRange(t)
        }
        ,
        this.$initRangeList = function() {
            if (this.rangeList)
                return;
            this.rangeList = new r,
            this.ranges = [],
            this.rangeCount = 0
        }
        ,
        this.getAllRanges = function() {
            return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()]
        }
        ,
        this.splitIntoLines = function() {
            var e = this.ranges.length ? this.ranges : [this.getRange()]
              , t = [];
            for (var n = 0; n < e.length; n++) {
                var r = e[n]
                  , s = r.start.row
                  , o = r.end.row;
                if (s === o)
                    t.push(r.clone());
                else {
                    t.push(new i(s,r.start.column,s,this.session.getLine(s).length));
                    while (++s < o)
                        t.push(this.getLineRange(s, !0));
                    t.push(new i(o,0,o,r.end.column))
                }
                n == 0 && !this.isBackwards() && (t = t.reverse())
            }
            this.toSingleRange();
            for (var n = t.length; n--; )
                this.addRange(t[n])
        }
        ,
        this.joinSelections = function() {
            var e = this.rangeList.ranges
              , t = e[e.length - 1]
              , n = i.fromPoints(e[0].start, t.end);
            this.toSingleRange(),
            this.setSelectionRange(n, t.cursor == t.start)
        }
        ,
        this.toggleBlockSelection = function() {
            if (this.rangeCount > 1) {
                var e = this.rangeList.ranges
                  , t = e[e.length - 1]
                  , n = i.fromPoints(e[0].start, t.end);
                this.toSingleRange(),
                this.setSelectionRange(n, t.cursor == t.start)
            } else {
                var r = this.session.documentToScreenPosition(this.cursor)
                  , s = this.session.documentToScreenPosition(this.anchor)
                  , o = this.rectangularRangeBlock(r, s);
                o.forEach(this.addRange, this)
            }
        }
        ,
        this.rectangularRangeBlock = function(e, t, n) {
            var r = []
              , s = e.column < t.column;
            if (s)
                var o = e.column
                  , u = t.column
                  , a = e.offsetX
                  , f = t.offsetX;
            else
                var o = t.column
                  , u = e.column
                  , a = t.offsetX
                  , f = e.offsetX;
            var l = e.row < t.row;
            if (l)
                var c = e.row
                  , h = t.row;
            else
                var c = t.row
                  , h = e.row;
            o < 0 && (o = 0),
            c < 0 && (c = 0),
            c == h && (n = !0);
            var p;
            for (var d = c; d <= h; d++) {
                var m = i.fromPoints(this.session.screenToDocumentPosition(d, o, a), this.session.screenToDocumentPosition(d, u, f));
                if (m.isEmpty()) {
                    if (p && v(m.end, p))
                        break;
                    p = m.end
                }
                m.cursor = s ? m.start : m.end,
                r.push(m)
            }
            l && r.reverse();
            if (!n) {
                var g = r.length - 1;
                while (r[g].isEmpty() && g > 0)
                    g--;
                if (g > 0) {
                    var y = 0;
                    while (r[y].isEmpty())
                        y++
                }
                for (var b = g; b >= y; b--)
                    r[b].isEmpty() && r.splice(b, 1)
            }
            return r
        }
    }
    .call(s.prototype);
    var d = e("./editor").Editor;
    (function() {
        this.updateSelectionMarkers = function() {
            this.renderer.updateCursor(),
            this.renderer.updateBackMarkers()
        }
        ,
        this.addSelectionMarker = function(e) {
            e.cursor || (e.cursor = e.end);
            var t = this.getSelectionStyle();
            return e.marker = this.session.addMarker(e, "ace_selection", t),
            this.session.$selectionMarkers.push(e),
            this.session.selectionMarkerCount = this.session.$selectionMarkers.length,
            e
        }
        ,
        this.removeSelectionMarker = function(e) {
            if (!e.marker)
                return;
            this.session.removeMarker(e.marker);
            var t = this.session.$selectionMarkers.indexOf(e);
            t != -1 && this.session.$selectionMarkers.splice(t, 1),
            this.session.selectionMarkerCount = this.session.$selectionMarkers.length
        }
        ,
        this.removeSelectionMarkers = function(e) {
            var t = this.session.$selectionMarkers;
            for (var n = e.length; n--; ) {
                var r = e[n];
                if (!r.marker)
                    continue;
                this.session.removeMarker(r.marker);
                var i = t.indexOf(r);
                i != -1 && t.splice(i, 1)
            }
            this.session.selectionMarkerCount = t.length
        }
        ,
        this.$onAddRange = function(e) {
            this.addSelectionMarker(e.range),
            this.renderer.updateCursor(),
            this.renderer.updateBackMarkers()
        }
        ,
        this.$onRemoveRange = function(e) {
            this.removeSelectionMarkers(e.ranges),
            this.renderer.updateCursor(),
            this.renderer.updateBackMarkers()
        }
        ,
        this.$onMultiSelect = function(e) {
            if (this.inMultiSelectMode)
                return;
            this.inMultiSelectMode = !0,
            this.setStyle("ace_multiselect"),
            this.keyBinding.addKeyboardHandler(f.keyboardHandler),
            this.commands.setDefaultHandler("exec", this.$onMultiSelectExec),
            this.renderer.updateCursor(),
            this.renderer.updateBackMarkers()
        }
        ,
        this.$onSingleSelect = function(e) {
            if (this.session.multiSelect.inVirtualMode)
                return;
            this.inMultiSelectMode = !1,
            this.unsetStyle("ace_multiselect"),
            this.keyBinding.removeKeyboardHandler(f.keyboardHandler),
            this.commands.removeDefaultHandler("exec", this.$onMultiSelectExec),
            this.renderer.updateCursor(),
            this.renderer.updateBackMarkers(),
            this._emit("changeSelection")
        }
        ,
        this.$onMultiSelectExec = function(e) {
            var t = e.command
              , n = e.editor;
            if (!n.multiSelect)
                return;
            if (!t.multiSelectAction) {
                var r = t.exec(n, e.args || {});
                n.multiSelect.addRange(n.multiSelect.toOrientedRange()),
                n.multiSelect.mergeOverlappingRanges()
            } else
                t.multiSelectAction == "forEach" ? r = n.forEachSelection(t, e.args) : t.multiSelectAction == "forEachLine" ? r = n.forEachSelection(t, e.args, !0) : t.multiSelectAction == "single" ? (n.exitMultiSelectMode(),
                r = t.exec(n, e.args || {})) : r = t.multiSelectAction(n, e.args || {});
            return r
        }
        ,
        this.forEachSelection = function(e, t, n) {
            if (this.inVirtualSelectionMode)
                return;
            var r = n && n.keepOrder, i = n == 1 || n && n.$byLines, o = this.session, u = this.selection, a = u.rangeList, f = (r ? u : a).ranges, l;
            if (!f.length)
                return e.exec ? e.exec(this, t || {}) : e(this, t || {});
            var c = u._eventRegistry;
            u._eventRegistry = {};
            var h = new s(o);
            this.inVirtualSelectionMode = !0;
            for (var p = f.length; p--; ) {
                if (i)
                    while (p > 0 && f[p].start.row == f[p - 1].end.row)
                        p--;
                h.fromOrientedRange(f[p]),
                h.index = p,
                this.selection = o.selection = h;
                var d = e.exec ? e.exec(this, t || {}) : e(this, t || {});
                !l && d !== undefined && (l = d),
                h.toOrientedRange(f[p])
            }
            h.detach(),
            this.selection = o.selection = u,
            this.inVirtualSelectionMode = !1,
            u._eventRegistry = c,
            u.mergeOverlappingRanges(),
            u.ranges[0] && u.fromOrientedRange(u.ranges[0]);
            var v = this.renderer.$scrollAnimation;
            return this.onCursorChange(),
            this.onSelectionChange(),
            v && v.from == v.to && this.renderer.animateScrolling(v.from),
            l
        }
        ,
        this.exitMultiSelectMode = function() {
            if (!this.inMultiSelectMode || this.inVirtualSelectionMode)
                return;
            this.multiSelect.toSingleRange()
        }
        ,
        this.getSelectedText = function() {
            var e = "";
            if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {
                var t = this.multiSelect.rangeList.ranges
                  , n = [];
                for (var r = 0; r < t.length; r++)
                    n.push(this.session.getTextRange(t[r]));
                var i = this.session.getDocument().getNewLineCharacter();
                e = n.join(i),
                e.length == (n.length - 1) * i.length && (e = "")
            } else
                this.selection.isEmpty() || (e = this.session.getTextRange(this.getSelectionRange()));
            return e
        }
        ,
        this.$checkMultiselectChange = function(e, t) {
            if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {
                var n = this.multiSelect.ranges[0];
                if (this.multiSelect.isEmpty() && t == this.multiSelect.anchor)
                    return;
                var r = t == this.multiSelect.anchor ? n.cursor == n.start ? n.end : n.start : n.cursor;
                r.row != t.row || this.session.$clipPositionToDocument(r.row, r.column).column != t.column ? this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()) : this.multiSelect.mergeOverlappingRanges()
            }
        }
        ,
        this.findAll = function(e, t, n) {
            t = t || {},
            t.needle = e || t.needle;
            if (t.needle == undefined) {
                var r = this.selection.isEmpty() ? this.selection.getWordRange() : this.selection.getRange();
                t.needle = this.session.getTextRange(r)
            }
            this.$search.set(t);
            var i = this.$search.findAll(this.session);
            if (!i.length)
                return 0;
            var s = this.multiSelect;
            n || s.toSingleRange(i[0]);
            for (var o = i.length; o--; )
                s.addRange(i[o], !0);
            return r && s.rangeList.rangeAtPoint(r.start) && s.addRange(r, !0),
            i.length
        }
        ,
        this.selectMoreLines = function(e, t) {
            var n = this.selection.toOrientedRange()
              , r = n.cursor == n.end
              , s = this.session.documentToScreenPosition(n.cursor);
            this.selection.$desiredColumn && (s.column = this.selection.$desiredColumn);
            var o = this.session.screenToDocumentPosition(s.row + e, s.column);
            if (!n.isEmpty())
                var u = this.session.documentToScreenPosition(r ? n.end : n.start)
                  , a = this.session.screenToDocumentPosition(u.row + e, u.column);
            else
                var a = o;
            if (r) {
                var f = i.fromPoints(o, a);
                f.cursor = f.start
            } else {
                var f = i.fromPoints(a, o);
                f.cursor = f.end
            }
            f.desiredColumn = s.column;
            if (!this.selection.inMultiSelectMode)
                this.selection.addRange(n);
            else if (t)
                var l = n.cursor;
            this.selection.addRange(f),
            l && this.selection.substractPoint(l)
        }
        ,
        this.transposeSelections = function(e) {
            var t = this.session
              , n = t.multiSelect
              , r = n.ranges;
            for (var i = r.length; i--; ) {
                var s = r[i];
                if (s.isEmpty()) {
                    var o = t.getWordRange(s.start.row, s.start.column);
                    s.start.row = o.start.row,
                    s.start.column = o.start.column,
                    s.end.row = o.end.row,
                    s.end.column = o.end.column
                }
            }
            n.mergeOverlappingRanges();
            var u = [];
            for (var i = r.length; i--; ) {
                var s = r[i];
                u.unshift(t.getTextRange(s))
            }
            e < 0 ? u.unshift(u.pop()) : u.push(u.shift());
            for (var i = r.length; i--; ) {
                var s = r[i]
                  , o = s.clone();
                t.replace(s, u[i]),
                s.start.row = o.start.row,
                s.start.column = o.start.column
            }
            n.fromOrientedRange(n.ranges[0])
        }
        ,
        this.selectMore = function(e, t, n) {
            var r = this.session
              , i = r.multiSelect
              , s = i.toOrientedRange();
            if (s.isEmpty()) {
                s = r.getWordRange(s.start.row, s.start.column),
                s.cursor = e == -1 ? s.start : s.end,
                this.multiSelect.addRange(s);
                if (n)
                    return
            }
            var o = r.getTextRange(s)
              , u = h(r, o, e);
            u && (u.cursor = e == -1 ? u.start : u.end,
            this.session.unfold(u),
            this.multiSelect.addRange(u),
            this.renderer.scrollCursorIntoView(null, .5)),
            t && this.multiSelect.substractPoint(s.cursor)
        }
        ,
        this.alignCursors = function() {
            var e = this.session
              , t = e.multiSelect
              , n = t.ranges
              , r = -1
              , s = n.filter(function(e) {
                if (e.cursor.row == r)
                    return !0;
                r = e.cursor.row
            });
            if (!n.length || s.length == n.length - 1) {
                var o = this.selection.getRange()
                  , u = o.start.row
                  , f = o.end.row
                  , l = u == f;
                if (l) {
                    var c = this.session.getLength(), h;
                    do
                        h = this.session.getLine(f);
                    while (/[=:]/.test(h) && ++f < c);
                    do
                        h = this.session.getLine(u);
                    while (/[=:]/.test(h) && --u > 0);
                    u < 0 && (u = 0),
                    f >= c && (f = c - 1)
                }
                var p = this.session.removeFullLines(u, f);
                p = this.$reAlignText(p, l),
                this.session.insert({
                    row: u,
                    column: 0
                }, p.join("\n") + "\n"),
                l || (o.start.column = 0,
                o.end.column = p[p.length - 1].length),
                this.selection.setRange(o)
            } else {
                s.forEach(function(e) {
                    t.substractPoint(e.cursor)
                });
                var d = 0
                  , v = Infinity
                  , m = n.map(function(t) {
                    var n = t.cursor
                      , r = e.getLine(n.row)
                      , i = r.substr(n.column).search(/\S/g);
                    return i == -1 && (i = 0),
                    n.column > d && (d = n.column),
                    i < v && (v = i),
                    i
                });
                n.forEach(function(t, n) {
                    var r = t.cursor
                      , s = d - r.column
                      , o = m[n] - v;
                    s > o ? e.insert(r, a.stringRepeat(" ", s - o)) : e.remove(new i(r.row,r.column,r.row,r.column - s + o)),
                    t.start.column = t.end.column = d,
                    t.start.row = t.end.row = r.row,
                    t.cursor = t.end
                }),
                t.fromOrientedRange(n[0]),
                this.renderer.updateCursor(),
                this.renderer.updateBackMarkers()
            }
        }
        ,
        this.$reAlignText = function(e, t) {
            function u(e) {
                return a.stringRepeat(" ", e)
            }
            function f(e) {
                return e[2] ? u(i) + e[2] + u(s - e[2].length + o) + e[4].replace(/^([=:])\s+/, "$1 ") : e[0]
            }
            function l(e) {
                return e[2] ? u(i + s - e[2].length) + e[2] + u(o) + e[4].replace(/^([=:])\s+/, "$1 ") : e[0]
            }
            function c(e) {
                return e[2] ? u(i) + e[2] + u(o) + e[4].replace(/^([=:])\s+/, "$1 ") : e[0]
            }
            var n = !0, r = !0, i, s, o;
            return e.map(function(e) {
                var t = e.match(/(\s*)(.*?)(\s*)([=:].*)/);
                return t ? i == null ? (i = t[1].length,
                s = t[2].length,
                o = t[3].length,
                t) : (i + s + o != t[1].length + t[2].length + t[3].length && (r = !1),
                i != t[1].length && (n = !1),
                i > t[1].length && (i = t[1].length),
                s < t[2].length && (s = t[2].length),
                o > t[3].length && (o = t[3].length),
                t) : [e]
            }).map(t ? f : n ? r ? l : f : c)
        }
    }
    ).call(d.prototype),
    t.onSessionChange = function(e) {
        var t = e.session;
        t && !t.multiSelect && (t.$selectionMarkers = [],
        t.selection.$initRangeList(),
        t.multiSelect = t.selection),
        this.multiSelect = t && t.multiSelect;
        var n = e.oldSession;
        n && (n.multiSelect.off("addRange", this.$onAddRange),
        n.multiSelect.off("removeRange", this.$onRemoveRange),
        n.multiSelect.off("multiSelect", this.$onMultiSelect),
        n.multiSelect.off("singleSelect", this.$onSingleSelect),
        n.multiSelect.lead.off("change", this.$checkMultiselectChange),
        n.multiSelect.anchor.off("change", this.$checkMultiselectChange)),
        t && (t.multiSelect.on("addRange", this.$onAddRange),
        t.multiSelect.on("removeRange", this.$onRemoveRange),
        t.multiSelect.on("multiSelect", this.$onMultiSelect),
        t.multiSelect.on("singleSelect", this.$onSingleSelect),
        t.multiSelect.lead.on("change", this.$checkMultiselectChange),
        t.multiSelect.anchor.on("change", this.$checkMultiselectChange)),
        t && this.inMultiSelectMode != t.selection.inMultiSelectMode && (t.selection.inMultiSelectMode ? this.$onMultiSelect() : this.$onSingleSelect())
    }
    ,
    t.MultiSelect = m,
    e("./config").defineOptions(d.prototype, "editor", {
        enableMultiselect: {
            set: function(e) {
                m(this),
                e ? (this.on("changeSession", this.$multiselectOnSessionChange),
                this.on("mousedown", o)) : (this.off("changeSession", this.$multiselectOnSessionChange),
                this.off("mousedown", o))
            },
            value: !0
        },
        enableBlockSelect: {
            set: function(e) {
                this.$blockSelectEnabled = e
            },
            value: !0
        }
    })
}),
define("ace/mode/folding/fold_mode", ["require", "exports", "module", "ace/range"], function(e, t, n) {
    "use strict";
    var r = e("../../range").Range
      , i = t.FoldMode = function() {}
    ;
    (function() {
        this.foldingStartMarker = null,
        this.foldingStopMarker = null,
        this.getFoldWidget = function(e, t, n) {
            var r = e.getLine(n);
            return this.foldingStartMarker.test(r) ? "start" : t == "markbeginend" && this.foldingStopMarker && this.foldingStopMarker.test(r) ? "end" : ""
        }
        ,
        this.getFoldWidgetRange = function(e, t, n) {
            return null
        }
        ,
        this.indentationBlock = function(e, t, n) {
            var i = /\S/
              , s = e.getLine(t)
              , o = s.search(i);
            if (o == -1)
                return;
            var u = n || s.length
              , a = e.getLength()
              , f = t
              , l = t;
            while (++t < a) {
                var c = e.getLine(t).search(i);
                if (c == -1)
                    continue;
                if (c <= o) {
                    var h = e.getTokenAt(t, 0);
                    if (!h || h.type !== "string")
                        break
                }
                l = t
            }
            if (l > f) {
                var p = e.getLine(l).length;
                return new r(f,u,l,p)
            }
        }
        ,
        this.openingBracketBlock = function(e, t, n, i, s) {
            var o = {
                row: n,
                column: i + 1
            }
              , u = e.$findClosingBracket(t, o, s);
            if (!u)
                return;
            var a = e.foldWidgets[u.row];
            return a == null && (a = e.getFoldWidget(u.row)),
            a == "start" && u.row > o.row && (u.row--,
            u.column = e.getLine(u.row).length),
            r.fromPoints(o, u)
        }
        ,
        this.closingBracketBlock = function(e, t, n, i, s) {
            var o = {
                row: n,
                column: i
            }
              , u = e.$findOpeningBracket(t, o);
            if (!u)
                return;
            return u.column++,
            o.column--,
            r.fromPoints(u, o)
        }
    }
    ).call(i.prototype)
}),
define("ace/theme/textmate", ["require", "exports", "module", "ace/lib/dom"], function(e, t, n) {
    "use strict";
    t.isDark = !1,
    t.cssClass = "ace-tm",
    t.cssText = '.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',
    t.$id = "ace/theme/textmate";
    var r = e("../lib/dom");
    r.importCssString(t.cssText, t.cssClass)
}),
define("ace/line_widgets", ["require", "exports", "module", "ace/lib/dom"], function(e, t, n) {
    "use strict";
    function i(e) {
        this.session = e,
        this.session.widgetManager = this,
        this.session.getRowLength = this.getRowLength,
        this.session.$getWidgetScreenLength = this.$getWidgetScreenLength,
        this.updateOnChange = this.updateOnChange.bind(this),
        this.renderWidgets = this.renderWidgets.bind(this),
        this.measureWidgets = this.measureWidgets.bind(this),
        this.session._changedWidgets = [],
        this.$onChangeEditor = this.$onChangeEditor.bind(this),
        this.session.on("change", this.updateOnChange),
        this.session.on("changeFold", this.updateOnFold),
        this.session.on("changeEditor", this.$onChangeEditor)
    }
    var r = e("./lib/dom");
    (function() {
        this.getRowLength = function(e) {
            var t;
            return this.lineWidgets ? t = this.lineWidgets[e] && this.lineWidgets[e].rowCount || 0 : t = 0,
            !this.$useWrapMode || !this.$wrapData[e] ? 1 + t : this.$wrapData[e].length + 1 + t
        }
        ,
        this.$getWidgetScreenLength = function() {
            var e = 0;
            return this.lineWidgets.forEach(function(t) {
                t && t.rowCount && !t.hidden && (e += t.rowCount)
            }),
            e
        }
        ,
        this.$onChangeEditor = function(e) {
            this.attach(e.editor)
        }
        ,
        this.attach = function(e) {
            e && e.widgetManager && e.widgetManager != this && e.widgetManager.detach();
            if (this.editor == e)
                return;
            this.detach(),
            this.editor = e,
            e && (e.widgetManager = this,
            e.renderer.on("beforeRender", this.measureWidgets),
            e.renderer.on("afterRender", this.renderWidgets))
        }
        ,
        this.detach = function(e) {
            var t = this.editor;
            if (!t)
                return;
            this.editor = null,
            t.widgetManager = null,
            t.renderer.off("beforeRender", this.measureWidgets),
            t.renderer.off("afterRender", this.renderWidgets);
            var n = this.session.lineWidgets;
            n && n.forEach(function(e) {
                e && e.el && e.el.parentNode && (e._inDocument = !1,
                e.el.parentNode.removeChild(e.el))
            })
        }
        ,
        this.updateOnFold = function(e, t) {
            var n = t.lineWidgets;
            if (!n || !e.action)
                return;
            var r = e.data
              , i = r.start.row
              , s = r.end.row
              , o = e.action == "add";
            for (var u = i + 1; u < s; u++)
                n[u] && (n[u].hidden = o);
            n[s] && (o ? n[i] ? n[s].hidden = o : n[i] = n[s] : (n[i] == n[s] && (n[i] = undefined),
            n[s].hidden = o))
        }
        ,
        this.updateOnChange = function(e) {
            var t = this.session.lineWidgets;
            if (!t)
                return;
            var n = e.start.row
              , r = e.end.row - n;
            if (r !== 0)
                if (e.action == "remove") {
                    var i = t.splice(n + 1, r);
                    !t[n] && i[i.length - 1] && (t[n] = i.pop()),
                    i.forEach(function(e) {
                        e && this.removeLineWidget(e)
                    }, this),
                    this.$updateRows()
                } else {
                    var s = new Array(r);
                    t[n] && t[n].column != null && e.start.column > t[n].column && n++,
                    s.unshift(n, 0),
                    t.splice.apply(t, s),
                    this.$updateRows()
                }
        }
        ,
        this.$updateRows = function() {
            var e = this.session.lineWidgets;
            if (!e)
                return;
            var t = !0;
            e.forEach(function(e, n) {
                if (e) {
                    t = !1,
                    e.row = n;
                    while (e.$oldWidget)
                        e.$oldWidget.row = n,
                        e = e.$oldWidget
                }
            }),
            t && (this.session.lineWidgets = null)
        }
        ,
        this.$registerLineWidget = function(e) {
            this.session.lineWidgets || (this.session.lineWidgets = new Array(this.session.getLength()));
            var t = this.session.lineWidgets[e.row];
            return t && (e.$oldWidget = t,
            t.el && t.el.parentNode && (t.el.parentNode.removeChild(t.el),
            t._inDocument = !1)),
            this.session.lineWidgets[e.row] = e,
            e
        }
        ,
        this.addLineWidget = function(e) {
            this.$registerLineWidget(e),
            e.session = this.session;
            if (!this.editor)
                return e;
            var t = this.editor.renderer;
            e.html && !e.el && (e.el = r.createElement("div"),
            e.el.innerHTML = e.html),
            e.el && (r.addCssClass(e.el, "ace_lineWidgetContainer"),
            e.el.style.position = "absolute",
            e.el.style.zIndex = 5,
            t.container.appendChild(e.el),
            e._inDocument = !0,
            e.coverGutter || (e.el.style.zIndex = 3),
            e.pixelHeight == null && (e.pixelHeight = e.el.offsetHeight)),
            e.rowCount == null && (e.rowCount = e.pixelHeight / t.layerConfig.lineHeight);
            var n = this.session.getFoldAt(e.row, 0);
            e.$fold = n;
            if (n) {
                var i = this.session.lineWidgets;
                e.row == n.end.row && !i[n.start.row] ? i[n.start.row] = e : e.hidden = !0
            }
            return this.session._emit("changeFold", {
                data: {
                    start: {
                        row: e.row
                    }
                }
            }),
            this.$updateRows(),
            this.renderWidgets(null, t),
            this.onWidgetChanged(e),
            e
        }
        ,
        this.removeLineWidget = function(e) {
            e._inDocument = !1,
            e.session = null,
            e.el && e.el.parentNode && e.el.parentNode.removeChild(e.el);
            if (e.editor && e.editor.destroy)
                try {
                    e.editor.destroy()
                } catch (t) {}
            if (this.session.lineWidgets) {
                var n = this.session.lineWidgets[e.row];
                if (n == e)
                    this.session.lineWidgets[e.row] = e.$oldWidget,
                    e.$oldWidget && this.onWidgetChanged(e.$oldWidget);
                else
                    while (n) {
                        if (n.$oldWidget == e) {
                            n.$oldWidget = e.$oldWidget;
                            break
                        }
                        n = n.$oldWidget
                    }
            }
            this.session._emit("changeFold", {
                data: {
                    start: {
                        row: e.row
                    }
                }
            }),
            this.$updateRows()
        }
        ,
        this.getWidgetsAtRow = function(e) {
            var t = this.session.lineWidgets
              , n = t && t[e]
              , r = [];
            while (n)
                r.push(n),
                n = n.$oldWidget;
            return r
        }
        ,
        this.onWidgetChanged = function(e) {
            this.session._changedWidgets.push(e),
            this.editor && this.editor.renderer.updateFull()
        }
        ,
        this.measureWidgets = function(e, t) {
            var n = this.session._changedWidgets
              , r = t.layerConfig;
            if (!n || !n.length)
                return;
            var i = Infinity;
            for (var s = 0; s < n.length; s++) {
                var o = n[s];
                if (!o || !o.el)
                    continue;
                if (o.session != this.session)
                    continue;
                if (!o._inDocument) {
                    if (this.session.lineWidgets[o.row] != o)
                        continue;
                    o._inDocument = !0,
                    t.container.appendChild(o.el)
                }
                o.h = o.el.offsetHeight,
                o.fixedWidth || (o.w = o.el.offsetWidth,
                o.screenWidth = Math.ceil(o.w / r.characterWidth));
                var u = o.h / r.lineHeight;
                o.coverLine && (u -= this.session.getRowLineCount(o.row),
                u < 0 && (u = 0)),
                o.rowCount != u && (o.rowCount = u,
                o.row < i && (i = o.row))
            }
            i != Infinity && (this.session._emit("changeFold", {
                data: {
                    start: {
                        row: i
                    }
                }
            }),
            this.session.lineWidgetWidth = null),
            this.session._changedWidgets = []
        }
        ,
        this.renderWidgets = function(e, t) {
            var n = t.layerConfig
              , r = this.session.lineWidgets;
            if (!r)
                return;
            var i = Math.min(this.firstRow, n.firstRow)
              , s = Math.max(this.lastRow, n.lastRow, r.length);
            while (i > 0 && !r[i])
                i--;
            this.firstRow = n.firstRow,
            this.lastRow = n.lastRow,
            t.$cursorLayer.config = n;
            for (var o = i; o <= s; o++) {
                var u = r[o];
                if (!u || !u.el)
                    continue;
                if (u.hidden) {
                    u.el.style.top = -100 - (u.pixelHeight || 0) + "px";
                    continue
                }
                u._inDocument || (u._inDocument = !0,
                t.container.appendChild(u.el));
                var a = t.$cursorLayer.getPixelPosition({
                    row: o,
                    column: 0
                }, !0).top;
                u.coverLine || (a += n.lineHeight * this.session.getRowLineCount(u.row)),
                u.el.style.top = a - n.offset + "px";
                var f = u.coverGutter ? 0 : t.gutterWidth;
                u.fixedWidth || (f -= t.scrollLeft),
                u.el.style.left = f + "px",
                u.fullWidth && u.screenWidth && (u.el.style.minWidth = n.width + 2 * n.padding + "px"),
                u.fixedWidth ? u.el.style.right = t.scrollBar.getWidth() + "px" : u.el.style.right = ""
            }
        }
    }
    ).call(i.prototype),
    t.LineWidgets = i
}),
define("ace/ext/error_marker", ["require", "exports", "module", "ace/line_widgets", "ace/lib/dom", "ace/range"], function(e, t, n) {
    "use strict";
    function o(e, t, n) {
        var r = 0
          , i = e.length - 1;
        while (r <= i) {
            var s = r + i >> 1
              , o = n(t, e[s]);
            if (o > 0)
                r = s + 1;
            else {
                if (!(o < 0))
                    return s;
                i = s - 1
            }
        }
        return -(r + 1)
    }
    function u(e, t, n) {
        var r = e.getAnnotations().sort(s.comparePoints);
        if (!r.length)
            return;
        var i = o(r, {
            row: t,
            column: -1
        }, s.comparePoints);
        i < 0 && (i = -i - 1),
        i >= r.length ? i = n > 0 ? 0 : r.length - 1 : i === 0 && n < 0 && (i = r.length - 1);
        var u = r[i];
        if (!u || !n)
            return;
        if (u.row === t) {
            do
                u = r[i += n];
            while (u && u.row === t);
            if (!u)
                return r.slice()
        }
        var a = [];
        t = u.row;
        do
            a[n < 0 ? "unshift" : "push"](u),
            u = r[i += n];
        while (u && u.row == t);
        return a.length && a
    }
    var r = e("../line_widgets").LineWidgets
      , i = e("../lib/dom")
      , s = e("../range").Range;
    t.showErrorMarker = function(e, t) {
        var n = e.session;
        n.widgetManager || (n.widgetManager = new r(n),
        n.widgetManager.attach(e));
        var s = e.getCursorPosition()
          , o = s.row
          , a = n.widgetManager.getWidgetsAtRow(o).filter(function(e) {
            return e.type == "errorMarker"
        })[0];
        a ? a.destroy() : o -= t;
        var f = u(n, o, t), l;
        if (f) {
            var c = f[0];
            s.column = (c.pos && typeof c.column != "number" ? c.pos.sc : c.column) || 0,
            s.row = c.row,
            l = e.renderer.$gutterLayer.$annotations[s.row]
        } else {
            if (a)
                return;
            l = {
                text: ["Looks good!"],
                className: "ace_ok"
            }
        }
        e.session.unfold(s.row),
        e.selection.moveToPosition(s);
        var h = {
            row: s.row,
            fixedWidth: !0,
            coverGutter: !0,
            el: i.createElement("div"),
            type: "errorMarker"
        }
          , p = h.el.appendChild(i.createElement("div"))
          , d = h.el.appendChild(i.createElement("div"));
        d.className = "error_widget_arrow " + l.className;
        var v = e.renderer.$cursorLayer.getPixelPosition(s).left;
        d.style.left = v + e.renderer.gutterWidth - 5 + "px",
        h.el.className = "error_widget_wrapper",
        p.className = "error_widget " + l.className,
        p.innerHTML = l.text.join("<br>"),
        p.appendChild(i.createElement("div"));
        var m = function(e, t, n) {
            if (t === 0 && (n === "esc" || n === "return"))
                return h.destroy(),
                {
                    command: "null"
                }
        };
        h.destroy = function() {
            if (e.$mouseHandler.isMousePressed)
                return;
            e.keyBinding.removeKeyboardHandler(m),
            n.widgetManager.removeLineWidget(h),
            e.off("changeSelection", h.destroy),
            e.off("changeSession", h.destroy),
            e.off("mouseup", h.destroy),
            e.off("change", h.destroy)
        }
        ,
        e.keyBinding.addKeyboardHandler(m),
        e.on("changeSelection", h.destroy),
        e.on("changeSession", h.destroy),
        e.on("mouseup", h.destroy),
        e.on("change", h.destroy),
        e.session.widgetManager.addLineWidget(h),
        h.el.onmousedown = e.focus.bind(e),
        e.renderer.scrollCursorIntoView(null, .5, {
            bottom: h.el.offsetHeight
        })
    }
    ,
    i.importCssString("    .error_widget_wrapper {        background: inherit;        color: inherit;        border:none    }    .error_widget {        border-top: solid 2px;        border-bottom: solid 2px;        margin: 5px 0;        padding: 10px 40px;        white-space: pre-wrap;    }    .error_widget.ace_error, .error_widget_arrow.ace_error{        border-color: #ff5a5a    }    .error_widget.ace_warning, .error_widget_arrow.ace_warning{        border-color: #F1D817    }    .error_widget.ace_info, .error_widget_arrow.ace_info{        border-color: #5a5a5a    }    .error_widget.ace_ok, .error_widget_arrow.ace_ok{        border-color: #5aaa5a    }    .error_widget_arrow {        position: absolute;        border: solid 5px;        border-top-color: transparent!important;        border-right-color: transparent!important;        border-left-color: transparent!important;        top: -5px;    }", "")
}),
define("ace/ace", ["require", "exports", "module", "ace/lib/fixoldbrowsers", "ace/lib/dom", "ace/lib/event", "ace/range", "ace/editor", "ace/edit_session", "ace/undomanager", "ace/virtual_renderer", "ace/worker/worker_client", "ace/keyboard/hash_handler", "ace/placeholder", "ace/multi_select", "ace/mode/folding/fold_mode", "ace/theme/textmate", "ace/ext/error_marker", "ace/config"], function(e, t, n) {
    "use strict";
    e("./lib/fixoldbrowsers");
    var r = e("./lib/dom")
      , i = e("./lib/event")
      , s = e("./range").Range
      , o = e("./editor").Editor
      , u = e("./edit_session").EditSession
      , a = e("./undomanager").UndoManager
      , f = e("./virtual_renderer").VirtualRenderer;
    e("./worker/worker_client"),
    e("./keyboard/hash_handler"),
    e("./placeholder"),
    e("./multi_select"),
    e("./mode/folding/fold_mode"),
    e("./theme/textmate"),
    e("./ext/error_marker"),
    t.config = e("./config"),
    t.require = e,
    typeof define == "function" && (t.define = define),
    t.edit = function(e, n) {
        if (typeof e == "string") {
            var s = e;
            e = document.getElementById(s);
            if (!e)
                throw new Error("ace.edit can't find div #" + s)
        }
        if (e && e.env && e.env.editor instanceof o)
            return e.env.editor;
        var u = "";
        if (e && /input|textarea/i.test(e.tagName)) {
            var a = e;
            u = a.value,
            e = r.createElement("pre"),
            a.parentNode.replaceChild(e, a)
        } else
            e && (u = e.textContent,
            e.innerHTML = "");
        var l = t.createEditSession(u)
          , c = new o(new f(e),l,n)
          , h = {
            document: l,
            editor: c,
            onResize: c.resize.bind(c, null)
        };
        return a && (h.textarea = a),
        i.addListener(window, "resize", h.onResize),
        c.on("destroy", function() {
            i.removeListener(window, "resize", h.onResize),
            h.editor.container.env = null
        }),
        c.container.env = c.env = h,
        c
    }
    ,
    t.createEditSession = function(e, t) {
        var n = new u(e,t);
        return n.setUndoManager(new a),
        n
    }
    ,
    t.Range = s,
    t.Editor = o,
    t.EditSession = u,
    t.UndoManager = a,
    t.VirtualRenderer = f,
    t.version = t.config.version
});
(function() {
    window.require(["ace/ace"], function(a) {
        if (a) {
            a.config.init(true);
            a.define = window.define;
        }
        if (!window.ace)
            window.ace = a;
        for (var key in a)
            if (a.hasOwnProperty(key))
                window.ace[key] = a[key];
        window.ace["default"] = window.ace;
        if (typeof module == "object" && typeof exports == "object" && module) {
            module.exports = window.ace;
        }
    });
}
)();
define("ace/snippets", ["require", "exports", "module", "ace/lib/oop", "ace/lib/event_emitter", "ace/lib/lang", "ace/range", "ace/range_list", "ace/keyboard/hash_handler", "ace/tokenizer", "ace/clipboard", "ace/lib/dom", "ace/editor"], function(e, t, n) {
    "use strict";
    function h(e) {
        var t = (new Date).toLocaleString("en-us", e);
        return t.length == 1 ? "0" + t : t
    }
    var r = e("./lib/oop")
      , i = e("./lib/event_emitter").EventEmitter
      , s = e("./lib/lang")
      , o = e("./range").Range
      , u = e("./range_list").RangeList
      , a = e("./keyboard/hash_handler").HashHandler
      , f = e("./tokenizer").Tokenizer
      , l = e("./clipboard")
      , c = {
        CURRENT_WORD: function(e) {
            return e.session.getTextRange(e.session.getWordRange())
        },
        SELECTION: function(e, t, n) {
            var r = e.session.getTextRange();
            return n ? r.replace(/\n\r?([ \t]*\S)/g, "\n" + n + "$1") : r
        },
        CURRENT_LINE: function(e) {
            return e.session.getLine(e.getCursorPosition().row)
        },
        PREV_LINE: function(e) {
            return e.session.getLine(e.getCursorPosition().row - 1)
        },
        LINE_INDEX: function(e) {
            return e.getCursorPosition().row
        },
        LINE_NUMBER: function(e) {
            return e.getCursorPosition().row + 1
        },
        SOFT_TABS: function(e) {
            return e.session.getUseSoftTabs() ? "YES" : "NO"
        },
        TAB_SIZE: function(e) {
            return e.session.getTabSize()
        },
        CLIPBOARD: function(e) {
            return l.getText && l.getText()
        },
        FILENAME: function(e) {
            return /[^/\\]*$/.exec(this.FILEPATH(e))[0]
        },
        FILENAME_BASE: function(e) {
            return /[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/, "")
        },
        DIRECTORY: function(e) {
            return this.FILEPATH(e).replace(/[^/\\]*$/, "")
        },
        FILEPATH: function(e) {
            return "/not implemented.txt"
        },
        WORKSPACE_NAME: function() {
            return "Unknown"
        },
        FULLNAME: function() {
            return "Unknown"
        },
        BLOCK_COMMENT_START: function(e) {
            var t = e.session.$mode || {};
            return t.blockComment && t.blockComment.start || ""
        },
        BLOCK_COMMENT_END: function(e) {
            var t = e.session.$mode || {};
            return t.blockComment && t.blockComment.end || ""
        },
        LINE_COMMENT: function(e) {
            var t = e.session.$mode || {};
            return t.lineCommentStart || ""
        },
        CURRENT_YEAR: h.bind(null, {
            year: "numeric"
        }),
        CURRENT_YEAR_SHORT: h.bind(null, {
            year: "2-digit"
        }),
        CURRENT_MONTH: h.bind(null, {
            month: "numeric"
        }),
        CURRENT_MONTH_NAME: h.bind(null, {
            month: "long"
        }),
        CURRENT_MONTH_NAME_SHORT: h.bind(null, {
            month: "short"
        }),
        CURRENT_DATE: h.bind(null, {
            day: "2-digit"
        }),
        CURRENT_DAY_NAME: h.bind(null, {
            weekday: "long"
        }),
        CURRENT_DAY_NAME_SHORT: h.bind(null, {
            weekday: "short"
        }),
        CURRENT_HOUR: h.bind(null, {
            hour: "2-digit",
            hour12: !1
        }),
        CURRENT_MINUTE: h.bind(null, {
            minute: "2-digit"
        }),
        CURRENT_SECOND: h.bind(null, {
            second: "2-digit"
        })
    };
    c.SELECTED_TEXT = c.SELECTION;
    var p = function() {
        this.snippetMap = {},
        this.snippetNameMap = {}
    };
    (function() {
        r.implement(this, i),
        this.getTokenizer = function() {
            return p.$tokenizer || this.createTokenizer()
        }
        ,
        this.createTokenizer = function() {
            function e(e) {
                return e = e.substr(1),
                /^\d+$/.test(e) ? [{
                    tabstopId: parseInt(e, 10)
                }] : [{
                    text: e
                }]
            }
            function t(e) {
                return "(?:[^\\\\" + e + "]|\\\\.)"
            }
            var n = {
                regex: "/(" + t("/") + "+)/",
                onMatch: function(e, t, n) {
                    var r = n[0];
                    return r.fmtString = !0,
                    r.guard = e.slice(1, -1),
                    r.flag = "",
                    ""
                },
                next: "formatString"
            };
            return p.$tokenizer = new f({
                start: [{
                    regex: /\\./,
                    onMatch: function(e, t, n) {
                        var r = e[1];
                        return r == "}" && n.length ? e = r : "`$\\".indexOf(r) != -1 && (e = r),
                        [e]
                    }
                }, {
                    regex: /}/,
                    onMatch: function(e, t, n) {
                        return [n.length ? n.shift() : e]
                    }
                }, {
                    regex: /\$(?:\d+|\w+)/,
                    onMatch: e
                }, {
                    regex: /\$\{[\dA-Z_a-z]+/,
                    onMatch: function(t, n, r) {
                        var i = e(t.substr(1));
                        return r.unshift(i[0]),
                        i
                    },
                    next: "snippetVar"
                }, {
                    regex: /\n/,
                    token: "newline",
                    merge: !1
                }],
                snippetVar: [{
                    regex: "\\|" + t("\\|") + "*\\|",
                    onMatch: function(e, t, n) {
                        var r = e.slice(1, -1).replace(/\\[,|\\]|,/g, function(e) {
                            return e.length == 2 ? e[1] : "\0"
                        }).split("\0");
                        return n[0].choices = r,
                        [r[0]]
                    },
                    next: "start"
                }, n, {
                    regex: "([^:}\\\\]|\\\\.)*:?",
                    token: "",
                    next: "start"
                }],
                formatString: [{
                    regex: /:/,
                    onMatch: function(e, t, n) {
                        return n.length && n[0].expectElse ? (n[0].expectElse = !1,
                        n[0].ifEnd = {
                            elseEnd: n[0]
                        },
                        [n[0].ifEnd]) : ":"
                    }
                }, {
                    regex: /\\./,
                    onMatch: function(e, t, n) {
                        var r = e[1];
                        return r == "}" && n.length ? e = r : "`$\\".indexOf(r) != -1 ? e = r : r == "n" ? e = "\n" : r == "t" ? e = "	" : "ulULE".indexOf(r) != -1 && (e = {
                            changeCase: r,
                            local: r > "a"
                        }),
                        [e]
                    }
                }, {
                    regex: "/\\w*}",
                    onMatch: function(e, t, n) {
                        var r = n.shift();
                        return r && (r.flag = e.slice(1, -1)),
                        this.next = r && r.tabstopId ? "start" : "",
                        [r || e]
                    },
                    next: "start"
                }, {
                    regex: /\$(?:\d+|\w+)/,
                    onMatch: function(e, t, n) {
                        return [{
                            text: e.slice(1)
                        }]
                    }
                }, {
                    regex: /\${\w+/,
                    onMatch: function(e, t, n) {
                        var r = {
                            text: e.slice(2)
                        };
                        return n.unshift(r),
                        [r]
                    },
                    next: "formatStringVar"
                }, {
                    regex: /\n/,
                    token: "newline",
                    merge: !1
                }, {
                    regex: /}/,
                    onMatch: function(e, t, n) {
                        var r = n.shift();
                        return this.next = r && r.tabstopId ? "start" : "",
                        [r || e]
                    },
                    next: "start"
                }],
                formatStringVar: [{
                    regex: /:\/\w+}/,
                    onMatch: function(e, t, n) {
                        var r = n[0];
                        return r.formatFunction = e.slice(2, -1),
                        [n.shift()]
                    },
                    next: "formatString"
                }, n, {
                    regex: /:[\?\-+]?/,
                    onMatch: function(e, t, n) {
                        e[1] == "+" && (n[0].ifEnd = n[0]),
                        e[1] == "?" && (n[0].expectElse = !0)
                    },
                    next: "formatString"
                }, {
                    regex: "([^:}\\\\]|\\\\.)*:?",
                    token: "",
                    next: "formatString"
                }]
            }),
            p.$tokenizer
        }
        ,
        this.tokenizeTmSnippet = function(e, t) {
            return this.getTokenizer().getLineTokens(e, t).tokens.map(function(e) {
                return e.value || e
            })
        }
        ,
        this.getVariableValue = function(e, t, n) {
            if (/^\d+$/.test(t))
                return (this.variables.__ || {})[t] || "";
            if (/^[A-Z]\d+$/.test(t))
                return (this.variables[t[0] + "__"] || {})[t.substr(1)] || "";
            t = t.replace(/^TM_/, "");
            if (!this.variables.hasOwnProperty(t))
                return "";
            var r = this.variables[t];
            return typeof r == "function" && (r = this.variables[t](e, t, n)),
            r == null ? "" : r
        }
        ,
        this.variables = c,
        this.tmStrFormat = function(e, t, n) {
            if (!t.fmt)
                return e;
            var r = t.flag || ""
              , i = t.guard;
            i = new RegExp(i,r.replace(/[^gim]/g, ""));
            var s = typeof t.fmt == "string" ? this.tokenizeTmSnippet(t.fmt, "formatString") : t.fmt
              , o = this
              , u = e.replace(i, function() {
                var e = o.variables.__;
                o.variables.__ = [].slice.call(arguments);
                var t = o.resolveVariables(s, n)
                  , r = "E";
                for (var i = 0; i < t.length; i++) {
                    var u = t[i];
                    if (typeof u == "object") {
                        t[i] = "";
                        if (u.changeCase && u.local) {
                            var a = t[i + 1];
                            a && typeof a == "string" && (u.changeCase == "u" ? t[i] = a[0].toUpperCase() : t[i] = a[0].toLowerCase(),
                            t[i + 1] = a.substr(1))
                        } else
                            u.changeCase && (r = u.changeCase)
                    } else
                        r == "U" ? t[i] = u.toUpperCase() : r == "L" && (t[i] = u.toLowerCase())
                }
                return o.variables.__ = e,
                t.join("")
            });
            return u
        }
        ,
        this.tmFormatFunction = function(e, t, n) {
            return t.formatFunction == "upcase" ? e.toUpperCase() : t.formatFunction == "downcase" ? e.toLowerCase() : e
        }
        ,
        this.resolveVariables = function(e, t) {
            function f(t) {
                var n = e.indexOf(t, s + 1);
                n != -1 && (s = n)
            }
            var n = []
              , r = ""
              , i = !0;
            for (var s = 0; s < e.length; s++) {
                var o = e[s];
                if (typeof o == "string") {
                    n.push(o),
                    o == "\n" ? (i = !0,
                    r = "") : i && (r = /^\t*/.exec(o)[0],
                    i = /\S/.test(o));
                    continue
                }
                if (!o)
                    continue;
                i = !1;
                if (o.fmtString) {
                    var u = e.indexOf(o, s + 1);
                    u == -1 && (u = e.length),
                    o.fmt = e.slice(s + 1, u),
                    s = u
                }
                if (o.text) {
                    var a = this.getVariableValue(t, o.text, r) + "";
                    o.fmtString && (a = this.tmStrFormat(a, o, t)),
                    o.formatFunction && (a = this.tmFormatFunction(a, o, t)),
                    a && !o.ifEnd ? (n.push(a),
                    f(o)) : !a && o.ifEnd && f(o.ifEnd)
                } else
                    o.elseEnd ? f(o.elseEnd) : o.tabstopId != null ? n.push(o) : o.changeCase != null && n.push(o)
            }
            return n
        }
        ,
        this.insertSnippetForSelection = function(e, t) {
            function f(e) {
                var t = [];
                for (var n = 0; n < e.length; n++) {
                    var r = e[n];
                    if (typeof r == "object") {
                        if (a[r.tabstopId])
                            continue;
                        var i = e.lastIndexOf(r, n - 1);
                        r = t[i] || {
                            tabstopId: r.tabstopId
                        }
                    }
                    t[n] = r
                }
                return t
            }
            var n = e.getCursorPosition()
              , r = e.session.getLine(n.row)
              , i = e.session.getTabString()
              , s = r.match(/^\s*/)[0];
            n.column < s.length && (s = s.slice(0, n.column)),
            t = t.replace(/\r/g, "");
            var o = this.tokenizeTmSnippet(t);
            o = this.resolveVariables(o, e),
            o = o.map(function(e) {
                return e == "\n" ? e + s : typeof e == "string" ? e.replace(/\t/g, i) : e
            });
            var u = [];
            o.forEach(function(e, t) {
                if (typeof e != "object")
                    return;
                var n = e.tabstopId
                  , r = u[n];
                r || (r = u[n] = [],
                r.index = n,
                r.value = "",
                r.parents = {});
                if (r.indexOf(e) !== -1)
                    return;
                e.choices && !r.choices && (r.choices = e.choices),
                r.push(e);
                var i = o.indexOf(e, t + 1);
                if (i === -1)
                    return;
                var s = o.slice(t + 1, i)
                  , a = s.some(function(e) {
                    return typeof e == "object"
                });
                a && !r.value ? r.value = s : s.length && (!r.value || typeof r.value != "string") && (r.value = s.join(""))
            }),
            u.forEach(function(e) {
                e.length = 0
            });
            var a = {};
            for (var l = 0; l < o.length; l++) {
                var c = o[l];
                if (typeof c != "object")
                    continue;
                var h = c.tabstopId
                  , p = u[h]
                  , v = o.indexOf(c, l + 1);
                if (a[h]) {
                    a[h] === c && (delete a[h],
                    Object.keys(a).forEach(function(e) {
                        p.parents[e] = !0
                    }));
                    continue
                }
                a[h] = c;
                var m = p.value;
                typeof m != "string" ? m = f(m) : c.fmt && (m = this.tmStrFormat(m, c, e)),
                o.splice.apply(o, [l + 1, Math.max(0, v - l)].concat(m, c)),
                p.indexOf(c) === -1 && p.push(c)
            }
            var g = 0
              , y = 0
              , b = "";
            o.forEach(function(e) {
                if (typeof e == "string") {
                    var t = e.split("\n");
                    t.length > 1 ? (y = t[t.length - 1].length,
                    g += t.length - 1) : y += e.length,
                    b += e
                } else
                    e && (e.start ? e.end = {
                        row: g,
                        column: y
                    } : e.start = {
                        row: g,
                        column: y
                    })
            });
            var w = e.getSelectionRange()
              , E = e.session.replace(w, b)
              , S = new d(e)
              , x = e.inVirtualSelectionMode && e.selection.index;
            S.addTabstops(u, w.start, E, x)
        }
        ,
        this.insertSnippet = function(e, t) {
            var n = this;
            if (e.inVirtualSelectionMode)
                return n.insertSnippetForSelection(e, t);
            e.forEachSelection(function() {
                n.insertSnippetForSelection(e, t)
            }, null, {
                keepOrder: !0
            }),
            e.tabstopManager && e.tabstopManager.tabNext()
        }
        ,
        this.$getScope = function(e) {
            var t = e.session.$mode.$id || "";
            t = t.split("/").pop();
            if (t === "html" || t === "php") {
                t === "php" && !e.session.$mode.inlinePhp && (t = "html");
                var n = e.getCursorPosition()
                  , r = e.session.getState(n.row);
                typeof r == "object" && (r = r[0]),
                r.substring && (r.substring(0, 3) == "js-" ? t = "javascript" : r.substring(0, 4) == "css-" ? t = "css" : r.substring(0, 4) == "php-" && (t = "php"))
            }
            return t
        }
        ,
        this.getActiveScopes = function(e) {
            var t = this.$getScope(e)
              , n = [t]
              , r = this.snippetMap;
            return r[t] && r[t].includeScopes && n.push.apply(n, r[t].includeScopes),
            n.push("_"),
            n
        }
        ,
        this.expandWithTab = function(e, t) {
            var n = this
              , r = e.forEachSelection(function() {
                return n.expandSnippetForSelection(e, t)
            }, null, {
                keepOrder: !0
            });
            return r && e.tabstopManager && e.tabstopManager.tabNext(),
            r
        }
        ,
        this.expandSnippetForSelection = function(e, t) {
            var n = e.getCursorPosition(), r = e.session.getLine(n.row), i = r.substring(0, n.column), s = r.substr(n.column), o = this.snippetMap, u;
            return this.getActiveScopes(e).some(function(e) {
                var t = o[e];
                return t && (u = this.findMatchingSnippet(t, i, s)),
                !!u
            }, this),
            u ? t && t.dryRun ? !0 : (e.session.doc.removeInLine(n.row, n.column - u.replaceBefore.length, n.column + u.replaceAfter.length),
            this.variables.M__ = u.matchBefore,
            this.variables.T__ = u.matchAfter,
            this.insertSnippetForSelection(e, u.content),
            this.variables.M__ = this.variables.T__ = null,
            !0) : !1
        }
        ,
        this.findMatchingSnippet = function(e, t, n) {
            for (var r = e.length; r--; ) {
                var i = e[r];
                if (i.startRe && !i.startRe.test(t))
                    continue;
                if (i.endRe && !i.endRe.test(n))
                    continue;
                if (!i.startRe && !i.endRe)
                    continue;
                return i.matchBefore = i.startRe ? i.startRe.exec(t) : [""],
                i.matchAfter = i.endRe ? i.endRe.exec(n) : [""],
                i.replaceBefore = i.triggerRe ? i.triggerRe.exec(t)[0] : "",
                i.replaceAfter = i.endTriggerRe ? i.endTriggerRe.exec(n)[0] : "",
                i
            }
        }
        ,
        this.snippetMap = {},
        this.snippetNameMap = {},
        this.register = function(e, t) {
            function o(e) {
                return e && !/^\^?\(.*\)\$?$|^\\b$/.test(e) && (e = "(?:" + e + ")"),
                e || ""
            }
            function u(e, t, n) {
                return e = o(e),
                t = o(t),
                n ? (e = t + e,
                e && e[e.length - 1] != "$" && (e += "$")) : (e += t,
                e && e[0] != "^" && (e = "^" + e)),
                new RegExp(e)
            }
            function a(e) {
                e.scope || (e.scope = t || "_"),
                t = e.scope,
                n[t] || (n[t] = [],
                r[t] = {});
                var o = r[t];
                if (e.name) {
                    var a = o[e.name];
                    a && i.unregister(a),
                    o[e.name] = e
                }
                n[t].push(e),
                e.prefix && (e.tabTrigger = e.prefix),
                !e.content && e.body && (e.content = Array.isArray(e.body) ? e.body.join("\n") : e.body),
                e.tabTrigger && !e.trigger && (!e.guard && /^\w/.test(e.tabTrigger) && (e.guard = "\\b"),
                e.trigger = s.escapeRegExp(e.tabTrigger));
                if (!e.trigger && !e.guard && !e.endTrigger && !e.endGuard)
                    return;
                e.startRe = u(e.trigger, e.guard, !0),
                e.triggerRe = new RegExp(e.trigger),
                e.endRe = u(e.endTrigger, e.endGuard, !0),
                e.endTriggerRe = new RegExp(e.endTrigger)
            }
            var n = this.snippetMap
              , r = this.snippetNameMap
              , i = this;
            e || (e = []),
            Array.isArray(e) ? e.forEach(a) : Object.keys(e).forEach(function(t) {
                a(e[t])
            }),
            this._signal("registerSnippets", {
                scope: t
            })
        }
        ,
        this.unregister = function(e, t) {
            function i(e) {
                var i = r[e.scope || t];
                if (i && i[e.name]) {
                    delete i[e.name];
                    var s = n[e.scope || t]
                      , o = s && s.indexOf(e);
                    o >= 0 && s.splice(o, 1)
                }
            }
            var n = this.snippetMap
              , r = this.snippetNameMap;
            e.content ? i(e) : Array.isArray(e) && e.forEach(i)
        }
        ,
        this.parseSnippetFile = function(e) {
            e = e.replace(/\r/g, "");
            var t = [], n = {}, r = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm, i;
            while (i = r.exec(e)) {
                if (i[1])
                    try {
                        n = JSON.parse(i[1]),
                        t.push(n)
                    } catch (s) {}
                if (i[4])
                    n.content = i[4].replace(/^\t/gm, ""),
                    t.push(n),
                    n = {};
                else {
                    var o = i[2]
                      , u = i[3];
                    if (o == "regex") {
                        var a = /\/((?:[^\/\\]|\\.)*)|$/g;
                        n.guard = a.exec(u)[1],
                        n.trigger = a.exec(u)[1],
                        n.endTrigger = a.exec(u)[1],
                        n.endGuard = a.exec(u)[1]
                    } else
                        o == "snippet" ? (n.tabTrigger = u.match(/^\S*/)[0],
                        n.name || (n.name = u)) : o && (n[o] = u)
                }
            }
            return t
        }
        ,
        this.getSnippetByName = function(e, t) {
            var n = this.snippetNameMap, r;
            return this.getActiveScopes(t).some(function(t) {
                var i = n[t];
                return i && (r = i[e]),
                !!r
            }, this),
            r
        }
    }
    ).call(p.prototype);
    var d = function(e) {
        if (e.tabstopManager)
            return e.tabstopManager;
        e.tabstopManager = this,
        this.$onChange = this.onChange.bind(this),
        this.$onChangeSelection = s.delayedCall(this.onChangeSelection.bind(this)).schedule,
        this.$onChangeSession = this.onChangeSession.bind(this),
        this.$onAfterExec = this.onAfterExec.bind(this),
        this.attach(e)
    };
    (function() {
        this.attach = function(e) {
            this.index = 0,
            this.ranges = [],
            this.tabstops = [],
            this.$openTabstops = null,
            this.selectedTabstop = null,
            this.editor = e,
            this.editor.on("change", this.$onChange),
            this.editor.on("changeSelection", this.$onChangeSelection),
            this.editor.on("changeSession", this.$onChangeSession),
            this.editor.commands.on("afterExec", this.$onAfterExec),
            this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)
        }
        ,
        this.detach = function() {
            this.tabstops.forEach(this.removeTabstopMarkers, this),
            this.ranges = null,
            this.tabstops = null,
            this.selectedTabstop = null,
            this.editor.removeListener("change", this.$onChange),
            this.editor.removeListener("changeSelection", this.$onChangeSelection),
            this.editor.removeListener("changeSession", this.$onChangeSession),
            this.editor.commands.removeListener("afterExec", this.$onAfterExec),
            this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),
            this.editor.tabstopManager = null,
            this.editor = null
        }
        ,
        this.onChange = function(e) {
            var t = e.action[0] == "r"
              , n = this.selectedTabstop || {}
              , r = n.parents || {}
              , i = (this.tabstops || []).slice();
            for (var s = 0; s < i.length; s++) {
                var o = i[s]
                  , u = o == n || r[o.index];
                o.rangeList.$bias = u ? 0 : 1;
                if (e.action == "remove" && o !== n) {
                    var a = o.parents && o.parents[n.index]
                      , f = o.rangeList.pointIndex(e.start, a);
                    f = f < 0 ? -f - 1 : f + 1;
                    var l = o.rangeList.pointIndex(e.end, a);
                    l = l < 0 ? -l - 1 : l - 1;
                    var c = o.rangeList.ranges.slice(f, l);
                    for (var h = 0; h < c.length; h++)
                        this.removeRange(c[h])
                }
                o.rangeList.$onChange(e)
            }
            var p = this.editor.session;
            !this.$inChange && t && p.getLength() == 1 && !p.getValue() && this.detach()
        }
        ,
        this.updateLinkedFields = function() {
            var e = this.selectedTabstop;
            if (!e || !e.hasLinkedRanges || !e.firstNonLinked)
                return;
            this.$inChange = !0;
            var n = this.editor.session
              , r = n.getTextRange(e.firstNonLinked);
            for (var i = 0; i < e.length; i++) {
                var s = e[i];
                if (!s.linked)
                    continue;
                var o = s.original
                  , u = t.snippetManager.tmStrFormat(r, o, this.editor);
                n.replace(s, u)
            }
            this.$inChange = !1
        }
        ,
        this.onAfterExec = function(e) {
            e.command && !e.command.readOnly && this.updateLinkedFields()
        }
        ,
        this.onChangeSelection = function() {
            if (!this.editor)
                return;
            var e = this.editor.selection.lead
              , t = this.editor.selection.anchor
              , n = this.editor.selection.isEmpty();
            for (var r = 0; r < this.ranges.length; r++) {
                if (this.ranges[r].linked)
                    continue;
                var i = this.ranges[r].contains(e.row, e.column)
                  , s = n || this.ranges[r].contains(t.row, t.column);
                if (i && s)
                    return
            }
            this.detach()
        }
        ,
        this.onChangeSession = function() {
            this.detach()
        }
        ,
        this.tabNext = function(e) {
            var t = this.tabstops.length
              , n = this.index + (e || 1);
            n = Math.min(Math.max(n, 1), t),
            n == t && (n = 0),
            this.selectTabstop(n),
            n === 0 && this.detach()
        }
        ,
        this.selectTabstop = function(e) {
            this.$openTabstops = null;
            var t = this.tabstops[this.index];
            t && this.addTabstopMarkers(t),
            this.index = e,
            t = this.tabstops[this.index];
            if (!t || !t.length)
                return;
            this.selectedTabstop = t;
            var n = t.firstNonLinked || t;
            if (!this.editor.inVirtualSelectionMode) {
                var r = this.editor.multiSelect;
                r.toSingleRange(n.clone());
                for (var i = 0; i < t.length; i++) {
                    if (t.hasLinkedRanges && t[i].linked)
                        continue;
                    r.addRange(t[i].clone(), !0)
                }
                r.ranges[0] && r.addRange(r.ranges[0].clone())
            } else
                this.editor.selection.setRange(n);
            this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler),
            this.selectedTabstop && this.selectedTabstop.choices && this.editor.execCommand("startAutocomplete", {
                matches: this.selectedTabstop.choices
            })
        }
        ,
        this.addTabstops = function(e, t, n) {
            var r = this.useLink || !this.editor.getOption("enableMultiselect");
            this.$openTabstops || (this.$openTabstops = []);
            if (!e[0]) {
                var i = o.fromPoints(n, n);
                m(i.start, t),
                m(i.end, t),
                e[0] = [i],
                e[0].index = 0
            }
            var s = this.index
              , a = [s + 1, 0]
              , f = this.ranges;
            e.forEach(function(e, n) {
                var i = this.$openTabstops[n] || e;
                for (var s = 0; s < e.length; s++) {
                    var l = e[s]
                      , c = o.fromPoints(l.start, l.end || l.start);
                    v(c.start, t),
                    v(c.end, t),
                    c.original = l,
                    c.tabstop = i,
                    f.push(c),
                    i != e ? i.unshift(c) : i[s] = c,
                    l.fmtString || i.firstNonLinked && r ? (c.linked = !0,
                    i.hasLinkedRanges = !0) : i.firstNonLinked || (i.firstNonLinked = c)
                }
                i.firstNonLinked || (i.hasLinkedRanges = !1),
                i === e && (a.push(i),
                this.$openTabstops[n] = i),
                this.addTabstopMarkers(i),
                i.rangeList = i.rangeList || new u,
                i.rangeList.$bias = 0,
                i.rangeList.addList(i)
            }, this),
            a.length > 2 && (this.tabstops.length && a.push(a.splice(2, 1)[0]),
            this.tabstops.splice.apply(this.tabstops, a))
        }
        ,
        this.addTabstopMarkers = function(e) {
            var t = this.editor.session;
            e.forEach(function(e) {
                e.markerId || (e.markerId = t.addMarker(e, "ace_snippet-marker", "text"))
            })
        }
        ,
        this.removeTabstopMarkers = function(e) {
            var t = this.editor.session;
            e.forEach(function(e) {
                t.removeMarker(e.markerId),
                e.markerId = null
            })
        }
        ,
        this.removeRange = function(e) {
            var t = e.tabstop.indexOf(e);
            t != -1 && e.tabstop.splice(t, 1),
            t = this.ranges.indexOf(e),
            t != -1 && this.ranges.splice(t, 1),
            t = e.tabstop.rangeList.ranges.indexOf(e),
            t != -1 && e.tabstop.splice(t, 1),
            this.editor.session.removeMarker(e.markerId),
            e.tabstop.length || (t = this.tabstops.indexOf(e.tabstop),
            t != -1 && this.tabstops.splice(t, 1),
            this.tabstops.length || this.detach())
        }
        ,
        this.keyboardHandler = new a,
        this.keyboardHandler.bindKeys({
            Tab: function(e) {
                if (t.snippetManager && t.snippetManager.expandWithTab(e))
                    return;
                e.tabstopManager.tabNext(1),
                e.renderer.scrollCursorIntoView()
            },
            "Shift-Tab": function(e) {
                e.tabstopManager.tabNext(-1),
                e.renderer.scrollCursorIntoView()
            },
            Esc: function(e) {
                e.tabstopManager.detach()
            }
        })
    }
    ).call(d.prototype);
    var v = function(e, t) {
        e.row == 0 && (e.column += t.column),
        e.row += t.row
    }
      , m = function(e, t) {
        e.row == t.row && (e.column -= t.column),
        e.row -= t.row
    };
    e("./lib/dom").importCssString(".ace_snippet-marker {    -moz-box-sizing: border-box;    box-sizing: border-box;    background: rgba(194, 193, 208, 0.09);    border: 1px dotted rgba(211, 208, 235, 0.62);    position: absolute;}"),
    t.snippetManager = new p;
    var g = e("./editor").Editor;
    (function() {
        this.insertSnippet = function(e, n) {
            return t.snippetManager.insertSnippet(this, e, n)
        }
        ,
        this.expandSnippet = function(e) {
            return t.snippetManager.expandWithTab(this, e)
        }
    }
    ).call(g.prototype)
}),
define("ace/autocomplete/popup", ["require", "exports", "module", "ace/virtual_renderer", "ace/editor", "ace/range", "ace/lib/event", "ace/lib/lang", "ace/lib/dom"], function(e, t, n) {
    "use strict";
    var r = e("../virtual_renderer").VirtualRenderer
      , i = e("../editor").Editor
      , s = e("../range").Range
      , o = e("../lib/event")
      , u = e("../lib/lang")
      , a = e("../lib/dom")
      , f = function(e) {
        var t = new r(e);
        t.$maxLines = 4;
        var n = new i(t);
        return n.setHighlightActiveLine(!1),
        n.setShowPrintMargin(!1),
        n.renderer.setShowGutter(!1),
        n.renderer.setHighlightGutterLine(!1),
        n.$mouseHandler.$focusTimeout = 0,
        n.$highlightTagPending = !0,
        n
    }
      , l = function(e) {
        var t = a.createElement("div")
          , n = new f(t);
        e && e.appendChild(t),
        t.style.display = "none",
        n.renderer.content.style.cursor = "default",
        n.renderer.setStyle("ace_autocomplete"),
        n.setOption("displayIndentGuides", !1),
        n.setOption("dragDelay", 150);
        var r = function() {};
        n.focus = r,
        n.$isFocused = !0,
        n.renderer.$cursorLayer.restartTimer = r,
        n.renderer.$cursorLayer.element.style.opacity = 0,
        n.renderer.$maxLines = 8,
        n.renderer.$keepTextAreaAtCursor = !1,
        n.setHighlightActiveLine(!1),
        n.session.highlight(""),
        n.session.$searchHighlight.clazz = "ace_highlight-marker",
        n.on("mousedown", function(e) {
            var t = e.getDocumentPosition();
            n.selection.moveToPosition(t),
            c.start.row = c.end.row = t.row,
            e.stop()
        });
        var i, l = new s(-1,0,-1,Infinity), c = new s(-1,0,-1,Infinity);
        c.id = n.session.addMarker(c, "ace_active-line", "fullLine"),
        n.setSelectOnHover = function(e) {
            e ? l.id && (n.session.removeMarker(l.id),
            l.id = null) : l.id = n.session.addMarker(l, "ace_line-hover", "fullLine")
        }
        ,
        n.setSelectOnHover(!1),
        n.on("mousemove", function(e) {
            if (!i) {
                i = e;
                return
            }
            if (i.x == e.x && i.y == e.y)
                return;
            i = e,
            i.scrollTop = n.renderer.scrollTop;
            var t = i.getDocumentPosition().row;
            l.start.row != t && (l.id || n.setRow(t),
            p(t))
        }),
        n.renderer.on("beforeRender", function() {
            if (i && l.start.row != -1) {
                i.$pos = null;
                var e = i.getDocumentPosition().row;
                l.id || n.setRow(e),
                p(e, !0)
            }
        }),
        n.renderer.on("afterRender", function() {
            var e = n.getRow()
              , t = n.renderer.$textLayer
              , r = t.element.childNodes[e - t.config.firstRow];
            r !== t.selectedNode && t.selectedNode && a.removeCssClass(t.selectedNode, "ace_selected"),
            t.selectedNode = r,
            r && a.addCssClass(r, "ace_selected")
        });
        var h = function() {
            p(-1)
        }
          , p = function(e, t) {
            e !== l.start.row && (l.start.row = l.end.row = e,
            t || n.session._emit("changeBackMarker"),
            n._emit("changeHoverMarker"))
        };
        n.getHoveredRow = function() {
            return l.start.row
        }
        ,
        o.addListener(n.container, "mouseout", h),
        n.on("hide", h),
        n.on("changeSelection", h),
        n.session.doc.getLength = function() {
            return n.data.length
        }
        ,
        n.session.doc.getLine = function(e) {
            var t = n.data[e];
            return typeof t == "string" ? t : t && t.value || ""
        }
        ;
        var d = n.session.bgTokenizer;
        return d.$tokenizeRow = function(e) {
            function s(e, n) {
                e && r.push({
                    type: (t.className || "") + (n || ""),
                    value: e
                })
            }
            var t = n.data[e]
              , r = [];
            if (!t)
                return r;
            typeof t == "string" && (t = {
                value: t
            });
            var i = t.caption || t.value || t.name
              , o = i.toLowerCase()
              , u = (n.filterText || "").toLowerCase()
              , a = 0
              , f = 0;
            for (var l = 0; l <= u.length; l++)
                if (l != f && (t.matchMask & 1 << l || l == u.length)) {
                    var c = u.slice(f, l);
                    f = l;
                    var h = o.indexOf(c, a);
                    if (h == -1)
                        continue;
                    s(i.slice(a, h), ""),
                    a = h + c.length,
                    s(i.slice(h, a), "completion-highlight")
                }
            return s(i.slice(a, i.length), ""),
            t.meta && r.push({
                type: "completion-meta",
                value: t.meta
            }),
            t.message && r.push({
                type: "completion-message",
                value: t.message
            }),
            r
        }
        ,
        d.$updateOnChange = r,
        d.start = r,
        n.session.$computeWidth = function() {
            return this.screenWidth = 0
        }
        ,
        n.isOpen = !1,
        n.isTopdown = !1,
        n.autoSelect = !0,
        n.filterText = "",
        n.data = [],
        n.setData = function(e, t) {
            n.filterText = t || "",
            n.setValue(u.stringRepeat("\n", e.length), -1),
            n.data = e || [],
            n.setRow(0)
        }
        ,
        n.getData = function(e) {
            return n.data[e]
        }
        ,
        n.getRow = function() {
            return c.start.row
        }
        ,
        n.setRow = function(e) {
            e = Math.max(this.autoSelect ? 0 : -1, Math.min(this.data.length, e)),
            c.start.row != e && (n.selection.clearSelection(),
            c.start.row = c.end.row = e || 0,
            n.session._emit("changeBackMarker"),
            n.moveCursorTo(e || 0, 0),
            n.isOpen && n._signal("select"))
        }
        ,
        n.on("changeSelection", function() {
            n.isOpen && n.setRow(n.selection.lead.row),
            n.renderer.scrollCursorIntoView()
        }),
        n.hide = function() {
            this.container.style.display = "none",
            this._signal("hide"),
            n.isOpen = !1
        }
        ,
        n.show = function(e, t, r) {
            var s = this.container
              , o = window.innerHeight
              , u = window.innerWidth
              , a = this.renderer
              , f = a.$maxLines * t * 1.4
              , l = e.top + this.$borderSize
              , c = l > o / 2 && !r;
            c && l + t + f > o ? (a.$maxPixelHeight = l - 2 * this.$borderSize,
            s.style.top = "",
            s.style.bottom = o - l + "px",
            n.isTopdown = !1) : (l += t,
            a.$maxPixelHeight = o - l - .2 * t,
            s.style.top = l + "px",
            s.style.bottom = "",
            n.isTopdown = !0),
            s.style.display = "";
            var h = e.left;
            h + s.offsetWidth > u && (h = u - s.offsetWidth),
            s.style.left = h + "px",
            this._signal("show"),
            i = null,
            n.isOpen = !0
        }
        ,
        n.goTo = function(e) {
            var t = this.getRow()
              , n = this.session.getLength() - 1;
            switch (e) {
            case "up":
                t = t <= 0 ? n : t - 1;
                break;
            case "down":
                t = t >= n ? -1 : t + 1;
                break;
            case "start":
                t = 0;
                break;
            case "end":
                t = n
            }
            this.setRow(t)
        }
        ,
        n.getTextLeftOffset = function() {
            return this.$borderSize + this.renderer.$padding + this.$imageSize
        }
        ,
        n.$imageSize = 0,
        n.$borderSize = 1,
        n
    };
    a.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {    background-color: #CAD6FA;    z-index: 1;}.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {    background-color: #3a674e;}.ace_editor.ace_autocomplete .ace_line-hover {    border: 1px solid #abbffe;    margin-top: -1px;    background: rgba(233,233,253,0.4);    position: absolute;    z-index: 2;}.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {    border: 1px solid rgba(109, 150, 13, 0.8);    background: rgba(58, 103, 78, 0.62);}.ace_completion-meta {    opacity: 0.5;    margin: 0.9em;}.ace_completion-message {    color: blue;}.ace_editor.ace_autocomplete .ace_completion-highlight{    color: #2d69c7;}.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{    color: #93ca12;}.ace_editor.ace_autocomplete {    width: 300px;    z-index: 200000;    border: 1px lightgray solid;    position: fixed;    box-shadow: 2px 3px 5px rgba(0,0,0,.2);    line-height: 1.4;    background: #fefefe;    color: #111;}.ace_dark.ace_editor.ace_autocomplete {    border: 1px #484747 solid;    box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);    line-height: 1.4;    background: #25282c;    color: #c1c1c1;}", "autocompletion.css"),
    t.AcePopup = l,
    t.$singleLineEditor = f
}),
define("ace/autocomplete/util", ["require", "exports", "module"], function(e, t, n) {
    "use strict";
    t.parForEach = function(e, t, n) {
        var r = 0
          , i = e.length;
        i === 0 && n();
        for (var s = 0; s < i; s++)
            t(e[s], function(e, t) {
                r++,
                r === i && n(e, t)
            })
    }
    ;
    var r = /[a-zA-Z_0-9\$\-\u00A2-\u2000\u2070-\uFFFF]/;
    t.retrievePrecedingIdentifier = function(e, t, n) {
        n = n || r;
        var i = [];
        for (var s = t - 1; s >= 0; s--) {
            if (!n.test(e[s]))
                break;
            i.push(e[s])
        }
        return i.reverse().join("")
    }
    ,
    t.retrieveFollowingIdentifier = function(e, t, n) {
        n = n || r;
        var i = [];
        for (var s = t; s < e.length; s++) {
            if (!n.test(e[s]))
                break;
            i.push(e[s])
        }
        return i
    }
    ,
    t.getCompletionPrefix = function(e) {
        var t = e.getCursorPosition(), n = e.session.getLine(t.row), r;
        return e.completers.forEach(function(e) {
            e.identifierRegexps && e.identifierRegexps.forEach(function(e) {
                !r && e && (r = this.retrievePrecedingIdentifier(n, t.column, e))
            }
            .bind(this))
        }
        .bind(this)),
        r || this.retrievePrecedingIdentifier(n, t.column)
    }
}),
define("ace/autocomplete", ["require", "exports", "module", "ace/keyboard/hash_handler", "ace/autocomplete/popup", "ace/autocomplete/util", "ace/lib/lang", "ace/lib/dom", "ace/snippets", "ace/config"], function(e, t, n) {
    "use strict";
    var r = e("./keyboard/hash_handler").HashHandler
      , i = e("./autocomplete/popup").AcePopup
      , s = e("./autocomplete/util")
      , o = e("./lib/lang")
      , u = e("./lib/dom")
      , a = e("./snippets").snippetManager
      , f = e("./config")
      , l = function() {
        this.autoInsert = !1,
        this.autoSelect = !0,
        this.exactMatch = !1,
        this.gatherCompletionsId = 0,
        this.keyboardHandler = new r,
        this.keyboardHandler.bindKeys(this.commands),
        this.blurListener = this.blurListener.bind(this),
        this.changeListener = this.changeListener.bind(this),
        this.mousedownListener = this.mousedownListener.bind(this),
        this.mousewheelListener = this.mousewheelListener.bind(this),
        this.changeTimer = o.delayedCall(function() {
            this.updateCompletions(!0)
        }
        .bind(this)),
        this.tooltipTimer = o.delayedCall(this.updateDocTooltip.bind(this), 50)
    };
    (function() {
        this.$init = function() {
            return this.popup = new i(document.body || document.documentElement),
            this.popup.on("click", function(e) {
                this.insertMatch(),
                e.stop()
            }
            .bind(this)),
            this.popup.focus = this.editor.focus.bind(this.editor),
            this.popup.on("show", this.tooltipTimer.bind(null, null)),
            this.popup.on("select", this.tooltipTimer.bind(null, null)),
            this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null)),
            this.popup
        }
        ,
        this.getPopup = function() {
            return this.popup || this.$init()
        }
        ,
        this.openPopup = function(e, t, n) {
            this.popup || this.$init(),
            this.popup.autoSelect = this.autoSelect,
            this.popup.setData(this.completions.filtered, this.completions.filterText),
            e.keyBinding.addKeyboardHandler(this.keyboardHandler);
            var r = e.renderer;
            this.popup.setRow(this.autoSelect ? 0 : -1);
            if (!n) {
                this.popup.setTheme(e.getTheme()),
                this.popup.setFontSize(e.getFontSize());
                var i = r.layerConfig.lineHeight
                  , s = r.$cursorLayer.getPixelPosition(this.base, !0);
                s.left -= this.popup.getTextLeftOffset();
                var o = e.container.getBoundingClientRect();
                s.top += o.top - r.layerConfig.offset,
                s.left += o.left - e.renderer.scrollLeft,
                s.left += r.gutterWidth,
                this.popup.show(s, i)
            } else
                n && !t && this.detach()
        }
        ,
        this.detach = function() {
            this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),
            this.editor.off("changeSelection", this.changeListener),
            this.editor.off("blur", this.blurListener),
            this.editor.off("mousedown", this.mousedownListener),
            this.editor.off("mousewheel", this.mousewheelListener),
            this.changeTimer.cancel(),
            this.hideDocTooltip(),
            this.gatherCompletionsId += 1,
            this.popup && this.popup.isOpen && this.popup.hide(),
            this.base && this.base.detach(),
            this.activated = !1,
            this.completions = this.base = null
        }
        ,
        this.changeListener = function(e) {
            var t = this.editor.selection.lead;
            (t.row != this.base.row || t.column < this.base.column) && this.detach(),
            this.activated ? this.changeTimer.schedule() : this.detach()
        }
        ,
        this.blurListener = function(e) {
            var t = document.activeElement
              , n = this.editor.textInput.getElement()
              , r = e.relatedTarget && this.tooltipNode && this.tooltipNode.contains(e.relatedTarget)
              , i = this.popup && this.popup.container;
            t != n && t.parentNode != i && !r && t != this.tooltipNode && e.relatedTarget != n && this.detach()
        }
        ,
        this.mousedownListener = function(e) {
            this.detach()
        }
        ,
        this.mousewheelListener = function(e) {
            this.detach()
        }
        ,
        this.goTo = function(e) {
            this.popup.goTo(e)
        }
        ,
        this.insertMatch = function(e, t) {
            e || (e = this.popup.getData(this.popup.getRow()));
            if (!e)
                return !1;
            if (e.completer && e.completer.insertMatch)
                e.completer.insertMatch(this.editor, e);
            else {
                if (this.completions.filterText) {
                    var n = this.editor.selection.getAllRanges();
                    for (var r = 0, i; i = n[r]; r++)
                        i.start.column -= this.completions.filterText.length,
                        this.editor.session.remove(i)
                }
                e.snippet ? a.insertSnippet(this.editor, e.snippet) : this.editor.execCommand("insertstring", e.value || e)
            }
            this.detach()
        }
        ,
        this.commands = {
            Up: function(e) {
                e.completer.goTo("up")
            },
            Down: function(e) {
                e.completer.goTo("down")
            },
            "Ctrl-Up|Ctrl-Home": function(e) {
                e.completer.goTo("start")
            },
            "Ctrl-Down|Ctrl-End": function(e) {
                e.completer.goTo("end")
            },
            Esc: function(e) {
                e.completer.detach()
            },
            Return: function(e) {
                return e.completer.insertMatch()
            },
            "Shift-Return": function(e) {
                e.completer.insertMatch(null, {
                    deleteSuffix: !0
                })
            },
            Tab: function(e) {
                var t = e.completer.insertMatch();
                if (!!t || !!e.tabstopManager)
                    return t;
                e.completer.goTo("down")
            },
            PageUp: function(e) {
                e.completer.popup.gotoPageUp()
            },
            PageDown: function(e) {
                e.completer.popup.gotoPageDown()
            }
        },
        this.gatherCompletions = function(e, t) {
            var n = e.getSession()
              , r = e.getCursorPosition()
              , i = s.getCompletionPrefix(e);
            this.base = n.doc.createAnchor(r.row, r.column - i.length),
            this.base.$insertRight = !0;
            var o = []
              , u = e.completers.length;
            return e.completers.forEach(function(a, f) {
                a.getCompletions(e, n, r, i, function(n, r) {
                    !n && r && (o = o.concat(r)),
                    t(null, {
                        prefix: s.getCompletionPrefix(e),
                        matches: o,
                        finished: --u === 0
                    })
                })
            }),
            !0
        }
        ,
        this.showPopup = function(e, t) {
            this.editor && this.detach(),
            this.activated = !0,
            this.editor = e,
            e.completer != this && (e.completer && e.completer.detach(),
            e.completer = this),
            e.on("changeSelection", this.changeListener),
            e.on("blur", this.blurListener),
            e.on("mousedown", this.mousedownListener),
            e.on("mousewheel", this.mousewheelListener),
            this.updateCompletions(!1, t)
        }
        ,
        this.updateCompletions = function(e, t) {
            if (e && this.base && this.completions) {
                var n = this.editor.getCursorPosition()
                  , r = this.editor.session.getTextRange({
                    start: this.base,
                    end: n
                });
                if (r == this.completions.filterText)
                    return;
                this.completions.setFilter(r);
                if (!this.completions.filtered.length)
                    return this.detach();
                if (this.completions.filtered.length == 1 && this.completions.filtered[0].value == r && !this.completions.filtered[0].snippet)
                    return this.detach();
                this.openPopup(this.editor, r, e);
                return
            }
            if (t && t.matches) {
                var n = this.editor.getSelectionRange().start;
                return this.base = this.editor.session.doc.createAnchor(n.row, n.column),
                this.base.$insertRight = !0,
                this.completions = new c(t.matches),
                this.openPopup(this.editor, "", e)
            }
            var i = this.gatherCompletionsId;
            this.gatherCompletions(this.editor, function(t, n) {
                var r = function() {
                    if (!n.finished)
                        return;
                    return this.detach()
                }
                .bind(this)
                  , s = n.prefix
                  , o = n && n.matches;
                if (!o || !o.length)
                    return r();
                if (s.indexOf(n.prefix) !== 0 || i != this.gatherCompletionsId)
                    return;
                this.completions = new c(o),
                this.exactMatch && (this.completions.exactMatch = !0),
                this.completions.setFilter(s);
                var u = this.completions.filtered;
                if (!u.length)
                    return r();
                if (u.length == 1 && u[0].value == s && !u[0].snippet)
                    return r();
                if (this.autoInsert && u.length == 1 && n.finished)
                    return this.insertMatch(u[0]);
                this.openPopup(this.editor, s, e)
            }
            .bind(this))
        }
        ,
        this.cancelContextMenu = function() {
            this.editor.$mouseHandler.cancelContextMenu()
        }
        ,
        this.updateDocTooltip = function() {
            var e = this.popup
              , t = e.data
              , n = t && (t[e.getHoveredRow()] || t[e.getRow()])
              , r = null;
            if (!n || !this.editor || !this.popup.isOpen)
                return this.hideDocTooltip();
            this.editor.completers.some(function(e) {
                return e.getDocTooltip && (r = e.getDocTooltip(n)),
                r
            }),
            !r && typeof n != "string" && (r = n),
            typeof r == "string" && (r = {
                docText: r
            });
            if (!r || !r.docHTML && !r.docText)
                return this.hideDocTooltip();
            this.showDocTooltip(r)
        }
        ,
        this.showDocTooltip = function(e) {
            this.tooltipNode || (this.tooltipNode = u.createElement("div"),
            this.tooltipNode.className = "ace_tooltip ace_doc-tooltip",
            this.tooltipNode.style.margin = 0,
            this.tooltipNode.style.pointerEvents = "auto",
            this.tooltipNode.tabIndex = -1,
            this.tooltipNode.onblur = this.blurListener.bind(this),
            this.tooltipNode.onclick = this.onTooltipClick.bind(this));
            var t = this.tooltipNode;
            e.docHTML ? t.innerHTML = e.docHTML : e.docText && (t.textContent = e.docText),
            t.parentNode || document.body.appendChild(t);
            var n = this.popup
              , r = n.container.getBoundingClientRect();
            t.style.top = n.container.style.top,
            t.style.bottom = n.container.style.bottom,
            t.style.display = "block",
            window.innerWidth - r.right < 320 ? r.left < 320 ? n.isTopdown ? (t.style.top = r.bottom + "px",
            t.style.left = r.left + "px",
            t.style.right = "",
            t.style.bottom = "") : (t.style.top = n.container.offsetTop - t.offsetHeight + "px",
            t.style.left = r.left + "px",
            t.style.right = "",
            t.style.bottom = "") : (t.style.right = window.innerWidth - r.left + "px",
            t.style.left = "") : (t.style.left = r.right + 1 + "px",
            t.style.right = "")
        }
        ,
        this.hideDocTooltip = function() {
            this.tooltipTimer.cancel();
            if (!this.tooltipNode)
                return;
            var e = this.tooltipNode;
            !this.editor.isFocused() && document.activeElement == e && this.editor.focus(),
            this.tooltipNode = null,
            e.parentNode && e.parentNode.removeChild(e)
        }
        ,
        this.onTooltipClick = function(e) {
            var t = e.target;
            while (t && t != this.tooltipNode) {
                if (t.nodeName == "A" && t.href) {
                    t.rel = "noreferrer",
                    t.target = "_blank";
                    break
                }
                t = t.parentNode
            }
        }
        ,
        this.destroy = function() {
            this.detach();
            if (this.popup) {
                this.popup.destroy();
                var e = this.popup.container;
                e && e.parentNode && e.parentNode.removeChild(e)
            }
            this.editor && this.editor.completer == this && this.editor.completer == null,
            this.popup = null
        }
    }
    ).call(l.prototype),
    l.for = function(e) {
        return e.completer ? e.completer : (f.get("sharedPopups") ? (l.$shared || (l.$sharedInstance = new l),
        e.completer = l.$sharedInstance) : (e.completer = new l,
        e.once("destroy", function(e, t) {
            t.completer.destroy()
        })),
        e.completer)
    }
    ,
    l.startCommand = {
        name: "startAutocomplete",
        exec: function(e, t) {
            var n = l.for(e);
            n.autoInsert = !1,
            n.autoSelect = !0,
            n.showPopup(e, t),
            n.cancelContextMenu()
        },
        bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space"
    };
    var c = function(e, t) {
        this.all = e,
        this.filtered = e,
        this.filterText = t || "",
        this.exactMatch = !1
    };
    (function() {
        this.setFilter = function(e) {
            if (e.length > this.filterText && e.lastIndexOf(this.filterText, 0) === 0)
                var t = this.filtered;
            else
                var t = this.all;
            this.filterText = e,
            t = this.filterCompletions(t, this.filterText),
            t = t.sort(function(e, t) {
                return t.exactMatch - e.exactMatch || t.$score - e.$score || (e.caption || e.value).localeCompare(t.caption || t.value)
            });
            var n = null;
            t = t.filter(function(e) {
                var t = e.snippet || e.caption || e.value;
                return t === n ? !1 : (n = t,
                !0)
            }),
            this.filtered = t
        }
        ,
        this.filterCompletions = function(e, t) {
            var n = []
              , r = t.toUpperCase()
              , i = t.toLowerCase();
            e: for (var s = 0, o; o = e[s]; s++) {
                var u = o.caption || o.value || o.snippet;
                if (!u)
                    continue;
                var a = -1, f = 0, l = 0, c, h;
                if (this.exactMatch) {
                    if (t !== u.substr(0, t.length))
                        continue e
                } else {
                    var p = u.toLowerCase().indexOf(i);
                    if (p > -1)
                        l = p;
                    else
                        for (var d = 0; d < t.length; d++) {
                            var v = u.indexOf(i[d], a + 1)
                              , m = u.indexOf(r[d], a + 1);
                            c = v >= 0 ? m < 0 || v < m ? v : m : m;
                            if (c < 0)
                                continue e;
                            h = c - a - 1,
                            h > 0 && (a === -1 && (l += 10),
                            l += h,
                            f |= 1 << d),
                            a = c
                        }
                }
                o.matchMask = f,
                o.exactMatch = l ? 0 : 1,
                o.$score = (o.score || 0) - l,
                n.push(o)
            }
            return n
        }
    }
    ).call(c.prototype),
    t.Autocomplete = l,
    t.FilteredList = c
}),
define("ace/autocomplete/text_completer", ["require", "exports", "module", "ace/range"], function(e, t, n) {
    function s(e, t) {
        var n = e.getTextRange(r.fromPoints({
            row: 0,
            column: 0
        }, t));
        return n.split(i).length - 1
    }
    function o(e, t) {
        var n = s(e, t)
          , r = e.getValue().split(i)
          , o = Object.create(null)
          , u = r[n];
        return r.forEach(function(e, t) {
            if (!e || e === u)
                return;
            var i = Math.abs(n - t)
              , s = r.length - i;
            o[e] ? o[e] = Math.max(s, o[e]) : o[e] = s
        }),
        o
    }
    var r = e("../range").Range
      , i = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;
    t.getCompletions = function(e, t, n, r, i) {
        var s = o(t, n)
          , u = Object.keys(s);
        i(null, u.map(function(e) {
            return {
                caption: e,
                value: e,
                score: s[e],
                meta: "local"
            }
        }))
    }
}),
define("ace/ext/language_tools", ["require", "exports", "module", "ace/snippets", "ace/autocomplete", "ace/config", "ace/lib/lang", "ace/autocomplete/util", "ace/autocomplete/text_completer", "ace/editor", "ace/config"], function(e, t, n) {
    "use strict";
    var r = e("../snippets").snippetManager
      , i = e("../autocomplete").Autocomplete
      , s = e("../config")
      , o = e("../lib/lang")
      , u = e("../autocomplete/util")
      , a = e("../autocomplete/text_completer")
      , f = {
        getCompletions: function(e, t, n, r, i) {
            if (t.$mode.completer)
                return t.$mode.completer.getCompletions(e, t, n, r, i);
            var s = e.session.getState(n.row)
              , o = t.$mode.getCompletions(s, t, n, r);
            i(null, o)
        }
    }
      , l = {
        getCompletions: function(e, t, n, i, s) {
            var o = []
              , u = t.getTokenAt(n.row, n.column);
            u && u.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/) ? o.push("html-tag") : o = r.getActiveScopes(e);
            var a = r.snippetMap
              , f = [];
            o.forEach(function(e) {
                var t = a[e] || [];
                for (var n = t.length; n--; ) {
                    var r = t[n]
                      , i = r.name || r.tabTrigger;
                    if (!i)
                        continue;
                    f.push({
                        caption: i,
                        snippet: r.content,
                        meta: r.tabTrigger && !r.name ? r.tabTrigger + "\u21e5 " : "snippet",
                        type: "snippet"
                    })
                }
            }, this),
            s(null, f)
        },
        getDocTooltip: function(e) {
            e.type == "snippet" && !e.docHTML && (e.docHTML = ["<b>", o.escapeHTML(e.caption), "</b>", "<hr></hr>", o.escapeHTML(e.snippet)].join(""))
        }
    }
      , c = [l, a, f];
    t.setCompleters = function(e) {
        c.length = 0,
        e && c.push.apply(c, e)
    }
    ,
    t.addCompleter = function(e) {
        c.push(e)
    }
    ,
    t.textCompleter = a,
    t.keyWordCompleter = f,
    t.snippetCompleter = l;
    var h = {
        name: "expandSnippet",
        exec: function(e) {
            return r.expandWithTab(e)
        },
        bindKey: "Tab"
    }
      , p = function(e, t) {
        d(t.session.$mode)
    }
      , d = function(e) {
        typeof e == "string" && (e = s.$modes[e]);
        if (!e)
            return;
        r.files || (r.files = {}),
        v(e.$id, e.snippetFileId),
        e.modes && e.modes.forEach(d)
    }
      , v = function(e, t) {
        if (!t || !e || r.files[e])
            return;
        r.files[e] = {},
        s.loadModule(t, function(t) {
            if (!t)
                return;
            r.files[e] = t,
            !t.snippets && t.snippetText && (t.snippets = r.parseSnippetFile(t.snippetText)),
            r.register(t.snippets || [], t.scope),
            t.includeScopes && (r.snippetMap[t.scope].includeScopes = t.includeScopes,
            t.includeScopes.forEach(function(e) {
                d("ace/mode/" + e)
            }))
        })
    }
      , m = function(e) {
        var t = e.editor
          , n = t.completer && t.completer.activated;
        if (e.command.name === "backspace")
            n && !u.getCompletionPrefix(t) && t.completer.detach();
        else if (e.command.name === "insertstring") {
            var r = u.getCompletionPrefix(t);
            if (r && !n) {
                var s = i.for(t);
                s.autoInsert = !1,
                s.showPopup(t)
            }
        }
    }
      , g = e("../editor").Editor;
    e("../config").defineOptions(g.prototype, "editor", {
        enableBasicAutocompletion: {
            set: function(e) {
                e ? (this.completers || (this.completers = Array.isArray(e) ? e : c),
                this.commands.addCommand(i.startCommand)) : this.commands.removeCommand(i.startCommand)
            },
            value: !1
        },
        enableLiveAutocompletion: {
            set: function(e) {
                e ? (this.completers || (this.completers = Array.isArray(e) ? e : c),
                this.commands.on("afterExec", m)) : this.commands.removeListener("afterExec", m)
            },
            value: !1
        },
        enableSnippets: {
            set: function(e) {
                e ? (this.commands.addCommand(h),
                this.on("changeMode", p),
                p(null, this)) : (this.commands.removeCommand(h),
                this.off("changeMode", p))
            },
            value: !1
        }
    })
});
(function() {
    window.require(["ace/ext/language_tools"], function(m) {
        if (typeof module == "object" && typeof exports == "object" && module) {
            module.exports = m;
        }
    });
}
)();
define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function(e, t, n) {
    "use strict";
    var r = e("../lib/oop")
      , i = e("./text_highlight_rules").TextHighlightRules
      , s = function() {
        this.$rules = {
            start: [{
                token: "comment.doc.tag",
                regex: "@[\\w\\d_]+"
            }, s.getTagRule(), {
                defaultToken: "comment.doc",
                caseInsensitive: !0
            }]
        }
    };
    r.inherits(s, i),
    s.getTagRule = function(e) {
        return {
            token: "comment.doc.tag.storage.type",
            regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
        }
    }
    ,
    s.getStartRule = function(e) {
        return {
            token: "comment.doc",
            regex: "\\/\\*(?=\\*)",
            next: e
        }
    }
    ,
    s.getEndRule = function(e) {
        return {
            token: "comment.doc",
            regex: "\\*\\/",
            next: e
        }
    }
    ,
    t.DocCommentHighlightRules = s
}),
define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function(e, t, n) {
    "use strict";
    function a() {
        var e = o.replace("\\d", "\\d\\-")
          , t = {
            onMatch: function(e, t, n) {
                var r = e.charAt(1) == "/" ? 2 : 1;
                if (r == 1)
                    t != this.nextState ? n.unshift(this.next, this.nextState, 0) : n.unshift(this.next),
                    n[2]++;
                else if (r == 2 && t == this.nextState) {
                    n[1]--;
                    if (!n[1] || n[1] < 0)
                        n.shift(),
                        n.shift()
                }
                return [{
                    type: "meta.tag.punctuation." + (r == 1 ? "" : "end-") + "tag-open.xml",
                    value: e.slice(0, r)
                }, {
                    type: "meta.tag.tag-name.xml",
                    value: e.substr(r)
                }]
            },
            regex: "</?" + e + "",
            next: "jsxAttributes",
            nextState: "jsx"
        };
        this.$rules.start.unshift(t);
        var n = {
            regex: "{",
            token: "paren.quasi.start",
            push: "start"
        };
        this.$rules.jsx = [n, t, {
            include: "reference"
        }, {
            defaultToken: "string"
        }],
        this.$rules.jsxAttributes = [{
            token: "meta.tag.punctuation.tag-close.xml",
            regex: "/?>",
            onMatch: function(e, t, n) {
                return t == n[0] && n.shift(),
                e.length == 2 && (n[0] == this.nextState && n[1]--,
                (!n[1] || n[1] < 0) && n.splice(0, 2)),
                this.next = n[0] || "start",
                [{
                    type: this.token,
                    value: e
                }]
            },
            nextState: "jsx"
        }, n, f("jsxAttributes"), {
            token: "entity.other.attribute-name.xml",
            regex: e
        }, {
            token: "keyword.operator.attribute-equals.xml",
            regex: "="
        }, {
            token: "text.tag-whitespace.xml",
            regex: "\\s+"
        }, {
            token: "string.attribute-value.xml",
            regex: "'",
            stateName: "jsx_attr_q",
            push: [{
                token: "string.attribute-value.xml",
                regex: "'",
                next: "pop"
            }, {
                include: "reference"
            }, {
                defaultToken: "string.attribute-value.xml"
            }]
        }, {
            token: "string.attribute-value.xml",
            regex: '"',
            stateName: "jsx_attr_qq",
            push: [{
                token: "string.attribute-value.xml",
                regex: '"',
                next: "pop"
            }, {
                include: "reference"
            }, {
                defaultToken: "string.attribute-value.xml"
            }]
        }, t],
        this.$rules.reference = [{
            token: "constant.language.escape.reference.xml",
            regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
        }]
    }
    function f(e) {
        return [{
            token: "comment",
            regex: /\/\*/,
            next: [i.getTagRule(), {
                token: "comment",
                regex: "\\*\\/",
                next: e || "pop"
            }, {
                defaultToken: "comment",
                caseInsensitive: !0
            }]
        }, {
            token: "comment",
            regex: "\\/\\/",
            next: [i.getTagRule(), {
                token: "comment",
                regex: "$|^",
                next: e || "pop"
            }, {
                defaultToken: "comment",
                caseInsensitive: !0
            }]
        }]
    }
    var r = e("../lib/oop")
      , i = e("./doc_comment_highlight_rules").DocCommentHighlightRules
      , s = e("./text_highlight_rules").TextHighlightRules
      , o = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"
      , u = function(e) {
        var t = this.createKeywordMapper({
            "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",
            keyword: "const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
            "storage.type": "const|let|var|function",
            "constant.language": "null|Infinity|NaN|undefined",
            "support.function": "alert",
            "constant.language.boolean": "true|false"
        }, "identifier")
          , n = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"
          , r = "\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";
        this.$rules = {
            no_regex: [i.getStartRule("doc-start"), f("no_regex"), {
                token: "string",
                regex: "'(?=.)",
                next: "qstring"
            }, {
                token: "string",
                regex: '"(?=.)',
                next: "qqstring"
            }, {
                token: "constant.numeric",
                regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
            }, {
                token: "constant.numeric",
                regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
            }, {
                token: ["storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text", "keyword.operator"],
                regex: "(" + o + ")(\\.)(prototype)(\\.)(" + o + ")(\\s*)(=)",
                next: "function_arguments"
            }, {
                token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"],
                regex: "(" + o + ")(\\.)(" + o + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
                next: "function_arguments"
            }, {
                token: ["entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen"],
                regex: "(" + o + ")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
                next: "function_arguments"
            }, {
                token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"],
                regex: "(" + o + ")(\\.)(" + o + ")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
                next: "function_arguments"
            }, {
                token: ["storage.type", "text", "entity.name.function", "text", "paren.lparen"],
                regex: "(function)(\\s+)(" + o + ")(\\s*)(\\()",
                next: "function_arguments"
            }, {
                token: ["entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen"],
                regex: "(" + o + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
                next: "function_arguments"
            }, {
                token: ["text", "text", "storage.type", "text", "paren.lparen"],
                regex: "(:)(\\s*)(function)(\\s*)(\\()",
                next: "function_arguments"
            }, {
                token: "keyword",
                regex: "from(?=\\s*('|\"))"
            }, {
                token: "keyword",
                regex: "(?:" + n + ")\\b",
                next: "start"
            }, {
                token: ["support.constant"],
                regex: /that\b/
            }, {
                token: ["storage.type", "punctuation.operator", "support.function.firebug"],
                regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
            }, {
                token: t,
                regex: o
            }, {
                token: "punctuation.operator",
                regex: /[.](?![.])/,
                next: "property"
            }, {
                token: "storage.type",
                regex: /=>/,
                next: "start"
            }, {
                token: "keyword.operator",
                regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
                next: "start"
            }, {
                token: "punctuation.operator",
                regex: /[?:,;.]/,
                next: "start"
            }, {
                token: "paren.lparen",
                regex: /[\[({]/,
                next: "start"
            }, {
                token: "paren.rparen",
                regex: /[\])}]/
            }, {
                token: "comment",
                regex: /^#!.*$/
            }],
            property: [{
                token: "text",
                regex: "\\s+"
            }, {
                token: ["storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen"],
                regex: "(" + o + ")(\\.)(" + o + ")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
                next: "function_arguments"
            }, {
                token: "punctuation.operator",
                regex: /[.](?![.])/
            }, {
                token: "support.function",
                regex: /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
            }, {
                token: "support.function.dom",
                regex: /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
            }, {
                token: "support.constant",
                regex: /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
            }, {
                token: "identifier",
                regex: o
            }, {
                regex: "",
                token: "empty",
                next: "no_regex"
            }],
            start: [i.getStartRule("doc-start"), f("start"), {
                token: "string.regexp",
                regex: "\\/",
                next: "regex"
            }, {
                token: "text",
                regex: "\\s+|^$",
                next: "start"
            }, {
                token: "empty",
                regex: "",
                next: "no_regex"
            }],
            regex: [{
                token: "regexp.keyword.operator",
                regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
            }, {
                token: "string.regexp",
                regex: "/[sxngimy]*",
                next: "no_regex"
            }, {
                token: "invalid",
                regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
            }, {
                token: "constant.language.escape",
                regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
            }, {
                token: "constant.language.delimiter",
                regex: /\|/
            }, {
                token: "constant.language.escape",
                regex: /\[\^?/,
                next: "regex_character_class"
            }, {
                token: "empty",
                regex: "$",
                next: "no_regex"
            }, {
                defaultToken: "string.regexp"
            }],
            regex_character_class: [{
                token: "regexp.charclass.keyword.operator",
                regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
            }, {
                token: "constant.language.escape",
                regex: "]",
                next: "regex"
            }, {
                token: "constant.language.escape",
                regex: "-"
            }, {
                token: "empty",
                regex: "$",
                next: "no_regex"
            }, {
                defaultToken: "string.regexp.charachterclass"
            }],
            function_arguments: [{
                token: "variable.parameter",
                regex: o
            }, {
                token: "punctuation.operator",
                regex: "[, ]+"
            }, {
                token: "punctuation.operator",
                regex: "$"
            }, {
                token: "empty",
                regex: "",
                next: "no_regex"
            }],
            qqstring: [{
                token: "constant.language.escape",
                regex: r
            }, {
                token: "string",
                regex: "\\\\$",
                consumeLineEnd: !0
            }, {
                token: "string",
                regex: '"|$',
                next: "no_regex"
            }, {
                defaultToken: "string"
            }],
            qstring: [{
                token: "constant.language.escape",
                regex: r
            }, {
                token: "string",
                regex: "\\\\$",
                consumeLineEnd: !0
            }, {
                token: "string",
                regex: "'|$",
                next: "no_regex"
            }, {
                defaultToken: "string"
            }]
        };
        if (!e || !e.noES6)
            this.$rules.no_regex.unshift({
                regex: "[{}]",
                onMatch: function(e, t, n) {
                    this.next = e == "{" ? this.nextState : "";
                    if (e == "{" && n.length)
                        n.unshift("start", t);
                    else if (e == "}" && n.length) {
                        n.shift(),
                        this.next = n.shift();
                        if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
                            return "paren.quasi.end"
                    }
                    return e == "{" ? "paren.lparen" : "paren.rparen"
                },
                nextState: "start"
            }, {
                token: "string.quasi.start",
                regex: /`/,
                push: [{
                    token: "constant.language.escape",
                    regex: r
                }, {
                    token: "paren.quasi.start",
                    regex: /\${/,
                    push: "start"
                }, {
                    token: "string.quasi.end",
                    regex: /`/,
                    next: "pop"
                }, {
                    defaultToken: "string.quasi"
                }]
            }),
            (!e || e.jsx != 0) && a.call(this);
        this.embedRules(i, "doc-", [i.getEndRule("no_regex")]),
        this.normalizeRules()
    };
    r.inherits(u, s),
    t.JavaScriptHighlightRules = u
}),
define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function(e, t, n) {
    "use strict";
    var r = e("../range").Range
      , i = function() {};
    (function() {
        this.checkOutdent = function(e, t) {
            return /^\s+$/.test(e) ? /^\s*\}/.test(t) : !1
        }
        ,
        this.autoOutdent = function(e, t) {
            var n = e.getLine(t)
              , i = n.match(/^(\s*\})/);
            if (!i)
                return 0;
            var s = i[1].length
              , o = e.findMatchingBracket({
                row: t,
                column: s
            });
            if (!o || o.row == t)
                return 0;
            var u = this.$getIndent(e.getLine(o.row));
            e.replace(new r(t,0,t,s - 1), u)
        }
        ,
        this.$getIndent = function(e) {
            return e.match(/^\s*/)[0]
        }
    }
    ).call(i.prototype),
    t.MatchingBraceOutdent = i
}),
define("ace/mode/folding/cstyle", ["require", "exports", "module", "ace/lib/oop", "ace/range", "ace/mode/folding/fold_mode"], function(e, t, n) {
    "use strict";
    var r = e("../../lib/oop")
      , i = e("../../range").Range
      , s = e("./fold_mode").FoldMode
      , o = t.FoldMode = function(e) {
        e && (this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + e.start)),
        this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + e.end)))
    }
    ;
    r.inherits(o, s),
    function() {
        this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,
        this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,
        this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/,
        this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/,
        this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/,
        this._getFoldWidgetBase = this.getFoldWidget,
        this.getFoldWidget = function(e, t, n) {
            var r = e.getLine(n);
            if (this.singleLineBlockCommentRe.test(r) && !this.startRegionRe.test(r) && !this.tripleStarBlockCommentRe.test(r))
                return "";
            var i = this._getFoldWidgetBase(e, t, n);
            return !i && this.startRegionRe.test(r) ? "start" : i
        }
        ,
        this.getFoldWidgetRange = function(e, t, n, r) {
            var i = e.getLine(n);
            if (this.startRegionRe.test(i))
                return this.getCommentRegionBlock(e, i, n);
            var s = i.match(this.foldingStartMarker);
            if (s) {
                var o = s.index;
                if (s[1])
                    return this.openingBracketBlock(e, s[1], n, o);
                var u = e.getCommentFoldRange(n, o + s[0].length, 1);
                return u && !u.isMultiLine() && (r ? u = this.getSectionRange(e, n) : t != "all" && (u = null)),
                u
            }
            if (t === "markbegin")
                return;
            var s = i.match(this.foldingStopMarker);
            if (s) {
                var o = s.index + s[0].length;
                return s[1] ? this.closingBracketBlock(e, s[1], n, o) : e.getCommentFoldRange(n, o, -1)
            }
        }
        ,
        this.getSectionRange = function(e, t) {
            var n = e.getLine(t)
              , r = n.search(/\S/)
              , s = t
              , o = n.length;
            t += 1;
            var u = t
              , a = e.getLength();
            while (++t < a) {
                n = e.getLine(t);
                var f = n.search(/\S/);
                if (f === -1)
                    continue;
                if (r > f)
                    break;
                var l = this.getFoldWidgetRange(e, "all", t);
                if (l) {
                    if (l.start.row <= s)
                        break;
                    if (l.isMultiLine())
                        t = l.end.row;
                    else if (r == f)
                        break
                }
                u = t
            }
            return new i(s,o,u,e.getLine(u).length)
        }
        ,
        this.getCommentRegionBlock = function(e, t, n) {
            var r = t.search(/\s*$/)
              , s = e.getLength()
              , o = n
              , u = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/
              , a = 1;
            while (++n < s) {
                t = e.getLine(n);
                var f = u.exec(t);
                if (!f)
                    continue;
                f[1] ? a-- : a++;
                if (!a)
                    break
            }
            var l = n;
            if (l > o)
                return new i(o,r,l,t.length)
        }
    }
    .call(o.prototype)
}),
define("ace/mode/javascript", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/worker/worker_client", "ace/mode/behaviour/cstyle", "ace/mode/folding/cstyle"], function(e, t, n) {
    "use strict";
    var r = e("../lib/oop")
      , i = e("./text").Mode
      , s = e("./javascript_highlight_rules").JavaScriptHighlightRules
      , o = e("./matching_brace_outdent").MatchingBraceOutdent
      , u = e("../worker/worker_client").WorkerClient
      , a = e("./behaviour/cstyle").CstyleBehaviour
      , f = e("./folding/cstyle").FoldMode
      , l = function() {
        this.HighlightRules = s,
        this.$outdent = new o,
        this.$behaviour = new a,
        this.foldingRules = new f
    };
    r.inherits(l, i),
    function() {
        this.lineCommentStart = "//",
        this.blockComment = {
            start: "/*",
            end: "*/"
        },
        this.$quotes = {
            '"': '"',
            "'": "'",
            "`": "`"
        },
        this.getNextLineIndent = function(e, t, n) {
            var r = this.$getIndent(t)
              , i = this.getTokenizer().getLineTokens(t, e)
              , s = i.tokens
              , o = i.state;
            if (s.length && s[s.length - 1].type == "comment")
                return r;
            if (e == "start" || e == "no_regex") {
                var u = t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
                u && (r += n)
            } else if (e == "doc-start") {
                if (o == "start" || o == "no_regex")
                    return "";
                var u = t.match(/^\s*(\/?)\*/);
                u && (u[1] && (r += " "),
                r += "* ")
            }
            return r
        }
        ,
        this.checkOutdent = function(e, t, n) {
            return this.$outdent.checkOutdent(t, n)
        }
        ,
        this.autoOutdent = function(e, t, n) {
            this.$outdent.autoOutdent(t, n)
        }
        ,
        this.createWorker = function(e) {
            var t = new u(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");
            return t.attachToDocument(e.getDocument()),
            t.on("annotate", function(t) {
                e.setAnnotations(t.data)
            }),
            t.on("terminate", function() {
                e.clearAnnotations()
            }),
            t
        }
        ,
        this.$id = "ace/mode/javascript",
        this.snippetFileId = "ace/snippets/javascript"
    }
    .call(l.prototype),
    t.Mode = l
}),
define("ace/mode/css_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function(e, t, n) {
    "use strict";
    var r = e("../lib/oop")
      , i = e("../lib/lang")
      , s = e("./text_highlight_rules").TextHighlightRules
      , o = t.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"
      , u = t.supportFunction = "rgb|rgba|url|attr|counter|counters"
      , a = t.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"
      , f = t.supportConstantColor = "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|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|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|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"
      , l = t.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"
      , c = t.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"
      , h = t.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"
      , p = t.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"
      , d = function() {
        var e = this.createKeywordMapper({
            "support.function": u,
            "support.constant": a,
            "support.type": o,
            "support.constant.color": f,
            "support.constant.fonts": l
        }, "text", !0);
        this.$rules = {
            start: [{
                include: ["strings", "url", "comments"]
            }, {
                token: "paren.lparen",
                regex: "\\{",
                next: "ruleset"
            }, {
                token: "paren.rparen",
                regex: "\\}"
            }, {
                token: "string",
                regex: "@(?!viewport)",
                next: "media"
            }, {
                token: "keyword",
                regex: "#[a-z0-9-_]+"
            }, {
                token: "keyword",
                regex: "%"
            }, {
                token: "variable",
                regex: "\\.[a-z0-9-_]+"
            }, {
                token: "string",
                regex: ":[a-z0-9-_]+"
            }, {
                token: "constant.numeric",
                regex: c
            }, {
                token: "constant",
                regex: "[a-z0-9-_]+"
            }, {
                caseInsensitive: !0
            }],
            media: [{
                include: ["strings", "url", "comments"]
            }, {
                token: "paren.lparen",
                regex: "\\{",
                next: "start"
            }, {
                token: "paren.rparen",
                regex: "\\}",
                next: "start"
            }, {
                token: "string",
                regex: ";",
                next: "start"
            }, {
                token: "keyword",
                regex: "(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"
            }],
            comments: [{
                token: "comment",
                regex: "\\/\\*",
                push: [{
                    token: "comment",
                    regex: "\\*\\/",
                    next: "pop"
                }, {
                    defaultToken: "comment"
                }]
            }],
            ruleset: [{
                regex: "-(webkit|ms|moz|o)-",
                token: "text"
            }, {
                token: "punctuation.operator",
                regex: "[:;]"
            }, {
                token: "paren.rparen",
                regex: "\\}",
                next: "start"
            }, {
                include: ["strings", "url", "comments"]
            }, {
                token: ["constant.numeric", "keyword"],
                regex: "(" + c + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
            }, {
                token: "constant.numeric",
                regex: c
            }, {
                token: "constant.numeric",
                regex: "#[a-f0-9]{6}"
            }, {
                token: "constant.numeric",
                regex: "#[a-f0-9]{3}"
            }, {
                token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
                regex: h
            }, {
                token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
                regex: p
            }, {
                include: "url"
            }, {
                token: e,
                regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
            }, {
                caseInsensitive: !0
            }],
            url: [{
                token: "support.function",
                regex: "(?:url(:?-prefix)?|domain|regexp)\\(",
                push: [{
                    token: "support.function",
                    regex: "\\)",
                    next: "pop"
                }, {
                    defaultToken: "string"
                }]
            }],
            strings: [{
                token: "string.start",
                regex: "'",
                push: [{
                    token: "string.end",
                    regex: "'|$",
                    next: "pop"
                }, {
                    include: "escapes"
                }, {
                    token: "constant.language.escape",
                    regex: /\\$/,
                    consumeLineEnd: !0
                }, {
                    defaultToken: "string"
                }]
            }, {
                token: "string.start",
                regex: '"',
                push: [{
                    token: "string.end",
                    regex: '"|$',
                    next: "pop"
                }, {
                    include: "escapes"
                }, {
                    token: "constant.language.escape",
                    regex: /\\$/,
                    consumeLineEnd: !0
                }, {
                    defaultToken: "string"
                }]
            }],
            escapes: [{
                token: "constant.language.escape",
                regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
            }]
        },
        this.normalizeRules()
    };
    r.inherits(d, s),
    t.CssHighlightRules = d
}),
define("ace/mode/css_completions", ["require", "exports", "module"], function(e, t, n) {
    "use strict";
    var r = {
        background: {
            "#$0": 1
        },
        "background-color": {
            "#$0": 1,
            transparent: 1,
            fixed: 1
        },
        "background-image": {
            "url('/$0')": 1
        },
        "background-repeat": {
            repeat: 1,
            "repeat-x": 1,
            "repeat-y": 1,
            "no-repeat": 1,
            inherit: 1
        },
        "background-position": {
            bottom: 2,
            center: 2,
            left: 2,
            right: 2,
            top: 2,
            inherit: 2
        },
        "background-attachment": {
            scroll: 1,
            fixed: 1
        },
        "background-size": {
            cover: 1,
            contain: 1
        },
        "background-clip": {
            "border-box": 1,
            "padding-box": 1,
            "content-box": 1
        },
        "background-origin": {
            "border-box": 1,
            "padding-box": 1,
            "content-box": 1
        },
        border: {
            "solid $0": 1,
            "dashed $0": 1,
            "dotted $0": 1,
            "#$0": 1
        },
        "border-color": {
            "#$0": 1
        },
        "border-style": {
            solid: 2,
            dashed: 2,
            dotted: 2,
            "double": 2,
            groove: 2,
            hidden: 2,
            inherit: 2,
            inset: 2,
            none: 2,
            outset: 2,
            ridged: 2
        },
        "border-collapse": {
            collapse: 1,
            separate: 1
        },
        bottom: {
            px: 1,
            em: 1,
            "%": 1
        },
        clear: {
            left: 1,
            right: 1,
            both: 1,
            none: 1
        },
        color: {
            "#$0": 1,
            "rgb(#$00,0,0)": 1
        },
        cursor: {
            "default": 1,
            pointer: 1,
            move: 1,
            text: 1,
            wait: 1,
            help: 1,
            progress: 1,
            "n-resize": 1,
            "ne-resize": 1,
            "e-resize": 1,
            "se-resize": 1,
            "s-resize": 1,
            "sw-resize": 1,
            "w-resize": 1,
            "nw-resize": 1
        },
        display: {
            none: 1,
            block: 1,
            inline: 1,
            "inline-block": 1,
            "table-cell": 1
        },
        "empty-cells": {
            show: 1,
            hide: 1
        },
        "float": {
            left: 1,
            right: 1,
            none: 1
        },
        "font-family": {
            Arial: 2,
            "Comic Sans MS": 2,
            Consolas: 2,
            "Courier New": 2,
            Courier: 2,
            Georgia: 2,
            Monospace: 2,
            "Sans-Serif": 2,
            "Segoe UI": 2,
            Tahoma: 2,
            "Times New Roman": 2,
            "Trebuchet MS": 2,
            Verdana: 1
        },
        "font-size": {
            px: 1,
            em: 1,
            "%": 1
        },
        "font-weight": {
            bold: 1,
            normal: 1
        },
        "font-style": {
            italic: 1,
            normal: 1
        },
        "font-variant": {
            normal: 1,
            "small-caps": 1
        },
        height: {
            px: 1,
            em: 1,
            "%": 1
        },
        left: {
            px: 1,
            em: 1,
            "%": 1
        },
        "letter-spacing": {
            normal: 1
        },
        "line-height": {
            normal: 1
        },
        "list-style-type": {
            none: 1,
            disc: 1,
            circle: 1,
            square: 1,
            decimal: 1,
            "decimal-leading-zero": 1,
            "lower-roman": 1,
            "upper-roman": 1,
            "lower-greek": 1,
            "lower-latin": 1,
            "upper-latin": 1,
            georgian: 1,
            "lower-alpha": 1,
            "upper-alpha": 1
        },
        margin: {
            px: 1,
            em: 1,
            "%": 1
        },
        "margin-right": {
            px: 1,
            em: 1,
            "%": 1
        },
        "margin-left": {
            px: 1,
            em: 1,
            "%": 1
        },
        "margin-top": {
            px: 1,
            em: 1,
            "%": 1
        },
        "margin-bottom": {
            px: 1,
            em: 1,
            "%": 1
        },
        "max-height": {
            px: 1,
            em: 1,
            "%": 1
        },
        "max-width": {
            px: 1,
            em: 1,
            "%": 1
        },
        "min-height": {
            px: 1,
            em: 1,
            "%": 1
        },
        "min-width": {
            px: 1,
            em: 1,
            "%": 1
        },
        overflow: {
            hidden: 1,
            visible: 1,
            auto: 1,
            scroll: 1
        },
        "overflow-x": {
            hidden: 1,
            visible: 1,
            auto: 1,
            scroll: 1
        },
        "overflow-y": {
            hidden: 1,
            visible: 1,
            auto: 1,
            scroll: 1
        },
        padding: {
            px: 1,
            em: 1,
            "%": 1
        },
        "padding-top": {
            px: 1,
            em: 1,
            "%": 1
        },
        "padding-right": {
            px: 1,
            em: 1,
            "%": 1
        },
        "padding-bottom": {
            px: 1,
            em: 1,
            "%": 1
        },
        "padding-left": {
            px: 1,
            em: 1,
            "%": 1
        },
        "page-break-after": {
            auto: 1,
            always: 1,
            avoid: 1,
            left: 1,
            right: 1
        },
        "page-break-before": {
            auto: 1,
            always: 1,
            avoid: 1,
            left: 1,
            right: 1
        },
        position: {
            absolute: 1,
            relative: 1,
            fixed: 1,
            "static": 1
        },
        right: {
            px: 1,
            em: 1,
            "%": 1
        },
        "table-layout": {
            fixed: 1,
            auto: 1
        },
        "text-decoration": {
            none: 1,
            underline: 1,
            "line-through": 1,
            blink: 1
        },
        "text-align": {
            left: 1,
            right: 1,
            center: 1,
            justify: 1
        },
        "text-transform": {
            capitalize: 1,
            uppercase: 1,
            lowercase: 1,
            none: 1
        },
        top: {
            px: 1,
            em: 1,
            "%": 1
        },
        "vertical-align": {
            top: 1,
            bottom: 1
        },
        visibility: {
            hidden: 1,
            visible: 1
        },
        "white-space": {
            nowrap: 1,
            normal: 1,
            pre: 1,
            "pre-line": 1,
            "pre-wrap": 1
        },
        width: {
            px: 1,
            em: 1,
            "%": 1
        },
        "word-spacing": {
            normal: 1
        },
        filter: {
            "alpha(opacity=$0100)": 1
        },
        "text-shadow": {
            "$02px 2px 2px #777": 1
        },
        "text-overflow": {
            "ellipsis-word": 1,
            clip: 1,
            ellipsis: 1
        },
        "-moz-border-radius": 1,
        "-moz-border-radius-topright": 1,
        "-moz-border-radius-bottomright": 1,
        "-moz-border-radius-topleft": 1,
        "-moz-border-radius-bottomleft": 1,
        "-webkit-border-radius": 1,
        "-webkit-border-top-right-radius": 1,
        "-webkit-border-top-left-radius": 1,
        "-webkit-border-bottom-right-radius": 1,
        "-webkit-border-bottom-left-radius": 1,
        "-moz-box-shadow": 1,
        "-webkit-box-shadow": 1,
        transform: {
            "rotate($00deg)": 1,
            "skew($00deg)": 1
        },
        "-moz-transform": {
            "rotate($00deg)": 1,
            "skew($00deg)": 1
        },
        "-webkit-transform": {
            "rotate($00deg)": 1,
            "skew($00deg)": 1
        }
    }
      , i = function() {};
    (function() {
        this.completionsDefined = !1,
        this.defineCompletions = function() {
            if (document) {
                var e = document.createElement("c").style;
                for (var t in e) {
                    if (typeof e[t] != "string")
                        continue;
                    var n = t.replace(/[A-Z]/g, function(e) {
                        return "-" + e.toLowerCase()
                    });
                    r.hasOwnProperty(n) || (r[n] = 1)
                }
            }
            this.completionsDefined = !0
        }
        ,
        this.getCompletions = function(e, t, n, r) {
            this.completionsDefined || this.defineCompletions();
            if (e === "ruleset" || t.$mode.$id == "ace/mode/scss") {
                var i = t.getLine(n.row).substr(0, n.column);
                return /:[^;]+$/.test(i) ? (/([\w\-]+):[^:]*$/.test(i),
                this.getPropertyValueCompletions(e, t, n, r)) : this.getPropertyCompletions(e, t, n, r)
            }
            return []
        }
        ,
        this.getPropertyCompletions = function(e, t, n, i) {
            var s = Object.keys(r);
            return s.map(function(e) {
                return {
                    caption: e,
                    snippet: e + ": $0;",
                    meta: "property",
                    score: 1e6
                }
            })
        }
        ,
        this.getPropertyValueCompletions = function(e, t, n, i) {
            var s = t.getLine(n.row).substr(0, n.column)
              , o = (/([\w\-]+):[^:]*$/.exec(s) || {})[1];
            if (!o)
                return [];
            var u = [];
            return o in r && typeof r[o] == "object" && (u = Object.keys(r[o])),
            u.map(function(e) {
                return {
                    caption: e,
                    snippet: e,
                    meta: "property value",
                    score: 1e6
                }
            })
        }
    }
    ).call(i.prototype),
    t.CssCompletions = i
}),
define("ace/mode/behaviour/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle", "ace/token_iterator"], function(e, t, n) {
    "use strict";
    var r = e("../../lib/oop")
      , i = e("../behaviour").Behaviour
      , s = e("./cstyle").CstyleBehaviour
      , o = e("../../token_iterator").TokenIterator
      , u = function() {
        this.inherit(s),
        this.add("colon", "insertion", function(e, t, n, r, i) {
            if (i === ":" && n.selection.isEmpty()) {
                var s = n.getCursorPosition()
                  , u = new o(r,s.row,s.column)
                  , a = u.getCurrentToken();
                a && a.value.match(/\s+/) && (a = u.stepBackward());
                if (a && a.type === "support.type") {
                    var f = r.doc.getLine(s.row)
                      , l = f.substring(s.column, s.column + 1);
                    if (l === ":")
                        return {
                            text: "",
                            selection: [1, 1]
                        };
                    if (/^(\s+[^;]|\s*$)/.test(f.substring(s.column)))
                        return {
                            text: ":;",
                            selection: [1, 1]
                        }
                }
            }
        }),
        this.add("colon", "deletion", function(e, t, n, r, i) {
            var s = r.doc.getTextRange(i);
            if (!i.isMultiLine() && s === ":") {
                var u = n.getCursorPosition()
                  , a = new o(r,u.row,u.column)
                  , f = a.getCurrentToken();
                f && f.value.match(/\s+/) && (f = a.stepBackward());
                if (f && f.type === "support.type") {
                    var l = r.doc.getLine(i.start.row)
                      , c = l.substring(i.end.column, i.end.column + 1);
                    if (c === ";")
                        return i.end.column++,
                        i
                }
            }
        }),
        this.add("semicolon", "insertion", function(e, t, n, r, i) {
            if (i === ";" && n.selection.isEmpty()) {
                var s = n.getCursorPosition()
                  , o = r.doc.getLine(s.row)
                  , u = o.substring(s.column, s.column + 1);
                if (u === ";")
                    return {
                        text: "",
                        selection: [1, 1]
                    }
            }
        }),
        this.add("!important", "insertion", function(e, t, n, r, i) {
            if (i === "!" && n.selection.isEmpty()) {
                var s = n.getCursorPosition()
                  , o = r.doc.getLine(s.row);
                if (/^\s*(;|}|$)/.test(o.substring(s.column)))
                    return {
                        text: "!important",
                        selection: [10, 10]
                    }
            }
        })
    };
    r.inherits(u, s),
    t.CssBehaviour = u
}),
define("ace/mode/css", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text", "ace/mode/css_highlight_rules", "ace/mode/matching_brace_outdent", "ace/worker/worker_client", "ace/mode/css_completions", "ace/mode/behaviour/css", "ace/mode/folding/cstyle"], function(e, t, n) {
    "use strict";
    var r = e("../lib/oop")
      , i = e("./text").Mode
      , s = e("./css_highlight_rules").CssHighlightRules
      , o = e("./matching_brace_outdent").MatchingBraceOutdent
      , u = e("../worker/worker_client").WorkerClient
      , a = e("./css_completions").CssCompletions
      , f = e("./behaviour/css").CssBehaviour
      , l = e("./folding/cstyle").FoldMode
      , c = function() {
        this.HighlightRules = s,
        this.$outdent = new o,
        this.$behaviour = new f,
        this.$completer = new a,
        this.foldingRules = new l
    };
    r.inherits(c, i),
    function() {
        this.foldingRules = "cStyle",
        this.blockComment = {
            start: "/*",
            end: "*/"
        },
        this.getNextLineIndent = function(e, t, n) {
            var r = this.$getIndent(t)
              , i = this.getTokenizer().getLineTokens(t, e).tokens;
            if (i.length && i[i.length - 1].type == "comment")
                return r;
            var s = t.match(/^.*\{\s*$/);
            return s && (r += n),
            r
        }
        ,
        this.checkOutdent = function(e, t, n) {
            return this.$outdent.checkOutdent(t, n)
        }
        ,
        this.autoOutdent = function(e, t, n) {
            this.$outdent.autoOutdent(t, n)
        }
        ,
        this.getCompletions = function(e, t, n, r) {
            return this.$completer.getCompletions(e, t, n, r)
        }
        ,
        this.createWorker = function(e) {
            var t = new u(["ace"],"ace/mode/css_worker","Worker");
            return t.attachToDocument(e.getDocument()),
            t.on("annotate", function(t) {
                e.setAnnotations(t.data)
            }),
            t.on("terminate", function() {
                e.clearAnnotations()
            }),
            t
        }
        ,
        this.$id = "ace/mode/css",
        this.snippetFileId = "ace/snippets/css"
    }
    .call(c.prototype),
    t.Mode = c
}),
define("ace/mode/xml_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function(e, t, n) {
    "use strict";
    var r = e("../lib/oop")
      , i = e("./text_highlight_rules").TextHighlightRules
      , s = function(e) {
        var t = "[_:a-zA-Z\u00c0-\uffff][-_:.a-zA-Z0-9\u00c0-\uffff]*";
        this.$rules = {
            start: [{
                token: "string.cdata.xml",
                regex: "<\\!\\[CDATA\\[",
                next: "cdata"
            }, {
                token: ["punctuation.instruction.xml", "keyword.instruction.xml"],
                regex: "(<\\?)(" + t + ")",
                next: "processing_instruction"
            }, {
                token: "comment.start.xml",
                regex: "<\\!--",
                next: "comment"
            }, {
                token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
                regex: "(<\\!)(DOCTYPE)(?=[\\s])",
                next: "doctype",
                caseInsensitive: !0
            }, {
                include: "tag"
            }, {
                token: "text.end-tag-open.xml",
                regex: "</"
            }, {
                token: "text.tag-open.xml",
                regex: "<"
            }, {
                include: "reference"
            }, {
                defaultToken: "text.xml"
            }],
            processing_instruction: [{
                token: "entity.other.attribute-name.decl-attribute-name.xml",
                regex: t
            }, {
                token: "keyword.operator.decl-attribute-equals.xml",
                regex: "="
            }, {
                include: "whitespace"
            }, {
                include: "string"
            }, {
                token: "punctuation.xml-decl.xml",
                regex: "\\?>",
                next: "start"
            }],
            doctype: [{
                include: "whitespace"
            }, {
                include: "string"
            }, {
                token: "xml-pe.doctype.xml",
                regex: ">",
                next: "start"
            }, {
                token: "xml-pe.xml",
                regex: "[-_a-zA-Z0-9:]+"
            }, {
                token: "punctuation.int-subset",
                regex: "\\[",
                push: "int_subset"
            }],
            int_subset: [{
                token: "text.xml",
                regex: "\\s+"
            }, {
                token: "punctuation.int-subset.xml",
                regex: "]",
                next: "pop"
            }, {
                token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
                regex: "(<\\!)(" + t + ")",
                push: [{
                    token: "text",
                    regex: "\\s+"
                }, {
                    token: "punctuation.markup-decl.xml",
                    regex: ">",
                    next: "pop"
                }, {
                    include: "string"
                }]
            }],
            cdata: [{
                token: "string.cdata.xml",
                regex: "\\]\\]>",
                next: "start"
            }, {
                token: "text.xml",
                regex: "\\s+"
            }, {
                token: "text.xml",
                regex: "(?:[^\\]]|\\](?!\\]>))+"
            }],
            comment: [{
                token: "comment.end.xml",
                regex: "-->",
                next: "start"
            }, {
                defaultToken: "comment.xml"
            }],
            reference: [{
                token: "constant.language.escape.reference.xml",
                regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
            }],
            attr_reference: [{
                token: "constant.language.escape.reference.attribute-value.xml",
                regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
            }],
            tag: [{
                token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
                regex: "(?:(<)|(</))((?:" + t + ":)?" + t + ")",
                next: [{
                    include: "attributes"
                }, {
                    token: "meta.tag.punctuation.tag-close.xml",
                    regex: "/?>",
                    next: "start"
                }]
            }],
            tag_whitespace: [{
                token: "text.tag-whitespace.xml",
                regex: "\\s+"
            }],
            whitespace: [{
                token: "text.whitespace.xml",
                regex: "\\s+"
            }],
            string: [{
                token: "string.xml",
                regex: "'",
                push: [{
                    token: "string.xml",
                    regex: "'",
                    next: "pop"
                }, {
                    defaultToken: "string.xml"
                }]
            }, {
                token: "string.xml",
                regex: '"',
                push: [{
                    token: "string.xml",
                    regex: '"',
                    next: "pop"
                }, {
                    defaultToken: "string.xml"
                }]
            }],
            attributes: [{
                token: "entity.other.attribute-name.xml",
                regex: t
            }, {
                token: "keyword.operator.attribute-equals.xml",
                regex: "="
            }, {
                include: "tag_whitespace"
            }, {
                include: "attribute_value"
            }],
            attribute_value: [{
                token: "string.attribute-value.xml",
                regex: "'",
                push: [{
                    token: "string.attribute-value.xml",
                    regex: "'",
                    next: "pop"
                }, {
                    include: "attr_reference"
                }, {
                    defaultToken: "string.attribute-value.xml"
                }]
            }, {
                token: "string.attribute-value.xml",
                regex: '"',
                push: [{
                    token: "string.attribute-value.xml",
                    regex: '"',
                    next: "pop"
                }, {
                    include: "attr_reference"
                }, {
                    defaultToken: "string.attribute-value.xml"
                }]
            }]
        },
        this.constructor === s && this.normalizeRules()
    };
    (function() {
        this.embedTagRules = function(e, t, n) {
            this.$rules.tag.unshift({
                token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + n + ".tag-name.xml"],
                regex: "(<)(" + n + "(?=\\s|>|$))",
                next: [{
                    include: "attributes"
                }, {
                    token: "meta.tag.punctuation.tag-close.xml",
                    regex: "/?>",
                    next: t + "start"
                }]
            }),
            this.$rules[n + "-end"] = [{
                include: "attributes"
            }, {
                token: "meta.tag.punctuation.tag-close.xml",
                regex: "/?>",
                next: "start",
                onMatch: function(e, t, n) {
                    return n.splice(0),
                    this.token
                }
            }],
            this.embedRules(e, t, [{
                token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + n + ".tag-name.xml"],
                regex: "(</)(" + n + "(?=\\s|>|$))",
                next: n + "-end"
            }, {
                token: "string.cdata.xml",
                regex: "<\\!\\[CDATA\\["
            }, {
                token: "string.cdata.xml",
                regex: "\\]\\]>"
            }])
        }
    }
    ).call(i.prototype),
    r.inherits(s, i),
    t.XmlHighlightRules = s
}),
define("ace/mode/html_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/xml_highlight_rules"], function(e, t, n) {
    "use strict";
    var r = e("../lib/oop")
      , i = e("../lib/lang")
      , s = e("./css_highlight_rules").CssHighlightRules
      , o = e("./javascript_highlight_rules").JavaScriptHighlightRules
      , u = e("./xml_highlight_rules").XmlHighlightRules
      , a = i.createMap({
        a: "anchor",
        button: "form",
        form: "form",
        img: "image",
        input: "form",
        label: "form",
        option: "form",
        script: "script",
        select: "form",
        textarea: "form",
        style: "style",
        table: "table",
        tbody: "table",
        td: "table",
        tfoot: "table",
        th: "table",
        tr: "table"
    })
      , f = function() {
        u.call(this),
        this.addRules({
            attributes: [{
                include: "tag_whitespace"
            }, {
                token: "entity.other.attribute-name.xml",
                regex: "[-_a-zA-Z0-9:.]+"
            }, {
                token: "keyword.operator.attribute-equals.xml",
                regex: "=",
                push: [{
                    include: "tag_whitespace"
                }, {
                    token: "string.unquoted.attribute-value.html",
                    regex: "[^<>='\"`\\s]+",
                    next: "pop"
                }, {
                    token: "empty",
                    regex: "",
                    next: "pop"
                }]
            }, {
                include: "attribute_value"
            }],
            tag: [{
                token: function(e, t) {
                    var n = a[t];
                    return ["meta.tag.punctuation." + (e == "<" ? "" : "end-") + "tag-open.xml", "meta.tag" + (n ? "." + n : "") + ".tag-name.xml"]
                },
                regex: "(</?)([-_a-zA-Z0-9:.]+)",
                next: "tag_stuff"
            }],
            tag_stuff: [{
                include: "attributes"
            }, {
                token: "meta.tag.punctuation.tag-close.xml",
                regex: "/?>",
                next: "start"
            }]
        }),
        this.embedTagRules(s, "css-", "style"),
        this.embedTagRules((new o({
            jsx: !1
        })).getRules(), "js-", "script"),
        this.constructor === f && this.normalizeRules()
    };
    r.inherits(f, u),
    t.HtmlHighlightRules = f
}),
define("ace/mode/behaviour/xml", ["require", "exports", "module", "ace/lib/oop", "ace/mode/behaviour", "ace/token_iterator", "ace/lib/lang"], function(e, t, n) {
    "use strict";
    function u(e, t) {
        return e && e.type.lastIndexOf(t + ".xml") > -1
    }
    var r = e("../../lib/oop")
      , i = e("../behaviour").Behaviour
      , s = e("../../token_iterator").TokenIterator
      , o = e("../../lib/lang")
      , a = function() {
        this.add("string_dquotes", "insertion", function(e, t, n, r, i) {
            if (i == '"' || i == "'") {
                var o = i
                  , a = r.doc.getTextRange(n.getSelectionRange());
                if (a !== "" && a !== "'" && a != '"' && n.getWrapBehavioursEnabled())
                    return {
                        text: o + a + o,
                        selection: !1
                    };
                var f = n.getCursorPosition()
                  , l = r.doc.getLine(f.row)
                  , c = l.substring(f.column, f.column + 1)
                  , h = new s(r,f.row,f.column)
                  , p = h.getCurrentToken();
                if (c == o && (u(p, "attribute-value") || u(p, "string")))
                    return {
                        text: "",
                        selection: [1, 1]
                    };
                p || (p = h.stepBackward());
                if (!p)
                    return;
                while (u(p, "tag-whitespace") || u(p, "whitespace"))
                    p = h.stepBackward();
                var d = !c || c.match(/\s/);
                if (u(p, "attribute-equals") && (d || c == ">") || u(p, "decl-attribute-equals") && (d || c == "?"))
                    return {
                        text: o + o,
                        selection: [1, 1]
                    }
            }
        }),
        this.add("string_dquotes", "deletion", function(e, t, n, r, i) {
            var s = r.doc.getTextRange(i);
            if (!i.isMultiLine() && (s == '"' || s == "'")) {
                var o = r.doc.getLine(i.start.row)
                  , u = o.substring(i.start.column + 1, i.start.column + 2);
                if (u == s)
                    return i.end.column++,
                    i
            }
        }),
        this.add("autoclosing", "insertion", function(e, t, n, r, i) {
            if (i == ">") {
                var o = n.getSelectionRange().start
                  , a = new s(r,o.row,o.column)
                  , f = a.getCurrentToken() || a.stepBackward();
                if (!f || !(u(f, "tag-name") || u(f, "tag-whitespace") || u(f, "attribute-name") || u(f, "attribute-equals") || u(f, "attribute-value")))
                    return;
                if (u(f, "reference.attribute-value"))
                    return;
                if (u(f, "attribute-value")) {
                    var l = a.getCurrentTokenColumn() + f.value.length;
                    if (o.column < l)
                        return;
                    if (o.column == l) {
                        var c = a.stepForward();
                        if (c && u(c, "attribute-value"))
                            return;
                        a.stepBackward()
                    }
                }
                if (/^\s*>/.test(r.getLine(o.row).slice(o.column)))
                    return;
                while (!u(f, "tag-name")) {
                    f = a.stepBackward();
                    if (f.value == "<") {
                        f = a.stepForward();
                        break
                    }
                }
                var h = a.getCurrentTokenRow()
                  , p = a.getCurrentTokenColumn();
                if (u(a.stepBackward(), "end-tag-open"))
                    return;
                var d = f.value;
                h == o.row && (d = d.substring(0, o.column - p));
                if (this.voidElements.hasOwnProperty(d.toLowerCase()))
                    return;
                return {
                    text: "></" + d + ">",
                    selection: [1, 1]
                }
            }
        }),
        this.add("autoindent", "insertion", function(e, t, n, r, i) {
            if (i == "\n") {
                var o = n.getCursorPosition()
                  , u = r.getLine(o.row)
                  , a = new s(r,o.row,o.column)
                  , f = a.getCurrentToken();
                if (f && f.type.indexOf("tag-close") !== -1) {
                    if (f.value == "/>")
                        return;
                    while (f && f.type.indexOf("tag-name") === -1)
                        f = a.stepBackward();
                    if (!f)
                        return;
                    var l = f.value
                      , c = a.getCurrentTokenRow();
                    f = a.stepBackward();
                    if (!f || f.type.indexOf("end-tag") !== -1)
                        return;
                    if (this.voidElements && !this.voidElements[l]) {
                        var h = r.getTokenAt(o.row, o.column + 1)
                          , u = r.getLine(c)
                          , p = this.$getIndent(u)
                          , d = p + r.getTabString();
                        return h && h.value === "</" ? {
                            text: "\n" + d + "\n" + p,
                            selection: [1, d.length, 1, d.length]
                        } : {
                            text: "\n" + d
                        }
                    }
                }
            }
        })
    };
    r.inherits(a, i),
    t.XmlBehaviour = a
}),
define("ace/mode/folding/mixed", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/fold_mode"], function(e, t, n) {
    "use strict";
    var r = e("../../lib/oop")
      , i = e("./fold_mode").FoldMode
      , s = t.FoldMode = function(e, t) {
        this.defaultMode = e,
        this.subModes = t
    }
    ;
    r.inherits(s, i),
    function() {
        this.$getMode = function(e) {
            typeof e != "string" && (e = e[0]);
            for (var t in this.subModes)
                if (e.indexOf(t) === 0)
                    return this.subModes[t];
            return null
        }
        ,
        this.$tryMode = function(e, t, n, r) {
            var i = this.$getMode(e);
            return i ? i.getFoldWidget(t, n, r) : ""
        }
        ,
        this.getFoldWidget = function(e, t, n) {
            return this.$tryMode(e.getState(n - 1), e, t, n) || this.$tryMode(e.getState(n), e, t, n) || this.defaultMode.getFoldWidget(e, t, n)
        }
        ,
        this.getFoldWidgetRange = function(e, t, n) {
            var r = this.$getMode(e.getState(n - 1));
            if (!r || !r.getFoldWidget(e, t, n))
                r = this.$getMode(e.getState(n));
            if (!r || !r.getFoldWidget(e, t, n))
                r = this.defaultMode;
            return r.getFoldWidgetRange(e, t, n)
        }
    }
    .call(s.prototype)
}),
define("ace/mode/folding/xml", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/range", "ace/mode/folding/fold_mode", "ace/token_iterator"], function(e, t, n) {
    "use strict";
    function l(e, t) {
        return e.type.lastIndexOf(t + ".xml") > -1
    }
    var r = e("../../lib/oop")
      , i = e("../../lib/lang")
      , s = e("../../range").Range
      , o = e("./fold_mode").FoldMode
      , u = e("../../token_iterator").TokenIterator
      , a = t.FoldMode = function(e, t) {
        o.call(this),
        this.voidElements = e || {},
        this.optionalEndTags = r.mixin({}, this.voidElements),
        t && r.mixin(this.optionalEndTags, t)
    }
    ;
    r.inherits(a, o);
    var f = function() {
        this.tagName = "",
        this.closing = !1,
        this.selfClosing = !1,
        this.start = {
            row: 0,
            column: 0
        },
        this.end = {
            row: 0,
            column: 0
        }
    };
    (function() {
        this.getFoldWidget = function(e, t, n) {
            var r = this._getFirstTagInLine(e, n);
            return r ? r.closing || !r.tagName && r.selfClosing ? t == "markbeginend" ? "end" : "" : !r.tagName || r.selfClosing || this.voidElements.hasOwnProperty(r.tagName.toLowerCase()) ? "" : this._findEndTagInLine(e, n, r.tagName, r.end.column) ? "" : "start" : this.getCommentFoldWidget(e, n)
        }
        ,
        this.getCommentFoldWidget = function(e, t) {
            return /comment/.test(e.getState(t)) && /<!-/.test(e.getLine(t)) ? "start" : ""
        }
        ,
        this._getFirstTagInLine = function(e, t) {
            var n = e.getTokens(t)
              , r = new f;
            for (var i = 0; i < n.length; i++) {
                var s = n[i];
                if (l(s, "tag-open")) {
                    r.end.column = r.start.column + s.value.length,
                    r.closing = l(s, "end-tag-open"),
                    s = n[++i];
                    if (!s)
                        return null;
                    r.tagName = s.value,
                    r.end.column += s.value.length;
                    for (i++; i < n.length; i++) {
                        s = n[i],
                        r.end.column += s.value.length;
                        if (l(s, "tag-close")) {
                            r.selfClosing = s.value == "/>";
                            break
                        }
                    }
                    return r
                }
                if (l(s, "tag-close"))
                    return r.selfClosing = s.value == "/>",
                    r;
                r.start.column += s.value.length
            }
            return null
        }
        ,
        this._findEndTagInLine = function(e, t, n, r) {
            var i = e.getTokens(t)
              , s = 0;
            for (var o = 0; o < i.length; o++) {
                var u = i[o];
                s += u.value.length;
                if (s < r)
                    continue;
                if (l(u, "end-tag-open")) {
                    u = i[o + 1];
                    if (u && u.value == n)
                        return !0
                }
            }
            return !1
        }
        ,
        this._readTagForward = function(e) {
            var t = e.getCurrentToken();
            if (!t)
                return null;
            var n = new f;
            do
                if (l(t, "tag-open"))
                    n.closing = l(t, "end-tag-open"),
                    n.start.row = e.getCurrentTokenRow(),
                    n.start.column = e.getCurrentTokenColumn();
                else if (l(t, "tag-name"))
                    n.tagName = t.value;
                else if (l(t, "tag-close"))
                    return n.selfClosing = t.value == "/>",
                    n.end.row = e.getCurrentTokenRow(),
                    n.end.column = e.getCurrentTokenColumn() + t.value.length,
                    e.stepForward(),
                    n;
            while (t = e.stepForward());
            return null
        }
        ,
        this._readTagBackward = function(e) {
            var t = e.getCurrentToken();
            if (!t)
                return null;
            var n = new f;
            do {
                if (l(t, "tag-open"))
                    return n.closing = l(t, "end-tag-open"),
                    n.start.row = e.getCurrentTokenRow(),
                    n.start.column = e.getCurrentTokenColumn(),
                    e.stepBackward(),
                    n;
                l(t, "tag-name") ? n.tagName = t.value : l(t, "tag-close") && (n.selfClosing = t.value == "/>",
                n.end.row = e.getCurrentTokenRow(),
                n.end.column = e.getCurrentTokenColumn() + t.value.length)
            } while (t = e.stepBackward());
            return null
        }
        ,
        this._pop = function(e, t) {
            while (e.length) {
                var n = e[e.length - 1];
                if (!t || n.tagName == t.tagName)
                    return e.pop();
                if (this.optionalEndTags.hasOwnProperty(n.tagName)) {
                    e.pop();
                    continue
                }
                return null
            }
        }
        ,
        this.getFoldWidgetRange = function(e, t, n) {
            var r = this._getFirstTagInLine(e, n);
            if (!r)
                return this.getCommentFoldWidget(e, n) && e.getCommentFoldRange(n, e.getLine(n).length);
            var i = r.closing || r.selfClosing, o = [], a;
            if (!i) {
                var f = new u(e,n,r.start.column)
                  , l = {
                    row: n,
                    column: r.start.column + r.tagName.length + 2
                };
                r.start.row == r.end.row && (l.column = r.end.column);
                while (a = this._readTagForward(f)) {
                    if (a.selfClosing) {
                        if (!o.length)
                            return a.start.column += a.tagName.length + 2,
                            a.end.column -= 2,
                            s.fromPoints(a.start, a.end);
                        continue
                    }
                    if (a.closing) {
                        this._pop(o, a);
                        if (o.length == 0)
                            return s.fromPoints(l, a.start)
                    } else
                        o.push(a)
                }
            } else {
                var f = new u(e,n,r.end.column)
                  , c = {
                    row: n,
                    column: r.start.column
                };
                while (a = this._readTagBackward(f)) {
                    if (a.selfClosing) {
                        if (!o.length)
                            return a.start.column += a.tagName.length + 2,
                            a.end.column -= 2,
                            s.fromPoints(a.start, a.end);
                        continue
                    }
                    if (!a.closing) {
                        this._pop(o, a);
                        if (o.length == 0)
                            return a.start.column += a.tagName.length + 2,
                            a.start.row == a.end.row && a.start.column < a.end.column && (a.start.column = a.end.column),
                            s.fromPoints(a.start, c)
                    } else
                        o.push(a)
                }
            }
        }
    }
    ).call(a.prototype)
}),
define("ace/mode/folding/html", ["require", "exports", "module", "ace/lib/oop", "ace/mode/folding/mixed", "ace/mode/folding/xml", "ace/mode/folding/cstyle"], function(e, t, n) {
    "use strict";
    var r = e("../../lib/oop")
      , i = e("./mixed").FoldMode
      , s = e("./xml").FoldMode
      , o = e("./cstyle").FoldMode
      , u = t.FoldMode = function(e, t) {
        i.call(this, new s(e,t), {
            "js-": new o,
            "css-": new o
        })
    }
    ;
    r.inherits(u, i)
}),
define("ace/mode/html_completions", ["require", "exports", "module", "ace/token_iterator"], function(e, t, n) {
    "use strict";
    function f(e, t) {
        return e.type.lastIndexOf(t + ".xml") > -1
    }
    function l(e, t) {
        var n = new r(e,t.row,t.column)
          , i = n.getCurrentToken();
        while (i && !f(i, "tag-name"))
            i = n.stepBackward();
        if (i)
            return i.value
    }
    function c(e, t) {
        var n = new r(e,t.row,t.column)
          , i = n.getCurrentToken();
        while (i && !f(i, "attribute-name"))
            i = n.stepBackward();
        if (i)
            return i.value
    }
    var r = e("../token_iterator").TokenIterator
      , i = ["accesskey", "class", "contenteditable", "contextmenu", "dir", "draggable", "dropzone", "hidden", "id", "inert", "itemid", "itemprop", "itemref", "itemscope", "itemtype", "lang", "spellcheck", "style", "tabindex", "title", "translate"]
      , s = ["onabort", "onblur", "oncancel", "oncanplay", "oncanplaythrough", "onchange", "onclick", "onclose", "oncontextmenu", "oncuechange", "ondblclick", "ondrag", "ondragend", "ondragenter", "ondragleave", "ondragover", "ondragstart", "ondrop", "ondurationchange", "onemptied", "onended", "onerror", "onfocus", "oninput", "oninvalid", "onkeydown", "onkeypress", "onkeyup", "onload", "onloadeddata", "onloadedmetadata", "onloadstart", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", "onpause", "onplay", "onplaying", "onprogress", "onratechange", "onreset", "onscroll", "onseeked", "onseeking", "onselect", "onshow", "onstalled", "onsubmit", "onsuspend", "ontimeupdate", "onvolumechange", "onwaiting"]
      , o = i.concat(s)
      , u = {
        a: {
            href: 1,
            target: {
                _blank: 1,
                top: 1
            },
            ping: 1,
            rel: {
                nofollow: 1,
                alternate: 1,
                author: 1,
                bookmark: 1,
                help: 1,
                license: 1,
                next: 1,
                noreferrer: 1,
                prefetch: 1,
                prev: 1,
                search: 1,
                tag: 1
            },
            media: 1,
            hreflang: 1,
            type: 1
        },
        abbr: {},
        address: {},
        area: {
            shape: 1,
            coords: 1,
            href: 1,
            hreflang: 1,
            alt: 1,
            target: 1,
            media: 1,
            rel: 1,
            ping: 1,
            type: 1
        },
        article: {
            pubdate: 1
        },
        aside: {},
        audio: {
            src: 1,
            autobuffer: 1,
            autoplay: {
                autoplay: 1
            },
            loop: {
                loop: 1
            },
            controls: {
                controls: 1
            },
            muted: {
                muted: 1
            },
            preload: {
                auto: 1,
                metadata: 1,
                none: 1
            }
        },
        b: {},
        base: {
            href: 1,
            target: 1
        },
        bdi: {},
        bdo: {},
        blockquote: {
            cite: 1
        },
        body: {
            onafterprint: 1,
            onbeforeprint: 1,
            onbeforeunload: 1,
            onhashchange: 1,
            onmessage: 1,
            onoffline: 1,
            onpopstate: 1,
            onredo: 1,
            onresize: 1,
            onstorage: 1,
            onundo: 1,
            onunload: 1
        },
        br: {},
        button: {
            autofocus: 1,
            disabled: {
                disabled: 1
            },
            form: 1,
            formaction: 1,
            formenctype: 1,
            formmethod: 1,
            formnovalidate: 1,
            formtarget: 1,
            name: 1,
            value: 1,
            type: {
                button: 1,
                submit: 1
            }
        },
        canvas: {
            width: 1,
            height: 1
        },
        caption: {},
        cite: {},
        code: {},
        col: {
            span: 1
        },
        colgroup: {
            span: 1
        },
        command: {
            type: 1,
            label: 1,
            icon: 1,
            disabled: 1,
            checked: 1,
            radiogroup: 1,
            command: 1
        },
        data: {},
        datalist: {},
        dd: {},
        del: {
            cite: 1,
            datetime: 1
        },
        details: {
            open: 1
        },
        dfn: {},
        dialog: {
            open: 1
        },
        div: {},
        dl: {},
        dt: {},
        em: {},
        embed: {
            src: 1,
            height: 1,
            width: 1,
            type: 1
        },
        fieldset: {
            disabled: 1,
            form: 1,
            name: 1
        },
        figcaption: {},
        figure: {},
        footer: {},
        form: {
            "accept-charset": 1,
            action: 1,
            autocomplete: 1,
            enctype: {
                "multipart/form-data": 1,
                "application/x-www-form-urlencoded": 1
            },
            method: {
                get: 1,
                post: 1
            },
            name: 1,
            novalidate: 1,
            target: {
                _blank: 1,
                top: 1
            }
        },
        h1: {},
        h2: {},
        h3: {},
        h4: {},
        h5: {},
        h6: {},
        head: {},
        header: {},
        hr: {},
        html: {
            manifest: 1
        },
        i: {},
        iframe: {
            name: 1,
            src: 1,
            height: 1,
            width: 1,
            sandbox: {
                "allow-same-origin": 1,
                "allow-top-navigation": 1,
                "allow-forms": 1,
                "allow-scripts": 1
            },
            seamless: {
                seamless: 1
            }
        },
        img: {
            alt: 1,
            src: 1,
            height: 1,
            width: 1,
            usemap: 1,
            ismap: 1
        },
        input: {
            type: {
                text: 1,
                password: 1,
                hidden: 1,
                checkbox: 1,
                submit: 1,
                radio: 1,
                file: 1,
                button: 1,
                reset: 1,
                image: 31,
                color: 1,
                date: 1,
                datetime: 1,
                "datetime-local": 1,
                email: 1,
                month: 1,
                number: 1,
                range: 1,
                search: 1,
                tel: 1,
                time: 1,
                url: 1,
                week: 1
            },
            accept: 1,
            alt: 1,
            autocomplete: {
                on: 1,
                off: 1
            },
            autofocus: {
                autofocus: 1
            },
            checked: {
                checked: 1
            },
            disabled: {
                disabled: 1
            },
            form: 1,
            formaction: 1,
            formenctype: {
                "application/x-www-form-urlencoded": 1,
                "multipart/form-data": 1,
                "text/plain": 1
            },
            formmethod: {
                get: 1,
                post: 1
            },
            formnovalidate: {
                formnovalidate: 1
            },
            formtarget: {
                _blank: 1,
                _self: 1,
                _parent: 1,
                _top: 1
            },
            height: 1,
            list: 1,
            max: 1,
            maxlength: 1,
            min: 1,
            multiple: {
                multiple: 1
            },
            name: 1,
            pattern: 1,
            placeholder: 1,
            readonly: {
                readonly: 1
            },
            required: {
                required: 1
            },
            size: 1,
            src: 1,
            step: 1,
            width: 1,
            files: 1,
            value: 1
        },
        ins: {
            cite: 1,
            datetime: 1
        },
        kbd: {},
        keygen: {
            autofocus: 1,
            challenge: {
                challenge: 1
            },
            disabled: {
                disabled: 1
            },
            form: 1,
            keytype: {
                rsa: 1,
                dsa: 1,
                ec: 1
            },
            name: 1
        },
        label: {
            form: 1,
            "for": 1
        },
        legend: {},
        li: {
            value: 1
        },
        link: {
            href: 1,
            hreflang: 1,
            rel: {
                stylesheet: 1,
                icon: 1
            },
            media: {
                all: 1,
                screen: 1,
                print: 1
            },
            type: {
                "text/css": 1,
                "image/png": 1,
                "image/jpeg": 1,
                "image/gif": 1
            },
            sizes: 1
        },
        main: {},
        map: {
            name: 1
        },
        mark: {},
        math: {},
        menu: {
            type: 1,
            label: 1
        },
        meta: {
            "http-equiv": {
                "content-type": 1
            },
            name: {
                description: 1,
                keywords: 1
            },
            content: {
                "text/html; charset=UTF-8": 1
            },
            charset: 1
        },
        meter: {
            value: 1,
            min: 1,
            max: 1,
            low: 1,
            high: 1,
            optimum: 1
        },
        nav: {},
        noscript: {
            href: 1
        },
        object: {
            param: 1,
            data: 1,
            type: 1,
            height: 1,
            width: 1,
            usemap: 1,
            name: 1,
            form: 1,
            classid: 1
        },
        ol: {
            start: 1,
            reversed: 1
        },
        optgroup: {
            disabled: 1,
            label: 1
        },
        option: {
            disabled: 1,
            selected: 1,
            label: 1,
            value: 1
        },
        output: {
            "for": 1,
            form: 1,
            name: 1
        },
        p: {},
        param: {
            name: 1,
            value: 1
        },
        pre: {},
        progress: {
            value: 1,
            max: 1
        },
        q: {
            cite: 1
        },
        rp: {},
        rt: {},
        ruby: {},
        s: {},
        samp: {},
        script: {
            charset: 1,
            type: {
                "text/javascript": 1
            },
            src: 1,
            defer: 1,
            async: 1
        },
        select: {
            autofocus: 1,
            disabled: 1,
            form: 1,
            multiple: {
                multiple: 1
            },
            name: 1,
            size: 1,
            readonly: {
                readonly: 1
            }
        },
        small: {},
        source: {
            src: 1,
            type: 1,
            media: 1
        },
        span: {},
        strong: {},
        style: {
            type: 1,
            media: {
                all: 1,
                screen: 1,
                print: 1
            },
            scoped: 1
        },
        sub: {},
        sup: {},
        svg: {},
        table: {
            summary: 1
        },
        tbody: {},
        td: {
            headers: 1,
            rowspan: 1,
            colspan: 1
        },
        textarea: {
            autofocus: {
                autofocus: 1
            },
            disabled: {
                disabled: 1
            },
            form: 1,
            maxlength: 1,
            name: 1,
            placeholder: 1,
            readonly: {
                readonly: 1
            },
            required: {
                required: 1
            },
            rows: 1,
            cols: 1,
            wrap: {
                on: 1,
                off: 1,
                hard: 1,
                soft: 1
            }
        },
        tfoot: {},
        th: {
            headers: 1,
            rowspan: 1,
            colspan: 1,
            scope: 1
        },
        thead: {},
        time: {
            datetime: 1
        },
        title: {},
        tr: {},
        track: {
            kind: 1,
            src: 1,
            srclang: 1,
            label: 1,
            "default": 1
        },
        section: {},
        summary: {},
        u: {},
        ul: {},
        "var": {},
        video: {
            src: 1,
            autobuffer: 1,
            autoplay: {
                autoplay: 1
            },
            loop: {
                loop: 1
            },
            controls: {
                controls: 1
            },
            width: 1,
            height: 1,
            poster: 1,
            muted: {
                muted: 1
            },
            preload: {
                auto: 1,
                metadata: 1,
                none: 1
            }
        },
        wbr: {}
    }
      , a = Object.keys(u)
      , h = function() {};
    (function() {
        this.getCompletions = function(e, t, n, r) {
            var i = t.getTokenAt(n.row, n.column);
            if (!i)
                return [];
            if (f(i, "tag-name") || f(i, "tag-open") || f(i, "end-tag-open"))
                return this.getTagCompletions(e, t, n, r);
            if (f(i, "tag-whitespace") || f(i, "attribute-name"))
                return this.getAttributeCompletions(e, t, n, r);
            if (f(i, "attribute-value"))
                return this.getAttributeValueCompletions(e, t, n, r);
            var s = t.getLine(n.row).substr(0, n.column);
            return /&[a-z]*$/i.test(s) ? this.getHTMLEntityCompletions(e, t, n, r) : []
        }
        ,
        this.getTagCompletions = function(e, t, n, r) {
            return a.map(function(e) {
                return {
                    value: e,
                    meta: "tag",
                    score: 1e6
                }
            })
        }
        ,
        this.getAttributeCompletions = function(e, t, n, r) {
            var i = l(t, n);
            if (!i)
                return [];
            var s = o;
            return i in u && (s = s.concat(Object.keys(u[i]))),
            s.map(function(e) {
                return {
                    caption: e,
                    snippet: e + '="$0"',
                    meta: "attribute",
                    score: 1e6
                }
            })
        }
        ,
        this.getAttributeValueCompletions = function(e, t, n, r) {
            var i = l(t, n)
              , s = c(t, n);
            if (!i)
                return [];
            var o = [];
            return i in u && s in u[i] && typeof u[i][s] == "object" && (o = Object.keys(u[i][s])),
            o.map(function(e) {
                return {
                    caption: e,
                    snippet: e,
                    meta: "attribute value",
                    score: 1e6
                }
            })
        }
        ,
        this.getHTMLEntityCompletions = function(e, t, n, r) {
            var i = ["Aacute;", "aacute;", "Acirc;", "acirc;", "acute;", "AElig;", "aelig;", "Agrave;", "agrave;", "alefsym;", "Alpha;", "alpha;", "amp;", "and;", "ang;", "Aring;", "aring;", "asymp;", "Atilde;", "atilde;", "Auml;", "auml;", "bdquo;", "Beta;", "beta;", "brvbar;", "bull;", "cap;", "Ccedil;", "ccedil;", "cedil;", "cent;", "Chi;", "chi;", "circ;", "clubs;", "cong;", "copy;", "crarr;", "cup;", "curren;", "Dagger;", "dagger;", "dArr;", "darr;", "deg;", "Delta;", "delta;", "diams;", "divide;", "Eacute;", "eacute;", "Ecirc;", "ecirc;", "Egrave;", "egrave;", "empty;", "emsp;", "ensp;", "Epsilon;", "epsilon;", "equiv;", "Eta;", "eta;", "ETH;", "eth;", "Euml;", "euml;", "euro;", "exist;", "fnof;", "forall;", "frac12;", "frac14;", "frac34;", "frasl;", "Gamma;", "gamma;", "ge;", "gt;", "hArr;", "harr;", "hearts;", "hellip;", "Iacute;", "iacute;", "Icirc;", "icirc;", "iexcl;", "Igrave;", "igrave;", "image;", "infin;", "int;", "Iota;", "iota;", "iquest;", "isin;", "Iuml;", "iuml;", "Kappa;", "kappa;", "Lambda;", "lambda;", "lang;", "laquo;", "lArr;", "larr;", "lceil;", "ldquo;", "le;", "lfloor;", "lowast;", "loz;", "lrm;", "lsaquo;", "lsquo;", "lt;", "macr;", "mdash;", "micro;", "middot;", "minus;", "Mu;", "mu;", "nabla;", "nbsp;", "ndash;", "ne;", "ni;", "not;", "notin;", "nsub;", "Ntilde;", "ntilde;", "Nu;", "nu;", "Oacute;", "oacute;", "Ocirc;", "ocirc;", "OElig;", "oelig;", "Ograve;", "ograve;", "oline;", "Omega;", "omega;", "Omicron;", "omicron;", "oplus;", "or;", "ordf;", "ordm;", "Oslash;", "oslash;", "Otilde;", "otilde;", "otimes;", "Ouml;", "ouml;", "para;", "part;", "permil;", "perp;", "Phi;", "phi;", "Pi;", "pi;", "piv;", "plusmn;", "pound;", "Prime;", "prime;", "prod;", "prop;", "Psi;", "psi;", "quot;", "radic;", "rang;", "raquo;", "rArr;", "rarr;", "rceil;", "rdquo;", "real;", "reg;", "rfloor;", "Rho;", "rho;", "rlm;", "rsaquo;", "rsquo;", "sbquo;", "Scaron;", "scaron;", "sdot;", "sect;", "shy;", "Sigma;", "sigma;", "sigmaf;", "sim;", "spades;", "sub;", "sube;", "sum;", "sup;", "sup1;", "sup2;", "sup3;", "supe;", "szlig;", "Tau;", "tau;", "there4;", "Theta;", "theta;", "thetasym;", "thinsp;", "THORN;", "thorn;", "tilde;", "times;", "trade;", "Uacute;", "uacute;", "uArr;", "uarr;", "Ucirc;", "ucirc;", "Ugrave;", "ugrave;", "uml;", "upsih;", "Upsilon;", "upsilon;", "Uuml;", "uuml;", "weierp;", "Xi;", "xi;", "Yacute;", "yacute;", "yen;", "Yuml;", "yuml;", "Zeta;", "zeta;", "zwj;", "zwnj;"];
            return i.map(function(e) {
                return {
                    caption: e,
                    snippet: e,
                    meta: "html entity",
                    score: 1e6
                }
            })
        }
    }
    ).call(h.prototype),
    t.HtmlCompletions = h
}),
define("ace/mode/html", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text", "ace/mode/javascript", "ace/mode/css", "ace/mode/html_highlight_rules", "ace/mode/behaviour/xml", "ace/mode/folding/html", "ace/mode/html_completions", "ace/worker/worker_client"], function(e, t, n) {
    "use strict";
    var r = e("../lib/oop")
      , i = e("../lib/lang")
      , s = e("./text").Mode
      , o = e("./javascript").Mode
      , u = e("./css").Mode
      , a = e("./html_highlight_rules").HtmlHighlightRules
      , f = e("./behaviour/xml").XmlBehaviour
      , l = e("./folding/html").FoldMode
      , c = e("./html_completions").HtmlCompletions
      , h = e("../worker/worker_client").WorkerClient
      , p = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]
      , d = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]
      , v = function(e) {
        this.fragmentContext = e && e.fragmentContext,
        this.HighlightRules = a,
        this.$behaviour = new f,
        this.$completer = new c,
        this.createModeDelegates({
            "js-": o,
            "css-": u
        }),
        this.foldingRules = new l(this.voidElements,i.arrayToMap(d))
    };
    r.inherits(v, s),
    function() {
        this.blockComment = {
            start: "<!--",
            end: "-->"
        },
        this.voidElements = i.arrayToMap(p),
        this.getNextLineIndent = function(e, t, n) {
            return this.$getIndent(t)
        }
        ,
        this.checkOutdent = function(e, t, n) {
            return !1
        }
        ,
        this.getCompletions = function(e, t, n, r) {
            return this.$completer.getCompletions(e, t, n, r)
        }
        ,
        this.createWorker = function(e) {
            if (this.constructor != v)
                return;
            var t = new h(["ace"],"ace/mode/html_worker","Worker");
            return t.attachToDocument(e.getDocument()),
            this.fragmentContext && t.call("setOptions", [{
                context: this.fragmentContext
            }]),
            t.on("error", function(t) {
                e.setAnnotations(t.data)
            }),
            t.on("terminate", function() {
                e.clearAnnotations()
            }),
            t
        }
        ,
        this.$id = "ace/mode/html",
        this.snippetFileId = "ace/snippets/html"
    }
    .call(v.prototype),
    t.Mode = v
});
(function() {
    window.require(["ace/mode/html"], function(m) {
        if (typeof module == "object" && typeof exports == "object" && module) {
            module.exports = m;
        }
    });
}
)();
define("ace/theme/monokai", ["require", "exports", "module", "ace/lib/dom"], function(e, t, n) {
    t.isDark = !0,
    t.cssClass = "ace-monokai",
    t.cssText = ".ace-monokai .ace_gutter {background: #2F3129;color: #8F908A}.ace-monokai .ace_print-margin {width: 1px;background: #555651}.ace-monokai {background-color: #272822;color: #F8F8F2}.ace-monokai .ace_cursor {color: #F8F8F0}.ace-monokai .ace_marker-layer .ace_selection {background: #49483E}.ace-monokai.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #272822;}.ace-monokai .ace_marker-layer .ace_step {background: rgb(102, 82, 0)}.ace-monokai .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #49483E}.ace-monokai .ace_marker-layer .ace_active-line {background: #202020}.ace-monokai .ace_gutter-active-line {background-color: #272727}.ace-monokai .ace_marker-layer .ace_selected-word {border: 1px solid #49483E}.ace-monokai .ace_invisible {color: #52524d}.ace-monokai .ace_entity.ace_name.ace_tag,.ace-monokai .ace_keyword,.ace-monokai .ace_meta.ace_tag,.ace-monokai .ace_storage {color: #F92672}.ace-monokai .ace_punctuation,.ace-monokai .ace_punctuation.ace_tag {color: #fff}.ace-monokai .ace_constant.ace_character,.ace-monokai .ace_constant.ace_language,.ace-monokai .ace_constant.ace_numeric,.ace-monokai .ace_constant.ace_other {color: #AE81FF}.ace-monokai .ace_invalid {color: #F8F8F0;background-color: #F92672}.ace-monokai .ace_invalid.ace_deprecated {color: #F8F8F0;background-color: #AE81FF}.ace-monokai .ace_support.ace_constant,.ace-monokai .ace_support.ace_function {color: #66D9EF}.ace-monokai .ace_fold {background-color: #A6E22E;border-color: #F8F8F2}.ace-monokai .ace_storage.ace_type,.ace-monokai .ace_support.ace_class,.ace-monokai .ace_support.ace_type {font-style: italic;color: #66D9EF}.ace-monokai .ace_entity.ace_name.ace_function,.ace-monokai .ace_entity.ace_other,.ace-monokai .ace_entity.ace_other.ace_attribute-name,.ace-monokai .ace_variable {color: #A6E22E}.ace-monokai .ace_variable.ace_parameter {font-style: italic;color: #FD971F}.ace-monokai .ace_string {color: #E6DB74}.ace-monokai .ace_comment {color: #75715E}.ace-monokai .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y}";
    var r = e("../lib/dom");
    r.importCssString(t.cssText, t.cssClass)
});
(function() {
    window.require(["ace/theme/monokai"], function(m) {
        if (typeof module == "object" && typeof exports == "object" && module) {
            module.exports = m;
        }
    });
}
)();
"no use strict";
!function(e) {
    function t(e, t) {
        var n = e
          , r = "";
        while (n) {
            var i = t[n];
            if (typeof i == "string")
                return i + r;
            if (i)
                return i.location.replace(/\/*$/, "/") + (r || i.main || i.name);
            if (i === !1)
                return "";
            var s = n.lastIndexOf("/");
            if (s === -1)
                break;
            r = n.substr(s) + r,
            n = n.slice(0, s)
        }
        return e
    }
    if (typeof e.window != "undefined" && e.document)
        return;
    if (e.require && e.define)
        return;
    e.console || (e.console = function() {
        var e = Array.prototype.slice.call(arguments, 0);
        postMessage({
            type: "log",
            data: e
        })
    }
    ,
    e.console.error = e.console.warn = e.console.log = e.console.trace = e.console),
    e.window = e,
    e.ace = e,
    e.onerror = function(e, t, n, r, i) {
        postMessage({
            type: "error",
            data: {
                message: e,
                data: i.data,
                file: t,
                line: n,
                col: r,
                stack: i.stack
            }
        })
    }
    ,
    e.normalizeModule = function(t, n) {
        if (n.indexOf("!") !== -1) {
            var r = n.split("!");
            return e.normalizeModule(t, r[0]) + "!" + e.normalizeModule(t, r[1])
        }
        if (n.charAt(0) == ".") {
            var i = t.split("/").slice(0, -1).join("/");
            n = (i ? i + "/" : "") + n;
            while (n.indexOf(".") !== -1 && s != n) {
                var s = n;
                n = n.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "")
            }
        }
        return n
    }
    ,
    e.require = function(r, i) {
        i || (i = r,
        r = null);
        if (!i.charAt)
            throw new Error("worker.js require() accepts only (parentId, id) as arguments");
        i = e.normalizeModule(r, i);
        var s = e.require.modules[i];
        if (s)
            return s.initialized || (s.initialized = !0,
            s.exports = s.factory().exports),
            s.exports;
        if (!e.require.tlns)
            return console.log("unable to load " + i);
        var o = t(i, e.require.tlns);
        return o.slice(-3) != ".js" && (o += ".js"),
        e.require.id = i,
        e.require.modules[i] = {},
        importScripts(o),
        e.require(r, i)
    }
    ,
    e.require.modules = {},
    e.require.tlns = {},
    e.define = function(t, n, r) {
        arguments.length == 2 ? (r = n,
        typeof t != "string" && (n = t,
        t = e.require.id)) : arguments.length == 1 && (r = t,
        n = [],
        t = e.require.id);
        if (typeof r != "function") {
            e.require.modules[t] = {
                exports: r,
                initialized: !0
            };
            return
        }
        n.length || (n = ["require", "exports", "module"]);
        var i = function(n) {
            return e.require(t, n)
        };
        e.require.modules[t] = {
            exports: {},
            factory: function() {
                var e = this
                  , t = r.apply(this, n.slice(0, r.length).map(function(t) {
                    switch (t) {
                    case "require":
                        return i;
                    case "exports":
                        return e.exports;
                    case "module":
                        return e;
                    default:
                        return i(t)
                    }
                }));
                return t && (e.exports = t),
                e
            }
        }
    }
    ,
    e.define.amd = {},
    require.tlns = {},
    e.initBaseUrls = function(t) {
        for (var n in t)
            require.tlns[n] = t[n]
    }
    ,
    e.initSender = function() {
        var n = e.require("ace/lib/event_emitter").EventEmitter
          , r = e.require("ace/lib/oop")
          , i = function() {};
        return function() {
            r.implement(this, n),
            this.callback = function(e, t) {
                postMessage({
                    type: "call",
                    id: t,
                    data: e
                })
            }
            ,
            this.emit = function(e, t) {
                postMessage({
                    type: "event",
                    name: e,
                    data: t
                })
            }
        }
        .call(i.prototype),
        new i
    }
    ;
    var n = e.main = null
      , r = e.sender = null;
    e.onmessage = function(t) {
        var i = t.data;
        if (i.event && r)
            r._signal(i.event, i.data);
        else if (i.command)
            if (n[i.command])
                n[i.command].apply(n, i.args);
            else {
                if (!e[i.command])
                    throw new Error("Unknown command:" + i.command);
                e[i.command].apply(e, i.args)
            }
        else if (i.init) {
            e.initBaseUrls(i.tlns),
            require("ace/lib/es5-shim"),
            r = e.sender = e.initSender();
            var s = require(i.module)[i.classname];
            n = e.main = new s(r)
        }
    }
}(this),
define("ace/lib/oop", [], function(e, t, n) {
    "use strict";
    t.inherits = function(e, t) {
        e.super_ = t,
        e.prototype = Object.create(t.prototype, {
            constructor: {
                value: e,
                enumerable: !1,
                writable: !0,
                configurable: !0
            }
        })
    }
    ,
    t.mixin = function(e, t) {
        for (var n in t)
            e[n] = t[n];
        return e
    }
    ,
    t.implement = function(e, n) {
        t.mixin(e, n)
    }
}),
define("ace/lib/lang", [], function(e, t, n) {
    "use strict";
    t.last = function(e) {
        return e[e.length - 1]
    }
    ,
    t.stringReverse = function(e) {
        return e.split("").reverse().join("")
    }
    ,
    t.stringRepeat = function(e, t) {
        var n = "";
        while (t > 0) {
            t & 1 && (n += e);
            if (t >>= 1)
                e += e
        }
        return n
    }
    ;
    var r = /^\s\s*/
      , i = /\s\s*$/;
    t.stringTrimLeft = function(e) {
        return e.replace(r, "")
    }
    ,
    t.stringTrimRight = function(e) {
        return e.replace(i, "")
    }
    ,
    t.copyObject = function(e) {
        var t = {};
        for (var n in e)
            t[n] = e[n];
        return t
    }
    ,
    t.copyArray = function(e) {
        var t = [];
        for (var n = 0, r = e.length; n < r; n++)
            e[n] && typeof e[n] == "object" ? t[n] = this.copyObject(e[n]) : t[n] = e[n];
        return t
    }
    ,
    t.deepCopy = function s(e) {
        if (typeof e != "object" || !e)
            return e;
        var t;
        if (Array.isArray(e)) {
            t = [];
            for (var n = 0; n < e.length; n++)
                t[n] = s(e[n]);
            return t
        }
        if (Object.prototype.toString.call(e) !== "[object Object]")
            return e;
        t = {};
        for (var n in e)
            t[n] = s(e[n]);
        return t
    }
    ,
    t.arrayToMap = function(e) {
        var t = {};
        for (var n = 0; n < e.length; n++)
            t[e[n]] = 1;
        return t
    }
    ,
    t.createMap = function(e) {
        var t = Object.create(null);
        for (var n in e)
            t[n] = e[n];
        return t
    }
    ,
    t.arrayRemove = function(e, t) {
        for (var n = 0; n <= e.length; n++)
            t === e[n] && e.splice(n, 1)
    }
    ,
    t.escapeRegExp = function(e) {
        return e.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1")
    }
    ,
    t.escapeHTML = function(e) {
        return ("" + e).replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;")
    }
    ,
    t.getMatchOffsets = function(e, t) {
        var n = [];
        return e.replace(t, function(e) {
            n.push({
                offset: arguments[arguments.length - 2],
                length: e.length
            })
        }),
        n
    }
    ,
    t.deferredCall = function(e) {
        var t = null
          , n = function() {
            t = null,
            e()
        }
          , r = function(e) {
            return r.cancel(),
            t = setTimeout(n, e || 0),
            r
        };
        return r.schedule = r,
        r.call = function() {
            return this.cancel(),
            e(),
            r
        }
        ,
        r.cancel = function() {
            return clearTimeout(t),
            t = null,
            r
        }
        ,
        r.isPending = function() {
            return t
        }
        ,
        r
    }
    ,
    t.delayedCall = function(e, t) {
        var n = null
          , r = function() {
            n = null,
            e()
        }
          , i = function(e) {
            n == null && (n = setTimeout(r, e || t))
        };
        return i.delay = function(e) {
            n && clearTimeout(n),
            n = setTimeout(r, e || t)
        }
        ,
        i.schedule = i,
        i.call = function() {
            this.cancel(),
            e()
        }
        ,
        i.cancel = function() {
            n && clearTimeout(n),
            n = null
        }
        ,
        i.isPending = function() {
            return n
        }
        ,
        i
    }
}),
define("ace/range", [], function(e, t, n) {
    "use strict";
    var r = function(e, t) {
        return e.row - t.row || e.column - t.column
    }
      , i = function(e, t, n, r) {
        this.start = {
            row: e,
            column: t
        },
        this.end = {
            row: n,
            column: r
        }
    };
    (function() {
        this.isEqual = function(e) {
            return this.start.row === e.start.row && this.end.row === e.end.row && this.start.column === e.start.column && this.end.column === e.end.column
        }
        ,
        this.toString = function() {
            return "Range: [" + this.start.row + "/" + this.start.column + "] -> [" + this.end.row + "/" + this.end.column + "]"
        }
        ,
        this.contains = function(e, t) {
            return this.compare(e, t) == 0
        }
        ,
        this.compareRange = function(e) {
            var t, n = e.end, r = e.start;
            return t = this.compare(n.row, n.column),
            t == 1 ? (t = this.compare(r.row, r.column),
            t == 1 ? 2 : t == 0 ? 1 : 0) : t == -1 ? -2 : (t = this.compare(r.row, r.column),
            t == -1 ? -1 : t == 1 ? 42 : 0)
        }
        ,
        this.comparePoint = function(e) {
            return this.compare(e.row, e.column)
        }
        ,
        this.containsRange = function(e) {
            return this.comparePoint(e.start) == 0 && this.comparePoint(e.end) == 0
        }
        ,
        this.intersects = function(e) {
            var t = this.compareRange(e);
            return t == -1 || t == 0 || t == 1
        }
        ,
        this.isEnd = function(e, t) {
            return this.end.row == e && this.end.column == t
        }
        ,
        this.isStart = function(e, t) {
            return this.start.row == e && this.start.column == t
        }
        ,
        this.setStart = function(e, t) {
            typeof e == "object" ? (this.start.column = e.column,
            this.start.row = e.row) : (this.start.row = e,
            this.start.column = t)
        }
        ,
        this.setEnd = function(e, t) {
            typeof e == "object" ? (this.end.column = e.column,
            this.end.row = e.row) : (this.end.row = e,
            this.end.column = t)
        }
        ,
        this.inside = function(e, t) {
            return this.compare(e, t) == 0 ? this.isEnd(e, t) || this.isStart(e, t) ? !1 : !0 : !1
        }
        ,
        this.insideStart = function(e, t) {
            return this.compare(e, t) == 0 ? this.isEnd(e, t) ? !1 : !0 : !1
        }
        ,
        this.insideEnd = function(e, t) {
            return this.compare(e, t) == 0 ? this.isStart(e, t) ? !1 : !0 : !1
        }
        ,
        this.compare = function(e, t) {
            return !this.isMultiLine() && e === this.start.row ? t < this.start.column ? -1 : t > this.end.column ? 1 : 0 : e < this.start.row ? -1 : e > this.end.row ? 1 : this.start.row === e ? t >= this.start.column ? 0 : -1 : this.end.row === e ? t <= this.end.column ? 0 : 1 : 0
        }
        ,
        this.compareStart = function(e, t) {
            return this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
        }
        ,
        this.compareEnd = function(e, t) {
            return this.end.row == e && this.end.column == t ? 1 : this.compare(e, t)
        }
        ,
        this.compareInside = function(e, t) {
            return this.end.row == e && this.end.column == t ? 1 : this.start.row == e && this.start.column == t ? -1 : this.compare(e, t)
        }
        ,
        this.clipRows = function(e, t) {
            if (this.end.row > t)
                var n = {
                    row: t + 1,
                    column: 0
                };
            else if (this.end.row < e)
                var n = {
                    row: e,
                    column: 0
                };
            if (this.start.row > t)
                var r = {
                    row: t + 1,
                    column: 0
                };
            else if (this.start.row < e)
                var r = {
                    row: e,
                    column: 0
                };
            return i.fromPoints(r || this.start, n || this.end)
        }
        ,
        this.extend = function(e, t) {
            var n = this.compare(e, t);
            if (n == 0)
                return this;
            if (n == -1)
                var r = {
                    row: e,
                    column: t
                };
            else
                var s = {
                    row: e,
                    column: t
                };
            return i.fromPoints(r || this.start, s || this.end)
        }
        ,
        this.isEmpty = function() {
            return this.start.row === this.end.row && this.start.column === this.end.column
        }
        ,
        this.isMultiLine = function() {
            return this.start.row !== this.end.row
        }
        ,
        this.clone = function() {
            return i.fromPoints(this.start, this.end)
        }
        ,
        this.collapseRows = function() {
            return this.end.column == 0 ? new i(this.start.row,0,Math.max(this.start.row, this.end.row - 1),0) : new i(this.start.row,0,this.end.row,0)
        }
        ,
        this.toScreenRange = function(e) {
            var t = e.documentToScreenPosition(this.start)
              , n = e.documentToScreenPosition(this.end);
            return new i(t.row,t.column,n.row,n.column)
        }
        ,
        this.moveBy = function(e, t) {
            this.start.row += e,
            this.start.column += t,
            this.end.row += e,
            this.end.column += t
        }
    }
    ).call(i.prototype),
    i.fromPoints = function(e, t) {
        return new i(e.row,e.column,t.row,t.column)
    }
    ,
    i.comparePoints = r,
    i.comparePoints = function(e, t) {
        return e.row - t.row || e.column - t.column
    }
    ,
    t.Range = i
}),
define("ace/apply_delta", [], function(e, t, n) {
    "use strict";
    function r(e, t) {
        throw console.log("Invalid Delta:", e),
        "Invalid Delta: " + t
    }
    function i(e, t) {
        return t.row >= 0 && t.row < e.length && t.column >= 0 && t.column <= e[t.row].length
    }
    function s(e, t) {
        t.action != "insert" && t.action != "remove" && r(t, "delta.action must be 'insert' or 'remove'"),
        t.lines instanceof Array || r(t, "delta.lines must be an Array"),
        (!t.start || !t.end) && r(t, "delta.start/end must be an present");
        var n = t.start;
        i(e, t.start) || r(t, "delta.start must be contained in document");
        var s = t.end;
        t.action == "remove" && !i(e, s) && r(t, "delta.end must contained in document for 'remove' actions");
        var o = s.row - n.row
          , u = s.column - (o == 0 ? n.column : 0);
        (o != t.lines.length - 1 || t.lines[o].length != u) && r(t, "delta.range must match delta lines")
    }
    t.applyDelta = function(e, t, n) {
        var r = t.start.row
          , i = t.start.column
          , s = e[r] || "";
        switch (t.action) {
        case "insert":
            var o = t.lines;
            if (o.length === 1)
                e[r] = s.substring(0, i) + t.lines[0] + s.substring(i);
            else {
                var u = [r, 1].concat(t.lines);
                e.splice.apply(e, u),
                e[r] = s.substring(0, i) + e[r],
                e[r + t.lines.length - 1] += s.substring(i)
            }
            break;
        case "remove":
            var a = t.end.column
              , f = t.end.row;
            r === f ? e[r] = s.substring(0, i) + s.substring(a) : e.splice(r, f - r + 1, s.substring(0, i) + e[f].substring(a))
        }
    }
}),
define("ace/lib/event_emitter", [], function(e, t, n) {
    "use strict";
    var r = {}
      , i = function() {
        this.propagationStopped = !0
    }
      , s = function() {
        this.defaultPrevented = !0
    };
    r._emit = r._dispatchEvent = function(e, t) {
        this._eventRegistry || (this._eventRegistry = {}),
        this._defaultHandlers || (this._defaultHandlers = {});
        var n = this._eventRegistry[e] || []
          , r = this._defaultHandlers[e];
        if (!n.length && !r)
            return;
        if (typeof t != "object" || !t)
            t = {};
        t.type || (t.type = e),
        t.stopPropagation || (t.stopPropagation = i),
        t.preventDefault || (t.preventDefault = s),
        n = n.slice();
        for (var o = 0; o < n.length; o++) {
            n[o](t, this);
            if (t.propagationStopped)
                break
        }
        if (r && !t.defaultPrevented)
            return r(t, this)
    }
    ,
    r._signal = function(e, t) {
        var n = (this._eventRegistry || {})[e];
        if (!n)
            return;
        n = n.slice();
        for (var r = 0; r < n.length; r++)
            n[r](t, this)
    }
    ,
    r.once = function(e, t) {
        var n = this;
        this.addEventListener(e, function r() {
            n.removeEventListener(e, r),
            t.apply(null, arguments)
        });
        if (!t)
            return new Promise(function(e) {
                t = e
            }
            )
    }
    ,
    r.setDefaultHandler = function(e, t) {
        var n = this._defaultHandlers;
        n || (n = this._defaultHandlers = {
            _disabled_: {}
        });
        if (n[e]) {
            var r = n[e]
              , i = n._disabled_[e];
            i || (n._disabled_[e] = i = []),
            i.push(r);
            var s = i.indexOf(t);
            s != -1 && i.splice(s, 1)
        }
        n[e] = t
    }
    ,
    r.removeDefaultHandler = function(e, t) {
        var n = this._defaultHandlers;
        if (!n)
            return;
        var r = n._disabled_[e];
        if (n[e] == t)
            r && this.setDefaultHandler(e, r.pop());
        else if (r) {
            var i = r.indexOf(t);
            i != -1 && r.splice(i, 1)
        }
    }
    ,
    r.on = r.addEventListener = function(e, t, n) {
        this._eventRegistry = this._eventRegistry || {};
        var r = this._eventRegistry[e];
        return r || (r = this._eventRegistry[e] = []),
        r.indexOf(t) == -1 && r[n ? "unshift" : "push"](t),
        t
    }
    ,
    r.off = r.removeListener = r.removeEventListener = function(e, t) {
        this._eventRegistry = this._eventRegistry || {};
        var n = this._eventRegistry[e];
        if (!n)
            return;
        var r = n.indexOf(t);
        r !== -1 && n.splice(r, 1)
    }
    ,
    r.removeAllListeners = function(e) {
        this._eventRegistry && (this._eventRegistry[e] = [])
    }
    ,
    t.EventEmitter = r
}),
define("ace/anchor", [], function(e, t, n) {
    "use strict";
    var r = e("./lib/oop")
      , i = e("./lib/event_emitter").EventEmitter
      , s = t.Anchor = function(e, t, n) {
        this.$onChange = this.onChange.bind(this),
        this.attach(e),
        typeof n == "undefined" ? this.setPosition(t.row, t.column) : this.setPosition(t, n)
    }
    ;
    (function() {
        function e(e, t, n) {
            var r = n ? e.column <= t.column : e.column < t.column;
            return e.row < t.row || e.row == t.row && r
        }
        function t(t, n, r) {
            var i = t.action == "insert"
              , s = (i ? 1 : -1) * (t.end.row - t.start.row)
              , o = (i ? 1 : -1) * (t.end.column - t.start.column)
              , u = t.start
              , a = i ? u : t.end;
            return e(n, u, r) ? {
                row: n.row,
                column: n.column
            } : e(a, n, !r) ? {
                row: n.row + s,
                column: n.column + (n.row == a.row ? o : 0)
            } : {
                row: u.row,
                column: u.column
            }
        }
        r.implement(this, i),
        this.getPosition = function() {
            return this.$clipPositionToDocument(this.row, this.column)
        }
        ,
        this.getDocument = function() {
            return this.document
        }
        ,
        this.$insertRight = !1,
        this.onChange = function(e) {
            if (e.start.row == e.end.row && e.start.row != this.row)
                return;
            if (e.start.row > this.row)
                return;
            var n = t(e, {
                row: this.row,
                column: this.column
            }, this.$insertRight);
            this.setPosition(n.row, n.column, !0)
        }
        ,
        this.setPosition = function(e, t, n) {
            var r;
            n ? r = {
                row: e,
                column: t
            } : r = this.$clipPositionToDocument(e, t);
            if (this.row == r.row && this.column == r.column)
                return;
            var i = {
                row: this.row,
                column: this.column
            };
            this.row = r.row,
            this.column = r.column,
            this._signal("change", {
                old: i,
                value: r
            })
        }
        ,
        this.detach = function() {
            this.document.removeEventListener("change", this.$onChange)
        }
        ,
        this.attach = function(e) {
            this.document = e || this.document,
            this.document.on("change", this.$onChange)
        }
        ,
        this.$clipPositionToDocument = function(e, t) {
            var n = {};
            return e >= this.document.getLength() ? (n.row = Math.max(0, this.document.getLength() - 1),
            n.column = this.document.getLine(n.row).length) : e < 0 ? (n.row = 0,
            n.column = 0) : (n.row = e,
            n.column = Math.min(this.document.getLine(n.row).length, Math.max(0, t))),
            t < 0 && (n.column = 0),
            n
        }
    }
    ).call(s.prototype)
}),
define("ace/document", [], function(e, t, n) {
    "use strict";
    var r = e("./lib/oop")
      , i = e("./apply_delta").applyDelta
      , s = e("./lib/event_emitter").EventEmitter
      , o = e("./range").Range
      , u = e("./anchor").Anchor
      , a = function(e) {
        this.$lines = [""],
        e.length === 0 ? this.$lines = [""] : Array.isArray(e) ? this.insertMergedLines({
            row: 0,
            column: 0
        }, e) : this.insert({
            row: 0,
            column: 0
        }, e)
    };
    (function() {
        r.implement(this, s),
        this.setValue = function(e) {
            var t = this.getLength() - 1;
            this.remove(new o(0,0,t,this.getLine(t).length)),
            this.insert({
                row: 0,
                column: 0
            }, e)
        }
        ,
        this.getValue = function() {
            return this.getAllLines().join(this.getNewLineCharacter())
        }
        ,
        this.createAnchor = function(e, t) {
            return new u(this,e,t)
        }
        ,
        "aaa".split(/a/).length === 0 ? this.$split = function(e) {
            return e.replace(/\r\n|\r/g, "\n").split("\n")
        }
        : this.$split = function(e) {
            return e.split(/\r\n|\r|\n/)
        }
        ,
        this.$detectNewLine = function(e) {
            var t = e.match(/^.*?(\r\n|\r|\n)/m);
            this.$autoNewLine = t ? t[1] : "\n",
            this._signal("changeNewLineMode")
        }
        ,
        this.getNewLineCharacter = function() {
            switch (this.$newLineMode) {
            case "windows":
                return "\r\n";
            case "unix":
                return "\n";
            default:
                return this.$autoNewLine || "\n"
            }
        }
        ,
        this.$autoNewLine = "",
        this.$newLineMode = "auto",
        this.setNewLineMode = function(e) {
            if (this.$newLineMode === e)
                return;
            this.$newLineMode = e,
            this._signal("changeNewLineMode")
        }
        ,
        this.getNewLineMode = function() {
            return this.$newLineMode
        }
        ,
        this.isNewLine = function(e) {
            return e == "\r\n" || e == "\r" || e == "\n"
        }
        ,
        this.getLine = function(e) {
            return this.$lines[e] || ""
        }
        ,
        this.getLines = function(e, t) {
            return this.$lines.slice(e, t + 1)
        }
        ,
        this.getAllLines = function() {
            return this.getLines(0, this.getLength())
        }
        ,
        this.getLength = function() {
            return this.$lines.length
        }
        ,
        this.getTextRange = function(e) {
            return this.getLinesForRange(e).join(this.getNewLineCharacter())
        }
        ,
        this.getLinesForRange = function(e) {
            var t;
            if (e.start.row === e.end.row)
                t = [this.getLine(e.start.row).substring(e.start.column, e.end.column)];
            else {
                t = this.getLines(e.start.row, e.end.row),
                t[0] = (t[0] || "").substring(e.start.column);
                var n = t.length - 1;
                e.end.row - e.start.row == n && (t[n] = t[n].substring(0, e.end.column))
            }
            return t
        }
        ,
        this.insertLines = function(e, t) {
            return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),
            this.insertFullLines(e, t)
        }
        ,
        this.removeLines = function(e, t) {
            return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),
            this.removeFullLines(e, t)
        }
        ,
        this.insertNewLine = function(e) {
            return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),
            this.insertMergedLines(e, ["", ""])
        }
        ,
        this.insert = function(e, t) {
            return this.getLength() <= 1 && this.$detectNewLine(t),
            this.insertMergedLines(e, this.$split(t))
        }
        ,
        this.insertInLine = function(e, t) {
            var n = this.clippedPos(e.row, e.column)
              , r = this.pos(e.row, e.column + t.length);
            return this.applyDelta({
                start: n,
                end: r,
                action: "insert",
                lines: [t]
            }, !0),
            this.clonePos(r)
        }
        ,
        this.clippedPos = function(e, t) {
            var n = this.getLength();
            e === undefined ? e = n : e < 0 ? e = 0 : e >= n && (e = n - 1,
            t = undefined);
            var r = this.getLine(e);
            return t == undefined && (t = r.length),
            t = Math.min(Math.max(t, 0), r.length),
            {
                row: e,
                column: t
            }
        }
        ,
        this.clonePos = function(e) {
            return {
                row: e.row,
                column: e.column
            }
        }
        ,
        this.pos = function(e, t) {
            return {
                row: e,
                column: t
            }
        }
        ,
        this.$clipPosition = function(e) {
            var t = this.getLength();
            return e.row >= t ? (e.row = Math.max(0, t - 1),
            e.column = this.getLine(t - 1).length) : (e.row = Math.max(0, e.row),
            e.column = Math.min(Math.max(e.column, 0), this.getLine(e.row).length)),
            e
        }
        ,
        this.insertFullLines = function(e, t) {
            e = Math.min(Math.max(e, 0), this.getLength());
            var n = 0;
            e < this.getLength() ? (t = t.concat([""]),
            n = 0) : (t = [""].concat(t),
            e--,
            n = this.$lines[e].length),
            this.insertMergedLines({
                row: e,
                column: n
            }, t)
        }
        ,
        this.insertMergedLines = function(e, t) {
            var n = this.clippedPos(e.row, e.column)
              , r = {
                row: n.row + t.length - 1,
                column: (t.length == 1 ? n.column : 0) + t[t.length - 1].length
            };
            return this.applyDelta({
                start: n,
                end: r,
                action: "insert",
                lines: t
            }),
            this.clonePos(r)
        }
        ,
        this.remove = function(e) {
            var t = this.clippedPos(e.start.row, e.start.column)
              , n = this.clippedPos(e.end.row, e.end.column);
            return this.applyDelta({
                start: t,
                end: n,
                action: "remove",
                lines: this.getLinesForRange({
                    start: t,
                    end: n
                })
            }),
            this.clonePos(t)
        }
        ,
        this.removeInLine = function(e, t, n) {
            var r = this.clippedPos(e, t)
              , i = this.clippedPos(e, n);
            return this.applyDelta({
                start: r,
                end: i,
                action: "remove",
                lines: this.getLinesForRange({
                    start: r,
                    end: i
                })
            }, !0),
            this.clonePos(r)
        }
        ,
        this.removeFullLines = function(e, t) {
            e = Math.min(Math.max(0, e), this.getLength() - 1),
            t = Math.min(Math.max(0, t), this.getLength() - 1);
            var n = t == this.getLength() - 1 && e > 0
              , r = t < this.getLength() - 1
              , i = n ? e - 1 : e
              , s = n ? this.getLine(i).length : 0
              , u = r ? t + 1 : t
              , a = r ? 0 : this.getLine(u).length
              , f = new o(i,s,u,a)
              , l = this.$lines.slice(e, t + 1);
            return this.applyDelta({
                start: f.start,
                end: f.end,
                action: "remove",
                lines: this.getLinesForRange(f)
            }),
            l
        }
        ,
        this.removeNewLine = function(e) {
            e < this.getLength() - 1 && e >= 0 && this.applyDelta({
                start: this.pos(e, this.getLine(e).length),
                end: this.pos(e + 1, 0),
                action: "remove",
                lines: ["", ""]
            })
        }
        ,
        this.replace = function(e, t) {
            e instanceof o || (e = o.fromPoints(e.start, e.end));
            if (t.length === 0 && e.isEmpty())
                return e.start;
            if (t == this.getTextRange(e))
                return e.end;
            this.remove(e);
            var n;
            return t ? n = this.insert(e.start, t) : n = e.start,
            n
        }
        ,
        this.applyDeltas = function(e) {
            for (var t = 0; t < e.length; t++)
                this.applyDelta(e[t])
        }
        ,
        this.revertDeltas = function(e) {
            for (var t = e.length - 1; t >= 0; t--)
                this.revertDelta(e[t])
        }
        ,
        this.applyDelta = function(e, t) {
            var n = e.action == "insert";
            if (n ? e.lines.length <= 1 && !e.lines[0] : !o.comparePoints(e.start, e.end))
                return;
            n && e.lines.length > 2e4 ? this.$splitAndapplyLargeDelta(e, 2e4) : (i(this.$lines, e, t),
            this._signal("change", e))
        }
        ,
        this.$safeApplyDelta = function(e) {
            var t = this.$lines.length;
            (e.action == "remove" && e.start.row < t && e.end.row < t || e.action == "insert" && e.start.row <= t) && this.applyDelta(e)
        }
        ,
        this.$splitAndapplyLargeDelta = function(e, t) {
            var n = e.lines
              , r = n.length - t + 1
              , i = e.start.row
              , s = e.start.column;
            for (var o = 0, u = 0; o < r; o = u) {
                u += t - 1;
                var a = n.slice(o, u);
                a.push(""),
                this.applyDelta({
                    start: this.pos(i + o, s),
                    end: this.pos(i + u, s = 0),
                    action: e.action,
                    lines: a
                }, !0)
            }
            e.lines = n.slice(o),
            e.start.row = i + o,
            e.start.column = s,
            this.applyDelta(e, !0)
        }
        ,
        this.revertDelta = function(e) {
            this.$safeApplyDelta({
                start: this.clonePos(e.start),
                end: this.clonePos(e.end),
                action: e.action == "insert" ? "remove" : "insert",
                lines: e.lines.slice()
            })
        }
        ,
        this.indexToPosition = function(e, t) {
            var n = this.$lines || this.getAllLines()
              , r = this.getNewLineCharacter().length;
            for (var i = t || 0, s = n.length; i < s; i++) {
                e -= n[i].length + r;
                if (e < 0)
                    return {
                        row: i,
                        column: e + n[i].length + r
                    }
            }
            return {
                row: s - 1,
                column: e + n[s - 1].length + r
            }
        }
        ,
        this.positionToIndex = function(e, t) {
            var n = this.$lines || this.getAllLines()
              , r = this.getNewLineCharacter().length
              , i = 0
              , s = Math.min(e.row, n.length);
            for (var o = t || 0; o < s; ++o)
                i += n[o].length + r;
            return i + e.column
        }
    }
    ).call(a.prototype),
    t.Document = a
}),
define("ace/worker/mirror", [], function(e, t, n) {
    "use strict";
    var r = e("../range").Range
      , i = e("../document").Document
      , s = e("../lib/lang")
      , o = t.Mirror = function(e) {
        this.sender = e;
        var t = this.doc = new i("")
          , n = this.deferredUpdate = s.delayedCall(this.onUpdate.bind(this))
          , r = this;
        e.on("change", function(e) {
            var i = e.data;
            if (i[0].start)
                t.applyDeltas(i);
            else
                for (var s = 0; s < i.length; s += 2) {
                    if (Array.isArray(i[s + 1]))
                        var o = {
                            action: "insert",
                            start: i[s],
                            lines: i[s + 1]
                        };
                    else
                        var o = {
                            action: "remove",
                            start: i[s],
                            end: i[s + 1]
                        };
                    t.applyDelta(o, !0)
                }
            if (r.$timeout)
                return n.schedule(r.$timeout);
            r.onUpdate()
        })
    }
    ;
    (function() {
        this.$timeout = 500,
        this.setTimeout = function(e) {
            this.$timeout = e
        }
        ,
        this.setValue = function(e) {
            this.doc.setValue(e),
            this.deferredUpdate.schedule(this.$timeout)
        }
        ,
        this.getValue = function(e) {
            this.sender.callback(this.doc.getValue(), e)
        }
        ,
        this.onUpdate = function() {}
        ,
        this.isPending = function() {
            return this.deferredUpdate.isPending()
        }
    }
    ).call(o.prototype)
}),
define("ace/mode/html/saxparser", [], function(e, t, n) {
    n.exports = function r(t, n, i) {
        function s(u, a) {
            if (!n[u]) {
                if (!t[u]) {
                    var f = typeof e == "function" && e;
                    if (!a && f)
                        return f(u, !0);
                    if (o)
                        return o(u, !0);
                    throw new Error("Cannot find module '" + u + "'")
                }
                var l = n[u] = {
                    exports: {}
                };
                t[u][0].call(l.exports, function(e) {
                    var n = t[u][1][e];
                    return s(n ? n : e)
                }, l, l.exports, r, t, n, i)
            }
            return n[u].exports
        }
        var o = typeof e == "function" && e;
        for (var u = 0; u < i.length; u++)
            s(i[u]);
        return s
    }({
        1: [function(e, t, n) {
            function r(e) {
                if (e.namespaceURI === "http://www.w3.org/1999/xhtml")
                    return e.localName === "applet" || e.localName === "caption" || e.localName === "marquee" || e.localName === "object" || e.localName === "table" || e.localName === "td" || e.localName === "th";
                if (e.namespaceURI === "http://www.w3.org/1998/Math/MathML")
                    return e.localName === "mi" || e.localName === "mo" || e.localName === "mn" || e.localName === "ms" || e.localName === "mtext" || e.localName === "annotation-xml";
                if (e.namespaceURI === "http://www.w3.org/2000/svg")
                    return e.localName === "foreignObject" || e.localName === "desc" || e.localName === "title"
            }
            function i(e) {
                return r(e) || e.namespaceURI === "http://www.w3.org/1999/xhtml" && e.localName === "ol" || e.namespaceURI === "http://www.w3.org/1999/xhtml" && e.localName === "ul"
            }
            function s(e) {
                return e.namespaceURI === "http://www.w3.org/1999/xhtml" && e.localName === "table" || e.namespaceURI === "http://www.w3.org/1999/xhtml" && e.localName === "html"
            }
            function o(e) {
                return e.namespaceURI === "http://www.w3.org/1999/xhtml" && e.localName === "tbody" || e.namespaceURI === "http://www.w3.org/1999/xhtml" && e.localName === "tfoot" || e.namespaceURI === "http://www.w3.org/1999/xhtml" && e.localName === "thead" || e.namespaceURI === "http://www.w3.org/1999/xhtml" && e.localName === "html"
            }
            function u(e) {
                return e.namespaceURI === "http://www.w3.org/1999/xhtml" && e.localName === "tr" || e.namespaceURI === "http://www.w3.org/1999/xhtml" && e.localName === "html"
            }
            function a(e) {
                return r(e) || e.namespaceURI === "http://www.w3.org/1999/xhtml" && e.localName === "button"
            }
            function f(e) {
                return (e.namespaceURI !== "http://www.w3.org/1999/xhtml" || e.localName !== "optgroup") && (e.namespaceURI !== "http://www.w3.org/1999/xhtml" || e.localName !== "option")
            }
            function l() {
                this.elements = [],
                this.rootNode = null,
                this.headElement = null,
                this.bodyElement = null
            }
            l.prototype._inScope = function(e, t) {
                for (var n = this.elements.length - 1; n >= 0; n--) {
                    var r = this.elements[n];
                    if (r.localName === e)
                        return !0;
                    if (t(r))
                        return !1
                }
            }
            ,
            l.prototype.push = function(e) {
                this.elements.push(e)
            }
            ,
            l.prototype.pushHtmlElement = function(e) {
                this.rootNode = e.node,
                this.push(e)
            }
            ,
            l.prototype.pushHeadElement = function(e) {
                this.headElement = e.node,
                this.push(e)
            }
            ,
            l.prototype.pushBodyElement = function(e) {
                this.bodyElement = e.node,
                this.push(e)
            }
            ,
            l.prototype.pop = function() {
                return this.elements.pop()
            }
            ,
            l.prototype.remove = function(e) {
                this.elements.splice(this.elements.indexOf(e), 1)
            }
            ,
            l.prototype.popUntilPopped = function(e) {
                var t;
                do
                    t = this.pop();
                while (t.localName != e)
            }
            ,
            l.prototype.popUntilTableScopeMarker = function() {
                while (!s(this.top))
                    this.pop()
            }
            ,
            l.prototype.popUntilTableBodyScopeMarker = function() {
                while (!o(this.top))
                    this.pop()
            }
            ,
            l.prototype.popUntilTableRowScopeMarker = function() {
                while (!u(this.top))
                    this.pop()
            }
            ,
            l.prototype.item = function(e) {
                return this.elements[e]
            }
            ,
            l.prototype.contains = function(e) {
                return this.elements.indexOf(e) !== -1
            }
            ,
            l.prototype.inScope = function(e) {
                return this._inScope(e, r)
            }
            ,
            l.prototype.inListItemScope = function(e) {
                return this._inScope(e, i)
            }
            ,
            l.prototype.inTableScope = function(e) {
                return this._inScope(e, s)
            }
            ,
            l.prototype.inButtonScope = function(e) {
                return this._inScope(e, a)
            }
            ,
            l.prototype.inSelectScope = function(e) {
                return this._inScope(e, f)
            }
            ,
            l.prototype.hasNumberedHeaderElementInScope = function() {
                for (var e = this.elements.length - 1; e >= 0; e--) {
                    var t = this.elements[e];
                    if (t.isNumberedHeader())
                        return !0;
                    if (r(t))
                        return !1
                }
            }
            ,
            l.prototype.furthestBlockForFormattingElement = function(e) {
                var t = null;
                for (var n = this.elements.length - 1; n >= 0; n--) {
                    var r = this.elements[n];
                    if (r.node === e)
                        break;
                    r.isSpecial() && (t = r)
                }
                return t
            }
            ,
            l.prototype.findIndex = function(e) {
                for (var t = this.elements.length - 1; t >= 0; t--)
                    if (this.elements[t].localName == e)
                        return t;
                return -1
            }
            ,
            l.prototype.remove_openElements_until = function(e) {
                var t = !1, n;
                while (!t)
                    n = this.elements.pop(),
                    t = e(n);
                return n
            }
            ,
            Object.defineProperty(l.prototype, "top", {
                get: function() {
                    return this.elements[this.elements.length - 1]
                }
            }),
            Object.defineProperty(l.prototype, "length", {
                get: function() {
                    return this.elements.length
                }
            }),
            n.ElementStack = l
        }
        , {}],
        2: [function(e, t, n) {
            function o(e) {
                return e >= "0" && e <= "9" || e >= "a" && e <= "z" || e >= "A" && e <= "Z"
            }
            function u(e) {
                return e >= "0" && e <= "9" || e >= "a" && e <= "f" || e >= "A" && e <= "F"
            }
            function a(e) {
                return e >= "0" && e <= "9"
            }
            var r = e("html5-entities")
              , i = e("./InputStream").InputStream
              , s = {};
            Object.keys(r).forEach(function(e) {
                for (var t = 0; t < e.length; t++)
                    s[e.substring(0, t + 1)] = !0
            });
            var f = {};
            f.consumeEntity = function(e, t, n) {
                var f = ""
                  , l = ""
                  , c = e.char();
                if (c === i.EOF)
                    return !1;
                l += c;
                if (c == "	" || c == "\n" || c == "\x0b" || c == " " || c == "<" || c == "&")
                    return e.unget(l),
                    !1;
                if (n === c)
                    return e.unget(l),
                    !1;
                if (c == "#") {
                    c = e.shift(1);
                    if (c === i.EOF)
                        return t._parseError("expected-numeric-entity-but-got-eof"),
                        e.unget(l),
                        !1;
                    l += c;
                    var h = 10
                      , p = a;
                    if (c == "x" || c == "X") {
                        h = 16,
                        p = u,
                        c = e.shift(1);
                        if (c === i.EOF)
                            return t._parseError("expected-numeric-entity-but-got-eof"),
                            e.unget(l),
                            !1;
                        l += c
                    }
                    if (p(c)) {
                        var d = "";
                        while (c !== i.EOF && p(c))
                            d += c,
                            c = e.char();
                        d = parseInt(d, h);
                        var v = this.replaceEntityNumbers(d);
                        v && (t._parseError("invalid-numeric-entity-replaced"),
                        d = v);
                        if (d > 65535 && d <= 1114111) {
                            d -= 65536;
                            var m = ((1047552 & d) >> 10) + 55296
                              , g = (1023 & d) + 56320;
                            f = String.fromCharCode(m, g)
                        } else
                            f = String.fromCharCode(d);
                        return c !== ";" && (t._parseError("numeric-entity-without-semicolon"),
                        e.unget(c)),
                        f
                    }
                    return e.unget(l),
                    t._parseError("expected-numeric-entity"),
                    !1
                }
                if (c >= "a" && c <= "z" || c >= "A" && c <= "Z") {
                    var y = "";
                    while (s[l]) {
                        r[l] && (y = l);
                        if (c == ";")
                            break;
                        c = e.char();
                        if (c === i.EOF)
                            break;
                        l += c
                    }
                    return y ? (f = r[y],
                    c === ";" || !n || !o(c) && c !== "=" ? (l.length > y.length && e.unget(l.substring(y.length)),
                    c !== ";" && t._parseError("named-entity-without-semicolon"),
                    f) : (e.unget(l),
                    !1)) : (t._parseError("expected-named-entity"),
                    e.unget(l),
                    !1)
                }
            }
            ,
            f.replaceEntityNumbers = function(e) {
                switch (e) {
                case 0:
                    return 65533;
                case 19:
                    return 16;
                case 128:
                    return 8364;
                case 129:
                    return 129;
                case 130:
                    return 8218;
                case 131:
                    return 402;
                case 132:
                    return 8222;
                case 133:
                    return 8230;
                case 134:
                    return 8224;
                case 135:
                    return 8225;
                case 136:
                    return 710;
                case 137:
                    return 8240;
                case 138:
                    return 352;
                case 139:
                    return 8249;
                case 140:
                    return 338;
                case 141:
                    return 141;
                case 142:
                    return 381;
                case 143:
                    return 143;
                case 144:
                    return 144;
                case 145:
                    return 8216;
                case 146:
                    return 8217;
                case 147:
                    return 8220;
                case 148:
                    return 8221;
                case 149:
                    return 8226;
                case 150:
                    return 8211;
                case 151:
                    return 8212;
                case 152:
                    return 732;
                case 153:
                    return 8482;
                case 154:
                    return 353;
                case 155:
                    return 8250;
                case 156:
                    return 339;
                case 157:
                    return 157;
                case 158:
                    return 382;
                case 159:
                    return 376;
                default:
                    if (e >= 55296 && e <= 57343 || e > 1114111)
                        return 65533;
                    if (e >= 1 && e <= 8 || e >= 14 && e <= 31 || e >= 127 && e <= 159 || e >= 64976 && e <= 65007 || e == 11 || e == 65534 || e == 131070 || e == 3145726 || e == 196607 || e == 262142 || e == 262143 || e == 327678 || e == 327679 || e == 393214 || e == 393215 || e == 458750 || e == 458751 || e == 524286 || e == 524287 || e == 589822 || e == 589823 || e == 655358 || e == 655359 || e == 720894 || e == 720895 || e == 786430 || e == 786431 || e == 851966 || e == 851967 || e == 917502 || e == 917503 || e == 983038 || e == 983039 || e == 1048574 || e == 1048575 || e == 1114110 || e == 1114111)
                        return e
                }
            }
            ,
            n.EntityParser = f
        }
        , {
            "./InputStream": 3,
            "html5-entities": 12
        }],
        3: [function(e, t, n) {
            function r() {
                this.data = "",
                this.start = 0,
                this.committed = 0,
                this.eof = !1,
                this.lastLocation = {
                    line: 0,
                    column: 0
                }
            }
            r.EOF = -1,
            r.DRAIN = -2,
            r.prototype = {
                slice: function() {
                    if (this.start >= this.data.length) {
                        if (!this.eof)
                            throw r.DRAIN;
                        return r.EOF
                    }
                    return this.data.slice(this.start, this.data.length)
                },
                "char": function() {
                    if (!this.eof && this.start >= this.data.length - 1)
                        throw r.DRAIN;
                    if (this.start >= this.data.length)
                        return r.EOF;
                    var e = this.data[this.start++];
                    return e === "\r" && (e = "\n"),
                    e
                },
                advance: function(e) {
                    this.start += e;
                    if (this.start >= this.data.length) {
                        if (!this.eof)
                            throw r.DRAIN;
                        return r.EOF
                    }
                    this.committed > this.data.length / 2 && (this.lastLocation = this.location(),
                    this.data = this.data.slice(this.committed),
                    this.start = this.start - this.committed,
                    this.committed = 0)
                },
                matchWhile: function(e) {
                    if (this.eof && this.start >= this.data.length)
                        return "";
                    var t = new RegExp("^" + e + "+")
                      , n = t.exec(this.slice());
                    if (n) {
                        if (!this.eof && n[0].length == this.data.length - this.start)
                            throw r.DRAIN;
                        return this.advance(n[0].length),
                        n[0]
                    }
                    return ""
                },
                matchUntil: function(e) {
                    var t, n;
                    n = this.slice();
                    if (n === r.EOF)
                        return "";
                    if (t = (new RegExp(e + (this.eof ? "|$" : ""))).exec(n)) {
                        var i = this.data.slice(this.start, this.start + t.index);
                        return this.advance(t.index),
                        i.replace(/\r/g, "\n").replace(/\n{2,}/g, "\n")
                    }
                    throw r.DRAIN
                },
                append: function(e) {
                    this.data += e
                },
                shift: function(e) {
                    if (!this.eof && this.start + e >= this.data.length)
                        throw r.DRAIN;
                    if (this.eof && this.start >= this.data.length)
                        return r.EOF;
                    var t = this.data.slice(this.start, this.start + e).toString();
                    return this.advance(Math.min(e, this.data.length - this.start)),
                    t
                },
                peek: function(e) {
                    if (!this.eof && this.start + e >= this.data.length)
                        throw r.DRAIN;
                    return this.eof && this.start >= this.data.length ? r.EOF : this.data.slice(this.start, Math.min(this.start + e, this.data.length)).toString()
                },
                length: function() {
                    return this.data.length - this.start - 1
                },
                unget: function(e) {
                    if (e === r.EOF)
                        return;
                    this.start -= e.length
                },
                undo: function() {
                    this.start = this.committed
                },
                commit: function() {
                    this.committed = this.start
                },
                location: function() {
                    var e = this.lastLocation.line
                      , t = this.lastLocation.column
                      , n = this.data.slice(0, this.committed)
                      , r = n.match(/\n/g)
                      , i = r ? e + r.length : e
                      , s = r ? n.length - n.lastIndexOf("\n") - 1 : t + n.length;
                    return {
                        line: i,
                        column: s
                    }
                }
            },
            n.InputStream = r
        }
        , {}],
        4: [function(e, t, n) {
            function i(e, t, n, r) {
                this.localName = t,
                this.namespaceURI = e,
                this.attributes = n,
                this.node = r
            }
            function s(e, t) {
                for (var n = 0; n < e.attributes.length; n++)
                    if (e.attributes[n].nodeName == t)
                        return e.attributes[n].nodeValue;
                return null
            }
            var r = {
                "http://www.w3.org/1999/xhtml": ["address", "applet", "area", "article", "aside", "base", "basefont", "bgsound", "blockquote", "body", "br", "button", "caption", "center", "col", "colgroup", "dd", "details", "dir", "div", "dl", "dt", "embed", "fieldset", "figcaption", "figure", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "iframe", "img", "input", "isindex", "li", "link", "listing", "main", "marquee", "menu", "menuitem", "meta", "nav", "noembed", "noframes", "noscript", "object", "ol", "p", "param", "plaintext", "pre", "script", "section", "select", "source", "style", "summary", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "title", "tr", "track", "ul", "wbr", "xmp"],
                "http://www.w3.org/1998/Math/MathML": ["mi", "mo", "mn", "ms", "mtext", "annotation-xml"],
                "http://www.w3.org/2000/svg": ["foreignObject", "desc", "title"]
            };
            i.prototype.isSpecial = function() {
                return this.namespaceURI in r && r[this.namespaceURI].indexOf(this.localName) > -1
            }
            ,
            i.prototype.isFosterParenting = function() {
                return this.namespaceURI === "http://www.w3.org/1999/xhtml" ? this.localName === "table" || this.localName === "tbody" || this.localName === "tfoot" || this.localName === "thead" || this.localName === "tr" : !1
            }
            ,
            i.prototype.isNumberedHeader = function() {
                return this.namespaceURI === "http://www.w3.org/1999/xhtml" ? this.localName === "h1" || this.localName === "h2" || this.localName === "h3" || this.localName === "h4" || this.localName === "h5" || this.localName === "h6" : !1
            }
            ,
            i.prototype.isForeign = function() {
                return this.namespaceURI != "http://www.w3.org/1999/xhtml"
            }
            ,
            i.prototype.isHtmlIntegrationPoint = function() {
                if (this.namespaceURI === "http://www.w3.org/1998/Math/MathML") {
                    if (this.localName !== "annotation-xml")
                        return !1;
                    var e = s(this, "encoding");
                    return e ? (e = e.toLowerCase(),
                    e === "text/html" || e === "application/xhtml+xml") : !1
                }
                return this.namespaceURI === "http://www.w3.org/2000/svg" ? this.localName === "foreignObject" || this.localName === "desc" || this.localName === "title" : !1
            }
            ,
            i.prototype.isMathMLTextIntegrationPoint = function() {
                return this.namespaceURI === "http://www.w3.org/1998/Math/MathML" ? this.localName === "mi" || this.localName === "mo" || this.localName === "mn" || this.localName === "ms" || this.localName === "mtext" : !1
            }
            ,
            n.StackItem = i
        }
        , {}],
        5: [function(e, t, n) {
            function s(e) {
                return e === " " || e === "\n" || e === "	" || e === "\r" || e === "\f"
            }
            function o(e) {
                return e >= "A" && e <= "Z" || e >= "a" && e <= "z"
            }
            function u(e) {
                this._tokenHandler = e,
                this._state = u.DATA,
                this._inputStream = new r,
                this._currentToken = null,
                this._temporaryBuffer = "",
                this._additionalAllowedCharacter = ""
            }
            var r = e("./InputStream").InputStream
              , i = e("./EntityParser").EntityParser;
            u.prototype._parseError = function(e, t) {
                this._tokenHandler.parseError(e, t)
            }
            ,
            u.prototype._emitToken = function(e) {
                if (e.type === "StartTag")
                    for (var t = 1; t < e.data.length; t++)
                        e.data[t].nodeName || e.data.splice(t--, 1);
                else
                    e.type === "EndTag" && (e.selfClosing && this._parseError("self-closing-flag-on-end-tag"),
                    e.data.length !== 0 && this._parseError("attributes-in-end-tag"));
                this._tokenHandler.processToken(e),
                e.type === "StartTag" && e.selfClosing && !this._tokenHandler.isSelfClosingFlagAcknowledged() && this._parseError("non-void-element-with-trailing-solidus", {
                    name: e.name
                })
            }
            ,
            u.prototype._emitCurrentToken = function() {
                this._state = u.DATA,
                this._emitToken(this._currentToken)
            }
            ,
            u.prototype._currentAttribute = function() {
                return this._currentToken.data[this._currentToken.data.length - 1]
            }
            ,
            u.prototype.setState = function(e) {
                this._state = e
            }
            ,
            u.prototype.tokenize = function(e) {
                function n(e) {
                    var n = e.char();
                    if (n === r.EOF)
                        return t._emitToken({
                            type: "EOF",
                            data: null
                        }),
                        !1;
                    if (n === "&")
                        t.setState(a);
                    else if (n === "<")
                        t.setState(j);
                    else if (n === "\0")
                        t._emitToken({
                            type: "Characters",
                            data: n
                        }),
                        e.commit();
                    else {
                        var i = e.matchUntil("&|<|\0");
                        t._emitToken({
                            type: "Characters",
                            data: n + i
                        }),
                        e.commit()
                    }
                    return !0
                }
                function a(e) {
                    var r = i.consumeEntity(e, t);
                    return t.setState(n),
                    t._emitToken({
                        type: "Characters",
                        data: r || "&"
                    }),
                    !0
                }
                function f(e) {
                    var n = e.char();
                    if (n === r.EOF)
                        return t._emitToken({
                            type: "EOF",
                            data: null
                        }),
                        !1;
                    if (n === "&")
                        t.setState(l);
                    else if (n === "<")
                        t.setState(d);
                    else if (n === "\0")
                        t._parseError("invalid-codepoint"),
                        t._emitToken({
                            type: "Characters",
                            data: "\ufffd"
                        }),
                        e.commit();
                    else {
                        var i = e.matchUntil("&|<|\0");
                        t._emitToken({
                            type: "Characters",
                            data: n + i
                        }),
                        e.commit()
                    }
                    return !0
                }
                function l(e) {
                    var n = i.consumeEntity(e, t);
                    return t.setState(f),
                    t._emitToken({
                        type: "Characters",
                        data: n || "&"
                    }),
                    !0
                }
                function c(e) {
                    var n = e.char();
                    if (n === r.EOF)
                        return t._emitToken({
                            type: "EOF",
                            data: null
                        }),
                        !1;
                    if (n === "<")
                        t.setState(g);
                    else if (n === "\0")
                        t._parseError("invalid-codepoint"),
                        t._emitToken({
                            type: "Characters",
                            data: "\ufffd"
                        }),
                        e.commit();
                    else {
                        var i = e.matchUntil("<|\0");
                        t._emitToken({
                            type: "Characters",
                            data: n + i
                        })
                    }
                    return !0
                }
                function h(e) {
                    var n = e.char();
                    if (n === r.EOF)
                        return t._emitToken({
                            type: "EOF",
                            data: null
                        }),
                        !1;
                    if (n === "\0")
                        t._parseError("invalid-codepoint"),
                        t._emitToken({
                            type: "Characters",
                            data: "\ufffd"
                        }),
                        e.commit();
                    else {
                        var i = e.matchUntil("\0");
                        t._emitToken({
                            type: "Characters",
                            data: n + i
                        })
                    }
                    return !0
                }
                function p(e) {
                    var n = e.char();
                    if (n === r.EOF)
                        return t._emitToken({
                            type: "EOF",
                            data: null
                        }),
                        !1;
                    if (n === "<")
                        t.setState(w);
                    else if (n === "\0")
                        t._parseError("invalid-codepoint"),
                        t._emitToken({
                            type: "Characters",
                            data: "\ufffd"
                        }),
                        e.commit();
                    else {
                        var i = e.matchUntil("<|\0");
                        t._emitToken({
                            type: "Characters",
                            data: n + i
                        })
                    }
                    return !0
                }
                function d(e) {
                    var n = e.char();
                    return n === "/" ? (this._temporaryBuffer = "",
                    t.setState(v)) : (t._emitToken({
                        type: "Characters",
                        data: "<"
                    }),
                    e.unget(n),
                    t.setState(f)),
                    !0
                }
                function v(e) {
                    var n = e.char();
                    return o(n) ? (this._temporaryBuffer += n,
                    t.setState(m)) : (t._emitToken({
                        type: "Characters",
                        data: "</"
                    }),
                    e.unget(n),
                    t.setState(f)),
                    !0
                }
                function m(e) {
                    var r = t._currentToken && t._currentToken.name === this._temporaryBuffer.toLowerCase()
                      , i = e.char();
                    return s(i) && r ? (t._currentToken = {
                        type: "EndTag",
                        name: this._temporaryBuffer,
                        data: [],
                        selfClosing: !1
                    },
                    t.setState(q)) : i === "/" && r ? (t._currentToken = {
                        type: "EndTag",
                        name: this._temporaryBuffer,
                        data: [],
                        selfClosing: !1
                    },
                    t.setState(K)) : i === ">" && r ? (t._currentToken = {
                        type: "EndTag",
                        name: this._temporaryBuffer,
                        data: [],
                        selfClosing: !1
                    },
                    t._emitCurrentToken(),
                    t.setState(n)) : o(i) ? (this._temporaryBuffer += i,
                    e.commit()) : (t._emitToken({
                        type: "Characters",
                        data: "</" + this._temporaryBuffer
                    }),
                    e.unget(i),
                    t.setState(f)),
                    !0
                }
                function g(e) {
                    var n = e.char();
                    return n === "/" ? (this._temporaryBuffer = "",
                    t.setState(y)) : (t._emitToken({
                        type: "Characters",
                        data: "<"
                    }),
                    e.unget(n),
                    t.setState(c)),
                    !0
                }
                function y(e) {
                    var n = e.char();
                    return o(n) ? (this._temporaryBuffer += n,
                    t.setState(b)) : (t._emitToken({
                        type: "Characters",
                        data: "</"
                    }),
                    e.unget(n),
                    t.setState(c)),
                    !0
                }
                function b(e) {
                    var r = t._currentToken && t._currentToken.name === this._temporaryBuffer.toLowerCase()
                      , i = e.char();
                    return s(i) && r ? (t._currentToken = {
                        type: "EndTag",
                        name: this._temporaryBuffer,
                        data: [],
                        selfClosing: !1
                    },
                    t.setState(q)) : i === "/" && r ? (t._currentToken = {
                        type: "EndTag",
                        name: this._temporaryBuffer,
                        data: [],
                        selfClosing: !1
                    },
                    t.setState(K)) : i === ">" && r ? (t._currentToken = {
                        type: "EndTag",
                        name: this._temporaryBuffer,
                        data: [],
                        selfClosing: !1
                    },
                    t._emitCurrentToken(),
                    t.setState(n)) : o(i) ? (this._temporaryBuffer += i,
                    e.commit()) : (t._emitToken({
                        type: "Characters",
                        data: "</" + this._temporaryBuffer
                    }),
                    e.unget(i),
                    t.setState(c)),
                    !0
                }
                function w(e) {
                    var n = e.char();
                    return n === "/" ? (this._temporaryBuffer = "",
                    t.setState(E)) : n === "!" ? (t._emitToken({
                        type: "Characters",
                        data: "<!"
                    }),
                    t.setState(x)) : (t._emitToken({
                        type: "Characters",
                        data: "<"
                    }),
                    e.unget(n),
                    t.setState(p)),
                    !0
                }
                function E(e) {
                    var n = e.char();
                    return o(n) ? (this._temporaryBuffer += n,
                    t.setState(S)) : (t._emitToken({
                        type: "Characters",
                        data: "</"
                    }),
                    e.unget(n),
                    t.setState(p)),
                    !0
                }
                function S(e) {
                    var n = t._currentToken && t._currentToken.name === this._temporaryBuffer.toLowerCase()
                      , r = e.char();
                    return s(r) && n ? (t._currentToken = {
                        type: "EndTag",
                        name: "script",
                        data: [],
                        selfClosing: !1
                    },
                    t.setState(q)) : r === "/" && n ? (t._currentToken = {
                        type: "EndTag",
                        name: "script",
                        data: [],
                        selfClosing: !1
                    },
                    t.setState(K)) : r === ">" && n ? (t._currentToken = {
                        type: "EndTag",
                        name: "script",
                        data: [],
                        selfClosing: !1
                    },
                    t._emitCurrentToken()) : o(r) ? (this._temporaryBuffer += r,
                    e.commit()) : (t._emitToken({
                        type: "Characters",
                        data: "</" + this._temporaryBuffer
                    }),
                    e.unget(r),
                    t.setState(p)),
                    !0
                }
                function x(e) {
                    var n = e.char();
                    return n === "-" ? (t._emitToken({
                        type: "Characters",
                        data: "-"
                    }),
                    t.setState(T)) : (e.unget(n),
                    t.setState(p)),
                    !0
                }
                function T(e) {
                    var n = e.char();
                    return n === "-" ? (t._emitToken({
                        type: "Characters",
                        data: "-"
                    }),
                    t.setState(k)) : (e.unget(n),
                    t.setState(p)),
                    !0
                }
                function N(e) {
                    var i = e.char();
                    if (i === r.EOF)
                        e.unget(i),
                        t.setState(n);
                    else if (i === "-")
                        t._emitToken({
                            type: "Characters",
                            data: "-"
                        }),
                        t.setState(C);
                    else if (i === "<")
                        t.setState(L);
                    else if (i === "\0")
                        t._parseError("invalid-codepoint"),
                        t._emitToken({
                            type: "Characters",
                            data: "\ufffd"
                        }),
                        e.commit();
                    else {
                        var s = e.matchUntil("<|-|\0");
                        t._emitToken({
                            type: "Characters",
                            data: i + s
                        })
                    }
                    return !0
                }
                function C(e) {
                    var i = e.char();
                    return i === r.EOF ? (e.unget(i),
                    t.setState(n)) : i === "-" ? (t._emitToken({
                        type: "Characters",
                        data: "-"
                    }),
                    t.setState(k)) : i === "<" ? t.setState(L) : i === "\0" ? (t._parseError("invalid-codepoint"),
                    t._emitToken({
                        type: "Characters",
                        data: "\ufffd"
                    }),
                    t.setState(N)) : (t._emitToken({
                        type: "Characters",
                        data: i
                    }),
                    t.setState(N)),
                    !0
                }
                function k(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-script"),
                    e.unget(i),
                    t.setState(n)) : i === "<" ? t.setState(L) : i === ">" ? (t._emitToken({
                        type: "Characters",
                        data: ">"
                    }),
                    t.setState(p)) : i === "\0" ? (t._parseError("invalid-codepoint"),
                    t._emitToken({
                        type: "Characters",
                        data: "\ufffd"
                    }),
                    t.setState(N)) : (t._emitToken({
                        type: "Characters",
                        data: i
                    }),
                    t.setState(N)),
                    !0
                }
                function L(e) {
                    var n = e.char();
                    return n === "/" ? (this._temporaryBuffer = "",
                    t.setState(A)) : o(n) ? (t._emitToken({
                        type: "Characters",
                        data: "<" + n
                    }),
                    this._temporaryBuffer = n,
                    t.setState(M)) : (t._emitToken({
                        type: "Characters",
                        data: "<"
                    }),
                    e.unget(n),
                    t.setState(N)),
                    !0
                }
                function A(e) {
                    var n = e.char();
                    return o(n) ? (this._temporaryBuffer = n,
                    t.setState(O)) : (t._emitToken({
                        type: "Characters",
                        data: "</"
                    }),
                    e.unget(n),
                    t.setState(N)),
                    !0
                }
                function O(e) {
                    var r = t._currentToken && t._currentToken.name === this._temporaryBuffer.toLowerCase()
                      , i = e.char();
                    return s(i) && r ? (t._currentToken = {
                        type: "EndTag",
                        name: "script",
                        data: [],
                        selfClosing: !1
                    },
                    t.setState(q)) : i === "/" && r ? (t._currentToken = {
                        type: "EndTag",
                        name: "script",
                        data: [],
                        selfClosing: !1
                    },
                    t.setState(K)) : i === ">" && r ? (t._currentToken = {
                        type: "EndTag",
                        name: "script",
                        data: [],
                        selfClosing: !1
                    },
                    t.setState(n),
                    t._emitCurrentToken()) : o(i) ? (this._temporaryBuffer += i,
                    e.commit()) : (t._emitToken({
                        type: "Characters",
                        data: "</" + this._temporaryBuffer
                    }),
                    e.unget(i),
                    t.setState(N)),
                    !0
                }
                function M(e) {
                    var n = e.char();
                    return s(n) || n === "/" || n === ">" ? (t._emitToken({
                        type: "Characters",
                        data: n
                    }),
                    this._temporaryBuffer.toLowerCase() === "script" ? t.setState(_) : t.setState(N)) : o(n) ? (t._emitToken({
                        type: "Characters",
                        data: n
                    }),
                    this._temporaryBuffer += n,
                    e.commit()) : (e.unget(n),
                    t.setState(N)),
                    !0
                }
                function _(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-script"),
                    e.unget(i),
                    t.setState(n)) : i === "-" ? (t._emitToken({
                        type: "Characters",
                        data: "-"
                    }),
                    t.setState(D)) : i === "<" ? (t._emitToken({
                        type: "Characters",
                        data: "<"
                    }),
                    t.setState(H)) : i === "\0" ? (t._parseError("invalid-codepoint"),
                    t._emitToken({
                        type: "Characters",
                        data: "\ufffd"
                    }),
                    e.commit()) : (t._emitToken({
                        type: "Characters",
                        data: i
                    }),
                    e.commit()),
                    !0
                }
                function D(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-script"),
                    e.unget(i),
                    t.setState(n)) : i === "-" ? (t._emitToken({
                        type: "Characters",
                        data: "-"
                    }),
                    t.setState(P)) : i === "<" ? (t._emitToken({
                        type: "Characters",
                        data: "<"
                    }),
                    t.setState(H)) : i === "\0" ? (t._parseError("invalid-codepoint"),
                    t._emitToken({
                        type: "Characters",
                        data: "\ufffd"
                    }),
                    t.setState(_)) : (t._emitToken({
                        type: "Characters",
                        data: i
                    }),
                    t.setState(_)),
                    !0
                }
                function P(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-script"),
                    e.unget(i),
                    t.setState(n)) : i === "-" ? (t._emitToken({
                        type: "Characters",
                        data: "-"
                    }),
                    e.commit()) : i === "<" ? (t._emitToken({
                        type: "Characters",
                        data: "<"
                    }),
                    t.setState(H)) : i === ">" ? (t._emitToken({
                        type: "Characters",
                        data: ">"
                    }),
                    t.setState(p)) : i === "\0" ? (t._parseError("invalid-codepoint"),
                    t._emitToken({
                        type: "Characters",
                        data: "\ufffd"
                    }),
                    t.setState(_)) : (t._emitToken({
                        type: "Characters",
                        data: i
                    }),
                    t.setState(_)),
                    !0
                }
                function H(e) {
                    var n = e.char();
                    return n === "/" ? (t._emitToken({
                        type: "Characters",
                        data: "/"
                    }),
                    this._temporaryBuffer = "",
                    t.setState(B)) : (e.unget(n),
                    t.setState(_)),
                    !0
                }
                function B(e) {
                    var n = e.char();
                    return s(n) || n === "/" || n === ">" ? (t._emitToken({
                        type: "Characters",
                        data: n
                    }),
                    this._temporaryBuffer.toLowerCase() === "script" ? t.setState(N) : t.setState(_)) : o(n) ? (t._emitToken({
                        type: "Characters",
                        data: n
                    }),
                    this._temporaryBuffer += n,
                    e.commit()) : (e.unget(n),
                    t.setState(_)),
                    !0
                }
                function j(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("bare-less-than-sign-at-eof"),
                    t._emitToken({
                        type: "Characters",
                        data: "<"
                    }),
                    e.unget(i),
                    t.setState(n)) : o(i) ? (t._currentToken = {
                        type: "StartTag",
                        name: i.toLowerCase(),
                        data: []
                    },
                    t.setState(I)) : i === "!" ? t.setState(G) : i === "/" ? t.setState(F) : i === ">" ? (t._parseError("expected-tag-name-but-got-right-bracket"),
                    t._emitToken({
                        type: "Characters",
                        data: "<>"
                    }),
                    t.setState(n)) : i === "?" ? (t._parseError("expected-tag-name-but-got-question-mark"),
                    e.unget(i),
                    t.setState(Q)) : (t._parseError("expected-tag-name"),
                    t._emitToken({
                        type: "Characters",
                        data: "<"
                    }),
                    e.unget(i),
                    t.setState(n)),
                    !0
                }
                function F(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("expected-closing-tag-but-got-eof"),
                    t._emitToken({
                        type: "Characters",
                        data: "</"
                    }),
                    e.unget(i),
                    t.setState(n)) : o(i) ? (t._currentToken = {
                        type: "EndTag",
                        name: i.toLowerCase(),
                        data: []
                    },
                    t.setState(I)) : i === ">" ? (t._parseError("expected-closing-tag-but-got-right-bracket"),
                    t.setState(n)) : (t._parseError("expected-closing-tag-but-got-char", {
                        data: i
                    }),
                    e.unget(i),
                    t.setState(Q)),
                    !0
                }
                function I(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-tag-name"),
                    e.unget(i),
                    t.setState(n)) : s(i) ? t.setState(q) : o(i) ? t._currentToken.name += i.toLowerCase() : i === ">" ? t._emitCurrentToken() : i === "/" ? t.setState(K) : i === "\0" ? (t._parseError("invalid-codepoint"),
                    t._currentToken.name += "\ufffd") : t._currentToken.name += i,
                    e.commit(),
                    !0
                }
                function q(e) {
                    var i = e.char();
                    if (i === r.EOF)
                        t._parseError("expected-attribute-name-but-got-eof"),
                        e.unget(i),
                        t.setState(n);
                    else {
                        if (s(i))
                            return !0;
                        o(i) ? (t._currentToken.data.push({
                            nodeName: i.toLowerCase(),
                            nodeValue: ""
                        }),
                        t.setState(R)) : i === ">" ? t._emitCurrentToken() : i === "/" ? t.setState(K) : i === "'" || i === '"' || i === "=" || i === "<" ? (t._parseError("invalid-character-in-attribute-name"),
                        t._currentToken.data.push({
                            nodeName: i,
                            nodeValue: ""
                        }),
                        t.setState(R)) : i === "\0" ? (t._parseError("invalid-codepoint"),
                        t._currentToken.data.push({
                            nodeName: "\ufffd",
                            nodeValue: ""
                        })) : (t._currentToken.data.push({
                            nodeName: i,
                            nodeValue: ""
                        }),
                        t.setState(R))
                    }
                    return !0
                }
                function R(e) {
                    var i = e.char()
                      , u = !0
                      , a = !1;
                    i === r.EOF ? (t._parseError("eof-in-attribute-name"),
                    e.unget(i),
                    t.setState(n),
                    a = !0) : i === "=" ? t.setState(z) : o(i) ? (t._currentAttribute().nodeName += i.toLowerCase(),
                    u = !1) : i === ">" ? a = !0 : s(i) ? t.setState(U) : i === "/" ? t.setState(K) : i === "'" || i === '"' ? (t._parseError("invalid-character-in-attribute-name"),
                    t._currentAttribute().nodeName += i,
                    u = !1) : i === "\0" ? (t._parseError("invalid-codepoint"),
                    t._currentAttribute().nodeName += "\ufffd") : (t._currentAttribute().nodeName += i,
                    u = !1);
                    if (u) {
                        var f = t._currentToken.data
                          , l = f[f.length - 1];
                        for (var c = f.length - 2; c >= 0; c--)
                            if (l.nodeName === f[c].nodeName) {
                                t._parseError("duplicate-attribute", {
                                    name: l.nodeName
                                }),
                                l.nodeName = null;
                                break
                            }
                        a && t._emitCurrentToken()
                    } else
                        e.commit();
                    return !0
                }
                function U(e) {
                    var i = e.char();
                    if (i === r.EOF)
                        t._parseError("expected-end-of-tag-but-got-eof"),
                        e.unget(i),
                        t.setState(n);
                    else {
                        if (s(i))
                            return !0;
                        i === "=" ? t.setState(z) : i === ">" ? t._emitCurrentToken() : o(i) ? (t._currentToken.data.push({
                            nodeName: i,
                            nodeValue: ""
                        }),
                        t.setState(R)) : i === "/" ? t.setState(K) : i === "'" || i === '"' || i === "<" ? (t._parseError("invalid-character-after-attribute-name"),
                        t._currentToken.data.push({
                            nodeName: i,
                            nodeValue: ""
                        }),
                        t.setState(R)) : i === "\0" ? (t._parseError("invalid-codepoint"),
                        t._currentToken.data.push({
                            nodeName: "\ufffd",
                            nodeValue: ""
                        })) : (t._currentToken.data.push({
                            nodeName: i,
                            nodeValue: ""
                        }),
                        t.setState(R))
                    }
                    return !0
                }
                function z(e) {
                    var i = e.char();
                    if (i === r.EOF)
                        t._parseError("expected-attribute-value-but-got-eof"),
                        e.unget(i),
                        t.setState(n);
                    else {
                        if (s(i))
                            return !0;
                        i === '"' ? t.setState(W) : i === "&" ? (t.setState(V),
                        e.unget(i)) : i === "'" ? t.setState(X) : i === ">" ? (t._parseError("expected-attribute-value-but-got-right-bracket"),
                        t._emitCurrentToken()) : i === "=" || i === "<" || i === "`" ? (t._parseError("unexpected-character-in-unquoted-attribute-value"),
                        t._currentAttribute().nodeValue += i,
                        t.setState(V)) : i === "\0" ? (t._parseError("invalid-codepoint"),
                        t._currentAttribute().nodeValue += "\ufffd") : (t._currentAttribute().nodeValue += i,
                        t.setState(V))
                    }
                    return !0
                }
                function W(e) {
                    var i = e.char();
                    if (i === r.EOF)
                        t._parseError("eof-in-attribute-value-double-quote"),
                        e.unget(i),
                        t.setState(n);
                    else if (i === '"')
                        t.setState(J);
                    else if (i === "&")
                        this._additionalAllowedCharacter = '"',
                        t.setState($);
                    else if (i === "\0")
                        t._parseError("invalid-codepoint"),
                        t._currentAttribute().nodeValue += "\ufffd";
                    else {
                        var s = e.matchUntil('[\0"&]');
                        i += s,
                        t._currentAttribute().nodeValue += i
                    }
                    return !0
                }
                function X(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-attribute-value-single-quote"),
                    e.unget(i),
                    t.setState(n)) : i === "'" ? t.setState(J) : i === "&" ? (this._additionalAllowedCharacter = "'",
                    t.setState($)) : i === "\0" ? (t._parseError("invalid-codepoint"),
                    t._currentAttribute().nodeValue += "\ufffd") : t._currentAttribute().nodeValue += i + e.matchUntil("\0|['&]"),
                    !0
                }
                function V(e) {
                    var i = e.char();
                    if (i === r.EOF)
                        t._parseError("eof-after-attribute-value"),
                        e.unget(i),
                        t.setState(n);
                    else if (s(i))
                        t.setState(q);
                    else if (i === "&")
                        this._additionalAllowedCharacter = ">",
                        t.setState($);
                    else if (i === ">")
                        t._emitCurrentToken();
                    else if (i === '"' || i === "'" || i === "=" || i === "`" || i === "<")
                        t._parseError("unexpected-character-in-unquoted-attribute-value"),
                        t._currentAttribute().nodeValue += i,
                        e.commit();
                    else if (i === "\0")
                        t._parseError("invalid-codepoint"),
                        t._currentAttribute().nodeValue += "\ufffd";
                    else {
                        var o = e.matchUntil("\0|[	\n\x0b\f \r&<>\"'=`]");
                        o === r.EOF && (t._parseError("eof-in-attribute-value-no-quotes"),
                        t._emitCurrentToken()),
                        e.commit(),
                        t._currentAttribute().nodeValue += i + o
                    }
                    return !0
                }
                function $(e) {
                    var n = i.consumeEntity(e, t, this._additionalAllowedCharacter);
                    return this._currentAttribute().nodeValue += n || "&",
                    this._additionalAllowedCharacter === '"' ? t.setState(W) : this._additionalAllowedCharacter === "'" ? t.setState(X) : this._additionalAllowedCharacter === ">" && t.setState(V),
                    !0
                }
                function J(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-after-attribute-value"),
                    e.unget(i),
                    t.setState(n)) : s(i) ? t.setState(q) : i === ">" ? (t.setState(n),
                    t._emitCurrentToken()) : i === "/" ? t.setState(K) : (t._parseError("unexpected-character-after-attribute-value"),
                    e.unget(i),
                    t.setState(q)),
                    !0
                }
                function K(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("unexpected-eof-after-solidus-in-tag"),
                    e.unget(i),
                    t.setState(n)) : i === ">" ? (t._currentToken.selfClosing = !0,
                    t.setState(n),
                    t._emitCurrentToken()) : (t._parseError("unexpected-character-after-solidus-in-tag"),
                    e.unget(i),
                    t.setState(q)),
                    !0
                }
                function Q(e) {
                    var r = e.matchUntil(">");
                    return r = r.replace(/\u0000/g, "\ufffd"),
                    e.char(),
                    t._emitToken({
                        type: "Comment",
                        data: r
                    }),
                    t.setState(n),
                    !0
                }
                function G(e) {
                    var n = e.shift(2);
                    if (n === "--")
                        t._currentToken = {
                            type: "Comment",
                            data: ""
                        },
                        t.setState(Z);
                    else {
                        var i = e.shift(5);
                        if (i === r.EOF || n === r.EOF)
                            return t._parseError("expected-dashes-or-doctype"),
                            t.setState(Q),
                            e.unget(n),
                            !0;
                        n += i,
                        n.toUpperCase() === "DOCTYPE" ? (t._currentToken = {
                            type: "Doctype",
                            name: "",
                            publicId: null,
                            systemId: null,
                            forceQuirks: !1
                        },
                        t.setState(st)) : t._tokenHandler.isCdataSectionAllowed() && n === "[CDATA[" ? t.setState(Y) : (t._parseError("expected-dashes-or-doctype"),
                        e.unget(n),
                        t.setState(Q))
                    }
                    return !0
                }
                function Y(e) {
                    var r = e.matchUntil("]]>");
                    return e.shift(3),
                    r && t._emitToken({
                        type: "Characters",
                        data: r
                    }),
                    t.setState(n),
                    !0
                }
                function Z(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-comment"),
                    t._emitToken(t._currentToken),
                    e.unget(i),
                    t.setState(n)) : i === "-" ? t.setState(et) : i === ">" ? (t._parseError("incorrect-comment"),
                    t._emitToken(t._currentToken),
                    t.setState(n)) : i === "\0" ? (t._parseError("invalid-codepoint"),
                    t._currentToken.data += "\ufffd") : (t._currentToken.data += i,
                    t.setState(tt)),
                    !0
                }
                function et(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-comment"),
                    t._emitToken(t._currentToken),
                    e.unget(i),
                    t.setState(n)) : i === "-" ? t.setState(rt) : i === ">" ? (t._parseError("incorrect-comment"),
                    t._emitToken(t._currentToken),
                    t.setState(n)) : i === "\0" ? (t._parseError("invalid-codepoint"),
                    t._currentToken.data += "\ufffd") : (t._currentToken.data += "-" + i,
                    t.setState(tt)),
                    !0
                }
                function tt(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-comment"),
                    t._emitToken(t._currentToken),
                    e.unget(i),
                    t.setState(n)) : i === "-" ? t.setState(nt) : i === "\0" ? (t._parseError("invalid-codepoint"),
                    t._currentToken.data += "\ufffd") : (t._currentToken.data += i,
                    e.commit()),
                    !0
                }
                function nt(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-comment-end-dash"),
                    t._emitToken(t._currentToken),
                    e.unget(i),
                    t.setState(n)) : i === "-" ? t.setState(rt) : i === "\0" ? (t._parseError("invalid-codepoint"),
                    t._currentToken.data += "-\ufffd",
                    t.setState(tt)) : (t._currentToken.data += "-" + i + e.matchUntil("\0|-"),
                    e.char()),
                    !0
                }
                function rt(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-comment-double-dash"),
                    t._emitToken(t._currentToken),
                    e.unget(i),
                    t.setState(n)) : i === ">" ? (t._emitToken(t._currentToken),
                    t.setState(n)) : i === "!" ? (t._parseError("unexpected-bang-after-double-dash-in-comment"),
                    t.setState(it)) : i === "-" ? (t._parseError("unexpected-dash-after-double-dash-in-comment"),
                    t._currentToken.data += i) : i === "\0" ? (t._parseError("invalid-codepoint"),
                    t._currentToken.data += "--\ufffd",
                    t.setState(tt)) : (t._parseError("unexpected-char-in-comment"),
                    t._currentToken.data += "--" + i,
                    t.setState(tt)),
                    !0
                }
                function it(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-comment-end-bang-state"),
                    t._emitToken(t._currentToken),
                    e.unget(i),
                    t.setState(n)) : i === ">" ? (t._emitToken(t._currentToken),
                    t.setState(n)) : i === "-" ? (t._currentToken.data += "--!",
                    t.setState(nt)) : (t._currentToken.data += "--!" + i,
                    t.setState(tt)),
                    !0
                }
                function st(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("expected-doctype-name-but-got-eof"),
                    t._currentToken.forceQuirks = !0,
                    e.unget(i),
                    t.setState(n),
                    t._emitCurrentToken()) : s(i) ? t.setState(ot) : (t._parseError("need-space-after-doctype"),
                    e.unget(i),
                    t.setState(ot)),
                    !0
                }
                function ot(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("expected-doctype-name-but-got-eof"),
                    t._currentToken.forceQuirks = !0,
                    e.unget(i),
                    t.setState(n),
                    t._emitCurrentToken()) : s(i) || (i === ">" ? (t._parseError("expected-doctype-name-but-got-right-bracket"),
                    t._currentToken.forceQuirks = !0,
                    t.setState(n),
                    t._emitCurrentToken()) : (o(i) && (i = i.toLowerCase()),
                    t._currentToken.name = i,
                    t.setState(ut))),
                    !0
                }
                function ut(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._currentToken.forceQuirks = !0,
                    e.unget(i),
                    t._parseError("eof-in-doctype-name"),
                    t.setState(n),
                    t._emitCurrentToken()) : s(i) ? t.setState(at) : i === ">" ? (t.setState(n),
                    t._emitCurrentToken()) : (o(i) && (i = i.toLowerCase()),
                    t._currentToken.name += i,
                    e.commit()),
                    !0
                }
                function at(e) {
                    var i = e.char();
                    if (i === r.EOF)
                        t._currentToken.forceQuirks = !0,
                        e.unget(i),
                        t._parseError("eof-in-doctype"),
                        t.setState(n),
                        t._emitCurrentToken();
                    else if (!s(i))
                        if (i === ">")
                            t.setState(n),
                            t._emitCurrentToken();
                        else {
                            if (["p", "P"].indexOf(i) > -1) {
                                var o = [["u", "U"], ["b", "B"], ["l", "L"], ["i", "I"], ["c", "C"]]
                                  , u = o.every(function(t) {
                                    return i = e.char(),
                                    t.indexOf(i) > -1
                                });
                                if (u)
                                    return t.setState(ft),
                                    !0
                            } else if (["s", "S"].indexOf(i) > -1) {
                                var o = [["y", "Y"], ["s", "S"], ["t", "T"], ["e", "E"], ["m", "M"]]
                                  , u = o.every(function(t) {
                                    return i = e.char(),
                                    t.indexOf(i) > -1
                                });
                                if (u)
                                    return t.setState(vt),
                                    !0
                            }
                            e.unget(i),
                            t._currentToken.forceQuirks = !0,
                            i === r.EOF ? (t._parseError("eof-in-doctype"),
                            e.unget(i),
                            t.setState(n),
                            t._emitCurrentToken()) : (t._parseError("expected-space-or-right-bracket-in-doctype", {
                                data: i
                            }),
                            t.setState(wt))
                        }
                    return !0
                }
                function ft(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    e.unget(i),
                    t.setState(n),
                    t._emitCurrentToken()) : s(i) ? t.setState(lt) : i === "'" || i === '"' ? (t._parseError("unexpected-char-in-doctype"),
                    e.unget(i),
                    t.setState(lt)) : (e.unget(i),
                    t.setState(lt)),
                    !0
                }
                function lt(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    e.unget(i),
                    t.setState(n),
                    t._emitCurrentToken()) : s(i) || (i === '"' ? (t._currentToken.publicId = "",
                    t.setState(ct)) : i === "'" ? (t._currentToken.publicId = "",
                    t.setState(ht)) : i === ">" ? (t._parseError("unexpected-end-of-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t.setState(n),
                    t._emitCurrentToken()) : (t._parseError("unexpected-char-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t.setState(wt))),
                    !0
                }
                function ct(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    e.unget(i),
                    t.setState(n),
                    t._emitCurrentToken()) : i === '"' ? t.setState(pt) : i === ">" ? (t._parseError("unexpected-end-of-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t.setState(n),
                    t._emitCurrentToken()) : t._currentToken.publicId += i,
                    !0
                }
                function ht(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    e.unget(i),
                    t.setState(n),
                    t._emitCurrentToken()) : i === "'" ? t.setState(pt) : i === ">" ? (t._parseError("unexpected-end-of-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t.setState(n),
                    t._emitCurrentToken()) : t._currentToken.publicId += i,
                    !0
                }
                function pt(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t._emitCurrentToken(),
                    e.unget(i),
                    t.setState(n)) : s(i) ? t.setState(dt) : i === ">" ? (t.setState(n),
                    t._emitCurrentToken()) : i === '"' ? (t._parseError("unexpected-char-in-doctype"),
                    t._currentToken.systemId = "",
                    t.setState(gt)) : i === "'" ? (t._parseError("unexpected-char-in-doctype"),
                    t._currentToken.systemId = "",
                    t.setState(yt)) : (t._parseError("unexpected-char-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t.setState(wt)),
                    !0
                }
                function dt(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t._emitCurrentToken(),
                    e.unget(i),
                    t.setState(n)) : s(i) || (i === ">" ? (t._emitCurrentToken(),
                    t.setState(n)) : i === '"' ? (t._currentToken.systemId = "",
                    t.setState(gt)) : i === "'" ? (t._currentToken.systemId = "",
                    t.setState(yt)) : (t._parseError("unexpected-char-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t.setState(wt))),
                    !0
                }
                function vt(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t._emitCurrentToken(),
                    e.unget(i),
                    t.setState(n)) : s(i) ? t.setState(mt) : i === "'" || i === '"' ? (t._parseError("unexpected-char-in-doctype"),
                    e.unget(i),
                    t.setState(mt)) : (e.unget(i),
                    t.setState(mt)),
                    !0
                }
                function mt(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t._emitCurrentToken(),
                    e.unget(i),
                    t.setState(n)) : s(i) || (i === '"' ? (t._currentToken.systemId = "",
                    t.setState(gt)) : i === "'" ? (t._currentToken.systemId = "",
                    t.setState(yt)) : i === ">" ? (t._parseError("unexpected-end-of-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t._emitCurrentToken(),
                    t.setState(n)) : (t._parseError("unexpected-char-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t.setState(wt))),
                    !0
                }
                function gt(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t._emitCurrentToken(),
                    e.unget(i),
                    t.setState(n)) : i === '"' ? t.setState(bt) : i === ">" ? (t._parseError("unexpected-end-of-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t._emitCurrentToken(),
                    t.setState(n)) : t._currentToken.systemId += i,
                    !0
                }
                function yt(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t._emitCurrentToken(),
                    e.unget(i),
                    t.setState(n)) : i === "'" ? t.setState(bt) : i === ">" ? (t._parseError("unexpected-end-of-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t._emitCurrentToken(),
                    t.setState(n)) : t._currentToken.systemId += i,
                    !0
                }
                function bt(e) {
                    var i = e.char();
                    return i === r.EOF ? (t._parseError("eof-in-doctype"),
                    t._currentToken.forceQuirks = !0,
                    t._emitCurrentToken(),
                    e.unget(i),
                    t.setState(n)) : s(i) || (i === ">" ? (t._emitCurrentToken(),
                    t.setState(n)) : (t._parseError("unexpected-char-in-doctype"),
                    t.setState(wt))),
                    !0
                }
                function wt(e) {
                    var i = e.char();
                    return i === r.EOF ? (e.unget(i),
                    t._emitCurrentToken(),
                    t.setState(n)) : i === ">" && (t._emitCurrentToken(),
                    t.setState(n)),
                    !0
                }
                u.DATA = n,
                u.RCDATA = f,
                u.RAWTEXT = c,
                u.SCRIPT_DATA = p,
                u.PLAINTEXT = h,
                this._state = u.DATA,
                this._inputStream.append(e),
                this._tokenHandler.startTokenization(this),
                this._inputStream.eof = !0;
                var t = this;
                while (this._state.call(this, this._inputStream))
                    ;
            }
            ,
            Object.defineProperty(u.prototype, "lineNumber", {
                get: function() {
                    return this._inputStream.location().line
                }
            }),
            Object.defineProperty(u.prototype, "columnNumber", {
                get: function() {
                    return this._inputStream.location().column
                }
            }),
            n.Tokenizer = u
        }
        , {
            "./EntityParser": 2,
            "./InputStream": 3
        }],
        6: [function(e, t, n) {
            function c(e) {
                return e === " " || e === "\n" || e === "	" || e === "\r" || e === "\f"
            }
            function h(e) {
                return c(e) || e === "\ufffd"
            }
            function p(e) {
                for (var t = 0; t < e.length; t++) {
                    var n = e[t];
                    if (!c(n))
                        return !1
                }
                return !0
            }
            function d(e) {
                for (var t = 0; t < e.length; t++) {
                    var n = e[t];
                    if (!h(n))
                        return !1
                }
                return !0
            }
            function v(e, t) {
                for (var n = 0; n < e.attributes.length; n++) {
                    var r = e.attributes[n];
                    if (r.nodeName === t)
                        return r
                }
                return null
            }
            function m(e) {
                this.characters = e,
                this.current = 0,
                this.end = this.characters.length
            }
            function g() {
                this.tokenizer = null,
                this.errorHandler = null,
                this.scriptingEnabled = !1,
                this.document = null,
                this.head = null,
                this.form = null,
                this.openElements = new a,
                this.activeFormattingElements = [],
                this.insertionMode = null,
                this.insertionModeName = "",
                this.originalInsertionMode = "",
                this.inQuirksMode = !1,
                this.compatMode = "no quirks",
                this.framesetOk = !0,
                this.redirectAttachToFosterParent = !1,
                this.selfClosingFlagAcknowledged = !1,
                this.context = "",
                this.pendingTableCharacters = [],
                this.shouldSkipLeadingNewline = !1;
                var e = this
                  , t = this.insertionModes = {};
                t.base = {
                    end_tag_handlers: {
                        "-default": "endTagOther"
                    },
                    start_tag_handlers: {
                        "-default": "startTagOther"
                    },
                    processEOF: function() {
                        e.generateImpliedEndTags(),
                        e.openElements.length > 2 ? e.parseError("expected-closing-tag-but-got-eof") : e.openElements.length == 2 && e.openElements.item(1).localName != "body" ? e.parseError("expected-closing-tag-but-got-eof") : e.context && e.openElements.length > 1
                    },
                    processComment: function(t) {
                        e.insertComment(t, e.currentStackItem().node)
                    },
                    processDoctype: function(t, n, r, i) {
                        e.parseError("unexpected-doctype")
                    },
                    processStartTag: function(e, t, n) {
                        if (this[this.start_tag_handlers[e]])
                            this[this.start_tag_handlers[e]](e, t, n);
                        else {
                            if (!this[this.start_tag_handlers["-default"]])
                                throw new Error("No handler found for " + e);
                            this[this.start_tag_handlers["-default"]](e, t, n)
                        }
                    },
                    processEndTag: function(e) {
                        if (this[this.end_tag_handlers[e]])
                            this[this.end_tag_handlers[e]](e);
                        else {
                            if (!this[this.end_tag_handlers["-default"]])
                                throw new Error("No handler found for " + e);
                            this[this.end_tag_handlers["-default"]](e)
                        }
                    },
                    startTagHtml: function(e, n) {
                        t.inBody.startTagHtml(e, n)
                    }
                },
                t.initial = Object.create(t.base),
                t.initial.processEOF = function() {
                    e.parseError("expected-doctype-but-got-eof"),
                    this.anythingElse(),
                    e.insertionMode.processEOF()
                }
                ,
                t.initial.processComment = function(t) {
                    e.insertComment(t, e.document)
                }
                ,
                t.initial.processDoctype = function(t, n, r, i) {
                    function s(e) {
                        return n.toLowerCase().indexOf(e) === 0
                    }
                    e.insertDoctype(t || "", n || "", r || ""),
                    i || t != "html" || n != null && (["+//silmaril//dtd html pro v0r11 19970101//", "-//advasoft ltd//dtd html 3.0 aswedit + extensions//", "-//as//dtd html 3.0 aswedit + extensions//", "-//ietf//dtd html 2.0 level 1//", "-//ietf//dtd html 2.0 level 2//", "-//ietf//dtd html 2.0 strict level 1//", "-//ietf//dtd html 2.0 strict level 2//", "-//ietf//dtd html 2.0 strict//", "-//ietf//dtd html 2.0//", "-//ietf//dtd html 2.1e//", "-//ietf//dtd html 3.0//", "-//ietf//dtd html 3.0//", "-//ietf//dtd html 3.2 final//", "-//ietf//dtd html 3.2//", "-//ietf//dtd html 3//", "-//ietf//dtd html level 0//", "-//ietf//dtd html level 0//", "-//ietf//dtd html level 1//", "-//ietf//dtd html level 1//", "-//ietf//dtd html level 2//", "-//ietf//dtd html level 2//", "-//ietf//dtd html level 3//", "-//ietf//dtd html level 3//", "-//ietf//dtd html strict level 0//", "-//ietf//dtd html strict level 0//", "-//ietf//dtd html strict level 1//", "-//ietf//dtd html strict level 1//", "-//ietf//dtd html strict level 2//", "-//ietf//dtd html strict level 2//", "-//ietf//dtd html strict level 3//", "-//ietf//dtd html strict level 3//", "-//ietf//dtd html strict//", "-//ietf//dtd html strict//", "-//ietf//dtd html strict//", "-//ietf//dtd html//", "-//ietf//dtd html//", "-//ietf//dtd html//", "-//metrius//dtd metrius presentational//", "-//microsoft//dtd internet explorer 2.0 html strict//", "-//microsoft//dtd internet explorer 2.0 html//", "-//microsoft//dtd internet explorer 2.0 tables//", "-//microsoft//dtd internet explorer 3.0 html strict//", "-//microsoft//dtd internet explorer 3.0 html//", "-//microsoft//dtd internet explorer 3.0 tables//", "-//netscape comm. corp.//dtd html//", "-//netscape comm. corp.//dtd strict html//", "-//o'reilly and associates//dtd html 2.0//", "-//o'reilly and associates//dtd html extended 1.0//", "-//spyglass//dtd html 2.0 extended//", "-//sq//dtd html 2.0 hotmetal + extensions//", "-//sun microsystems corp.//dtd hotjava html//", "-//sun microsystems corp.//dtd hotjava strict html//", "-//w3c//dtd html 3 1995-03-24//", "-//w3c//dtd html 3.2 draft//", "-//w3c//dtd html 3.2 final//", "-//w3c//dtd html 3.2//", "-//w3c//dtd html 3.2s draft//", "-//w3c//dtd html 4.0 frameset//", "-//w3c//dtd html 4.0 transitional//", "-//w3c//dtd html experimental 19960712//", "-//w3c//dtd html experimental 970421//", "-//w3c//dtd w3 html//", "-//w3o//dtd w3 html 3.0//", "-//webtechs//dtd mozilla html 2.0//", "-//webtechs//dtd mozilla html//", "html"].some(s) || ["-//w3o//dtd w3 html strict 3.0//en//", "-/w3c/dtd html 4.0 transitional/en", "html"].indexOf(n.toLowerCase()) > -1 || r == null && ["-//w3c//dtd html 4.01 transitional//", "-//w3c//dtd html 4.01 frameset//"].some(s)) || r != null && r.toLowerCase() == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" ? (e.compatMode = "quirks",
                    e.parseError("quirky-doctype")) : n != null && (["-//w3c//dtd xhtml 1.0 transitional//", "-//w3c//dtd xhtml 1.0 frameset//"].some(s) || r != null && ["-//w3c//dtd html 4.01 transitional//", "-//w3c//dtd html 4.01 frameset//"].indexOf(n.toLowerCase()) > -1) ? (e.compatMode = "limited quirks",
                    e.parseError("almost-standards-doctype")) : n == "-//W3C//DTD HTML 4.0//EN" && (r == null || r == "http://www.w3.org/TR/REC-html40/strict.dtd") || n == "-//W3C//DTD HTML 4.01//EN" && (r == null || r == "http://www.w3.org/TR/html4/strict.dtd") || n == "-//W3C//DTD XHTML 1.0 Strict//EN" && r == "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" || n == "-//W3C//DTD XHTML 1.1//EN" && r == "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" || (r != null && r != "about:legacy-compat" || n != null) && e.parseError("unknown-doctype"),
                    e.setInsertionMode("beforeHTML")
                }
                ,
                t.initial.processCharacters = function(t) {
                    t.skipLeadingWhitespace();
                    if (!t.length)
                        return;
                    e.parseError("expected-doctype-but-got-chars"),
                    this.anythingElse(),
                    e.insertionMode.processCharacters(t)
                }
                ,
                t.initial.processStartTag = function(t, n, r) {
                    e.parseError("expected-doctype-but-got-start-tag", {
                        name: t
                    }),
                    this.anythingElse(),
                    e.insertionMode.processStartTag(t, n, r)
                }
                ,
                t.initial.processEndTag = function(t) {
                    e.parseError("expected-doctype-but-got-end-tag", {
                        name: t
                    }),
                    this.anythingElse(),
                    e.insertionMode.processEndTag(t)
                }
                ,
                t.initial.anythingElse = function() {
                    e.compatMode = "quirks",
                    e.setInsertionMode("beforeHTML")
                }
                ,
                t.beforeHTML = Object.create(t.base),
                t.beforeHTML.start_tag_handlers = {
                    html: "startTagHtml",
                    "-default": "startTagOther"
                },
                t.beforeHTML.processEOF = function() {
                    this.anythingElse(),
                    e.insertionMode.processEOF()
                }
                ,
                t.beforeHTML.processComment = function(t) {
                    e.insertComment(t, e.document)
                }
                ,
                t.beforeHTML.processCharacters = function(t) {
                    t.skipLeadingWhitespace();
                    if (!t.length)
                        return;
                    this.anythingElse(),
                    e.insertionMode.processCharacters(t)
                }
                ,
                t.beforeHTML.startTagHtml = function(t, n, r) {
                    e.insertHtmlElement(n),
                    e.setInsertionMode("beforeHead")
                }
                ,
                t.beforeHTML.startTagOther = function(t, n, r) {
                    this.anythingElse(),
                    e.insertionMode.processStartTag(t, n, r)
                }
                ,
                t.beforeHTML.processEndTag = function(t) {
                    this.anythingElse(),
                    e.insertionMode.processEndTag(t)
                }
                ,
                t.beforeHTML.anythingElse = function() {
                    e.insertHtmlElement(),
                    e.setInsertionMode("beforeHead")
                }
                ,
                t.afterAfterBody = Object.create(t.base),
                t.afterAfterBody.start_tag_handlers = {
                    html: "startTagHtml",
                    "-default": "startTagOther"
                },
                t.afterAfterBody.processComment = function(t) {
                    e.insertComment(t, e.document)
                }
                ,
                t.afterAfterBody.processDoctype = function(e) {
                    t.inBody.processDoctype(e)
                }
                ,
                t.afterAfterBody.startTagHtml = function(e, n) {
                    t.inBody.startTagHtml(e, n)
                }
                ,
                t.afterAfterBody.startTagOther = function(t, n, r) {
                    e.parseError("unexpected-start-tag", {
                        name: t
                    }),
                    e.setInsertionMode("inBody"),
                    e.insertionMode.processStartTag(t, n, r)
                }
                ,
                t.afterAfterBody.endTagOther = function(t) {
                    e.parseError("unexpected-end-tag", {
                        name: t
                    }),
                    e.setInsertionMode("inBody"),
                    e.insertionMode.processEndTag(t)
                }
                ,
                t.afterAfterBody.processCharacters = function(n) {
                    if (!p(n.characters))
                        return e.parseError("unexpected-char-after-body"),
                        e.setInsertionMode("inBody"),
                        e.insertionMode.processCharacters(n);
                    t.inBody.processCharacters(n)
                }
                ,
                t.afterBody = Object.create(t.base),
                t.afterBody.end_tag_handlers = {
                    html: "endTagHtml",
                    "-default": "endTagOther"
                },
                t.afterBody.processComment = function(t) {
                    e.insertComment(t, e.openElements.rootNode)
                }
                ,
                t.afterBody.processCharacters = function(n) {
                    if (!p(n.characters))
                        return e.parseError("unexpected-char-after-body"),
                        e.setInsertionMode("inBody"),
                        e.insertionMode.processCharacters(n);
                    t.inBody.processCharacters(n)
                }
                ,
                t.afterBody.processStartTag = function(t, n, r) {
                    e.parseError("unexpected-start-tag-after-body", {
                        name: t
                    }),
                    e.setInsertionMode("inBody"),
                    e.insertionMode.processStartTag(t, n, r)
                }
                ,
                t.afterBody.endTagHtml = function(t) {
                    e.context ? e.parseError("end-html-in-innerhtml") : e.setInsertionMode("afterAfterBody")
                }
                ,
                t.afterBody.endTagOther = function(t) {
                    e.parseError("unexpected-end-tag-after-body", {
                        name: t
                    }),
                    e.setInsertionMode("inBody"),
                    e.insertionMode.processEndTag(t)
                }
                ,
                t.afterFrameset = Object.create(t.base),
                t.afterFrameset.start_tag_handlers = {
                    html: "startTagHtml",
                    noframes: "startTagNoframes",
                    "-default": "startTagOther"
                },
                t.afterFrameset.end_tag_handlers = {
                    html: "endTagHtml",
                    "-default": "endTagOther"
                },
                t.afterFrameset.processCharacters = function(t) {
                    var n = t.takeRemaining()
                      , r = "";
                    for (var i = 0; i < n.length; i++) {
                        var s = n[i];
                        c(s) && (r += s)
                    }
                    r && e.insertText(r),
                    r.length < n.length && e.parseError("expected-eof-but-got-char")
                }
                ,
                t.afterFrameset.startTagNoframes = function(e, n) {
                    t.inHead.processStartTag(e, n)
                }
                ,
                t.afterFrameset.startTagOther = function(t, n) {
                    e.parseError("unexpected-start-tag-after-frameset", {
                        name: t
                    })
                }
                ,
                t.afterFrameset.endTagHtml = function(t) {
                    e.setInsertionMode("afterAfterFrameset")
                }
                ,
                t.afterFrameset.endTagOther = function(t) {
                    e.parseError("unexpected-end-tag-after-frameset", {
                        name: t
                    })
                }
                ,
                t.beforeHead = Object.create(t.base),
                t.beforeHead.start_tag_handlers = {
                    html: "startTagHtml",
                    head: "startTagHead",
                    "-default": "startTagOther"
                },
                t.beforeHead.end_tag_handlers = {
                    html: "endTagImplyHead",
                    head: "endTagImplyHead",
                    body: "endTagImplyHead",
                    br: "endTagImplyHead",
                    "-default": "endTagOther"
                },
                t.beforeHead.processEOF = function() {
                    this.startTagHead("head", []),
                    e.insertionMode.processEOF()
                }
                ,
                t.beforeHead.processCharacters = function(t) {
                    t.skipLeadingWhitespace();
                    if (!t.length)
                        return;
                    this.startTagHead("head", []),
                    e.insertionMode.processCharacters(t)
                }
                ,
                t.beforeHead.startTagHead = function(t, n) {
                    e.insertHeadElement(n),
                    e.setInsertionMode("inHead")
                }
                ,
                t.beforeHead.startTagOther = function(t, n, r) {
                    this.startTagHead("head", []),
                    e.insertionMode.processStartTag(t, n, r)
                }
                ,
                t.beforeHead.endTagImplyHead = function(t) {
                    this.startTagHead("head", []),
                    e.insertionMode.processEndTag(t)
                }
                ,
                t.beforeHead.endTagOther = function(t) {
                    e.parseError("end-tag-after-implied-root", {
                        name: t
                    })
                }
                ,
                t.inHead = Object.create(t.base),
                t.inHead.start_tag_handlers = {
                    html: "startTagHtml",
                    head: "startTagHead",
                    title: "startTagTitle",
                    script: "startTagScript",
                    style: "startTagNoFramesStyle",
                    noscript: "startTagNoScript",
                    noframes: "startTagNoFramesStyle",
                    base: "startTagBaseBasefontBgsoundLink",
                    basefont: "startTagBaseBasefontBgsoundLink",
                    bgsound: "startTagBaseBasefontBgsoundLink",
                    link: "startTagBaseBasefontBgsoundLink",
                    meta: "startTagMeta",
                    "-default": "startTagOther"
                },
                t.inHead.end_tag_handlers = {
                    head: "endTagHead",
                    html: "endTagHtmlBodyBr",
                    body: "endTagHtmlBodyBr",
                    br: "endTagHtmlBodyBr",
                    "-default": "endTagOther"
                },
                t.inHead.processEOF = function() {
                    var t = e.currentStackItem().localName;
                    ["title", "style", "script"].indexOf(t) != -1 && (e.parseError("expected-named-closing-tag-but-got-eof", {
                        name: t
                    }),
                    e.popElement()),
                    this.anythingElse(),
                    e.insertionMode.processEOF()
                }
                ,
                t.inHead.processCharacters = function(t) {
                    var n = t.takeLeadingWhitespace();
                    n && e.insertText(n);
                    if (!t.length)
                        return;
                    this.anythingElse(),
                    e.insertionMode.processCharacters(t)
                }
                ,
                t.inHead.startTagHtml = function(e, n) {
                    t.inBody.processStartTag(e, n)
                }
                ,
                t.inHead.startTagHead = function(t, n) {
                    e.parseError("two-heads-are-not-better-than-one")
                }
                ,
                t.inHead.startTagTitle = function(t, n) {
                    e.processGenericRCDATAStartTag(t, n)
                }
                ,
                t.inHead.startTagNoScript = function(t, n) {
                    if (e.scriptingEnabled)
                        return e.processGenericRawTextStartTag(t, n);
                    e.insertElement(t, n),
                    e.setInsertionMode("inHeadNoscript")
                }
                ,
                t.inHead.startTagNoFramesStyle = function(t, n) {
                    e.processGenericRawTextStartTag(t, n)
                }
                ,
                t.inHead.startTagScript = function(t, n) {
                    e.insertElement(t, n),
                    e.tokenizer.setState(u.SCRIPT_DATA),
                    e.originalInsertionMode = e.insertionModeName,
                    e.setInsertionMode("text")
                }
                ,
                t.inHead.startTagBaseBasefontBgsoundLink = function(t, n) {
                    e.insertSelfClosingElement(t, n)
                }
                ,
                t.inHead.startTagMeta = function(t, n) {
                    e.insertSelfClosingElement(t, n)
                }
                ,
                t.inHead.startTagOther = function(t, n, r) {
                    this.anythingElse(),
                    e.insertionMode.processStartTag(t, n, r)
                }
                ,
                t.inHead.endTagHead = function(t) {
                    e.openElements.item(e.openElements.length - 1).localName == "head" ? e.openElements.pop() : e.parseError("unexpected-end-tag", {
                        name: "head"
                    }),
                    e.setInsertionMode("afterHead")
                }
                ,
                t.inHead.endTagHtmlBodyBr = function(t) {
                    this.anythingElse(),
                    e.insertionMode.processEndTag(t)
                }
                ,
                t.inHead.endTagOther = function(t) {
                    e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.inHead.anythingElse = function() {
                    this.endTagHead("head")
                }
                ,
                t.afterHead = Object.create(t.base),
                t.afterHead.start_tag_handlers = {
                    html: "startTagHtml",
                    head: "startTagHead",
                    body: "startTagBody",
                    frameset: "startTagFrameset",
                    base: "startTagFromHead",
                    link: "startTagFromHead",
                    meta: "startTagFromHead",
                    script: "startTagFromHead",
                    style: "startTagFromHead",
                    title: "startTagFromHead",
                    "-default": "startTagOther"
                },
                t.afterHead.end_tag_handlers = {
                    body: "endTagBodyHtmlBr",
                    html: "endTagBodyHtmlBr",
                    br: "endTagBodyHtmlBr",
                    "-default": "endTagOther"
                },
                t.afterHead.processEOF = function() {
                    this.anythingElse(),
                    e.insertionMode.processEOF()
                }
                ,
                t.afterHead.processCharacters = function(t) {
                    var n = t.takeLeadingWhitespace();
                    n && e.insertText(n);
                    if (!t.length)
                        return;
                    this.anythingElse(),
                    e.insertionMode.processCharacters(t)
                }
                ,
                t.afterHead.startTagHtml = function(e, n) {
                    t.inBody.processStartTag(e, n)
                }
                ,
                t.afterHead.startTagBody = function(t, n) {
                    e.framesetOk = !1,
                    e.insertBodyElement(n),
                    e.setInsertionMode("inBody")
                }
                ,
                t.afterHead.startTagFrameset = function(t, n) {
                    e.insertElement(t, n),
                    e.setInsertionMode("inFrameset")
                }
                ,
                t.afterHead.startTagFromHead = function(n, r, i) {
                    e.parseError("unexpected-start-tag-out-of-my-head", {
                        name: n
                    }),
                    e.openElements.push(e.head),
                    t.inHead.processStartTag(n, r, i),
                    e.openElements.remove(e.head)
                }
                ,
                t.afterHead.startTagHead = function(t, n, r) {
                    e.parseError("unexpected-start-tag", {
                        name: t
                    })
                }
                ,
                t.afterHead.startTagOther = function(t, n, r) {
                    this.anythingElse(),
                    e.insertionMode.processStartTag(t, n, r)
                }
                ,
                t.afterHead.endTagBodyHtmlBr = function(t) {
                    this.anythingElse(),
                    e.insertionMode.processEndTag(t)
                }
                ,
                t.afterHead.endTagOther = function(t) {
                    e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.afterHead.anythingElse = function() {
                    e.insertBodyElement([]),
                    e.setInsertionMode("inBody"),
                    e.framesetOk = !0
                }
                ,
                t.inBody = Object.create(t.base),
                t.inBody.start_tag_handlers = {
                    html: "startTagHtml",
                    head: "startTagMisplaced",
                    base: "startTagProcessInHead",
                    basefont: "startTagProcessInHead",
                    bgsound: "startTagProcessInHead",
                    link: "startTagProcessInHead",
                    meta: "startTagProcessInHead",
                    noframes: "startTagProcessInHead",
                    script: "startTagProcessInHead",
                    style: "startTagProcessInHead",
                    title: "startTagProcessInHead",
                    body: "startTagBody",
                    form: "startTagForm",
                    plaintext: "startTagPlaintext",
                    a: "startTagA",
                    button: "startTagButton",
                    xmp: "startTagXmp",
                    table: "startTagTable",
                    hr: "startTagHr",
                    image: "startTagImage",
                    input: "startTagInput",
                    textarea: "startTagTextarea",
                    select: "startTagSelect",
                    isindex: "startTagIsindex",
                    applet: "startTagAppletMarqueeObject",
                    marquee: "startTagAppletMarqueeObject",
                    object: "startTagAppletMarqueeObject",
                    li: "startTagListItem",
                    dd: "startTagListItem",
                    dt: "startTagListItem",
                    address: "startTagCloseP",
                    article: "startTagCloseP",
                    aside: "startTagCloseP",
                    blockquote: "startTagCloseP",
                    center: "startTagCloseP",
                    details: "startTagCloseP",
                    dir: "startTagCloseP",
                    div: "startTagCloseP",
                    dl: "startTagCloseP",
                    fieldset: "startTagCloseP",
                    figcaption: "startTagCloseP",
                    figure: "startTagCloseP",
                    footer: "startTagCloseP",
                    header: "startTagCloseP",
                    hgroup: "startTagCloseP",
                    main: "startTagCloseP",
                    menu: "startTagCloseP",
                    nav: "startTagCloseP",
                    ol: "startTagCloseP",
                    p: "startTagCloseP",
                    section: "startTagCloseP",
                    summary: "startTagCloseP",
                    ul: "startTagCloseP",
                    listing: "startTagPreListing",
                    pre: "startTagPreListing",
                    b: "startTagFormatting",
                    big: "startTagFormatting",
                    code: "startTagFormatting",
                    em: "startTagFormatting",
                    font: "startTagFormatting",
                    i: "startTagFormatting",
                    s: "startTagFormatting",
                    small: "startTagFormatting",
                    strike: "startTagFormatting",
                    strong: "startTagFormatting",
                    tt: "startTagFormatting",
                    u: "startTagFormatting",
                    nobr: "startTagNobr",
                    area: "startTagVoidFormatting",
                    br: "startTagVoidFormatting",
                    embed: "startTagVoidFormatting",
                    img: "startTagVoidFormatting",
                    keygen: "startTagVoidFormatting",
                    wbr: "startTagVoidFormatting",
                    param: "startTagParamSourceTrack",
                    source: "startTagParamSourceTrack",
                    track: "startTagParamSourceTrack",
                    iframe: "startTagIFrame",
                    noembed: "startTagRawText",
                    noscript: "startTagRawText",
                    h1: "startTagHeading",
                    h2: "startTagHeading",
                    h3: "startTagHeading",
                    h4: "startTagHeading",
                    h5: "startTagHeading",
                    h6: "startTagHeading",
                    caption: "startTagMisplaced",
                    col: "startTagMisplaced",
                    colgroup: "startTagMisplaced",
                    frame: "startTagMisplaced",
                    frameset: "startTagFrameset",
                    tbody: "startTagMisplaced",
                    td: "startTagMisplaced",
                    tfoot: "startTagMisplaced",
                    th: "startTagMisplaced",
                    thead: "startTagMisplaced",
                    tr: "startTagMisplaced",
                    option: "startTagOptionOptgroup",
                    optgroup: "startTagOptionOptgroup",
                    math: "startTagMath",
                    svg: "startTagSVG",
                    rt: "startTagRpRt",
                    rp: "startTagRpRt",
                    "-default": "startTagOther"
                },
                t.inBody.end_tag_handlers = {
                    p: "endTagP",
                    body: "endTagBody",
                    html: "endTagHtml",
                    address: "endTagBlock",
                    article: "endTagBlock",
                    aside: "endTagBlock",
                    blockquote: "endTagBlock",
                    button: "endTagBlock",
                    center: "endTagBlock",
                    details: "endTagBlock",
                    dir: "endTagBlock",
                    div: "endTagBlock",
                    dl: "endTagBlock",
                    fieldset: "endTagBlock",
                    figcaption: "endTagBlock",
                    figure: "endTagBlock",
                    footer: "endTagBlock",
                    header: "endTagBlock",
                    hgroup: "endTagBlock",
                    listing: "endTagBlock",
                    main: "endTagBlock",
                    menu: "endTagBlock",
                    nav: "endTagBlock",
                    ol: "endTagBlock",
                    pre: "endTagBlock",
                    section: "endTagBlock",
                    summary: "endTagBlock",
                    ul: "endTagBlock",
                    form: "endTagForm",
                    applet: "endTagAppletMarqueeObject",
                    marquee: "endTagAppletMarqueeObject",
                    object: "endTagAppletMarqueeObject",
                    dd: "endTagListItem",
                    dt: "endTagListItem",
                    li: "endTagListItem",
                    h1: "endTagHeading",
                    h2: "endTagHeading",
                    h3: "endTagHeading",
                    h4: "endTagHeading",
                    h5: "endTagHeading",
                    h6: "endTagHeading",
                    a: "endTagFormatting",
                    b: "endTagFormatting",
                    big: "endTagFormatting",
                    code: "endTagFormatting",
                    em: "endTagFormatting",
                    font: "endTagFormatting",
                    i: "endTagFormatting",
                    nobr: "endTagFormatting",
                    s: "endTagFormatting",
                    small: "endTagFormatting",
                    strike: "endTagFormatting",
                    strong: "endTagFormatting",
                    tt: "endTagFormatting",
                    u: "endTagFormatting",
                    br: "endTagBr",
                    "-default": "endTagOther"
                },
                t.inBody.processCharacters = function(t) {
                    e.shouldSkipLeadingNewline && (e.shouldSkipLeadingNewline = !1,
                    t.skipAtMostOneLeadingNewline()),
                    e.reconstructActiveFormattingElements();
                    var n = t.takeRemaining();
                    n = n.replace(/\u0000/g, function(t, n) {
                        return e.parseError("invalid-codepoint"),
                        ""
                    });
                    if (!n)
                        return;
                    e.insertText(n),
                    e.framesetOk && !d(n) && (e.framesetOk = !1)
                }
                ,
                t.inBody.startTagHtml = function(t, n) {
                    e.parseError("non-html-root"),
                    e.addAttributesToElement(e.openElements.rootNode, n)
                }
                ,
                t.inBody.startTagProcessInHead = function(e, n) {
                    t.inHead.processStartTag(e, n)
                }
                ,
                t.inBody.startTagBody = function(t, n) {
                    e.parseError("unexpected-start-tag", {
                        name: "body"
                    }),
                    e.openElements.length == 1 || e.openElements.item(1).localName != "body" ? r.ok(e.context) : (e.framesetOk = !1,
                    e.addAttributesToElement(e.openElements.bodyElement, n))
                }
                ,
                t.inBody.startTagFrameset = function(t, n) {
                    e.parseError("unexpected-start-tag", {
                        name: "frameset"
                    });
                    if (e.openElements.length == 1 || e.openElements.item(1).localName != "body")
                        r.ok(e.context);
                    else if (e.framesetOk) {
                        e.detachFromParent(e.openElements.bodyElement);
                        while (e.openElements.length > 1)
                            e.openElements.pop();
                        e.insertElement(t, n),
                        e.setInsertionMode("inFrameset")
                    }
                }
                ,
                t.inBody.startTagCloseP = function(t, n) {
                    e.openElements.inButtonScope("p") && this.endTagP("p"),
                    e.insertElement(t, n)
                }
                ,
                t.inBody.startTagPreListing = function(t, n) {
                    e.openElements.inButtonScope("p") && this.endTagP("p"),
                    e.insertElement(t, n),
                    e.framesetOk = !1,
                    e.shouldSkipLeadingNewline = !0
                }
                ,
                t.inBody.startTagForm = function(t, n) {
                    e.form ? e.parseError("unexpected-start-tag", {
                        name: t
                    }) : (e.openElements.inButtonScope("p") && this.endTagP("p"),
                    e.insertElement(t, n),
                    e.form = e.currentStackItem())
                }
                ,
                t.inBody.startTagRpRt = function(t, n) {
                    e.openElements.inScope("ruby") && (e.generateImpliedEndTags(),
                    e.currentStackItem().localName != "ruby" && e.parseError("unexpected-start-tag", {
                        name: t
                    })),
                    e.insertElement(t, n)
                }
                ,
                t.inBody.startTagListItem = function(t, n) {
                    var r = {
                        li: ["li"],
                        dd: ["dd", "dt"],
                        dt: ["dd", "dt"]
                    }
                      , i = r[t]
                      , s = e.openElements;
                    for (var o = s.length - 1; o >= 0; o--) {
                        var u = s.item(o);
                        if (i.indexOf(u.localName) != -1) {
                            e.insertionMode.processEndTag(u.localName);
                            break
                        }
                        if (u.isSpecial() && u.localName !== "p" && u.localName !== "address" && u.localName !== "div")
                            break
                    }
                    e.openElements.inButtonScope("p") && this.endTagP("p"),
                    e.insertElement(t, n),
                    e.framesetOk = !1
                }
                ,
                t.inBody.startTagPlaintext = function(t, n) {
                    e.openElements.inButtonScope("p") && this.endTagP("p"),
                    e.insertElement(t, n),
                    e.tokenizer.setState(u.PLAINTEXT)
                }
                ,
                t.inBody.startTagHeading = function(t, n) {
                    e.openElements.inButtonScope("p") && this.endTagP("p"),
                    e.currentStackItem().isNumberedHeader() && (e.parseError("unexpected-start-tag", {
                        name: t
                    }),
                    e.popElement()),
                    e.insertElement(t, n)
                }
                ,
                t.inBody.startTagA = function(t, n) {
                    var r = e.elementInActiveFormattingElements("a");
                    r && (e.parseError("unexpected-start-tag-implies-end-tag", {
                        startName: "a",
                        endName: "a"
                    }),
                    e.adoptionAgencyEndTag("a"),
                    e.openElements.contains(r) && e.openElements.remove(r),
                    e.removeElementFromActiveFormattingElements(r)),
                    e.reconstructActiveFormattingElements(),
                    e.insertFormattingElement(t, n)
                }
                ,
                t.inBody.startTagFormatting = function(t, n) {
                    e.reconstructActiveFormattingElements(),
                    e.insertFormattingElement(t, n)
                }
                ,
                t.inBody.startTagNobr = function(t, n) {
                    e.reconstructActiveFormattingElements(),
                    e.openElements.inScope("nobr") && (e.parseError("unexpected-start-tag-implies-end-tag", {
                        startName: "nobr",
                        endName: "nobr"
                    }),
                    this.processEndTag("nobr"),
                    e.reconstructActiveFormattingElements()),
                    e.insertFormattingElement(t, n)
                }
                ,
                t.inBody.startTagButton = function(t, n) {
                    e.openElements.inScope("button") ? (e.parseError("unexpected-start-tag-implies-end-tag", {
                        startName: "button",
                        endName: "button"
                    }),
                    this.processEndTag("button"),
                    e.insertionMode.processStartTag(t, n)) : (e.framesetOk = !1,
                    e.reconstructActiveFormattingElements(),
                    e.insertElement(t, n))
                }
                ,
                t.inBody.startTagAppletMarqueeObject = function(t, n) {
                    e.reconstructActiveFormattingElements(),
                    e.insertElement(t, n),
                    e.activeFormattingElements.push(l),
                    e.framesetOk = !1
                }
                ,
                t.inBody.endTagAppletMarqueeObject = function(t) {
                    e.openElements.inScope(t) ? (e.generateImpliedEndTags(),
                    e.currentStackItem().localName != t && e.parseError("end-tag-too-early", {
                        name: t
                    }),
                    e.openElements.popUntilPopped(t),
                    e.clearActiveFormattingElements()) : e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.inBody.startTagXmp = function(t, n) {
                    e.openElements.inButtonScope("p") && this.processEndTag("p"),
                    e.reconstructActiveFormattingElements(),
                    e.processGenericRawTextStartTag(t, n),
                    e.framesetOk = !1
                }
                ,
                t.inBody.startTagTable = function(t, n) {
                    e.compatMode !== "quirks" && e.openElements.inButtonScope("p") && this.processEndTag("p"),
                    e.insertElement(t, n),
                    e.setInsertionMode("inTable"),
                    e.framesetOk = !1
                }
                ,
                t.inBody.startTagVoidFormatting = function(t, n) {
                    e.reconstructActiveFormattingElements(),
                    e.insertSelfClosingElement(t, n),
                    e.framesetOk = !1
                }
                ,
                t.inBody.startTagParamSourceTrack = function(t, n) {
                    e.insertSelfClosingElement(t, n)
                }
                ,
                t.inBody.startTagHr = function(t, n) {
                    e.openElements.inButtonScope("p") && this.endTagP("p"),
                    e.insertSelfClosingElement(t, n),
                    e.framesetOk = !1
                }
                ,
                t.inBody.startTagImage = function(t, n) {
                    e.parseError("unexpected-start-tag-treated-as", {
                        originalName: "image",
                        newName: "img"
                    }),
                    this.processStartTag("img", n)
                }
                ,
                t.inBody.startTagInput = function(t, n) {
                    var r = e.framesetOk;
                    this.startTagVoidFormatting(t, n);
                    for (var i in n)
                        if (n[i].nodeName == "type") {
                            n[i].nodeValue.toLowerCase() == "hidden" && (e.framesetOk = r);
                            break
                        }
                }
                ,
                t.inBody.startTagIsindex = function(t, n) {
                    e.parseError("deprecated-tag", {
                        name: "isindex"
                    }),
                    e.selfClosingFlagAcknowledged = !0;
                    if (e.form)
                        return;
                    var r = []
                      , i = []
                      , s = "This is a searchable index. Enter search keywords: ";
                    for (var o in n)
                        switch (n[o].nodeName) {
                        case "action":
                            r.push({
                                nodeName: "action",
                                nodeValue: n[o].nodeValue
                            });
                            break;
                        case "prompt":
                            s = n[o].nodeValue;
                            break;
                        case "name":
                            break;
                        default:
                            i.push({
                                nodeName: n[o].nodeName,
                                nodeValue: n[o].nodeValue
                            })
                        }
                    i.push({
                        nodeName: "name",
                        nodeValue: "isindex"
                    }),
                    this.processStartTag("form", r),
                    this.processStartTag("hr"),
                    this.processStartTag("label"),
                    this.processCharacters(new m(s)),
                    this.processStartTag("input", i),
                    this.processEndTag("label"),
                    this.processStartTag("hr"),
                    this.processEndTag("form")
                }
                ,
                t.inBody.startTagTextarea = function(t, n) {
                    e.insertElement(t, n),
                    e.tokenizer.setState(u.RCDATA),
                    e.originalInsertionMode = e.insertionModeName,
                    e.shouldSkipLeadingNewline = !0,
                    e.framesetOk = !1,
                    e.setInsertionMode("text")
                }
                ,
                t.inBody.startTagIFrame = function(t, n) {
                    e.framesetOk = !1,
                    this.startTagRawText(t, n)
                }
                ,
                t.inBody.startTagRawText = function(t, n) {
                    e.processGenericRawTextStartTag(t, n)
                }
                ,
                t.inBody.startTagSelect = function(t, n) {
                    e.reconstructActiveFormattingElements(),
                    e.insertElement(t, n),
                    e.framesetOk = !1;
                    var r = e.insertionModeName;
                    r == "inTable" || r == "inCaption" || r == "inColumnGroup" || r == "inTableBody" || r == "inRow" || r == "inCell" ? e.setInsertionMode("inSelectInTable") : e.setInsertionMode("inSelect")
                }
                ,
                t.inBody.startTagMisplaced = function(t, n) {
                    e.parseError("unexpected-start-tag-ignored", {
                        name: t
                    })
                }
                ,
                t.inBody.endTagMisplaced = function(t) {
                    e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.inBody.endTagBr = function(t) {
                    e.parseError("unexpected-end-tag-treated-as", {
                        originalName: "br",
                        newName: "br element"
                    }),
                    e.reconstructActiveFormattingElements(),
                    e.insertElement(t, []),
                    e.popElement()
                }
                ,
                t.inBody.startTagOptionOptgroup = function(t, n) {
                    e.currentStackItem().localName == "option" && e.popElement(),
                    e.reconstructActiveFormattingElements(),
                    e.insertElement(t, n)
                }
                ,
                t.inBody.startTagOther = function(t, n) {
                    e.reconstructActiveFormattingElements(),
                    e.insertElement(t, n)
                }
                ,
                t.inBody.endTagOther = function(t) {
                    var n;
                    for (var r = e.openElements.length - 1; r > 0; r--) {
                        n = e.openElements.item(r);
                        if (n.localName == t) {
                            e.generateImpliedEndTags(t),
                            e.currentStackItem().localName != t && e.parseError("unexpected-end-tag", {
                                name: t
                            }),
                            e.openElements.remove_openElements_until(function(e) {
                                return e === n
                            });
                            break
                        }
                        if (n.isSpecial()) {
                            e.parseError("unexpected-end-tag", {
                                name: t
                            });
                            break
                        }
                    }
                }
                ,
                t.inBody.startTagMath = function(t, n, r) {
                    e.reconstructActiveFormattingElements(),
                    n = e.adjustMathMLAttributes(n),
                    n = e.adjustForeignAttributes(n),
                    e.insertForeignElement(t, n, "http://www.w3.org/1998/Math/MathML", r)
                }
                ,
                t.inBody.startTagSVG = function(t, n, r) {
                    e.reconstructActiveFormattingElements(),
                    n = e.adjustSVGAttributes(n),
                    n = e.adjustForeignAttributes(n),
                    e.insertForeignElement(t, n, "http://www.w3.org/2000/svg", r)
                }
                ,
                t.inBody.endTagP = function(t) {
                    e.openElements.inButtonScope("p") ? (e.generateImpliedEndTags("p"),
                    e.currentStackItem().localName != "p" && e.parseError("unexpected-implied-end-tag", {
                        name: "p"
                    }),
                    e.openElements.popUntilPopped(t)) : (e.parseError("unexpected-end-tag", {
                        name: "p"
                    }),
                    this.startTagCloseP("p", []),
                    this.endTagP("p"))
                }
                ,
                t.inBody.endTagBody = function(t) {
                    if (!e.openElements.inScope("body")) {
                        e.parseError("unexpected-end-tag", {
                            name: t
                        });
                        return
                    }
                    e.currentStackItem().localName != "body" && e.parseError("expected-one-end-tag-but-got-another", {
                        expectedName: e.currentStackItem().localName,
                        gotName: t
                    }),
                    e.setInsertionMode("afterBody")
                }
                ,
                t.inBody.endTagHtml = function(t) {
                    if (!e.openElements.inScope("body")) {
                        e.parseError("unexpected-end-tag", {
                            name: t
                        });
                        return
                    }
                    e.currentStackItem().localName != "body" && e.parseError("expected-one-end-tag-but-got-another", {
                        expectedName: e.currentStackItem().localName,
                        gotName: t
                    }),
                    e.setInsertionMode("afterBody"),
                    e.insertionMode.processEndTag(t)
                }
                ,
                t.inBody.endTagBlock = function(t) {
                    e.openElements.inScope(t) ? (e.generateImpliedEndTags(),
                    e.currentStackItem().localName != t && e.parseError("end-tag-too-early", {
                        name: t
                    }),
                    e.openElements.popUntilPopped(t)) : e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.inBody.endTagForm = function(t) {
                    var n = e.form;
                    e.form = null,
                    !n || !e.openElements.inScope(t) ? e.parseError("unexpected-end-tag", {
                        name: t
                    }) : (e.generateImpliedEndTags(),
                    e.currentStackItem() != n && e.parseError("end-tag-too-early-ignored", {
                        name: "form"
                    }),
                    e.openElements.remove(n))
                }
                ,
                t.inBody.endTagListItem = function(t) {
                    e.openElements.inListItemScope(t) ? (e.generateImpliedEndTags(t),
                    e.currentStackItem().localName != t && e.parseError("end-tag-too-early", {
                        name: t
                    }),
                    e.openElements.popUntilPopped(t)) : e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.inBody.endTagHeading = function(t) {
                    if (!e.openElements.hasNumberedHeaderElementInScope()) {
                        e.parseError("unexpected-end-tag", {
                            name: t
                        });
                        return
                    }
                    e.generateImpliedEndTags(),
                    e.currentStackItem().localName != t && e.parseError("end-tag-too-early", {
                        name: t
                    }),
                    e.openElements.remove_openElements_until(function(e) {
                        return e.isNumberedHeader()
                    })
                }
                ,
                t.inBody.endTagFormatting = function(t, n) {
                    e.adoptionAgencyEndTag(t) || this.endTagOther(t, n)
                }
                ,
                t.inCaption = Object.create(t.base),
                t.inCaption.start_tag_handlers = {
                    html: "startTagHtml",
                    caption: "startTagTableElement",
                    col: "startTagTableElement",
                    colgroup: "startTagTableElement",
                    tbody: "startTagTableElement",
                    td: "startTagTableElement",
                    tfoot: "startTagTableElement",
                    thead: "startTagTableElement",
                    tr: "startTagTableElement",
                    "-default": "startTagOther"
                },
                t.inCaption.end_tag_handlers = {
                    caption: "endTagCaption",
                    table: "endTagTable",
                    body: "endTagIgnore",
                    col: "endTagIgnore",
                    colgroup: "endTagIgnore",
                    html: "endTagIgnore",
                    tbody: "endTagIgnore",
                    td: "endTagIgnore",
                    tfood: "endTagIgnore",
                    thead: "endTagIgnore",
                    tr: "endTagIgnore",
                    "-default": "endTagOther"
                },
                t.inCaption.processCharacters = function(e) {
                    t.inBody.processCharacters(e)
                }
                ,
                t.inCaption.startTagTableElement = function(t, n) {
                    e.parseError("unexpected-end-tag", {
                        name: t
                    });
                    var r = !e.openElements.inTableScope("caption");
                    e.insertionMode.processEndTag("caption"),
                    r || e.insertionMode.processStartTag(t, n)
                }
                ,
                t.inCaption.startTagOther = function(e, n, r) {
                    t.inBody.processStartTag(e, n, r)
                }
                ,
                t.inCaption.endTagCaption = function(t) {
                    e.openElements.inTableScope("caption") ? (e.generateImpliedEndTags(),
                    e.currentStackItem().localName != "caption" && e.parseError("expected-one-end-tag-but-got-another", {
                        gotName: "caption",
                        expectedName: e.currentStackItem().localName
                    }),
                    e.openElements.popUntilPopped("caption"),
                    e.clearActiveFormattingElements(),
                    e.setInsertionMode("inTable")) : (r.ok(e.context),
                    e.parseError("unexpected-end-tag", {
                        name: t
                    }))
                }
                ,
                t.inCaption.endTagTable = function(t) {
                    e.parseError("unexpected-end-table-in-caption");
                    var n = !e.openElements.inTableScope("caption");
                    e.insertionMode.processEndTag("caption"),
                    n || e.insertionMode.processEndTag(t)
                }
                ,
                t.inCaption.endTagIgnore = function(t) {
                    e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.inCaption.endTagOther = function(e) {
                    t.inBody.processEndTag(e)
                }
                ,
                t.inCell = Object.create(t.base),
                t.inCell.start_tag_handlers = {
                    html: "startTagHtml",
                    caption: "startTagTableOther",
                    col: "startTagTableOther",
                    colgroup: "startTagTableOther",
                    tbody: "startTagTableOther",
                    td: "startTagTableOther",
                    tfoot: "startTagTableOther",
                    th: "startTagTableOther",
                    thead: "startTagTableOther",
                    tr: "startTagTableOther",
                    "-default": "startTagOther"
                },
                t.inCell.end_tag_handlers = {
                    td: "endTagTableCell",
                    th: "endTagTableCell",
                    body: "endTagIgnore",
                    caption: "endTagIgnore",
                    col: "endTagIgnore",
                    colgroup: "endTagIgnore",
                    html: "endTagIgnore",
                    table: "endTagImply",
                    tbody: "endTagImply",
                    tfoot: "endTagImply",
                    thead: "endTagImply",
                    tr: "endTagImply",
                    "-default": "endTagOther"
                },
                t.inCell.processCharacters = function(e) {
                    t.inBody.processCharacters(e)
                }
                ,
                t.inCell.startTagTableOther = function(t, n, r) {
                    e.openElements.inTableScope("td") || e.openElements.inTableScope("th") ? (this.closeCell(),
                    e.insertionMode.processStartTag(t, n, r)) : e.parseError("unexpected-start-tag", {
                        name: t
                    })
                }
                ,
                t.inCell.startTagOther = function(e, n, r) {
                    t.inBody.processStartTag(e, n, r)
                }
                ,
                t.inCell.endTagTableCell = function(t) {
                    e.openElements.inTableScope(t) ? (e.generateImpliedEndTags(t),
                    e.currentStackItem().localName != t.toLowerCase() ? (e.parseError("unexpected-cell-end-tag", {
                        name: t
                    }),
                    e.openElements.popUntilPopped(t)) : e.popElement(),
                    e.clearActiveFormattingElements(),
                    e.setInsertionMode("inRow")) : e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.inCell.endTagIgnore = function(t) {
                    e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.inCell.endTagImply = function(t) {
                    e.openElements.inTableScope(t) ? (this.closeCell(),
                    e.insertionMode.processEndTag(t)) : e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.inCell.endTagOther = function(e) {
                    t.inBody.processEndTag(e)
                }
                ,
                t.inCell.closeCell = function() {
                    e.openElements.inTableScope("td") ? this.endTagTableCell("td") : e.openElements.inTableScope("th") && this.endTagTableCell("th")
                }
                ,
                t.inColumnGroup = Object.create(t.base),
                t.inColumnGroup.start_tag_handlers = {
                    html: "startTagHtml",
                    col: "startTagCol",
                    "-default": "startTagOther"
                },
                t.inColumnGroup.end_tag_handlers = {
                    colgroup: "endTagColgroup",
                    col: "endTagCol",
                    "-default": "endTagOther"
                },
                t.inColumnGroup.ignoreEndTagColgroup = function() {
                    return e.currentStackItem().localName == "html"
                }
                ,
                t.inColumnGroup.processCharacters = function(t) {
                    var n = t.takeLeadingWhitespace();
                    n && e.insertText(n);
                    if (!t.length)
                        return;
                    var r = this.ignoreEndTagColgroup();
                    this.endTagColgroup("colgroup"),
                    r || e.insertionMode.processCharacters(t)
                }
                ,
                t.inColumnGroup.startTagCol = function(t, n) {
                    e.insertSelfClosingElement(t, n)
                }
                ,
                t.inColumnGroup.startTagOther = function(t, n, r) {
                    var i = this.ignoreEndTagColgroup();
                    this.endTagColgroup("colgroup"),
                    i || e.insertionMode.processStartTag(t, n, r)
                }
                ,
                t.inColumnGroup.endTagColgroup = function(t) {
                    this.ignoreEndTagColgroup() ? (r.ok(e.context),
                    e.parseError("unexpected-end-tag", {
                        name: t
                    })) : (e.popElement(),
                    e.setInsertionMode("inTable"))
                }
                ,
                t.inColumnGroup.endTagCol = function(t) {
                    e.parseError("no-end-tag", {
                        name: "col"
                    })
                }
                ,
                t.inColumnGroup.endTagOther = function(t) {
                    var n = this.ignoreEndTagColgroup();
                    this.endTagColgroup("colgroup"),
                    n || e.insertionMode.processEndTag(t)
                }
                ,
                t.inForeignContent = Object.create(t.base),
                t.inForeignContent.processStartTag = function(t, n, r) {
                    if (["b", "big", "blockquote", "body", "br", "center", "code", "dd", "div", "dl", "dt", "em", "embed", "h1", "h2", "h3", "h4", "h5", "h6", "head", "hr", "i", "img", "li", "listing", "menu", "meta", "nobr", "ol", "p", "pre", "ruby", "s", "small", "span", "strong", "strike", "sub", "sup", "table", "tt", "u", "ul", "var"].indexOf(t) != -1 || t == "font" && n.some(function(e) {
                        return ["color", "face", "size"].indexOf(e.nodeName) >= 0
                    })) {
                        e.parseError("unexpected-html-element-in-foreign-content", {
                            name: t
                        });
                        while (e.currentStackItem().isForeign() && !e.currentStackItem().isHtmlIntegrationPoint() && !e.currentStackItem().isMathMLTextIntegrationPoint())
                            e.openElements.pop();
                        e.insertionMode.processStartTag(t, n, r);
                        return
                    }
                    e.currentStackItem().namespaceURI == "http://www.w3.org/1998/Math/MathML" && (n = e.adjustMathMLAttributes(n)),
                    e.currentStackItem().namespaceURI == "http://www.w3.org/2000/svg" && (t = e.adjustSVGTagNameCase(t),
                    n = e.adjustSVGAttributes(n)),
                    n = e.adjustForeignAttributes(n),
                    e.insertForeignElement(t, n, e.currentStackItem().namespaceURI, r)
                }
                ,
                t.inForeignContent.processEndTag = function(t) {
                    var n = e.currentStackItem()
                      , r = e.openElements.length - 1;
                    n.localName.toLowerCase() != t && e.parseError("unexpected-end-tag", {
                        name: t
                    });
                    for (; ; ) {
                        if (r === 0)
                            break;
                        if (n.localName.toLowerCase() == t) {
                            while (e.openElements.pop() != n)
                                ;
                            break
                        }
                        r -= 1,
                        n = e.openElements.item(r);
                        if (n.isForeign())
                            continue;
                        e.insertionMode.processEndTag(t);
                        break
                    }
                }
                ,
                t.inForeignContent.processCharacters = function(t) {
                    var n = t.takeRemaining();
                    n = n.replace(/\u0000/g, function(t, n) {
                        return e.parseError("invalid-codepoint"),
                        "\ufffd"
                    }),
                    e.framesetOk && !d(n) && (e.framesetOk = !1),
                    e.insertText(n)
                }
                ,
                t.inHeadNoscript = Object.create(t.base),
                t.inHeadNoscript.start_tag_handlers = {
                    html: "startTagHtml",
                    basefont: "startTagBasefontBgsoundLinkMetaNoframesStyle",
                    bgsound: "startTagBasefontBgsoundLinkMetaNoframesStyle",
                    link: "startTagBasefontBgsoundLinkMetaNoframesStyle",
                    meta: "startTagBasefontBgsoundLinkMetaNoframesStyle",
                    noframes: "startTagBasefontBgsoundLinkMetaNoframesStyle",
                    style: "startTagBasefontBgsoundLinkMetaNoframesStyle",
                    head: "startTagHeadNoscript",
                    noscript: "startTagHeadNoscript",
                    "-default": "startTagOther"
                },
                t.inHeadNoscript.end_tag_handlers = {
                    noscript: "endTagNoscript",
                    br: "endTagBr",
                    "-default": "endTagOther"
                },
                t.inHeadNoscript.processCharacters = function(t) {
                    var n = t.takeLeadingWhitespace();
                    n && e.insertText(n);
                    if (!t.length)
                        return;
                    e.parseError("unexpected-char-in-frameset"),
                    this.anythingElse(),
                    e.insertionMode.processCharacters(t)
                }
                ,
                t.inHeadNoscript.processComment = function(e) {
                    t.inHead.processComment(e)
                }
                ,
                t.inHeadNoscript.startTagBasefontBgsoundLinkMetaNoframesStyle = function(e, n) {
                    t.inHead.processStartTag(e, n)
                }
                ,
                t.inHeadNoscript.startTagHeadNoscript = function(t, n) {
                    e.parseError("unexpected-start-tag-in-frameset", {
                        name: t
                    })
                }
                ,
                t.inHeadNoscript.startTagOther = function(t, n) {
                    e.parseError("unexpected-start-tag-in-frameset", {
                        name: t
                    }),
                    this.anythingElse(),
                    e.insertionMode.processStartTag(t, n)
                }
                ,
                t.inHeadNoscript.endTagBr = function(t, n) {
                    e.parseError("unexpected-end-tag-in-frameset", {
                        name: t
                    }),
                    this.anythingElse(),
                    e.insertionMode.processEndTag(t, n)
                }
                ,
                t.inHeadNoscript.endTagNoscript = function(t, n) {
                    e.popElement(),
                    e.setInsertionMode("inHead")
                }
                ,
                t.inHeadNoscript.endTagOther = function(t, n) {
                    e.parseError("unexpected-end-tag-in-frameset", {
                        name: t
                    })
                }
                ,
                t.inHeadNoscript.anythingElse = function() {
                    e.popElement(),
                    e.setInsertionMode("inHead")
                }
                ,
                t.inFrameset = Object.create(t.base),
                t.inFrameset.start_tag_handlers = {
                    html: "startTagHtml",
                    frameset: "startTagFrameset",
                    frame: "startTagFrame",
                    noframes: "startTagNoframes",
                    "-default": "startTagOther"
                },
                t.inFrameset.end_tag_handlers = {
                    frameset: "endTagFrameset",
                    noframes: "endTagNoframes",
                    "-default": "endTagOther"
                },
                t.inFrameset.processCharacters = function(t) {
                    e.parseError("unexpected-char-in-frameset")
                }
                ,
                t.inFrameset.startTagFrameset = function(t, n) {
                    e.insertElement(t, n)
                }
                ,
                t.inFrameset.startTagFrame = function(t, n) {
                    e.insertSelfClosingElement(t, n)
                }
                ,
                t.inFrameset.startTagNoframes = function(e, n) {
                    t.inBody.processStartTag(e, n)
                }
                ,
                t.inFrameset.startTagOther = function(t, n) {
                    e.parseError("unexpected-start-tag-in-frameset", {
                        name: t
                    })
                }
                ,
                t.inFrameset.endTagFrameset = function(t, n) {
                    e.currentStackItem().localName == "html" ? e.parseError("unexpected-frameset-in-frameset-innerhtml") : e.popElement(),
                    !e.context && e.currentStackItem().localName != "frameset" && e.setInsertionMode("afterFrameset")
                }
                ,
                t.inFrameset.endTagNoframes = function(e) {
                    t.inBody.processEndTag(e)
                }
                ,
                t.inFrameset.endTagOther = function(t) {
                    e.parseError("unexpected-end-tag-in-frameset", {
                        name: t
                    })
                }
                ,
                t.inTable = Object.create(t.base),
                t.inTable.start_tag_handlers = {
                    html: "startTagHtml",
                    caption: "startTagCaption",
                    colgroup: "startTagColgroup",
                    col: "startTagCol",
                    table: "startTagTable",
                    tbody: "startTagRowGroup",
                    tfoot: "startTagRowGroup",
                    thead: "startTagRowGroup",
                    td: "startTagImplyTbody",
                    th: "startTagImplyTbody",
                    tr: "startTagImplyTbody",
                    style: "startTagStyleScript",
                    script: "startTagStyleScript",
                    input: "startTagInput",
                    form: "startTagForm",
                    "-default": "startTagOther"
                },
                t.inTable.end_tag_handlers = {
                    table: "endTagTable",
                    body: "endTagIgnore",
                    caption: "endTagIgnore",
                    col: "endTagIgnore",
                    colgroup: "endTagIgnore",
                    html: "endTagIgnore",
                    tbody: "endTagIgnore",
                    td: "endTagIgnore",
                    tfoot: "endTagIgnore",
                    th: "endTagIgnore",
                    thead: "endTagIgnore",
                    tr: "endTagIgnore",
                    "-default": "endTagOther"
                },
                t.inTable.processCharacters = function(n) {
                    if (e.currentStackItem().isFosterParenting()) {
                        var r = e.insertionModeName;
                        e.setInsertionMode("inTableText"),
                        e.originalInsertionMode = r,
                        e.insertionMode.processCharacters(n)
                    } else
                        e.redirectAttachToFosterParent = !0,
                        t.inBody.processCharacters(n),
                        e.redirectAttachToFosterParent = !1
                }
                ,
                t.inTable.startTagCaption = function(t, n) {
                    e.openElements.popUntilTableScopeMarker(),
                    e.activeFormattingElements.push(l),
                    e.insertElement(t, n),
                    e.setInsertionMode("inCaption")
                }
                ,
                t.inTable.startTagColgroup = function(t, n) {
                    e.openElements.popUntilTableScopeMarker(),
                    e.insertElement(t, n),
                    e.setInsertionMode("inColumnGroup")
                }
                ,
                t.inTable.startTagCol = function(t, n) {
                    this.startTagColgroup("colgroup", []),
                    e.insertionMode.processStartTag(t, n)
                }
                ,
                t.inTable.startTagRowGroup = function(t, n) {
                    e.openElements.popUntilTableScopeMarker(),
                    e.insertElement(t, n),
                    e.setInsertionMode("inTableBody")
                }
                ,
                t.inTable.startTagImplyTbody = function(t, n) {
                    this.startTagRowGroup("tbody", []),
                    e.insertionMode.processStartTag(t, n)
                }
                ,
                t.inTable.startTagTable = function(t, n) {
                    e.parseError("unexpected-start-tag-implies-end-tag", {
                        startName: "table",
                        endName: "table"
                    }),
                    e.insertionMode.processEndTag("table"),
                    e.context || e.insertionMode.processStartTag(t, n)
                }
                ,
                t.inTable.startTagStyleScript = function(e, n) {
                    t.inHead.processStartTag(e, n)
                }
                ,
                t.inTable.startTagInput = function(t, n) {
                    for (var r in n)
                        if (n[r].nodeName.toLowerCase() == "type") {
                            if (n[r].nodeValue.toLowerCase() == "hidden") {
                                e.parseError("unexpected-hidden-input-in-table"),
                                e.insertElement(t, n),
                                e.openElements.pop();
                                return
                            }
                            break
                        }
                    this.startTagOther(t, n)
                }
                ,
                t.inTable.startTagForm = function(t, n) {
                    e.parseError("unexpected-form-in-table"),
                    e.form || (e.insertElement(t, n),
                    e.form = e.currentStackItem(),
                    e.openElements.pop())
                }
                ,
                t.inTable.startTagOther = function(n, r, i) {
                    e.parseError("unexpected-start-tag-implies-table-voodoo", {
                        name: n
                    }),
                    e.redirectAttachToFosterParent = !0,
                    t.inBody.processStartTag(n, r, i),
                    e.redirectAttachToFosterParent = !1
                }
                ,
                t.inTable.endTagTable = function(t) {
                    e.openElements.inTableScope(t) ? (e.generateImpliedEndTags(),
                    e.currentStackItem().localName != t && e.parseError("end-tag-too-early-named", {
                        gotName: "table",
                        expectedName: e.currentStackItem().localName
                    }),
                    e.openElements.popUntilPopped("table"),
                    e.resetInsertionMode()) : (r.ok(e.context),
                    e.parseError("unexpected-end-tag", {
                        name: t
                    }))
                }
                ,
                t.inTable.endTagIgnore = function(t) {
                    e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.inTable.endTagOther = function(n) {
                    e.parseError("unexpected-end-tag-implies-table-voodoo", {
                        name: n
                    }),
                    e.redirectAttachToFosterParent = !0,
                    t.inBody.processEndTag(n),
                    e.redirectAttachToFosterParent = !1
                }
                ,
                t.inTableText = Object.create(t.base),
                t.inTableText.flushCharacters = function() {
                    var t = e.pendingTableCharacters.join("");
                    p(t) ? e.insertText(t) : (e.redirectAttachToFosterParent = !0,
                    e.reconstructActiveFormattingElements(),
                    e.insertText(t),
                    e.framesetOk = !1,
                    e.redirectAttachToFosterParent = !1),
                    e.pendingTableCharacters = []
                }
                ,
                t.inTableText.processComment = function(t) {
                    this.flushCharacters(),
                    e.setInsertionMode(e.originalInsertionMode),
                    e.insertionMode.processComment(t)
                }
                ,
                t.inTableText.processEOF = function(t) {
                    this.flushCharacters(),
                    e.setInsertionMode(e.originalInsertionMode),
                    e.insertionMode.processEOF()
                }
                ,
                t.inTableText.processCharacters = function(t) {
                    var n = t.takeRemaining();
                    n = n.replace(/\u0000/g, function(t, n) {
                        return e.parseError("invalid-codepoint"),
                        ""
                    });
                    if (!n)
                        return;
                    e.pendingTableCharacters.push(n)
                }
                ,
                t.inTableText.processStartTag = function(t, n, r) {
                    this.flushCharacters(),
                    e.setInsertionMode(e.originalInsertionMode),
                    e.insertionMode.processStartTag(t, n, r)
                }
                ,
                t.inTableText.processEndTag = function(t, n) {
                    this.flushCharacters(),
                    e.setInsertionMode(e.originalInsertionMode),
                    e.insertionMode.processEndTag(t, n)
                }
                ,
                t.inTableBody = Object.create(t.base),
                t.inTableBody.start_tag_handlers = {
                    html: "startTagHtml",
                    tr: "startTagTr",
                    td: "startTagTableCell",
                    th: "startTagTableCell",
                    caption: "startTagTableOther",
                    col: "startTagTableOther",
                    colgroup: "startTagTableOther",
                    tbody: "startTagTableOther",
                    tfoot: "startTagTableOther",
                    thead: "startTagTableOther",
                    "-default": "startTagOther"
                },
                t.inTableBody.end_tag_handlers = {
                    table: "endTagTable",
                    tbody: "endTagTableRowGroup",
                    tfoot: "endTagTableRowGroup",
                    thead: "endTagTableRowGroup",
                    body: "endTagIgnore",
                    caption: "endTagIgnore",
                    col: "endTagIgnore",
                    colgroup: "endTagIgnore",
                    html: "endTagIgnore",
                    td: "endTagIgnore",
                    th: "endTagIgnore",
                    tr: "endTagIgnore",
                    "-default": "endTagOther"
                },
                t.inTableBody.processCharacters = function(e) {
                    t.inTable.processCharacters(e)
                }
                ,
                t.inTableBody.startTagTr = function(t, n) {
                    e.openElements.popUntilTableBodyScopeMarker(),
                    e.insertElement(t, n),
                    e.setInsertionMode("inRow")
                }
                ,
                t.inTableBody.startTagTableCell = function(t, n) {
                    e.parseError("unexpected-cell-in-table-body", {
                        name: t
                    }),
                    this.startTagTr("tr", []),
                    e.insertionMode.processStartTag(t, n)
                }
                ,
                t.inTableBody.startTagTableOther = function(t, n) {
                    e.openElements.inTableScope("tbody") || e.openElements.inTableScope("thead") || e.openElements.inTableScope("tfoot") ? (e.openElements.popUntilTableBodyScopeMarker(),
                    this.endTagTableRowGroup(e.currentStackItem().localName),
                    e.insertionMode.processStartTag(t, n)) : e.parseError("unexpected-start-tag", {
                        name: t
                    })
                }
                ,
                t.inTableBody.startTagOther = function(e, n) {
                    t.inTable.processStartTag(e, n)
                }
                ,
                t.inTableBody.endTagTableRowGroup = function(t) {
                    e.openElements.inTableScope(t) ? (e.openElements.popUntilTableBodyScopeMarker(),
                    e.popElement(),
                    e.setInsertionMode("inTable")) : e.parseError("unexpected-end-tag-in-table-body", {
                        name: t
                    })
                }
                ,
                t.inTableBody.endTagTable = function(t) {
                    e.openElements.inTableScope("tbody") || e.openElements.inTableScope("thead") || e.openElements.inTableScope("tfoot") ? (e.openElements.popUntilTableBodyScopeMarker(),
                    this.endTagTableRowGroup(e.currentStackItem().localName),
                    e.insertionMode.processEndTag(t)) : e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.inTableBody.endTagIgnore = function(t) {
                    e.parseError("unexpected-end-tag-in-table-body", {
                        name: t
                    })
                }
                ,
                t.inTableBody.endTagOther = function(e) {
                    t.inTable.processEndTag(e)
                }
                ,
                t.inSelect = Object.create(t.base),
                t.inSelect.start_tag_handlers = {
                    html: "startTagHtml",
                    option: "startTagOption",
                    optgroup: "startTagOptgroup",
                    select: "startTagSelect",
                    input: "startTagInput",
                    keygen: "startTagInput",
                    textarea: "startTagInput",
                    script: "startTagScript",
                    "-default": "startTagOther"
                },
                t.inSelect.end_tag_handlers = {
                    option: "endTagOption",
                    optgroup: "endTagOptgroup",
                    select: "endTagSelect",
                    caption: "endTagTableElements",
                    table: "endTagTableElements",
                    tbody: "endTagTableElements",
                    tfoot: "endTagTableElements",
                    thead: "endTagTableElements",
                    tr: "endTagTableElements",
                    td: "endTagTableElements",
                    th: "endTagTableElements",
                    "-default": "endTagOther"
                },
                t.inSelect.processCharacters = function(t) {
                    var n = t.takeRemaining();
                    n = n.replace(/\u0000/g, function(t, n) {
                        return e.parseError("invalid-codepoint"),
                        ""
                    });
                    if (!n)
                        return;
                    e.insertText(n)
                }
                ,
                t.inSelect.startTagOption = function(t, n) {
                    e.currentStackItem().localName == "option" && e.popElement(),
                    e.insertElement(t, n)
                }
                ,
                t.inSelect.startTagOptgroup = function(t, n) {
                    e.currentStackItem().localName == "option" && e.popElement(),
                    e.currentStackItem().localName == "optgroup" && e.popElement(),
                    e.insertElement(t, n)
                }
                ,
                t.inSelect.endTagOption = function(t) {
                    if (e.currentStackItem().localName !== "option") {
                        e.parseError("unexpected-end-tag-in-select", {
                            name: t
                        });
                        return
                    }
                    e.popElement()
                }
                ,
                t.inSelect.endTagOptgroup = function(t) {
                    e.currentStackItem().localName == "option" && e.openElements.item(e.openElements.length - 2).localName == "optgroup" && e.popElement(),
                    e.currentStackItem().localName == "optgroup" ? e.popElement() : e.parseError("unexpected-end-tag-in-select", {
                        name: "optgroup"
                    })
                }
                ,
                t.inSelect.startTagSelect = function(t) {
                    e.parseError("unexpected-select-in-select"),
                    this.endTagSelect("select")
                }
                ,
                t.inSelect.endTagSelect = function(t) {
                    e.openElements.inTableScope("select") ? (e.openElements.popUntilPopped("select"),
                    e.resetInsertionMode()) : e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.inSelect.startTagInput = function(t, n) {
                    e.parseError("unexpected-input-in-select"),
                    e.openElements.inSelectScope("select") && (this.endTagSelect("select"),
                    e.insertionMode.processStartTag(t, n))
                }
                ,
                t.inSelect.startTagScript = function(e, n) {
                    t.inHead.processStartTag(e, n)
                }
                ,
                t.inSelect.endTagTableElements = function(t) {
                    e.parseError("unexpected-end-tag-in-select", {
                        name: t
                    }),
                    e.openElements.inTableScope(t) && (this.endTagSelect("select"),
                    e.insertionMode.processEndTag(t))
                }
                ,
                t.inSelect.startTagOther = function(t, n) {
                    e.parseError("unexpected-start-tag-in-select", {
                        name: t
                    })
                }
                ,
                t.inSelect.endTagOther = function(t) {
                    e.parseError("unexpected-end-tag-in-select", {
                        name: t
                    })
                }
                ,
                t.inSelectInTable = Object.create(t.base),
                t.inSelectInTable.start_tag_handlers = {
                    caption: "startTagTable",
                    table: "startTagTable",
                    tbody: "startTagTable",
                    tfoot: "startTagTable",
                    thead: "startTagTable",
                    tr: "startTagTable",
                    td: "startTagTable",
                    th: "startTagTable",
                    "-default": "startTagOther"
                },
                t.inSelectInTable.end_tag_handlers = {
                    caption: "endTagTable",
                    table: "endTagTable",
                    tbody: "endTagTable",
                    tfoot: "endTagTable",
                    thead: "endTagTable",
                    tr: "endTagTable",
                    td: "endTagTable",
                    th: "endTagTable",
                    "-default": "endTagOther"
                },
                t.inSelectInTable.processCharacters = function(e) {
                    t.inSelect.processCharacters(e)
                }
                ,
                t.inSelectInTable.startTagTable = function(t, n) {
                    e.parseError("unexpected-table-element-start-tag-in-select-in-table", {
                        name: t
                    }),
                    this.endTagOther("select"),
                    e.insertionMode.processStartTag(t, n)
                }
                ,
                t.inSelectInTable.startTagOther = function(e, n, r) {
                    t.inSelect.processStartTag(e, n, r)
                }
                ,
                t.inSelectInTable.endTagTable = function(t) {
                    e.parseError("unexpected-table-element-end-tag-in-select-in-table", {
                        name: t
                    }),
                    e.openElements.inTableScope(t) && (this.endTagOther("select"),
                    e.insertionMode.processEndTag(t))
                }
                ,
                t.inSelectInTable.endTagOther = function(e) {
                    t.inSelect.processEndTag(e)
                }
                ,
                t.inRow = Object.create(t.base),
                t.inRow.start_tag_handlers = {
                    html: "startTagHtml",
                    td: "startTagTableCell",
                    th: "startTagTableCell",
                    caption: "startTagTableOther",
                    col: "startTagTableOther",
                    colgroup: "startTagTableOther",
                    tbody: "startTagTableOther",
                    tfoot: "startTagTableOther",
                    thead: "startTagTableOther",
                    tr: "startTagTableOther",
                    "-default": "startTagOther"
                },
                t.inRow.end_tag_handlers = {
                    tr: "endTagTr",
                    table: "endTagTable",
                    tbody: "endTagTableRowGroup",
                    tfoot: "endTagTableRowGroup",
                    thead: "endTagTableRowGroup",
                    body: "endTagIgnore",
                    caption: "endTagIgnore",
                    col: "endTagIgnore",
                    colgroup: "endTagIgnore",
                    html: "endTagIgnore",
                    td: "endTagIgnore",
                    th: "endTagIgnore",
                    "-default": "endTagOther"
                },
                t.inRow.processCharacters = function(e) {
                    t.inTable.processCharacters(e)
                }
                ,
                t.inRow.startTagTableCell = function(t, n) {
                    e.openElements.popUntilTableRowScopeMarker(),
                    e.insertElement(t, n),
                    e.setInsertionMode("inCell"),
                    e.activeFormattingElements.push(l)
                }
                ,
                t.inRow.startTagTableOther = function(t, n) {
                    var r = this.ignoreEndTagTr();
                    this.endTagTr("tr"),
                    r || e.insertionMode.processStartTag(t, n)
                }
                ,
                t.inRow.startTagOther = function(e, n, r) {
                    t.inTable.processStartTag(e, n, r)
                }
                ,
                t.inRow.endTagTr = function(t) {
                    this.ignoreEndTagTr() ? (r.ok(e.context),
                    e.parseError("unexpected-end-tag", {
                        name: t
                    })) : (e.openElements.popUntilTableRowScopeMarker(),
                    e.popElement(),
                    e.setInsertionMode("inTableBody"))
                }
                ,
                t.inRow.endTagTable = function(t) {
                    var n = this.ignoreEndTagTr();
                    this.endTagTr("tr"),
                    n || e.insertionMode.processEndTag(t)
                }
                ,
                t.inRow.endTagTableRowGroup = function(t) {
                    e.openElements.inTableScope(t) ? (this.endTagTr("tr"),
                    e.insertionMode.processEndTag(t)) : e.parseError("unexpected-end-tag", {
                        name: t
                    })
                }
                ,
                t.inRow.endTagIgnore = function(t) {
                    e.parseError("unexpected-end-tag-in-table-row", {
                        name: t
                    })
                }
                ,
                t.inRow.endTagOther = function(e) {
                    t.inTable.processEndTag(e)
                }
                ,
                t.inRow.ignoreEndTagTr = function() {
                    return !e.openElements.inTableScope("tr")
                }
                ,
                t.afterAfterFrameset = Object.create(t.base),
                t.afterAfterFrameset.start_tag_handlers = {
                    html: "startTagHtml",
                    noframes: "startTagNoFrames",
                    "-default": "startTagOther"
                },
                t.afterAfterFrameset.processEOF = function() {}
                ,
                t.afterAfterFrameset.processComment = function(t) {
                    e.insertComment(t, e.document)
                }
                ,
                t.afterAfterFrameset.processCharacters = function(t) {
                    var n = t.takeRemaining()
                      , r = "";
                    for (var i = 0; i < n.length; i++) {
                        var s = n[i];
                        c(s) && (r += s)
                    }
                    r && (e.reconstructActiveFormattingElements(),
                    e.insertText(r)),
                    r.length < n.length && e.parseError("expected-eof-but-got-char")
                }
                ,
                t.afterAfterFrameset.startTagNoFrames = function(e, n) {
                    t.inHead.processStartTag(e, n)
                }
                ,
                t.afterAfterFrameset.startTagOther = function(t, n, r) {
                    e.parseError("expected-eof-but-got-start-tag", {
                        name: t
                    })
                }
                ,
                t.afterAfterFrameset.processEndTag = function(t, n) {
                    e.parseError("expected-eof-but-got-end-tag", {
                        name: t
                    })
                }
                ,
                t.text = Object.create(t.base),
                t.text.start_tag_handlers = {
                    "-default": "startTagOther"
                },
                t.text.end_tag_handlers = {
                    script: "endTagScript",
                    "-default": "endTagOther"
                },
                t.text.processCharacters = function(t) {
                    e.shouldSkipLeadingNewline && (e.shouldSkipLeadingNewline = !1,
                    t.skipAtMostOneLeadingNewline());
                    var n = t.takeRemaining();
                    if (!n)
                        return;
                    e.insertText(n)
                }
                ,
                t.text.processEOF = function() {
                    e.parseError("expected-named-closing-tag-but-got-eof", {
                        name: e.currentStackItem().localName
                    }),
                    e.openElements.pop(),
                    e.setInsertionMode(e.originalInsertionMode),
                    e.insertionMode.processEOF()
                }
                ,
                t.text.startTagOther = function(e) {
                    throw "Tried to process start tag " + e + " in RCDATA/RAWTEXT mode"
                }
                ,
                t.text.endTagScript = function(t) {
                    var n = e.openElements.pop();
                    r.ok(n.localName == "script"),
                    e.setInsertionMode(e.originalInsertionMode)
                }
                ,
                t.text.endTagOther = function(t) {
                    e.openElements.pop(),
                    e.setInsertionMode(e.originalInsertionMode)
                }
            }
            function y(e, t) {
                return e.replace(new RegExp("{[0-9a-z-]+}","gi"), function(e) {
                    return t[e.slice(1, -1)] || e
                })
            }
            var r = e("assert")
              , i = e("./messages.json")
              , s = e("./constants")
              , o = e("events").EventEmitter
              , u = e("./Tokenizer").Tokenizer
              , a = e("./ElementStack").ElementStack
              , f = e("./StackItem").StackItem
              , l = {};
            m.prototype.skipAtMostOneLeadingNewline = function() {
                this.characters[this.current] === "\n" && this.current++
            }
            ,
            m.prototype.skipLeadingWhitespace = function() {
                while (c(this.characters[this.current]))
                    if (++this.current == this.end)
                        return
            }
            ,
            m.prototype.skipLeadingNonWhitespace = function() {
                while (!c(this.characters[this.current]))
                    if (++this.current == this.end)
                        return
            }
            ,
            m.prototype.takeRemaining = function() {
                return this.characters.substring(this.current)
            }
            ,
            m.prototype.takeLeadingWhitespace = function() {
                var e = this.current;
                return this.skipLeadingWhitespace(),
                e === this.current ? "" : this.characters.substring(e, this.current - e)
            }
            ,
            Object.defineProperty(m.prototype, "length", {
                get: function() {
                    return this.end - this.current
                }
            }),
            g.prototype.setInsertionMode = function(e) {
                this.insertionMode = this.insertionModes[e],
                this.insertionModeName = e
            }
            ,
            g.prototype.adoptionAgencyEndTag = function(e) {
                function i(e) {
                    return e === r
                }
                var t = 8, n = 3, r, s = 0;
                while (s++ < t) {
                    r = this.elementInActiveFormattingElements(e);
                    if (!r || this.openElements.contains(r) && !this.openElements.inScope(r.localName))
                        return this.parseError("adoption-agency-1.1", {
                            name: e
                        }),
                        !1;
                    if (!this.openElements.contains(r))
                        return this.parseError("adoption-agency-1.2", {
                            name: e
                        }),
                        this.removeElementFromActiveFormattingElements(r),
                        !0;
                    this.openElements.inScope(r.localName) || this.parseError("adoption-agency-4.4", {
                        name: e
                    }),
                    r != this.currentStackItem() && this.parseError("adoption-agency-1.3", {
                        name: e
                    });
                    var o = this.openElements.furthestBlockForFormattingElement(r.node);
                    if (!o)
                        return this.openElements.remove_openElements_until(i),
                        this.removeElementFromActiveFormattingElements(r),
                        !0;
                    var u = this.openElements.elements.indexOf(r)
                      , a = this.openElements.item(u - 1)
                      , l = this.activeFormattingElements.indexOf(r)
                      , c = o
                      , h = o
                      , p = this.openElements.elements.indexOf(c)
                      , d = 0;
                    while (d++ < n) {
                        p -= 1,
                        c = this.openElements.item(p);
                        if (this.activeFormattingElements.indexOf(c) < 0) {
                            this.openElements.elements.splice(p, 1);
                            continue
                        }
                        if (c == r)
                            break;
                        h == o && (l = this.activeFormattingElements.indexOf(c) + 1);
                        var v = this.createElement(c.namespaceURI, c.localName, c.attributes)
                          , m = new f(c.namespaceURI,c.localName,c.attributes,v);
                        this.activeFormattingElements[this.activeFormattingElements.indexOf(c)] = m,
                        this.openElements.elements[this.openElements.elements.indexOf(c)] = m,
                        c = m,
                        this.detachFromParent(h.node),
                        this.attachNode(h.node, c.node),
                        h = c
                    }
                    this.detachFromParent(h.node),
                    a.isFosterParenting() ? this.insertIntoFosterParent(h.node) : this.attachNode(h.node, a.node);
                    var v = this.createElement("http://www.w3.org/1999/xhtml", r.localName, r.attributes)
                      , g = new f(r.namespaceURI,r.localName,r.attributes,v);
                    this.reparentChildren(o.node, v),
                    this.attachNode(v, o.node),
                    this.removeElementFromActiveFormattingElements(r),
                    this.activeFormattingElements.splice(Math.min(l, this.activeFormattingElements.length), 0, g),
                    this.openElements.remove(r),
                    this.openElements.elements.splice(this.openElements.elements.indexOf(o) + 1, 0, g)
                }
                return !0
            }
            ,
            g.prototype.start = function() {
                throw "Not mplemented"
            }
            ,
            g.prototype.startTokenization = function(e) {
                this.tokenizer = e,
                this.compatMode = "no quirks",
                this.originalInsertionMode = "initial",
                this.framesetOk = !0,
                this.openElements = new a,
                this.activeFormattingElements = [],
                this.start();
                if (this.context) {
                    switch (this.context) {
                    case "title":
                    case "textarea":
                        this.tokenizer.setState(u.RCDATA);
                        break;
                    case "style":
                    case "xmp":
                    case "iframe":
                    case "noembed":
                    case "noframes":
                        this.tokenizer.setState(u.RAWTEXT);
                        break;
                    case "script":
                        this.tokenizer.setState(u.SCRIPT_DATA);
                        break;
                    case "noscript":
                        this.scriptingEnabled && this.tokenizer.setState(u.RAWTEXT);
                        break;
                    case "plaintext":
                        this.tokenizer.setState(u.PLAINTEXT)
                    }
                    this.insertHtmlElement(),
                    this.resetInsertionMode()
                } else
                    this.setInsertionMode("initial")
            }
            ,
            g.prototype.processToken = function(e) {
                this.selfClosingFlagAcknowledged = !1;
                var t = this.openElements.top || null, n;
                !t || !t.isForeign() || t.isMathMLTextIntegrationPoint() && (e.type == "StartTag" && !(e.name in {
                    mglyph: 0,
                    malignmark: 0
                }) || e.type === "Characters") || t.namespaceURI == "http://www.w3.org/1998/Math/MathML" && t.localName == "annotation-xml" && e.type == "StartTag" && e.name == "svg" || t.isHtmlIntegrationPoint() && e.type in {
                    StartTag: 0,
                    Characters: 0
                } || e.type == "EOF" ? n = this.insertionMode : n = this.insertionModes.inForeignContent;
                switch (e.type) {
                case "Characters":
                    var r = new m(e.data);
                    n.processCharacters(r);
                    break;
                case "Comment":
                    n.processComment(e.data);
                    break;
                case "StartTag":
                    n.processStartTag(e.name, e.data, e.selfClosing);
                    break;
                case "EndTag":
                    n.processEndTag(e.name);
                    break;
                case "Doctype":
                    n.processDoctype(e.name, e.publicId, e.systemId, e.forceQuirks);
                    break;
                case "EOF":
                    n.processEOF()
                }
            }
            ,
            g.prototype.isCdataSectionAllowed = function() {
                return this.openElements.length > 0 && this.currentStackItem().isForeign()
            }
            ,
            g.prototype.isSelfClosingFlagAcknowledged = function() {
                return this.selfClosingFlagAcknowledged
            }
            ,
            g.prototype.createElement = function(e, t, n) {
                throw new Error("Not implemented")
            }
            ,
            g.prototype.attachNode = function(e, t) {
                throw new Error("Not implemented")
            }
            ,
            g.prototype.attachNodeToFosterParent = function(e, t, n) {
                throw new Error("Not implemented")
            }
            ,
            g.prototype.detachFromParent = function(e) {
                throw new Error("Not implemented")
            }
            ,
            g.prototype.addAttributesToElement = function(e, t) {
                throw new Error("Not implemented")
            }
            ,
            g.prototype.insertHtmlElement = function(e) {
                var t = this.createElement("http://www.w3.org/1999/xhtml", "html", e);
                return this.attachNode(t, this.document),
                this.openElements.pushHtmlElement(new f("http://www.w3.org/1999/xhtml","html",e,t)),
                t
            }
            ,
            g.prototype.insertHeadElement = function(e) {
                var t = this.createElement("http://www.w3.org/1999/xhtml", "head", e);
                return this.head = new f("http://www.w3.org/1999/xhtml","head",e,t),
                this.attachNode(t, this.openElements.top.node),
                this.openElements.pushHeadElement(this.head),
                t
            }
            ,
            g.prototype.insertBodyElement = function(e) {
                var t = this.createElement("http://www.w3.org/1999/xhtml", "body", e);
                return this.attachNode(t, this.openElements.top.node),
                this.openElements.pushBodyElement(new f("http://www.w3.org/1999/xhtml","body",e,t)),
                t
            }
            ,
            g.prototype.insertIntoFosterParent = function(e) {
                var t = this.openElements.findIndex("table")
                  , n = this.openElements.item(t).node;
                if (t === 0)
                    return this.attachNode(e, n);
                this.attachNodeToFosterParent(e, n, this.openElements.item(t - 1).node)
            }
            ,
            g.prototype.insertElement = function(e, t, n, r) {
                n || (n = "http://www.w3.org/1999/xhtml");
                var i = this.createElement(n, e, t);
                this.shouldFosterParent() ? this.insertIntoFosterParent(i) : this.attachNode(i, this.openElements.top.node),
                r || this.openElements.push(new f(n,e,t,i))
            }
            ,
            g.prototype.insertFormattingElement = function(e, t) {
                this.insertElement(e, t, "http://www.w3.org/1999/xhtml"),
                this.appendElementToActiveFormattingElements(this.currentStackItem())
            }
            ,
            g.prototype.insertSelfClosingElement = function(e, t) {
                this.selfClosingFlagAcknowledged = !0,
                this.insertElement(e, t, "http://www.w3.org/1999/xhtml", !0)
            }
            ,
            g.prototype.insertForeignElement = function(e, t, n, r) {
                r && (this.selfClosingFlagAcknowledged = !0),
                this.insertElement(e, t, n, r)
            }
            ,
            g.prototype.insertComment = function(e, t) {
                throw new Error("Not implemented")
            }
            ,
            g.prototype.insertDoctype = function(e, t, n) {
                throw new Error("Not implemented")
            }
            ,
            g.prototype.insertText = function(e) {
                throw new Error("Not implemented")
            }
            ,
            g.prototype.currentStackItem = function() {
                return this.openElements.top
            }
            ,
            g.prototype.popElement = function() {
                return this.openElements.pop()
            }
            ,
            g.prototype.shouldFosterParent = function() {
                return this.redirectAttachToFosterParent && this.currentStackItem().isFosterParenting()
            }
            ,
            g.prototype.generateImpliedEndTags = function(e) {
                var t = this.openElements.top.localName;
                ["dd", "dt", "li", "option", "optgroup", "p", "rp", "rt"].indexOf(t) != -1 && t != e && (this.popElement(),
                this.generateImpliedEndTags(e))
            }
            ,
            g.prototype.reconstructActiveFormattingElements = function() {
                if (this.activeFormattingElements.length === 0)
                    return;
                var e = this.activeFormattingElements.length - 1
                  , t = this.activeFormattingElements[e];
                if (t == l || this.openElements.contains(t))
                    return;
                while (t != l && !this.openElements.contains(t)) {
                    e -= 1,
                    t = this.activeFormattingElements[e];
                    if (!t)
                        break
                }
                for (; ; ) {
                    e += 1,
                    t = this.activeFormattingElements[e],
                    this.insertElement(t.localName, t.attributes);
                    var n = this.currentStackItem();
                    this.activeFormattingElements[e] = n;
                    if (n == this.activeFormattingElements[this.activeFormattingElements.length - 1])
                        break
                }
            }
            ,
            g.prototype.ensureNoahsArkCondition = function(e) {
                var t = 3;
                if (this.activeFormattingElements.length < t)
                    return;
                var n = []
                  , r = e.attributes.length;
                for (var i = this.activeFormattingElements.length - 1; i >= 0; i--) {
                    var s = this.activeFormattingElements[i];
                    if (s === l)
                        break;
                    if (e.localName !== s.localName || e.namespaceURI !== s.namespaceURI)
                        continue;
                    if (s.attributes.length != r)
                        continue;
                    n.push(s)
                }
                if (n.length < t)
                    return;
                var o = []
                  , u = e.attributes;
                for (var i = 0; i < u.length; i++) {
                    var a = u[i];
                    for (var f = 0; f < n.length; f++) {
                        var s = n[f]
                          , c = v(s, a.nodeName);
                        c && c.nodeValue === a.nodeValue && o.push(s)
                    }
                    if (o.length < t)
                        return;
                    n = o,
                    o = []
                }
                for (var i = t - 1; i < n.length; i++)
                    this.removeElementFromActiveFormattingElements(n[i])
            }
            ,
            g.prototype.appendElementToActiveFormattingElements = function(e) {
                this.ensureNoahsArkCondition(e),
                this.activeFormattingElements.push(e)
            }
            ,
            g.prototype.removeElementFromActiveFormattingElements = function(e) {
                var t = this.activeFormattingElements.indexOf(e);
                t >= 0 && this.activeFormattingElements.splice(t, 1)
            }
            ,
            g.prototype.elementInActiveFormattingElements = function(e) {
                var t = this.activeFormattingElements;
                for (var n = t.length - 1; n >= 0; n--) {
                    if (t[n] == l)
                        break;
                    if (t[n].localName == e)
                        return t[n]
                }
                return !1
            }
            ,
            g.prototype.clearActiveFormattingElements = function() {
                while (this.activeFormattingElements.length !== 0 && this.activeFormattingElements.pop() != l)
                    ;
            }
            ,
            g.prototype.reparentChildren = function(e, t) {
                throw new Error("Not implemented")
            }
            ,
            g.prototype.setFragmentContext = function(e) {
                this.context = e
            }
            ,
            g.prototype.parseError = function(e, t) {
                if (!this.errorHandler)
                    return;
                var n = y(i[e], t);
                this.errorHandler.error(n, this.tokenizer._inputStream.location(), e)
            }
            ,
            g.prototype.resetInsertionMode = function() {
                var e = !1
                  , t = null;
                for (var n = this.openElements.length - 1; n >= 0; n--) {
                    t = this.openElements.item(n),
                    n === 0 && (r.ok(this.context),
                    e = !0,
                    t = new f("http://www.w3.org/1999/xhtml",this.context,[],null));
                    if (t.namespaceURI === "http://www.w3.org/1999/xhtml") {
                        if (t.localName === "select")
                            return this.setInsertionMode("inSelect");
                        if (t.localName === "td" || t.localName === "th")
                            return this.setInsertionMode("inCell");
                        if (t.localName === "tr")
                            return this.setInsertionMode("inRow");
                        if (t.localName === "tbody" || t.localName === "thead" || t.localName === "tfoot")
                            return this.setInsertionMode("inTableBody");
                        if (t.localName === "caption")
                            return this.setInsertionMode("inCaption");
                        if (t.localName === "colgroup")
                            return this.setInsertionMode("inColumnGroup");
                        if (t.localName === "table")
                            return this.setInsertionMode("inTable");
                        if (t.localName === "head" && !e)
                            return this.setInsertionMode("inHead");
                        if (t.localName === "body")
                            return this.setInsertionMode("inBody");
                        if (t.localName === "frameset")
                            return this.setInsertionMode("inFrameset");
                        if (t.localName === "html")
                            return this.openElements.headElement ? this.setInsertionMode("afterHead") : this.setInsertionMode("beforeHead")
                    }
                    if (e)
                        return this.setInsertionMode("inBody")
                }
            }
            ,
            g.prototype.processGenericRCDATAStartTag = function(e, t) {
                this.insertElement(e, t),
                this.tokenizer.setState(u.RCDATA),
                this.originalInsertionMode = this.insertionModeName,
                this.setInsertionMode("text")
            }
            ,
            g.prototype.processGenericRawTextStartTag = function(e, t) {
                this.insertElement(e, t),
                this.tokenizer.setState(u.RAWTEXT),
                this.originalInsertionMode = this.insertionModeName,
                this.setInsertionMode("text")
            }
            ,
            g.prototype.adjustMathMLAttributes = function(e) {
                return e.forEach(function(e) {
                    e.namespaceURI = "http://www.w3.org/1998/Math/MathML",
                    s.MATHMLAttributeMap[e.nodeName] && (e.nodeName = s.MATHMLAttributeMap[e.nodeName])
                }),
                e
            }
            ,
            g.prototype.adjustSVGTagNameCase = function(e) {
                return s.SVGTagMap[e] || e
            }
            ,
            g.prototype.adjustSVGAttributes = function(e) {
                return e.forEach(function(e) {
                    e.namespaceURI = "http://www.w3.org/2000/svg",
                    s.SVGAttributeMap[e.nodeName] && (e.nodeName = s.SVGAttributeMap[e.nodeName])
                }),
                e
            }
            ,
            g.prototype.adjustForeignAttributes = function(e) {
                for (var t = 0; t < e.length; t++) {
                    var n = e[t]
                      , r = s.ForeignAttributeMap[n.nodeName];
                    r && (n.nodeName = r.localName,
                    n.prefix = r.prefix,
                    n.namespaceURI = r.namespaceURI)
                }
                return e
            }
            ,
            n.TreeBuilder = g
        }
        , {
            "./ElementStack": 1,
            "./StackItem": 4,
            "./Tokenizer": 5,
            "./constants": 7,
            "./messages.json": 8,
            assert: 13,
            events: 16
        }],
        7: [function(e, t, n) {
            n.SVGTagMap = {
                altglyph: "altGlyph",
                altglyphdef: "altGlyphDef",
                altglyphitem: "altGlyphItem",
                animatecolor: "animateColor",
                animatemotion: "animateMotion",
                animatetransform: "animateTransform",
                clippath: "clipPath",
                feblend: "feBlend",
                fecolormatrix: "feColorMatrix",
                fecomponenttransfer: "feComponentTransfer",
                fecomposite: "feComposite",
                feconvolvematrix: "feConvolveMatrix",
                fediffuselighting: "feDiffuseLighting",
                fedisplacementmap: "feDisplacementMap",
                fedistantlight: "feDistantLight",
                feflood: "feFlood",
                fefunca: "feFuncA",
                fefuncb: "feFuncB",
                fefuncg: "feFuncG",
                fefuncr: "feFuncR",
                fegaussianblur: "feGaussianBlur",
                feimage: "feImage",
                femerge: "feMerge",
                femergenode: "feMergeNode",
                femorphology: "feMorphology",
                feoffset: "feOffset",
                fepointlight: "fePointLight",
                fespecularlighting: "feSpecularLighting",
                fespotlight: "feSpotLight",
                fetile: "feTile",
                feturbulence: "feTurbulence",
                foreignobject: "foreignObject",
                glyphref: "glyphRef",
                lineargradient: "linearGradient",
                radialgradient: "radialGradient",
                textpath: "textPath"
            },
            n.MATHMLAttributeMap = {
                definitionurl: "definitionURL"
            },
            n.SVGAttributeMap = {
                attributename: "attributeName",
                attributetype: "attributeType",
                basefrequency: "baseFrequency",
                baseprofile: "baseProfile",
                calcmode: "calcMode",
                clippathunits: "clipPathUnits",
                contentscripttype: "contentScriptType",
                contentstyletype: "contentStyleType",
                diffuseconstant: "diffuseConstant",
                edgemode: "edgeMode",
                externalresourcesrequired: "externalResourcesRequired",
                filterres: "filterRes",
                filterunits: "filterUnits",
                glyphref: "glyphRef",
                gradienttransform: "gradientTransform",
                gradientunits: "gradientUnits",
                kernelmatrix: "kernelMatrix",
                kernelunitlength: "kernelUnitLength",
                keypoints: "keyPoints",
                keysplines: "keySplines",
                keytimes: "keyTimes",
                lengthadjust: "lengthAdjust",
                limitingconeangle: "limitingConeAngle",
                markerheight: "markerHeight",
                markerunits: "markerUnits",
                markerwidth: "markerWidth",
                maskcontentunits: "maskContentUnits",
                maskunits: "maskUnits",
                numoctaves: "numOctaves",
                pathlength: "pathLength",
                patterncontentunits: "patternContentUnits",
                patterntransform: "patternTransform",
                patternunits: "patternUnits",
                pointsatx: "pointsAtX",
                pointsaty: "pointsAtY",
                pointsatz: "pointsAtZ",
                preservealpha: "preserveAlpha",
                preserveaspectratio: "preserveAspectRatio",
                primitiveunits: "primitiveUnits",
                refx: "refX",
                refy: "refY",
                repeatcount: "repeatCount",
                repeatdur: "repeatDur",
                requiredextensions: "requiredExtensions",
                requiredfeatures: "requiredFeatures",
                specularconstant: "specularConstant",
                specularexponent: "specularExponent",
                spreadmethod: "spreadMethod",
                startoffset: "startOffset",
                stddeviation: "stdDeviation",
                stitchtiles: "stitchTiles",
                surfacescale: "surfaceScale",
                systemlanguage: "systemLanguage",
                tablevalues: "tableValues",
                targetx: "targetX",
                targety: "targetY",
                textlength: "textLength",
                viewbox: "viewBox",
                viewtarget: "viewTarget",
                xchannelselector: "xChannelSelector",
                ychannelselector: "yChannelSelector",
                zoomandpan: "zoomAndPan"
            },
            n.ForeignAttributeMap = {
                "xlink:actuate": {
                    prefix: "xlink",
                    localName: "actuate",
                    namespaceURI: "http://www.w3.org/1999/xlink"
                },
                "xlink:arcrole": {
                    prefix: "xlink",
                    localName: "arcrole",
                    namespaceURI: "http://www.w3.org/1999/xlink"
                },
                "xlink:href": {
                    prefix: "xlink",
                    localName: "href",
                    namespaceURI: "http://www.w3.org/1999/xlink"
                },
                "xlink:role": {
                    prefix: "xlink",
                    localName: "role",
                    namespaceURI: "http://www.w3.org/1999/xlink"
                },
                "xlink:show": {
                    prefix: "xlink",
                    localName: "show",
                    namespaceURI: "http://www.w3.org/1999/xlink"
                },
                "xlink:title": {
                    prefix: "xlink",
                    localName: "title",
                    namespaceURI: "http://www.w3.org/1999/xlink"
                },
                "xlink:type": {
                    prefix: "xlink",
                    localName: "title",
                    namespaceURI: "http://www.w3.org/1999/xlink"
                },
                "xml:base": {
                    prefix: "xml",
                    localName: "base",
                    namespaceURI: "http://www.w3.org/XML/1998/namespace"
                },
                "xml:lang": {
                    prefix: "xml",
                    localName: "lang",
                    namespaceURI: "http://www.w3.org/XML/1998/namespace"
                },
                "xml:space": {
                    prefix: "xml",
                    localName: "space",
                    namespaceURI: "http://www.w3.org/XML/1998/namespace"
                },
                xmlns: {
                    prefix: null,
                    localName: "xmlns",
                    namespaceURI: "http://www.w3.org/2000/xmlns/"
                },
                "xmlns:xlink": {
                    prefix: "xmlns",
                    localName: "xlink",
                    namespaceURI: "http://www.w3.org/2000/xmlns/"
                }
            }
        }
        , {}],
        8: [function(e, t, n) {
            t.exports = {
                "null-character": "Null character in input stream, replaced with U+FFFD.",
                "invalid-codepoint": "Invalid codepoint in stream",
                "incorrectly-placed-solidus": "Solidus (/) incorrectly placed in tag.",
                "incorrect-cr-newline-entity": "Incorrect CR newline entity, replaced with LF.",
                "illegal-windows-1252-entity": "Entity used with illegal number (windows-1252 reference).",
                "cant-convert-numeric-entity": "Numeric entity couldn't be converted to character (codepoint U+{charAsInt}).",
                "invalid-numeric-entity-replaced": "Numeric entity represents an illegal codepoint. Expanded to the C1 controls range.",
                "numeric-entity-without-semicolon": "Numeric entity didn't end with ';'.",
                "expected-numeric-entity-but-got-eof": "Numeric entity expected. Got end of file instead.",
                "expected-numeric-entity": "Numeric entity expected but none found.",
                "named-entity-without-semicolon": "Named entity didn't end with ';'.",
                "expected-named-entity": "Named entity expected. Got none.",
                "attributes-in-end-tag": "End tag contains unexpected attributes.",
                "self-closing-flag-on-end-tag": "End tag contains unexpected self-closing flag.",
                "bare-less-than-sign-at-eof": "End of file after <.",
                "expected-tag-name-but-got-right-bracket": "Expected tag name. Got '>' instead.",
                "expected-tag-name-but-got-question-mark": "Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)",
                "expected-tag-name": "Expected tag name. Got something else instead.",
                "expected-closing-tag-but-got-right-bracket": "Expected closing tag. Got '>' instead. Ignoring '</>'.",
                "expected-closing-tag-but-got-eof": "Expected closing tag. Unexpected end of file.",
                "expected-closing-tag-but-got-char": "Expected closing tag. Unexpected character '{data}' found.",
                "eof-in-tag-name": "Unexpected end of file in the tag name.",
                "expected-attribute-name-but-got-eof": "Unexpected end of file. Expected attribute name instead.",
                "eof-in-attribute-name": "Unexpected end of file in attribute name.",
                "invalid-character-in-attribute-name": "Invalid character in attribute name.",
                "duplicate-attribute": "Dropped duplicate attribute '{name}' on tag.",
                "expected-end-of-tag-but-got-eof": "Unexpected end of file. Expected = or end of tag.",
                "expected-attribute-value-but-got-eof": "Unexpected end of file. Expected attribute value.",
                "expected-attribute-value-but-got-right-bracket": "Expected attribute value. Got '>' instead.",
                "unexpected-character-in-unquoted-attribute-value": "Unexpected character in unquoted attribute",
                "invalid-character-after-attribute-name": "Unexpected character after attribute name.",
                "unexpected-character-after-attribute-value": "Unexpected character after attribute value.",
                "eof-in-attribute-value-double-quote": 'Unexpected end of file in attribute value (").',
                "eof-in-attribute-value-single-quote": "Unexpected end of file in attribute value (').",
                "eof-in-attribute-value-no-quotes": "Unexpected end of file in attribute value.",
                "eof-after-attribute-value": "Unexpected end of file after attribute value.",
                "unexpected-eof-after-solidus-in-tag": "Unexpected end of file in tag. Expected >.",
                "unexpected-character-after-solidus-in-tag": "Unexpected character after / in tag. Expected >.",
                "expected-dashes-or-doctype": "Expected '--' or 'DOCTYPE'. Not found.",
                "unexpected-bang-after-double-dash-in-comment": "Unexpected ! after -- in comment.",
                "incorrect-comment": "Incorrect comment.",
                "eof-in-comment": "Unexpected end of file in comment.",
                "eof-in-comment-end-dash": "Unexpected end of file in comment (-).",
                "unexpected-dash-after-double-dash-in-comment": "Unexpected '-' after '--' found in comment.",
                "eof-in-comment-double-dash": "Unexpected end of file in comment (--).",
                "eof-in-comment-end-bang-state": "Unexpected end of file in comment.",
                "unexpected-char-in-comment": "Unexpected character in comment found.",
                "need-space-after-doctype": "No space after literal string 'DOCTYPE'.",
                "expected-doctype-name-but-got-right-bracket": "Unexpected > character. Expected DOCTYPE name.",
                "expected-doctype-name-but-got-eof": "Unexpected end of file. Expected DOCTYPE name.",
                "eof-in-doctype-name": "Unexpected end of file in DOCTYPE name.",
                "eof-in-doctype": "Unexpected end of file in DOCTYPE.",
                "expected-space-or-right-bracket-in-doctype": "Expected space or '>'. Got '{data}'.",
                "unexpected-end-of-doctype": "Unexpected end of DOCTYPE.",
                "unexpected-char-in-doctype": "Unexpected character in DOCTYPE.",
                "eof-in-bogus-doctype": "Unexpected end of file in bogus doctype.",
                "eof-in-innerhtml": "Unexpected EOF in inner html mode.",
                "unexpected-doctype": "Unexpected DOCTYPE. Ignored.",
                "non-html-root": "html needs to be the first start tag.",
                "expected-doctype-but-got-eof": "Unexpected End of file. Expected DOCTYPE.",
                "unknown-doctype": "Erroneous DOCTYPE. Expected <!DOCTYPE html>.",
                "quirky-doctype": "Quirky doctype. Expected <!DOCTYPE html>.",
                "almost-standards-doctype": "Almost standards mode doctype. Expected <!DOCTYPE html>.",
                "obsolete-doctype": "Obsolete doctype. Expected <!DOCTYPE html>.",
                "expected-doctype-but-got-chars": "Non-space characters found without seeing a doctype first. Expected e.g. <!DOCTYPE html>.",
                "expected-doctype-but-got-start-tag": "Start tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>.",
                "expected-doctype-but-got-end-tag": "End tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>.",
                "end-tag-after-implied-root": "Unexpected end tag ({name}) after the (implied) root element.",
                "expected-named-closing-tag-but-got-eof": "Unexpected end of file. Expected end tag ({name}).",
                "two-heads-are-not-better-than-one": "Unexpected start tag head in existing head. Ignored.",
                "unexpected-end-tag": "Unexpected end tag ({name}). Ignored.",
                "unexpected-implied-end-tag": "End tag {name} implied, but there were open elements.",
                "unexpected-start-tag-out-of-my-head": "Unexpected start tag ({name}) that can be in head. Moved.",
                "unexpected-start-tag": "Unexpected start tag ({name}).",
                "missing-end-tag": "Missing end tag ({name}).",
                "missing-end-tags": "Missing end tags ({name}).",
                "unexpected-start-tag-implies-end-tag": "Unexpected start tag ({startName}) implies end tag ({endName}).",
                "unexpected-start-tag-treated-as": "Unexpected start tag ({originalName}). Treated as {newName}.",
                "deprecated-tag": "Unexpected start tag {name}. Don't use it!",
                "unexpected-start-tag-ignored": "Unexpected start tag {name}. Ignored.",
                "expected-one-end-tag-but-got-another": "Unexpected end tag ({gotName}). Missing end tag ({expectedName}).",
                "end-tag-too-early": "End tag ({name}) seen too early. Expected other end tag.",
                "end-tag-too-early-named": "Unexpected end tag ({gotName}). Expected end tag ({expectedName}.",
                "end-tag-too-early-ignored": "End tag ({name}) seen too early. Ignored.",
                "adoption-agency-1.1": "End tag ({name}) violates step 1, paragraph 1 of the adoption agency algorithm.",
                "adoption-agency-1.2": "End tag ({name}) violates step 1, paragraph 2 of the adoption agency algorithm.",
                "adoption-agency-1.3": "End tag ({name}) violates step 1, paragraph 3 of the adoption agency algorithm.",
                "adoption-agency-4.4": "End tag ({name}) violates step 4, paragraph 4 of the adoption agency algorithm.",
                "unexpected-end-tag-treated-as": "Unexpected end tag ({originalName}). Treated as {newName}.",
                "no-end-tag": "This element ({name}) has no end tag.",
                "unexpected-implied-end-tag-in-table": "Unexpected implied end tag ({name}) in the table phase.",
                "unexpected-implied-end-tag-in-table-body": "Unexpected implied end tag ({name}) in the table body phase.",
                "unexpected-char-implies-table-voodoo": "Unexpected non-space characters in table context caused voodoo mode.",
                "unexpected-hidden-input-in-table": "Unexpected input with type hidden in table context.",
                "unexpected-form-in-table": "Unexpected form in table context.",
                "unexpected-start-tag-implies-table-voodoo": "Unexpected start tag ({name}) in table context caused voodoo mode.",
                "unexpected-end-tag-implies-table-voodoo": "Unexpected end tag ({name}) in table context caused voodoo mode.",
                "unexpected-cell-in-table-body": "Unexpected table cell start tag ({name}) in the table body phase.",
                "unexpected-cell-end-tag": "Got table cell end tag ({name}) while required end tags are missing.",
                "unexpected-end-tag-in-table-body": "Unexpected end tag ({name}) in the table body phase. Ignored.",
                "unexpected-implied-end-tag-in-table-row": "Unexpected implied end tag ({name}) in the table row phase.",
                "unexpected-end-tag-in-table-row": "Unexpected end tag ({name}) in the table row phase. Ignored.",
                "unexpected-select-in-select": "Unexpected select start tag in the select phase treated as select end tag.",
                "unexpected-input-in-select": "Unexpected input start tag in the select phase.",
                "unexpected-start-tag-in-select": "Unexpected start tag token ({name}) in the select phase. Ignored.",
                "unexpected-end-tag-in-select": "Unexpected end tag ({name}) in the select phase. Ignored.",
                "unexpected-table-element-start-tag-in-select-in-table": "Unexpected table element start tag ({name}) in the select in table phase.",
                "unexpected-table-element-end-tag-in-select-in-table": "Unexpected table element end tag ({name}) in the select in table phase.",
                "unexpected-char-after-body": "Unexpected non-space characters in the after body phase.",
                "unexpected-start-tag-after-body": "Unexpected start tag token ({name}) in the after body phase.",
                "unexpected-end-tag-after-body": "Unexpected end tag token ({name}) in the after body phase.",
                "unexpected-char-in-frameset": "Unepxected characters in the frameset phase. Characters ignored.",
                "unexpected-start-tag-in-frameset": "Unexpected start tag token ({name}) in the frameset phase. Ignored.",
                "unexpected-frameset-in-frameset-innerhtml": "Unexpected end tag token (frameset in the frameset phase (innerHTML).",
                "unexpected-end-tag-in-frameset": "Unexpected end tag token ({name}) in the frameset phase. Ignored.",
                "unexpected-char-after-frameset": "Unexpected non-space characters in the after frameset phase. Ignored.",
                "unexpected-start-tag-after-frameset": "Unexpected start tag ({name}) in the after frameset phase. Ignored.",
                "unexpected-end-tag-after-frameset": "Unexpected end tag ({name}) in the after frameset phase. Ignored.",
                "expected-eof-but-got-char": "Unexpected non-space characters. Expected end of file.",
                "expected-eof-but-got-start-tag": "Unexpected start tag ({name}). Expected end of file.",
                "expected-eof-but-got-end-tag": "Unexpected end tag ({name}). Expected end of file.",
                "unexpected-end-table-in-caption": "Unexpected end table tag in caption. Generates implied end caption.",
                "end-html-in-innerhtml": "Unexpected html end tag in inner html mode.",
                "eof-in-table": "Unexpected end of file. Expected table content.",
                "eof-in-script": "Unexpected end of file. Expected script content.",
                "non-void-element-with-trailing-solidus": "Trailing solidus not allowed on element {name}.",
                "unexpected-html-element-in-foreign-content": 'HTML start tag "{name}" in a foreign namespace context.',
                "unexpected-start-tag-in-table": "Unexpected {name}. Expected table content."
            }
        }
        , {}],
        9: [function(e, t, n) {
            function o() {
                this.contentHandler = null,
                this._errorHandler = null,
                this._treeBuilder = new r,
                this._tokenizer = new i(this._treeBuilder),
                this._scriptingEnabled = !1
            }
            var r = e("./SAXTreeBuilder").SAXTreeBuilder
              , i = e("../Tokenizer").Tokenizer
              , s = e("./TreeParser").TreeParser;
            o.prototype.parse = function(e) {
                this._tokenizer.tokenize(e);
                var t = this._treeBuilder.document;
                t && (new s(this.contentHandler)).parse(t)
            }
            ,
            o.prototype.parseFragment = function(e, t) {
                this._treeBuilder.setFragmentContext(t),
                this._tokenizer.tokenize(e);
                var n = this._treeBuilder.getFragment();
                n && (new s(this.contentHandler)).parse(n)
            }
            ,
            Object.defineProperty(o.prototype, "scriptingEnabled", {
                get: function() {
                    return this._scriptingEnabled
                },
                set: function(e) {
                    this._scriptingEnabled = e,
                    this._treeBuilder.scriptingEnabled = e
                }
            }),
            Object.defineProperty(o.prototype, "errorHandler", {
                get: function() {
                    return this._errorHandler
                },
                set: function(e) {
                    this._errorHandler = e,
                    this._treeBuilder.errorHandler = e
                }
            }),
            n.SAXParser = o
        }
        , {
            "../Tokenizer": 5,
            "./SAXTreeBuilder": 10,
            "./TreeParser": 11
        }],
        10: [function(e, t, n) {
            function s() {
                i.call(this)
            }
            function o(e, t) {
                for (var n = 0; n < e.attributes.length; n++) {
                    var r = e.attributes[n];
                    if (r.nodeName === t)
                        return r.nodeValue
                }
            }
            function a(e) {
                e ? (this.columnNumber = e.columnNumber,
                this.lineNumber = e.lineNumber) : (this.columnNumber = -1,
                this.lineNumber = -1),
                this.parentNode = null,
                this.nextSibling = null,
                this.firstChild = null
            }
            function f(e) {
                a.call(this, e),
                this.lastChild = null,
                this._endLocator = null
            }
            function l(e) {
                f.call(this, e),
                this.nodeType = u.DOCUMENT
            }
            function c() {
                f.call(this, new Locator),
                this.nodeType = u.DOCUMENT_FRAGMENT
            }
            function h(e, t, n, r, i, s) {
                f.call(this, e),
                this.uri = t,
                this.localName = n,
                this.qName = r,
                this.attributes = i,
                this.prefixMappings = s,
                this.nodeType = u.ELEMENT
            }
            function p(e, t) {
                a.call(this, e),
                this.data = t,
                this.nodeType = u.CHARACTERS
            }
            function d(e, t) {
                a.call(this, e),
                this.data = t,
                this.nodeType = u.IGNORABLE_WHITESPACE
            }
            function v(e, t) {
                a.call(this, e),
                this.data = t,
                this.nodeType = u.COMMENT
            }
            function m(e) {
                f.call(this, e),
                this.nodeType = u.CDATA
            }
            function g(e) {
                f.call(this),
                this.name = e,
                this.nodeType = u.ENTITY
            }
            function y(e) {
                a.call(this),
                this.name = e,
                this.nodeType = u.SKIPPED_ENTITY
            }
            function b(e, t) {
                a.call(this),
                this.target = e,
                this.data = t
            }
            function w(e, t, n) {
                f.call(this),
                this.name = e,
                this.publicIdentifier = t,
                this.systemIdentifier = n,
                this.nodeType = u.DTD
            }
            var r = e("util")
              , i = e("../TreeBuilder").TreeBuilder;
            r.inherits(s, i),
            s.prototype.start = function(e) {
                this.document = new l(this.tokenizer)
            }
            ,
            s.prototype.end = function() {
                this.document.endLocator = this.tokenizer
            }
            ,
            s.prototype.insertDoctype = function(e, t, n) {
                var r = new w(this.tokenizer,e,t,n);
                r.endLocator = this.tokenizer,
                this.document.appendChild(r)
            }
            ,
            s.prototype.createElement = function(e, t, n) {
                var r = new h(this.tokenizer,e,t,t,n || []);
                return r
            }
            ,
            s.prototype.insertComment = function(e, t) {
                t || (t = this.currentStackItem());
                var n = new v(this.tokenizer,e);
                t.appendChild(n)
            }
            ,
            s.prototype.appendCharacters = function(e, t) {
                var n = new p(this.tokenizer,t);
                e.appendChild(n)
            }
            ,
            s.prototype.insertText = function(e) {
                if (this.redirectAttachToFosterParent && this.openElements.top.isFosterParenting()) {
                    var t = this.openElements.findIndex("table")
                      , n = this.openElements.item(t)
                      , r = n.node;
                    if (t === 0)
                        return this.appendCharacters(r, e);
                    var i = new p(this.tokenizer,e)
                      , s = r.parentNode;
                    if (s) {
                        s.insertBetween(i, r.previousSibling, r);
                        return
                    }
                    var o = this.openElements.item(t - 1).node;
                    o.appendChild(i);
                    return
                }
                this.appendCharacters(this.currentStackItem().node, e)
            }
            ,
            s.prototype.attachNode = function(e, t) {
                t.appendChild(e)
            }
            ,
            s.prototype.attachNodeToFosterParent = function(e, t, n) {
                var r = t.parentNode;
                r ? r.insertBetween(e, t.previousSibling, t) : n.appendChild(e)
            }
            ,
            s.prototype.detachFromParent = function(e) {
                e.detach()
            }
            ,
            s.prototype.reparentChildren = function(e, t) {
                t.appendChildren(e.firstChild)
            }
            ,
            s.prototype.getFragment = function() {
                var e = new c;
                return this.reparentChildren(this.openElements.rootNode, e),
                e
            }
            ,
            s.prototype.addAttributesToElement = function(e, t) {
                for (var n = 0; n < t.length; n++) {
                    var r = t[n];
                    o(e, r.nodeName) || e.attributes.push(r)
                }
            }
            ;
            var u = {
                CDATA: 1,
                CHARACTERS: 2,
                COMMENT: 3,
                DOCUMENT: 4,
                DOCUMENT_FRAGMENT: 5,
                DTD: 6,
                ELEMENT: 7,
                ENTITY: 8,
                IGNORABLE_WHITESPACE: 9,
                PROCESSING_INSTRUCTION: 10,
                SKIPPED_ENTITY: 11
            };
            a.prototype.visit = function(e) {
                throw new Error("Not Implemented")
            }
            ,
            a.prototype.revisit = function(e) {
                return
            }
            ,
            a.prototype.detach = function() {
                this.parentNode !== null && (this.parentNode.removeChild(this),
                this.parentNode = null)
            }
            ,
            Object.defineProperty(a.prototype, "previousSibling", {
                get: function() {
                    var e = null
                      , t = this.parentNode.firstChild;
                    for (; ; ) {
                        if (this == t)
                            return e;
                        e = t,
                        t = t.nextSibling
                    }
                }
            }),
            f.prototype = Object.create(a.prototype),
            f.prototype.insertBefore = function(e, t) {
                if (!t)
                    return this.appendChild(e);
                e.detach(),
                e.parentNode = this;
                if (this.firstChild == t)
                    e.nextSibling = t,
                    this.firstChild = e;
                else {
                    var n = this.firstChild
                      , r = this.firstChild.nextSibling;
                    while (r != t)
                        n = r,
                        r = r.nextSibling;
                    n.nextSibling = e,
                    e.nextSibling = r
                }
                return e
            }
            ,
            f.prototype.insertBetween = function(e, t, n) {
                return n ? (e.detach(),
                e.parentNode = this,
                e.nextSibling = n,
                t ? t.nextSibling = e : firstChild = e,
                e) : this.appendChild(e)
            }
            ,
            f.prototype.appendChild = function(e) {
                return e.detach(),
                e.parentNode = this,
                this.firstChild ? this.lastChild.nextSibling = e : this.firstChild = e,
                this.lastChild = e,
                e
            }
            ,
            f.prototype.appendChildren = function(e) {
                var t = e.firstChild;
                if (!t)
                    return;
                var n = e;
                this.firstChild ? this.lastChild.nextSibling = t : this.firstChild = t,
                this.lastChild = n.lastChild;
                do
                    t.parentNode = this;
                while (t = t.nextSibling);
                n.firstChild = null,
                n.lastChild = null
            }
            ,
            f.prototype.removeChild = function(e) {
                if (this.firstChild == e)
                    this.firstChild = e.nextSibling,
                    this.lastChild == e && (this.lastChild = null);
                else {
                    var t = this.firstChild
                      , n = this.firstChild.nextSibling;
                    while (n != e)
                        t = n,
                        n = n.nextSibling;
                    t.nextSibling = e.nextSibling,
                    this.lastChild == e && (this.lastChild = t)
                }
                return e.parentNode = null,
                e
            }
            ,
            Object.defineProperty(f.prototype, "endLocator", {
                get: function() {
                    return this._endLocator
                },
                set: function(e) {
                    this._endLocator = {
                        lineNumber: e.lineNumber,
                        columnNumber: e.columnNumber
                    }
                }
            }),
            l.prototype = Object.create(f.prototype),
            l.prototype.visit = function(e) {
                e.startDocument(this)
            }
            ,
            l.prototype.revisit = function(e) {
                e.endDocument(this.endLocator)
            }
            ,
            c.prototype = Object.create(f.prototype),
            c.prototype.visit = function(e) {}
            ,
            h.prototype = Object.create(f.prototype),
            h.prototype.visit = function(e) {
                if (this.prefixMappings)
                    for (var t in prefixMappings) {
                        var n = prefixMappings[t];
                        e.startPrefixMapping(n.getPrefix(), n.getUri(), this)
                    }
                e.startElement(this.uri, this.localName, this.qName, this.attributes, this)
            }
            ,
            h.prototype.revisit = function(e) {
                e.endElement(this.uri, this.localName, this.qName, this.endLocator);
                if (this.prefixMappings)
                    for (var t in prefixMappings) {
                        var n = prefixMappings[t];
                        e.endPrefixMapping(n.getPrefix(), this.endLocator)
                    }
            }
            ,
            p.prototype = Object.create(a.prototype),
            p.prototype.visit = function(e) {
                e.characters(this.data, 0, this.data.length, this)
            }
            ,
            d.prototype = Object.create(a.prototype),
            d.prototype.visit = function(e) {
                e.ignorableWhitespace(this.data, 0, this.data.length, this)
            }
            ,
            v.prototype = Object.create(a.prototype),
            v.prototype.visit = function(e) {
                e.comment(this.data, 0, this.data.length, this)
            }
            ,
            m.prototype = Object.create(f.prototype),
            m.prototype.visit = function(e) {
                e.startCDATA(this)
            }
            ,
            m.prototype.revisit = function(e) {
                e.endCDATA(this.endLocator)
            }
            ,
            g.prototype = Object.create(f.prototype),
            g.prototype.visit = function(e) {
                e.startEntity(this.name, this)
            }
            ,
            g.prototype.revisit = function(e) {
                e.endEntity(this.name)
            }
            ,
            y.prototype = Object.create(a.prototype),
            y.prototype.visit = function(e) {
                e.skippedEntity(this.name, this)
            }
            ,
            b.prototype = Object.create(a.prototype),
            b.prototype.visit = function(e) {
                e.processingInstruction(this.target, this.data, this)
            }
            ,
            b.prototype.getNodeType = function() {
                return u.PROCESSING_INSTRUCTION
            }
            ,
            w.prototype = Object.create(f.prototype),
            w.prototype.visit = function(e) {
                e.startDTD(this.name, this.publicIdentifier, this.systemIdentifier, this)
            }
            ,
            w.prototype.revisit = function(e) {
                e.endDTD()
            }
            ,
            n.SAXTreeBuilder = s
        }
        , {
            "../TreeBuilder": 6,
            util: 20
        }],
        11: [function(e, t, n) {
            function r(e, t) {
                this.contentHandler,
                this.lexicalHandler,
                this.locatorDelegate;
                if (!e)
                    throw new IllegalArgumentException("contentHandler was null.");
                this.contentHandler = e,
                t ? this.lexicalHandler = t : this.lexicalHandler = new i
            }
            function i() {}
            r.prototype.parse = function(e) {
                this.contentHandler.documentLocator = this;
                var t = e, n;
                for (; ; ) {
                    t.visit(this);
                    if (n = t.firstChild) {
                        t = n;
                        continue
                    }
                    for (; ; ) {
                        t.revisit(this);
                        if (t == e)
                            return;
                        if (n = t.nextSibling) {
                            t = n;
                            break
                        }
                        t = t.parentNode
                    }
                }
            }
            ,
            r.prototype.characters = function(e, t, n, r) {
                this.locatorDelegate = r,
                this.contentHandler.characters(e, t, n)
            }
            ,
            r.prototype.endDocument = function(e) {
                this.locatorDelegate = e,
                this.contentHandler.endDocument()
            }
            ,
            r.prototype.endElement = function(e, t, n, r) {
                this.locatorDelegate = r,
                this.contentHandler.endElement(e, t, n)
            }
            ,
            r.prototype.endPrefixMapping = function(e, t) {
                this.locatorDelegate = t,
                this.contentHandler.endPrefixMapping(e)
            }
            ,
            r.prototype.ignorableWhitespace = function(e, t, n, r) {
                this.locatorDelegate = r,
                this.contentHandler.ignorableWhitespace(e, t, n)
            }
            ,
            r.prototype.processingInstruction = function(e, t, n) {
                this.locatorDelegate = n,
                this.contentHandler.processingInstruction(e, t)
            }
            ,
            r.prototype.skippedEntity = function(e, t) {
                this.locatorDelegate = t,
                this.contentHandler.skippedEntity(e)
            }
            ,
            r.prototype.startDocument = function(e) {
                this.locatorDelegate = e,
                this.contentHandler.startDocument()
            }
            ,
            r.prototype.startElement = function(e, t, n, r, i) {
                this.locatorDelegate = i,
                this.contentHandler.startElement(e, t, n, r)
            }
            ,
            r.prototype.startPrefixMapping = function(e, t, n) {
                this.locatorDelegate = n,
                this.contentHandler.startPrefixMapping(e, t)
            }
            ,
            r.prototype.comment = function(e, t, n, r) {
                this.locatorDelegate = r,
                this.lexicalHandler.comment(e, t, n)
            }
            ,
            r.prototype.endCDATA = function(e) {
                this.locatorDelegate = e,
                this.lexicalHandler.endCDATA()
            }
            ,
            r.prototype.endDTD = function(e) {
                this.locatorDelegate = e,
                this.lexicalHandler.endDTD()
            }
            ,
            r.prototype.endEntity = function(e, t) {
                this.locatorDelegate = t,
                this.lexicalHandler.endEntity(e)
            }
            ,
            r.prototype.startCDATA = function(e) {
                this.locatorDelegate = e,
                this.lexicalHandler.startCDATA()
            }
            ,
            r.prototype.startDTD = function(e, t, n, r) {
                this.locatorDelegate = r,
                this.lexicalHandler.startDTD(e, t, n)
            }
            ,
            r.prototype.startEntity = function(e, t) {
                this.locatorDelegate = t,
                this.lexicalHandler.startEntity(e)
            }
            ,
            Object.defineProperty(r.prototype, "columnNumber", {
                get: function() {
                    return this.locatorDelegate ? this.locatorDelegate.columnNumber : -1
                }
            }),
            Object.defineProperty(r.prototype, "lineNumber", {
                get: function() {
                    return this.locatorDelegate ? this.locatorDelegate.lineNumber : -1
                }
            }),
            i.prototype.comment = function() {}
            ,
            i.prototype.endCDATA = function() {}
            ,
            i.prototype.endDTD = function() {}
            ,
            i.prototype.endEntity = function() {}
            ,
            i.prototype.startCDATA = function() {}
            ,
            i.prototype.startDTD = function() {}
            ,
            i.prototype.startEntity = function() {}
            ,
            n.TreeParser = r
        }
        , {}],
        12: [function(e, t, n) {
            t.exports = {
                "Aacute;": "\u00c1",
                Aacute: "\u00c1",
                "aacute;": "\u00e1",
                aacute: "\u00e1",
                "Abreve;": "\u0102",
                "abreve;": "\u0103",
                "ac;": "\u223e",
                "acd;": "\u223f",
                "acE;": "\u223e\u0333",
                "Acirc;": "\u00c2",
                Acirc: "\u00c2",
                "acirc;": "\u00e2",
                acirc: "\u00e2",
                "acute;": "\u00b4",
                acute: "\u00b4",
                "Acy;": "\u0410",
                "acy;": "\u0430",
                "AElig;": "\u00c6",
                AElig: "\u00c6",
                "aelig;": "\u00e6",
                aelig: "\u00e6",
                "af;": "\u2061",
                "Afr;": "\ud835\udd04",
                "afr;": "\ud835\udd1e",
                "Agrave;": "\u00c0",
                Agrave: "\u00c0",
                "agrave;": "\u00e0",
                agrave: "\u00e0",
                "alefsym;": "\u2135",
                "aleph;": "\u2135",
                "Alpha;": "\u0391",
                "alpha;": "\u03b1",
                "Amacr;": "\u0100",
                "amacr;": "\u0101",
                "amalg;": "\u2a3f",
                "amp;": "&",
                amp: "&",
                "AMP;": "&",
                AMP: "&",
                "andand;": "\u2a55",
                "And;": "\u2a53",
                "and;": "\u2227",
                "andd;": "\u2a5c",
                "andslope;": "\u2a58",
                "andv;": "\u2a5a",
                "ang;": "\u2220",
                "ange;": "\u29a4",
                "angle;": "\u2220",
                "angmsdaa;": "\u29a8",
                "angmsdab;": "\u29a9",
                "angmsdac;": "\u29aa",
                "angmsdad;": "\u29ab",
                "angmsdae;": "\u29ac",
                "angmsdaf;": "\u29ad",
                "angmsdag;": "\u29ae",
                "angmsdah;": "\u29af",
                "angmsd;": "\u2221",
                "angrt;": "\u221f",
                "angrtvb;": "\u22be",
                "angrtvbd;": "\u299d",
                "angsph;": "\u2222",
                "angst;": "\u00c5",
                "angzarr;": "\u237c",
                "Aogon;": "\u0104",
                "aogon;": "\u0105",
                "Aopf;": "\ud835\udd38",
                "aopf;": "\ud835\udd52",
                "apacir;": "\u2a6f",
                "ap;": "\u2248",
                "apE;": "\u2a70",
                "ape;": "\u224a",
                "apid;": "\u224b",
                "apos;": "'",
                "ApplyFunction;": "\u2061",
                "approx;": "\u2248",
                "approxeq;": "\u224a",
                "Aring;": "\u00c5",
                Aring: "\u00c5",
                "aring;": "\u00e5",
                aring: "\u00e5",
                "Ascr;": "\ud835\udc9c",
                "ascr;": "\ud835\udcb6",
                "Assign;": "\u2254",
                "ast;": "*",
                "asymp;": "\u2248",
                "asympeq;": "\u224d",
                "Atilde;": "\u00c3",
                Atilde: "\u00c3",
                "atilde;": "\u00e3",
                atilde: "\u00e3",
                "Auml;": "\u00c4",
                Auml: "\u00c4",
                "auml;": "\u00e4",
                auml: "\u00e4",
                "awconint;": "\u2233",
                "awint;": "\u2a11",
                "backcong;": "\u224c",
                "backepsilon;": "\u03f6",
                "backprime;": "\u2035",
                "backsim;": "\u223d",
                "backsimeq;": "\u22cd",
                "Backslash;": "\u2216",
                "Barv;": "\u2ae7",
                "barvee;": "\u22bd",
                "barwed;": "\u2305",
                "Barwed;": "\u2306",
                "barwedge;": "\u2305",
                "bbrk;": "\u23b5",
                "bbrktbrk;": "\u23b6",
                "bcong;": "\u224c",
                "Bcy;": "\u0411",
                "bcy;": "\u0431",
                "bdquo;": "\u201e",
                "becaus;": "\u2235",
                "because;": "\u2235",
                "Because;": "\u2235",
                "bemptyv;": "\u29b0",
                "bepsi;": "\u03f6",
                "bernou;": "\u212c",
                "Bernoullis;": "\u212c",
                "Beta;": "\u0392",
                "beta;": "\u03b2",
                "beth;": "\u2136",
                "between;": "\u226c",
                "Bfr;": "\ud835\udd05",
                "bfr;": "\ud835\udd1f",
                "bigcap;": "\u22c2",
                "bigcirc;": "\u25ef",
                "bigcup;": "\u22c3",
                "bigodot;": "\u2a00",
                "bigoplus;": "\u2a01",
                "bigotimes;": "\u2a02",
                "bigsqcup;": "\u2a06",
                "bigstar;": "\u2605",
                "bigtriangledown;": "\u25bd",
                "bigtriangleup;": "\u25b3",
                "biguplus;": "\u2a04",
                "bigvee;": "\u22c1",
                "bigwedge;": "\u22c0",
                "bkarow;": "\u290d",
                "blacklozenge;": "\u29eb",
                "blacksquare;": "\u25aa",
                "blacktriangle;": "\u25b4",
                "blacktriangledown;": "\u25be",
                "blacktriangleleft;": "\u25c2",
                "blacktriangleright;": "\u25b8",
                "blank;": "\u2423",
                "blk12;": "\u2592",
                "blk14;": "\u2591",
                "blk34;": "\u2593",
                "block;": "\u2588",
                "bne;": "=\u20e5",
                "bnequiv;": "\u2261\u20e5",
                "bNot;": "\u2aed",
                "bnot;": "\u2310",
                "Bopf;": "\ud835\udd39",
                "bopf;": "\ud835\udd53",
                "bot;": "\u22a5",
                "bottom;": "\u22a5",
                "bowtie;": "\u22c8",
                "boxbox;": "\u29c9",
                "boxdl;": "\u2510",
                "boxdL;": "\u2555",
                "boxDl;": "\u2556",
                "boxDL;": "\u2557",
                "boxdr;": "\u250c",
                "boxdR;": "\u2552",
                "boxDr;": "\u2553",
                "boxDR;": "\u2554",
                "boxh;": "\u2500",
                "boxH;": "\u2550",
                "boxhd;": "\u252c",
                "boxHd;": "\u2564",
                "boxhD;": "\u2565",
                "boxHD;": "\u2566",
                "boxhu;": "\u2534",
                "boxHu;": "\u2567",
                "boxhU;": "\u2568",
                "boxHU;": "\u2569",
                "boxminus;": "\u229f",
                "boxplus;": "\u229e",
                "boxtimes;": "\u22a0",
                "boxul;": "\u2518",
                "boxuL;": "\u255b",
                "boxUl;": "\u255c",
                "boxUL;": "\u255d",
                "boxur;": "\u2514",
                "boxuR;": "\u2558",
                "boxUr;": "\u2559",
                "boxUR;": "\u255a",
                "boxv;": "\u2502",
                "boxV;": "\u2551",
                "boxvh;": "\u253c",
                "boxvH;": "\u256a",
                "boxVh;": "\u256b",
                "boxVH;": "\u256c",
                "boxvl;": "\u2524",
                "boxvL;": "\u2561",
                "boxVl;": "\u2562",
                "boxVL;": "\u2563",
                "boxvr;": "\u251c",
                "boxvR;": "\u255e",
                "boxVr;": "\u255f",
                "boxVR;": "\u2560",
                "bprime;": "\u2035",
                "breve;": "\u02d8",
                "Breve;": "\u02d8",
                "brvbar;": "\u00a6",
                brvbar: "\u00a6",
                "bscr;": "\ud835\udcb7",
                "Bscr;": "\u212c",
                "bsemi;": "\u204f",
                "bsim;": "\u223d",
                "bsime;": "\u22cd",
                "bsolb;": "\u29c5",
                "bsol;": "\\",
                "bsolhsub;": "\u27c8",
                "bull;": "\u2022",
                "bullet;": "\u2022",
                "bump;": "\u224e",
                "bumpE;": "\u2aae",
                "bumpe;": "\u224f",
                "Bumpeq;": "\u224e",
                "bumpeq;": "\u224f",
                "Cacute;": "\u0106",
                "cacute;": "\u0107",
                "capand;": "\u2a44",
                "capbrcup;": "\u2a49",
                "capcap;": "\u2a4b",
                "cap;": "\u2229",
                "Cap;": "\u22d2",
                "capcup;": "\u2a47",
                "capdot;": "\u2a40",
                "CapitalDifferentialD;": "\u2145",
                "caps;": "\u2229\ufe00",
                "caret;": "\u2041",
                "caron;": "\u02c7",
                "Cayleys;": "\u212d",
                "ccaps;": "\u2a4d",
                "Ccaron;": "\u010c",
                "ccaron;": "\u010d",
                "Ccedil;": "\u00c7",
                Ccedil: "\u00c7",
                "ccedil;": "\u00e7",
                ccedil: "\u00e7",
                "Ccirc;": "\u0108",
                "ccirc;": "\u0109",
                "Cconint;": "\u2230",
                "ccups;": "\u2a4c",
                "ccupssm;": "\u2a50",
                "Cdot;": "\u010a",
                "cdot;": "\u010b",
                "cedil;": "\u00b8",
                cedil: "\u00b8",
                "Cedilla;": "\u00b8",
                "cemptyv;": "\u29b2",
                "cent;": "\u00a2",
                cent: "\u00a2",
                "centerdot;": "\u00b7",
                "CenterDot;": "\u00b7",
                "cfr;": "\ud835\udd20",
                "Cfr;": "\u212d",
                "CHcy;": "\u0427",
                "chcy;": "\u0447",
                "check;": "\u2713",
                "checkmark;": "\u2713",
                "Chi;": "\u03a7",
                "chi;": "\u03c7",
                "circ;": "\u02c6",
                "circeq;": "\u2257",
                "circlearrowleft;": "\u21ba",
                "circlearrowright;": "\u21bb",
                "circledast;": "\u229b",
                "circledcirc;": "\u229a",
                "circleddash;": "\u229d",
                "CircleDot;": "\u2299",
                "circledR;": "\u00ae",
                "circledS;": "\u24c8",
                "CircleMinus;": "\u2296",
                "CirclePlus;": "\u2295",
                "CircleTimes;": "\u2297",
                "cir;": "\u25cb",
                "cirE;": "\u29c3",
                "cire;": "\u2257",
                "cirfnint;": "\u2a10",
                "cirmid;": "\u2aef",
                "cirscir;": "\u29c2",
                "ClockwiseContourIntegral;": "\u2232",
                "CloseCurlyDoubleQuote;": "\u201d",
                "CloseCurlyQuote;": "\u2019",
                "clubs;": "\u2663",
                "clubsuit;": "\u2663",
                "colon;": ":",
                "Colon;": "\u2237",
                "Colone;": "\u2a74",
                "colone;": "\u2254",
                "coloneq;": "\u2254",
                "comma;": ",",
                "commat;": "@",
                "comp;": "\u2201",
                "compfn;": "\u2218",
                "complement;": "\u2201",
                "complexes;": "\u2102",
                "cong;": "\u2245",
                "congdot;": "\u2a6d",
                "Congruent;": "\u2261",
                "conint;": "\u222e",
                "Conint;": "\u222f",
                "ContourIntegral;": "\u222e",
                "copf;": "\ud835\udd54",
                "Copf;": "\u2102",
                "coprod;": "\u2210",
                "Coproduct;": "\u2210",
                "copy;": "\u00a9",
                copy: "\u00a9",
                "COPY;": "\u00a9",
                COPY: "\u00a9",
                "copysr;": "\u2117",
                "CounterClockwiseContourIntegral;": "\u2233",
                "crarr;": "\u21b5",
                "cross;": "\u2717",
                "Cross;": "\u2a2f",
                "Cscr;": "\ud835\udc9e",
                "cscr;": "\ud835\udcb8",
                "csub;": "\u2acf",
                "csube;": "\u2ad1",
                "csup;": "\u2ad0",
                "csupe;": "\u2ad2",
                "ctdot;": "\u22ef",
                "cudarrl;": "\u2938",
                "cudarrr;": "\u2935",
                "cuepr;": "\u22de",
                "cuesc;": "\u22df",
                "cularr;": "\u21b6",
                "cularrp;": "\u293d",
                "cupbrcap;": "\u2a48",
                "cupcap;": "\u2a46",
                "CupCap;": "\u224d",
                "cup;": "\u222a",
                "Cup;": "\u22d3",
                "cupcup;": "\u2a4a",
                "cupdot;": "\u228d",
                "cupor;": "\u2a45",
                "cups;": "\u222a\ufe00",
                "curarr;": "\u21b7",
                "curarrm;": "\u293c",
                "curlyeqprec;": "\u22de",
                "curlyeqsucc;": "\u22df",
                "curlyvee;": "\u22ce",
                "curlywedge;": "\u22cf",
                "curren;": "\u00a4",
                curren: "\u00a4",
                "curvearrowleft;": "\u21b6",
                "curvearrowright;": "\u21b7",
                "cuvee;": "\u22ce",
                "cuwed;": "\u22cf",
                "cwconint;": "\u2232",
                "cwint;": "\u2231",
                "cylcty;": "\u232d",
                "dagger;": "\u2020",
                "Dagger;": "\u2021",
                "daleth;": "\u2138",
                "darr;": "\u2193",
                "Darr;": "\u21a1",
                "dArr;": "\u21d3",
                "dash;": "\u2010",
                "Dashv;": "\u2ae4",
                "dashv;": "\u22a3",
                "dbkarow;": "\u290f",
                "dblac;": "\u02dd",
                "Dcaron;": "\u010e",
                "dcaron;": "\u010f",
                "Dcy;": "\u0414",
                "dcy;": "\u0434",
                "ddagger;": "\u2021",
                "ddarr;": "\u21ca",
                "DD;": "\u2145",
                "dd;": "\u2146",
                "DDotrahd;": "\u2911",
                "ddotseq;": "\u2a77",
                "deg;": "\u00b0",
                deg: "\u00b0",
                "Del;": "\u2207",
                "Delta;": "\u0394",
                "delta;": "\u03b4",
                "demptyv;": "\u29b1",
                "dfisht;": "\u297f",
                "Dfr;": "\ud835\udd07",
                "dfr;": "\ud835\udd21",
                "dHar;": "\u2965",
                "dharl;": "\u21c3",
                "dharr;": "\u21c2",
                "DiacriticalAcute;": "\u00b4",
                "DiacriticalDot;": "\u02d9",
                "DiacriticalDoubleAcute;": "\u02dd",
                "DiacriticalGrave;": "`",
                "DiacriticalTilde;": "\u02dc",
                "diam;": "\u22c4",
                "diamond;": "\u22c4",
                "Diamond;": "\u22c4",
                "diamondsuit;": "\u2666",
                "diams;": "\u2666",
                "die;": "\u00a8",
                "DifferentialD;": "\u2146",
                "digamma;": "\u03dd",
                "disin;": "\u22f2",
                "div;": "\u00f7",
                "divide;": "\u00f7",
                divide: "\u00f7",
                "divideontimes;": "\u22c7",
                "divonx;": "\u22c7",
                "DJcy;": "\u0402",
                "djcy;": "\u0452",
                "dlcorn;": "\u231e",
                "dlcrop;": "\u230d",
                "dollar;": "$",
                "Dopf;": "\ud835\udd3b",
                "dopf;": "\ud835\udd55",
                "Dot;": "\u00a8",
                "dot;": "\u02d9",
                "DotDot;": "\u20dc",
                "doteq;": "\u2250",
                "doteqdot;": "\u2251",
                "DotEqual;": "\u2250",
                "dotminus;": "\u2238",
                "dotplus;": "\u2214",
                "dotsquare;": "\u22a1",
                "doublebarwedge;": "\u2306",
                "DoubleContourIntegral;": "\u222f",
                "DoubleDot;": "\u00a8",
                "DoubleDownArrow;": "\u21d3",
                "DoubleLeftArrow;": "\u21d0",
                "DoubleLeftRightArrow;": "\u21d4",
                "DoubleLeftTee;": "\u2ae4",
                "DoubleLongLeftArrow;": "\u27f8",
                "DoubleLongLeftRightArrow;": "\u27fa",
                "DoubleLongRightArrow;": "\u27f9",
                "DoubleRightArrow;": "\u21d2",
                "DoubleRightTee;": "\u22a8",
                "DoubleUpArrow;": "\u21d1",
                "DoubleUpDownArrow;": "\u21d5",
                "DoubleVerticalBar;": "\u2225",
                "DownArrowBar;": "\u2913",
                "downarrow;": "\u2193",
                "DownArrow;": "\u2193",
                "Downarrow;": "\u21d3",
                "DownArrowUpArrow;": "\u21f5",
                "DownBreve;": "\u0311",
                "downdownarrows;": "\u21ca",
                "downharpoonleft;": "\u21c3",
                "downharpoonright;": "\u21c2",
                "DownLeftRightVector;": "\u2950",
                "DownLeftTeeVector;": "\u295e",
                "DownLeftVectorBar;": "\u2956",
                "DownLeftVector;": "\u21bd",
                "DownRightTeeVector;": "\u295f",
                "DownRightVectorBar;": "\u2957",
                "DownRightVector;": "\u21c1",
                "DownTeeArrow;": "\u21a7",
                "DownTee;": "\u22a4",
                "drbkarow;": "\u2910",
                "drcorn;": "\u231f",
                "drcrop;": "\u230c",
                "Dscr;": "\ud835\udc9f",
                "dscr;": "\ud835\udcb9",
                "DScy;": "\u0405",
                "dscy;": "\u0455",
                "dsol;": "\u29f6",
                "Dstrok;": "\u0110",
                "dstrok;": "\u0111",
                "dtdot;": "\u22f1",
                "dtri;": "\u25bf",
                "dtrif;": "\u25be",
                "duarr;": "\u21f5",
                "duhar;": "\u296f",
                "dwangle;": "\u29a6",
                "DZcy;": "\u040f",
                "dzcy;": "\u045f",
                "dzigrarr;": "\u27ff",
                "Eacute;": "\u00c9",
                Eacute: "\u00c9",
                "eacute;": "\u00e9",
                eacute: "\u00e9",
                "easter;": "\u2a6e",
                "Ecaron;": "\u011a",
                "ecaron;": "\u011b",
                "Ecirc;": "\u00ca",
                Ecirc: "\u00ca",
                "ecirc;": "\u00ea",
                ecirc: "\u00ea",
                "ecir;": "\u2256",
                "ecolon;": "\u2255",
                "Ecy;": "\u042d",
                "ecy;": "\u044d",
                "eDDot;": "\u2a77",
                "Edot;": "\u0116",
                "edot;": "\u0117",
                "eDot;": "\u2251",
                "ee;": "\u2147",
                "efDot;": "\u2252",
                "Efr;": "\ud835\udd08",
                "efr;": "\ud835\udd22",
                "eg;": "\u2a9a",
                "Egrave;": "\u00c8",
                Egrave: "\u00c8",
                "egrave;": "\u00e8",
                egrave: "\u00e8",
                "egs;": "\u2a96",
                "egsdot;": "\u2a98",
                "el;": "\u2a99",
                "Element;": "\u2208",
                "elinters;": "\u23e7",
                "ell;": "\u2113",
                "els;": "\u2a95",
                "elsdot;": "\u2a97",
                "Emacr;": "\u0112",
                "emacr;": "\u0113",
                "empty;": "\u2205",
                "emptyset;": "\u2205",
                "EmptySmallSquare;": "\u25fb",
                "emptyv;": "\u2205",
                "EmptyVerySmallSquare;": "\u25ab",
                "emsp13;": "\u2004",
                "emsp14;": "\u2005",
                "emsp;": "\u2003",
                "ENG;": "\u014a",
                "eng;": "\u014b",
                "ensp;": "\u2002",
                "Eogon;": "\u0118",
                "eogon;": "\u0119",
                "Eopf;": "\ud835\udd3c",
                "eopf;": "\ud835\udd56",
                "epar;": "\u22d5",
                "eparsl;": "\u29e3",
                "eplus;": "\u2a71",
                "epsi;": "\u03b5",
                "Epsilon;": "\u0395",
                "epsilon;": "\u03b5",
                "epsiv;": "\u03f5",
                "eqcirc;": "\u2256",
                "eqcolon;": "\u2255",
                "eqsim;": "\u2242",
                "eqslantgtr;": "\u2a96",
                "eqslantless;": "\u2a95",
                "Equal;": "\u2a75",
                "equals;": "=",
                "EqualTilde;": "\u2242",
                "equest;": "\u225f",
                "Equilibrium;": "\u21cc",
                "equiv;": "\u2261",
                "equivDD;": "\u2a78",
                "eqvparsl;": "\u29e5",
                "erarr;": "\u2971",
                "erDot;": "\u2253",
                "escr;": "\u212f",
                "Escr;": "\u2130",
                "esdot;": "\u2250",
                "Esim;": "\u2a73",
                "esim;": "\u2242",
                "Eta;": "\u0397",
                "eta;": "\u03b7",
                "ETH;": "\u00d0",
                ETH: "\u00d0",
                "eth;": "\u00f0",
                eth: "\u00f0",
                "Euml;": "\u00cb",
                Euml: "\u00cb",
                "euml;": "\u00eb",
                euml: "\u00eb",
                "euro;": "\u20ac",
                "excl;": "!",
                "exist;": "\u2203",
                "Exists;": "\u2203",
                "expectation;": "\u2130",
                "exponentiale;": "\u2147",
                "ExponentialE;": "\u2147",
                "fallingdotseq;": "\u2252",
                "Fcy;": "\u0424",
                "fcy;": "\u0444",
                "female;": "\u2640",
                "ffilig;": "\ufb03",
                "fflig;": "\ufb00",
                "ffllig;": "\ufb04",
                "Ffr;": "\ud835\udd09",
                "ffr;": "\ud835\udd23",
                "filig;": "\ufb01",
                "FilledSmallSquare;": "\u25fc",
                "FilledVerySmallSquare;": "\u25aa",
                "fjlig;": "fj",
                "flat;": "\u266d",
                "fllig;": "\ufb02",
                "fltns;": "\u25b1",
                "fnof;": "\u0192",
                "Fopf;": "\ud835\udd3d",
                "fopf;": "\ud835\udd57",
                "forall;": "\u2200",
                "ForAll;": "\u2200",
                "fork;": "\u22d4",
                "forkv;": "\u2ad9",
                "Fouriertrf;": "\u2131",
                "fpartint;": "\u2a0d",
                "frac12;": "\u00bd",
                frac12: "\u00bd",
                "frac13;": "\u2153",
                "frac14;": "\u00bc",
                frac14: "\u00bc",
                "frac15;": "\u2155",
                "frac16;": "\u2159",
                "frac18;": "\u215b",
                "frac23;": "\u2154",
                "frac25;": "\u2156",
                "frac34;": "\u00be",
                frac34: "\u00be",
                "frac35;": "\u2157",
                "frac38;": "\u215c",
                "frac45;": "\u2158",
                "frac56;": "\u215a",
                "frac58;": "\u215d",
                "frac78;": "\u215e",
                "frasl;": "\u2044",
                "frown;": "\u2322",
                "fscr;": "\ud835\udcbb",
                "Fscr;": "\u2131",
                "gacute;": "\u01f5",
                "Gamma;": "\u0393",
                "gamma;": "\u03b3",
                "Gammad;": "\u03dc",
                "gammad;": "\u03dd",
                "gap;": "\u2a86",
                "Gbreve;": "\u011e",
                "gbreve;": "\u011f",
                "Gcedil;": "\u0122",
                "Gcirc;": "\u011c",
                "gcirc;": "\u011d",
                "Gcy;": "\u0413",
                "gcy;": "\u0433",
                "Gdot;": "\u0120",
                "gdot;": "\u0121",
                "ge;": "\u2265",
                "gE;": "\u2267",
                "gEl;": "\u2a8c",
                "gel;": "\u22db",
                "geq;": "\u2265",
                "geqq;": "\u2267",
                "geqslant;": "\u2a7e",
                "gescc;": "\u2aa9",
                "ges;": "\u2a7e",
                "gesdot;": "\u2a80",
                "gesdoto;": "\u2a82",
                "gesdotol;": "\u2a84",
                "gesl;": "\u22db\ufe00",
                "gesles;": "\u2a94",
                "Gfr;": "\ud835\udd0a",
                "gfr;": "\ud835\udd24",
                "gg;": "\u226b",
                "Gg;": "\u22d9",
                "ggg;": "\u22d9",
                "gimel;": "\u2137",
                "GJcy;": "\u0403",
                "gjcy;": "\u0453",
                "gla;": "\u2aa5",
                "gl;": "\u2277",
                "glE;": "\u2a92",
                "glj;": "\u2aa4",
                "gnap;": "\u2a8a",
                "gnapprox;": "\u2a8a",
                "gne;": "\u2a88",
                "gnE;": "\u2269",
                "gneq;": "\u2a88",
                "gneqq;": "\u2269",
                "gnsim;": "\u22e7",
                "Gopf;": "\ud835\udd3e",
                "gopf;": "\ud835\udd58",
                "grave;": "`",
                "GreaterEqual;": "\u2265",
                "GreaterEqualLess;": "\u22db",
                "GreaterFullEqual;": "\u2267",
                "GreaterGreater;": "\u2aa2",
                "GreaterLess;": "\u2277",
                "GreaterSlantEqual;": "\u2a7e",
                "GreaterTilde;": "\u2273",
                "Gscr;": "\ud835\udca2",
                "gscr;": "\u210a",
                "gsim;": "\u2273",
                "gsime;": "\u2a8e",
                "gsiml;": "\u2a90",
                "gtcc;": "\u2aa7",
                "gtcir;": "\u2a7a",
                "gt;": ">",
                gt: ">",
                "GT;": ">",
                GT: ">",
                "Gt;": "\u226b",
                "gtdot;": "\u22d7",
                "gtlPar;": "\u2995",
                "gtquest;": "\u2a7c",
                "gtrapprox;": "\u2a86",
                "gtrarr;": "\u2978",
                "gtrdot;": "\u22d7",
                "gtreqless;": "\u22db",
                "gtreqqless;": "\u2a8c",
                "gtrless;": "\u2277",
                "gtrsim;": "\u2273",
                "gvertneqq;": "\u2269\ufe00",
                "gvnE;": "\u2269\ufe00",
                "Hacek;": "\u02c7",
                "hairsp;": "\u200a",
                "half;": "\u00bd",
                "hamilt;": "\u210b",
                "HARDcy;": "\u042a",
                "hardcy;": "\u044a",
                "harrcir;": "\u2948",
                "harr;": "\u2194",
                "hArr;": "\u21d4",
                "harrw;": "\u21ad",
                "Hat;": "^",
                "hbar;": "\u210f",
                "Hcirc;": "\u0124",
                "hcirc;": "\u0125",
                "hearts;": "\u2665",
                "heartsuit;": "\u2665",
                "hellip;": "\u2026",
                "hercon;": "\u22b9",
                "hfr;": "\ud835\udd25",
                "Hfr;": "\u210c",
                "HilbertSpace;": "\u210b",
                "hksearow;": "\u2925",
                "hkswarow;": "\u2926",
                "hoarr;": "\u21ff",
                "homtht;": "\u223b",
                "hookleftarrow;": "\u21a9",
                "hookrightarrow;": "\u21aa",
                "hopf;": "\ud835\udd59",
                "Hopf;": "\u210d",
                "horbar;": "\u2015",
                "HorizontalLine;": "\u2500",
                "hscr;": "\ud835\udcbd",
                "Hscr;": "\u210b",
                "hslash;": "\u210f",
                "Hstrok;": "\u0126",
                "hstrok;": "\u0127",
                "HumpDownHump;": "\u224e",
                "HumpEqual;": "\u224f",
                "hybull;": "\u2043",
                "hyphen;": "\u2010",
                "Iacute;": "\u00cd",
                Iacute: "\u00cd",
                "iacute;": "\u00ed",
                iacute: "\u00ed",
                "ic;": "\u2063",
                "Icirc;": "\u00ce",
                Icirc: "\u00ce",
                "icirc;": "\u00ee",
                icirc: "\u00ee",
                "Icy;": "\u0418",
                "icy;": "\u0438",
                "Idot;": "\u0130",
                "IEcy;": "\u0415",
                "iecy;": "\u0435",
                "iexcl;": "\u00a1",
                iexcl: "\u00a1",
                "iff;": "\u21d4",
                "ifr;": "\ud835\udd26",
                "Ifr;": "\u2111",
                "Igrave;": "\u00cc",
                Igrave: "\u00cc",
                "igrave;": "\u00ec",
                igrave: "\u00ec",
                "ii;": "\u2148",
                "iiiint;": "\u2a0c",
                "iiint;": "\u222d",
                "iinfin;": "\u29dc",
                "iiota;": "\u2129",
                "IJlig;": "\u0132",
                "ijlig;": "\u0133",
                "Imacr;": "\u012a",
                "imacr;": "\u012b",
                "image;": "\u2111",
                "ImaginaryI;": "\u2148",
                "imagline;": "\u2110",
                "imagpart;": "\u2111",
                "imath;": "\u0131",
                "Im;": "\u2111",
                "imof;": "\u22b7",
                "imped;": "\u01b5",
                "Implies;": "\u21d2",
                "incare;": "\u2105",
                "in;": "\u2208",
                "infin;": "\u221e",
                "infintie;": "\u29dd",
                "inodot;": "\u0131",
                "intcal;": "\u22ba",
                "int;": "\u222b",
                "Int;": "\u222c",
                "integers;": "\u2124",
                "Integral;": "\u222b",
                "intercal;": "\u22ba",
                "Intersection;": "\u22c2",
                "intlarhk;": "\u2a17",
                "intprod;": "\u2a3c",
                "InvisibleComma;": "\u2063",
                "InvisibleTimes;": "\u2062",
                "IOcy;": "\u0401",
                "iocy;": "\u0451",
                "Iogon;": "\u012e",
                "iogon;": "\u012f",
                "Iopf;": "\ud835\udd40",
                "iopf;": "\ud835\udd5a",
                "Iota;": "\u0399",
                "iota;": "\u03b9",
                "iprod;": "\u2a3c",
                "iquest;": "\u00bf",
                iquest: "\u00bf",
                "iscr;": "\ud835\udcbe",
                "Iscr;": "\u2110",
                "isin;": "\u2208",
                "isindot;": "\u22f5",
                "isinE;": "\u22f9",
                "isins;": "\u22f4",
                "isinsv;": "\u22f3",
                "isinv;": "\u2208",
                "it;": "\u2062",
                "Itilde;": "\u0128",
                "itilde;": "\u0129",
                "Iukcy;": "\u0406",
                "iukcy;": "\u0456",
                "Iuml;": "\u00cf",
                Iuml: "\u00cf",
                "iuml;": "\u00ef",
                iuml: "\u00ef",
                "Jcirc;": "\u0134",
                "jcirc;": "\u0135",
                "Jcy;": "\u0419",
                "jcy;": "\u0439",
                "Jfr;": "\ud835\udd0d",
                "jfr;": "\ud835\udd27",
                "jmath;": "\u0237",
                "Jopf;": "\ud835\udd41",
                "jopf;": "\ud835\udd5b",
                "Jscr;": "\ud835\udca5",
                "jscr;": "\ud835\udcbf",
                "Jsercy;": "\u0408",
                "jsercy;": "\u0458",
                "Jukcy;": "\u0404",
                "jukcy;": "\u0454",
                "Kappa;": "\u039a",
                "kappa;": "\u03ba",
                "kappav;": "\u03f0",
                "Kcedil;": "\u0136",
                "kcedil;": "\u0137",
                "Kcy;": "\u041a",
                "kcy;": "\u043a",
                "Kfr;": "\ud835\udd0e",
                "kfr;": "\ud835\udd28",
                "kgreen;": "\u0138",
                "KHcy;": "\u0425",
                "khcy;": "\u0445",
                "KJcy;": "\u040c",
                "kjcy;": "\u045c",
                "Kopf;": "\ud835\udd42",
                "kopf;": "\ud835\udd5c",
                "Kscr;": "\ud835\udca6",
                "kscr;": "\ud835\udcc0",
                "lAarr;": "\u21da",
                "Lacute;": "\u0139",
                "lacute;": "\u013a",
                "laemptyv;": "\u29b4",
                "lagran;": "\u2112",
                "Lambda;": "\u039b",
                "lambda;": "\u03bb",
                "lang;": "\u27e8",
                "Lang;": "\u27ea",
                "langd;": "\u2991",
                "langle;": "\u27e8",
                "lap;": "\u2a85",
                "Laplacetrf;": "\u2112",
                "laquo;": "\u00ab",
                laquo: "\u00ab",
                "larrb;": "\u21e4",
                "larrbfs;": "\u291f",
                "larr;": "\u2190",
                "Larr;": "\u219e",
                "lArr;": "\u21d0",
                "larrfs;": "\u291d",
                "larrhk;": "\u21a9",
                "larrlp;": "\u21ab",
                "larrpl;": "\u2939",
                "larrsim;": "\u2973",
                "larrtl;": "\u21a2",
                "latail;": "\u2919",
                "lAtail;": "\u291b",
                "lat;": "\u2aab",
                "late;": "\u2aad",
                "lates;": "\u2aad\ufe00",
                "lbarr;": "\u290c",
                "lBarr;": "\u290e",
                "lbbrk;": "\u2772",
                "lbrace;": "{",
                "lbrack;": "[",
                "lbrke;": "\u298b",
                "lbrksld;": "\u298f",
                "lbrkslu;": "\u298d",
                "Lcaron;": "\u013d",
                "lcaron;": "\u013e",
                "Lcedil;": "\u013b",
                "lcedil;": "\u013c",
                "lceil;": "\u2308",
                "lcub;": "{",
                "Lcy;": "\u041b",
                "lcy;": "\u043b",
                "ldca;": "\u2936",
                "ldquo;": "\u201c",
                "ldquor;": "\u201e",
                "ldrdhar;": "\u2967",
                "ldrushar;": "\u294b",
                "ldsh;": "\u21b2",
                "le;": "\u2264",
                "lE;": "\u2266",
                "LeftAngleBracket;": "\u27e8",
                "LeftArrowBar;": "\u21e4",
                "leftarrow;": "\u2190",
                "LeftArrow;": "\u2190",
                "Leftarrow;": "\u21d0",
                "LeftArrowRightArrow;": "\u21c6",
                "leftarrowtail;": "\u21a2",
                "LeftCeiling;": "\u2308",
                "LeftDoubleBracket;": "\u27e6",
                "LeftDownTeeVector;": "\u2961",
                "LeftDownVectorBar;": "\u2959",
                "LeftDownVector;": "\u21c3",
                "LeftFloor;": "\u230a",
                "leftharpoondown;": "\u21bd",
                "leftharpoonup;": "\u21bc",
                "leftleftarrows;": "\u21c7",
                "leftrightarrow;": "\u2194",
                "LeftRightArrow;": "\u2194",
                "Leftrightarrow;": "\u21d4",
                "leftrightarrows;": "\u21c6",
                "leftrightharpoons;": "\u21cb",
                "leftrightsquigarrow;": "\u21ad",
                "LeftRightVector;": "\u294e",
                "LeftTeeArrow;": "\u21a4",
                "LeftTee;": "\u22a3",
                "LeftTeeVector;": "\u295a",
                "leftthreetimes;": "\u22cb",
                "LeftTriangleBar;": "\u29cf",
                "LeftTriangle;": "\u22b2",
                "LeftTriangleEqual;": "\u22b4",
                "LeftUpDownVector;": "\u2951",
                "LeftUpTeeVector;": "\u2960",
                "LeftUpVectorBar;": "\u2958",
                "LeftUpVector;": "\u21bf",
                "LeftVectorBar;": "\u2952",
                "LeftVector;": "\u21bc",
                "lEg;": "\u2a8b",
                "leg;": "\u22da",
                "leq;": "\u2264",
                "leqq;": "\u2266",
                "leqslant;": "\u2a7d",
                "lescc;": "\u2aa8",
                "les;": "\u2a7d",
                "lesdot;": "\u2a7f",
                "lesdoto;": "\u2a81",
                "lesdotor;": "\u2a83",
                "lesg;": "\u22da\ufe00",
                "lesges;": "\u2a93",
                "lessapprox;": "\u2a85",
                "lessdot;": "\u22d6",
                "lesseqgtr;": "\u22da",
                "lesseqqgtr;": "\u2a8b",
                "LessEqualGreater;": "\u22da",
                "LessFullEqual;": "\u2266",
                "LessGreater;": "\u2276",
                "lessgtr;": "\u2276",
                "LessLess;": "\u2aa1",
                "lesssim;": "\u2272",
                "LessSlantEqual;": "\u2a7d",
                "LessTilde;": "\u2272",
                "lfisht;": "\u297c",
                "lfloor;": "\u230a",
                "Lfr;": "\ud835\udd0f",
                "lfr;": "\ud835\udd29",
                "lg;": "\u2276",
                "lgE;": "\u2a91",
                "lHar;": "\u2962",
                "lhard;": "\u21bd",
                "lharu;": "\u21bc",
                "lharul;": "\u296a",
                "lhblk;": "\u2584",
                "LJcy;": "\u0409",
                "ljcy;": "\u0459",
                "llarr;": "\u21c7",
                "ll;": "\u226a",
                "Ll;": "\u22d8",
                "llcorner;": "\u231e",
                "Lleftarrow;": "\u21da",
                "llhard;": "\u296b",
                "lltri;": "\u25fa",
                "Lmidot;": "\u013f",
                "lmidot;": "\u0140",
                "lmoustache;": "\u23b0",
                "lmoust;": "\u23b0",
                "lnap;": "\u2a89",
                "lnapprox;": "\u2a89",
                "lne;": "\u2a87",
                "lnE;": "\u2268",
                "lneq;": "\u2a87",
                "lneqq;": "\u2268",
                "lnsim;": "\u22e6",
                "loang;": "\u27ec",
                "loarr;": "\u21fd",
                "lobrk;": "\u27e6",
                "longleftarrow;": "\u27f5",
                "LongLeftArrow;": "\u27f5",
                "Longleftarrow;": "\u27f8",
                "longleftrightarrow;": "\u27f7",
                "LongLeftRightArrow;": "\u27f7",
                "Longleftrightarrow;": "\u27fa",
                "longmapsto;": "\u27fc",
                "longrightarrow;": "\u27f6",
                "LongRightArrow;": "\u27f6",
                "Longrightarrow;": "\u27f9",
                "looparrowleft;": "\u21ab",
                "looparrowright;": "\u21ac",
                "lopar;": "\u2985",
                "Lopf;": "\ud835\udd43",
                "lopf;": "\ud835\udd5d",
                "loplus;": "\u2a2d",
                "lotimes;": "\u2a34",
                "lowast;": "\u2217",
                "lowbar;": "_",
                "LowerLeftArrow;": "\u2199",
                "LowerRightArrow;": "\u2198",
                "loz;": "\u25ca",
                "lozenge;": "\u25ca",
                "lozf;": "\u29eb",
                "lpar;": "(",
                "lparlt;": "\u2993",
                "lrarr;": "\u21c6",
                "lrcorner;": "\u231f",
                "lrhar;": "\u21cb",
                "lrhard;": "\u296d",
                "lrm;": "\u200e",
                "lrtri;": "\u22bf",
                "lsaquo;": "\u2039",
                "lscr;": "\ud835\udcc1",
                "Lscr;": "\u2112",
                "lsh;": "\u21b0",
                "Lsh;": "\u21b0",
                "lsim;": "\u2272",
                "lsime;": "\u2a8d",
                "lsimg;": "\u2a8f",
                "lsqb;": "[",
                "lsquo;": "\u2018",
                "lsquor;": "\u201a",
                "Lstrok;": "\u0141",
                "lstrok;": "\u0142",
                "ltcc;": "\u2aa6",
                "ltcir;": "\u2a79",
                "lt;": "<",
                lt: "<",
                "LT;": "<",
                LT: "<",
                "Lt;": "\u226a",
                "ltdot;": "\u22d6",
                "lthree;": "\u22cb",
                "ltimes;": "\u22c9",
                "ltlarr;": "\u2976",
                "ltquest;": "\u2a7b",
                "ltri;": "\u25c3",
                "ltrie;": "\u22b4",
                "ltrif;": "\u25c2",
                "ltrPar;": "\u2996",
                "lurdshar;": "\u294a",
                "luruhar;": "\u2966",
                "lvertneqq;": "\u2268\ufe00",
                "lvnE;": "\u2268\ufe00",
                "macr;": "\u00af",
                macr: "\u00af",
                "male;": "\u2642",
                "malt;": "\u2720",
                "maltese;": "\u2720",
                "Map;": "\u2905",
                "map;": "\u21a6",
                "mapsto;": "\u21a6",
                "mapstodown;": "\u21a7",
                "mapstoleft;": "\u21a4",
                "mapstoup;": "\u21a5",
                "marker;": "\u25ae",
                "mcomma;": "\u2a29",
                "Mcy;": "\u041c",
                "mcy;": "\u043c",
                "mdash;": "\u2014",
                "mDDot;": "\u223a",
                "measuredangle;": "\u2221",
                "MediumSpace;": "\u205f",
                "Mellintrf;": "\u2133",
                "Mfr;": "\ud835\udd10",
                "mfr;": "\ud835\udd2a",
                "mho;": "\u2127",
                "micro;": "\u00b5",
                micro: "\u00b5",
                "midast;": "*",
                "midcir;": "\u2af0",
                "mid;": "\u2223",
                "middot;": "\u00b7",
                middot: "\u00b7",
                "minusb;": "\u229f",
                "minus;": "\u2212",
                "minusd;": "\u2238",
                "minusdu;": "\u2a2a",
                "MinusPlus;": "\u2213",
                "mlcp;": "\u2adb",
                "mldr;": "\u2026",
                "mnplus;": "\u2213",
                "models;": "\u22a7",
                "Mopf;": "\ud835\udd44",
                "mopf;": "\ud835\udd5e",
                "mp;": "\u2213",
                "mscr;": "\ud835\udcc2",
                "Mscr;": "\u2133",
                "mstpos;": "\u223e",
                "Mu;": "\u039c",
                "mu;": "\u03bc",
                "multimap;": "\u22b8",
                "mumap;": "\u22b8",
                "nabla;": "\u2207",
                "Nacute;": "\u0143",
                "nacute;": "\u0144",
                "nang;": "\u2220\u20d2",
                "nap;": "\u2249",
                "napE;": "\u2a70\u0338",
                "napid;": "\u224b\u0338",
                "napos;": "\u0149",
                "napprox;": "\u2249",
                "natural;": "\u266e",
                "naturals;": "\u2115",
                "natur;": "\u266e",
                "nbsp;": "\u00a0",
                nbsp: "\u00a0",
                "nbump;": "\u224e\u0338",
                "nbumpe;": "\u224f\u0338",
                "ncap;": "\u2a43",
                "Ncaron;": "\u0147",
                "ncaron;": "\u0148",
                "Ncedil;": "\u0145",
                "ncedil;": "\u0146",
                "ncong;": "\u2247",
                "ncongdot;": "\u2a6d\u0338",
                "ncup;": "\u2a42",
                "Ncy;": "\u041d",
                "ncy;": "\u043d",
                "ndash;": "\u2013",
                "nearhk;": "\u2924",
                "nearr;": "\u2197",
                "neArr;": "\u21d7",
                "nearrow;": "\u2197",
                "ne;": "\u2260",
                "nedot;": "\u2250\u0338",
                "NegativeMediumSpace;": "\u200b",
                "NegativeThickSpace;": "\u200b",
                "NegativeThinSpace;": "\u200b",
                "NegativeVeryThinSpace;": "\u200b",
                "nequiv;": "\u2262",
                "nesear;": "\u2928",
                "nesim;": "\u2242\u0338",
                "NestedGreaterGreater;": "\u226b",
                "NestedLessLess;": "\u226a",
                "NewLine;": "\n",
                "nexist;": "\u2204",
                "nexists;": "\u2204",
                "Nfr;": "\ud835\udd11",
                "nfr;": "\ud835\udd2b",
                "ngE;": "\u2267\u0338",
                "nge;": "\u2271",
                "ngeq;": "\u2271",
                "ngeqq;": "\u2267\u0338",
                "ngeqslant;": "\u2a7e\u0338",
                "nges;": "\u2a7e\u0338",
                "nGg;": "\u22d9\u0338",
                "ngsim;": "\u2275",
                "nGt;": "\u226b\u20d2",
                "ngt;": "\u226f",
                "ngtr;": "\u226f",
                "nGtv;": "\u226b\u0338",
                "nharr;": "\u21ae",
                "nhArr;": "\u21ce",
                "nhpar;": "\u2af2",
                "ni;": "\u220b",
                "nis;": "\u22fc",
                "nisd;": "\u22fa",
                "niv;": "\u220b",
                "NJcy;": "\u040a",
                "njcy;": "\u045a",
                "nlarr;": "\u219a",
                "nlArr;": "\u21cd",
                "nldr;": "\u2025",
                "nlE;": "\u2266\u0338",
                "nle;": "\u2270",
                "nleftarrow;": "\u219a",
                "nLeftarrow;": "\u21cd",
                "nleftrightarrow;": "\u21ae",
                "nLeftrightarrow;": "\u21ce",
                "nleq;": "\u2270",
                "nleqq;": "\u2266\u0338",
                "nleqslant;": "\u2a7d\u0338",
                "nles;": "\u2a7d\u0338",
                "nless;": "\u226e",
                "nLl;": "\u22d8\u0338",
                "nlsim;": "\u2274",
                "nLt;": "\u226a\u20d2",
                "nlt;": "\u226e",
                "nltri;": "\u22ea",
                "nltrie;": "\u22ec",
                "nLtv;": "\u226a\u0338",
                "nmid;": "\u2224",
                "NoBreak;": "\u2060",
                "NonBreakingSpace;": "\u00a0",
                "nopf;": "\ud835\udd5f",
                "Nopf;": "\u2115",
                "Not;": "\u2aec",
                "not;": "\u00ac",
                not: "\u00ac",
                "NotCongruent;": "\u2262",
                "NotCupCap;": "\u226d",
                "NotDoubleVerticalBar;": "\u2226",
                "NotElement;": "\u2209",
                "NotEqual;": "\u2260",
                "NotEqualTilde;": "\u2242\u0338",
                "NotExists;": "\u2204",
                "NotGreater;": "\u226f",
                "NotGreaterEqual;": "\u2271",
                "NotGreaterFullEqual;": "\u2267\u0338",
                "NotGreaterGreater;": "\u226b\u0338",
                "NotGreaterLess;": "\u2279",
                "NotGreaterSlantEqual;": "\u2a7e\u0338",
                "NotGreaterTilde;": "\u2275",
                "NotHumpDownHump;": "\u224e\u0338",
                "NotHumpEqual;": "\u224f\u0338",
                "notin;": "\u2209",
                "notindot;": "\u22f5\u0338",
                "notinE;": "\u22f9\u0338",
                "notinva;": "\u2209",
                "notinvb;": "\u22f7",
                "notinvc;": "\u22f6",
                "NotLeftTriangleBar;": "\u29cf\u0338",
                "NotLeftTriangle;": "\u22ea",
                "NotLeftTriangleEqual;": "\u22ec",
                "NotLess;": "\u226e",
                "NotLessEqual;": "\u2270",
                "NotLessGreater;": "\u2278",
                "NotLessLess;": "\u226a\u0338",
                "NotLessSlantEqual;": "\u2a7d\u0338",
                "NotLessTilde;": "\u2274",
                "NotNestedGreaterGreater;": "\u2aa2\u0338",
                "NotNestedLessLess;": "\u2aa1\u0338",
                "notni;": "\u220c",
                "notniva;": "\u220c",
                "notnivb;": "\u22fe",
                "notnivc;": "\u22fd",
                "NotPrecedes;": "\u2280",
                "NotPrecedesEqual;": "\u2aaf\u0338",
                "NotPrecedesSlantEqual;": "\u22e0",
                "NotReverseElement;": "\u220c",
                "NotRightTriangleBar;": "\u29d0\u0338",
                "NotRightTriangle;": "\u22eb",
                "NotRightTriangleEqual;": "\u22ed",
                "NotSquareSubset;": "\u228f\u0338",
                "NotSquareSubsetEqual;": "\u22e2",
                "NotSquareSuperset;": "\u2290\u0338",
                "NotSquareSupersetEqual;": "\u22e3",
                "NotSubset;": "\u2282\u20d2",
                "NotSubsetEqual;": "\u2288",
                "NotSucceeds;": "\u2281",
                "NotSucceedsEqual;": "\u2ab0\u0338",
                "NotSucceedsSlantEqual;": "\u22e1",
                "NotSucceedsTilde;": "\u227f\u0338",
                "NotSuperset;": "\u2283\u20d2",
                "NotSupersetEqual;": "\u2289",
                "NotTilde;": "\u2241",
                "NotTildeEqual;": "\u2244",
                "NotTildeFullEqual;": "\u2247",
                "NotTildeTilde;": "\u2249",
                "NotVerticalBar;": "\u2224",
                "nparallel;": "\u2226",
                "npar;": "\u2226",
                "nparsl;": "\u2afd\u20e5",
                "npart;": "\u2202\u0338",
                "npolint;": "\u2a14",
                "npr;": "\u2280",
                "nprcue;": "\u22e0",
                "nprec;": "\u2280",
                "npreceq;": "\u2aaf\u0338",
                "npre;": "\u2aaf\u0338",
                "nrarrc;": "\u2933\u0338",
                "nrarr;": "\u219b",
                "nrArr;": "\u21cf",
                "nrarrw;": "\u219d\u0338",
                "nrightarrow;": "\u219b",
                "nRightarrow;": "\u21cf",
                "nrtri;": "\u22eb",
                "nrtrie;": "\u22ed",
                "nsc;": "\u2281",
                "nsccue;": "\u22e1",
                "nsce;": "\u2ab0\u0338",
                "Nscr;": "\ud835\udca9",
                "nscr;": "\ud835\udcc3",
                "nshortmid;": "\u2224",
                "nshortparallel;": "\u2226",
                "nsim;": "\u2241",
                "nsime;": "\u2244",
                "nsimeq;": "\u2244",
                "nsmid;": "\u2224",
                "nspar;": "\u2226",
                "nsqsube;": "\u22e2",
                "nsqsupe;": "\u22e3",
                "nsub;": "\u2284",
                "nsubE;": "\u2ac5\u0338",
                "nsube;": "\u2288",
                "nsubset;": "\u2282\u20d2",
                "nsubseteq;": "\u2288",
                "nsubseteqq;": "\u2ac5\u0338",
                "nsucc;": "\u2281",
                "nsucceq;": "\u2ab0\u0338",
                "nsup;": "\u2285",
                "nsupE;": "\u2ac6\u0338",
                "nsupe;": "\u2289",
                "nsupset;": "\u2283\u20d2",
                "nsupseteq;": "\u2289",
                "nsupseteqq;": "\u2ac6\u0338",
                "ntgl;": "\u2279",
                "Ntilde;": "\u00d1",
                Ntilde: "\u00d1",
                "ntilde;": "\u00f1",
                ntilde: "\u00f1",
                "ntlg;": "\u2278",
                "ntriangleleft;": "\u22ea",
                "ntrianglelefteq;": "\u22ec",
                "ntriangleright;": "\u22eb",
                "ntrianglerighteq;": "\u22ed",
                "Nu;": "\u039d",
                "nu;": "\u03bd",
                "num;": "#",
                "numero;": "\u2116",
                "numsp;": "\u2007",
                "nvap;": "\u224d\u20d2",
                "nvdash;": "\u22ac",
                "nvDash;": "\u22ad",
                "nVdash;": "\u22ae",
                "nVDash;": "\u22af",
                "nvge;": "\u2265\u20d2",
                "nvgt;": ">\u20d2",
                "nvHarr;": "\u2904",
                "nvinfin;": "\u29de",
                "nvlArr;": "\u2902",
                "nvle;": "\u2264\u20d2",
                "nvlt;": "<\u20d2",
                "nvltrie;": "\u22b4\u20d2",
                "nvrArr;": "\u2903",
                "nvrtrie;": "\u22b5\u20d2",
                "nvsim;": "\u223c\u20d2",
                "nwarhk;": "\u2923",
                "nwarr;": "\u2196",
                "nwArr;": "\u21d6",
                "nwarrow;": "\u2196",
                "nwnear;": "\u2927",
                "Oacute;": "\u00d3",
                Oacute: "\u00d3",
                "oacute;": "\u00f3",
                oacute: "\u00f3",
                "oast;": "\u229b",
                "Ocirc;": "\u00d4",
                Ocirc: "\u00d4",
                "ocirc;": "\u00f4",
                ocirc: "\u00f4",
                "ocir;": "\u229a",
                "Ocy;": "\u041e",
                "ocy;": "\u043e",
                "odash;": "\u229d",
                "Odblac;": "\u0150",
                "odblac;": "\u0151",
                "odiv;": "\u2a38",
                "odot;": "\u2299",
                "odsold;": "\u29bc",
                "OElig;": "\u0152",
                "oelig;": "\u0153",
                "ofcir;": "\u29bf",
                "Ofr;": "\ud835\udd12",
                "ofr;": "\ud835\udd2c",
                "ogon;": "\u02db",
                "Ograve;": "\u00d2",
                Ograve: "\u00d2",
                "ograve;": "\u00f2",
                ograve: "\u00f2",
                "ogt;": "\u29c1",
                "ohbar;": "\u29b5",
                "ohm;": "\u03a9",
                "oint;": "\u222e",
                "olarr;": "\u21ba",
                "olcir;": "\u29be",
                "olcross;": "\u29bb",
                "oline;": "\u203e",
                "olt;": "\u29c0",
                "Omacr;": "\u014c",
                "omacr;": "\u014d",
                "Omega;": "\u03a9",
                "omega;": "\u03c9",
                "Omicron;": "\u039f",
                "omicron;": "\u03bf",
                "omid;": "\u29b6",
                "ominus;": "\u2296",
                "Oopf;": "\ud835\udd46",
                "oopf;": "\ud835\udd60",
                "opar;": "\u29b7",
                "OpenCurlyDoubleQuote;": "\u201c",
                "OpenCurlyQuote;": "\u2018",
                "operp;": "\u29b9",
                "oplus;": "\u2295",
                "orarr;": "\u21bb",
                "Or;": "\u2a54",
                "or;": "\u2228",
                "ord;": "\u2a5d",
                "order;": "\u2134",
                "orderof;": "\u2134",
                "ordf;": "\u00aa",
                ordf: "\u00aa",
                "ordm;": "\u00ba",
                ordm: "\u00ba",
                "origof;": "\u22b6",
                "oror;": "\u2a56",
                "orslope;": "\u2a57",
                "orv;": "\u2a5b",
                "oS;": "\u24c8",
                "Oscr;": "\ud835\udcaa",
                "oscr;": "\u2134",
                "Oslash;": "\u00d8",
                Oslash: "\u00d8",
                "oslash;": "\u00f8",
                oslash: "\u00f8",
                "osol;": "\u2298",
                "Otilde;": "\u00d5",
                Otilde: "\u00d5",
                "otilde;": "\u00f5",
                otilde: "\u00f5",
                "otimesas;": "\u2a36",
                "Otimes;": "\u2a37",
                "otimes;": "\u2297",
                "Ouml;": "\u00d6",
                Ouml: "\u00d6",
                "ouml;": "\u00f6",
                ouml: "\u00f6",
                "ovbar;": "\u233d",
                "OverBar;": "\u203e",
                "OverBrace;": "\u23de",
                "OverBracket;": "\u23b4",
                "OverParenthesis;": "\u23dc",
                "para;": "\u00b6",
                para: "\u00b6",
                "parallel;": "\u2225",
                "par;": "\u2225",
                "parsim;": "\u2af3",
                "parsl;": "\u2afd",
                "part;": "\u2202",
                "PartialD;": "\u2202",
                "Pcy;": "\u041f",
                "pcy;": "\u043f",
                "percnt;": "%",
                "period;": ".",
                "permil;": "\u2030",
                "perp;": "\u22a5",
                "pertenk;": "\u2031",
                "Pfr;": "\ud835\udd13",
                "pfr;": "\ud835\udd2d",
                "Phi;": "\u03a6",
                "phi;": "\u03c6",
                "phiv;": "\u03d5",
                "phmmat;": "\u2133",
                "phone;": "\u260e",
                "Pi;": "\u03a0",
                "pi;": "\u03c0",
                "pitchfork;": "\u22d4",
                "piv;": "\u03d6",
                "planck;": "\u210f",
                "planckh;": "\u210e",
                "plankv;": "\u210f",
                "plusacir;": "\u2a23",
                "plusb;": "\u229e",
                "pluscir;": "\u2a22",
                "plus;": "+",
                "plusdo;": "\u2214",
                "plusdu;": "\u2a25",
                "pluse;": "\u2a72",
                "PlusMinus;": "\u00b1",
                "plusmn;": "\u00b1",
                plusmn: "\u00b1",
                "plussim;": "\u2a26",
                "plustwo;": "\u2a27",
                "pm;": "\u00b1",
                "Poincareplane;": "\u210c",
                "pointint;": "\u2a15",
                "popf;": "\ud835\udd61",
                "Popf;": "\u2119",
                "pound;": "\u00a3",
                pound: "\u00a3",
                "prap;": "\u2ab7",
                "Pr;": "\u2abb",
                "pr;": "\u227a",
                "prcue;": "\u227c",
                "precapprox;": "\u2ab7",
                "prec;": "\u227a",
                "preccurlyeq;": "\u227c",
                "Precedes;": "\u227a",
                "PrecedesEqual;": "\u2aaf",
                "PrecedesSlantEqual;": "\u227c",
                "PrecedesTilde;": "\u227e",
                "preceq;": "\u2aaf",
                "precnapprox;": "\u2ab9",
                "precneqq;": "\u2ab5",
                "precnsim;": "\u22e8",
                "pre;": "\u2aaf",
                "prE;": "\u2ab3",
                "precsim;": "\u227e",
                "prime;": "\u2032",
                "Prime;": "\u2033",
                "primes;": "\u2119",
                "prnap;": "\u2ab9",
                "prnE;": "\u2ab5",
                "prnsim;": "\u22e8",
                "prod;": "\u220f",
                "Product;": "\u220f",
                "profalar;": "\u232e",
                "profline;": "\u2312",
                "profsurf;": "\u2313",
                "prop;": "\u221d",
                "Proportional;": "\u221d",
                "Proportion;": "\u2237",
                "propto;": "\u221d",
                "prsim;": "\u227e",
                "prurel;": "\u22b0",
                "Pscr;": "\ud835\udcab",
                "pscr;": "\ud835\udcc5",
                "Psi;": "\u03a8",
                "psi;": "\u03c8",
                "puncsp;": "\u2008",
                "Qfr;": "\ud835\udd14",
                "qfr;": "\ud835\udd2e",
                "qint;": "\u2a0c",
                "qopf;": "\ud835\udd62",
                "Qopf;": "\u211a",
                "qprime;": "\u2057",
                "Qscr;": "\ud835\udcac",
                "qscr;": "\ud835\udcc6",
                "quaternions;": "\u210d",
                "quatint;": "\u2a16",
                "quest;": "?",
                "questeq;": "\u225f",
                "quot;": '"',
                quot: '"',
                "QUOT;": '"',
                QUOT: '"',
                "rAarr;": "\u21db",
                "race;": "\u223d\u0331",
                "Racute;": "\u0154",
                "racute;": "\u0155",
                "radic;": "\u221a",
                "raemptyv;": "\u29b3",
                "rang;": "\u27e9",
                "Rang;": "\u27eb",
                "rangd;": "\u2992",
                "range;": "\u29a5",
                "rangle;": "\u27e9",
                "raquo;": "\u00bb",
                raquo: "\u00bb",
                "rarrap;": "\u2975",
                "rarrb;": "\u21e5",
                "rarrbfs;": "\u2920",
                "rarrc;": "\u2933",
                "rarr;": "\u2192",
                "Rarr;": "\u21a0",
                "rArr;": "\u21d2",
                "rarrfs;": "\u291e",
                "rarrhk;": "\u21aa",
                "rarrlp;": "\u21ac",
                "rarrpl;": "\u2945",
                "rarrsim;": "\u2974",
                "Rarrtl;": "\u2916",
                "rarrtl;": "\u21a3",
                "rarrw;": "\u219d",
                "ratail;": "\u291a",
                "rAtail;": "\u291c",
                "ratio;": "\u2236",
                "rationals;": "\u211a",
                "rbarr;": "\u290d",
                "rBarr;": "\u290f",
                "RBarr;": "\u2910",
                "rbbrk;": "\u2773",
                "rbrace;": "}",
                "rbrack;": "]",
                "rbrke;": "\u298c",
                "rbrksld;": "\u298e",
                "rbrkslu;": "\u2990",
                "Rcaron;": "\u0158",
                "rcaron;": "\u0159",
                "Rcedil;": "\u0156",
                "rcedil;": "\u0157",
                "rceil;": "\u2309",
                "rcub;": "}",
                "Rcy;": "\u0420",
                "rcy;": "\u0440",
                "rdca;": "\u2937",
                "rdldhar;": "\u2969",
                "rdquo;": "\u201d",
                "rdquor;": "\u201d",
                "rdsh;": "\u21b3",
                "real;": "\u211c",
                "realine;": "\u211b",
                "realpart;": "\u211c",
                "reals;": "\u211d",
                "Re;": "\u211c",
                "rect;": "\u25ad",
                "reg;": "\u00ae",
                reg: "\u00ae",
                "REG;": "\u00ae",
                REG: "\u00ae",
                "ReverseElement;": "\u220b",
                "ReverseEquilibrium;": "\u21cb",
                "ReverseUpEquilibrium;": "\u296f",
                "rfisht;": "\u297d",
                "rfloor;": "\u230b",
                "rfr;": "\ud835\udd2f",
                "Rfr;": "\u211c",
                "rHar;": "\u2964",
                "rhard;": "\u21c1",
                "rharu;": "\u21c0",
                "rharul;": "\u296c",
                "Rho;": "\u03a1",
                "rho;": "\u03c1",
                "rhov;": "\u03f1",
                "RightAngleBracket;": "\u27e9",
                "RightArrowBar;": "\u21e5",
                "rightarrow;": "\u2192",
                "RightArrow;": "\u2192",
                "Rightarrow;": "\u21d2",
                "RightArrowLeftArrow;": "\u21c4",
                "rightarrowtail;": "\u21a3",
                "RightCeiling;": "\u2309",
                "RightDoubleBracket;": "\u27e7",
                "RightDownTeeVector;": "\u295d",
                "RightDownVectorBar;": "\u2955",
                "RightDownVector;": "\u21c2",
                "RightFloor;": "\u230b",
                "rightharpoondown;": "\u21c1",
                "rightharpoonup;": "\u21c0",
                "rightleftarrows;": "\u21c4",
                "rightleftharpoons;": "\u21cc",
                "rightrightarrows;": "\u21c9",
                "rightsquigarrow;": "\u219d",
                "RightTeeArrow;": "\u21a6",
                "RightTee;": "\u22a2",
                "RightTeeVector;": "\u295b",
                "rightthreetimes;": "\u22cc",
                "RightTriangleBar;": "\u29d0",
                "RightTriangle;": "\u22b3",
                "RightTriangleEqual;": "\u22b5",
                "RightUpDownVector;": "\u294f",
                "RightUpTeeVector;": "\u295c",
                "RightUpVectorBar;": "\u2954",
                "RightUpVector;": "\u21be",
                "RightVectorBar;": "\u2953",
                "RightVector;": "\u21c0",
                "ring;": "\u02da",
                "risingdotseq;": "\u2253",
                "rlarr;": "\u21c4",
                "rlhar;": "\u21cc",
                "rlm;": "\u200f",
                "rmoustache;": "\u23b1",
                "rmoust;": "\u23b1",
                "rnmid;": "\u2aee",
                "roang;": "\u27ed",
                "roarr;": "\u21fe",
                "robrk;": "\u27e7",
                "ropar;": "\u2986",
                "ropf;": "\ud835\udd63",
                "Ropf;": "\u211d",
                "roplus;": "\u2a2e",
                "rotimes;": "\u2a35",
                "RoundImplies;": "\u2970",
                "rpar;": ")",
                "rpargt;": "\u2994",
                "rppolint;": "\u2a12",
                "rrarr;": "\u21c9",
                "Rrightarrow;": "\u21db",
                "rsaquo;": "\u203a",
                "rscr;": "\ud835\udcc7",
                "Rscr;": "\u211b",
                "rsh;": "\u21b1",
                "Rsh;": "\u21b1",
                "rsqb;": "]",
                "rsquo;": "\u2019",
                "rsquor;": "\u2019",
                "rthree;": "\u22cc",
                "rtimes;": "\u22ca",
                "rtri;": "\u25b9",
                "rtrie;": "\u22b5",
                "rtrif;": "\u25b8",
                "rtriltri;": "\u29ce",
                "RuleDelayed;": "\u29f4",
                "ruluhar;": "\u2968",
                "rx;": "\u211e",
                "Sacute;": "\u015a",
                "sacute;": "\u015b",
                "sbquo;": "\u201a",
                "scap;": "\u2ab8",
                "Scaron;": "\u0160",
                "scaron;": "\u0161",
                "Sc;": "\u2abc",
                "sc;": "\u227b",
                "sccue;": "\u227d",
                "sce;": "\u2ab0",
                "scE;": "\u2ab4",
                "Scedil;": "\u015e",
                "scedil;": "\u015f",
                "Scirc;": "\u015c",
                "scirc;": "\u015d",
                "scnap;": "\u2aba",
                "scnE;": "\u2ab6",
                "scnsim;": "\u22e9",
                "scpolint;": "\u2a13",
                "scsim;": "\u227f",
                "Scy;": "\u0421",
                "scy;": "\u0441",
                "sdotb;": "\u22a1",
                "sdot;": "\u22c5",
                "sdote;": "\u2a66",
                "searhk;": "\u2925",
                "searr;": "\u2198",
                "seArr;": "\u21d8",
                "searrow;": "\u2198",
                "sect;": "\u00a7",
                sect: "\u00a7",
                "semi;": ";",
                "seswar;": "\u2929",
                "setminus;": "\u2216",
                "setmn;": "\u2216",
                "sext;": "\u2736",
                "Sfr;": "\ud835\udd16",
                "sfr;": "\ud835\udd30",
                "sfrown;": "\u2322",
                "sharp;": "\u266f",
                "SHCHcy;": "\u0429",
                "shchcy;": "\u0449",
                "SHcy;": "\u0428",
                "shcy;": "\u0448",
                "ShortDownArrow;": "\u2193",
                "ShortLeftArrow;": "\u2190",
                "shortmid;": "\u2223",
                "shortparallel;": "\u2225",
                "ShortRightArrow;": "\u2192",
                "ShortUpArrow;": "\u2191",
                "shy;": "\u00ad",
                shy: "\u00ad",
                "Sigma;": "\u03a3",
                "sigma;": "\u03c3",
                "sigmaf;": "\u03c2",
                "sigmav;": "\u03c2",
                "sim;": "\u223c",
                "simdot;": "\u2a6a",
                "sime;": "\u2243",
                "simeq;": "\u2243",
                "simg;": "\u2a9e",
                "simgE;": "\u2aa0",
                "siml;": "\u2a9d",
                "simlE;": "\u2a9f",
                "simne;": "\u2246",
                "simplus;": "\u2a24",
                "simrarr;": "\u2972",
                "slarr;": "\u2190",
                "SmallCircle;": "\u2218",
                "smallsetminus;": "\u2216",
                "smashp;": "\u2a33",
                "smeparsl;": "\u29e4",
                "smid;": "\u2223",
                "smile;": "\u2323",
                "smt;": "\u2aaa",
                "smte;": "\u2aac",
                "smtes;": "\u2aac\ufe00",
                "SOFTcy;": "\u042c",
                "softcy;": "\u044c",
                "solbar;": "\u233f",
                "solb;": "\u29c4",
                "sol;": "/",
                "Sopf;": "\ud835\udd4a",
                "sopf;": "\ud835\udd64",
                "spades;": "\u2660",
                "spadesuit;": "\u2660",
                "spar;": "\u2225",
                "sqcap;": "\u2293",
                "sqcaps;": "\u2293\ufe00",
                "sqcup;": "\u2294",
                "sqcups;": "\u2294\ufe00",
                "Sqrt;": "\u221a",
                "sqsub;": "\u228f",
                "sqsube;": "\u2291",
                "sqsubset;": "\u228f",
                "sqsubseteq;": "\u2291",
                "sqsup;": "\u2290",
                "sqsupe;": "\u2292",
                "sqsupset;": "\u2290",
                "sqsupseteq;": "\u2292",
                "square;": "\u25a1",
                "Square;": "\u25a1",
                "SquareIntersection;": "\u2293",
                "SquareSubset;": "\u228f",
                "SquareSubsetEqual;": "\u2291",
                "SquareSuperset;": "\u2290",
                "SquareSupersetEqual;": "\u2292",
                "SquareUnion;": "\u2294",
                "squarf;": "\u25aa",
                "squ;": "\u25a1",
                "squf;": "\u25aa",
                "srarr;": "\u2192",
                "Sscr;": "\ud835\udcae",
                "sscr;": "\ud835\udcc8",
                "ssetmn;": "\u2216",
                "ssmile;": "\u2323",
                "sstarf;": "\u22c6",
                "Star;": "\u22c6",
                "star;": "\u2606",
                "starf;": "\u2605",
                "straightepsilon;": "\u03f5",
                "straightphi;": "\u03d5",
                "strns;": "\u00af",
                "sub;": "\u2282",
                "Sub;": "\u22d0",
                "subdot;": "\u2abd",
                "subE;": "\u2ac5",
                "sube;": "\u2286",
                "subedot;": "\u2ac3",
                "submult;": "\u2ac1",
                "subnE;": "\u2acb",
                "subne;": "\u228a",
                "subplus;": "\u2abf",
                "subrarr;": "\u2979",
                "subset;": "\u2282",
                "Subset;": "\u22d0",
                "subseteq;": "\u2286",
                "subseteqq;": "\u2ac5",
                "SubsetEqual;": "\u2286",
                "subsetneq;": "\u228a",
                "subsetneqq;": "\u2acb",
                "subsim;": "\u2ac7",
                "subsub;": "\u2ad5",
                "subsup;": "\u2ad3",
                "succapprox;": "\u2ab8",
                "succ;": "\u227b",
                "succcurlyeq;": "\u227d",
                "Succeeds;": "\u227b",
                "SucceedsEqual;": "\u2ab0",
                "SucceedsSlantEqual;": "\u227d",
                "SucceedsTilde;": "\u227f",
                "succeq;": "\u2ab0",
                "succnapprox;": "\u2aba",
                "succneqq;": "\u2ab6",
                "succnsim;": "\u22e9",
                "succsim;": "\u227f",
                "SuchThat;": "\u220b",
                "sum;": "\u2211",
                "Sum;": "\u2211",
                "sung;": "\u266a",
                "sup1;": "\u00b9",
                sup1: "\u00b9",
                "sup2;": "\u00b2",
                sup2: "\u00b2",
                "sup3;": "\u00b3",
                sup3: "\u00b3",
                "sup;": "\u2283",
                "Sup;": "\u22d1",
                "supdot;": "\u2abe",
                "supdsub;": "\u2ad8",
                "supE;": "\u2ac6",
                "supe;": "\u2287",
                "supedot;": "\u2ac4",
                "Superset;": "\u2283",
                "SupersetEqual;": "\u2287",
                "suphsol;": "\u27c9",
                "suphsub;": "\u2ad7",
                "suplarr;": "\u297b",
                "supmult;": "\u2ac2",
                "supnE;": "\u2acc",
                "supne;": "\u228b",
                "supplus;": "\u2ac0",
                "supset;": "\u2283",
                "Supset;": "\u22d1",
                "supseteq;": "\u2287",
                "supseteqq;": "\u2ac6",
                "supsetneq;": "\u228b",
                "supsetneqq;": "\u2acc",
                "supsim;": "\u2ac8",
                "supsub;": "\u2ad4",
                "supsup;": "\u2ad6",
                "swarhk;": "\u2926",
                "swarr;": "\u2199",
                "swArr;": "\u21d9",
                "swarrow;": "\u2199",
                "swnwar;": "\u292a",
                "szlig;": "\u00df",
                szlig: "\u00df",
                "Tab;": "	",
                "target;": "\u2316",
                "Tau;": "\u03a4",
                "tau;": "\u03c4",
                "tbrk;": "\u23b4",
                "Tcaron;": "\u0164",
                "tcaron;": "\u0165",
                "Tcedil;": "\u0162",
                "tcedil;": "\u0163",
                "Tcy;": "\u0422",
                "tcy;": "\u0442",
                "tdot;": "\u20db",
                "telrec;": "\u2315",
                "Tfr;": "\ud835\udd17",
                "tfr;": "\ud835\udd31",
                "there4;": "\u2234",
                "therefore;": "\u2234",
                "Therefore;": "\u2234",
                "Theta;": "\u0398",
                "theta;": "\u03b8",
                "thetasym;": "\u03d1",
                "thetav;": "\u03d1",
                "thickapprox;": "\u2248",
                "thicksim;": "\u223c",
                "ThickSpace;": "\u205f\u200a",
                "ThinSpace;": "\u2009",
                "thinsp;": "\u2009",
                "thkap;": "\u2248",
                "thksim;": "\u223c",
                "THORN;": "\u00de",
                THORN: "\u00de",
                "thorn;": "\u00fe",
                thorn: "\u00fe",
                "tilde;": "\u02dc",
                "Tilde;": "\u223c",
                "TildeEqual;": "\u2243",
                "TildeFullEqual;": "\u2245",
                "TildeTilde;": "\u2248",
                "timesbar;": "\u2a31",
                "timesb;": "\u22a0",
                "times;": "\u00d7",
                times: "\u00d7",
                "timesd;": "\u2a30",
                "tint;": "\u222d",
                "toea;": "\u2928",
                "topbot;": "\u2336",
                "topcir;": "\u2af1",
                "top;": "\u22a4",
                "Topf;": "\ud835\udd4b",
                "topf;": "\ud835\udd65",
                "topfork;": "\u2ada",
                "tosa;": "\u2929",
                "tprime;": "\u2034",
                "trade;": "\u2122",
                "TRADE;": "\u2122",
                "triangle;": "\u25b5",
                "triangledown;": "\u25bf",
                "triangleleft;": "\u25c3",
                "trianglelefteq;": "\u22b4",
                "triangleq;": "\u225c",
                "triangleright;": "\u25b9",
                "trianglerighteq;": "\u22b5",
                "tridot;": "\u25ec",
                "trie;": "\u225c",
                "triminus;": "\u2a3a",
                "TripleDot;": "\u20db",
                "triplus;": "\u2a39",
                "trisb;": "\u29cd",
                "tritime;": "\u2a3b",
                "trpezium;": "\u23e2",
                "Tscr;": "\ud835\udcaf",
                "tscr;": "\ud835\udcc9",
                "TScy;": "\u0426",
                "tscy;": "\u0446",
                "TSHcy;": "\u040b",
                "tshcy;": "\u045b",
                "Tstrok;": "\u0166",
                "tstrok;": "\u0167",
                "twixt;": "\u226c",
                "twoheadleftarrow;": "\u219e",
                "twoheadrightarrow;": "\u21a0",
                "Uacute;": "\u00da",
                Uacute: "\u00da",
                "uacute;": "\u00fa",
                uacute: "\u00fa",
                "uarr;": "\u2191",
                "Uarr;": "\u219f",
                "uArr;": "\u21d1",
                "Uarrocir;": "\u2949",
                "Ubrcy;": "\u040e",
                "ubrcy;": "\u045e",
                "Ubreve;": "\u016c",
                "ubreve;": "\u016d",
                "Ucirc;": "\u00db",
                Ucirc: "\u00db",
                "ucirc;": "\u00fb",
                ucirc: "\u00fb",
                "Ucy;": "\u0423",
                "ucy;": "\u0443",
                "udarr;": "\u21c5",
                "Udblac;": "\u0170",
                "udblac;": "\u0171",
                "udhar;": "\u296e",
                "ufisht;": "\u297e",
                "Ufr;": "\ud835\udd18",
                "ufr;": "\ud835\udd32",
                "Ugrave;": "\u00d9",
                Ugrave: "\u00d9",
                "ugrave;": "\u00f9",
                ugrave: "\u00f9",
                "uHar;": "\u2963",
                "uharl;": "\u21bf",
                "uharr;": "\u21be",
                "uhblk;": "\u2580",
                "ulcorn;": "\u231c",
                "ulcorner;": "\u231c",
                "ulcrop;": "\u230f",
                "ultri;": "\u25f8",
                "Umacr;": "\u016a",
                "umacr;": "\u016b",
                "uml;": "\u00a8",
                uml: "\u00a8",
                "UnderBar;": "_",
                "UnderBrace;": "\u23df",
                "UnderBracket;": "\u23b5",
                "UnderParenthesis;": "\u23dd",
                "Union;": "\u22c3",
                "UnionPlus;": "\u228e",
                "Uogon;": "\u0172",
                "uogon;": "\u0173",
                "Uopf;": "\ud835\udd4c",
                "uopf;": "\ud835\udd66",
                "UpArrowBar;": "\u2912",
                "uparrow;": "\u2191",
                "UpArrow;": "\u2191",
                "Uparrow;": "\u21d1",
                "UpArrowDownArrow;": "\u21c5",
                "updownarrow;": "\u2195",
                "UpDownArrow;": "\u2195",
                "Updownarrow;": "\u21d5",
                "UpEquilibrium;": "\u296e",
                "upharpoonleft;": "\u21bf",
                "upharpoonright;": "\u21be",
                "uplus;": "\u228e",
                "UpperLeftArrow;": "\u2196",
                "UpperRightArrow;": "\u2197",
                "upsi;": "\u03c5",
                "Upsi;": "\u03d2",
                "upsih;": "\u03d2",
                "Upsilon;": "\u03a5",
                "upsilon;": "\u03c5",
                "UpTeeArrow;": "\u21a5",
                "UpTee;": "\u22a5",
                "upuparrows;": "\u21c8",
                "urcorn;": "\u231d",
                "urcorner;": "\u231d",
                "urcrop;": "\u230e",
                "Uring;": "\u016e",
                "uring;": "\u016f",
                "urtri;": "\u25f9",
                "Uscr;": "\ud835\udcb0",
                "uscr;": "\ud835\udcca",
                "utdot;": "\u22f0",
                "Utilde;": "\u0168",
                "utilde;": "\u0169",
                "utri;": "\u25b5",
                "utrif;": "\u25b4",
                "uuarr;": "\u21c8",
                "Uuml;": "\u00dc",
                Uuml: "\u00dc",
                "uuml;": "\u00fc",
                uuml: "\u00fc",
                "uwangle;": "\u29a7",
                "vangrt;": "\u299c",
                "varepsilon;": "\u03f5",
                "varkappa;": "\u03f0",
                "varnothing;": "\u2205",
                "varphi;": "\u03d5",
                "varpi;": "\u03d6",
                "varpropto;": "\u221d",
                "varr;": "\u2195",
                "vArr;": "\u21d5",
                "varrho;": "\u03f1",
                "varsigma;": "\u03c2",
                "varsubsetneq;": "\u228a\ufe00",
                "varsubsetneqq;": "\u2acb\ufe00",
                "varsupsetneq;": "\u228b\ufe00",
                "varsupsetneqq;": "\u2acc\ufe00",
                "vartheta;": "\u03d1",
                "vartriangleleft;": "\u22b2",
                "vartriangleright;": "\u22b3",
                "vBar;": "\u2ae8",
                "Vbar;": "\u2aeb",
                "vBarv;": "\u2ae9",
                "Vcy;": "\u0412",
                "vcy;": "\u0432",
                "vdash;": "\u22a2",
                "vDash;": "\u22a8",
                "Vdash;": "\u22a9",
                "VDash;": "\u22ab",
                "Vdashl;": "\u2ae6",
                "veebar;": "\u22bb",
                "vee;": "\u2228",
                "Vee;": "\u22c1",
                "veeeq;": "\u225a",
                "vellip;": "\u22ee",
                "verbar;": "|",
                "Verbar;": "\u2016",
                "vert;": "|",
                "Vert;": "\u2016",
                "VerticalBar;": "\u2223",
                "VerticalLine;": "|",
                "VerticalSeparator;": "\u2758",
                "VerticalTilde;": "\u2240",
                "VeryThinSpace;": "\u200a",
                "Vfr;": "\ud835\udd19",
                "vfr;": "\ud835\udd33",
                "vltri;": "\u22b2",
                "vnsub;": "\u2282\u20d2",
                "vnsup;": "\u2283\u20d2",
                "Vopf;": "\ud835\udd4d",
                "vopf;": "\ud835\udd67",
                "vprop;": "\u221d",
                "vrtri;": "\u22b3",
                "Vscr;": "\ud835\udcb1",
                "vscr;": "\ud835\udccb",
                "vsubnE;": "\u2acb\ufe00",
                "vsubne;": "\u228a\ufe00",
                "vsupnE;": "\u2acc\ufe00",
                "vsupne;": "\u228b\ufe00",
                "Vvdash;": "\u22aa",
                "vzigzag;": "\u299a",
                "Wcirc;": "\u0174",
                "wcirc;": "\u0175",
                "wedbar;": "\u2a5f",
                "wedge;": "\u2227",
                "Wedge;": "\u22c0",
                "wedgeq;": "\u2259",
                "weierp;": "\u2118",
                "Wfr;": "\ud835\udd1a",
                "wfr;": "\ud835\udd34",
                "Wopf;": "\ud835\udd4e",
                "wopf;": "\ud835\udd68",
                "wp;": "\u2118",
                "wr;": "\u2240",
                "wreath;": "\u2240",
                "Wscr;": "\ud835\udcb2",
                "wscr;": "\ud835\udccc",
                "xcap;": "\u22c2",
                "xcirc;": "\u25ef",
                "xcup;": "\u22c3",
                "xdtri;": "\u25bd",
                "Xfr;": "\ud835\udd1b",
                "xfr;": "\ud835\udd35",
                "xharr;": "\u27f7",
                "xhArr;": "\u27fa",
                "Xi;": "\u039e",
                "xi;": "\u03be",
                "xlarr;": "\u27f5",
                "xlArr;": "\u27f8",
                "xmap;": "\u27fc",
                "xnis;": "\u22fb",
                "xodot;": "\u2a00",
                "Xopf;": "\ud835\udd4f",
                "xopf;": "\ud835\udd69",
                "xoplus;": "\u2a01",
                "xotime;": "\u2a02",
                "xrarr;": "\u27f6",
                "xrArr;": "\u27f9",
                "Xscr;": "\ud835\udcb3",
                "xscr;": "\ud835\udccd",
                "xsqcup;": "\u2a06",
                "xuplus;": "\u2a04",
                "xutri;": "\u25b3",
                "xvee;": "\u22c1",
                "xwedge;": "\u22c0",
                "Yacute;": "\u00dd",
                Yacute: "\u00dd",
                "yacute;": "\u00fd",
                yacute: "\u00fd",
                "YAcy;": "\u042f",
                "yacy;": "\u044f",
                "Ycirc;": "\u0176",
                "ycirc;": "\u0177",
                "Ycy;": "\u042b",
                "ycy;": "\u044b",
                "yen;": "\u00a5",
                yen: "\u00a5",
                "Yfr;": "\ud835\udd1c",
                "yfr;": "\ud835\udd36",
                "YIcy;": "\u0407",
                "yicy;": "\u0457",
                "Yopf;": "\ud835\udd50",
                "yopf;": "\ud835\udd6a",
                "Yscr;": "\ud835\udcb4",
                "yscr;": "\ud835\udcce",
                "YUcy;": "\u042e",
                "yucy;": "\u044e",
                "yuml;": "\u00ff",
                yuml: "\u00ff",
                "Yuml;": "\u0178",
                "Zacute;": "\u0179",
                "zacute;": "\u017a",
                "Zcaron;": "\u017d",
                "zcaron;": "\u017e",
                "Zcy;": "\u0417",
                "zcy;": "\u0437",
                "Zdot;": "\u017b",
                "zdot;": "\u017c",
                "zeetrf;": "\u2128",
                "ZeroWidthSpace;": "\u200b",
                "Zeta;": "\u0396",
                "zeta;": "\u03b6",
                "zfr;": "\ud835\udd37",
                "Zfr;": "\u2128",
                "ZHcy;": "\u0416",
                "zhcy;": "\u0436",
                "zigrarr;": "\u21dd",
                "zopf;": "\ud835\udd6b",
                "Zopf;": "\u2124",
                "Zscr;": "\ud835\udcb5",
                "zscr;": "\ud835\udccf",
                "zwj;": "\u200d",
                "zwnj;": "\u200c"
            }
        }
        , {}],
        13: [function(e, t, n) {
            function u(e, t) {
                return r.isUndefined(t) ? "" + t : r.isNumber(t) && (isNaN(t) || !isFinite(t)) ? t.toString() : r.isFunction(t) || r.isRegExp(t) ? t.toString() : t
            }
            function a(e, t) {
                return r.isString(e) ? e.length < t ? e : e.slice(0, t) : e
            }
            function f(e) {
                return a(JSON.stringify(e.actual, u), 128) + " " + e.operator + " " + a(JSON.stringify(e.expected, u), 128)
            }
            function l(e, t, n, r, i) {
                throw new o.AssertionError({
                    message: n,
                    actual: e,
                    expected: t,
                    operator: r,
                    stackStartFunction: i
                })
            }
            function c(e, t) {
                e || l(e, !0, t, "==", o.ok)
            }
            function h(e, t) {
                if (e === t)
                    return !0;
                if (r.isBuffer(e) && r.isBuffer(t)) {
                    if (e.length != t.length)
                        return !1;
                    for (var n = 0; n < e.length; n++)
                        if (e[n] !== t[n])
                            return !1;
                    return !0
                }
                return r.isDate(e) && r.isDate(t) ? e.getTime() === t.getTime() : r.isRegExp(e) && r.isRegExp(t) ? e.source === t.source && e.global === t.global && e.multiline === t.multiline && e.lastIndex === t.lastIndex && e.ignoreCase === t.ignoreCase : !r.isObject(e) && !r.isObject(t) ? e == t : d(e, t)
            }
            function p(e) {
                return Object.prototype.toString.call(e) == "[object Arguments]"
            }
            function d(e, t) {
                if (r.isNullOrUndefined(e) || r.isNullOrUndefined(t))
                    return !1;
                if (e.prototype !== t.prototype)
                    return !1;
                if (p(e))
                    return p(t) ? (e = i.call(e),
                    t = i.call(t),
                    h(e, t)) : !1;
                try {
                    var n = g(e), s = g(t), o, u
                } catch (a) {
                    return !1
                }
                if (n.length != s.length)
                    return !1;
                n.sort(),
                s.sort();
                for (u = n.length - 1; u >= 0; u--)
                    if (n[u] != s[u])
                        return !1;
                for (u = n.length - 1; u >= 0; u--) {
                    o = n[u];
                    if (!h(e[o], t[o]))
                        return !1
                }
                return !0
            }
            function v(e, t) {
                return !e || !t ? !1 : Object.prototype.toString.call(t) == "[object RegExp]" ? t.test(e) : e instanceof t ? !0 : t.call({}, e) === !0 ? !0 : !1
            }
            function m(e, t, n, i) {
                var s;
                r.isString(n) && (i = n,
                n = null);
                try {
                    t()
                } catch (o) {
                    s = o
                }
                i = (n && n.name ? " (" + n.name + ")." : ".") + (i ? " " + i : "."),
                e && !s && l(s, n, "Missing expected exception" + i),
                !e && v(s, n) && l(s, n, "Got unwanted exception" + i);
                if (e && s && n && !v(s, n) || !e && s)
                    throw s
            }
            var r = e("util/")
              , i = Array.prototype.slice
              , s = Object.prototype.hasOwnProperty
              , o = t.exports = c;
            o.AssertionError = function(t) {
                this.name = "AssertionError",
                this.actual = t.actual,
                this.expected = t.expected,
                this.operator = t.operator,
                t.message ? (this.message = t.message,
                this.generatedMessage = !1) : (this.message = f(this),
                this.generatedMessage = !0);
                var n = t.stackStartFunction || l;
                if (Error.captureStackTrace)
                    Error.captureStackTrace(this, n);
                else {
                    var r = new Error;
                    if (r.stack) {
                        var i = r.stack
                          , s = n.name
                          , o = i.indexOf("\n" + s);
                        if (o >= 0) {
                            var u = i.indexOf("\n", o + 1);
                            i = i.substring(u + 1)
                        }
                        this.stack = i
                    }
                }
            }
            ,
            r.inherits(o.AssertionError, Error),
            o.fail = l,
            o.ok = c,
            o.equal = function(t, n, r) {
                t != n && l(t, n, r, "==", o.equal)
            }
            ,
            o.notEqual = function(t, n, r) {
                t == n && l(t, n, r, "!=", o.notEqual)
            }
            ,
            o.deepEqual = function(t, n, r) {
                h(t, n) || l(t, n, r, "deepEqual", o.deepEqual)
            }
            ,
            o.notDeepEqual = function(t, n, r) {
                h(t, n) && l(t, n, r, "notDeepEqual", o.notDeepEqual)
            }
            ,
            o.strictEqual = function(t, n, r) {
                t !== n && l(t, n, r, "===", o.strictEqual)
            }
            ,
            o.notStrictEqual = function(t, n, r) {
                t === n && l(t, n, r, "!==", o.notStrictEqual)
            }
            ,
            o.throws = function(e, t, n) {
                m.apply(this, [!0].concat(i.call(arguments)))
            }
            ,
            o.doesNotThrow = function(e, t) {
                m.apply(this, [!1].concat(i.call(arguments)))
            }
            ,
            o.ifError = function(e) {
                if (e)
                    throw e
            }
            ;
            var g = Object.keys || function(e) {
                var t = [];
                for (var n in e)
                    s.call(e, n) && t.push(n);
                return t
            }
        }
        , {
            "util/": 15
        }],
        14: [function(e, t, n) {
            t.exports = function(t) {
                return t && typeof t == "object" && typeof t.copy == "function" && typeof t.fill == "function" && typeof t.readUInt8 == "function"
            }
        }
        , {}],
        15: [function(e, t, n) {
            (function(t, r) {
                function u(e, t) {
                    var r = {
                        seen: [],
                        stylize: f
                    };
                    return arguments.length >= 3 && (r.depth = arguments[2]),
                    arguments.length >= 4 && (r.colors = arguments[3]),
                    y(t) ? r.showHidden = t : t && n._extend(r, t),
                    T(r.showHidden) && (r.showHidden = !1),
                    T(r.depth) && (r.depth = 2),
                    T(r.colors) && (r.colors = !1),
                    T(r.customInspect) && (r.customInspect = !0),
                    r.colors && (r.stylize = a),
                    c(r, e, r.depth)
                }
                function a(e, t) {
                    var n = u.styles[t];
                    return n ? "[" + u.colors[n][0] + "m" + e + "[" + u.colors[n][1] + "m" : e
                }
                function f(e, t) {
                    return e
                }
                function l(e) {
                    var t = {};
                    return e.forEach(function(e, n) {
                        t[e] = !0
                    }),
                    t
                }
                function c(e, t, r) {
                    if (e.customInspect && t && A(t.inspect) && t.inspect !== n.inspect && (!t.constructor || t.constructor.prototype !== t)) {
                        var i = t.inspect(r, e);
                        return S(i) || (i = c(e, i, r)),
                        i
                    }
                    var s = h(e, t);
                    if (s)
                        return s;
                    var o = Object.keys(t)
                      , u = l(o);
                    e.showHidden && (o = Object.getOwnPropertyNames(t));
                    if (L(t) && (o.indexOf("message") >= 0 || o.indexOf("description") >= 0))
                        return p(t);
                    if (o.length === 0) {
                        if (A(t)) {
                            var a = t.name ? ": " + t.name : "";
                            return e.stylize("[Function" + a + "]", "special")
                        }
                        if (N(t))
                            return e.stylize(RegExp.prototype.toString.call(t), "regexp");
                        if (k(t))
                            return e.stylize(Date.prototype.toString.call(t), "date");
                        if (L(t))
                            return p(t)
                    }
                    var f = ""
                      , y = !1
                      , b = ["{", "}"];
                    g(t) && (y = !0,
                    b = ["[", "]"]);
                    if (A(t)) {
                        var w = t.name ? ": " + t.name : "";
                        f = " [Function" + w + "]"
                    }
                    N(t) && (f = " " + RegExp.prototype.toString.call(t)),
                    k(t) && (f = " " + Date.prototype.toUTCString.call(t)),
                    L(t) && (f = " " + p(t));
                    if (o.length !== 0 || !!y && t.length != 0) {
                        if (r < 0)
                            return N(t) ? e.stylize(RegExp.prototype.toString.call(t), "regexp") : e.stylize("[Object]", "special");
                        e.seen.push(t);
                        var E;
                        return y ? E = d(e, t, r, u, o) : E = o.map(function(n) {
                            return v(e, t, r, u, n, y)
                        }),
                        e.seen.pop(),
                        m(E, f, b)
                    }
                    return b[0] + f + b[1]
                }
                function h(e, t) {
                    if (T(t))
                        return e.stylize("undefined", "undefined");
                    if (S(t)) {
                        var n = "'" + JSON.stringify(t).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
                        return e.stylize(n, "string")
                    }
                    if (E(t))
                        return e.stylize("" + t, "number");
                    if (y(t))
                        return e.stylize("" + t, "boolean");
                    if (b(t))
                        return e.stylize("null", "null")
                }
                function p(e) {
                    return "[" + Error.prototype.toString.call(e) + "]"
                }
                function d(e, t, n, r, i) {
                    var s = [];
                    for (var o = 0, u = t.length; o < u; ++o)
                        H(t, String(o)) ? s.push(v(e, t, n, r, String(o), !0)) : s.push("");
                    return i.forEach(function(i) {
                        i.match(/^\d+$/) || s.push(v(e, t, n, r, i, !0))
                    }),
                    s
                }
                function v(e, t, n, r, i, s) {
                    var o, u, a;
                    a = Object.getOwnPropertyDescriptor(t, i) || {
                        value: t[i]
                    },
                    a.get ? a.set ? u = e.stylize("[Getter/Setter]", "special") : u = e.stylize("[Getter]", "special") : a.set && (u = e.stylize("[Setter]", "special")),
                    H(r, i) || (o = "[" + i + "]"),
                    u || (e.seen.indexOf(a.value) < 0 ? (b(n) ? u = c(e, a.value, null) : u = c(e, a.value, n - 1),
                    u.indexOf("\n") > -1 && (s ? u = u.split("\n").map(function(e) {
                        return "  " + e
                    }).join("\n").substr(2) : u = "\n" + u.split("\n").map(function(e) {
                        return "   " + e
                    }).join("\n"))) : u = e.stylize("[Circular]", "special"));
                    if (T(o)) {
                        if (s && i.match(/^\d+$/))
                            return u;
                        o = JSON.stringify("" + i),
                        o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (o = o.substr(1, o.length - 2),
                        o = e.stylize(o, "name")) : (o = o.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"),
                        o = e.stylize(o, "string"))
                    }
                    return o + ": " + u
                }
                function m(e, t, n) {
                    var r = 0
                      , i = e.reduce(function(e, t) {
                        return r++,
                        t.indexOf("\n") >= 0 && r++,
                        e + t.replace(/\u001b\[\d\d?m/g, "").length + 1
                    }, 0);
                    return i > 60 ? n[0] + (t === "" ? "" : t + "\n ") + " " + e.join(",\n  ") + " " + n[1] : n[0] + t + " " + e.join(", ") + " " + n[1]
                }
                function g(e) {
                    return Array.isArray(e)
                }
                function y(e) {
                    return typeof e == "boolean"
                }
                function b(e) {
                    return e === null
                }
                function w(e) {
                    return e == null
                }
                function E(e) {
                    return typeof e == "number"
                }
                function S(e) {
                    return typeof e == "string"
                }
                function x(e) {
                    return typeof e == "symbol"
                }
                function T(e) {
                    return e === void 0
                }
                function N(e) {
                    return C(e) && M(e) === "[object RegExp]"
                }
                function C(e) {
                    return typeof e == "object" && e !== null
                }
                function k(e) {
                    return C(e) && M(e) === "[object Date]"
                }
                function L(e) {
                    return C(e) && (M(e) === "[object Error]" || e instanceof Error)
                }
                function A(e) {
                    return typeof e == "function"
                }
                function O(e) {
                    return e === null || typeof e == "boolean" || typeof e == "number" || typeof e == "string" || typeof e == "symbol" || typeof e == "undefined"
                }
                function M(e) {
                    return Object.prototype.toString.call(e)
                }
                function _(e) {
                    return e < 10 ? "0" + e.toString(10) : e.toString(10)
                }
                function P() {
                    var e = new Date
                      , t = [_(e.getHours()), _(e.getMinutes()), _(e.getSeconds())].join(":");
                    return [e.getDate(), D[e.getMonth()], t].join(" ")
                }
                function H(e, t) {
                    return Object.prototype.hasOwnProperty.call(e, t)
                }
                var i = /%[sdj%]/g;
                n.format = function(e) {
                    if (!S(e)) {
                        var t = [];
                        for (var n = 0; n < arguments.length; n++)
                            t.push(u(arguments[n]));
                        return t.join(" ")
                    }
                    var n = 1
                      , r = arguments
                      , s = r.length
                      , o = String(e).replace(i, function(e) {
                        if (e === "%%")
                            return "%";
                        if (n >= s)
                            return e;
                        switch (e) {
                        case "%s":
                            return String(r[n++]);
                        case "%d":
                            return Number(r[n++]);
                        case "%j":
                            try {
                                return JSON.stringify(r[n++])
                            } catch (t) {
                                return "[Circular]"
                            }
                            ;
                        default:
                            return e
                        }
                    });
                    for (var a = r[n]; n < s; a = r[++n])
                        b(a) || !C(a) ? o += " " + a : o += " " + u(a);
                    return o
                }
                ,
                n.deprecate = function(e, i) {
                    function o() {
                        if (!s) {
                            if (t.throwDeprecation)
                                throw new Error(i);
                            t.traceDeprecation ? console.trace(i) : console.error(i),
                            s = !0
                        }
                        return e.apply(this, arguments)
                    }
                    if (T(r.process))
                        return function() {
                            return n.deprecate(e, i).apply(this, arguments)
                        }
                        ;
                    if (t.noDeprecation === !0)
                        return e;
                    var s = !1;
                    return o
                }
                ;
                var s = {}, o;
                n.debuglog = function(e) {
                    T(o) && (o = t.env.NODE_DEBUG || ""),
                    e = e.toUpperCase();
                    if (!s[e])
                        if ((new RegExp("\\b" + e + "\\b","i")).test(o)) {
                            var r = t.pid;
                            s[e] = function() {
                                var t = n.format.apply(n, arguments);
                                console.error("%s %d: %s", e, r, t)
                            }
                        } else
                            s[e] = function() {}
                            ;
                    return s[e]
                }
                ,
                n.inspect = u,
                u.colors = {
                    bold: [1, 22],
                    italic: [3, 23],
                    underline: [4, 24],
                    inverse: [7, 27],
                    white: [37, 39],
                    grey: [90, 39],
                    black: [30, 39],
                    blue: [34, 39],
                    cyan: [36, 39],
                    green: [32, 39],
                    magenta: [35, 39],
                    red: [31, 39],
                    yellow: [33, 39]
                },
                u.styles = {
                    special: "cyan",
                    number: "yellow",
                    "boolean": "yellow",
                    "undefined": "grey",
                    "null": "bold",
                    string: "green",
                    date: "magenta",
                    regexp: "red"
                },
                n.isArray = g,
                n.isBoolean = y,
                n.isNull = b,
                n.isNullOrUndefined = w,
                n.isNumber = E,
                n.isString = S,
                n.isSymbol = x,
                n.isUndefined = T,
                n.isRegExp = N,
                n.isObject = C,
                n.isDate = k,
                n.isError = L,
                n.isFunction = A,
                n.isPrimitive = O,
                n.isBuffer = e("./support/isBuffer");
                var D = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
                n.log = function() {
                    console.log("%s - %s", P(), n.format.apply(n, arguments))
                }
                ,
                n.inherits = e("inherits"),
                n._extend = function(e, t) {
                    if (!t || !C(t))
                        return e;
                    var n = Object.keys(t)
                      , r = n.length;
                    while (r--)
                        e[n[r]] = t[n[r]];
                    return e
                }
            }
            ).call(this, e("/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"), typeof self != "undefined" ? self : typeof window != "undefined" ? window : {})
        }
        , {
            "./support/isBuffer": 14,
            "/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js": 18,
            inherits: 17
        }],
        16: [function(e, t, n) {
            function r() {
                this._events = this._events || {},
                this._maxListeners = this._maxListeners || undefined
            }
            function i(e) {
                return typeof e == "function"
            }
            function s(e) {
                return typeof e == "number"
            }
            function o(e) {
                return typeof e == "object" && e !== null
            }
            function u(e) {
                return e === void 0
            }
            t.exports = r,
            r.EventEmitter = r,
            r.prototype._events = undefined,
            r.prototype._maxListeners = undefined,
            r.defaultMaxListeners = 10,
            r.prototype.setMaxListeners = function(e) {
                if (!s(e) || e < 0 || isNaN(e))
                    throw TypeError("n must be a positive number");
                return this._maxListeners = e,
                this
            }
            ,
            r.prototype.emit = function(e) {
                var t, n, r, s, a, f;
                this._events || (this._events = {});
                if (e === "error")
                    if (!this._events.error || o(this._events.error) && !this._events.error.length)
                        throw t = arguments[1],
                        t instanceof Error ? t : TypeError('Uncaught, unspecified "error" event.');
                n = this._events[e];
                if (u(n))
                    return !1;
                if (i(n))
                    switch (arguments.length) {
                    case 1:
                        n.call(this);
                        break;
                    case 2:
                        n.call(this, arguments[1]);
                        break;
                    case 3:
                        n.call(this, arguments[1], arguments[2]);
                        break;
                    default:
                        r = arguments.length,
                        s = new Array(r - 1);
                        for (a = 1; a < r; a++)
                            s[a - 1] = arguments[a];
                        n.apply(this, s)
                    }
                else if (o(n)) {
                    r = arguments.length,
                    s = new Array(r - 1);
                    for (a = 1; a < r; a++)
                        s[a - 1] = arguments[a];
                    f = n.slice(),
                    r = f.length;
                    for (a = 0; a < r; a++)
                        f[a].apply(this, s)
                }
                return !0
            }
            ,
            r.prototype.addListener = function(e, t) {
                var n;
                if (!i(t))
                    throw TypeError("listener must be a function");
                this._events || (this._events = {}),
                this._events.newListener && this.emit("newListener", e, i(t.listener) ? t.listener : t),
                this._events[e] ? o(this._events[e]) ? this._events[e].push(t) : this._events[e] = [this._events[e], t] : this._events[e] = t;
                if (o(this._events[e]) && !this._events[e].warned) {
                    var n;
                    u(this._maxListeners) ? n = r.defaultMaxListeners : n = this._maxListeners,
                    n && n > 0 && this._events[e].length > n && (this._events[e].warned = !0,
                    console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.", this._events[e].length),
                    console.trace())
                }
                return this
            }
            ,
            r.prototype.on = r.prototype.addListener,
            r.prototype.once = function(e, t) {
                function r() {
                    this.removeListener(e, r),
                    n || (n = !0,
                    t.apply(this, arguments))
                }
                if (!i(t))
                    throw TypeError("listener must be a function");
                var n = !1;
                return r.listener = t,
                this.on(e, r),
                this
            }
            ,
            r.prototype.removeListener = function(e, t) {
                var n, r, s, u;
                if (!i(t))
                    throw TypeError("listener must be a function");
                if (!this._events || !this._events[e])
                    return this;
                n = this._events[e],
                s = n.length,
                r = -1;
                if (n === t || i(n.listener) && n.listener === t)
                    delete this._events[e],
                    this._events.removeListener && this.emit("removeListener", e, t);
                else if (o(n)) {
                    for (u = s; u-- > 0; )
                        if (n[u] === t || n[u].listener && n[u].listener === t) {
                            r = u;
                            break
                        }
                    if (r < 0)
                        return this;
                    n.length === 1 ? (n.length = 0,
                    delete this._events[e]) : n.splice(r, 1),
                    this._events.removeListener && this.emit("removeListener", e, t)
                }
                return this
            }
            ,
            r.prototype.removeAllListeners = function(e) {
                var t, n;
                if (!this._events)
                    return this;
                if (!this._events.removeListener)
                    return arguments.length === 0 ? this._events = {} : this._events[e] && delete this._events[e],
                    this;
                if (arguments.length === 0) {
                    for (t in this._events) {
                        if (t === "removeListener")
                            continue;
                        this.removeAllListeners(t)
                    }
                    return this.removeAllListeners("removeListener"),
                    this._events = {},
                    this
                }
                n = this._events[e];
                if (i(n))
                    this.removeListener(e, n);
                else
                    while (n.length)
                        this.removeListener(e, n[n.length - 1]);
                return delete this._events[e],
                this
            }
            ,
            r.prototype.listeners = function(e) {
                var t;
                return !this._events || !this._events[e] ? t = [] : i(this._events[e]) ? t = [this._events[e]] : t = this._events[e].slice(),
                t
            }
            ,
            r.listenerCount = function(e, t) {
                var n;
                return !e._events || !e._events[t] ? n = 0 : i(e._events[t]) ? n = 1 : n = e._events[t].length,
                n
            }
        }
        , {}],
        17: [function(e, t, n) {
            typeof Object.create == "function" ? t.exports = function(t, n) {
                t.super_ = n,
                t.prototype = Object.create(n.prototype, {
                    constructor: {
                        value: t,
                        enumerable: !1,
                        writable: !0,
                        configurable: !0
                    }
                })
            }
            : t.exports = function(t, n) {
                t.super_ = n;
                var r = function() {};
                r.prototype = n.prototype,
                t.prototype = new r,
                t.prototype.constructor = t
            }
        }
        , {}],
        18: [function(e, t, n) {
            function i() {}
            var r = t.exports = {};
            r.nextTick = function() {
                var e = typeof window != "undefined" && window.setImmediate
                  , t = typeof window != "undefined" && window.postMessage && window.addEventListener;
                if (e)
                    return function(e) {
                        return window.setImmediate(e)
                    }
                    ;
                if (t) {
                    var n = [];
                    return window.addEventListener("message", function(e) {
                        var t = e.source;
                        if ((t === window || t === null) && e.data === "process-tick") {
                            e.stopPropagation();
                            if (n.length > 0) {
                                var r = n.shift();
                                r()
                            }
                        }
                    }, !0),
                    function(t) {
                        n.push(t),
                        window.postMessage("process-tick", "*")
                    }
                }
                return function(t) {
                    setTimeout(t, 0)
                }
            }(),
            r.title = "browser",
            r.browser = !0,
            r.env = {},
            r.argv = [],
            r.on = i,
            r.once = i,
            r.off = i,
            r.emit = i,
            r.binding = function(e) {
                throw new Error("process.binding is not supported")
            }
            ,
            r.cwd = function() {
                return "/"
            }
            ,
            r.chdir = function(e) {
                throw new Error("process.chdir is not supported")
            }
        }
        , {}],
        19: [function(e, t, n) {
            t.exports = e(14)
        }
        , {}],
        20: [function(e, t, n) {
            t.exports = e(15)
        }
        , {
            "./support/isBuffer": 19,
            "/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js": 18,
            inherits: 17
        }]
    }, {}, [9])(9)
}),
define("ace/mode/html_worker", [], function(e, t, n) {
    "use strict";
    var r = e("../lib/oop")
      , i = e("../lib/lang")
      , s = e("../worker/mirror").Mirror
      , o = e("./html/saxparser").SAXParser
      , u = {
        "expected-doctype-but-got-start-tag": "info",
        "expected-doctype-but-got-chars": "info",
        "non-html-root": "info"
    }
      , a = t.Worker = function(e) {
        s.call(this, e),
        this.setTimeout(400),
        this.context = null
    }
    ;
    r.inherits(a, s),
    function() {
        this.setOptions = function(e) {
            this.context = e.context
        }
        ,
        this.onUpdate = function() {
            var e = this.doc.getValue();
            if (!e)
                return;
            var t = new o
              , n = []
              , r = function() {};
            t.contentHandler = {
                startDocument: r,
                endDocument: r,
                startElement: r,
                endElement: r,
                characters: r
            },
            t.errorHandler = {
                error: function(e, t, r) {
                    n.push({
                        row: t.line,
                        column: t.column,
                        text: e,
                        type: u[r] || "error"
                    })
                }
            },
            this.context ? t.parseFragment(e, this.context) : t.parse(e),
            this.sender.emit("error", n)
        }
    }
    .call(a.prototype)
}),
define("ace/lib/es5-shim", [], function(e, t, n) {
    function r() {}
    function w(e) {
        try {
            return Object.defineProperty(e, "sentinel", {}),
            "sentinel"in e
        } catch (t) {}
    }
    function H(e) {
        return e = +e,
        e !== e ? e = 0 : e !== 0 && e !== 1 / 0 && e !== -1 / 0 && (e = (e > 0 || -1) * Math.floor(Math.abs(e))),
        e
    }
    function B(e) {
        var t = typeof e;
        return e === null || t === "undefined" || t === "boolean" || t === "number" || t === "string"
    }
    function j(e) {
        var t, n, r;
        if (B(e))
            return e;
        n = e.valueOf;
        if (typeof n == "function") {
            t = n.call(e);
            if (B(t))
                return t
        }
        r = e.toString;
        if (typeof r == "function") {
            t = r.call(e);
            if (B(t))
                return t
        }
        throw new TypeError
    }
    Function.prototype.bind || (Function.prototype.bind = function(t) {
        var n = this;
        if (typeof n != "function")
            throw new TypeError("Function.prototype.bind called on incompatible " + n);
        var i = u.call(arguments, 1)
          , s = function() {
            if (this instanceof s) {
                var e = n.apply(this, i.concat(u.call(arguments)));
                return Object(e) === e ? e : this
            }
            return n.apply(t, i.concat(u.call(arguments)))
        };
        return n.prototype && (r.prototype = n.prototype,
        s.prototype = new r,
        r.prototype = null),
        s
    }
    );
    var i = Function.prototype.call, s = Array.prototype, o = Object.prototype, u = s.slice, a = i.bind(o.toString), f = i.bind(o.hasOwnProperty), l, c, h, p, d;
    if (d = f(o, "__defineGetter__"))
        l = i.bind(o.__defineGetter__),
        c = i.bind(o.__defineSetter__),
        h = i.bind(o.__lookupGetter__),
        p = i.bind(o.__lookupSetter__);
    if ([1, 2].splice(0).length != 2)
        if (!function() {
            function e(e) {
                var t = new Array(e + 2);
                return t[0] = t[1] = 0,
                t
            }
            var t = [], n;
            t.splice.apply(t, e(20)),
            t.splice.apply(t, e(26)),
            n = t.length,
            t.splice(5, 0, "XXX"),
            n + 1 == t.length;
            if (n + 1 == t.length)
                return !0
        }())
            Array.prototype.splice = function(e, t) {
                var n = this.length;
                e > 0 ? e > n && (e = n) : e == void 0 ? e = 0 : e < 0 && (e = Math.max(n + e, 0)),
                e + t < n || (t = n - e);
                var r = this.slice(e, e + t)
                  , i = u.call(arguments, 2)
                  , s = i.length;
                if (e === n)
                    s && this.push.apply(this, i);
                else {
                    var o = Math.min(t, n - e)
                      , a = e + o
                      , f = a + s - o
                      , l = n - a
                      , c = n - o;
                    if (f < a)
                        for (var h = 0; h < l; ++h)
                            this[f + h] = this[a + h];
                    else if (f > a)
                        for (h = l; h--; )
                            this[f + h] = this[a + h];
                    if (s && e === c)
                        this.length = c,
                        this.push.apply(this, i);
                    else {
                        this.length = c + s;
                        for (h = 0; h < s; ++h)
                            this[e + h] = i[h]
                    }
                }
                return r
            }
            ;
        else {
            var v = Array.prototype.splice;
            Array.prototype.splice = function(e, t) {
                return arguments.length ? v.apply(this, [e === void 0 ? 0 : e, t === void 0 ? this.length - e : t].concat(u.call(arguments, 2))) : []
            }
        }
    Array.isArray || (Array.isArray = function(t) {
        return a(t) == "[object Array]"
    }
    );
    var m = Object("a")
      , g = m[0] != "a" || !(0 in m);
    Array.prototype.forEach || (Array.prototype.forEach = function(t) {
        var n = F(this)
          , r = g && a(this) == "[object String]" ? this.split("") : n
          , i = arguments[1]
          , s = -1
          , o = r.length >>> 0;
        if (a(t) != "[object Function]")
            throw new TypeError;
        while (++s < o)
            s in r && t.call(i, r[s], s, n)
    }
    ),
    Array.prototype.map || (Array.prototype.map = function(t) {
        var n = F(this)
          , r = g && a(this) == "[object String]" ? this.split("") : n
          , i = r.length >>> 0
          , s = Array(i)
          , o = arguments[1];
        if (a(t) != "[object Function]")
            throw new TypeError(t + " is not a function");
        for (var u = 0; u < i; u++)
            u in r && (s[u] = t.call(o, r[u], u, n));
        return s
    }
    ),
    Array.prototype.filter || (Array.prototype.filter = function(t) {
        var n = F(this), r = g && a(this) == "[object String]" ? this.split("") : n, i = r.length >>> 0, s = [], o, u = arguments[1];
        if (a(t) != "[object Function]")
            throw new TypeError(t + " is not a function");
        for (var f = 0; f < i; f++)
            f in r && (o = r[f],
            t.call(u, o, f, n) && s.push(o));
        return s
    }
    ),
    Array.prototype.every || (Array.prototype.every = function(t) {
        var n = F(this)
          , r = g && a(this) == "[object String]" ? this.split("") : n
          , i = r.length >>> 0
          , s = arguments[1];
        if (a(t) != "[object Function]")
            throw new TypeError(t + " is not a function");
        for (var o = 0; o < i; o++)
            if (o in r && !t.call(s, r[o], o, n))
                return !1;
        return !0
    }
    ),
    Array.prototype.some || (Array.prototype.some = function(t) {
        var n = F(this)
          , r = g && a(this) == "[object String]" ? this.split("") : n
          , i = r.length >>> 0
          , s = arguments[1];
        if (a(t) != "[object Function]")
            throw new TypeError(t + " is not a function");
        for (var o = 0; o < i; o++)
            if (o in r && t.call(s, r[o], o, n))
                return !0;
        return !1
    }
    ),
    Array.prototype.reduce || (Array.prototype.reduce = function(t) {
        var n = F(this)
          , r = g && a(this) == "[object String]" ? this.split("") : n
          , i = r.length >>> 0;
        if (a(t) != "[object Function]")
            throw new TypeError(t + " is not a function");
        if (!i && arguments.length == 1)
            throw new TypeError("reduce of empty array with no initial value");
        var s = 0, o;
        if (arguments.length >= 2)
            o = arguments[1];
        else
            do {
                if (s in r) {
                    o = r[s++];
                    break
                }
                if (++s >= i)
                    throw new TypeError("reduce of empty array with no initial value")
            } while (!0);
        for (; s < i; s++)
            s in r && (o = t.call(void 0, o, r[s], s, n));
        return o
    }
    ),
    Array.prototype.reduceRight || (Array.prototype.reduceRight = function(t) {
        var n = F(this)
          , r = g && a(this) == "[object String]" ? this.split("") : n
          , i = r.length >>> 0;
        if (a(t) != "[object Function]")
            throw new TypeError(t + " is not a function");
        if (!i && arguments.length == 1)
            throw new TypeError("reduceRight of empty array with no initial value");
        var s, o = i - 1;
        if (arguments.length >= 2)
            s = arguments[1];
        else
            do {
                if (o in r) {
                    s = r[o--];
                    break
                }
                if (--o < 0)
                    throw new TypeError("reduceRight of empty array with no initial value")
            } while (!0);
        do
            o in this && (s = t.call(void 0, s, r[o], o, n));
        while (o--);
        return s
    }
    );
    if (!Array.prototype.indexOf || [0, 1].indexOf(1, 2) != -1)
        Array.prototype.indexOf = function(t) {
            var n = g && a(this) == "[object String]" ? this.split("") : F(this)
              , r = n.length >>> 0;
            if (!r)
                return -1;
            var i = 0;
            arguments.length > 1 && (i = H(arguments[1])),
            i = i >= 0 ? i : Math.max(0, r + i);
            for (; i < r; i++)
                if (i in n && n[i] === t)
                    return i;
            return -1
        }
        ;
    if (!Array.prototype.lastIndexOf || [0, 1].lastIndexOf(0, -3) != -1)
        Array.prototype.lastIndexOf = function(t) {
            var n = g && a(this) == "[object String]" ? this.split("") : F(this)
              , r = n.length >>> 0;
            if (!r)
                return -1;
            var i = r - 1;
            arguments.length > 1 && (i = Math.min(i, H(arguments[1]))),
            i = i >= 0 ? i : r - Math.abs(i);
            for (; i >= 0; i--)
                if (i in n && t === n[i])
                    return i;
            return -1
        }
        ;
    Object.getPrototypeOf || (Object.getPrototypeOf = function(t) {
        return t.__proto__ || (t.constructor ? t.constructor.prototype : o)
    }
    );
    if (!Object.getOwnPropertyDescriptor) {
        var y = "Object.getOwnPropertyDescriptor called on a non-object: ";
        Object.getOwnPropertyDescriptor = function(t, n) {
            if (typeof t != "object" && typeof t != "function" || t === null)
                throw new TypeError(y + t);
            if (!f(t, n))
                return;
            var r, i, s;
            r = {
                enumerable: !0,
                configurable: !0
            };
            if (d) {
                var u = t.__proto__;
                t.__proto__ = o;
                var i = h(t, n)
                  , s = p(t, n);
                t.__proto__ = u;
                if (i || s)
                    return i && (r.get = i),
                    s && (r.set = s),
                    r
            }
            return r.value = t[n],
            r
        }
    }
    Object.getOwnPropertyNames || (Object.getOwnPropertyNames = function(t) {
        return Object.keys(t)
    }
    );
    if (!Object.create) {
        var b;
        Object.prototype.__proto__ === null ? b = function() {
            return {
                __proto__: null
            }
        }
        : b = function() {
            var e = {};
            for (var t in e)
                e[t] = null;
            return e.constructor = e.hasOwnProperty = e.propertyIsEnumerable = e.isPrototypeOf = e.toLocaleString = e.toString = e.valueOf = e.__proto__ = null,
            e
        }
        ,
        Object.create = function(t, n) {
            var r;
            if (t === null)
                r = b();
            else {
                if (typeof t != "object")
                    throw new TypeError("typeof prototype[" + typeof t + "] != 'object'");
                var i = function() {};
                i.prototype = t,
                r = new i,
                r.__proto__ = t
            }
            return n !== void 0 && Object.defineProperties(r, n),
            r
        }
    }
    if (Object.defineProperty) {
        var E = w({})
          , S = typeof document == "undefined" || w(document.createElement("div"));
        if (!E || !S)
            var x = Object.defineProperty
    }
    if (!Object.defineProperty || x) {
        var T = "Property description must be an object: "
          , N = "Object.defineProperty called on non-object: "
          , C = "getters & setters can not be defined on this javascript engine";
        Object.defineProperty = function(t, n, r) {
            if (typeof t != "object" && typeof t != "function" || t === null)
                throw new TypeError(N + t);
            if (typeof r != "object" && typeof r != "function" || r === null)
                throw new TypeError(T + r);
            if (x)
                try {
                    return x.call(Object, t, n, r)
                } catch (i) {}
            if (f(r, "value"))
                if (d && (h(t, n) || p(t, n))) {
                    var s = t.__proto__;
                    t.__proto__ = o,
                    delete t[n],
                    t[n] = r.value,
                    t.__proto__ = s
                } else
                    t[n] = r.value;
            else {
                if (!d)
                    throw new TypeError(C);
                f(r, "get") && l(t, n, r.get),
                f(r, "set") && c(t, n, r.set)
            }
            return t
        }
    }
    Object.defineProperties || (Object.defineProperties = function(t, n) {
        for (var r in n)
            f(n, r) && Object.defineProperty(t, r, n[r]);
        return t
    }
    ),
    Object.seal || (Object.seal = function(t) {
        return t
    }
    ),
    Object.freeze || (Object.freeze = function(t) {
        return t
    }
    );
    try {
        Object.freeze(function() {})
    } catch (k) {
        Object.freeze = function(t) {
            return function(n) {
                return typeof n == "function" ? n : t(n)
            }
        }(Object.freeze)
    }
    Object.preventExtensions || (Object.preventExtensions = function(t) {
        return t
    }
    ),
    Object.isSealed || (Object.isSealed = function(t) {
        return !1
    }
    ),
    Object.isFrozen || (Object.isFrozen = function(t) {
        return !1
    }
    ),
    Object.isExtensible || (Object.isExtensible = function(t) {
        if (Object(t) === t)
            throw new TypeError;
        var n = "";
        while (f(t, n))
            n += "?";
        t[n] = !0;
        var r = f(t, n);
        return delete t[n],
        r
    }
    );
    if (!Object.keys) {
        var L = !0
          , A = ["toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor"]
          , O = A.length;
        for (var M in {
            toString: null
        })
            L = !1;
        Object.keys = function I(e) {
            if (typeof e != "object" && typeof e != "function" || e === null)
                throw new TypeError("Object.keys called on a non-object");
            var I = [];
            for (var t in e)
                f(e, t) && I.push(t);
            if (L)
                for (var n = 0, r = O; n < r; n++) {
                    var i = A[n];
                    f(e, i) && I.push(i)
                }
            return I
        }
    }
    Date.now || (Date.now = function() {
        return (new Date).getTime()
    }
    );
    var _ = "	\n\x0b\f\r \u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";
    if (!String.prototype.trim) {
        _ = "[" + _ + "]";
        var D = new RegExp("^" + _ + _ + "*")
          , P = new RegExp(_ + _ + "*$");
        String.prototype.trim = function() {
            return String(this).replace(D, "").replace(P, "")
        }
    }
    var F = function(e) {
        if (e == null)
            throw new TypeError("can't convert " + e + " to object");
        return Object(e)
    }
})
