/** 
 * Kendo UI v2016.1.420 (http://www.telerik.com/kendo-ui)                                                                                                                                               
 * Copyright 2016 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.
*/
! function(e, define) {
    define("kendo.core.min", ["jquery"], e)
}(function() {
    return function(e, t, n) {
        function i() {}

        function r(e, t) {
            if (t) return "'" + e.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t") + "'";
            var n = e.charAt(0),
                i = e.substring(1);
            return "=" === n ? "+(" + i + ")+" : ":" === n ? "+$kendoHtmlEncode(" + i + ")+" : ";" + e + ";$kendoOutput+="
        }

        function o(e, t, n) {
            return e += "", t = t || 2, n = t - e.length, n ? U[t].substring(0, n) + e : e
        }

        function a(e) {
            var t = e.css(ve.support.transitions.css + "box-shadow") || e.css("box-shadow"),
                n = t ? t.match(Ae) || [0, 0, 0, 0, 0] : [0, 0, 0, 0, 0],
                i = xe.max(+n[3], +(n[4] || 0));
            return {
                left: -n[1] + i,
                right: +n[1] + i,
                bottom: +n[2] + i
            }
        }

        function s(t, n) {
            var i, r, o, s, l, c, d, u, h = Se.browser,
                f = "rtl" == t.css("direction");
            return t.parent().hasClass("k-animation-container") ? (d = t.parent(".k-animation-container"), u = d[0].style, d.is(":hidden") && d.show(), i = Te.test(u.width) || Te.test(u.height), i || d.css({
                width: t.outerWidth(),
                height: t.outerHeight(),
                boxSizing: "content-box",
                mozBoxSizing: "content-box",
                webkitBoxSizing: "content-box"
            })) : (r = a(t), o = t[0].style.width, s = t[0].style.height, l = Te.test(o), c = Te.test(s), h.opera && (r.left = r.right = r.bottom = 5), i = l || c, !l && (!n || n && o) && (o = t.outerWidth()), !c && (!n || n && s) && (s = t.outerHeight()), t.wrap(e("<div/>").addClass("k-animation-container").css({
                width: o,
                height: s,
                marginLeft: r.left * (f ? 1 : -1),
                paddingLeft: r.left,
                paddingRight: r.right,
                paddingBottom: r.bottom
            })), i && t.css({
                width: "100%",
                height: "100%",
                boxSizing: "border-box",
                mozBoxSizing: "border-box",
                webkitBoxSizing: "border-box"
            })), h.msie && xe.floor(h.version) <= 7 && (t.css({
                zoom: 1
            }), t.children(".k-menu").width(t.width())), t.parent()
        }

        function l(e) {
            var t = 1,
                n = arguments.length;
            for (t = 1; n > t; t++) c(e, arguments[t]);
            return e
        }

        function c(e, t) {
            var n, i, r, o, a, s = ve.data.ObservableArray,
                l = ve.data.LazyObservableArray,
                d = ve.data.DataSource,
                u = ve.data.HierarchicalDataSource;
            for (n in t) i = t[n], r = typeof i, o = r === Re && null !== i ? i.constructor : null, o && o !== Array && o !== s && o !== l && o !== d && o !== u ? i instanceof Date ? e[n] = new Date(i.getTime()) : M(i.clone) ? e[n] = i.clone() : (a = e[n], e[n] = typeof a === Re ? a || {} : {}, c(e[n], i)) : r !== Be && (e[n] = i);
            return e
        }

        function d(e, t, i) {
            for (var r in t)
                if (t.hasOwnProperty(r) && t[r].test(e)) return r;
            return i !== n ? i : e
        }

        function u(e) {
            return e.replace(/([a-z][A-Z])/g, function(e) {
                return e.charAt(0) + "-" + e.charAt(1).toLowerCase()
            })
        }

        function h(e) {
            return e.replace(/\-(\w)/g, function(e, t) {
                return t.toUpperCase()
            })
        }

        function f(t, n) {
            var i, r = {};
            return document.defaultView && document.defaultView.getComputedStyle ? (i = document.defaultView.getComputedStyle(t, ""), n && e.each(n, function(e, t) {
                r[t] = i.getPropertyValue(t)
            })) : (i = t.currentStyle, n && e.each(n, function(e, t) {
                r[t] = i[h(t)]
            })), ve.size(r) || (r = i), r
        }

        function p(e) {
            if (e && e.className && "string" == typeof e.className && e.className.indexOf("k-auto-scrollable") > -1) return !0;
            var t = f(e, ["overflow"]).overflow;
            return "auto" == t || "scroll" == t
        }

        function m(t, i) {
            var r, o = Se.browser.webkit,
                a = Se.browser.mozilla,
                s = t instanceof e ? t[0] : t;
            if (t) return r = Se.isRtl(t), i === n ? r && o ? s.scrollWidth - s.clientWidth - s.scrollLeft : Math.abs(s.scrollLeft) : (s.scrollLeft = r && o ? s.scrollWidth - s.clientWidth - i : r && a ? -i : i, n)
        }

        function g(e) {
            var t, n = 0;
            for (t in e) e.hasOwnProperty(t) && "toJSON" != t && n++;
            return n
        }

        function v(e, n, i) {
            n || (n = "offset");
            var r = e[n]();
            return Se.browser.msie && (Se.pointers || Se.msPointers) && !i && (r.top -= t.pageYOffset - document.documentElement.scrollTop, r.left -= t.pageXOffset - document.documentElement.scrollLeft), r
        }

        function _(e) {
            var t = {};
            return be("string" == typeof e ? e.split(" ") : e, function(e) {
                t[e] = this
            }), t
        }

        function b(e) {
            return new ve.effects.Element(e)
        }

        function w(e, t, n, i) {
            return typeof e === Ie && (M(t) && (i = t, t = 400, n = !1), M(n) && (i = n, n = !1), typeof t === ze && (n = t, t = 400), e = {
                effects: e,
                duration: t,
                reverse: n,
                complete: i
            }), _e({
                effects: {},
                duration: 400,
                reverse: !1,
                init: ke,
                teardown: ke,
                hide: !1
            }, e, {
                completeCallback: e.complete,
                complete: ke
            })
        }

        function y(t, n, i, r, o) {
            for (var a, s = 0, l = t.length; l > s; s++) a = e(t[s]), a.queue(function() {
                j.promise(a, w(n, i, r, o))
            });
            return t
        }

        function k(e, t, n, i) {
            return t && (t = t.split(" "), be(t, function(t, n) {
                e.toggleClass(n, i)
            })), e
        }

        function x(e) {
            return ("" + e).replace(q, "&amp;").replace(G, "&lt;").replace(K, "&gt;").replace($, "&quot;").replace(Y, "&#39;")
        }

        function C(e, t) {
            var i;
            return 0 === t.indexOf("data") && (t = t.substring(4), t = t.charAt(0).toLowerCase() + t.substring(1)), t = t.replace(re, "-$1"), i = e.getAttribute("data-" + ve.ns + t), null === i ? i = n : "null" === i ? i = null : "true" === i ? i = !0 : "false" === i ? i = !1 : Ee.test(i) ? i = parseFloat(i) : ne.test(i) && !ie.test(i) && (i = Function("return (" + i + ")")()), i
        }

        function S(t, i) {
            var r, o, a = {};
            for (r in i) o = C(t, r), o !== n && (te.test(r) && (o = ve.template(e("#" + o).html())), a[r] = o);
            return a
        }

        function T(t, n) {
            return e.contains(t, n) ? -1 : 1
        }

        function D() {
            var t = e(this);
            return e.inArray(t.attr("data-" + ve.ns + "role"), ["slider", "rangeslider"]) > -1 || t.is(":visible")
        }

        function A(e, t) {
            var n = e.nodeName.toLowerCase();
            return (/input|select|textarea|button|object/.test(n) ? !e.disabled : "a" === n ? e.href || t : t) && E(e)
        }

        function E(t) {
            return e.expr.filters.visible(t) && !e(t).parents().addBack().filter(function() {
                return "hidden" === e.css(this, "visibility")
            }).length
        }

        function F(e, t) {
            return new F.fn.init(e, t)
        }
        var I, M, R, P, z, B, L, H, N, O, V, U, W, j, q, G, $, Y, K, Q, X, J, Z, ee, te, ne, ie, re, oe, ae, se, le, ce, de, ue, he, fe, pe, me, ge, ve = t.kendo = t.kendo || {
                cultures: {}
            },
            _e = e.extend,
            be = e.each,
            we = e.isArray,
            ye = e.proxy,
            ke = e.noop,
            xe = Math,
            Ce = t.JSON || {},
            Se = {},
            Te = /%/,
            De = /\{(\d+)(:[^\}]+)?\}/g,
            Ae = /(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,
            Ee = /^(\+|-?)\d+(\.?)\d*$/,
            Fe = "function",
            Ie = "string",
            Me = "number",
            Re = "object",
            Pe = "null",
            ze = "boolean",
            Be = "undefined",
            Le = {},
            He = {},
            Ne = [].slice;
        ve.version = "2016.1.420".replace(/^\s+|\s+$/g, ""), i.extend = function(e) {
            var t, n, i = function() {},
                r = this,
                o = e && e.init ? e.init : function() {
                    r.apply(this, arguments)
                };
            i.prototype = r.prototype, n = o.fn = o.prototype = new i;
            for (t in e) n[t] = null != e[t] && e[t].constructor === Object ? _e(!0, {}, i.prototype[t], e[t]) : e[t];
            return n.constructor = o, o.extend = r.extend, o
        }, i.prototype._initOptions = function(e) {
            this.options = l({}, this.options, e)
        }, M = ve.isFunction = function(e) {
            return "function" == typeof e
        }, R = function() {
            this._defaultPrevented = !0
        }, P = function() {
            return this._defaultPrevented === !0
        }, z = i.extend({
            init: function() {
                this._events = {}
            },
            bind: function(e, t, i) {
                var r, o, a, s, l, c = this,
                    d = typeof e === Ie ? [e] : e,
                    u = typeof t === Fe;
                if (t === n) {
                    for (r in e) c.bind(r, e[r]);
                    return c
                }
                for (r = 0, o = d.length; o > r; r++) e = d[r], s = u ? t : t[e], s && (i && (a = s, s = function() {
                    c.unbind(e, s), a.apply(c, arguments)
                }, s.original = a), l = c._events[e] = c._events[e] || [], l.push(s));
                return c
            },
            one: function(e, t) {
                return this.bind(e, t, !0)
            },
            first: function(e, t) {
                var n, i, r, o, a = this,
                    s = typeof e === Ie ? [e] : e,
                    l = typeof t === Fe;
                for (n = 0, i = s.length; i > n; n++) e = s[n], r = l ? t : t[e], r && (o = a._events[e] = a._events[e] || [], o.unshift(r));
                return a
            },
            trigger: function(e, t) {
                var n, i, r = this,
                    o = r._events[e];
                if (o) {
                    for (t = t || {}, t.sender = r, t._defaultPrevented = !1, t.preventDefault = R, t.isDefaultPrevented = P, o = o.slice(), n = 0, i = o.length; i > n; n++) o[n].call(r, t);
                    return t._defaultPrevented === !0
                }
                return !1
            },
            unbind: function(e, t) {
                var i, r = this,
                    o = r._events[e];
                if (e === n) r._events = {};
                else if (o)
                    if (t)
                        for (i = o.length - 1; i >= 0; i--)(o[i] === t || o[i].original === t) && o.splice(i, 1);
                    else r._events[e] = [];
                return r
            }
        }), B = /^\w+/, L = /\$\{([^}]*)\}/g, H = /\\\}/g, N = /__CURLY__/g, O = /\\#/g, V = /__SHARP__/g, U = ["", "0", "00", "000", "0000"], I = {
            paramName: "data",
            useWithBlock: !0,
            render: function(e, t) {
                var n, i, r = "";
                for (n = 0, i = t.length; i > n; n++) r += e(t[n]);
                return r
            },
            compile: function(e, t) {
                var n, i, o, a = _e({}, this, t),
                    s = a.paramName,
                    l = s.match(B)[0],
                    c = a.useWithBlock,
                    d = "var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;";
                if (M(e)) return e;
                for (d += c ? "with(" + s + "){" : "", d += "$kendoOutput=", i = e.replace(H, "__CURLY__").replace(L, "#=$kendoHtmlEncode($1)#").replace(N, "}").replace(O, "__SHARP__").split("#"), o = 0; i.length > o; o++) d += r(i[o], o % 2 === 0);
                d += c ? ";}" : ";", d += "return $kendoOutput;", d = d.replace(V, "#");
                try {
                    return n = Function(l, d), n._slotCount = Math.floor(i.length / 2), n
                } catch (u) {
                    throw Error(ve.format("Invalid template:'{0}' Generated code:'{1}'", e, d))
                }
            }
        },
            function() {
                function e(e) {
                    return a.lastIndex = 0, a.test(e) ? '"' + e.replace(a, function(e) {
                        var t = s[e];
                        return typeof t === Ie ? t : "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4)
                    }) + '"' : '"' + e + '"'
                }

                function t(o, a) {
                    var s, c, d, u, h, f, p = n,
                        m = a[o];
                    if (m && typeof m === Re && typeof m.toJSON === Fe && (m = m.toJSON(o)), typeof r === Fe && (m = r.call(a, o, m)), f = typeof m, f === Ie) return e(m);
                    if (f === Me) return isFinite(m) ? m + "" : Pe;
                    if (f === ze || f === Pe) return m + "";
                    if (f === Re) {
                        if (!m) return Pe;
                        if (n += i, h = [], "[object Array]" === l.apply(m)) {
                            for (u = m.length, s = 0; u > s; s++) h[s] = t(s, m) || Pe;
                            return d = 0 === h.length ? "[]" : n ? "[\n" + n + h.join(",\n" + n) + "\n" + p + "]" : "[" + h.join(",") + "]", n = p, d
                        }
                        if (r && typeof r === Re)
                            for (u = r.length, s = 0; u > s; s++) typeof r[s] === Ie && (c = r[s], d = t(c, m), d && h.push(e(c) + (n ? ": " : ":") + d));
                        else
                            for (c in m) Object.hasOwnProperty.call(m, c) && (d = t(c, m), d && h.push(e(c) + (n ? ": " : ":") + d));
                        return d = 0 === h.length ? "{}" : n ? "{\n" + n + h.join(",\n" + n) + "\n" + p + "}" : "{" + h.join(",") + "}", n = p, d
                    }
                }
                var n, i, r, a = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
                    s = {
                        "\b": "\\b",
                        "	": "\\t",
                        "\n": "\\n",
                        "\f": "\\f",
                        "\r": "\\r",
                        '"': '\\"',
                        "\\": "\\\\"
                    },
                    l = {}.toString;
                typeof Date.prototype.toJSON !== Fe && (Date.prototype.toJSON = function() {
                    var e = this;
                    return isFinite(e.valueOf()) ? o(e.getUTCFullYear(), 4) + "-" + o(e.getUTCMonth() + 1) + "-" + o(e.getUTCDate()) + "T" + o(e.getUTCHours()) + ":" + o(e.getUTCMinutes()) + ":" + o(e.getUTCSeconds()) + "Z" : null
                }, String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function() {
                    return this.valueOf()
                }), typeof Ce.stringify !== Fe && (Ce.stringify = function(e, o, a) {
                    var s;
                    if (n = "", i = "", typeof a === Me)
                        for (s = 0; a > s; s += 1) i += " ";
                    else typeof a === Ie && (i = a);
                    if (r = o, o && typeof o !== Fe && (typeof o !== Re || typeof o.length !== Me)) throw Error("JSON.stringify");
                    return t("", {
                        "": e
                    })
                })
            }(),
            function() {
                function e(e) {
                    if (e) {
                        if (e.numberFormat) return e;
                        if (typeof e === Ie) {
                            var t = ve.cultures;
                            return t[e] || t[e.split("-")[0]] || null
                        }
                        return null
                    }
                    return null
                }

                function t(t) {
                    return t && (t = e(t)), t || ve.cultures.current
                }

                function i(e, i, r) {
                    r = t(r);
                    var a = r.calendars.standard,
                        s = a.days,
                        l = a.months;
                    return i = a.patterns[i] || i, i.replace(c, function(t) {
                        var i, r, c;
                        return "d" === t ? r = e.getDate() : "dd" === t ? r = o(e.getDate()) : "ddd" === t ? r = s.namesAbbr[e.getDay()] : "dddd" === t ? r = s.names[e.getDay()] : "M" === t ? r = e.getMonth() + 1 : "MM" === t ? r = o(e.getMonth() + 1) : "MMM" === t ? r = l.namesAbbr[e.getMonth()] : "MMMM" === t ? r = l.names[e.getMonth()] : "yy" === t ? r = o(e.getFullYear() % 100) : "yyyy" === t ? r = o(e.getFullYear(), 4) : "h" === t ? r = e.getHours() % 12 || 12 : "hh" === t ? r = o(e.getHours() % 12 || 12) : "H" === t ? r = e.getHours() : "HH" === t ? r = o(e.getHours()) : "m" === t ? r = e.getMinutes() : "mm" === t ? r = o(e.getMinutes()) : "s" === t ? r = e.getSeconds() : "ss" === t ? r = o(e.getSeconds()) : "f" === t ? r = xe.floor(e.getMilliseconds() / 100) : "ff" === t ? (r = e.getMilliseconds(), r > 99 && (r = xe.floor(r / 10)), r = o(r)) : "fff" === t ? r = o(e.getMilliseconds(), 3) : "tt" === t ? r = e.getHours() < 12 ? a.AM[0] : a.PM[0] : "zzz" === t ? (i = e.getTimezoneOffset(), c = 0 > i, r = ("" + xe.abs(i / 60)).split(".")[0], i = xe.abs(i) - 60 * r, r = (c ? "+" : "-") + o(r), r += ":" + o(i)) : ("zz" === t || "z" === t) && (r = e.getTimezoneOffset() / 60, c = 0 > r, r = ("" + xe.abs(r)).split(".")[0], r = (c ? "+" : "-") + ("zz" === t ? o(r) : r)), r !== n ? r : t.slice(1, t.length - 1)
                    })
                }

                function r(e, i, r) {
                    r = t(r);
                    var o, l, c, b, w, y, k, x, C, S, T, D, A, E, F, I, M, R, P, z, B, L, H, N = r.numberFormat,
                        O = N[p],
                        V = N.decimals,
                        U = N.pattern[0],
                        W = [],
                        j = 0 > e,
                        q = f,
                        G = f,
                        $ = -1;
                    if (e === n) return f;
                    if (!isFinite(e)) return e;
                    if (!i) return r.name.length ? e.toLocaleString() : "" + e;
                    if (w = d.exec(i)) {
                        if (i = w[1].toLowerCase(), l = "c" === i, c = "p" === i, (l || c) && (N = l ? N.currency : N.percent, O = N[p], V = N.decimals, o = N.symbol, U = N.pattern[j ? 0 : 1]), b = w[2], b && (V = +b), "e" === i) return b ? e.toExponential(V) : e.toExponential();
                        if (c && (e *= 100), e = s(e, V), j = 0 > e, e = e.split(p), y = e[0], k = e[1], j && (y = y.substring(1)), G = a(y, 0, y.length, N), k && (G += O + k), "n" === i && !j) return G;
                        for (e = f, S = 0, T = U.length; T > S; S++) D = U.charAt(S), e += "n" === D ? G : "$" === D || "%" === D ? o : D;
                        return e
                    }
                    if (j && (e = -e), (i.indexOf("'") > -1 || i.indexOf('"') > -1 || i.indexOf("\\") > -1) && (i = i.replace(u, function(e) {
                        var t = e.charAt(0).replace("\\", ""),
                            n = e.slice(1).replace(t, "");
                        return W.push(n), _
                    })), i = i.split(";"), j && i[1]) i = i[1], E = !0;
                    else if (0 === e) {
                        if (i = i[2] || i[0], -1 == i.indexOf(g) && -1 == i.indexOf(v)) return i
                    } else i = i[0];
                    if (z = i.indexOf("%"), B = i.indexOf("$"), c = -1 != z, l = -1 != B, c && (e *= 100), l && "\\" === i[B - 1] && (i = i.split("\\").join(""), l = !1), (l || c) && (N = l ? N.currency : N.percent, O = N[p], V = N.decimals, o = N.symbol), A = i.indexOf(m) > -1, A && (i = i.replace(h, f)), F = i.indexOf(p), T = i.length, -1 != F ? (k = ("" + e).split("e"), k = k[1] ? s(e, Math.abs(k[1])) : k[0], k = k.split(p)[1] || f, M = i.lastIndexOf(v) - F, I = i.lastIndexOf(g) - F, R = M > -1, P = I > -1, S = k.length, R || P || (i = i.substring(0, F) + i.substring(F + 1), T = i.length, F = -1, S = 0), R && M > I ? S = M : I > M && (P && S > I ? S = I : R && M > S && (S = M)), S > -1 && (e = s(e, S))) : e = s(e), I = i.indexOf(g), L = M = i.indexOf(v), $ = -1 == I && -1 != M ? M : -1 != I && -1 == M ? I : I > M ? M : I, I = i.lastIndexOf(g), M = i.lastIndexOf(v), H = -1 == I && -1 != M ? M : -1 != I && -1 == M ? I : I > M ? I : M, $ == T && (H = $), -1 != $) {
                        for (G = ("" + e).split(p), y = G[0], k = G[1] || f, x = y.length, C = k.length, j && -1 * e >= 0 && (j = !1), e = i.substring(0, $), j && !E && (e += "-"), S = $; T > S; S++) {
                            if (D = i.charAt(S), -1 == F) {
                                if (x > H - S) {
                                    e += y;
                                    break
                                }
                            } else if (-1 != M && S > M && (q = f), x >= F - S && F - S > -1 && (e += y, S = F), F === S) {
                                e += (k ? O : f) + k, S += H - F + 1;
                                continue
                            }
                            D === v ? (e += D, q = D) : D === g && (e += q)
                        }
                        if (A && (e = a(e, $, H, N)), H >= $ && (e += i.substring(H + 1)), l || c) {
                            for (G = f, S = 0, T = e.length; T > S; S++) D = e.charAt(S), G += "$" === D || "%" === D ? o : D;
                            e = G
                        }
                        if (T = W.length)
                            for (S = 0; T > S; S++) e = e.replace(_, W[S])
                    }
                    return e
                }
                var a, s, l, c = /dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|zzz|zz|z|"[^"]*"|'[^']*'/g,
                    d = /^(n|c|p|e)(\d*)$/i,
                    u = /(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g,
                    h = /\,/g,
                    f = "",
                    p = ".",
                    m = ",",
                    g = "#",
                    v = "0",
                    _ = "??",
                    b = "en-US",
                    w = {}.toString;
                ve.cultures["en-US"] = {
                    name: b,
                    numberFormat: {
                        pattern: ["-n"],
                        decimals: 2,
                        ",": ",",
                        ".": ".",
                        groupSize: [3],
                        percent: {
                            pattern: ["-n %", "n %"],
                            decimals: 2,
                            ",": ",",
                            ".": ".",
                            groupSize: [3],
                            symbol: "%"
                        },
                        currency: {
                            name: "US Dollar",
                            abbr: "USD",
                            pattern: ["($n)", "$n"],
                            decimals: 2,
                            ",": ",",
                            ".": ".",
                            groupSize: [3],
                            symbol: "$"
                        }
                    },
                    calendars: {
                        standard: {
                            days: {
                                names: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
                                namesAbbr: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
                                namesShort: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
                            },
                            months: {
                                names: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
                                namesAbbr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
                            },
                            AM: ["AM", "am", "AM"],
                            PM: ["PM", "pm", "PM"],
                            patterns: {
                                d: "M/d/yyyy",
                                D: "dddd, MMMM dd, yyyy",
                                F: "dddd, MMMM dd, yyyy h:mm:ss tt",
                                g: "M/d/yyyy h:mm tt",
                                G: "M/d/yyyy h:mm:ss tt",
                                m: "MMMM dd",
                                M: "MMMM dd",
                                s: "yyyy'-'MM'-'ddTHH':'mm':'ss",
                                t: "h:mm tt",
                                T: "h:mm:ss tt",
                                u: "yyyy'-'MM'-'dd HH':'mm':'ss'Z'",
                                y: "MMMM, yyyy",
                                Y: "MMMM, yyyy"
                            },
                            "/": "/",
                            ":": ":",
                            firstDay: 0,
                            twoDigitYearMax: 2029
                        }
                    }
                }, ve.culture = function(t) {
                    var i, r = ve.cultures;
                    return t === n ? r.current : (i = e(t) || r[b], i.calendar = i.calendars.standard, r.current = i, n)
                }, ve.findCulture = e, ve.getCulture = t, ve.culture(b), a = function(e, t, i, r) {
                    var o, a, s, l, c, d, u = e.indexOf(r[p]),
                        h = r.groupSize.slice(),
                        f = h.shift();
                    if (i = -1 !== u ? u : i + 1, o = e.substring(t, i), a = o.length, a >= f) {
                        for (s = a, l = []; s > -1;)
                            if (c = o.substring(s - f, s), c && l.push(c), s -= f, d = h.shift(), f = d !== n ? d : f, 0 === f) {
                                l.push(o.substring(0, s));
                                break
                            } o = l.reverse().join(r[m]), e = e.substring(0, t) + o + e.substring(i)
                    }
                    return e
                }, s = function(e, t) {
                    return t = t || 0, e = ("" + e).split("e"), e = Math.round(+(e[0] + "e" + (e[1] ? +e[1] + t : t))), e = ("" + e).split("e"), e = +(e[0] + "e" + (e[1] ? +e[1] - t : -t)), e.toFixed(t)
                }, l = function(e, t, o) {
                    if (t) {
                        if ("[object Date]" === w.call(e)) return i(e, t, o);
                        if (typeof e === Me) return r(e, t, o)
                    }
                    return e !== n ? e : ""
                }, ve.format = function(e) {
                    var t = arguments;
                    return e.replace(De, function(e, n, i) {
                        var r = t[parseInt(n, 10) + 1];
                        return l(r, i ? i.substring(1) : "")
                    })
                }, ve._extractFormat = function(e) {
                    return "{0:" === e.slice(0, 3) && (e = e.slice(3, e.length - 1)), e
                }, ve._activeElement = function() {
                    try {
                        return document.activeElement
                    } catch (e) {
                        return document.documentElement.activeElement
                    }
                }, ve._round = s, ve.toString = l
            }(),
            function() {
                function t(e, t, n) {
                    return !(e >= t && n >= e)
                }

                function i(e) {
                    return e.charAt(0)
                }

                function r(t) {
                    return e.map(t, i)
                }

                function o(e, t) {
                    t || 23 !== e.getHours() || e.setHours(e.getHours() + 2)
                }

                function a(e) {
                    for (var t = 0, n = e.length, i = []; n > t; t++) i[t] = (e[t] + "").toLowerCase();
                    return i
                }

                function s(e) {
                    var t, n = {};
                    for (t in e) n[t] = a(e[t]);
                    return n
                }

                function l(e, i, a) {
                    if (!e) return null;
                    var l, c, d, u, p, m, g, _, b, w, y, k, x, C = function(e) {
                            for (var t = 0; i[B] === e;) t++, B++;
                            return t > 0 && (B -= 1), t
                        },
                        S = function(t) {
                            var n = v[t] || RegExp("^\\d{1," + t + "}"),
                                i = e.substr(L, t).match(n);
                            return i ? (i = i[0], L += i.length, parseInt(i, 10)) : null
                        },
                        T = function(t, n) {
                            for (var i, r, o, a = 0, s = t.length, l = 0, c = 0; s > a; a++) i = t[a], r = i.length, o = e.substr(L, r), n && (o = o.toLowerCase()), o == i && r > l && (l = r, c = a);
                            return l ? (L += l, c + 1) : null
                        },
                        D = function() {
                            var t = !1;
                            return e.charAt(L) === i[B] && (L++, t = !0), t
                        },
                        A = a.calendars.standard,
                        E = null,
                        F = null,
                        I = null,
                        M = null,
                        R = null,
                        P = null,
                        z = null,
                        B = 0,
                        L = 0,
                        H = !1,
                        N = new Date,
                        O = A.twoDigitYearMax || 2029,
                        V = N.getFullYear();
                    for (i || (i = "d"), u = A.patterns[i], u && (i = u), i = i.split(""), d = i.length; d > B; B++)
                        if (l = i[B], H) "'" === l ? H = !1 : D();
                        else if ("d" === l) {
                            if (c = C("d"), A._lowerDays || (A._lowerDays = s(A.days)), null !== I && c > 2) continue;
                            if (I = 3 > c ? S(2) : T(A._lowerDays[3 == c ? "namesAbbr" : "names"], !0), null === I || t(I, 1, 31)) return null
                        } else if ("M" === l) {
                            if (c = C("M"), A._lowerMonths || (A._lowerMonths = s(A.months)), F = 3 > c ? S(2) : T(A._lowerMonths[3 == c ? "namesAbbr" : "names"], !0), null === F || t(F, 1, 12)) return null;
                            F -= 1
                        } else if ("y" === l) {
                            if (c = C("y"), E = S(c), null === E) return null;
                            2 == c && ("string" == typeof O && (O = V + parseInt(O, 10)), E = V - V % 100 + E, E > O && (E -= 100))
                        } else if ("h" === l) {
                            if (C("h"), M = S(2), 12 == M && (M = 0), null === M || t(M, 0, 11)) return null
                        } else if ("H" === l) {
                            if (C("H"), M = S(2), null === M || t(M, 0, 23)) return null
                        } else if ("m" === l) {
                            if (C("m"), R = S(2), null === R || t(R, 0, 59)) return null
                        } else if ("s" === l) {
                            if (C("s"), P = S(2), null === P || t(P, 0, 59)) return null
                        } else if ("f" === l) {
                            if (c = C("f"), x = e.substr(L, c).match(v[3]), z = S(c), null !== z && (z = parseFloat("0." + x[0], 10), z = ve._round(z, 3), z *= 1e3), null === z || t(z, 0, 999)) return null
                        } else if ("t" === l) {
                            if (c = C("t"), _ = A.AM, b = A.PM, 1 === c && (_ = r(_), b = r(b)), p = T(b), !p && !T(_)) return null
                        } else if ("z" === l) {
                            if (m = !0, c = C("z"), "Z" === e.substr(L, 1)) {
                                D();
                                continue
                            }
                            if (g = e.substr(L, 6).match(c > 2 ? f : h), !g) return null;
                            if (g = g[0].split(":"), w = g[0], y = g[1], !y && w.length > 3 && (L = w.length - 2, y = w.substring(L), w = w.substring(0, L)), w = parseInt(w, 10), t(w, -12, 13)) return null;
                            if (c > 2 && (y = parseInt(y, 10), isNaN(y) || t(y, 0, 59))) return null
                        } else if ("'" === l) H = !0, D();
                        else if (!D()) return null;
                    return k = null !== M || null !== R || P || null, null === E && null === F && null === I && k ? (E = V, F = N.getMonth(), I = N.getDate()) : (null === E && (E = V), null === I && (I = 1)), p && 12 > M && (M += 12), m ? (w && (M += -w), y && (R += -y), e = new Date(Date.UTC(E, F, I, M, R, P, z))) : (e = new Date(E, F, I, M, R, P, z), o(e, M)), 100 > E && e.setFullYear(E), e.getDate() !== I && m === n ? null : e
                }

                function c(e) {
                    var t = "-" === e.substr(0, 1) ? -1 : 1;
                    return e = e.substring(1), e = 60 * parseInt(e.substr(0, 2), 10) + parseInt(e.substring(2), 10), t * e
                }
                var d = /\u00A0/g,
                    u = /[eE][\-+]?[0-9]+/,
                    h = /[+|\-]\d{1,2}/,
                    f = /[+|\-]\d{1,2}:?\d{2}/,
                    p = /^\/Date\((.*?)\)\/$/,
                    m = /[+-]\d*/,
                    g = ["G", "g", "d", "F", "D", "y", "m", "T", "t"],
                    v = {
                        2: /^\d{1,2}/,
                        3: /^\d{1,3}/,
                        4: /^\d{4}/
                    },
                    _ = {}.toString;
                ve.parseDate = function(e, t, n) {
                    var i, r, o, a, s;
                    if ("[object Date]" === _.call(e)) return e;
                    if (i = 0, r = null, e && 0 === e.indexOf("/D") && (r = p.exec(e))) return r = r[1], s = m.exec(r.substring(1)), r = new Date(parseInt(r, 10)), s && (s = c(s[0]), r = ve.timezone.apply(r, 0), r = ve.timezone.convert(r, 0, -1 * s)), r;
                    if (n = ve.getCulture(n), !t) {
                        for (t = [], a = n.calendar.patterns, o = g.length; o > i; i++) t[i] = a[g[i]];
                        i = 0, t = ["yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM/dd", "ddd MMM dd yyyy HH:mm:ss", "yyyy-MM-ddTHH:mm:ss.fffffffzzz", "yyyy-MM-ddTHH:mm:ss.fffzzz", "yyyy-MM-ddTHH:mm:sszzz", "yyyy-MM-ddTHH:mm:ss.fffffff", "yyyy-MM-ddTHH:mm:ss.fff", "yyyy-MM-ddTHH:mmzzz", "yyyy-MM-ddTHH:mmzz", "yyyy-MM-ddTHH:mm:ss", "yyyy-MM-ddTHH:mm", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM-dd", "HH:mm:ss", "HH:mm"].concat(t)
                    }
                    for (t = we(t) ? t : [t], o = t.length; o > i; i++)
                        if (r = l(e, t[i], n)) return r;
                    return r
                }, ve.parseInt = function(e, t) {
                    var n = ve.parseFloat(e, t);
                    return n && (n = 0 | n), n
                }, ve.parseFloat = function(e, t, n) {
                    if (!e && 0 !== e) return null;
                    if (typeof e === Me) return e;
                    e = "" + e, t = ve.getCulture(t);
                    var i, r, o = t.numberFormat,
                        a = o.percent,
                        s = o.currency,
                        l = s.symbol,
                        c = a.symbol,
                        h = e.indexOf("-");
                    return u.test(e) ? (e = parseFloat(e.replace(o["."], ".")), isNaN(e) && (e = null), e) : h > 0 ? null : (h = h > -1, e.indexOf(l) > -1 || n && n.toLowerCase().indexOf("c") > -1 ? (o = s, i = o.pattern[0].replace("$", l).split("n"), e.indexOf(i[0]) > -1 && e.indexOf(i[1]) > -1 && (e = e.replace(i[0], "").replace(i[1], ""), h = !0)) : e.indexOf(c) > -1 && (r = !0, o = a, l = c), e = e.replace("-", "").replace(l, "").replace(d, " ").split(o[","].replace(d, " ")).join("").replace(o["."], "."), e = parseFloat(e), isNaN(e) ? e = null : h && (e *= -1), e && r && (e /= 100), e)
                }
            }(),
            function() {
                var i, r, o, a, s, l, c;
                Se._scrollbar = n, Se.scrollbar = function(e) {
                    if (isNaN(Se._scrollbar) || e) {
                        var t, n = document.createElement("div");
                        return n.style.cssText = "overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block", n.innerHTML = "&nbsp;", document.body.appendChild(n), Se._scrollbar = t = n.offsetWidth - n.scrollWidth, document.body.removeChild(n), t
                    }
                    return Se._scrollbar
                }, Se.isRtl = function(t) {
                    return e(t).closest(".k-rtl").length > 0
                }, i = document.createElement("table");
                try {
                    i.innerHTML = "<tr><td></td></tr>", Se.tbodyInnerHtml = !0
                } catch (u) {
                    Se.tbodyInnerHtml = !1
                }
                Se.touch = "ontouchstart" in t, Se.msPointers = t.MSPointerEvent, Se.pointers = t.PointerEvent, r = Se.transitions = !1, o = Se.transforms = !1, a = "HTMLElement" in t ? HTMLElement.prototype : [], Se.hasHW3D = "WebKitCSSMatrix" in t && "m11" in new t.WebKitCSSMatrix || "MozPerspective" in document.documentElement.style || "msPerspective" in document.documentElement.style, be(["Moz", "webkit", "O", "ms"], function() {
                    var e, t = "" + this,
                        a = typeof i.style[t + "Transition"] === Ie;
                    return a || typeof i.style[t + "Transform"] === Ie ? (e = t.toLowerCase(), o = {
                        css: "ms" != e ? "-" + e + "-" : "",
                        prefix: t,
                        event: "o" === e || "webkit" === e ? e : ""
                    }, a && (r = o, r.event = r.event ? r.event + "TransitionEnd" : "transitionend"), !1) : n
                }), i = null, Se.transforms = o, Se.transitions = r, Se.devicePixelRatio = t.devicePixelRatio === n ? 1 : t.devicePixelRatio;
                try {
                    Se.screenWidth = t.outerWidth || t.screen ? t.screen.availWidth : t.innerWidth, Se.screenHeight = t.outerHeight || t.screen ? t.screen.availHeight : t.innerHeight
                } catch (u) {
                    Se.screenWidth = t.screen.availWidth, Se.screenHeight = t.screen.availHeight
                }
                Se.detectOS = function(e) {
                    var n, i, r = !1,
                        o = [],
                        a = !/mobile safari/i.test(e),
                        s = {
                            wp: /(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,
                            fire: /(Silk)\/(\d+)\.(\d+(\.\d+)?)/,
                            android: /(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.(\d+(\.\d+)?)/,
                            iphone: /(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,
                            ipad: /(iPad).*OS\s+(\d+)[\._]([\d_]+)/,
                            meego: /(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,
                            webos: /(webOS)\/(\d+)\.(\d+(\.\d+)?)/,
                            blackberry: /(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,
                            playbook: /(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,
                            windows: /(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,
                            tizen: /(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,
                            sailfish: /(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,
                            ffos: /(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/
                        },
                        l = {
                            ios: /^i(phone|pad|pod)$/i,
                            android: /^android|fire$/i,
                            blackberry: /^blackberry|playbook/i,
                            windows: /windows/,
                            wp: /wp/,
                            flat: /sailfish|ffos|tizen/i,
                            meego: /meego/
                        },
                        c = {
                            tablet: /playbook|ipad|fire/i
                        },
                        u = {
                            omini: /Opera\sMini/i,
                            omobile: /Opera\sMobi/i,
                            firefox: /Firefox|Fennec/i,
                            mobilesafari: /version\/.*safari/i,
                            ie: /MSIE|Windows\sPhone/i,
                            chrome: /chrome|crios/i,
                            webkit: /webkit/i
                        };
                    for (i in s)
                        if (s.hasOwnProperty(i) && (o = e.match(s[i]))) {
                            if ("windows" == i && "plugins" in navigator) return !1;
                            r = {}, r.device = i, r.tablet = d(i, c, !1), r.browser = d(e, u, "default"), r.name = d(i, l), r[r.name] = !0, r.majorVersion = o[2], r.minorVersion = o[3].replace("_", "."), n = r.minorVersion.replace(".", "").substr(0, 2), r.flatVersion = r.majorVersion + n + Array(3 - (3 > n.length ? n.length : 2)).join("0"), r.cordova = typeof t.PhoneGap !== Be || typeof t.cordova !== Be, r.appMode = t.navigator.standalone || /file|local|wmapp/.test(t.location.protocol) || r.cordova, r.android && (1.5 > Se.devicePixelRatio && 400 > r.flatVersion || a) && (Se.screenWidth > 800 || Se.screenHeight > 800) && (r.tablet = i);
                            break
                        } return r
                }, s = Se.mobileOS = Se.detectOS(navigator.userAgent), Se.wpDevicePixelRatio = s.wp ? screen.width / 320 : 0, Se.kineticScrollNeeded = s && (Se.touch || Se.msPointers || Se.pointers), Se.hasNativeScrolling = !1, (s.ios || s.android && s.majorVersion > 2 || s.wp) && (Se.hasNativeScrolling = s), Se.delayedClick = function() {
                    if (Se.touch) {
                        if (s.ios) return !0;
                        if (s.android) return Se.browser.chrome ? 32 > Se.browser.version ? !1 : !(e("meta[name=viewport]").attr("content") || "").match(/user-scalable=no/i) : !0
                    }
                    return !1
                }, Se.mouseAndTouchPresent = Se.touch && !(Se.mobileOS.ios || Se.mobileOS.android), Se.detectBrowser = function(e) {
                    var t, n = !1,
                        i = [],
                        r = {
                            edge: /(edge)[ \/]([\w.]+)/i,
                            webkit: /(chrome)[ \/]([\w.]+)/i,
                            safari: /(webkit)[ \/]([\w.]+)/i,
                            opera: /(opera)(?:.*version|)[ \/]([\w.]+)/i,
                            msie: /(msie\s|trident.*? rv:)([\w.]+)/i,
                            mozilla: /(mozilla)(?:.*? rv:([\w.]+)|)/i
                        };
                    for (t in r)
                        if (r.hasOwnProperty(t) && (i = e.match(r[t]))) {
                            n = {}, n[t] = !0, n[i[1].toLowerCase().split(" ")[0].split("/")[0]] = !0, n.version = parseInt(document.documentMode || i[2], 10);
                            break
                        } return n
                }, Se.browser = Se.detectBrowser(navigator.userAgent), Se.detectClipboardAccess = function() {
                    var e = {
                        copy: document.queryCommandSupported ? document.queryCommandSupported("copy") : !1,
                        cut: document.queryCommandSupported ? document.queryCommandSupported("cut") : !1,
                        paste: document.queryCommandSupported ? document.queryCommandSupported("paste") : !1
                    };
                    return Se.browser.chrome && Se.browser.version >= 43 && (e.copy = !0, e.cut = !0), e
                }, Se.clipboard = Se.detectClipboardAccess(), Se.zoomLevel = function() {
                    var e, n, i;
                    try {
                        return e = Se.browser, n = 0, i = document.documentElement, e.msie && 11 == e.version && i.scrollHeight > i.clientHeight && !Se.touch && (n = Se.scrollbar()), Se.touch ? i.clientWidth / t.innerWidth : e.msie && e.version >= 10 ? ((top || t).document.documentElement.offsetWidth + n) / (top || t).innerWidth : 1
                    } catch (r) {
                        return 1
                    }
                }, Se.cssBorderSpacing = n !== document.documentElement.style.borderSpacing && !(Se.browser.msie && 8 > Se.browser.version),
                    function(t) {
                        var n = "",
                            i = e(document.documentElement),
                            r = parseInt(t.version, 10);
                        t.msie ? n = "ie" : t.mozilla ? n = "ff" : t.safari ? n = "safari" : t.webkit ? n = "webkit" : t.opera ? n = "opera" : t.edge && (n = "edge"), n && (n = "k-" + n + " k-" + n + r), Se.mobileOS && (n += " k-mobile"), i.addClass(n)
                    }(Se.browser), Se.eventCapture = document.documentElement.addEventListener, l = document.createElement("input"), Se.placeholder = "placeholder" in l, Se.propertyChangeEvent = "onpropertychange" in l, Se.input = function() {
                    for (var e, t = ["number", "date", "time", "month", "week", "datetime", "datetime-local"], n = t.length, i = "test", r = {}, o = 0; n > o; o++) e = t[o], l.setAttribute("type", e), l.value = i, r[e.replace("-", "")] = "text" !== l.type && l.value !== i;
                    return r
                }(), l.style.cssText = "float:left;", Se.cssFloat = !!l.style.cssFloat, l = null, Se.stableSort = function() {
                    var e, t = 513,
                        n = [{
                            index: 0,
                            field: "b"
                        }];
                    for (e = 1; t > e; e++) n.push({
                        index: e,
                        field: "a"
                    });
                    return n.sort(function(e, t) {
                        return e.field > t.field ? 1 : t.field > e.field ? -1 : 0
                    }), 1 === n[0].index
                }(), Se.matchesSelector = a.webkitMatchesSelector || a.mozMatchesSelector || a.msMatchesSelector || a.oMatchesSelector || a.matchesSelector || a.matches || function(t) {
                    for (var n = document.querySelectorAll ? (this.parentNode || document).querySelectorAll(t) || [] : e(t), i = n.length; i--;)
                        if (n[i] == this) return !0;
                    return !1
                }, Se.pushState = t.history && t.history.pushState, c = document.documentMode, Se.hashChange = "onhashchange" in t && !(Se.browser.msie && (!c || 8 >= c)), Se.customElements = "registerElement" in t.document
            }(), W = {
            left: {
                reverse: "right"
            },
            right: {
                reverse: "left"
            },
            down: {
                reverse: "up"
            },
            up: {
                reverse: "down"
            },
            top: {
                reverse: "bottom"
            },
            bottom: {
                reverse: "top"
            },
            "in": {
                reverse: "out"
            },
            out: {
                reverse: "in"
            }
        }, j = {}, e.extend(j, {
            enabled: !0,
            Element: function(t) {
                this.element = e(t)
            },
            promise: function(e, t) {
                e.is(":visible") || e.css({
                    display: e.data("olddisplay") || "block"
                }).css("display"), t.hide && e.data("olddisplay", e.css("display")).hide(), t.init && t.init(), t.completeCallback && t.completeCallback(e), e.dequeue()
            },
            disable: function() {
                this.enabled = !1, this.promise = this.promiseShim
            },
            enable: function() {
                this.enabled = !0, this.promise = this.animatedPromise
            }
        }), j.promiseShim = j.promise, "kendoAnimate" in e.fn || _e(e.fn, {
            kendoStop: function(e, t) {
                return this.stop(e, t)
            },
            kendoAnimate: function(e, t, n, i) {
                return y(this, e, t, n, i)
            },
            kendoAddClass: function(e, t) {
                return ve.toggleClass(this, e, t, !0)
            },
            kendoRemoveClass: function(e, t) {
                return ve.toggleClass(this, e, t, !1)
            },
            kendoToggleClass: function(e, t, n) {
                return ve.toggleClass(this, e, t, n)
            }
        }), q = /&/g, G = /</g, $ = /"/g, Y = /'/g, K = />/g, Q = function(e) {
            return e.target
        }, Se.touch && (Q = function(e) {
            var t = "originalEvent" in e ? e.originalEvent.changedTouches : "changedTouches" in e ? e.changedTouches : null;
            return t ? document.elementFromPoint(t[0].clientX, t[0].clientY) : e.target
        }, be(["swipe", "swipeLeft", "swipeRight", "swipeUp", "swipeDown", "doubleTap", "tap"], function(t, n) {
            e.fn[n] = function(e) {
                return this.bind(n, e)
            }
        })), Se.touch ? Se.mobileOS ? (Se.mousedown = "touchstart", Se.mouseup = "touchend", Se.mousemove = "touchmove", Se.mousecancel = "touchcancel", Se.click = "touchend", Se.resize = "orientationchange") : (Se.mousedown = "mousedown touchstart", Se.mouseup = "mouseup touchend", Se.mousemove = "mousemove touchmove", Se.mousecancel = "mouseleave touchcancel", Se.click = "click", Se.resize = "resize") : Se.pointers ? (Se.mousemove = "pointermove", Se.mousedown = "pointerdown", Se.mouseup = "pointerup", Se.mousecancel = "pointercancel", Se.click = "pointerup", Se.resize = "orientationchange resize") : Se.msPointers ? (Se.mousemove = "MSPointerMove", Se.mousedown = "MSPointerDown", Se.mouseup = "MSPointerUp", Se.mousecancel = "MSPointerCancel", Se.click = "MSPointerUp", Se.resize = "orientationchange resize") : (Se.mousemove = "mousemove", Se.mousedown = "mousedown", Se.mouseup = "mouseup", Se.mousecancel = "mouseleave", Se.click = "click", Se.resize = "resize"), X = function(e, t) {
            var n, i, r, o, a = t || "d",
                s = 1;
            for (i = 0, r = e.length; r > i; i++) o = e[i], "" !== o && (n = o.indexOf("["), 0 !== n && (-1 == n ? o = "." + o : (s++, o = "." + o.substring(0, n) + " || {})" + o.substring(n))), s++, a += o + (r - 1 > i ? " || {})" : ")"));
            return Array(s).join("(") + a
        }, J = /^([a-z]+:)?\/\//i, _e(ve, {
            widgets: [],
            _widgetRegisteredCallbacks: [],
            ui: ve.ui || {},
            fx: ve.fx || b,
            effects: ve.effects || j,
            mobile: ve.mobile || {},
            data: ve.data || {},
            dataviz: ve.dataviz || {},
            drawing: ve.drawing || {},
            spreadsheet: {
                messages: {}
            },
            keys: {
                INSERT: 45,
                DELETE: 46,
                BACKSPACE: 8,
                TAB: 9,
                ENTER: 13,
                ESC: 27,
                LEFT: 37,
                UP: 38,
                RIGHT: 39,
                DOWN: 40,
                END: 35,
                HOME: 36,
                SPACEBAR: 32,
                PAGEUP: 33,
                PAGEDOWN: 34,
                F2: 113,
                F10: 121,
                F12: 123,
                NUMPAD_PLUS: 107,
                NUMPAD_MINUS: 109,
                NUMPAD_DOT: 110
            },
            support: ve.support || Se,
            animate: ve.animate || y,
            ns: "",
            attr: function(e) {
                return "data-" + ve.ns + e
            },
            getShadows: a,
            wrap: s,
            deepExtend: l,
            getComputedStyles: f,
            webComponents: ve.webComponents || [],
            isScrollable: p,
            scrollLeft: m,
            size: g,
            toCamelCase: h,
            toHyphens: u,
            getOffset: ve.getOffset || v,
            parseEffects: ve.parseEffects || _,
            toggleClass: ve.toggleClass || k,
            directions: ve.directions || W,
            Observable: z,
            Class: i,
            Template: I,
            template: ye(I.compile, I),
            render: ye(I.render, I),
            stringify: ye(Ce.stringify, Ce),
            eventTarget: Q,
            htmlEncode: x,
            isLocalUrl: function(e) {
                return e && !J.test(e)
            },
            expr: function(e, t, n) {
                return e = e || "", typeof t == Ie && (n = t, t = !1), n = n || "d", e && "[" !== e.charAt(0) && (e = "." + e), t ? (e = e.replace(/"([^.]*)\.([^"]*)"/g, '"$1_$DOT$_$2"'), e = e.replace(/'([^.]*)\.([^']*)'/g, "'$1_$DOT$_$2'"), e = X(e.split("."), n), e = e.replace(/_\$DOT\$_/g, ".")) : e = n + e, e
            },
            getter: function(e, t) {
                var n = e + t;
                return Le[n] = Le[n] || Function("d", "return " + ve.expr(e, t))
            },
            setter: function(e) {
                return He[e] = He[e] || Function("d,value", ve.expr(e) + "=value")
            },
            accessor: function(e) {
                return {
                    get: ve.getter(e),
                    set: ve.setter(e)
                }
            },
            guid: function() {
                var e, t, n = "";
                for (e = 0; 32 > e; e++) t = 16 * xe.random() | 0, (8 == e || 12 == e || 16 == e || 20 == e) && (n += "-"), n += (12 == e ? 4 : 16 == e ? 3 & t | 8 : t).toString(16);
                return n
            },
            roleSelector: function(e) {
                return e.replace(/(\S+)/g, "[" + ve.attr("role") + "=$1],").slice(0, -1)
            },
            directiveSelector: function(e) {
                var t, n = e.split(" ");
                if (n)
                    for (t = 0; n.length > t; t++) "view" != n[t] && (n[t] = n[t].replace(/(\w*)(view|bar|strip|over)$/, "$1-$2"));
                return n.join(" ").replace(/(\S+)/g, "kendo-mobile-$1,").slice(0, -1)
            },
            triggeredByInput: function(e) {
                return /^(label|input|textarea|select)$/i.test(e.target.tagName)
            },
            onWidgetRegistered: function(e) {
                for (var t = 0, n = ve.widgets.length; n > t; t++) e(ve.widgets[t]);
                ve._widgetRegisteredCallbacks.push(e)
            },
            logToConsole: function(e, i) {
                var r = t.console;
                !ve.suppressLog && n !== r && r.log && r[i || "log"](e)
            }
        }), Z = z.extend({
            init: function(e, t) {
                var n, i = this;
                i.element = ve.jQuery(e).handler(i), i.angular("init", t), z.fn.init.call(i), n = t ? t.dataSource : null, n && (t = _e({}, t, {
                    dataSource: {}
                })), t = i.options = _e(!0, {}, i.options, t), n && (t.dataSource = n), i.element.attr(ve.attr("role")) || i.element.attr(ve.attr("role"), (t.name || "").toLowerCase()), i.element.data("kendo" + t.prefix + t.name, i), i.bind(i.events, t)
            },
            events: [],
            options: {
                prefix: ""
            },
            _hasBindingTarget: function() {
                return !!this.element[0].kendoBindingTarget
            },
            _tabindex: function(e) {
                e = e || this.wrapper;
                var t = this.element,
                    n = "tabindex",
                    i = e.attr(n) || t.attr(n);
                t.removeAttr(n), e.attr(n, isNaN(i) ? 0 : i)
            },
            setOptions: function(t) {
                this._setEvents(t), e.extend(this.options, t)
            },
            _setEvents: function(e) {
                for (var t, n = this, i = 0, r = n.events.length; r > i; i++) t = n.events[i], n.options[t] && e[t] && n.unbind(t, n.options[t]);
                n.bind(n.events, e)
            },
            resize: function(e) {
                var t = this.getSize(),
                    n = this._size;
                (e || (t.width > 0 || t.height > 0) && (!n || t.width !== n.width || t.height !== n.height)) && (this._size = t, this._resize(t, e), this.trigger("resize", t))
            },
            getSize: function() {
                return ve.dimensions(this.element)
            },
            size: function(e) {
                return e ? (this.setSize(e), n) : this.getSize()
            },
            setSize: e.noop,
            _resize: e.noop,
            destroy: function() {
                var e = this;
                e.element.removeData("kendo" + e.options.prefix + e.options.name), e.element.removeData("handler"), e.unbind()
            },
            _destroy: function() {
                this.destroy()
            },
            angular: function() {},
            _muteAngularRebind: function(e) {
                this._muteRebind = !0, e.call(this), this._muteRebind = !1
            }
        }), ee = Z.extend({
            dataItems: function() {
                return this.dataSource.flatView()
            },
            _angularItems: function(t) {
                var n = this;
                n.angular(t, function() {
                    return {
                        elements: n.items(),
                        data: e.map(n.dataItems(), function(e) {
                            return {
                                dataItem: e
                            }
                        })
                    }
                })
            }
        }), ve.dimensions = function(e, t) {
            var n = e[0];
            return t && e.css(t), {
                width: n.offsetWidth,
                height: n.offsetHeight
            }
        }, ve.notify = ke, te = /template$/i, ne = /^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/, ie = /^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]*\]$/, re = /([A-Z])/g, ve.initWidget = function(i, r, o) {
            var a, s, l, c, d, u, h, f, p, m, g, v, _;
            if (o ? o.roles && (o = o.roles) : o = ve.ui.roles, i = i.nodeType ? i : i[0], u = i.getAttribute("data-" + ve.ns + "role")) {
                p = -1 === u.indexOf("."), l = p ? o[u] : ve.getter(u)(t), g = e(i).data(), v = l ? "kendo" + l.fn.options.prefix + l.fn.options.name : "", m = p ? RegExp("^kendo.*" + u + "$", "i") : RegExp("^" + v + "$", "i");
                for (_ in g)
                    if (_.match(m)) {
                        if (_ !== v) return g[_];
                        a = g[_]
                    } if (l) {
                    for (f = C(i, "dataSource"), r = e.extend({}, S(i, l.fn.options), r), f && (r.dataSource = typeof f === Ie ? ve.getter(f)(t) : f), c = 0, d = l.fn.events.length; d > c; c++) s = l.fn.events[c], h = C(i, s), h !== n && (r[s] = ve.getter(h)(t));
                    return a ? e.isEmptyObject(r) || a.setOptions(r) : a = new l(i, r), a
                }
            }
        }, ve.rolesFromNamespaces = function(e) {
            var t, n, i = [];
            for (e[0] || (e = [ve.ui, ve.dataviz.ui]), t = 0, n = e.length; n > t; t++) i[t] = e[t].roles;
            return _e.apply(null, [{}].concat(i.reverse()))
        }, ve.init = function(t) {
            var n = ve.rolesFromNamespaces(Ne.call(arguments, 1));
            e(t).find("[data-" + ve.ns + "role]").addBack().each(function() {
                ve.initWidget(this, {}, n)
            })
        }, ve.destroy = function(t) {
            e(t).find("[data-" + ve.ns + "role]").addBack().each(function() {
                var t, n = e(this).data();
                for (t in n) 0 === t.indexOf("kendo") && typeof n[t].destroy === Fe && n[t].destroy()
            })
        }, ve.resize = function(t, n) {
            var i, r = e(t).find("[data-" + ve.ns + "role]").addBack().filter(D);
            r.length && (i = e.makeArray(r), i.sort(T), e.each(i, function() {
                var t = ve.widgetInstance(e(this));
                t && t.resize(n)
            }))
        }, ve.parseOptions = S, _e(ve.ui, {
            Widget: Z,
            DataBoundWidget: ee,
            roles: {},
            progress: function(t, n) {
                var i, r, o, a, s = t.find(".k-loading-mask"),
                    l = ve.support,
                    c = l.browser;
                n ? s.length || (i = l.isRtl(t), r = i ? "right" : "left", a = t.scrollLeft(), o = c.webkit && i ? t[0].scrollWidth - t.width() - 2 * a : 0, s = e("<div class='k-loading-mask'><span class='k-loading-text'>Loading...</span><div class='k-loading-image'/><div class='k-loading-color'/></div>").width("100%").height("100%").css("top", t.scrollTop()).css(r, Math.abs(a) + o).prependTo(t)) : s && s.remove()
            },
            plugin: function(t, i, r) {
                var o, a, s, l, c = t.fn.options.name;
                for (i = i || ve.ui, r = r || "", i[c] = t, i.roles[c.toLowerCase()] = t, o = "getKendo" + r + c, c = "kendo" + r + c, a = {
                    name: c,
                    widget: t,
                    prefix: r || ""
                }, ve.widgets.push(a), s = 0, l = ve._widgetRegisteredCallbacks.length; l > s; s++) ve._widgetRegisteredCallbacks[s](a);
                e.fn[c] = function(i) {
                    var r, o = this;
                    return typeof i === Ie ? (r = Ne.call(arguments, 1), this.each(function() {
                        var t, a, s = e.data(this, c);
                        if (!s) throw Error(ve.format("Cannot call method '{0}' of {1} before it is initialized", i, c));
                        if (t = s[i], typeof t !== Fe) throw Error(ve.format("Cannot find method '{0}' of {1}", i, c));
                        return a = t.apply(s, r), a !== n ? (o = a, !1) : n
                    })) : this.each(function() {
                        return new t(this, i)
                    }), o
                }, e.fn[c].widget = t, e.fn[o] = function() {
                    return this.data(c)
                }
            }
        }), oe = {
            bind: function() {
                return this
            },
            nullObject: !0,
            options: {}
        }, ae = Z.extend({
            init: function(e, t) {
                Z.fn.init.call(this, e, t), this.element.autoApplyNS(), this.wrapper = this.element, this.element.addClass("km-widget")
            },
            destroy: function() {
                Z.fn.destroy.call(this), this.element.kendoDestroy()
            },
            options: {
                prefix: "Mobile"
            },
            events: [],
            view: function() {
                var e = this.element.closest(ve.roleSelector("view splitview modalview drawer"));
                return ve.widgetInstance(e, ve.mobile.ui) || oe
            },
            viewHasNativeScrolling: function() {
                var e = this.view();
                return e && e.options.useNativeScrolling
            },
            container: function() {
                var e = this.element.closest(ve.roleSelector("view layout modalview drawer splitview"));
                return ve.widgetInstance(e.eq(0), ve.mobile.ui) || oe
            }
        }), _e(ve.mobile, {
            init: function(e) {
                ve.init(e, ve.mobile.ui, ve.ui, ve.dataviz.ui)
            },
            appLevelNativeScrolling: function() {
                return ve.mobile.application && ve.mobile.application.options && ve.mobile.application.options.useNativeScrolling
            },
            roles: {},
            ui: {
                Widget: ae,
                DataBoundWidget: ee.extend(ae.prototype),
                roles: {},
                plugin: function(e) {
                    ve.ui.plugin(e, ve.mobile.ui, "Mobile")
                }
            }
        }), l(ve.dataviz, {
            init: function(e) {
                ve.init(e, ve.dataviz.ui)
            },
            ui: {
                roles: {},
                themes: {},
                views: [],
                plugin: function(e) {
                    ve.ui.plugin(e, ve.dataviz.ui)
                }
            },
            roles: {}
        }), ve.touchScroller = function(t, n) {
            return n || (n = {}), n.useNative = !0, e(t).map(function(t, i) {
                return i = e(i), Se.kineticScrollNeeded && ve.mobile.ui.Scroller && !i.data("kendoMobileScroller") ? (i.kendoMobileScroller(n), i.data("kendoMobileScroller")) : !1
            })[0]
        }, ve.preventDefault = function(e) {
            e.preventDefault()
        }, ve.widgetInstance = function(e, n) {
            var i, r, o, a, s = e.data(ve.ns + "role"),
                l = [];
            if (s) {
                if ("content" === s && (s = "scroller"), n)
                    if (n[0])
                        for (i = 0, r = n.length; r > i; i++) l.push(n[i].roles[s]);
                    else l.push(n.roles[s]);
                else l = [ve.ui.roles[s], ve.dataviz.ui.roles[s], ve.mobile.ui.roles[s]];
                for (s.indexOf(".") >= 0 && (l = [ve.getter(s)(t)]), i = 0, r = l.length; r > i; i++)
                    if (o = l[i], o && (a = e.data("kendo" + o.fn.options.prefix + o.fn.options.name))) return a
            }
        }, ve.onResize = function(n) {
            var i = n;
            return Se.mobileOS.android && (i = function() {
                setTimeout(n, 600)
            }), e(t).on(Se.resize, i), i
        }, ve.unbindResize = function(n) {
            e(t).off(Se.resize, n)
        }, ve.attrValue = function(e, t) {
            return e.data(ve.ns + t)
        }, ve.days = {
            Sunday: 0,
            Monday: 1,
            Tuesday: 2,
            Wednesday: 3,
            Thursday: 4,
            Friday: 5,
            Saturday: 6
        }, e.extend(e.expr[":"], {
            kendoFocusable: function(t) {
                var n = e.attr(t, "tabindex");
                return A(t, !isNaN(n) && n > -1)
            }
        }), se = ["mousedown", "mousemove", "mouseenter", "mouseleave", "mouseover", "mouseout", "mouseup", "click"], le = "label, input, [data-rel=external]", ce = {
            setupMouseMute: function() {
                var t, n = 0,
                    i = se.length,
                    r = document.documentElement;
                if (!ce.mouseTrap && Se.eventCapture)
                    for (ce.mouseTrap = !0, ce.bustClick = !1, ce.captureMouse = !1, t = function(t) {
                        ce.captureMouse && ("click" === t.type ? ce.bustClick && !e(t.target).is(le) && (t.preventDefault(), t.stopPropagation()) : t.stopPropagation())
                    }; i > n; n++) r.addEventListener(se[n], t, !0)
            },
            muteMouse: function(e) {
                ce.captureMouse = !0, e.data.bustClick && (ce.bustClick = !0), clearTimeout(ce.mouseTrapTimeoutID)
            },
            unMuteMouse: function() {
                clearTimeout(ce.mouseTrapTimeoutID), ce.mouseTrapTimeoutID = setTimeout(function() {
                    ce.captureMouse = !1, ce.bustClick = !1
                }, 400)
            }
        }, de = {
            down: "touchstart mousedown",
            move: "mousemove touchmove",
            up: "mouseup touchend touchcancel",
            cancel: "mouseleave touchcancel"
        }, Se.touch && (Se.mobileOS.ios || Se.mobileOS.android) ? de = {
            down: "touchstart",
            move: "touchmove",
            up: "touchend touchcancel",
            cancel: "touchcancel"
        } : Se.pointers ? de = {
            down: "pointerdown",
            move: "pointermove",
            up: "pointerup",
            cancel: "pointercancel pointerleave"
        } : Se.msPointers && (de = {
            down: "MSPointerDown",
            move: "MSPointerMove",
            up: "MSPointerUp",
            cancel: "MSPointerCancel MSPointerLeave"
        }), !Se.msPointers || "onmspointerenter" in t || e.each({
            MSPointerEnter: "MSPointerOver",
            MSPointerLeave: "MSPointerOut"
        }, function(t, n) {
            e.event.special[t] = {
                delegateType: n,
                bindType: n,
                handle: function(t) {
                    var i, r = this,
                        o = t.relatedTarget,
                        a = t.handleObj;
                    return (!o || o !== r && !e.contains(r, o)) && (t.type = a.origType, i = a.handler.apply(this, arguments), t.type = n), i
                }
            }
        }), ue = function(e) {
            return de[e] || e
        }, he = /([^ ]+)/g, ve.applyEventMap = function(e, t) {
            return e = e.replace(he, ue), t && (e = e.replace(he, "$1." + t)), e
        }, fe = e.fn.on, _e(!0, F, e), F.fn = F.prototype = new e, F.fn.constructor = F, F.fn.init = function(t, n) {
            return n && n instanceof e && !(n instanceof F) && (n = F(n)), e.fn.init.call(this, t, n, pe)
        }, F.fn.init.prototype = F.fn, pe = F(document), _e(F.fn, {
            handler: function(e) {
                return this.data("handler", e), this
            },
            autoApplyNS: function(e) {
                return this.data("kendoNS", e || ve.guid()), this
            },
            on: function() {
                var e, t, n, i, r, o, a = this,
                    s = a.data("kendoNS");
                return 1 === arguments.length ? fe.call(a, arguments[0]) : (e = a, t = Ne.call(arguments), typeof t[t.length - 1] === Be && t.pop(), n = t[t.length - 1], i = ve.applyEventMap(t[0], s), Se.mouseAndTouchPresent && i.search(/mouse|click/) > -1 && this[0] !== document.documentElement && (ce.setupMouseMute(), r = 2 === t.length ? null : t[1], o = i.indexOf("click") > -1 && i.indexOf("touchend") > -1, fe.call(this, {
                    touchstart: ce.muteMouse,
                    touchend: ce.unMuteMouse
                }, r, {
                    bustClick: o
                })), typeof n === Ie && (e = a.data("handler"), n = e[n], t[t.length - 1] = function(t) {
                    n.call(e, t)
                }), t[0] = i, fe.apply(a, t), a)
            },
            kendoDestroy: function(e) {
                return e = e || this.data("kendoNS"), e && this.off("." + e), this
            }
        }), ve.jQuery = F, ve.eventMap = de, ve.timezone = function() {
            function e(e, t) {
                var n, i, r, o = t[3],
                    a = t[4],
                    s = t[5],
                    l = t[8];
                return l || (t[8] = l = {}), l[e] ? l[e] : (isNaN(a) ? 0 === a.indexOf("last") ? (n = new Date(Date.UTC(e, d[o] + 1, 1, s[0] - 24, s[1], s[2], 0)), i = u[a.substr(4, 3)], r = n.getUTCDay(), n.setUTCDate(n.getUTCDate() + i - r - (i > r ? 7 : 0))) : a.indexOf(">=") >= 0 && (n = new Date(Date.UTC(e, d[o], a.substr(5), s[0], s[1], s[2], 0)), i = u[a.substr(0, 3)], r = n.getUTCDay(), n.setUTCDate(n.getUTCDate() + i - r + (r > i ? 7 : 0))) : n = new Date(Date.UTC(e, d[o], a, s[0], s[1], s[2], 0)), l[e] = n)
            }

            function t(t, n, i) {
                var r, o, a, s;
                return (n = n[i]) ? (a = new Date(t).getUTCFullYear(), n = jQuery.grep(n, function(e) {
                    var t = e[0],
                        n = e[1];
                    return a >= t && (n >= a || t == a && "only" == n || "max" == n)
                }), n.push(t), n.sort(function(t, n) {
                    return "number" != typeof t && (t = +e(a, t)), "number" != typeof n && (n = +e(a, n)), t - n
                }), s = n[jQuery.inArray(t, n) - 1] || n[n.length - 1], isNaN(s) ? s : null) : (r = i.split(":"), o = 0, r.length > 1 && (o = 60 * r[0] + +r[1]), [-1e6, "max", "-", "Jan", 1, [0, 0, 0], o, "-"])
            }

            function n(e, t, n) {
                var i, r, o, a = t[n];
                if ("string" == typeof a && (a = t[a]), !a) throw Error('Timezone "' + n + '" is either incorrect, or kendo.timezones.min.js is not included.');
                for (i = a.length - 1; i >= 0 && (r = a[i][3], !(r && e > r)); i--);
                if (o = a[i + 1], !o) throw Error('Timezone "' + n + '" not found on ' + e + ".");
                return o
            }

            function i(e, i, r, o) {
                typeof e != Me && (e = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
                var a = n(e, i, o);
                return {
                    zone: a,
                    rule: t(e, r, a[1])
                }
            }

            function r(e, t) {
                var n, r, o;
                return "Etc/UTC" == t || "Etc/GMT" == t ? 0 : (n = i(e, this.zones, this.rules, t), r = n.zone, o = n.rule, ve.parseFloat(o ? r[0] - o[6] : r[0]))
            }

            function o(e, t) {
                var n = i(e, this.zones, this.rules, t),
                    r = n.zone,
                    o = n.rule,
                    a = r[2];
                return a.indexOf("/") >= 0 ? a.split("/")[o && +o[6] ? 1 : 0] : a.indexOf("%s") >= 0 ? a.replace("%s", o && "-" != o[7] ? o[7] : "") : a
            }

            function a(e, t, n) {
                var i, r;
                return typeof t == Ie && (t = this.offset(e, t)), typeof n == Ie && (n = this.offset(e, n)), i = e.getTimezoneOffset(), e = new Date(e.getTime() + 6e4 * (t - n)), r = e.getTimezoneOffset(), new Date(e.getTime() + 6e4 * (r - i))
            }

            function s(e, t) {
                return this.convert(e, e.getTimezoneOffset(), t)
            }

            function l(e, t) {
                return this.convert(e, t, e.getTimezoneOffset())
            }

            function c(e) {
                return this.apply(new Date(e), "Etc/UTC")
            }
            var d = {
                    Jan: 0,
                    Feb: 1,
                    Mar: 2,
                    Apr: 3,
                    May: 4,
                    Jun: 5,
                    Jul: 6,
                    Aug: 7,
                    Sep: 8,
                    Oct: 9,
                    Nov: 10,
                    Dec: 11
                },
                u = {
                    Sun: 0,
                    Mon: 1,
                    Tue: 2,
                    Wed: 3,
                    Thu: 4,
                    Fri: 5,
                    Sat: 6
                };
            return {
                zones: {},
                rules: {},
                offset: r,
                convert: a,
                apply: s,
                remove: l,
                abbr: o,
                toLocalDate: c
            }
        }(), ve.date = function() {
            function e(e, t) {
                return 0 === t && 23 === e.getHours() ? (e.setHours(e.getHours() + 2), !0) : !1
            }

            function t(t, n, i) {
                var r = t.getHours();
                i = i || 1, n = (n - t.getDay() + 7 * i) % 7, t.setDate(t.getDate() + n), e(t, r)
            }

            function n(e, n, i) {
                return e = new Date(e), t(e, n, i), e
            }

            function i(e) {
                return new Date(e.getFullYear(), e.getMonth(), 1)
            }

            function r(e) {
                var t = new Date(e.getFullYear(), e.getMonth() + 1, 0),
                    n = i(e),
                    r = Math.abs(t.getTimezoneOffset() - n.getTimezoneOffset());
                return r && t.setHours(n.getHours() + r / 60), t
            }

            function o(t) {
                return t = new Date(t.getFullYear(), t.getMonth(), t.getDate(), 0, 0, 0), e(t, 0), t
            }

            function a(e) {
                return Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds())
            }

            function s(e) {
                return e.getTime() - o(e)
            }

            function l(e, t, n) {
                var i, r = s(t),
                    o = s(n);
                return e && r != o ? (t >= n && (n += v), i = s(e), r > i && (i += v), r > o && (o += v), i >= r && o >= i) : !0
            }

            function c(e, t, n) {
                var i, r = t.getTime(),
                    o = n.getTime();
                return r >= o && (o += v), i = e.getTime(), i >= r && o >= i
            }

            function d(t, n) {
                var i = t.getHours();
                return t = new Date(t), u(t, n * v), e(t, i), t
            }

            function u(e, t, n) {
                var i, r = e.getTimezoneOffset();
                e.setTime(e.getTime() + t), n || (i = e.getTimezoneOffset() - r, e.setTime(e.getTime() + i * g))
            }

            function h(t, n) {
                return t = new Date(ve.date.getDate(t).getTime() + ve.date.getMilliseconds(n)), e(t, n.getHours()), t
            }

            function f() {
                return o(new Date)
            }

            function p(e) {
                return o(e).getTime() == f().getTime()
            }

            function m(e) {
                var t = new Date(1980, 1, 1, 0, 0, 0);
                return e && t.setHours(e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()), t
            }
            var g = 6e4,
                v = 864e5;
            return {
                adjustDST: e,
                dayOfWeek: n,
                setDayOfWeek: t,
                getDate: o,
                isInDateRange: c,
                isInTimeRange: l,
                isToday: p,
                nextDay: function(e) {
                    return d(e, 1)
                },
                previousDay: function(e) {
                    return d(e, -1)
                },
                toUtcTime: a,
                MS_PER_DAY: v,
                MS_PER_HOUR: 60 * g,
                MS_PER_MINUTE: g,
                setTime: u,
                setHours: h,
                addDays: d,
                today: f,
                toInvariantTime: m,
                firstDayOfMonth: i,
                lastDayOfMonth: r,
                getMilliseconds: s
            }
        }(), ve.stripWhitespace = function(e) {
            var t, n, i;
            if (document.createNodeIterator)
                for (t = document.createNodeIterator(e, NodeFilter.SHOW_TEXT, function(t) {
                    return t.parentNode == e ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT
                }, !1); t.nextNode();) t.referenceNode && !t.referenceNode.textContent.trim() && t.referenceNode.parentNode.removeChild(t.referenceNode);
            else
                for (n = 0; e.childNodes.length > n; n++) i = e.childNodes[n], 3 != i.nodeType || /\S/.test(i.nodeValue) || (e.removeChild(i), n--), 1 == i.nodeType && ve.stripWhitespace(i)
        }, me = t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.oRequestAnimationFrame || t.msRequestAnimationFrame || function(e) {
            setTimeout(e, 1e3 / 60)
        }, ve.animationFrame = function(e) {
            me.call(t, e)
        }, ge = [], ve.queueAnimation = function(e) {
            ge[ge.length] = e, 1 === ge.length && ve.runNextAnimation()
        }, ve.runNextAnimation = function() {
            ve.animationFrame(function() {
                ge[0] && (ge.shift()(), ge[0] && ve.runNextAnimation())
            })
        }, ve.parseQueryStringParams = function(e) {
            for (var t = e.split("?")[1] || "", n = {}, i = t.split(/&|=/), r = i.length, o = 0; r > o; o += 2) "" !== i[o] && (n[decodeURIComponent(i[o])] = decodeURIComponent(i[o + 1]));
            return n
        }, ve.elementUnderCursor = function(e) {
            return n !== e.x.client ? document.elementFromPoint(e.x.client, e.y.client) : n
        }, ve.wheelDeltaY = function(e) {
            var t, i = e.originalEvent,
                r = i.wheelDeltaY;
            return i.wheelDelta ? (r === n || r) && (t = i.wheelDelta) : i.detail && i.axis === i.VERTICAL_AXIS && (t = 10 * -i.detail), t
        }, ve.throttle = function(e, t) {
            var i, r, o = 0;
            return !t || 0 >= t ? e : (r = function() {
                function r() {
                    e.apply(a, l), o = +new Date
                }
                var a = this,
                    s = +new Date - o,
                    l = arguments;
                return o ? (i && clearTimeout(i), s > t ? r() : i = setTimeout(r, t - s), n) : r()
            }, r.cancel = function() {
                clearTimeout(i)
            }, r)
        }, ve.caret = function(t, i, r) {
            var o, a, s, l, c = i !== n;
            if (r === n && (r = i), t[0] && (t = t[0]), !c || !t.disabled) {
                try {
                    t.selectionStart !== n ? c ? (t.focus(), t.setSelectionRange(i, r)) : i = [t.selectionStart, t.selectionEnd] : document.selection && (e(t).is(":visible") && t.focus(), o = t.createTextRange(), c ? (o.collapse(!0), o.moveStart("character", i), o.moveEnd("character", r - i), o.select()) : (a = o.duplicate(), o.moveToBookmark(document.selection.createRange().getBookmark()), a.setEndPoint("EndToStart", o), s = a.text.length, l = s + o.text.length, i = [s, l]))
                } catch (d) {
                    i = []
                }
                return i
            }
        }, ve.compileMobileDirective = function(e, n) {
            var i = t.angular;
            return e.attr("data-" + ve.ns + "role", e[0].tagName.toLowerCase().replace("kendo-mobile-", "").replace("-", "")), i.element(e).injector().invoke(["$compile", function(t) {
                t(e)(n), /^\$(digest|apply)$/.test(n.$$phase) || n.$digest()
            }]), ve.widgetInstance(e, ve.mobile.ui)
        }, ve.antiForgeryTokens = function() {
            var t = {},
                i = e("meta[name=csrf-token],meta[name=_csrf]").attr("content"),
                r = e("meta[name=csrf-param],meta[name=_csrf_header]").attr("content");
            return e("input[name^='__RequestVerificationToken']").each(function() {
                t[this.name] = this.value
            }), r !== n && i !== n && (t[r] = i), t
        }, ve.cycleForm = function(e) {
            function t(e) {
                var t = ve.widgetInstance(e);
                t && t.focus ? t.focus() : e.focus()
            }
            var n = e.find("input, .k-widget").first(),
                i = e.find("button, .k-button").last();
            i.on("keydown", function(e) {
                e.keyCode != ve.keys.TAB || e.shiftKey || (e.preventDefault(), t(n))
            }), n.on("keydown", function(e) {
                e.keyCode == ve.keys.TAB && e.shiftKey && (e.preventDefault(), t(i))
            })
        },
            function() {
                function n(t, n, i, r) {
                    var o, a, s = e("<form>").attr({
                            action: i,
                            method: "POST",
                            target: r
                        }),
                        l = ve.antiForgeryTokens();
                    l.fileName = n, o = t.split(";base64,"), l.contentType = o[0].replace("data:", ""), l.base64 = o[1];
                    for (a in l) l.hasOwnProperty(a) && e("<input>").attr({
                        value: l[a],
                        name: a,
                        type: "hidden"
                    }).appendTo(s);
                    s.appendTo("body").submit().remove()
                }

                function i(e, t) {
                    var n, i, r, o, a, s = e;
                    if ("string" == typeof e) {
                        for (n = e.split(";base64,"), i = n[0], r = atob(n[1]), o = new Uint8Array(r.length), a = 0; r.length > a; a++) o[a] = r.charCodeAt(a);
                        s = new Blob([o.buffer], {
                            type: i
                        })
                    }
                    navigator.msSaveBlob(s, t)
                }

                function r(e, n) {
                    t.Blob && e instanceof Blob && (e = URL.createObjectURL(e)), o.download = n, o.href = e;
                    var i = document.createEvent("MouseEvents");
                    i.initMouseEvent("click", !0, !1, t, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), o.dispatchEvent(i)
                }
                var o = document.createElement("a"),
                    a = "download" in o && !ve.support.browser.edge;
                ve.saveAs = function(e) {
                    var t = n;
                    e.forceProxy || (a ? t = r : navigator.msSaveBlob && (t = i)), t(e.dataURI, e.fileName, e.proxyURL, e.proxyTarget)
                }
            }(), ve.proxyModelSetters = function(e) {
            var t = {};
            return Object.keys(e || {}).forEach(function(n) {
                Object.defineProperty(t, n, {
                    get: function() {
                        return e[n]
                    },
                    set: function(t) {
                        e[n] = t, e.dirty = !0
                    }
                })
            }), t
        }
    }(jQuery, window), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
    function(e, define) {
        define("kendo.router.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t) {
                if (!t) return e;
                e + "/" === t && (e = t);
                var n = RegExp("^" + t, "i");
                return n.test(e) || (e = t + "/" + e), f.protocol + "//" + (f.host + "/" + e).replace(/\/\/+/g, "/")
            }

            function i(e) {
                return e ? "#!" : "#"
            }

            function r(e) {
                var t = f.href;
                return "#!" === e && t.indexOf("#") > -1 && t.indexOf("#!") < 0 ? null : t.split(e)[1] || ""
            }

            function o(e, t) {
                return 0 === t.indexOf(e) ? t.substr(e.length).replace(/\/\//g, "/") : t
            }

            function a(e) {
                return e.replace(/^(#)?/, "#")
            }

            function s(e) {
                return e.replace(/^(#(!)?)?/, "#!")
            }
            var l = window.kendo,
                c = "change",
                d = "back",
                u = "same",
                h = l.support,
                f = window.location,
                p = window.history,
                m = 50,
                g = l.support.browser.msie,
                v = /^#*/,
                _ = window.document,
                b = l.Class.extend({
                    back: function() {
                        g ? setTimeout(function() {
                            p.back()
                        }) : p.back()
                    },
                    forward: function() {
                        g ? setTimeout(function() {
                            p.forward()
                        }) : p.forward()
                    },
                    length: function() {
                        return p.length
                    },
                    replaceLocation: function(e) {
                        f.replace(e)
                    }
                }),
                w = b.extend({
                    init: function(e) {
                        this.root = e
                    },
                    navigate: function(e) {
                        p.pushState({}, _.title, n(e, this.root))
                    },
                    replace: function(e) {
                        p.replaceState({}, _.title, n(e, this.root))
                    },
                    normalize: function(e) {
                        return o(this.root, e)
                    },
                    current: function() {
                        var e = f.pathname;
                        return f.search && (e += f.search), o(this.root, e)
                    },
                    change: function(t) {
                        e(window).bind("popstate.kendo", t)
                    },
                    stop: function() {
                        e(window).unbind("popstate.kendo")
                    },
                    normalizeCurrent: function(e) {
                        var t, o = e.root,
                            a = f.pathname,
                            s = r(i(e.hashBang));
                        o === a + "/" && (t = o), o === a && s && (t = n(s.replace(v, ""), o)), t && p.pushState({}, _.title, t)
                    }
                }),
                y = b.extend({
                    init: function(e) {
                        this._id = l.guid(), this.prefix = i(e), this.fix = e ? s : a
                    },
                    navigate: function(e) {
                        f.hash = this.fix(e)
                    },
                    replace: function(e) {
                        this.replaceLocation(this.fix(e))
                    },
                    normalize: function(e) {
                        return e.indexOf(this.prefix) < 0 ? e : e.split(this.prefix)[1]
                    },
                    change: function(t) {
                        h.hashChange ? e(window).on("hashchange." + this._id, t) : this._interval = setInterval(t, m)
                    },
                    stop: function() {
                        e(window).off("hashchange." + this._id), clearInterval(this._interval)
                    },
                    current: function() {
                        return r(this.prefix)
                    },
                    normalizeCurrent: function(e) {
                        var t = f.pathname,
                            n = e.root;
                        return e.pushState && n !== t ? (this.replaceLocation(n + this.prefix + o(n, t)), !0) : !1
                    }
                }),
                k = l.Observable.extend({
                    start: function(t) {
                        if (t = t || {}, this.bind([c, d, u], t), !this._started) {
                            this._started = !0, t.root = t.root || "/";
                            var n, i = this.createAdapter(t);
                            i.normalizeCurrent(t) || (n = i.current(), e.extend(this, {
                                adapter: i,
                                root: t.root,
                                historyLength: i.length(),
                                current: n,
                                locations: [n]
                            }), i.change(e.proxy(this, "_checkUrl")))
                        }
                    },
                    createAdapter: function(e) {
                        return h.pushState && e.pushState ? new w(e.root) : new y(e.hashBang)
                    },
                    stop: function() {
                        this._started && (this.adapter.stop(), this.unbind(c), this._started = !1)
                    },
                    change: function(e) {
                        this.bind(c, e)
                    },
                    replace: function(e, t) {
                        this._navigate(e, t, function(t) {
                            t.replace(e), this.locations[this.locations.length - 1] = this.current
                        })
                    },
                    navigate: function(e, n) {
                        return "#:back" === e ? (this.backCalled = !0, this.adapter.back(), t) : (this._navigate(e, n, function(t) {
                            t.navigate(e), this.locations.push(this.current)
                        }), t)
                    },
                    _navigate: function(e, n, i) {
                        var r = this.adapter;
                        return e = r.normalize(e), this.current === e || this.current === decodeURIComponent(e) ? (this.trigger(u), t) : ((n || !this.trigger(c, {
                            url: e
                        })) && (this.current = e, i.call(this, r), this.historyLength = r.length()), t)
                    },
                    _checkUrl: function() {
                        var e = this.adapter,
                            n = e.current(),
                            i = e.length(),
                            r = this.historyLength === i,
                            o = n === this.locations[this.locations.length - 2] && r,
                            a = this.backCalled,
                            s = this.current;
                        return null === n || this.current === n || this.current === decodeURIComponent(n) ? !0 : (this.historyLength = i, this.backCalled = !1, this.current = n, o && this.trigger("back", {
                            url: s,
                            to: n
                        }) ? (e.forward(), this.current = s, t) : this.trigger(c, {
                            url: n,
                            backButtonPressed: !a
                        }) ? (o ? e.forward() : (e.back(), this.historyLength--), this.current = s, t) : (o ? this.locations.pop() : this.locations.push(n), t))
                    }
                });
            l.History = k, l.History.HistoryAdapter = b, l.History.HashAdapter = y, l.History.PushStateAdapter = w, l.absoluteURL = n, l.history = new k
        }(window.kendo.jQuery),
            function() {
                function e(e, t) {
                    return t ? e : "([^/]+)"
                }

                function t(t, n) {
                    return RegExp("^" + t.replace(p, "\\$&").replace(u, "(?:$1)?").replace(h, e).replace(f, "(.*?)") + "$", n ? "i" : "")
                }

                function n(e) {
                    return e.replace(/(\?.*)|(#.*)/g, "")
                }
                var i = window.kendo,
                    r = i.history,
                    o = i.Observable,
                    a = "init",
                    s = "routeMissing",
                    l = "change",
                    c = "back",
                    d = "same",
                    u = /\((.*?)\)/g,
                    h = /(\(\?)?:\w+/g,
                    f = /\*\w+/g,
                    p = /[\-{}\[\]+?.,\\\^$|#\s]/g,
                    m = i.Class.extend({
                        init: function(e, n, i) {
                            e instanceof RegExp || (e = t(e, i)), this.route = e, this._callback = n
                        },
                        callback: function(e, t) {
                            var r, o, a = 0,
                                s = i.parseQueryStringParams(e);
                            for (s._back = t, e = n(e), r = this.route.exec(e).slice(1), o = r.length; o > a; a++) void 0 !== r[a] && (r[a] = decodeURIComponent(r[a]));
                            r.push(s), this._callback.apply(null, r)
                        },
                        worksWith: function(e, t) {
                            return this.route.test(n(e)) ? (this.callback(e, t), !0) : !1
                        }
                    }),
                    g = o.extend({
                        init: function(e) {
                            e || (e = {}), o.fn.init.call(this), this.routes = [], this.pushState = e.pushState, this.hashBang = e.hashBang, this.root = e.root, this.ignoreCase = e.ignoreCase !== !1, this.bind([a, s, l, d], e)
                        },
                        destroy: function() {
                            r.unbind(l, this._urlChangedProxy), r.unbind(d, this._sameProxy), r.unbind(c, this._backProxy), this.unbind()
                        },
                        start: function() {
                            var e, t = this,
                                n = function() {
                                    t._same()
                                },
                                i = function(e) {
                                    t._back(e)
                                },
                                o = function(e) {
                                    t._urlChanged(e)
                                };
                            r.start({
                                same: n,
                                change: o,
                                back: i,
                                pushState: t.pushState,
                                hashBang: t.hashBang,
                                root: t.root
                            }), e = {
                                url: r.current || "/",
                                preventDefault: $.noop
                            }, t.trigger(a, e) || t._urlChanged(e), this._urlChangedProxy = o, this._backProxy = i
                        },
                        route: function(e, t) {
                            this.routes.push(new m(e, t, this.ignoreCase))
                        },
                        navigate: function(e, t) {
                            i.history.navigate(e, t)
                        },
                        replace: function(e, t) {
                            i.history.replace(e, t)
                        },
                        _back: function(e) {
                            this.trigger(c, {
                                url: e.url,
                                to: e.to
                            }) && e.preventDefault()
                        },
                        _same: function() {
                            this.trigger(d)
                        },
                        _urlChanged: function(e) {
                            var t, n, r, o, a = e.url,
                                c = e.backButtonPressed;
                            if (a || (a = "/"), this.trigger(l, {
                                url: e.url,
                                params: i.parseQueryStringParams(e.url),
                                backButtonPressed: c
                            })) return void e.preventDefault();
                            for (t = 0, n = this.routes, o = n.length; o > t; t++)
                                if (r = n[t], r.worksWith(a, c)) return;
                            this.trigger(s, {
                                url: a,
                                params: i.parseQueryStringParams(a),
                                backButtonPressed: c
                            }) && e.preventDefault()
                        }
                    });
                i.Router = g
            }(), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.data.odata.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            function n(i, o) {
                var l, c, d, u, h, f, p, m, g = [],
                    v = i.logic || "and",
                    _ = i.filters;
                for (l = 0, c = _.length; c > l; l++) i = _[l], d = i.field, p = i.value, f = i.operator, i.filters ? i = n(i, o) : (m = i.ignoreCase, d = d.replace(/\./g, "/"), i = a[f], o && (i = s[f]), "isnull" === f || "isnotnull" === f ? i = r.format("{0} {1} null", d, i) : "isempty" === f || "isnotempty" === f ? i = r.format("{0} {1} ''", d, i) : i && p !== t && (u = e.type(p), "string" === u ? (h = "'{1}'", p = p.replace(/'/g, "''"), m === !0 && (d = "tolower(" + d + ")")) : h = "date" === u ? o ? "{1:yyyy-MM-ddTHH:mm:ss+00:00}" : "datetime'{1:yyyy-MM-ddTHH:mm:ss}'" : "{1}", i.length > 3 ? "substringof" !== i ? h = "{0}({2}," + h + ")" : (h = "{0}(" + h + ",{2})", "doesnotcontain" === f && (o ? (h = "{0}({2},'{1}') eq -1", i = "indexof") : h += " eq false")) : h = "{2} {0} " + h, i = r.format(h, i, p, d))), g.push(i);
                return i = g.join(" " + v + " "), g.length > 1 && (i = "(" + i + ")"), i
            }

            function i(e) {
                for (var t in e) 0 === t.indexOf("@odata") && delete e[t]
            }
            var r = window.kendo,
                o = e.extend,
                a = {
                    eq: "eq",
                    neq: "ne",
                    gt: "gt",
                    gte: "ge",
                    lt: "lt",
                    lte: "le",
                    contains: "substringof",
                    doesnotcontain: "substringof",
                    endswith: "endswith",
                    startswith: "startswith",
                    isnull: "eq",
                    isnotnull: "ne",
                    isempty: "eq",
                    isnotempty: "ne"
                },
                s = o({}, a, {
                    contains: "contains"
                }),
                l = {
                    pageSize: e.noop,
                    page: e.noop,
                    filter: function(e, t, i) {
                        t && (t = n(t, i), t && (e.$filter = t))
                    },
                    sort: function(t, n) {
                        var i = e.map(n, function(e) {
                            var t = e.field.replace(/\./g, "/");
                            return "desc" === e.dir && (t += " desc"), t
                        }).join(",");
                        i && (t.$orderby = i)
                    },
                    skip: function(e, t) {
                        t && (e.$skip = t)
                    },
                    take: function(e, t) {
                        t && (e.$top = t)
                    }
                },
                c = {
                    read: {
                        dataType: "jsonp"
                    }
                };
            o(!0, r.data, {
                schemas: {
                    odata: {
                        type: "json",
                        data: function(e) {
                            return e.d.results || [e.d]
                        },
                        total: "d.__count"
                    }
                },
                transports: {
                    odata: {
                        read: {
                            cache: !0,
                            dataType: "jsonp",
                            jsonp: "$callback"
                        },
                        update: {
                            cache: !0,
                            dataType: "json",
                            contentType: "application/json",
                            type: "PUT"
                        },
                        create: {
                            cache: !0,
                            dataType: "json",
                            contentType: "application/json",
                            type: "POST"
                        },
                        destroy: {
                            cache: !0,
                            dataType: "json",
                            type: "DELETE"
                        },
                        parameterMap: function(e, t, n) {
                            var i, o, a, s;
                            if (e = e || {}, t = t || "read", s = (this.options || c)[t], s = s ? s.dataType : "json", "read" === t) {
                                i = {
                                    $inlinecount: "allpages"
                                }, "json" != s && (i.$format = "json");
                                for (a in e) l[a] ? l[a](i, e[a], n) : i[a] = e[a]
                            } else {
                                if ("json" !== s) throw Error("Only json dataType can be used for " + t + " operation.");
                                if ("destroy" !== t) {
                                    for (a in e) o = e[a], "number" == typeof o && (e[a] = o + "");
                                    i = r.stringify(e)
                                }
                            }
                            return i
                        }
                    }
                }
            }), o(!0, r.data, {
                schemas: {
                    "odata-v4": {
                        type: "json",
                        data: function(t) {
                            return t = e.extend({}, t), i(t), t.value ? t.value : [t]
                        },
                        total: function(e) {
                            return e["@odata.count"]
                        }
                    }
                },
                transports: {
                    "odata-v4": {
                        read: {
                            cache: !0,
                            dataType: "json"
                        },
                        update: {
                            cache: !0,
                            dataType: "json",
                            contentType: "application/json;IEEE754Compatible=true",
                            type: "PUT"
                        },
                        create: {
                            cache: !0,
                            dataType: "json",
                            contentType: "application/json;IEEE754Compatible=true",
                            type: "POST"
                        },
                        destroy: {
                            cache: !0,
                            dataType: "json",
                            type: "DELETE"
                        },
                        parameterMap: function(e, t) {
                            var n = r.data.transports.odata.parameterMap(e, t, !0);
                            return "read" == t && (n.$count = !0, delete n.$inlinecount), n
                        }
                    }
                }
            })
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.data.xml.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = e.isArray,
                r = e.isPlainObject,
                o = e.map,
                a = e.each,
                s = e.extend,
                l = n.getter,
                c = n.Class,
                d = c.extend({
                    init: function(t) {
                        var l, c, d, u, h = this,
                            f = t.total,
                            p = t.model,
                            m = t.parse,
                            g = t.errors,
                            v = t.serialize,
                            _ = t.data;
                        p && (r(p) && (l = t.modelBase || n.data.Model, p.fields && a(p.fields, function(t, n) {
                            r(n) && n.field ? e.isFunction(n.field) || (n = s(n, {
                                field: h.getter(n.field)
                            })) : n = {
                                field: h.getter(n)
                            }, p.fields[t] = n
                        }), c = p.id, c && (d = {}, d[h.xpathToMember(c, !0)] = {
                            field: h.getter(c)
                        }, p.fields = s(d, p.fields), p.id = h.xpathToMember(c)), p = l.define(p)), h.model = p), f && ("string" == typeof f ? (f = h.getter(f), h.total = function(e) {
                            return parseInt(f(e), 10)
                        }) : "function" == typeof f && (h.total = f)), g && ("string" == typeof g ? (g = h.getter(g), h.errors = function(e) {
                            return g(e) || null
                        }) : "function" == typeof g && (h.errors = g)), _ && ("string" == typeof _ ? (_ = h.xpathToMember(_), h.data = function(e) {
                            var t, n = h.evaluate(e, _);
                            return n = i(n) ? n : [n], h.model && p.fields ? (t = new h.model, o(n, function(e) {
                                if (e) {
                                    var n, i = {};
                                    for (n in p.fields) i[n] = t._parse(n, p.fields[n].field(e));
                                    return i
                                }
                            })) : n
                        }) : "function" == typeof _ && (h.data = _)), "function" == typeof m && (u = h.parse, h.parse = function(e) {
                            var t = m.call(h, e);
                            return u.call(h, t)
                        }), "function" == typeof v && (h.serialize = v)
                    },
                    total: function(e) {
                        return this.data(e).length
                    },
                    errors: function(e) {
                        return e ? e.errors : null
                    },
                    serialize: function(e) {
                        return e
                    },
                    parseDOM: function(e) {
                        var n, r, o, a, s, l, c, d = {},
                            u = e.attributes,
                            h = u.length;
                        for (c = 0; h > c; c++) l = u[c], d["@" + l.nodeName] = l.nodeValue;
                        for (r = e.firstChild; r; r = r.nextSibling) o = r.nodeType, 3 === o || 4 === o ? d["#text"] = r.nodeValue : 1 === o && (n = this.parseDOM(r), a = r.nodeName, s = d[a], i(s) ? s.push(n) : s = s !== t ? [s, n] : n, d[a] = s);
                        return d
                    },
                    evaluate: function(e, t) {
                        for (var n, r, o, a, s, l = t.split("."); n = l.shift();)
                            if (e = e[n], i(e)) {
                                for (r = [], t = l.join("."), s = 0, o = e.length; o > s; s++) a = this.evaluate(e[s], t), a = i(a) ? a : [a], r.push.apply(r, a);
                                return r
                            } return e
                    },
                    parse: function(t) {
                        var n, i, r = {};
                        return n = t.documentElement || e.parseXML(t).documentElement, i = this.parseDOM(n), r[n.nodeName] = i, r
                    },
                    xpathToMember: function(e, t) {
                        return e ? (e = e.replace(/^\//, "").replace(/\//g, "."), e.indexOf("@") >= 0 ? e.replace(/\.?(@.*)/, t ? "$1" : '["$1"]') : e.indexOf("text()") >= 0 ? e.replace(/(\.?text\(\))/, t ? "#text" : '["#text"]') : e) : ""
                    },
                    getter: function(e) {
                        return l(this.xpathToMember(e), !0)
                    }
                });
            e.extend(!0, n.data, {
                XmlDataReader: d,
                readers: {
                    xml: d
                }
            })
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.data.min", ["kendo.core.min", "kendo.data.odata.min", "kendo.data.xml.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t, n, i) {
                return function(r) {
                    var o, a = {};
                    for (o in r) a[o] = r[o];
                    a.field = i ? n + "." + r.field : n, t == xe && e._notifyChange && e._notifyChange(a), e.trigger(t, a)
                }
            }

            function i(t, n) {
                if (t === n) return !0;
                var r, o = e.type(t),
                    a = e.type(n);
                if (o !== a) return !1;
                if ("date" === o) return t.getTime() === n.getTime();
                if ("object" !== o && "array" !== o) return !1;
                for (r in t)
                    if (!i(t[r], n[r])) return !1;
                return !0
            }

            function r(e, t) {
                var n, i;
                for (i in e) {
                    if (n = e[i], ae(n) && n.field && n.field === t) return n;
                    if (n === t) return n
                }
                return null
            }

            function o(e) {
                this.data = e || []
            }

            function a(e, n) {
                if (e) {
                    var i = typeof e === ve ? {
                            field: e,
                            dir: n
                        } : e,
                        r = le(i) ? i : i !== t ? [i] : [];
                    return ce(r, function(e) {
                        return !!e.dir
                    })
                }
            }

            function s(e) {
                var t, n, i, r, o = e.filters;
                if (o)
                    for (t = 0, n = o.length; n > t; t++) i = o[t], r = i.operator, r && typeof r === ve && (i.operator = G[r.toLowerCase()] || r), s(i)
            }

            function l(e) {
                return e && !se(e) ? ((le(e) || !e.filters) && (e = {
                    logic: "and",
                    filters: le(e) ? e : [e]
                }), s(e), e) : t
            }

            function c(e, t) {
                return e.logic || t.logic ? !1 : e.field === t.field && e.value === t.value && e.operator === t.operator
            }

            function d(e) {
                return e = e || {}, se(e) ? {
                    logic: "and",
                    filters: []
                } : l(e)
            }

            function u(e, t) {
                return t.logic || e.field > t.field ? 1 : t.field > e.field ? -1 : 0
            }

            function h(e, t) {
                var n, i, r, o, a;
                if (e = d(e), t = d(t), e.logic !== t.logic) return !1;
                if (r = (e.filters || []).slice(), o = (t.filters || []).slice(), r.length !== o.length) return !1;
                for (r = r.sort(u), o = o.sort(u), a = 0; r.length > a; a++)
                    if (n = r[a], i = o[a], n.logic && i.logic) {
                        if (!h(n, i)) return !1
                    } else if (!c(n, i)) return !1;
                return !0
            }

            function f(e) {
                return le(e) ? e : [e]
            }

            function p(e, n) {
                var i = typeof e === ve ? {
                        field: e,
                        dir: n
                    } : e,
                    r = le(i) ? i : i !== t ? [i] : [];
                return U(r, function(e) {
                    return {
                        field: e.field,
                        dir: e.dir || "asc",
                        aggregates: e.aggregates
                    }
                })
            }

            function m(e, t) {
                return e && e.getTime && t && t.getTime ? e.getTime() === t.getTime() : e === t
            }

            function g(e, t, n, i, r, o) {
                var a, s, l, c, d;
                for (t = t || [], c = t.length, a = 0; c > a; a++) s = t[a], l = s.aggregate, d = s.field, e[d] = e[d] || {}, o[d] = o[d] || {}, o[d][l] = o[d][l] || {}, e[d][l] = $[l.toLowerCase()](e[d][l], n, fe.accessor(d), i, r, o[d][l])
            }

            function v(e) {
                return "number" == typeof e && !isNaN(e)
            }

            function _(e) {
                return e && e.getTime
            }

            function b(e) {
                var t, n = e.length,
                    i = Array(n);
                for (t = 0; n > t; t++) i[t] = e[t].toJSON();
                return i
            }

            function w(e, t, n, i, r) {
                var o, a, s, l, c, d = {};
                for (l = 0, c = e.length; c > l; l++) {
                    o = e[l];
                    for (a in t) s = r[a], s && s !== a && (d[s] || (d[s] = fe.setter(s)), d[s](o, t[a](o)), delete o[a])
                }
            }

            function y(e, t, n, i, r) {
                var o, a, s, l, c;
                for (l = 0, c = e.length; c > l; l++) {
                    o = e[l];
                    for (a in t) o[a] = n._parse(a, t[a](o)), s = r[a], s && s !== a && delete o[s]
                }
            }

            function k(e, t, n, i, r) {
                var o, a, s, l;
                for (a = 0, l = e.length; l > a; a++) o = e[a], s = i[o.field], s && s != o.field && (o.field = s), o.value = n._parse(o.field, o.value),
                    o.hasSubgroups ? k(o.items, t, n, i, r) : y(o.items, t, n, i, r)
            }

            function x(e, t, n, i, r, o) {
                return function(a) {
                    return a = e(a), a && !se(i) && ("[object Array]" === Ue.call(a) || a instanceof $e || (a = [a]), n(a, i, new t, r, o)), a || []
                }
            }

            function C(e, t, n, i) {
                for (var r, o, a, s = 0; t.length && i && (r = t[s], o = r.items, a = o.length, e && e.field === r.field && e.value === r.value ? (e.hasSubgroups && e.items.length ? C(e.items[e.items.length - 1], r.items, n, i) : (o = o.slice(n, n + i), e.items = e.items.concat(o)), t.splice(s--, 1)) : r.hasSubgroups && o.length ? (C(r, o, n, i), r.items.length || t.splice(s--, 1)) : (o = o.slice(n, n + i), r.items = o, r.items.length || t.splice(s--, 1)), 0 === o.length ? n -= a : (n = 0, i -= o.length), !(++s >= t.length)););
                t.length > s && t.splice(s, t.length - s)
            }

            function S(e) {
                var t, n, i, r, o, a = [];
                for (t = 0, n = e.length; n > t; t++)
                    if (o = e.at(t), o.hasSubgroups) a = a.concat(S(o.items));
                    else
                        for (i = o.items, r = 0; i.length > r; r++) a.push(i.at(r));
                return a
            }

            function T(e, t) {
                var n, i, r;
                if (t)
                    for (n = 0, i = e.length; i > n; n++) r = e.at(n), r.hasSubgroups ? T(r.items, t) : r.items = new Ye(r.items, t)
            }

            function D(e, t) {
                for (var n = 0, i = e.length; i > n; n++)
                    if (e[n].hasSubgroups) {
                        if (D(e[n].items, t)) return !0
                    } else if (t(e[n].items, e[n])) return !0
            }

            function A(e, t, n, i) {
                for (var r = 0; e.length > r && e[r].data !== t && !E(e[r].data, n, i); r++);
            }

            function E(e, t, n) {
                for (var i = 0, r = e.length; r > i; i++) {
                    if (e[i] && e[i].hasSubgroups) return E(e[i].items, t, n);
                    if (e[i] === t || e[i] === n) return e[i] = n, !0
                }
            }

            function F(e, n, i, r, o) {
                var a, s, l, c;
                for (a = 0, s = e.length; s > a; a++)
                    if (l = e[a], l && !(l instanceof r))
                        if (l.hasSubgroups === t || o) {
                            for (c = 0; n.length > c; c++)
                                if (n[c] === l) {
                                    e[a] = n.at(c), A(i, n, l, e[a]);
                                    break
                                }
                        } else F(l.items, n, i, r, o)
            }

            function I(e, t) {
                var n, i, r;
                for (n = 0, i = e.length; i > n; n++)
                    if (r = e.at(n), r.uid == t.uid) return e.splice(n, 1), r
            }

            function M(e, t) {
                return t ? P(e, function(e) {
                    return e.uid && e.uid == t.uid || e[t.idField] === t.id && t.id !== t._defaultId
                }) : -1
            }

            function R(e, t) {
                return t ? P(e, function(e) {
                    return e.uid == t.uid
                }) : -1
            }

            function P(e, t) {
                var n, i;
                for (n = 0, i = e.length; i > n; n++)
                    if (t(e[n])) return n;
                return -1
            }

            function z(e, t) {
                var n, i;
                return e && !se(e) ? (n = e[t], i = ae(n) ? n.from || n.field || t : e[t] || t, pe(i) ? t : i) : t
            }

            function B(e, t) {
                var n, i, r, o = {};
                for (r in e) "filters" !== r && (o[r] = e[r]);
                if (e.filters)
                    for (o.filters = [], n = 0, i = e.filters.length; i > n; n++) o.filters[n] = B(e.filters[n], t);
                else o.field = z(t.fields, o.field);
                return o
            }

            function L(e, t) {
                var n, i, r, o, a, s = [];
                for (n = 0, i = e.length; i > n; n++) {
                    r = {}, o = e[n];
                    for (a in o) r[a] = o[a];
                    r.field = z(t.fields, r.field), r.aggregates && le(r.aggregates) && (r.aggregates = L(r.aggregates, t)), s.push(r)
                }
                return s
            }

            function H(t, n) {
                var i, r, o, a, s, l, c, d, u, h;
                for (t = e(t)[0], i = t.options, r = n[0], o = n[1], a = [], s = 0, l = i.length; l > s; s++) u = {}, d = i[s], c = d.parentNode, c === t && (c = null), d.disabled || c && c.disabled || (c && (u.optgroup = c.label), u[r.field] = d.text, h = d.attributes.value, h = h && h.specified ? d.value : d.text, u[o.field] = h, a.push(u));
                return a
            }

            function N(t, n) {
                var i, r, o, a, s, l, c, d = e(t)[0].tBodies[0],
                    u = d ? d.rows : [],
                    h = n.length,
                    f = [];
                for (i = 0, r = u.length; r > i; i++) {
                    for (s = {}, c = !0, a = u[i].cells, o = 0; h > o; o++) l = a[o], "th" !== l.nodeName.toLowerCase() && (c = !1, s[n[o].field] = l.innerHTML);
                    c || f.push(s)
                }
                return f
            }

            function O(e) {
                return function() {
                    var t = this._data,
                        n = J.fn[e].apply(this, Oe.call(arguments));
                    return this._data != t && this._attachBubbleHandlers(), n
                }
            }

            function V(t, n) {
                function i(e, t) {
                    return e.filter(t).add(e.find(t))
                }
                var r, o, a, s, l, c, d, u, h = e(t).children(),
                    f = [],
                    p = n[0].field,
                    m = n[1] && n[1].field,
                    g = n[2] && n[2].field,
                    v = n[3] && n[3].field;
                for (r = 0, o = h.length; o > r; r++) a = {
                    _loaded: !0
                }, s = h.eq(r), c = s[0].firstChild, u = s.children(), t = u.filter("ul"), u = u.filter(":not(ul)"), l = s.attr("data-id"), l && (a.id = l), c && (a[p] = 3 == c.nodeType ? c.nodeValue : u.text()), m && (a[m] = i(u, "a").attr("href")), v && (a[v] = i(u, "img").attr("src")), g && (d = i(u, ".k-sprite").prop("className"), a[g] = d && e.trim(d.replace("k-sprite", ""))), t.length && (a.items = V(t.eq(0), n)), "true" == s.attr("data-hasChildren") && (a.hasChildren = !0), f.push(a);
                return f
            }
            var U, W, j, q, G, $, Y, K, Q, X, J, Z, ee, te, ne, ie, re = e.extend,
                oe = e.proxy,
                ae = e.isPlainObject,
                se = e.isEmptyObject,
                le = e.isArray,
                ce = e.grep,
                de = e.ajax,
                ue = e.each,
                he = e.noop,
                fe = window.kendo,
                pe = fe.isFunction,
                me = fe.Observable,
                ge = fe.Class,
                ve = "string",
                _e = "function",
                be = "create",
                we = "read",
                ye = "update",
                ke = "destroy",
                xe = "change",
                Ce = "sync",
                Se = "get",
                Te = "error",
                De = "requestStart",
                Ae = "progress",
                Ee = "requestEnd",
                Fe = [be, we, ye, ke],
                Ie = function(e) {
                    return e
                },
                Me = fe.getter,
                Re = fe.stringify,
                Pe = Math,
                ze = [].push,
                Be = [].join,
                Le = [].pop,
                He = [].splice,
                Ne = [].shift,
                Oe = [].slice,
                Ve = [].unshift,
                Ue = {}.toString,
                We = fe.support.stableSort,
                je = /^\/Date\((.*?)\)\/$/,
                qe = /(\r+|\n+)/g,
                Ge = /(?=['\\])/g,
                $e = me.extend({
                    init: function(e, t) {
                        var n = this;
                        n.type = t || Ke, me.fn.init.call(n), n.length = e.length, n.wrapAll(e, n)
                    },
                    at: function(e) {
                        return this[e]
                    },
                    toJSON: function() {
                        var e, t, n = this.length,
                            i = Array(n);
                        for (e = 0; n > e; e++) t = this[e], t instanceof Ke && (t = t.toJSON()), i[e] = t;
                        return i
                    },
                    parent: he,
                    wrapAll: function(e, t) {
                        var n, i, r = this,
                            o = function() {
                                return r
                            };
                        for (t = t || [], n = 0, i = e.length; i > n; n++) t[n] = r.wrap(e[n], o);
                        return t
                    },
                    wrap: function(e, t) {
                        var n, i = this;
                        return null !== e && "[object Object]" === Ue.call(e) && (n = e instanceof i.type || e instanceof Je, n || (e = e instanceof Ke ? e.toJSON() : e, e = new i.type(e)), e.parent = t, e.bind(xe, function(e) {
                            i.trigger(xe, {
                                field: e.field,
                                node: e.node,
                                index: e.index,
                                items: e.items || [this],
                                action: e.node ? e.action || "itemloaded" : "itemchange"
                            })
                        })), e
                    },
                    push: function() {
                        var e, t = this.length,
                            n = this.wrapAll(arguments);
                        return e = ze.apply(this, n), this.trigger(xe, {
                            action: "add",
                            index: t,
                            items: n
                        }), e
                    },
                    slice: Oe,
                    sort: [].sort,
                    join: Be,
                    pop: function() {
                        var e = this.length,
                            t = Le.apply(this);
                        return e && this.trigger(xe, {
                            action: "remove",
                            index: e - 1,
                            items: [t]
                        }), t
                    },
                    splice: function(e, t, n) {
                        var i, r, o, a = this.wrapAll(Oe.call(arguments, 2));
                        if (i = He.apply(this, [e, t].concat(a)), i.length)
                            for (this.trigger(xe, {
                                action: "remove",
                                index: e,
                                items: i
                            }), r = 0, o = i.length; o > r; r++) i[r] && i[r].children && i[r].unbind(xe);
                        return n && this.trigger(xe, {
                            action: "add",
                            index: e,
                            items: a
                        }), i
                    },
                    shift: function() {
                        var e = this.length,
                            t = Ne.apply(this);
                        return e && this.trigger(xe, {
                            action: "remove",
                            index: 0,
                            items: [t]
                        }), t
                    },
                    unshift: function() {
                        var e, t = this.wrapAll(arguments);
                        return e = Ve.apply(this, t), this.trigger(xe, {
                            action: "add",
                            index: 0,
                            items: t
                        }), e
                    },
                    indexOf: function(e) {
                        var t, n, i = this;
                        for (t = 0, n = i.length; n > t; t++)
                            if (i[t] === e) return t;
                        return -1
                    },
                    forEach: function(e) {
                        for (var t = 0, n = this.length; n > t; t++) e(this[t], t, this)
                    },
                    map: function(e) {
                        for (var t = 0, n = [], i = this.length; i > t; t++) n[t] = e(this[t], t, this);
                        return n
                    },
                    reduce: function(e) {
                        var t, n = 0,
                            i = this.length;
                        for (2 == arguments.length ? t = arguments[1] : i > n && (t = this[n++]); i > n; n++) t = e(t, this[n], n, this);
                        return t
                    },
                    reduceRight: function(e) {
                        var t, n = this.length - 1;
                        for (2 == arguments.length ? t = arguments[1] : n > 0 && (t = this[n--]); n >= 0; n--) t = e(t, this[n], n, this);
                        return t
                    },
                    filter: function(e) {
                        for (var t, n = 0, i = [], r = this.length; r > n; n++) t = this[n], e(t, n, this) && (i[i.length] = t);
                        return i
                    },
                    find: function(e) {
                        for (var t, n = 0, i = this.length; i > n; n++)
                            if (t = this[n], e(t, n, this)) return t
                    },
                    every: function(e) {
                        for (var t, n = 0, i = this.length; i > n; n++)
                            if (t = this[n], !e(t, n, this)) return !1;
                        return !0
                    },
                    some: function(e) {
                        for (var t, n = 0, i = this.length; i > n; n++)
                            if (t = this[n], e(t, n, this)) return !0;
                        return !1
                    },
                    remove: function(e) {
                        var t = this.indexOf(e); - 1 !== t && this.splice(t, 1)
                    },
                    empty: function() {
                        this.splice(0, this.length)
                    }
                }),
                Ye = $e.extend({
                    init: function(e, t) {
                        me.fn.init.call(this), this.type = t || Ke;
                        for (var n = 0; e.length > n; n++) this[n] = e[n];
                        this.length = n, this._parent = oe(function() {
                            return this
                        }, this)
                    },
                    at: function(e) {
                        var t = this[e];
                        return t instanceof this.type ? t.parent = this._parent : t = this[e] = this.wrap(t, this._parent), t
                    }
                }),
                Ke = me.extend({
                    init: function(e) {
                        var t, n, i = this,
                            r = function() {
                                return i
                            };
                        me.fn.init.call(this), this._handlers = {};
                        for (n in e) t = e[n], "object" == typeof t && t && !t.getTime && "_" != n.charAt(0) && (t = i.wrap(t, n, r)), i[n] = t;
                        i.uid = fe.guid()
                    },
                    shouldSerialize: function(e) {
                        return this.hasOwnProperty(e) && "_handlers" !== e && "_events" !== e && typeof this[e] !== _e && "uid" !== e
                    },
                    forEach: function(e) {
                        for (var t in this) this.shouldSerialize(t) && e(this[t], t)
                    },
                    toJSON: function() {
                        var e, t, n = {};
                        for (t in this) this.shouldSerialize(t) && (e = this[t], (e instanceof Ke || e instanceof $e) && (e = e.toJSON()), n[t] = e);
                        return n
                    },
                    get: function(e) {
                        var t, n = this;
                        return n.trigger(Se, {
                            field: e
                        }), t = "this" === e ? n : fe.getter(e, !0)(n)
                    },
                    _set: function(e, t) {
                        var n, i, r, o = this,
                            a = e.indexOf(".") >= 0;
                        if (a)
                            for (n = e.split("."), i = ""; n.length > 1;) {
                                if (i += n.shift(), r = fe.getter(i, !0)(o), r instanceof Ke) return r.set(n.join("."), t), a;
                                i += "."
                            }
                        return fe.setter(e)(o, t), a
                    },
                    set: function(e, t) {
                        var n = this,
                            i = !1,
                            r = e.indexOf(".") >= 0,
                            o = fe.getter(e, !0)(n);
                        return o !== t && (o instanceof me && this._handlers[e] && (this._handlers[e].get && o.unbind(Se, this._handlers[e].get), o.unbind(xe, this._handlers[e].change)), i = n.trigger("set", {
                            field: e,
                            value: t
                        }), i || (r || (t = n.wrap(t, e, function() {
                            return n
                        })), (!n._set(e, t) || e.indexOf("(") >= 0 || e.indexOf("[") >= 0) && n.trigger(xe, {
                            field: e
                        }))), i
                    },
                    parent: he,
                    wrap: function(e, t, i) {
                        var r, o, a, s, l = this,
                            c = Ue.call(e);
                        return null == e || "[object Object]" !== c && "[object Array]" !== c || (a = e instanceof $e, s = e instanceof J, "[object Object]" !== c || s || a ? ("[object Array]" === c || a || s) && (a || s || (e = new $e(e)), o = n(l, xe, t, !1), e.bind(xe, o), l._handlers[t] = {
                            change: o
                        }) : (e instanceof Ke || (e = new Ke(e)), r = n(l, Se, t, !0), e.bind(Se, r), o = n(l, xe, t, !0), e.bind(xe, o), l._handlers[t] = {
                            get: r,
                            change: o
                        }), e.parent = i), e
                    }
                }),
                Qe = {
                    number: function(e) {
                        return fe.parseFloat(e)
                    },
                    date: function(e) {
                        return fe.parseDate(e)
                    },
                    "boolean": function(e) {
                        return typeof e === ve ? "true" === e.toLowerCase() : null != e ? !!e : e
                    },
                    string: function(e) {
                        return null != e ? e + "" : e
                    },
                    "default": function(e) {
                        return e
                    }
                },
                Xe = {
                    string: "",
                    number: 0,
                    date: new Date,
                    "boolean": !1,
                    "default": ""
                },
                Je = Ke.extend({
                    init: function(n) {
                        var i, r, o = this;
                        if ((!n || e.isEmptyObject(n)) && (n = e.extend({}, o.defaults, n), o._initializers))
                            for (i = 0; o._initializers.length > i; i++) r = o._initializers[i], n[r] = o.defaults[r]();
                        Ke.fn.init.call(o, n), o.dirty = !1, o.idField && (o.id = o.get(o.idField), o.id === t && (o.id = o._defaultId))
                    },
                    shouldSerialize: function(e) {
                        return Ke.fn.shouldSerialize.call(this, e) && "uid" !== e && !("id" !== this.idField && "id" === e) && "dirty" !== e && "_accessors" !== e
                    },
                    _parse: function(e, t) {
                        var n, i = this,
                            o = e,
                            a = i.fields || {};
                        return e = a[e], e || (e = r(a, o)), e && (n = e.parse, !n && e.type && (n = Qe[e.type.toLowerCase()])), n ? n(t) : t
                    },
                    _notifyChange: function(e) {
                        var t = e.action;
                        ("add" == t || "remove" == t) && (this.dirty = !0)
                    },
                    editable: function(e) {
                        return e = (this.fields || {})[e], e ? e.editable !== !1 : !0
                    },
                    set: function(e, t, n) {
                        var r = this,
                            o = r.dirty;
                        r.editable(e) && (t = r._parse(e, t), i(t, r.get(e)) || (r.dirty = !0, Ke.fn.set.call(r, e, t, n) && !o && (r.dirty = o)))
                    },
                    accept: function(e) {
                        var t, n, i = this,
                            r = function() {
                                return i
                            };
                        for (t in e) n = e[t], "_" != t.charAt(0) && (n = i.wrap(e[t], t, r)), i._set(t, n);
                        i.idField && (i.id = i.get(i.idField)), i.dirty = !1
                    },
                    isNew: function() {
                        return this.id === this._defaultId
                    }
                });
            Je.define = function(e, n) {
                n === t && (n = e, e = Je);
                var i, r, o, a, s, l, c, d, u = re({
                        defaults: {}
                    }, n),
                    h = {},
                    f = u.id,
                    p = [];
                if (f && (u.idField = f), u.id && delete u.id, f && (u.defaults[f] = u._defaultId = ""), "[object Array]" === Ue.call(u.fields)) {
                    for (l = 0, c = u.fields.length; c > l; l++) o = u.fields[l], typeof o === ve ? h[o] = {} : o.field && (h[o.field] = o);
                    u.fields = h
                }
                for (r in u.fields) o = u.fields[r], a = o.type || "default", s = null, d = r, r = typeof o.field === ve ? o.field : r, o.nullable || (s = u.defaults[d !== r ? d : r] = o.defaultValue !== t ? o.defaultValue : Xe[a.toLowerCase()], "function" == typeof s && p.push(r)), n.id === r && (u._defaultId = s), u.defaults[d !== r ? d : r] = s, o.parse = o.parse || Qe[a];
                return p.length > 0 && (u._initializers = p), i = e.extend(u), i.define = function(e) {
                    return Je.define(i, e)
                }, u.fields && (i.fields = u.fields, i.idField = u.idField), i
            }, W = {
                selector: function(e) {
                    return pe(e) ? e : Me(e)
                },
                compare: function(e) {
                    var t = this.selector(e);
                    return function(e, n) {
                        return e = t(e), n = t(n), null == e && null == n ? 0 : null == e ? -1 : null == n ? 1 : e.localeCompare ? e.localeCompare(n) : e > n ? 1 : n > e ? -1 : 0
                    }
                },
                create: function(e) {
                    var t = e.compare || this.compare(e.field);
                    return "desc" == e.dir ? function(e, n) {
                        return t(n, e, !0)
                    } : t
                },
                combine: function(e) {
                    return function(t, n) {
                        var i, r, o = e[0](t, n);
                        for (i = 1, r = e.length; r > i; i++) o = o || e[i](t, n);
                        return o
                    }
                }
            }, j = re({}, W, {
                asc: function(e) {
                    var t = this.selector(e);
                    return function(e, n) {
                        var i = t(e),
                            r = t(n);
                        return i && i.getTime && r && r.getTime && (i = i.getTime(), r = r.getTime()), i === r ? e.__position - n.__position : null == i ? -1 : null == r ? 1 : i.localeCompare ? i.localeCompare(r) : i > r ? 1 : -1
                    }
                },
                desc: function(e) {
                    var t = this.selector(e);
                    return function(e, n) {
                        var i = t(e),
                            r = t(n);
                        return i && i.getTime && r && r.getTime && (i = i.getTime(), r = r.getTime()), i === r ? e.__position - n.__position : null == i ? 1 : null == r ? -1 : r.localeCompare ? r.localeCompare(i) : r > i ? 1 : -1
                    }
                },
                create: function(e) {
                    return this[e.dir](e.field)
                }
            }), U = function(e, t) {
                var n, i = e.length,
                    r = Array(i);
                for (n = 0; i > n; n++) r[n] = t(e[n], n, e);
                return r
            }, q = function() {
                function e(e) {
                    return e.replace(Ge, "\\").replace(qe, "")
                }

                function t(t, n, i, r) {
                    var o;
                    return null != i && (typeof i === ve && (i = e(i), o = je.exec(i), o ? i = new Date(+o[1]) : r ? (i = "'" + i.toLowerCase() + "'", n = "((" + n + " || '')+'').toLowerCase()") : i = "'" + i + "'"), i.getTime && (n = "(" + n + "&&" + n + ".getTime?" + n + ".getTime():" + n + ")", i = i.getTime())), n + " " + t + " " + i
                }
                return {
                    quote: function(t) {
                        return t && t.getTime ? "new Date(" + t.getTime() + ")" : "string" == typeof t ? "'" + e(t) + "'" : "" + t
                    },
                    eq: function(e, n, i) {
                        return t("==", e, n, i)
                    },
                    neq: function(e, n, i) {
                        return t("!=", e, n, i)
                    },
                    gt: function(e, n, i) {
                        return t(">", e, n, i)
                    },
                    gte: function(e, n, i) {
                        return t(">=", e, n, i)
                    },
                    lt: function(e, n, i) {
                        return t("<", e, n, i)
                    },
                    lte: function(e, n, i) {
                        return t("<=", e, n, i)
                    },
                    startswith: function(t, n, i) {
                        return i && (t = "(" + t + " || '').toLowerCase()", n && (n = n.toLowerCase())), n && (n = e(n)), t + ".lastIndexOf('" + n + "', 0) == 0"
                    },
                    doesnotstartwith: function(t, n, i) {
                        return i && (t = "(" + t + " || '').toLowerCase()", n && (n = n.toLowerCase())), n && (n = e(n)), t + ".lastIndexOf('" + n + "', 0) == -1"
                    },
                    endswith: function(t, n, i) {
                        return i && (t = "(" + t + " || '').toLowerCase()", n && (n = n.toLowerCase())), n && (n = e(n)), t + ".indexOf('" + n + "', " + t + ".length - " + (n || "").length + ") >= 0"
                    },
                    doesnotendwith: function(t, n, i) {
                        return i && (t = "(" + t + " || '').toLowerCase()", n && (n = n.toLowerCase())), n && (n = e(n)), t + ".indexOf('" + n + "', " + t + ".length - " + (n || "").length + ") < 0"
                    },
                    contains: function(t, n, i) {
                        return i && (t = "(" + t + " || '').toLowerCase()", n && (n = n.toLowerCase())), n && (n = e(n)), t + ".indexOf('" + n + "') >= 0"
                    },
                    doesnotcontain: function(t, n, i) {
                        return i && (t = "(" + t + " || '').toLowerCase()", n && (n = n.toLowerCase())), n && (n = e(n)), t + ".indexOf('" + n + "') == -1"
                    },
                    isempty: function(e) {
                        return e + " === ''"
                    },
                    isnotempty: function(e) {
                        return e + " !== ''"
                    },
                    isnull: function(e) {
                        return "(" + e + " === null || " + e + " === undefined)"
                    },
                    isnotnull: function(e) {
                        return "(" + e + " !== null && " + e + " !== undefined)"
                    }
                }
            }(), o.filterExpr = function(e) {
                var n, i, r, a, s, l, c = [],
                    d = {
                        and: " && ",
                        or: " || "
                    },
                    u = [],
                    h = [],
                    f = e.filters;
                for (n = 0, i = f.length; i > n; n++) r = f[n], s = r.field, l = r.operator, r.filters ? (a = o.filterExpr(r), r = a.expression.replace(/__o\[(\d+)\]/g, function(e, t) {
                    return t = +t, "__o[" + (h.length + t) + "]"
                }).replace(/__f\[(\d+)\]/g, function(e, t) {
                    return t = +t, "__f[" + (u.length + t) + "]"
                }), h.push.apply(h, a.operators), u.push.apply(u, a.fields)) : (typeof s === _e ? (a = "__f[" + u.length + "](d)", u.push(s)) : a = fe.expr(s), typeof l === _e ? (r = "__o[" + h.length + "](" + a + ", " + q.quote(r.value) + ")", h.push(l)) : r = q[(l || "eq").toLowerCase()](a, r.value, r.ignoreCase !== t ? r.ignoreCase : !0)), c.push(r);
                return {
                    expression: "(" + c.join(d[e.logic]) + ")",
                    fields: u,
                    operators: h
                }
            }, G = {
                "==": "eq",
                equals: "eq",
                isequalto: "eq",
                equalto: "eq",
                equal: "eq",
                "!=": "neq",
                ne: "neq",
                notequals: "neq",
                isnotequalto: "neq",
                notequalto: "neq",
                notequal: "neq",
                "<": "lt",
                islessthan: "lt",
                lessthan: "lt",
                less: "lt",
                "<=": "lte",
                le: "lte",
                islessthanorequalto: "lte",
                lessthanequal: "lte",
                ">": "gt",
                isgreaterthan: "gt",
                greaterthan: "gt",
                greater: "gt",
                ">=": "gte",
                isgreaterthanorequalto: "gte",
                greaterthanequal: "gte",
                ge: "gte",
                notsubstringof: "doesnotcontain",
                isnull: "isnull",
                isempty: "isempty",
                isnotempty: "isnotempty"
            }, o.normalizeFilter = l, o.compareFilters = h, o.prototype = {
                toArray: function() {
                    return this.data
                },
                range: function(e, t) {
                    return new o(this.data.slice(e, e + t))
                },
                skip: function(e) {
                    return new o(this.data.slice(e))
                },
                take: function(e) {
                    return new o(this.data.slice(0, e))
                },
                select: function(e) {
                    return new o(U(this.data, e))
                },
                order: function(e, t) {
                    var n = {
                        dir: t
                    };
                    return e && (e.compare ? n.compare = e.compare : n.field = e), new o(this.data.slice(0).sort(W.create(n)))
                },
                orderBy: function(e) {
                    return this.order(e, "asc")
                },
                orderByDescending: function(e) {
                    return this.order(e, "desc")
                },
                sort: function(e, t, n) {
                    var i, r, o = a(e, t),
                        s = [];
                    if (n = n || W, o.length) {
                        for (i = 0, r = o.length; r > i; i++) s.push(n.create(o[i]));
                        return this.orderBy({
                            compare: n.combine(s)
                        })
                    }
                    return this
                },
                filter: function(e) {
                    var t, n, i, r, a, s, c, d, u = this.data,
                        h = [];
                    if (e = l(e), !e || 0 === e.filters.length) return this;
                    for (r = o.filterExpr(e), s = r.fields, c = r.operators, a = d = Function("d, __f, __o", "return " + r.expression), (s.length || c.length) && (d = function(e) {
                        return a(e, s, c)
                    }), t = 0, i = u.length; i > t; t++) n = u[t], d(n) && h.push(n);
                    return new o(h)
                },
                group: function(e, t) {
                    e = p(e || []), t = t || this.data;
                    var n, i = this,
                        r = new o(i.data);
                    return e.length > 0 && (n = e[0], r = r.groupBy(n).select(function(i) {
                        var r = new o(t).filter([{
                            field: i.field,
                            operator: "eq",
                            value: i.value,
                            ignoreCase: !1
                        }]);
                        return {
                            field: i.field,
                            value: i.value,
                            items: e.length > 1 ? new o(i.items).group(e.slice(1), r.toArray()).toArray() : i.items,
                            hasSubgroups: e.length > 1,
                            aggregates: r.aggregate(n.aggregates)
                        }
                    })), r
                },
                groupBy: function(e) {
                    if (se(e) || !this.data.length) return new o([]);
                    var t, n, i, r, a = e.field,
                        s = this._sortForGrouping(a, e.dir || "asc"),
                        l = fe.accessor(a),
                        c = l.get(s[0], a),
                        d = {
                            field: a,
                            value: c,
                            items: []
                        },
                        u = [d];
                    for (i = 0, r = s.length; r > i; i++) t = s[i], n = l.get(t, a), m(c, n) || (c = n, d = {
                        field: a,
                        value: c,
                        items: []
                    }, u.push(d)), d.items.push(t);
                    return new o(u)
                },
                _sortForGrouping: function(e, t) {
                    var n, i, r = this.data;
                    if (!We) {
                        for (n = 0, i = r.length; i > n; n++) r[n].__position = n;
                        for (r = new o(r).sort(e, t, j).toArray(), n = 0, i = r.length; i > n; n++) delete r[n].__position;
                        return r
                    }
                    return this.sort(e, t).toArray()
                },
                aggregate: function(e) {
                    var t, n, i = {},
                        r = {};
                    if (e && e.length)
                        for (t = 0, n = this.data.length; n > t; t++) g(i, e, this.data[t], t, n, r);
                    return i
                }
            }, $ = {
                sum: function(e, t, n) {
                    var i = n.get(t);
                    return v(e) ? v(i) && (e += i) : e = i, e
                },
                count: function(e) {
                    return (e || 0) + 1
                },
                average: function(e, n, i, r, o, a) {
                    var s = i.get(n);
                    return a.count === t && (a.count = 0), v(e) ? v(s) && (e += s) : e = s, v(s) && a.count++, r == o - 1 && v(e) && (e /= a.count), e
                },
                max: function(e, t, n) {
                    var i = n.get(t);
                    return v(e) || _(e) || (e = i), i > e && (v(i) || _(i)) && (e = i), e
                },
                min: function(e, t, n) {
                    var i = n.get(t);
                    return v(e) || _(e) || (e = i), e > i && (v(i) || _(i)) && (e = i), e
                }
            }, o.process = function(e, n) {
                n = n || {};
                var i, r = new o(e),
                    s = n.group,
                    l = p(s || []).concat(a(n.sort || [])),
                    c = n.filterCallback,
                    d = n.filter,
                    u = n.skip,
                    h = n.take;
                return d && (r = r.filter(d), c && (r = c(r)), i = r.toArray().length), l && (r = r.sort(l), s && (e = r.toArray())), u !== t && h !== t && (r = r.range(u, h)), s && (r = r.group(s, e)), {
                    total: i,
                    data: r.toArray()
                }
            }, Y = ge.extend({
                init: function(e) {
                    this.data = e.data
                },
                read: function(e) {
                    e.success(this.data)
                },
                update: function(e) {
                    e.success(e.data)
                },
                create: function(e) {
                    e.success(e.data)
                },
                destroy: function(e) {
                    e.success(e.data)
                }
            }), K = ge.extend({
                init: function(e) {
                    var t, n = this;
                    e = n.options = re({}, n.options, e), ue(Fe, function(t, n) {
                        typeof e[n] === ve && (e[n] = {
                            url: e[n]
                        })
                    }), n.cache = e.cache ? Q.create(e.cache) : {
                        find: he,
                        add: he
                    }, t = e.parameterMap, pe(e.push) && (n.push = e.push), n.push || (n.push = Ie), n.parameterMap = pe(t) ? t : function(e) {
                        var n = {};
                        return ue(e, function(e, i) {
                            e in t && (e = t[e], ae(e) && (i = e.value(i), e = e.key)), n[e] = i
                        }), n
                    }
                },
                options: {
                    parameterMap: Ie
                },
                create: function(e) {
                    return de(this.setup(e, be))
                },
                read: function(n) {
                    var i, r, o, a = this,
                        s = a.cache;
                    n = a.setup(n, we), i = n.success || he, r = n.error || he, o = s.find(n.data), o !== t ? i(o) : (n.success = function(e) {
                        s.add(n.data, e), i(e)
                    }, e.ajax(n))
                },
                update: function(e) {
                    return de(this.setup(e, ye))
                },
                destroy: function(e) {
                    return de(this.setup(e, ke))
                },
                setup: function(e, t) {
                    e = e || {};
                    var n, i = this,
                        r = i.options[t],
                        o = pe(r.data) ? r.data(e.data) : r.data;
                    return e = re(!0, {}, r, e), n = re(!0, {}, o, e.data), e.data = i.parameterMap(n, t), pe(e.url) && (e.url = e.url(n)), e
                }
            }), Q = ge.extend({
                init: function() {
                    this._store = {}
                },
                add: function(e, n) {
                    e !== t && (this._store[Re(e)] = n)
                },
                find: function(e) {
                    return this._store[Re(e)]
                },
                clear: function() {
                    this._store = {}
                },
                remove: function(e) {
                    delete this._store[Re(e)]
                }
            }), Q.create = function(e) {
                var t = {
                    inmemory: function() {
                        return new Q
                    }
                };
                return ae(e) && pe(e.find) ? e : e === !0 ? new Q : t[e]()
            }, X = ge.extend({
                init: function(e) {
                    var t, n, i, r, o, a, s, l, c, d, u, h, f, p = this;
                    e = e || {};
                    for (t in e) n = e[t], p[t] = typeof n === ve ? Me(n) : n;
                    r = e.modelBase || Je, ae(p.model) && (p.model = i = r.define(p.model)), o = oe(p.data, p), p._dataAccessFunction = o, p.model && (a = oe(p.groups, p), s = oe(p.serialize, p), l = {}, c = {}, d = {}, u = {}, h = !1, i = p.model, i.fields && (ue(i.fields, function(e, t) {
                        var n;
                        f = e, ae(t) && t.field ? f = t.field : typeof t === ve && (f = t), ae(t) && t.from && (n = t.from), h = h || n && n !== e || f !== e, c[e] = Me(n || f), d[e] = Me(e), l[n || f] = e, u[e] = n || f
                    }), !e.serialize && h && (p.serialize = x(s, i, w, d, l, u))), p._dataAccessFunction = o, p.data = x(o, i, y, c, l, u), p.groups = x(a, i, k, c, l, u))
                },
                errors: function(e) {
                    return e ? e.errors : null
                },
                parse: Ie,
                data: Ie,
                total: function(e) {
                    return e.length
                },
                groups: Ie,
                aggregates: function() {
                    return {}
                },
                serialize: function(e) {
                    return e
                }
            }), J = me.extend({
                init: function(e) {
                    var n, i, r, o = this;
                    e && (i = e.data), e = o.options = re({}, o.options, e), o._map = {}, o._prefetch = {}, o._data = [], o._pristineData = [], o._ranges = [], o._view = [], o._pristineTotal = 0, o._destroyed = [], o._pageSize = e.pageSize, o._page = e.page || (e.pageSize ? 1 : t), o._sort = a(e.sort), o._filter = l(e.filter), o._group = p(e.group), o._aggregate = e.aggregate, o._total = e.total, o._shouldDetachObservableParents = !0, me.fn.init.call(o), o.transport = Z.create(e, i, o), pe(o.transport.push) && o.transport.push({
                        pushCreate: oe(o._pushCreate, o),
                        pushUpdate: oe(o._pushUpdate, o),
                        pushDestroy: oe(o._pushDestroy, o)
                    }), null != e.offlineStorage && ("string" == typeof e.offlineStorage ? (r = e.offlineStorage, o._storage = {
                        getItem: function() {
                            return JSON.parse(localStorage.getItem(r))
                        },
                        setItem: function(e) {
                            localStorage.setItem(r, Re(o.reader.serialize(e)))
                        }
                    }) : o._storage = e.offlineStorage), o.reader = new fe.data.readers[e.schema.type || "json"](e.schema), n = o.reader.model || {}, o._detachObservableParents(), o._data = o._observe(o._data), o._online = !0, o.bind(["push", Te, xe, De, Ce, Ee, Ae], e)
                },
                options: {
                    data: null,
                    schema: {
                        modelBase: Je
                    },
                    offlineStorage: null,
                    serverSorting: !1,
                    serverPaging: !1,
                    serverFiltering: !1,
                    serverGrouping: !1,
                    serverAggregates: !1,
                    batch: !1
                },
                clone: function() {
                    return this
                },
                online: function(n) {
                    return n !== t ? this._online != n && (this._online = n, n) ? this.sync() : e.Deferred().resolve().promise() : this._online
                },
                offlineData: function(e) {
                    return null == this.options.offlineStorage ? null : e !== t ? this._storage.setItem(e) : this._storage.getItem() || []
                },
                _isServerGrouped: function() {
                    var e = this.group() || [];
                    return this.options.serverGrouping && e.length
                },
                _pushCreate: function(e) {
                    this._push(e, "pushCreate")
                },
                _pushUpdate: function(e) {
                    this._push(e, "pushUpdate")
                },
                _pushDestroy: function(e) {
                    this._push(e, "pushDestroy")
                },
                _push: function(e, t) {
                    var n = this._readData(e);
                    n || (n = e), this[t](n)
                },
                _flatData: function(e, t) {
                    if (e) {
                        if (this._isServerGrouped()) return S(e);
                        if (!t)
                            for (var n = 0; e.length > n; n++) e.at(n)
                    }
                    return e
                },
                parent: he,
                get: function(e) {
                    var t, n, i = this._flatData(this._data);
                    for (t = 0, n = i.length; n > t; t++)
                        if (i[t].id == e) return i[t]
                },
                getByUid: function(e) {
                    var t, n, i = this._flatData(this._data);
                    if (i)
                        for (t = 0, n = i.length; n > t; t++)
                            if (i[t].uid == e) return i[t]
                },
                indexOf: function(e) {
                    return R(this._data, e)
                },
                at: function(e) {
                    return this._data.at(e)
                },
                data: function(e) {
                    var n, i = this;
                    if (e === t) {
                        if (i._data)
                            for (n = 0; i._data.length > n; n++) i._data.at(n);
                        return i._data
                    }
                    i._detachObservableParents(), i._data = this._observe(e), i._pristineData = e.slice(0), i._storeData(), i._ranges = [], i.trigger("reset"), i._addRange(i._data), i._total = i._data.length, i._pristineTotal = i._total, i._process(i._data)
                },
                view: function(e) {
                    return e === t ? this._view : (this._view = this._observeView(e), t)
                },
                _observeView: function(e) {
                    var t, n = this;
                    return F(e, n._data, n._ranges, n.reader.model || Ke, n._isServerGrouped()), t = new Ye(e, n.reader.model), t.parent = function() {
                        return n.parent()
                    }, t
                },
                flatView: function() {
                    var e = this.group() || [];
                    return e.length ? S(this._view) : this._view
                },
                add: function(e) {
                    return this.insert(this._data.length, e)
                },
                _createNewModel: function(e) {
                    return this.reader.model ? new this.reader.model(e) : e instanceof Ke ? e : new Ke(e)
                },
                insert: function(e, t) {
                    return t || (t = e, e = 0), t instanceof Je || (t = this._createNewModel(t)), this._isServerGrouped() ? this._data.splice(e, 0, this._wrapInEmptyGroup(t)) : this._data.splice(e, 0, t), t
                },
                pushCreate: function(e) {
                    var t, n, i, r, o, a;
                    le(e) || (e = [e]), t = [], n = this.options.autoSync, this.options.autoSync = !1;
                    try {
                        for (i = 0; e.length > i; i++) r = e[i], o = this.add(r), t.push(o), a = o.toJSON(), this._isServerGrouped() && (a = this._wrapInEmptyGroup(a)), this._pristineData.push(a)
                    } finally {
                        this.options.autoSync = n
                    }
                    t.length && this.trigger("push", {
                        type: "create",
                        items: t
                    })
                },
                pushUpdate: function(e) {
                    var t, n, i, r, o;
                    for (le(e) || (e = [e]), t = [], n = 0; e.length > n; n++) i = e[n], r = this._createNewModel(i), o = this.get(r.id), o ? (t.push(o), o.accept(i), o.trigger(xe), this._updatePristineForModel(o, i)) : this.pushCreate(i);
                    t.length && this.trigger("push", {
                        type: "update",
                        items: t
                    })
                },
                pushDestroy: function(e) {
                    var t = this._removeItems(e);
                    t.length && this.trigger("push", {
                        type: "destroy",
                        items: t
                    })
                },
                _removeItems: function(e) {
                    var t, n, i, r, o, a;
                    le(e) || (e = [e]), t = [], n = this.options.autoSync, this.options.autoSync = !1;
                    try {
                        for (i = 0; e.length > i; i++) r = e[i], o = this._createNewModel(r), a = !1, this._eachItem(this._data, function(e) {
                            var n, i;
                            for (n = 0; e.length > n; n++)
                                if (i = e.at(n), i.id === o.id) {
                                    t.push(i), e.splice(n, 1), a = !0;
                                    break
                                }
                        }), a && (this._removePristineForModel(o), this._destroyed.pop())
                    } finally {
                        this.options.autoSync = n
                    }
                    return t
                },
                remove: function(e) {
                    var n, i = this,
                        r = i._isServerGrouped();
                    return this._eachItem(i._data, function(o) {
                        return n = I(o, e), n && r ? (n.isNew && n.isNew() || i._destroyed.push(n), !0) : t
                    }), this._removeModelFromRanges(e), this._updateRangesLength(), e
                },
                destroyed: function() {
                    return this._destroyed
                },
                created: function() {
                    var e, t, n = [],
                        i = this._flatData(this._data);
                    for (e = 0, t = i.length; t > e; e++) i[e].isNew && i[e].isNew() && n.push(i[e]);
                    return n
                },
                updated: function() {
                    var e, t, n = [],
                        i = this._flatData(this._data);
                    for (e = 0, t = i.length; t > e; e++) i[e].isNew && !i[e].isNew() && i[e].dirty && n.push(i[e]);
                    return n
                },
                sync: function() {
                    var t, n = this,
                        i = [],
                        r = [],
                        o = n._destroyed,
                        a = e.Deferred().resolve().promise();
                    if (n.online()) {
                        if (!n.reader.model) return a;
                        i = n.created(), r = n.updated(), t = [], n.options.batch && n.transport.submit ? t = n._sendSubmit(i, r, o) : (t.push.apply(t, n._send("create", i)), t.push.apply(t, n._send("update", r)), t.push.apply(t, n._send("destroy", o))), a = e.when.apply(null, t).then(function() {
                            var e, t;
                            for (e = 0, t = arguments.length; t > e; e++) n._accept(arguments[e]);
                            n._storeData(!0), n._change({
                                action: "sync"
                            }), n.trigger(Ce)
                        })
                    } else n._storeData(!0), n._change({
                        action: "sync"
                    });
                    return a
                },
                cancelChanges: function(e) {
                    var t = this;
                    e instanceof fe.data.Model ? t._cancelModel(e) : (t._destroyed = [], t._detachObservableParents(), t._data = t._observe(t._pristineData), t.options.serverPaging && (t._total = t._pristineTotal), t._ranges = [], t._addRange(t._data), t._change(), t._markOfflineUpdatesAsDirty())
                },
                _markOfflineUpdatesAsDirty: function() {
                    var e = this;
                    null != e.options.offlineStorage && e._eachItem(e._data, function(e) {
                        var t, n;
                        for (t = 0; e.length > t; t++) n = e.at(t), "update" == n.__state__ && (n.dirty = !0)
                    })
                },
                hasChanges: function() {
                    var e, t, n = this._flatData(this._data);
                    if (this._destroyed.length) return !0;
                    for (e = 0, t = n.length; t > e; e++)
                        if (n[e].isNew && n[e].isNew() || n[e].dirty) return !0;
                    return !1
                },
                _accept: function(t) {
                    var n, i = this,
                        r = t.models,
                        o = t.response,
                        a = 0,
                        s = i._isServerGrouped(),
                        l = i._pristineData,
                        c = t.type;
                    if (i.trigger(Ee, {
                        response: o,
                        type: c
                    }), o && !se(o)) {
                        if (o = i.reader.parse(o), i._handleCustomErrors(o)) return;
                        o = i.reader.data(o), le(o) || (o = [o])
                    } else o = e.map(r, function(e) {
                        return e.toJSON()
                    });
                    for ("destroy" === c && (i._destroyed = []), a = 0, n = r.length; n > a; a++) "destroy" !== c ? (r[a].accept(o[a]), "create" === c ? l.push(s ? i._wrapInEmptyGroup(r[a]) : o[a]) : "update" === c && i._updatePristineForModel(r[a], o[a])) : i._removePristineForModel(r[a])
                },
                _updatePristineForModel: function(e, t) {
                    this._executeOnPristineForModel(e, function(e, n) {
                        fe.deepExtend(n[e], t)
                    })
                },
                _executeOnPristineForModel: function(e, n) {
                    this._eachPristineItem(function(i) {
                        var r = M(i, e);
                        return r > -1 ? (n(r, i), !0) : t
                    })
                },
                _removePristineForModel: function(e) {
                    this._executeOnPristineForModel(e, function(e, t) {
                        t.splice(e, 1)
                    })
                },
                _readData: function(e) {
                    var t = this._isServerGrouped() ? this.reader.groups : this.reader.data;
                    return t.call(this.reader, e)
                },
                _eachPristineItem: function(e) {
                    this._eachItem(this._pristineData, e)
                },
                _eachItem: function(e, t) {
                    e && e.length && (this._isServerGrouped() ? D(e, t) : t(e))
                },
                _pristineForModel: function(e) {
                    var n, i, r = function(r) {
                        return i = M(r, e), i > -1 ? (n = r[i], !0) : t
                    };
                    return this._eachPristineItem(r), n
                },
                _cancelModel: function(e) {
                    var t = this._pristineForModel(e);
                    this._eachItem(this._data, function(n) {
                        var i = R(n, e);
                        i >= 0 && (!t || e.isNew() && !t.__state__ ? n.splice(i, 1) : (n[i].accept(t), "update" == t.__state__ && (n[i].dirty = !0)))
                    })
                },
                _submit: function(t, n) {
                    var i = this;
                    i.trigger(De, {
                        type: "submit"
                    }), i.transport.submit(re({
                        success: function(n, i) {
                            var r = e.grep(t, function(e) {
                                return e.type == i
                            })[0];
                            r && r.resolve({
                                response: n,
                                models: r.models,
                                type: i
                            })
                        },
                        error: function(e, n, r) {
                            for (var o = 0; t.length > o; o++) t[o].reject(e);
                            i.error(e, n, r)
                        }
                    }, n))
                },
                _sendSubmit: function(t, n, i) {
                    var r = this,
                        o = [];
                    return r.options.batch && (t.length && o.push(e.Deferred(function(e) {
                        e.type = "create", e.models = t
                    })), n.length && o.push(e.Deferred(function(e) {
                        e.type = "update", e.models = n
                    })), i.length && o.push(e.Deferred(function(e) {
                        e.type = "destroy", e.models = i
                    })), r._submit(o, {
                        data: {
                            created: r.reader.serialize(b(t)),
                            updated: r.reader.serialize(b(n)),
                            destroyed: r.reader.serialize(b(i))
                        }
                    })), o
                },
                _promise: function(t, n, i) {
                    var r = this;
                    return e.Deferred(function(e) {
                        r.trigger(De, {
                            type: i
                        }), r.transport[i].call(r.transport, re({
                            success: function(t) {
                                e.resolve({
                                    response: t,
                                    models: n,
                                    type: i
                                })
                            },
                            error: function(t, n, i) {
                                e.reject(t), r.error(t, n, i)
                            }
                        }, t))
                    }).promise()
                },
                _send: function(e, t) {
                    var n, i, r = this,
                        o = [],
                        a = r.reader.serialize(b(t));
                    if (r.options.batch) t.length && o.push(r._promise({
                        data: {
                            models: a
                        }
                    }, t, e));
                    else
                        for (n = 0, i = t.length; i > n; n++) o.push(r._promise({
                            data: a[n]
                        }, [t[n]], e));
                    return o
                },
                read: function(t) {
                    var n = this,
                        i = n._params(t),
                        r = e.Deferred();
                    return n._queueRequest(i, function() {
                        var e = n.trigger(De, {
                            type: "read"
                        });
                        e ? (n._dequeueRequest(), r.resolve(e)) : (n.trigger(Ae), n._ranges = [], n.trigger("reset"), n.online() ? n.transport.read({
                            data: i,
                            success: function(e) {
                                n.success(e, i), r.resolve()
                            },
                            error: function() {
                                var e = Oe.call(arguments);
                                n.error.apply(n, e), r.reject.apply(r, e)
                            }
                        }) : null != n.options.offlineStorage && (n.success(n.offlineData(), i), r.resolve()))
                    }), r.promise()
                },
                _readAggregates: function(e) {
                    return this.reader.aggregates(e)
                },
                success: function(e) {
                    var n, i, r, o, a, s, l, c, d = this,
                        u = d.options;
                    if (d.trigger(Ee, {
                        response: e,
                        type: "read"
                    }), d.online()) {
                        if (e = d.reader.parse(e), d._handleCustomErrors(e)) return d._dequeueRequest(), t;
                        d._total = d.reader.total(e), d._aggregate && u.serverAggregates && (d._aggregateResult = d._readAggregates(e)), e = d._readData(e)
                    } else {
                        for (e = d._readData(e), n = [], i = {}, r = d.reader.model, o = r ? r.idField : "id", a = 0; this._destroyed.length > a; a++) s = this._destroyed[a][o], i[s] = s;
                        for (a = 0; e.length > a; a++) l = e[a], c = l.__state__, "destroy" == c ? i[l[o]] || this._destroyed.push(this._createNewModel(l)) : n.push(l);
                        e = n, d._total = e.length
                    }
                    d._pristineTotal = d._total, d._pristineData = e.slice(0), d._detachObservableParents(), d._data = d._observe(e), d._markOfflineUpdatesAsDirty(), d._storeData(), d._addRange(d._data), d._process(d._data), d._dequeueRequest()
                },
                _detachObservableParents: function() {
                    if (this._data && this._shouldDetachObservableParents)
                        for (var e = 0; this._data.length > e; e++) this._data[e].parent && (this._data[e].parent = he)
                },
                _storeData: function(e) {
                    function t(e) {
                        var n, i, r, o = [];
                        for (n = 0; e.length > n; n++) i = e.at(n), r = i.toJSON(), a && i.items ? r.items = t(i.items) : (r.uid = i.uid, s && (i.isNew() ? r.__state__ = "create" : i.dirty && (r.__state__ = "update"))), o.push(r);
                        return o
                    }
                    var n, i, r, o, a = this._isServerGrouped(),
                        s = this.reader.model;
                    if (null != this.options.offlineStorage) {
                        for (n = t(this._data), i = [], r = 0; this._destroyed.length > r; r++) o = this._destroyed[r].toJSON(), o.__state__ = "destroy", i.push(o);
                        this.offlineData(n.concat(i)), e && (this._pristineData = this._readData(n))
                    }
                },
                _addRange: function(e) {
                    var t = this,
                        n = t._skip || 0,
                        i = n + t._flatData(e, !0).length;
                    t._ranges.push({
                        start: n,
                        end: i,
                        data: e,
                        timestamp: (new Date).getTime()
                    }), t._ranges.sort(function(e, t) {
                        return e.start - t.start
                    })
                },
                error: function(e, t, n) {
                    this._dequeueRequest(), this.trigger(Ee, {}), this.trigger(Te, {
                        xhr: e,
                        status: t,
                        errorThrown: n
                    })
                },
                _params: function(e) {
                    var t = this,
                        n = re({
                            take: t.take(),
                            skip: t.skip(),
                            page: t.page(),
                            pageSize: t.pageSize(),
                            sort: t._sort,
                            filter: t._filter,
                            group: t._group,
                            aggregate: t._aggregate
                        }, e);
                    return t.options.serverPaging || (delete n.take, delete n.skip, delete n.page, delete n.pageSize), t.options.serverGrouping ? t.reader.model && n.group && (n.group = L(n.group, t.reader.model)) : delete n.group, t.options.serverFiltering ? t.reader.model && n.filter && (n.filter = B(n.filter, t.reader.model)) : delete n.filter, t.options.serverSorting ? t.reader.model && n.sort && (n.sort = L(n.sort, t.reader.model)) : delete n.sort,
                        t.options.serverAggregates ? t.reader.model && n.aggregate && (n.aggregate = L(n.aggregate, t.reader.model)) : delete n.aggregate, n
                },
                _queueRequest: function(e, n) {
                    var i = this;
                    i._requestInProgress ? i._pending = {
                        callback: oe(n, i),
                        options: e
                    } : (i._requestInProgress = !0, i._pending = t, n())
                },
                _dequeueRequest: function() {
                    var e = this;
                    e._requestInProgress = !1, e._pending && e._queueRequest(e._pending.options, e._pending.callback)
                },
                _handleCustomErrors: function(e) {
                    if (this.reader.errors) {
                        var t = this.reader.errors(e);
                        if (t) return this.trigger(Te, {
                            xhr: null,
                            status: "customerror",
                            errorThrown: "custom error",
                            errors: t
                        }), !0
                    }
                    return !1
                },
                _shouldWrap: function(e) {
                    var t = this.reader.model;
                    return t && e.length ? !(e[0] instanceof t) : !1
                },
                _observe: function(e) {
                    var t, n = this,
                        i = n.reader.model;
                    return n._shouldDetachObservableParents = !0, e instanceof $e ? (n._shouldDetachObservableParents = !1, n._shouldWrap(e) && (e.type = n.reader.model, e.wrapAll(e, e))) : (t = n.pageSize() && !n.options.serverPaging ? Ye : $e, e = new t(e, n.reader.model), e.parent = function() {
                        return n.parent()
                    }), n._isServerGrouped() && T(e, i), n._changeHandler && n._data && n._data instanceof $e ? n._data.unbind(xe, n._changeHandler) : n._changeHandler = oe(n._change, n), e.bind(xe, n._changeHandler)
                },
                _updateTotalForAction: function(e, t) {
                    var n = this,
                        i = parseInt(n._total, 10);
                    v(n._total) || (i = parseInt(n._pristineTotal, 10)), "add" === e ? i += t.length : "remove" === e ? i -= t.length : "itemchange" === e || "sync" === e || n.options.serverPaging ? "sync" === e && (i = n._pristineTotal = parseInt(n._total, 10)) : i = n._pristineTotal, n._total = i
                },
                _change: function(e) {
                    var t, n, i, r = this,
                        o = e ? e.action : "";
                    if ("remove" === o)
                        for (t = 0, n = e.items.length; n > t; t++) e.items[t].isNew && e.items[t].isNew() || r._destroyed.push(e.items[t]);
                    !r.options.autoSync || "add" !== o && "remove" !== o && "itemchange" !== o ? (r._updateTotalForAction(o, e ? e.items : []), r._process(r._data, e)) : (i = function(t) {
                        "sync" === t.action && (r.unbind("change", i), r._updateTotalForAction(o, e.items))
                    }, r.first("change", i), r.sync())
                },
                _calculateAggregates: function(e, t) {
                    t = t || {};
                    var n = new o(e),
                        i = t.aggregate,
                        r = t.filter;
                    return r && (n = n.filter(r)), n.aggregate(i)
                },
                _process: function(e, n) {
                    var i, r = this,
                        o = {};
                    r.options.serverPaging !== !0 && (o.skip = r._skip, o.take = r._take || r._pageSize, o.skip === t && r._page !== t && r._pageSize !== t && (o.skip = (r._page - 1) * r._pageSize)), r.options.serverSorting !== !0 && (o.sort = r._sort), r.options.serverFiltering !== !0 && (o.filter = r._filter), r.options.serverGrouping !== !0 && (o.group = r._group), r.options.serverAggregates !== !0 && (o.aggregate = r._aggregate, r._aggregateResult = r._calculateAggregates(e, o)), i = r._queryProcess(e, o), r.view(i.data), i.total === t || r.options.serverFiltering || (r._total = i.total), n = n || {}, n.items = n.items || r._view, r.trigger(xe, n)
                },
                _queryProcess: function(e, t) {
                    return o.process(e, t)
                },
                _mergeState: function(e) {
                    var n = this;
                    return e !== t && (n._pageSize = e.pageSize, n._page = e.page, n._sort = e.sort, n._filter = e.filter, n._group = e.group, n._aggregate = e.aggregate, n._skip = n._currentRangeStart = e.skip, n._take = e.take, n._skip === t && (n._skip = n._currentRangeStart = n.skip(), e.skip = n.skip()), n._take === t && n._pageSize !== t && (n._take = n._pageSize, e.take = n._take), e.sort && (n._sort = e.sort = a(e.sort)), e.filter && (n._filter = e.filter = l(e.filter)), e.group && (n._group = e.group = p(e.group)), e.aggregate && (n._aggregate = e.aggregate = f(e.aggregate))), e
                },
                query: function(n) {
                    var i, r, o = this.options.serverSorting || this.options.serverPaging || this.options.serverFiltering || this.options.serverGrouping || this.options.serverAggregates;
                    return o || (this._data === t || 0 === this._data.length) && !this._destroyed.length ? this.read(this._mergeState(n)) : (r = this.trigger(De, {
                        type: "read"
                    }), r || (this.trigger(Ae), i = this._queryProcess(this._data, this._mergeState(n)), this.options.serverFiltering || (this._total = i.total !== t ? i.total : this._data.length), this._aggregateResult = this._calculateAggregates(this._data, n), this.view(i.data), this.trigger(Ee, {
                        type: "read"
                    }), this.trigger(xe, {
                        items: i.data
                    })), e.Deferred().resolve(r).promise())
                },
                fetch: function(e) {
                    var t = this,
                        n = function(n) {
                            n !== !0 && pe(e) && e.call(t)
                        };
                    return this._query().then(n)
                },
                _query: function(e) {
                    var t = this;
                    return t.query(re({}, {
                        page: t.page(),
                        pageSize: t.pageSize(),
                        sort: t.sort(),
                        filter: t.filter(),
                        group: t.group(),
                        aggregate: t.aggregate()
                    }, e))
                },
                next: function(e) {
                    var n = this,
                        i = n.page(),
                        r = n.total();
                    return e = e || {}, !i || r && i + 1 > n.totalPages() ? t : (n._skip = n._currentRangeStart = i * n.take(), i += 1, e.page = i, n._query(e), i)
                },
                prev: function(e) {
                    var n = this,
                        i = n.page();
                    return e = e || {}, i && 1 !== i ? (n._skip = n._currentRangeStart = n._skip - n.take(), i -= 1, e.page = i, n._query(e), i) : t
                },
                page: function(e) {
                    var n, i = this;
                    return e !== t ? (e = Pe.max(Pe.min(Pe.max(e, 1), i.totalPages()), 1), i._query({
                        page: e
                    }), t) : (n = i.skip(), n !== t ? Pe.round((n || 0) / (i.take() || 1)) + 1 : t)
                },
                pageSize: function(e) {
                    var n = this;
                    return e !== t ? (n._query({
                        pageSize: e,
                        page: 1
                    }), t) : n.take()
                },
                sort: function(e) {
                    var n = this;
                    return e !== t ? (n._query({
                        sort: e
                    }), t) : n._sort
                },
                filter: function(e) {
                    var n = this;
                    return e === t ? n._filter : (n.trigger("reset"), n._query({
                        filter: e,
                        page: 1
                    }), t)
                },
                group: function(e) {
                    var n = this;
                    return e !== t ? (n._query({
                        group: e
                    }), t) : n._group
                },
                total: function() {
                    return parseInt(this._total || 0, 10)
                },
                aggregate: function(e) {
                    var n = this;
                    return e !== t ? (n._query({
                        aggregate: e
                    }), t) : n._aggregate
                },
                aggregates: function() {
                    var e = this._aggregateResult;
                    return se(e) && (e = this._emptyAggregates(this.aggregate())), e
                },
                _emptyAggregates: function(e) {
                    var t, n, i = {};
                    if (!se(e))
                        for (t = {}, le(e) || (e = [e]), n = 0; e.length > n; n++) t[e[n].aggregate] = 0, i[e[n].field] = t;
                    return i
                },
                _wrapInEmptyGroup: function(e) {
                    var t, n, i, r, o = this.group();
                    for (i = o.length - 1, r = 0; i >= r; i--) n = o[i], t = {
                        value: e.get(n.field),
                        field: n.field,
                        items: t ? [t] : [e],
                        hasSubgroups: !!t,
                        aggregates: this._emptyAggregates(n.aggregates)
                    };
                    return t
                },
                totalPages: function() {
                    var e = this,
                        t = e.pageSize() || e.total();
                    return Pe.ceil((e.total() || 0) / t)
                },
                inRange: function(e, t) {
                    var n = this,
                        i = Pe.min(e + t, n.total());
                    return !n.options.serverPaging && n._data.length > 0 ? !0 : n._findRange(e, i).length > 0
                },
                lastRange: function() {
                    var e = this._ranges;
                    return e[e.length - 1] || {
                        start: 0,
                        end: 0,
                        data: []
                    }
                },
                firstItemUid: function() {
                    var e = this._ranges;
                    return e.length && e[0].data.length && e[0].data[0].uid
                },
                enableRequestsInProgress: function() {
                    this._skipRequestsInProgress = !1
                },
                _timeStamp: function() {
                    return (new Date).getTime()
                },
                range: function(e, n) {
                    var i, r, o, a, s, l, c, d;
                    if (this._currentRequestTimeStamp = this._timeStamp(), this._skipRequestsInProgress = !0, e = Pe.min(e || 0, this.total()), i = this, r = Pe.max(Pe.floor(e / n), 0) * n, o = Pe.min(r + n, i.total()), a = i._findRange(e, Pe.min(e + n, i.total())), a.length) {
                        i._pending = t, i._skip = e > i.skip() ? Pe.min(o, (i.totalPages() - 1) * i.take()) : r, i._currentRangeStart = e, i._take = n, s = i.options.serverPaging, l = i.options.serverSorting, c = i.options.serverFiltering, d = i.options.serverAggregates;
                        try {
                            i.options.serverPaging = !0, i._isServerGrouped() || i.group() && i.group().length || (i.options.serverSorting = !0), i.options.serverFiltering = !0, i.options.serverPaging = !0, i.options.serverAggregates = !0, s && (i._detachObservableParents(), i._data = a = i._observe(a)), i._process(a)
                        } finally {
                            i.options.serverPaging = s, i.options.serverSorting = l, i.options.serverFiltering = c, i.options.serverAggregates = d
                        }
                    } else n !== t && (i._rangeExists(r, o) ? e > r && i.prefetch(o, n, function() {
                        i.range(e, n)
                    }) : i.prefetch(r, n, function() {
                        e > r && o < i.total() && !i._rangeExists(o, Pe.min(o + n, i.total())) ? i.prefetch(o, n, function() {
                            i.range(e, n)
                        }) : i.range(e, n)
                    }))
                },
                _findRange: function(e, n) {
                    var i, r, o, s, l, c, d, u, h, f, m, g, v = this,
                        _ = v._ranges,
                        b = [],
                        w = v.options,
                        y = w.serverSorting || w.serverPaging || w.serverFiltering || w.serverGrouping || w.serverAggregates;
                    for (r = 0, m = _.length; m > r; r++)
                        if (i = _[r], e >= i.start && i.end >= e) {
                            for (f = 0, o = r; m > o; o++)
                                if (i = _[o], h = v._flatData(i.data, !0), h.length && e + f >= i.start && (c = i.data, d = i.end, y || (g = p(v.group() || []).concat(a(v.sort() || [])), u = v._queryProcess(i.data, {
                                    sort: g,
                                    filter: v.filter()
                                }), h = c = u.data, u.total !== t && (d = u.total)), s = 0, e + f > i.start && (s = e + f - i.start), l = h.length, d > n && (l -= d - n), f += l - s, b = v._mergeGroups(b, c, s, l), i.end >= n && f == n - e)) return b;
                            break
                        } return []
                },
                _mergeGroups: function(e, t, n, i) {
                    if (this._isServerGrouped()) {
                        var r, o = t.toJSON();
                        return e.length && (r = e[e.length - 1]), C(r, o, n, i), e.concat(o)
                    }
                    return e.concat(t.slice(n, i))
                },
                skip: function() {
                    var e = this;
                    return e._skip === t ? e._page !== t ? (e._page - 1) * (e.take() || 1) : t : e._skip
                },
                currentRangeStart: function() {
                    return this._currentRangeStart || 0
                },
                take: function() {
                    return this._take || this._pageSize
                },
                _prefetchSuccessHandler: function(e, t, n, i) {
                    var r = this,
                        o = r._timeStamp();
                    return function(a) {
                        var s, l, c, d = !1,
                            u = {
                                start: e,
                                end: t,
                                data: [],
                                timestamp: r._timeStamp()
                            };
                        if (r._dequeueRequest(), r.trigger(Ee, {
                            response: a,
                            type: "read"
                        }), a = r.reader.parse(a), c = r._readData(a), c.length) {
                            for (s = 0, l = r._ranges.length; l > s; s++)
                                if (r._ranges[s].start === e) {
                                    d = !0, u = r._ranges[s];
                                    break
                                } d || r._ranges.push(u)
                        }
                        u.data = r._observe(c), u.end = u.start + r._flatData(u.data, !0).length, r._ranges.sort(function(e, t) {
                            return e.start - t.start
                        }), r._total = r.reader.total(a), (i || o >= r._currentRequestTimeStamp || !r._skipRequestsInProgress) && (n && c.length ? n() : r.trigger(xe, {}))
                    }
                },
                prefetch: function(e, t, n) {
                    var i = this,
                        r = Pe.min(e + t, i.total()),
                        o = {
                            take: t,
                            skip: e,
                            page: e / t + 1,
                            pageSize: t,
                            sort: i._sort,
                            filter: i._filter,
                            group: i._group,
                            aggregate: i._aggregate
                        };
                    i._rangeExists(e, r) ? n && n() : (clearTimeout(i._timeout), i._timeout = setTimeout(function() {
                        i._queueRequest(o, function() {
                            i.trigger(De, {
                                type: "read"
                            }) ? i._dequeueRequest() : i.transport.read({
                                data: i._params(o),
                                success: i._prefetchSuccessHandler(e, r, n),
                                error: function() {
                                    var e = Oe.call(arguments);
                                    i.error.apply(i, e)
                                }
                            })
                        })
                    }, 100))
                },
                _multiplePrefetch: function(e, t, n) {
                    var i = this,
                        r = Pe.min(e + t, i.total()),
                        o = {
                            take: t,
                            skip: e,
                            page: e / t + 1,
                            pageSize: t,
                            sort: i._sort,
                            filter: i._filter,
                            group: i._group,
                            aggregate: i._aggregate
                        };
                    i._rangeExists(e, r) ? n && n() : i.trigger(De, {
                        type: "read"
                    }) || i.transport.read({
                        data: i._params(o),
                        success: i._prefetchSuccessHandler(e, r, n, !0)
                    })
                },
                _rangeExists: function(e, t) {
                    var n, i, r = this,
                        o = r._ranges;
                    for (n = 0, i = o.length; i > n; n++)
                        if (e >= o[n].start && o[n].end >= t) return !0;
                    return !1
                },
                _removeModelFromRanges: function(e) {
                    var t, n, i, r, o;
                    for (r = 0, o = this._ranges.length; o > r && (i = this._ranges[r], this._eachItem(i.data, function(i) {
                        t = I(i, e), t && (n = !0)
                    }), !n); r++);
                },
                _updateRangesLength: function() {
                    var e, t, n, i, r = 0;
                    for (n = 0, i = this._ranges.length; i > n; n++) e = this._ranges[n], e.start = e.start - r, t = this._flatData(e.data, !0).length, r = e.end - t, e.end = e.start + t
                }
            }), Z = {}, Z.create = function(t, n, i) {
                var r, o = t.transport ? e.extend({}, t.transport) : null;
                return o ? (o.read = typeof o.read === ve ? {
                    url: o.read
                } : o.read, "jsdo" === t.type && (o.dataSource = i), t.type && (fe.data.transports = fe.data.transports || {}, fe.data.schemas = fe.data.schemas || {}, fe.data.transports[t.type] ? ae(fe.data.transports[t.type]) ? o = re(!0, {}, fe.data.transports[t.type], o) : r = new fe.data.transports[t.type](re(o, {
                    data: n
                })) : fe.logToConsole("Unknown DataSource transport type '" + t.type + "'.\nVerify that registration scripts for this type are included after Kendo UI on the page.", "warn"), t.schema = re(!0, {}, fe.data.schemas[t.type], t.schema)), r || (r = pe(o.read) ? o : new K(o))) : r = new Y({
                    data: t.data || []
                }), r
            }, J.create = function(e) {
                (le(e) || e instanceof $e) && (e = {
                    data: e
                });
                var n, i, r, o = e || {},
                    a = o.data,
                    s = o.fields,
                    l = o.table,
                    c = o.select,
                    d = {};
                if (a || !s || o.transport || (l ? a = N(l, s) : c && (a = H(c, s), o.group === t && a[0] && a[0].optgroup !== t && (o.group = "optgroup"))), fe.data.Model && s && (!o.schema || !o.schema.model)) {
                    for (n = 0, i = s.length; i > n; n++) r = s[n], r.type && (d[r.field] = r);
                    se(d) || (o.schema = re(!0, o.schema, {
                        model: {
                            fields: d
                        }
                    }))
                }
                return o.data = a, c = null, o.select = null, l = null, o.table = null, o instanceof J ? o : new J(o)
            }, ee = Je.define({
                idField: "id",
                init: function(e) {
                    var t = this,
                        n = t.hasChildren || e && e.hasChildren,
                        i = "items",
                        r = {};
                    fe.data.Model.fn.init.call(t, e), typeof t.children === ve && (i = t.children), r = {
                        schema: {
                            data: i,
                            model: {
                                hasChildren: n,
                                id: t.idField,
                                fields: t.fields
                            }
                        }
                    }, typeof t.children !== ve && re(r, t.children), r.data = e, n || (n = r.schema.data), typeof n === ve && (n = fe.getter(n)), pe(n) && (t.hasChildren = !!n.call(t, t)), t._childrenOptions = r, t.hasChildren && t._initChildren(), t._loaded = !(!e || !e._loaded)
                },
                _initChildren: function() {
                    var e, t, n, i = this;
                    i.children instanceof te || (e = i.children = new te(i._childrenOptions), t = e.transport, n = t.parameterMap, t.parameterMap = function(e, t) {
                        return e[i.idField || "id"] = i.id, n && (e = n(e, t)), e
                    }, e.parent = function() {
                        return i
                    }, e.bind(xe, function(e) {
                        e.node = e.node || i, i.trigger(xe, e)
                    }), e.bind(Te, function(e) {
                        var t = i.parent();
                        t && (e.node = e.node || i, t.trigger(Te, e))
                    }), i._updateChildrenField())
                },
                append: function(e) {
                    this._initChildren(), this.loaded(!0), this.children.add(e)
                },
                hasChildren: !1,
                level: function() {
                    for (var e = this.parentNode(), t = 0; e && e.parentNode;) t++, e = e.parentNode ? e.parentNode() : null;
                    return t
                },
                _updateChildrenField: function() {
                    var e = this._childrenOptions.schema.data;
                    this[e || "items"] = this.children.data()
                },
                _childrenLoaded: function() {
                    this._loaded = !0, this._updateChildrenField()
                },
                load: function() {
                    var n, i, r = {},
                        o = "_query";
                    return this.hasChildren ? (this._initChildren(), n = this.children, r[this.idField || "id"] = this.id, this._loaded || (n._data = t, o = "read"), n.one(xe, oe(this._childrenLoaded, this)), i = n[o](r)) : this.loaded(!0), i || e.Deferred().resolve().promise()
                },
                parentNode: function() {
                    var e = this.parent();
                    return e.parent()
                },
                loaded: function(e) {
                    return e === t ? this._loaded : (this._loaded = e, t)
                },
                shouldSerialize: function(e) {
                    return Je.fn.shouldSerialize.call(this, e) && "children" !== e && "_loaded" !== e && "hasChildren" !== e && "_childrenOptions" !== e
                }
            }), te = J.extend({
                init: function(e) {
                    var t = ee.define({
                        children: e
                    });
                    J.fn.init.call(this, re(!0, {}, {
                        schema: {
                            modelBase: t,
                            model: t
                        }
                    }, e)), this._attachBubbleHandlers()
                },
                _attachBubbleHandlers: function() {
                    var e = this;
                    e._data.bind(Te, function(t) {
                        e.trigger(Te, t)
                    })
                },
                remove: function(e) {
                    var t, n = e.parentNode(),
                        i = this;
                    return n && n._initChildren && (i = n.children), t = J.fn.remove.call(i, e), n && !i.data().length && (n.hasChildren = !1), t
                },
                success: O("success"),
                data: O("data"),
                insert: function(e, t) {
                    var n = this.parent();
                    return n && n._initChildren && (n.hasChildren = !0, n._initChildren()), J.fn.insert.call(this, e, t)
                },
                _find: function(e, t) {
                    var n, i, r, o, a = this._data;
                    if (a) {
                        if (r = J.fn[e].call(this, t)) return r;
                        for (a = this._flatData(this._data), n = 0, i = a.length; i > n; n++)
                            if (o = a[n].children, o instanceof te && (r = o[e](t))) return r
                    }
                },
                get: function(e) {
                    return this._find("get", e)
                },
                getByUid: function(e) {
                    return this._find("getByUid", e)
                }
            }), te.create = function(e) {
                e = e && e.push ? {
                    data: e
                } : e;
                var t = e || {},
                    n = t.data,
                    i = t.fields,
                    r = t.list;
                return n && n._dataSource ? n._dataSource : (n || !i || t.transport || r && (n = V(r, i)), t.data = n, t instanceof te ? t : new te(t))
            }, ne = fe.Observable.extend({
                init: function(e, t, n) {
                    fe.Observable.fn.init.call(this), this._prefetching = !1, this.dataSource = e, this.prefetch = !n;
                    var i = this;
                    e.bind("change", function() {
                        i._change()
                    }), e.bind("reset", function() {
                        i._reset()
                    }), this._syncWithDataSource(), this.setViewSize(t)
                },
                setViewSize: function(e) {
                    this.viewSize = e, this._recalculate()
                },
                at: function(e) {
                    var n = this.pageSize,
                        i = !0;
                    return e >= this.total() ? (this.trigger("endreached", {
                        index: e
                    }), null) : this.useRanges ? this.useRanges ? ((this.dataOffset > e || e >= this.skip + n) && (i = this.range(Math.floor(e / n) * n)), e === this.prefetchThreshold && this._prefetch(), e === this.midPageThreshold ? this.range(this.nextMidRange, !0) : e === this.nextPageThreshold ? this.range(this.nextFullRange) : e === this.pullBackThreshold && this.range(this.offset === this.skip ? this.previousMidRange : this.previousFullRange), i ? this.dataSource.at(e - this.dataOffset) : (this.trigger("endreached", {
                        index: e
                    }), null)) : t : this.dataSource.view()[e]
                },
                indexOf: function(e) {
                    return this.dataSource.data().indexOf(e) + this.dataOffset
                },
                total: function() {
                    return parseInt(this.dataSource.total(), 10)
                },
                next: function() {
                    var e = this,
                        t = e.pageSize,
                        n = e.skip - e.viewSize + t,
                        i = Pe.max(Pe.floor(n / t), 0) * t;
                    this.offset = n, this.dataSource.prefetch(i, t, function() {
                        e._goToRange(n, !0)
                    })
                },
                range: function(e, t) {
                    if (this.offset === e) return !0;
                    var n = this,
                        i = this.pageSize,
                        r = Pe.max(Pe.floor(e / i), 0) * i,
                        o = this.dataSource;
                    return t && (r += i), o.inRange(e, i) ? (this.offset = e, this._recalculate(), this._goToRange(e), !0) : this.prefetch ? (o.prefetch(r, i, function() {
                        n.offset = e, n._recalculate(), n._goToRange(e, !0)
                    }), !1) : !0
                },
                syncDataSource: function() {
                    var e = this.offset;
                    this.offset = null, this.range(e)
                },
                destroy: function() {
                    this.unbind()
                },
                _prefetch: function() {
                    var e = this,
                        t = this.pageSize,
                        n = this.skip + t,
                        i = this.dataSource;
                    i.inRange(n, t) || this._prefetching || !this.prefetch || (this._prefetching = !0, this.trigger("prefetching", {
                        skip: n,
                        take: t
                    }), i.prefetch(n, t, function() {
                        e._prefetching = !1, e.trigger("prefetched", {
                            skip: n,
                            take: t
                        })
                    }))
                },
                _goToRange: function(e, t) {
                    this.offset === e && (this.dataOffset = e, this._expanding = t, this.dataSource.range(e, this.pageSize), this.dataSource.enableRequestsInProgress())
                },
                _reset: function() {
                    this._syncPending = !0
                },
                _change: function() {
                    var e = this.dataSource;
                    this.length = this.useRanges ? e.lastRange().end : e.view().length, this._syncPending && (this._syncWithDataSource(), this._recalculate(), this._syncPending = !1, this.trigger("reset", {
                        offset: this.offset
                    })), this.trigger("resize"), this._expanding && this.trigger("expand"), delete this._expanding
                },
                _syncWithDataSource: function() {
                    var e = this.dataSource;
                    this._firstItemUid = e.firstItemUid(), this.dataOffset = this.offset = e.skip() || 0, this.pageSize = e.pageSize(), this.useRanges = e.options.serverPaging
                },
                _recalculate: function() {
                    var e = this.pageSize,
                        t = this.offset,
                        n = this.viewSize,
                        i = Math.ceil(t / e) * e;
                    this.skip = i, this.midPageThreshold = i + e - 1, this.nextPageThreshold = i + n - 1, this.prefetchThreshold = i + Math.floor(e / 3 * 2), this.pullBackThreshold = this.offset - 1, this.nextMidRange = i + e - n, this.nextFullRange = i, this.previousMidRange = t - n, this.previousFullRange = i - e
                }
            }), ie = fe.Observable.extend({
                init: function(e, t) {
                    var n = this;
                    fe.Observable.fn.init.call(n), this.dataSource = e, this.batchSize = t, this._total = 0, this.buffer = new ne(e, 3 * t), this.buffer.bind({
                        endreached: function(e) {
                            n.trigger("endreached", {
                                index: e.index
                            })
                        },
                        prefetching: function(e) {
                            n.trigger("prefetching", {
                                skip: e.skip,
                                take: e.take
                            })
                        },
                        prefetched: function(e) {
                            n.trigger("prefetched", {
                                skip: e.skip,
                                take: e.take
                            })
                        },
                        reset: function() {
                            n._total = 0, n.trigger("reset")
                        },
                        resize: function() {
                            n._total = Math.ceil(this.length / n.batchSize), n.trigger("resize", {
                                total: n.total(),
                                offset: this.offset
                            })
                        }
                    })
                },
                syncDataSource: function() {
                    this.buffer.syncDataSource()
                },
                at: function(e) {
                    var t, n, i = this.buffer,
                        r = e * this.batchSize,
                        o = this.batchSize,
                        a = [];
                    for (i.offset > r && i.at(i.offset - 1), n = 0; o > n && (t = i.at(r + n), null !== t); n++) a.push(t);
                    return a
                },
                total: function() {
                    return this._total
                },
                destroy: function() {
                    this.buffer.destroy(), this.unbind()
                }
            }), re(!0, fe.data, {
                readers: {
                    json: X
                },
                Query: o,
                DataSource: J,
                HierarchicalDataSource: te,
                Node: ee,
                ObservableObject: Ke,
                ObservableArray: $e,
                LazyObservableArray: Ye,
                LocalTransport: Y,
                RemoteTransport: K,
                Cache: Q,
                DataReader: X,
                Model: Je,
                Buffer: ne,
                BatchBuffer: ie
            })
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.binder.min", ["kendo.core.min", "kendo.data.min"], e)
    }(function() {
        return function(e, t) {
            function n(t, n, i) {
                return v.extend({
                    init: function(e, t, n) {
                        var i = this;
                        v.fn.init.call(i, e.element[0], t, n), i.widget = e, i._dataBinding = I(i.dataBinding, i), i._dataBound = I(i.dataBound, i), i._itemChange = I(i.itemChange, i)
                    },
                    itemChange: function(e) {
                        a(e.item[0], e.data, this._ns(e.ns), [e.data].concat(this.bindings[t]._parents()))
                    },
                    dataBinding: function(e) {
                        var t, n, i = this.widget,
                            r = e.removedItems || i.items();
                        for (t = 0, n = r.length; n > t; t++) c(r[t], !1)
                    },
                    _ns: function(t) {
                        t = t || C.ui;
                        var n = [C.ui, C.dataviz.ui, C.mobile.ui];
                        return n.splice(e.inArray(t, n), 1), n.unshift(t), C.rolesFromNamespaces(n)
                    },
                    dataBound: function(e) {
                        var i, r, o, s, l = this.widget,
                            c = e.addedItems || l.items(),
                            d = l[n],
                            u = C.data.HierarchicalDataSource;
                        if (!(u && d instanceof u) && c.length)
                            for (o = e.addedDataItems || d.flatView(), s = this.bindings[t]._parents(), i = 0, r = o.length; r > i; i++) a(c[i], o[i], this._ns(e.ns), [o[i]].concat(s))
                    },
                    refresh: function(e) {
                        var r, o, a, s = this,
                            l = s.widget;
                        e = e || {}, e.action || (s.destroy(), l.bind("dataBinding", s._dataBinding), l.bind("dataBound", s._dataBound), l.bind("itemChange", s._itemChange), r = s.bindings[t].get(), l[n] instanceof C.data.DataSource && l[n] != r && (r instanceof C.data.DataSource ? l[i](r) : r && r._dataSource ? l[i](r._dataSource) : (l[n].data(r), o = C.ui.Select && l instanceof C.ui.Select, a = C.ui.MultiSelect && l instanceof C.ui.MultiSelect, s.bindings.value && (o || a) && l.value(f(s.bindings.value.get(), l.options.dataValueField)))))
                    },
                    destroy: function() {
                        var e = this.widget;
                        e.unbind("dataBinding", this._dataBinding), e.unbind("dataBound", this._dataBound), e.unbind("itemChange", this._itemChange)
                    }
                })
            }

            function i(e, n) {
                var i = C.initWidget(e, {}, n);
                return i ? new y(i) : t
            }

            function r(e) {
                var t, n, i, o, a, s, l, c = {};
                for (l = e.match(k), t = 0, n = l.length; n > t; t++) i = l[t], o = i.indexOf(":"), a = i.substring(0, o), s = i.substring(o + 1), "{" == s.charAt(0) && (s = r(s)), c[a] = s;
                return c
            }

            function o(e, t, n) {
                var i, r = {};
                for (i in e) r[i] = new n(t, e[i]);
                return r
            }

            function a(e, t, n, s) {
                var c, d, u, h = e.getAttribute("data-" + C.ns + "role"),
                    f = e.getAttribute("data-" + C.ns + "bind"),
                    v = e.children,
                    _ = [],
                    b = !0,
                    y = {};
                if (s = s || [t], (h || f) && l(e, !1), h && (u = i(e, n)), f && (f = r(f.replace(x, "")), u || (y = C.parseOptions(e, {
                    textField: "",
                    valueField: "",
                    template: "",
                    valueUpdate: N,
                    valuePrimitive: !1,
                    autoBind: !0
                }), y.roles = n, u = new w(e, y)), u.source = t, d = o(f, s, p), y.template && (d.template = new g(s, "", y.template)), d.click && (f.events = f.events || {}, f.events.click = f.click, d.click.destroy(), delete d.click), d.source && (b = !1), f.attr && (d.attr = o(f.attr, s, p)), f.style && (d.style = o(f.style, s, p)), f.events && (d.events = o(f.events, s, m)), f.css && (d.css = o(f.css, s, p)), u.bind(d)), u && (e.kendoBindingTarget = u), b && v) {
                    for (c = 0; v.length > c; c++) _[c] = v[c];
                    for (c = 0; _.length > c; c++) a(_[c], t, n, s)
                }
            }

            function s(t, n) {
                var i, r, o, s = C.rolesFromNamespaces([].slice.call(arguments, 2));
                for (n = C.observable(n), t = e(t), i = 0, r = t.length; r > i; i++) o = t[i], 1 === o.nodeType && a(o, n, s)
            }

            function l(t, n) {
                var i, r = t.kendoBindingTarget;
                r && (r.destroy(), L ? delete t.kendoBindingTarget : t.removeAttribute ? t.removeAttribute("kendoBindingTarget") : t.kendoBindingTarget = null), n && (i = C.widgetInstance(e(t)), i && typeof i.destroy === H && i.destroy())
            }

            function c(e, t) {
                l(e, t), d(e, t)
            }

            function d(e, t) {
                var n, i, r = e.children;
                if (r)
                    for (n = 0, i = r.length; i > n; n++) c(r[n], t)
            }

            function u(t) {
                var n, i;
                for (t = e(t), n = 0, i = t.length; i > n; n++) c(t[n], !1)
            }

            function h(e, t) {
                var n = e.element,
                    i = n[0].kendoBindingTarget;
                i && s(n, i.source, t)
            }

            function f(e, t) {
                var n, i, r = [],
                    o = 0;
                if (!t) return e;
                if (e instanceof D) {
                    for (n = e.length; n > o; o++) i = e[o], r[o] = i.get ? i.get(t) : i[t];
                    e = r
                } else e instanceof T && (e = e.get(t));
                return e
            }
            var p, m, g, v, _, b, w, y, k, x, C = window.kendo,
                S = C.Observable,
                T = C.data.ObservableObject,
                D = C.data.ObservableArray,
                A = {}.toString,
                E = {},
                F = C.Class,
                I = e.proxy,
                M = "value",
                R = "source",
                P = "events",
                z = "checked",
                B = "css",
                L = !0,
                H = "function",
                N = "change";
            ! function() {
                var e = document.createElement("a");
                try {
                    delete e.test
                } catch (t) {
                    L = !1
                }
            }(), p = S.extend({
                init: function(e, t) {
                    var n = this;
                    S.fn.init.call(n), n.source = e[0], n.parents = e, n.path = t, n.dependencies = {}, n.dependencies[t] = !0, n.observable = n.source instanceof S, n._access = function(e) {
                        n.dependencies[e.field] = !0
                    }, n.observable && (n._change = function(e) {
                        n.change(e)
                    }, n.source.bind(N, n._change))
                },
                _parents: function() {
                    var t, n = this.parents,
                        i = this.get();
                    return i && "function" == typeof i.parent && (t = i.parent(), e.inArray(t, n) < 0 && (n = [t].concat(n))), n
                },
                change: function(e) {
                    var t, n, i = e.field,
                        r = this;
                    if ("this" === r.path) r.trigger(N, e);
                    else
                        for (t in r.dependencies)
                            if (0 === t.indexOf(i) && (n = t.charAt(i.length), !n || "." === n || "[" === n)) {
                                r.trigger(N, e);
                                break
                            }
                },
                start: function(e) {
                    e.bind("get", this._access)
                },
                stop: function(e) {
                    e.unbind("get", this._access)
                },
                get: function() {
                    var e = this,
                        n = e.source,
                        i = 0,
                        r = e.path,
                        o = n;
                    if (!e.observable) return o;
                    for (e.start(e.source), o = n.get(r); o === t && n;) n = e.parents[++i], n instanceof T && (o = n.get(r));
                    if (o === t)
                        for (n = e.source; o === t && n;) n = n.parent(), n instanceof T && (o = n.get(r));
                    return "function" == typeof o && (i = r.lastIndexOf("."), i > 0 && (n = n.get(r.substring(0, i))), e.start(n), o = n !== e.source ? o.call(n, e.source) : o.call(n), e.stop(n)), n && n !== e.source && (e.currentSource = n, n.unbind(N, e._change).bind(N, e._change)), e.stop(e.source), o
                },
                set: function(e) {
                    var t = this.currentSource || this.source,
                        n = C.getter(this.path)(t);
                    "function" == typeof n ? t !== this.source ? n.call(t, this.source, e) : n.call(t, e) : t.set(this.path, e)
                },
                destroy: function() {
                    this.observable && (this.source.unbind(N, this._change), this.currentSource && this.currentSource.unbind(N, this._change)), this.unbind()
                }
            }), m = p.extend({
                get: function() {
                    var e, t = this.source,
                        n = this.path,
                        i = 0;
                    for (e = t.get(n); !e && t;) t = this.parents[++i], t instanceof T && (e = t.get(n));
                    return I(e, t)
                }
            }), g = p.extend({
                init: function(e, t, n) {
                    var i = this;
                    p.fn.init.call(i, e, t), i.template = n
                },
                render: function(e) {
                    var t;
                    return this.start(this.source), t = C.render(this.template, e), this.stop(this.source), t
                }
            }), v = F.extend({
                init: function(e, t, n) {
                    this.element = e, this.bindings = t, this.options = n
                },
                bind: function(e, t) {
                    var n = this;
                    e = t ? e[t] : e, e.bind(N, function(e) {
                        n.refresh(t || e)
                    }), n.refresh(t)
                },
                destroy: function() {}
            }), _ = v.extend({
                dataType: function() {
                    var e = this.element.getAttribute("data-type") || this.element.type || "text";
                    return e.toLowerCase()
                },
                parsedValue: function() {
                    return this._parseValue(this.element.value, this.dataType())
                },
                _parseValue: function(e, t) {
                    return "date" == t ? e = C.parseDate(e, "yyyy-MM-dd") : "datetime-local" == t ? e = C.parseDate(e, ["yyyy-MM-ddTHH:mm:ss", "yyyy-MM-ddTHH:mm"]) : "number" == t ? e = C.parseFloat(e) : "boolean" == t && (e = e.toLowerCase(), e = null !== C.parseFloat(e) ? !!C.parseFloat(e) : "true" === e.toLowerCase()), e
                }
            }), E.attr = v.extend({
                refresh: function(e) {
                    this.element.setAttribute(e, this.bindings.attr[e].get())
                }
            }), E.css = v.extend({
                init: function(e, t, n) {
                    v.fn.init.call(this, e, t, n), this.classes = {}
                },
                refresh: function(t) {
                    var n = e(this.element),
                        i = this.bindings.css[t],
                        r = this.classes[t] = i.get();
                    r ? n.addClass(t) : n.removeClass(t)
                }
            }), E.style = v.extend({
                refresh: function(e) {
                    this.element.style[e] = this.bindings.style[e].get() || ""
                }
            }), E.enabled = v.extend({
                refresh: function() {
                    this.bindings.enabled.get() ? this.element.removeAttribute("disabled") : this.element.setAttribute("disabled", "disabled")
                }
            }), E.readonly = v.extend({
                refresh: function() {
                    this.bindings.readonly.get() ? this.element.setAttribute("readonly", "readonly") : this.element.removeAttribute("readonly")
                }
            }), E.disabled = v.extend({
                refresh: function() {
                    this.bindings.disabled.get() ? this.element.setAttribute("disabled", "disabled") : this.element.removeAttribute("disabled")
                }
            }), E.events = v.extend({
                init: function(e, t, n) {
                    v.fn.init.call(this, e, t, n), this.handlers = {}
                },
                refresh: function(t) {
                    var n = e(this.element),
                        i = this.bindings.events[t],
                        r = this.handlers[t];
                    r && n.off(t, r), r = this.handlers[t] = i.get(), n.on(t, i.source, r)
                },
                destroy: function() {
                    var t, n = e(this.element);
                    for (t in this.handlers) n.off(t, this.handlers[t])
                }
            }), E.text = v.extend({
                refresh: function() {
                    var t = this.bindings.text.get(),
                        n = this.element.getAttribute("data-format") || "";
                    null == t && (t = ""), e(this.element).text(C.toString(t, n))
                }
            }), E.visible = v.extend({
                refresh: function() {
                    this.element.style.display = this.bindings.visible.get() ? "" : "none"
                }
            }), E.invisible = v.extend({
                refresh: function() {
                    this.element.style.display = this.bindings.invisible.get() ? "none" : ""
                }
            }), E.html = v.extend({
                refresh: function() {
                    this.element.innerHTML = this.bindings.html.get()
                }
            }), E.value = _.extend({
                init: function(t, n, i) {
                    _.fn.init.call(this, t, n, i), this._change = I(this.change, this), this.eventName = i.valueUpdate || N, e(this.element).on(this.eventName, this._change), this._initChange = !1
                },
                change: function() {
                    this._initChange = this.eventName != N, this.bindings[M].set(this.parsedValue()), this._initChange = !1
                },
                refresh: function() {
                    var e, t;
                    this._initChange || (e = this.bindings[M].get(), null == e && (e = ""), t = this.dataType(), "date" == t ? e = C.toString(e, "yyyy-MM-dd") : "datetime-local" == t && (e = C.toString(e, "yyyy-MM-ddTHH:mm:ss")), this.element.value = e), this._initChange = !1
                },
                destroy: function() {
                    e(this.element).off(this.eventName, this._change)
                }
            }), E.source = v.extend({
                init: function(e, t, n) {
                    v.fn.init.call(this, e, t, n);
                    var i = this.bindings.source.get();
                    i instanceof C.data.DataSource && n.autoBind !== !1 && i.fetch()
                },
                refresh: function(e) {
                    var t = this,
                        n = t.bindings.source.get();
                    n instanceof D || n instanceof C.data.DataSource ? (e = e || {}, "add" == e.action ? t.add(e.index, e.items) : "remove" == e.action ? t.remove(e.index, e.items) : "itemchange" != e.action && t.render()) : t.render()
                },
                container: function() {
                    var e = this.element;
                    return "table" == e.nodeName.toLowerCase() && (e.tBodies[0] || e.appendChild(document.createElement("tbody")), e = e.tBodies[0]), e
                },
                template: function() {
                    var e = this.options,
                        t = e.template,
                        n = this.container().nodeName.toLowerCase();
                    return t || (t = "select" == n ? e.valueField || e.textField ? C.format('<option value="#:{0}#">#:{1}#</option>', e.valueField || e.textField, e.textField || e.valueField) : "<option>#:data#</option>" : "tbody" == n ? "<tr><td>#:data#</td></tr>" : "ul" == n || "ol" == n ? "<li>#:data#</li>" : "#:data#", t = C.template(t)), t
                },
                add: function(t, n) {
                    var i, r, o, s, l = this.container(),
                        c = l.cloneNode(!1),
                        d = l.children[t];
                    if (e(c).html(C.render(this.template(), n)), c.children.length)
                        for (i = this.bindings.source._parents(), r = 0, o = n.length; o > r; r++) s = c.children[0], l.insertBefore(s, d || null), a(s, n[r], this.options.roles, [n[r]].concat(i))
                },
                remove: function(e, t) {
                    var n, i, r = this.container();
                    for (n = 0; t.length > n; n++) i = r.children[e], c(i, !0), r.removeChild(i)
                },
                render: function() {
                    var t, n, i, r = this.bindings.source.get(),
                        o = this.container(),
                        s = this.template();
                    if (null != r)
                        if (r instanceof C.data.DataSource && (r = r.view()), r instanceof D || "[object Array]" === A.call(r) || (r = [r]), this.bindings.template) {
                            if (d(o, !0), e(o).html(this.bindings.template.render(r)), o.children.length)
                                for (t = this.bindings.source._parents(), n = 0, i = r.length; i > n; n++) a(o.children[n], r[n], this.options.roles, [r[n]].concat(t))
                        } else e(o).html(C.render(s, r))
                }
            }), E.input = {
                checked: _.extend({
                    init: function(t, n, i) {
                        _.fn.init.call(this, t, n, i), this._change = I(this.change, this), e(this.element).change(this._change)
                    },
                    change: function() {
                        var e, t, n, i = this.element,
                            r = this.value();
                        if ("radio" == i.type) r = this.parsedValue(), this.bindings[z].set(r);
                        else if ("checkbox" == i.type)
                            if (e = this.bindings[z].get(), e instanceof D) {
                                if (r = this.parsedValue(), r instanceof Date) {
                                    for (n = 0; e.length > n; n++)
                                        if (e[n] instanceof Date && +e[n] === +r) {
                                            t = n;
                                            break
                                        }
                                } else t = e.indexOf(r);
                                t > -1 ? e.splice(t, 1) : e.push(r)
                            } else this.bindings[z].set(r)
                    },
                    refresh: function() {
                        var e, t, n = this.bindings[z].get(),
                            i = n,
                            r = this.dataType(),
                            o = this.element;
                        if ("checkbox" == o.type)
                            if (i instanceof D) {
                                if (e = -1, n = this.parsedValue(), n instanceof Date) {
                                    for (t = 0; i.length > t; t++)
                                        if (i[t] instanceof Date && +i[t] === +n) {
                                            e = t;
                                            break
                                        }
                                } else e = i.indexOf(n);
                                o.checked = e >= 0
                            } else o.checked = i;
                        else "radio" == o.type && null != n && ("date" == r ? n = C.toString(n, "yyyy-MM-dd") : "datetime-local" == r && (n = C.toString(n, "yyyy-MM-ddTHH:mm:ss")), o.checked = o.value === "" + n ? !0 : !1)
                    },
                    value: function() {
                        var e = this.element,
                            t = e.value;
                        return "checkbox" == e.type && (t = e.checked), t
                    },
                    destroy: function() {
                        e(this.element).off(N, this._change)
                    }
                })
            }, E.select = {
                source: E.source.extend({
                    refresh: function(n) {
                        var i, r = this,
                            o = r.bindings.source.get();
                        o instanceof D || o instanceof C.data.DataSource ? (n = n || {}, "add" == n.action ? r.add(n.index, n.items) : "remove" == n.action ? r.remove(n.index, n.items) : ("itemchange" == n.action || n.action === t) && (r.render(), r.bindings.value && r.bindings.value && (i = f(r.bindings.value.get(), e(r.element).data("valueField")), null === i ? r.element.selectedIndex = -1 : r.element.value = i))) : r.render()
                    }
                }),
                value: _.extend({
                    init: function(t, n, i) {
                        _.fn.init.call(this, t, n, i), this._change = I(this.change, this), e(this.element).change(this._change)
                    },
                    parsedValue: function() {
                        var e, t, n, i, r = this.dataType(),
                            o = [];
                        for (n = 0, i = this.element.options.length; i > n; n++) t = this.element.options[n], t.selected && (e = t.attributes.value, e = e && e.specified ? t.value : t.text, o.push(this._parseValue(e, r)));
                        return o
                    },
                    change: function() {
                        var e, n, i, r, o, a, s, l, c = [],
                            d = this.element,
                            u = this.options.valueField || this.options.textField,
                            h = this.options.valuePrimitive;
                        for (o = 0, a = d.options.length; a > o; o++) n = d.options[o], n.selected && (r = n.attributes.value, r = r && r.specified ? n.value : n.text, c.push(this._parseValue(r, this.dataType())));
                        if (u)
                            for (e = this.bindings.source.get(), e instanceof C.data.DataSource && (e = e.view()), i = 0; c.length > i; i++)
                                for (o = 0, a = e.length; a > o; o++)
                                    if (s = this._parseValue(e[o].get(u), this.dataType()), l = s + "" === c[i]) {
                                        c[i] = e[o];
                                        break
                                    } r = this.bindings[M].get(), r instanceof D ? r.splice.apply(r, [0, r.length].concat(c)) : this.bindings[M].set(h || !(r instanceof T || null === r || r === t) && u ? c[0].get(u) : c[0])
                    },
                    refresh: function() {
                        var e, t, n, i = this.element,
                            r = i.options,
                            o = this.bindings[M].get(),
                            a = o,
                            s = this.options.valueField || this.options.textField,
                            l = !1,
                            c = this.dataType();
                        for (a instanceof D || (a = new D([o])), i.selectedIndex = -1, n = 0; a.length > n; n++)
                            for (o = a[n], s && o instanceof T && (o = o.get(s)), "date" == c ? o = C.toString(a[n], "yyyy-MM-dd") : "datetime-local" == c && (o = C.toString(a[n], "yyyy-MM-ddTHH:mm:ss")), e = 0; r.length > e; e++) t = r[e].value, "" === t && "" !== o && (t = r[e].text), null != o && t == "" + o && (r[e].selected = !0, l = !0)
                    },
                    destroy: function() {
                        e(this.element).off(N, this._change)
                    }
                })
            }, E.widget = {
                events: v.extend({
                    init: function(e, t, n) {
                        v.fn.init.call(this, e.element[0], t, n), this.widget = e, this.handlers = {}
                    },
                    refresh: function(e) {
                        var t = this.bindings.events[e],
                            n = this.handlers[e];
                        n && this.widget.unbind(e, n), n = t.get(), this.handlers[e] = function(e) {
                            e.data = t.source, n(e), e.data === t.source && delete e.data
                        }, this.widget.bind(e, this.handlers[e])
                    },
                    destroy: function() {
                        var e;
                        for (e in this.handlers) this.widget.unbind(e, this.handlers[e])
                    }
                }),
                checked: v.extend({
                    init: function(e, t, n) {
                        v.fn.init.call(this, e.element[0], t, n), this.widget = e, this._change = I(this.change, this), this.widget.bind(N, this._change)
                    },
                    change: function() {
                        this.bindings[z].set(this.value())
                    },
                    refresh: function() {
                        this.widget.check(this.bindings[z].get() === !0)
                    },
                    value: function() {
                        var e = this.element,
                            t = e.value;
                        return ("on" == t || "off" == t) && (t = e.checked), t
                    },
                    destroy: function() {
                        this.widget.unbind(N, this._change)
                    }
                }),
                visible: v.extend({
                    init: function(e, t, n) {
                        v.fn.init.call(this, e.element[0], t, n), this.widget = e
                    },
                    refresh: function() {
                        var e = this.bindings.visible.get();
                        this.widget.wrapper[0].style.display = e ? "" : "none"
                    }
                }),
                invisible: v.extend({
                    init: function(e, t, n) {
                        v.fn.init.call(this, e.element[0], t, n), this.widget = e
                    },
                    refresh: function() {
                        var e = this.bindings.invisible.get();
                        this.widget.wrapper[0].style.display = e ? "none" : ""
                    }
                }),
                enabled: v.extend({
                    init: function(e, t, n) {
                        v.fn.init.call(this, e.element[0], t, n), this.widget = e
                    },
                    refresh: function() {
                        this.widget.enable && this.widget.enable(this.bindings.enabled.get())
                    }
                }),
                disabled: v.extend({
                    init: function(e, t, n) {
                        v.fn.init.call(this, e.element[0], t, n), this.widget = e
                    },
                    refresh: function() {
                        this.widget.enable && this.widget.enable(!this.bindings.disabled.get())
                    }
                }),
                source: n("source", "dataSource", "setDataSource"),
                value: v.extend({
                    init: function(t, n, i) {
                        v.fn.init.call(this, t.element[0], n, i), this.widget = t, this._change = e.proxy(this.change, this), this.widget.first(N, this._change);
                        var r = this.bindings.value.get();
                        this._valueIsObservableObject = !i.valuePrimitive && (null == r || r instanceof T), this._valueIsObservableArray = r instanceof D, this._initChange = !1
                    },
                    _source: function() {
                        var e;
                        return this.widget.dataItem && (e = this.widget.dataItem(), e && e instanceof T) ? [e] : (this.bindings.source && (e = this.bindings.source.get()), (!e || e instanceof C.data.DataSource) && (e = this.widget.dataSource.flatView()), e)
                    },
                    change: function() {
                        var e, t, n, i, r, o, a, s = this.widget.value(),
                            l = this.options.dataValueField || this.options.dataTextField,
                            c = "[object Array]" === A.call(s),
                            d = this._valueIsObservableObject,
                            u = [];
                        if (this._initChange = !0, l)
                            if ("" === s && (d || this.options.valuePrimitive)) s = null;
                            else {
                                for (a = this._source(), c && (t = s.length, u = s.slice(0)), r = 0, o = a.length; o > r; r++)
                                    if (n = a[r], i = n.get(l), c) {
                                        for (e = 0; t > e; e++)
                                            if (i == u[e]) {
                                                u[e] = n;
                                                break
                                            }
                                    } else if (i == s) {
                                        s = d ? n : i;
                                        break
                                    }
                                u[0] && (s = this._valueIsObservableArray ? u : d || !l ? u[0] : u[0].get(l))
                            } this.bindings.value.set(s), this._initChange = !1
                    },
                    refresh: function() {
                        var e, n, i, r, o, a, s, l, c;
                        if (!this._initChange) {
                            if (e = this.widget, n = e.options, i = n.dataTextField, r = n.dataValueField || i, o = this.bindings.value.get(), a = n.text || "", s = 0, c = [], o === t && (o = null), r)
                                if (o instanceof D) {
                                    for (l = o.length; l > s; s++) c[s] = o[s].get(r);
                                    o = c
                                } else o instanceof T && (a = o.get(i), o = o.get(r));
                            n.autoBind !== !1 || n.cascadeFrom || !e.listView || e.listView.bound() ? e.value(o) : (i !== r || a || (a = o), a || !o && 0 !== o || !n.valuePrimitive ? e._preselect(o, a) : e.value(o))
                        }
                        this._initChange = !1
                    },
                    destroy: function() {
                        this.widget.unbind(N, this._change)
                    }
                }),
                gantt: {
                    dependencies: n("dependencies", "dependencies", "setDependenciesDataSource")
                },
                multiselect: {
                    value: v.extend({
                        init: function(t, n, i) {
                            v.fn.init.call(this, t.element[0], n, i), this.widget = t, this._change = e.proxy(this.change, this), this.widget.first(N, this._change), this._initChange = !1
                        },
                        change: function() {
                            var e, n, i, r, o, a, s, l, c, d = this,
                                u = d.bindings[M].get(),
                                h = d.options.valuePrimitive,
                                f = h ? d.widget.value() : d.widget.dataItems(),
                                p = this.options.dataValueField || this.options.dataTextField;
                            if (f = f.slice(0), d._initChange = !0, u instanceof D) {
                                for (e = [], n = f.length, i = 0, r = 0, o = u[i], a = !1; o !== t;) {
                                    for (c = !1, r = 0; n > r; r++)
                                        if (h ? a = f[r] == o : (l = f[r], l = l.get ? l.get(p) : l, a = l == (o.get ? o.get(p) : o)), a) {
                                            f.splice(r, 1), n -= 1, c = !0;
                                            break
                                        } c ? i += 1 : (e.push(o), b(u, i, 1), s = i), o = u[i]
                                }
                                b(u, u.length, 0, f), e.length && u.trigger("change", {
                                    action: "remove",
                                    items: e,
                                    index: s
                                }), f.length && u.trigger("change", {
                                    action: "add",
                                    items: f,
                                    index: u.length - 1
                                })
                            } else d.bindings[M].set(f);
                            d._initChange = !1
                        },
                        refresh: function() {
                            if (!this._initChange) {
                                var e, n, i = this.options,
                                    r = this.widget,
                                    o = i.dataValueField || i.dataTextField,
                                    a = this.bindings.value.get(),
                                    s = a,
                                    l = 0,
                                    c = [];
                                if (a === t && (a = null), o)
                                    if (a instanceof D) {
                                        for (e = a.length; e > l; l++) n = a[l], c[l] = n.get ? n.get(o) : n;
                                        a = c
                                    } else a instanceof T && (a = a.get(o));
                                i.autoBind !== !1 || i.valuePrimitive === !0 || r._isBound() ? r.value(a) : r._preselect(s, a)
                            }
                        },
                        destroy: function() {
                            this.widget.unbind(N, this._change)
                        }
                    })
                },
                scheduler: {
                    source: n("source", "dataSource", "setDataSource").extend({
                        dataBound: function(e) {
                            var t, n, i, r, o = this.widget,
                                s = e.addedItems || o.items();
                            if (s.length)
                                for (i = e.addedDataItems || o.dataItems(), r = this.bindings.source._parents(), t = 0, n = i.length; n > t; t++) a(s[t], i[t], this._ns(e.ns), [i[t]].concat(r))
                        }
                    })
                }
            }, b = function(e, t, n, i) {
                var r, o, a, s, l;
                if (i = i || [], n = n || 0, r = i.length, o = e.length, a = [].slice.call(e, t + n), s = a.length, r) {
                    for (r = t + r, l = 0; r > t; t++) e[t] = i[l], l++;
                    e.length = r
                } else if (n)
                    for (e.length = t, n += t; n > t;) delete e[--n];
                if (s) {
                    for (s = t + s, l = 0; s > t; t++) e[t] = a[l], l++;
                    e.length = s
                }
                for (t = e.length; o > t;) delete e[t], t++
            }, w = F.extend({
                init: function(e, t) {
                    this.target = e, this.options = t, this.toDestroy = []
                },
                bind: function(e) {
                    var t, n, i, r, o, a, s = this instanceof y,
                        l = this.binders();
                    for (t in e) t == M ? n = !0 : t == R ? i = !0 : t != P || s ? t == z ? o = !0 : t == B ? a = !0 : this.applyBinding(t, e, l) : r = !0;
                    i && this.applyBinding(R, e, l), n && this.applyBinding(M, e, l), o && this.applyBinding(z, e, l), r && !s && this.applyBinding(P, e, l), a && !s && this.applyBinding(B, e, l)
                },
                binders: function() {
                    return E[this.target.nodeName.toLowerCase()] || {}
                },
                applyBinding: function(e, t, n) {
                    var i, r = n[e] || E[e],
                        o = this.toDestroy,
                        a = t[e];
                    if (r)
                        if (r = new r(this.target, t, this.options), o.push(r), a instanceof p) r.bind(a), o.push(a);
                        else
                            for (i in a) r.bind(a, i), o.push(a[i]);
                    else if ("template" !== e) throw Error("The " + e + " binding is not supported by the " + this.target.nodeName.toLowerCase() + " element")
                },
                destroy: function() {
                    var e, t, n = this.toDestroy;
                    for (e = 0, t = n.length; t > e; e++) n[e].destroy()
                }
            }), y = w.extend({
                binders: function() {
                    return E.widget[this.target.options.name.toLowerCase()] || {}
                },
                applyBinding: function(e, t, n) {
                    var i, r = n[e] || E.widget[e],
                        o = this.toDestroy,
                        a = t[e];
                    if (!r) throw Error("The " + e + " binding is not supported by the " + this.target.options.name + " widget");
                    if (r = new r(this.target, t, this.target.options), o.push(r), a instanceof p) r.bind(a), o.push(a);
                    else
                        for (i in a) r.bind(a, i), o.push(a[i])
                }
            }), k = /[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g, x = /\s/g, C.unbind = u, C.bind = s, C.data.binders = E, C.data.Binder = v, C.notify = h, C.observable = function(e) {
                return e instanceof T || (e = new T(e)), e
            }, C.observableHierarchy = function(e) {
                function t(e) {
                    var n, i;
                    for (n = 0; e.length > n; n++) e[n]._initChildren(), i = e[n].children, i.fetch(), e[n].items = i.data(), t(e[n].items)
                }
                var n = C.data.HierarchicalDataSource.create(e);
                return n.fetch(), t(n.data()), n._data._dataSource = n, n._data
            }
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.fx.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            function n(e) {
                return parseInt(e, 10)
            }

            function i(e, t) {
                return n(e.css(t))
            }

            function r(e) {
                var t, n = [];
                for (t in e) n.push(t);
                return n
            }

            function o(e) {
                for (var t in e) - 1 != U.indexOf(t) && -1 == W.indexOf(t) && delete e[t];
                return e
            }

            function a(e, t) {
                var n, i, r, o, a = [],
                    s = {};
                for (i in t) n = i.toLowerCase(), o = I && -1 != U.indexOf(n), !E.hasHW3D && o && -1 == W.indexOf(n) ? delete t[i] : (r = t[i], o ? a.push(i + "(" + r + ")") : s[i] = r);
                return a.length && (s[se] = a.join(" ")), s
            }

            function s(e, t) {
                var i, r, o;
                return I ? (i = e.css(se), i == K ? "scale" == t ? 1 : 0 : (r = i.match(RegExp(t + "\\s*\\(([\\d\\w\\.]+)")), o = 0, r ? o = n(r[1]) : (r = i.match(B) || [0, 0, 0, 0, 0], t = t.toLowerCase(), H.test(t) ? o = parseFloat(r[3] / r[2]) : "translatey" == t ? o = parseFloat(r[4] / r[2]) : "scale" == t ? o = parseFloat(r[2]) : "rotate" == t && (o = parseFloat(Math.atan2(r[2], r[1])))), o)) : parseFloat(e.css(t))
            }

            function l(e) {
                return e.charAt(0).toUpperCase() + e.substring(1)
            }

            function c(e, t) {
                var n = p.extend(t),
                    i = n.prototype.directions;
                S[l(e)] = n, S.Element.prototype[e] = function(e, t, i, r) {
                    return new n(this.element, e, t, i, r)
                }, T(i, function(t, i) {
                    S.Element.prototype[e + l(i)] = function(e, t, r) {
                        return new n(this.element, i, e, t, r)
                    }
                })
            }

            function d(e, n, i, r) {
                c(e, {
                    directions: g,
                    startValue: function(e) {
                        return this._startValue = e, this
                    },
                    endValue: function(e) {
                        return this._endValue = e, this
                    },
                    shouldHide: function() {
                        return this._shouldHide
                    },
                    prepare: function(e, o) {
                        var a, s, l = this,
                            c = "out" === this._direction,
                            d = l.element.data(n),
                            u = !(isNaN(d) || d == i);
                        a = u ? d : t !== this._startValue ? this._startValue : c ? i : r, s = t !== this._endValue ? this._endValue : c ? r : i, this._reverse ? (e[n] = s, o[n] = a) : (e[n] = a, o[n] = s), l._shouldHide = o[n] === r
                    }
                })
            }

            function u(e, t) {
                var n = C.directions[t].vertical,
                    i = e[n ? J : X]() / 2 + "px";
                return _[t].replace("$size", i)
            }
            var h, f, p, m, g, v, _, b, w, y, k, x, C = window.kendo,
                S = C.effects,
                T = e.each,
                D = e.extend,
                A = e.proxy,
                E = C.support,
                F = E.browser,
                I = E.transforms,
                M = E.transitions,
                R = {
                    scale: 0,
                    scalex: 0,
                    scaley: 0,
                    scale3d: 0
                },
                P = {
                    translate: 0,
                    translatex: 0,
                    translatey: 0,
                    translate3d: 0
                },
                z = t !== document.documentElement.style.zoom && !I,
                B = /matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,
                L = /^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,
                H = /translatex?$/i,
                N = /(zoom|fade|expand)(\w+)/,
                O = /(zoom|fade|expand)/,
                V = /[xy]$/i,
                U = ["perspective", "rotate", "rotatex", "rotatey", "rotatez", "rotate3d", "scale", "scalex", "scaley", "scalez", "scale3d", "skew", "skewx", "skewy", "translate", "translatex", "translatey", "translatez", "translate3d", "matrix", "matrix3d"],
                W = ["rotate", "scale", "scalex", "scaley", "skew", "skewx", "skewy", "translate", "translatex", "translatey", "matrix"],
                j = {
                    rotate: "deg",
                    scale: "",
                    skew: "px",
                    translate: "px"
                },
                q = I.css,
                G = Math.round,
                $ = "",
                Y = "px",
                K = "none",
                Q = "auto",
                X = "width",
                J = "height",
                Z = "hidden",
                ee = "origin",
                te = "abortId",
                ne = "overflow",
                ie = "translate",
                re = "position",
                oe = "completeCallback",
                ae = q + "transition",
                se = q + "transform",
                le = q + "backface-visibility",
                ce = q + "perspective",
                de = "1500px",
                ue = "perspective(" + de + ")",
                he = {
                    left: {
                        reverse: "right",
                        property: "left",
                        transition: "translatex",
                        vertical: !1,
                        modifier: -1
                    },
                    right: {
                        reverse: "left",
                        property: "left",
                        transition: "translatex",
                        vertical: !1,
                        modifier: 1
                    },
                    down: {
                        reverse: "up",
                        property: "top",
                        transition: "translatey",
                        vertical: !0,
                        modifier: 1
                    },
                    up: {
                        reverse: "down",
                        property: "top",
                        transition: "translatey",
                        vertical: !0,
                        modifier: -1
                    },
                    top: {
                        reverse: "bottom"
                    },
                    bottom: {
                        reverse: "top"
                    },
                    "in": {
                        reverse: "out",
                        modifier: -1
                    },
                    out: {
                        reverse: "in",
                        modifier: 1
                    },
                    vertical: {
                        reverse: "vertical"
                    },
                    horizontal: {
                        reverse: "horizontal"
                    }
                };
            C.directions = he, D(e.fn, {
                kendoStop: function(e, t) {
                    return M ? S.stopQueue(this, e || !1, t || !1) : this.stop(e, t)
                }
            }), I && !M && (T(W, function(n, i) {
                e.fn[i] = function(n) {
                    if (t === n) return s(this, i);
                    var r = e(this)[0],
                        o = i + "(" + n + j[i.replace(V, "")] + ")";
                    return -1 == r.style.cssText.indexOf(se) ? e(this).css(se, o) : r.style.cssText = r.style.cssText.replace(RegExp(i + "\\(.*?\\)", "i"), o), this
                }, e.fx.step[i] = function(t) {
                    e(t.elem)[i](t.now)
                }
            }), h = e.fx.prototype.cur, e.fx.prototype.cur = function() {
                return -1 != W.indexOf(this.prop) ? parseFloat(e(this.elem)[this.prop]()) : h.apply(this, arguments)
            }), C.toggleClass = function(e, t, n, i) {
                return t && (t = t.split(" "), M && (n = D({
                    exclusive: "all",
                    duration: 400,
                    ease: "ease-out"
                }, n), e.css(ae, n.exclusive + " " + n.duration + "ms " + n.ease), setTimeout(function() {
                    e.css(ae, "").css(J)
                }, n.duration)), T(t, function(t, n) {
                    e.toggleClass(n, i)
                })), e
            }, C.parseEffects = function(e, t) {
                var n = {};
                return "string" == typeof e ? T(e.split(" "), function(e, i) {
                    var r = !O.test(i),
                        o = i.replace(N, function(e, t, n) {
                            return t + ":" + n.toLowerCase()
                        }),
                        a = o.split(":"),
                        s = a[1],
                        l = {};
                    a.length > 1 && (l.direction = t && r ? he[s].reverse : s), n[a[0]] = l
                }) : T(e, function(e) {
                    var i = this.direction;
                    i && t && !O.test(e) && (this.direction = he[i].reverse), n[e] = this
                }), n
            }, M && D(S, {
                transition: function(t, n, i) {
                    var o, s, l, c, d = 0,
                        u = t.data("keys") || [];
                    i = D({
                        duration: 200,
                        ease: "ease-out",
                        complete: null,
                        exclusive: "all"
                    }, i), l = !1, c = function() {
                        l || (l = !0, s && (clearTimeout(s), s = null), t.removeData(te).dequeue().css(ae, "").css(ae), i.complete.call(t))
                    }, i.duration = e.fx ? e.fx.speeds[i.duration] || i.duration : i.duration, o = a(t, n), e.merge(u, r(o)), t.data("keys", e.unique(u)).height(), t.css(ae, i.exclusive + " " + i.duration + "ms " + i.ease).css(ae), t.css(o).css(se), M.event && (t.one(M.event, c), 0 !== i.duration && (d = 500)), s = setTimeout(c, i.duration + d), t.data(te, s), t.data(oe, c)
                },
                stopQueue: function(e, t, n) {
                    var i, r = e.data("keys"),
                        o = !n && r,
                        a = e.data(oe);
                    return o && (i = C.getComputedStyles(e[0], r)), a && a(), o && e.css(i), e.removeData("keys").stop(t)
                }
            }), f = C.Class.extend({
                init: function(e, t) {
                    var n = this;
                    n.element = e, n.effects = [], n.options = t, n.restore = []
                },
                run: function(t) {
                    var n, i, r, s, l, c, d, u = this,
                        h = t.length,
                        f = u.element,
                        p = u.options,
                        m = e.Deferred(),
                        g = {},
                        v = {};
                    for (u.effects = t, m.then(e.proxy(u, "complete")), f.data("animating", !0), i = 0; h > i; i++)
                        for (n = t[i], n.setReverse(p.reverse), n.setOptions(p), u.addRestoreProperties(n.restore), n.prepare(g, v), l = n.children(), r = 0, c = l.length; c > r; r++) l[r].duration(p.duration).run();
                    for (d in p.effects) D(v, p.effects[d].properties);
                    for (f.is(":visible") || D(g, {
                        display: f.data("olddisplay") || "block"
                    }), I && !p.reset && (s = f.data("targetTransform"), s && (g = D(s, g))), g = a(f, g), I && !M && (g = o(g)), f.css(g).css(se), i = 0; h > i; i++) t[i].setup();
                    return p.init && p.init(), f.data("targetTransform", v), S.animate(f, v, D({}, p, {
                        complete: m.resolve
                    })), m.promise()
                },
                stop: function() {
                    e(this.element).kendoStop(!0, !0)
                },
                addRestoreProperties: function(e) {
                    for (var t, n = this.element, i = 0, r = e.length; r > i; i++) t = e[i], this.restore.push(t), n.data(t) || n.data(t, n.css(t))
                },
                restoreCallback: function() {
                    var e, t, n, i = this.element;
                    for (e = 0, t = this.restore.length; t > e; e++) n = this.restore[e], i.css(n, i.data(n))
                },
                complete: function() {
                    var t = this,
                        n = 0,
                        i = t.element,
                        r = t.options,
                        o = t.effects,
                        a = o.length;
                    for (i.removeData("animating").dequeue(), r.hide && i.data("olddisplay", i.css("display")).hide(), this.restoreCallback(), z && !I && setTimeout(e.proxy(this, "restoreCallback"), 0); a > n; n++) o[n].teardown();
                    r.completeCallback && r.completeCallback(i)
                }
            }), S.promise = function(e, t) {
                var n, i, r, o = [],
                    a = new f(e, t),
                    s = C.parseEffects(t.effects);
                t.effects = s;
                for (r in s) n = S[l(r)], n && (i = new n(e, s[r].direction), o.push(i));
                o[0] ? a.run(o) : (e.is(":visible") || e.css({
                    display: e.data("olddisplay") || "block"
                }).css("display"), t.init && t.init(), e.dequeue(), a.complete())
            }, D(S, {
                animate: function(n, r, a) {
                    var s = a.transition !== !1;
                    delete a.transition, M && "transition" in S && s ? S.transition(n, r, a) : I ? n.animate(o(r), {
                        queue: !1,
                        show: !1,
                        hide: !1,
                        duration: a.duration,
                        complete: a.complete
                    }) : n.each(function() {
                        var n = e(this),
                            o = {};
                        T(U, function(e, a) {
                            var s, l, c, d, u, h, f, p = r ? r[a] + " " : null;
                            p && (l = r, a in R && r[a] !== t ? (s = p.match(L), I && D(l, {
                                scale: +s[0]
                            })) : a in P && r[a] !== t && (c = n.css(re), d = "absolute" == c || "fixed" == c, n.data(ie) || (d ? n.data(ie, {
                                top: i(n, "top") || 0,
                                left: i(n, "left") || 0,
                                bottom: i(n, "bottom"),
                                right: i(n, "right")
                            }) : n.data(ie, {
                                top: i(n, "marginTop") || 0,
                                left: i(n, "marginLeft") || 0
                            })), u = n.data(ie), s = p.match(L), s && (h = a == ie + "y" ? 0 : +s[1], f = a == ie + "y" ? +s[1] : +s[2], d ? (isNaN(u.right) ? isNaN(h) || D(l, {
                                left: u.left + h
                            }) : isNaN(h) || D(l, {
                                right: u.right - h
                            }), isNaN(u.bottom) ? isNaN(f) || D(l, {
                                top: u.top + f
                            }) : isNaN(f) || D(l, {
                                bottom: u.bottom - f
                            })) : (isNaN(h) || D(l, {
                                marginLeft: u.left + h
                            }), isNaN(f) || D(l, {
                                marginTop: u.top + f
                            })))), !I && "scale" != a && a in l && delete l[a], l && D(o, l))
                        }), F.msie && delete o.scale, n.animate(o, {
                            queue: !1,
                            show: !1,
                            hide: !1,
                            duration: a.duration,
                            complete: a.complete
                        })
                    })
                }
            }), S.animatedPromise = S.promise, p = C.Class.extend({
                init: function(e, t) {
                    var n = this;
                    n.element = e, n._direction = t, n.options = {}, n._additionalEffects = [], n.restore || (n.restore = [])
                },
                reverse: function() {
                    return this._reverse = !0, this.run()
                },
                play: function() {
                    return this._reverse = !1, this.run()
                },
                add: function(e) {
                    return this._additionalEffects.push(e), this
                },
                direction: function(e) {
                    return this._direction = e, this
                },
                duration: function(e) {
                    return this._duration = e, this
                },
                compositeRun: function() {
                    var e = this,
                        t = new f(e.element, {
                            reverse: e._reverse,
                            duration: e._duration
                        }),
                        n = e._additionalEffects.concat([e]);
                    return t.run(n)
                },
                run: function() {
                    if (this._additionalEffects && this._additionalEffects[0]) return this.compositeRun();
                    var t, n, i = this,
                        r = i.element,
                        s = 0,
                        l = i.restore,
                        c = l.length,
                        d = e.Deferred(),
                        u = {},
                        h = {},
                        f = i.children(),
                        p = f.length;
                    for (d.then(e.proxy(i, "_complete")), r.data("animating", !0), s = 0; c > s; s++) t = l[s], r.data(t) || r.data(t, r.css(t));
                    for (s = 0; p > s; s++) f[s].duration(i._duration).run();
                    return i.prepare(u, h), r.is(":visible") || D(u, {
                        display: r.data("olddisplay") || "block"
                    }), I && (n = r.data("targetTransform"), n && (u = D(n, u))), u = a(r, u), I && !M && (u = o(u)), r.css(u).css(se), i.setup(), r.data("targetTransform", h), S.animate(r, h, {
                        duration: i._duration,
                        complete: d.resolve
                    }), d.promise()
                },
                stop: function() {
                    var t = 0,
                        n = this.children(),
                        i = n.length;
                    for (t = 0; i > t; t++) n[t].stop();
                    return e(this.element).kendoStop(!0, !0), this
                },
                restoreCallback: function() {
                    var e, t, n, i = this.element;
                    for (e = 0, t = this.restore.length; t > e; e++) n = this.restore[e], i.css(n, i.data(n))
                },
                _complete: function() {
                    var t = this,
                        n = t.element;
                    n.removeData("animating").dequeue(), t.restoreCallback(), t.shouldHide() && n.data("olddisplay", n.css("display")).hide(), z && !I && setTimeout(e.proxy(t, "restoreCallback"), 0), t.teardown()
                },
                setOptions: function(e) {
                    D(!0, this.options, e)
                },
                children: function() {
                    return []
                },
                shouldHide: e.noop,
                setup: e.noop,
                prepare: e.noop,
                teardown: e.noop,
                directions: [],
                setReverse: function(e) {
                    return this._reverse = e, this
                }
            }), m = ["left", "right", "up", "down"], g = ["in", "out"], c("slideIn", {
                directions: m,
                divisor: function(e) {
                    return this.options.divisor = e, this
                },
                prepare: function(e, t) {
                    var n, i = this,
                        r = i.element,
                        o = he[i._direction],
                        a = -o.modifier * (o.vertical ? r.outerHeight() : r.outerWidth()),
                        s = a / (i.options && i.options.divisor || 1) + Y,
                        l = "0px";
                    i._reverse && (n = e, e = t, t = n), I ? (e[o.transition] = s, t[o.transition] = l) : (e[o.property] = s, t[o.property] = l)
                }
            }), c("tile", {
                directions: m,
                init: function(e, t, n) {
                    p.prototype.init.call(this, e, t), this.options = {
                        previous: n
                    }
                },
                previousDivisor: function(e) {
                    return this.options.previousDivisor = e, this
                },
                children: function() {
                    var e = this,
                        t = e._reverse,
                        n = e.options.previous,
                        i = e.options.previousDivisor || 1,
                        r = e._direction,
                        o = [C.fx(e.element).slideIn(r).setReverse(t)];
                    return n && o.push(C.fx(n).slideIn(he[r].reverse).divisor(i).setReverse(!t)), o
                }
            }), d("fade", "opacity", 1, 0), d("zoom", "scale", 1, .01), c("slideMargin", {
                prepare: function(e, t) {
                    var n, i = this,
                        r = i.element,
                        o = i.options,
                        a = r.data(ee),
                        s = o.offset,
                        l = i._reverse;
                    l || null !== a || r.data(ee, parseFloat(r.css("margin-" + o.axis))), n = r.data(ee) || 0, t["margin-" + o.axis] = l ? n : n + s
                }
            }), c("slideTo", {
                prepare: function(e, t) {
                    var n = this,
                        i = n.element,
                        r = n.options,
                        o = r.offset.split(","),
                        a = n._reverse;
                    I ? (t.translatex = a ? 0 : o[0], t.translatey = a ? 0 : o[1]) : (t.left = a ? 0 : o[0], t.top = a ? 0 : o[1]), i.css("left")
                }
            }), c("expand", {
                directions: ["horizontal", "vertical"],
                restore: [ne],
                prepare: function(e, n) {
                    var i = this,
                        r = i.element,
                        o = i.options,
                        a = i._reverse,
                        s = "vertical" === i._direction ? J : X,
                        l = r[0].style[s],
                        c = r.data(s),
                        d = parseFloat(c || l),
                        u = G(r.css(s, Q)[s]());
                    e.overflow = Z, d = o && o.reset ? u || d : d || u, n[s] = (a ? 0 : d) + Y, e[s] = (a ? d : 0) + Y, c === t && r.data(s, l)
                },
                shouldHide: function() {
                    return this._reverse
                },
                teardown: function() {
                    var e = this,
                        t = e.element,
                        n = "vertical" === e._direction ? J : X,
                        i = t.data(n);
                    (i == Q || i === $) && setTimeout(function() {
                        t.css(n, Q).css(n)
                    }, 0)
                }
            }), v = {
                position: "absolute",
                marginLeft: 0,
                marginTop: 0,
                scale: 1
            }, c("transfer", {
                init: function(e, t) {
                    this.element = e, this.options = {
                        target: t
                    }, this.restore = []
                },
                setup: function() {
                    this.element.appendTo(document.body)
                },
                prepare: function(e, t) {
                    var n = this,
                        i = n.element,
                        r = S.box(i),
                        o = S.box(n.options.target),
                        a = s(i, "scale"),
                        l = S.fillScale(o, r),
                        c = S.transformOrigin(o, r);
                    D(e, v), t.scale = 1, i.css(se, "scale(1)").css(se), i.css(se, "scale(" + a + ")"), e.top = r.top, e.left = r.left, e.transformOrigin = c.x + Y + " " + c.y + Y, n._reverse ? e.scale = l : t.scale = l
                }
            }), _ = {
                top: "rect(auto auto $size auto)",
                bottom: "rect($size auto auto auto)",
                left: "rect(auto $size auto auto)",
                right: "rect(auto auto auto $size)"
            }, b = {
                top: {
                    start: "rotatex(0deg)",
                    end: "rotatex(180deg)"
                },
                bottom: {
                    start: "rotatex(-180deg)",
                    end: "rotatex(0deg)"
                },
                left: {
                    start: "rotatey(0deg)",
                    end: "rotatey(-180deg)"
                },
                right: {
                    start: "rotatey(180deg)",
                    end: "rotatey(0deg)"
                }
            }, c("turningPage", {
                directions: m,
                init: function(e, t, n) {
                    p.prototype.init.call(this, e, t), this._container = n
                },
                prepare: function(e, t) {
                    var n = this,
                        i = n._reverse,
                        r = i ? he[n._direction].reverse : n._direction,
                        o = b[r];
                    e.zIndex = 1, n._clipInHalf && (e.clip = u(n._container, C.directions[r].reverse)), e[le] = Z, t[se] = ue + (i ? o.start : o.end), e[se] = ue + (i ? o.end : o.start)
                },
                setup: function() {
                    this._container.append(this.element)
                },
                face: function(e) {
                    return this._face = e, this
                },
                shouldHide: function() {
                    var e = this,
                        t = e._reverse,
                        n = e._face;
                    return t && !n || !t && n
                },
                clipInHalf: function(e) {
                    return this._clipInHalf = e, this
                },
                temporary: function() {
                    return this.element.addClass("temp-page"), this
                }
            }), c("staticPage", {
                directions: m,
                init: function(e, t, n) {
                    p.prototype.init.call(this, e, t), this._container = n
                },
                restore: ["clip"],
                prepare: function(e, t) {
                    var n = this,
                        i = n._reverse ? he[n._direction].reverse : n._direction;
                    e.clip = u(n._container, i), e.opacity = .999, t.opacity = 1
                },
                shouldHide: function() {
                    var e = this,
                        t = e._reverse,
                        n = e._face;
                    return t && !n || !t && n
                },
                face: function(e) {
                    return this._face = e, this
                }
            }), c("pageturn", {
                directions: ["horizontal", "vertical"],
                init: function(e, t, n, i) {
                    p.prototype.init.call(this, e, t), this.options = {}, this.options.face = n, this.options.back = i
                },
                children: function() {
                    var e, t = this,
                        n = t.options,
                        i = "horizontal" === t._direction ? "left" : "top",
                        r = C.directions[i].reverse,
                        o = t._reverse,
                        a = n.face.clone(!0).removeAttr("id"),
                        s = n.back.clone(!0).removeAttr("id"),
                        l = t.element;
                    return o && (e = i, i = r, r = e), [C.fx(n.face).staticPage(i, l).face(!0).setReverse(o), C.fx(n.back).staticPage(r, l).setReverse(o), C.fx(a).turningPage(i, l).face(!0).clipInHalf(!0).temporary().setReverse(o), C.fx(s).turningPage(r, l).clipInHalf(!0).temporary().setReverse(o)]
                },
                prepare: function(e, t) {
                    e[ce] = de, e.transformStyle = "preserve-3d", e.opacity = .999, t.opacity = 1
                },
                teardown: function() {
                    this.element.find(".temp-page").remove()
                }
            }), c("flip", {
                directions: ["horizontal", "vertical"],
                init: function(e, t, n, i) {
                    p.prototype.init.call(this, e, t), this.options = {}, this.options.face = n, this.options.back = i
                },
                children: function() {
                    var e, t = this,
                        n = t.options,
                        i = "horizontal" === t._direction ? "left" : "top",
                        r = C.directions[i].reverse,
                        o = t._reverse,
                        a = t.element;
                    return o && (e = i, i = r, r = e), [C.fx(n.face).turningPage(i, a).face(!0).setReverse(o), C.fx(n.back).turningPage(r, a).setReverse(o)]
                },
                prepare: function(e) {
                    e[ce] = de, e.transformStyle = "preserve-3d"
                }
            }), w = !E.mobileOS.android, y = ".km-touch-scrollbar, .km-actionsheet-wrapper", c("replace", {
                _before: e.noop,
                _after: e.noop,
                init: function(t, n, i) {
                    p.prototype.init.call(this, t), this._previous = e(n), this._transitionClass = i
                },
                duration: function() {
                    throw Error("The replace effect does not support duration setting; the effect duration may be customized through the transition class rule")
                },
                beforeTransition: function(e) {
                    return this._before = e, this
                },
                afterTransition: function(e) {
                    return this._after = e, this
                },
                _both: function() {
                    return e().add(this._element).add(this._previous)
                },
                _containerClass: function() {
                    var e = this._direction,
                        t = "k-fx k-fx-start k-fx-" + this._transitionClass;
                    return e && (t += " k-fx-" + e), this._reverse && (t += " k-fx-reverse"), t
                },
                complete: function(t) {
                    if (!(!this.deferred || t && e(t.target).is(y))) {
                        var n = this.container;
                        n.removeClass("k-fx-end").removeClass(this._containerClass()).off(M.event, this.completeProxy), this._previous.hide().removeClass("k-fx-current"), this.element.removeClass("k-fx-next"), w && n.css(ne, ""), this.isAbsolute || this._both().css(re, ""), this.deferred.resolve(), delete this.deferred
                    }
                },
                run: function() {
                    if (this._additionalEffects && this._additionalEffects[0]) return this.compositeRun();
                    var t, n = this,
                        i = n.element,
                        r = n._previous,
                        o = i.parents().filter(r.parents()).first(),
                        a = n._both(),
                        s = e.Deferred(),
                        l = i.css(re);
                    return o.length || (o = i.parent()), this.container = o, this.deferred = s, this.isAbsolute = "absolute" == l, this.isAbsolute || a.css(re, "absolute"), w && (t = o.css(ne), o.css(ne, "hidden")), M ? (i.addClass("k-fx-hidden"), o.addClass(this._containerClass()), this.completeProxy = e.proxy(this, "complete"), o.on(M.event, this.completeProxy), C.animationFrame(function() {
                        i.removeClass("k-fx-hidden").addClass("k-fx-next"), r.css("display", "").addClass("k-fx-current"), n._before(r, i), C.animationFrame(function() {
                            o.removeClass("k-fx-start").addClass("k-fx-end"), n._after(r, i)
                        })
                    })) : this.complete(), s.promise()
                },
                stop: function() {
                    this.complete()
                }
            }), k = C.Class.extend({
                init: function() {
                    var e = this;
                    e._tickProxy = A(e._tick, e), e._started = !1
                },
                tick: e.noop,
                done: e.noop,
                onEnd: e.noop,
                onCancel: e.noop,
                start: function() {
                    this.enabled() && (this.done() ? this.onEnd() : (this._started = !0, C.animationFrame(this._tickProxy)))
                },
                enabled: function() {
                    return !0
                },
                cancel: function() {
                    this._started = !1, this.onCancel()
                },
                _tick: function() {
                    var e = this;
                    e._started && (e.tick(), e.done() ? (e._started = !1, e.onEnd()) : C.animationFrame(e._tickProxy))
                }
            }), x = k.extend({
                init: function(e) {
                    var t = this;
                    D(t, e), k.fn.init.call(t)
                },
                done: function() {
                    return this.timePassed() >= this.duration
                },
                timePassed: function() {
                    return Math.min(this.duration, new Date - this.startDate)
                },
                moveTo: function(e) {
                    var t = this,
                        n = t.movable;
                    t.initial = n[t.axis], t.delta = e.location - t.initial, t.duration = "number" == typeof e.duration ? e.duration : 300, t.tick = t._easeProxy(e.ease), t.startDate = new Date, t.start()
                },
                _easeProxy: function(e) {
                    var t = this;
                    return function() {
                        t.movable.moveAxis(t.axis, e(t.timePassed(), t.initial, t.delta, t.duration))
                    }
                }
            }), D(x, {
                easeOutExpo: function(e, t, n, i) {
                    return e == i ? t + n : n * (-Math.pow(2, -10 * e / i) + 1) + t
                },
                easeOutBack: function(e, t, n, i, r) {
                    return r = 1.70158, n * ((e = e / i - 1) * e * ((r + 1) * e + r) + 1) + t
                }
            }), S.Animation = k, S.Transition = x, S.createEffect = c, S.box = function(t) {
                t = e(t);
                var n = t.offset();
                return n.width = t.outerWidth(), n.height = t.outerHeight(), n
            }, S.transformOrigin = function(e, t) {
                var n = (e.left - t.left) * t.width / (t.width - e.width),
                    i = (e.top - t.top) * t.height / (t.height - e.height);
                return {
                    x: isNaN(n) ? 0 : n,
                    y: isNaN(i) ? 0 : i
                }
            }, S.fillScale = function(e, t) {
                return Math.min(e.width / t.width, e.height / t.height)
            }, S.fitScale = function(e, t) {
                return Math.max(e.width / t.width, e.height / t.height)
            }
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.view.min", ["kendo.core.min", "kendo.binder.min", "kendo.fx.min"], e)
    }(function() {
        return function(e, t) {
            function n(e) {
                if (!e) return {};
                var t = e.match(_) || [];
                return {
                    type: t[1],
                    direction: t[3],
                    reverse: "reverse" === t[5]
                }
            }
            var i = window.kendo,
                r = i.Observable,
                o = "SCRIPT",
                a = "init",
                s = "show",
                l = "hide",
                c = "transitionStart",
                d = "transitionEnd",
                u = "attach",
                h = "detach",
                f = /unrecognized expression/,
                p = r.extend({
                    init: function(e, t) {
                        var n = this;
                        t = t || {}, r.fn.init.call(n), n.content = e, n.id = i.guid(), n.tagName = t.tagName || "div", n.model = t.model, n._wrap = t.wrap !== !1, this._evalTemplate = t.evalTemplate || !1, n._fragments = {}, n.bind([a, s, l, c, d], t)
                    },
                    render: function(t) {
                        var n = this,
                            r = !n.element;
                        return r && (n.element = n._createElement()), t && e(t).append(n.element), r && (i.bind(n.element, n.model), n.trigger(a)), t && (n._eachFragment(u), n.trigger(s)), n.element
                    },
                    clone: function() {
                        return new m(this)
                    },
                    triggerBeforeShow: function() {
                        return !0
                    },
                    triggerBeforeHide: function() {
                        return !0
                    },
                    showStart: function() {
                        this.element.css("display", "")
                    },
                    showEnd: function() {},
                    hideEnd: function() {
                        this.hide()
                    },
                    beforeTransition: function(e) {
                        this.trigger(c, {
                            type: e
                        })
                    },
                    afterTransition: function(e) {
                        this.trigger(d, {
                            type: e
                        })
                    },
                    hide: function() {
                        this._eachFragment(h), this.element.detach(), this.trigger(l)
                    },
                    destroy: function() {
                        var e = this.element;
                        e && (i.unbind(e), i.destroy(e), e.remove())
                    },
                    fragments: function(t) {
                        e.extend(this._fragments, t)
                    },
                    _eachFragment: function(e) {
                        for (var t in this._fragments) this._fragments[t][e](this, t)
                    },
                    _createElement: function() {
                        var t, n, r, a = this,
                            s = "<" + a.tagName + " />";
                        try {
                            n = e(document.getElementById(a.content) || a.content), n[0].tagName === o && (n = n.html())
                        } catch (l) {
                            f.test(l.message) && (n = a.content)
                        }
                        return "string" == typeof n ? (n = n.replace(/^\s+|\s+$/g, ""), a._evalTemplate && (n = i.template(n)(a.model || {})), t = e(s).append(n), a._wrap || (t = t.contents())) : (t = n, a._evalTemplate && (r = e(i.template(e("<div />").append(t.clone(!0)).html())(a.model || {})), e.contains(document, t[0]) && t.replaceWith(r), t = r), a._wrap && (t = t.wrapAll(s).parent())), t
                    }
                }),
                m = i.Class.extend({
                    init: function(t) {
                        e.extend(this, {
                            element: t.element.clone(!0),
                            transition: t.transition,
                            id: t.id
                        }), t.element.parent().append(this.element)
                    },
                    hideEnd: function() {
                        this.element.remove()
                    },
                    beforeTransition: e.noop,
                    afterTransition: e.noop
                }),
                g = p.extend({
                    init: function(e, t) {
                        p.fn.init.call(this, e, t), this.containers = {}
                    },
                    container: function(e) {
                        var t = this.containers[e];
                        return t || (t = this._createContainer(e), this.containers[e] = t), t
                    },
                    showIn: function(e, t, n) {
                        this.container(e).show(t, n)
                    },
                    _createContainer: function(e) {
                        var t, n = this.render(),
                            i = n.find(e);
                        if (!i.length && n.is(e)) {
                            if (!n.is(e)) throw Error("can't find a container with the specified " + e + " selector");
                            i = n
                        }
                        return t = new b(i), t.bind("accepted", function(e) {
                            e.view.render(i)
                        }), t
                    }
                }),
                v = p.extend({
                    attach: function(e, t) {
                        e.element.find(t).replaceWith(this.render())
                    },
                    detach: function() {}
                }),
                _ = /^(\w+)(:(\w+))?( (\w+))?$/,
                b = r.extend({
                    init: function(e) {
                        r.fn.init.call(this), this.container = e, this.history = [], this.view = null, this.running = !1
                    },
                    after: function() {
                        this.running = !1, this.trigger("complete", {
                            view: this.view
                        }), this.trigger("after")
                    },
                    end: function() {
                        this.view.showEnd(), this.previous.hideEnd(), this.after()
                    },
                    show: function(e, t, r) {
                        if (!e.triggerBeforeShow() || this.view && !this.view.triggerBeforeHide()) return this.trigger("after"), !1;
                        r = r || e.id;
                        var o = this,
                            a = e === o.view ? e.clone() : o.view,
                            s = o.history,
                            l = s[s.length - 2] || {},
                            c = l.id === r,
                            d = t || (c ? s[s.length - 1].transition : e.transition),
                            u = n(d);
                        return o.running && o.effect.stop(), "none" === d && (d = null), o.trigger("accepted", {
                            view: e
                        }), o.view = e, o.previous = a, o.running = !0, c ? s.pop() : s.push({
                            id: r,
                            transition: d
                        }), a ? (d && i.effects.enabled ? (e.element.addClass("k-fx-hidden"), e.showStart(), c && !t && (u.reverse = !u.reverse), o.effect = i.fx(e.element).replace(a.element, u.type).beforeTransition(function() {
                            e.beforeTransition("show"), a.beforeTransition("hide")
                        }).afterTransition(function() {
                            e.afterTransition("show"), a.afterTransition("hide")
                        }).direction(u.direction).setReverse(u.reverse), o.effect.run().then(function() {
                            o.end()
                        })) : (e.showStart(), o.end()), !0) : (e.showStart(), e.showEnd(), o.after(), !0)
                    }
                });
            i.ViewContainer = b, i.Fragment = v, i.Layout = g, i.View = p, i.ViewClone = m
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.dom.min", ["kendo.core.min"], e)
    }(function() {
        return function(e) {
            function t() {
                this.node = null
            }

            function n() {}

            function i(e, t, n) {
                this.nodeName = e, this.attr = t || {}, this.children = n || []
            }

            function r(e) {
                this.nodeValue = e
            }

            function o(e) {
                this.html = e
            }

            function a(e, t) {
                for (h.innerHTML = t; h.firstChild;) e.appendChild(h.firstChild)
            }

            function s(e) {
                return new o(e)
            }

            function l(e, t, n) {
                return new i(e, t, n)
            }

            function c(e) {
                return new r(e)
            }

            function d(e) {
                this.root = e, this.children = []
            }
            var u, h;
            t.prototype = {
                remove: function() {
                    this.node.parentNode.removeChild(this.node), this.attr = {}
                },
                attr: {},
                text: function() {
                    return ""
                }
            }, n.prototype = {
                nodeName: "#null",
                attr: {
                    style: {}
                },
                children: [],
                remove: function() {}
            }, u = new n, i.prototype = new t, i.prototype.appendTo = function(e) {
                var t, n = document.createElement(this.nodeName),
                    i = this.children;
                for (t = 0; i.length > t; t++) i[t].render(n, u);
                return e.appendChild(n), n
            }, i.prototype.render = function(e, t) {
                var n, i, r, o, a, s;
                if (t.nodeName !== this.nodeName) t.remove(), n = this.appendTo(e);
                else {
                    if (n = t.node, r = this.children, o = r.length, a = t.children, s = a.length, Math.abs(s - o) > 2) return void this.render({
                        appendChild: function(n) {
                            e.replaceChild(n, t.node)
                        }
                    }, u);
                    for (i = 0; o > i; i++) r[i].render(n, a[i] || u);
                    for (i = o; s > i; i++) a[i].remove()
                }
                this.node = n, this.syncAttributes(t.attr), this.removeAttributes(t.attr)
            }, i.prototype.syncAttributes = function(e) {
                var t, n, i, r = this.attr;
                for (t in r) n = r[t], i = e[t], "style" === t ? this.setStyle(n, i) : n !== i && this.setAttribute(t, n, i)
            }, i.prototype.setStyle = function(e, t) {
                var n, i = this.node;
                if (t)
                    for (n in e) e[n] !== t[n] && (i.style[n] = e[n]);
                else
                    for (n in e) i.style[n] = e[n]
            }, i.prototype.removeStyle = function(e) {
                var t, n = this.attr.style || {},
                    i = this.node;
                for (t in e) void 0 === n[t] && (i.style[t] = "")
            }, i.prototype.removeAttributes = function(e) {
                var t, n = this.attr;
                for (t in e) "style" === t ? this.removeStyle(e.style) : void 0 === n[t] && this.removeAttribute(t)
            }, i.prototype.removeAttribute = function(e) {
                var t = this.node;
                "style" === e ? t.style.cssText = "" : "className" === e ? t.className = "" : t.removeAttribute(e)
            }, i.prototype.setAttribute = function(e, t) {
                var n = this.node;
                void 0 !== n[e] ? n[e] = t : n.setAttribute(e, t);
            }, i.prototype.text = function() {
                var e, t = "";
                for (e = 0; this.children.length > e; ++e) t += this.children[e].text();
                return t
            }, r.prototype = new t, r.prototype.nodeName = "#text", r.prototype.render = function(e, t) {
                var n;
                t.nodeName !== this.nodeName ? (t.remove(), n = document.createTextNode(this.nodeValue), e.appendChild(n)) : (n = t.node, this.nodeValue !== t.nodeValue && (n.nodeValue = this.nodeValue)), this.node = n
            }, r.prototype.text = function() {
                return this.nodeValue
            }, o.prototype = {
                nodeName: "#html",
                attr: {},
                remove: function() {
                    for (var e = 0; this.nodes.length > e; e++) this.nodes[e].parentNode.removeChild(this.nodes[e])
                },
                render: function(e, t) {
                    var n, i;
                    if (t.nodeName !== this.nodeName || t.html !== this.html)
                        for (t.remove(), n = e.lastChild, a(e, this.html), this.nodes = [], i = n ? n.nextSibling : e.firstChild; i; i = i.nextSibling) this.nodes.push(i);
                    else this.nodes = t.nodes.slice(0)
                }
            }, h = document.createElement("div"), d.prototype = {
                html: s,
                element: l,
                text: c,
                render: function(e) {
                    var t, n, i = this.children;
                    for (t = 0, n = e.length; n > t; t++) e[t].render(this.root, i[t] || u);
                    for (t = n; i.length > t; t++) i[t].remove();
                    this.children = e
                }
            }, e.dom = {
                html: s,
                text: c,
                element: l,
                Tree: d,
                Node: t
            }
        }(window.kendo), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.ooxml.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            function n(e) {
                var t = Math.floor(e / 26) - 1;
                return (t >= 0 ? n(t) : "") + String.fromCharCode(65 + e % 26)
            }

            function i(e, t) {
                return n(t) + (e + 1)
            }

            function r(e, t) {
                return n(t) + "$" + (e + 1)
            }

            function o(e) {
                var t = e.frozenRows || (e.freezePane || {}).rowSplit || 1;
                return t - 1
            }

            function a(e) {
                return (e / 7 * 100 + .5) / 100
            }

            function s(e) {
                return .75 * e
            }

            function l(e) {
                return 6 > e.length && (e = e.replace(/(\w)/g, function(e, t) {
                    return t + t
                })), e = e.substring(1).toUpperCase(), 8 > e.length && (e = "FF" + e), e
            }

            function c(e) {
                var t = "thin";
                return 2 === e ? t = "medium" : 3 === e && (t = "thick"), t
            }

            function d(e, t) {
                var n = "";
                return t && t.size && (n += "<" + e + ' style="' + c(t.size) + '">', t.color && (n += '<color rgb="' + l(t.color) + '"/>'), n += "</" + e + ">"), n
            }

            function u(e) {
                return "<border>" + d("left", e.left) + d("right", e.right) + d("top", e.top) + d("bottom", e.bottom) + "</border>"
            }
            var h = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',
                f = t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>${creator}</dc:creator><cp:lastModifiedBy>${lastModifiedBy}</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">${created}</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">${modified}</dcterms:modified></cp:coreProperties>'),
                p = t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>${sheets.length}</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="${sheets.length}" baseType="lpstr"># for (var idx = 0; idx < sheets.length; idx++) { ## if (sheets[idx].options.title) { #<vt:lpstr>${sheets[idx].options.title}</vt:lpstr># } else { #<vt:lpstr>Sheet${idx+1}</vt:lpstr># } ## } #</vt:vector></TitlesOfParts><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>14.0300</AppVersion></Properties>'),
                m = t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Default Extension="xml" ContentType="application/xml" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/># for (var idx = 1; idx <= count; idx++) { #<Override PartName="/xl/worksheets/sheet${idx}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" /># } #<Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /></Types>'),
                g = t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="9303" /><workbookPr defaultThemeVersion="124226" /><bookViews><workbookView xWindow="240" yWindow="45" windowWidth="18195" windowHeight="7995" /></bookViews><sheets># for (var idx = 0; idx < sheets.length; idx++) { ## var options = sheets[idx].options; ## var name = options.name || options.title ## if (name) { #<sheet name="${name}" sheetId="${idx+1}" r:id="rId${idx+1}" /># } else { #<sheet name="Sheet${idx+1}" sheetId="${idx+1}" r:id="rId${idx+1}" /># } ## } #</sheets># if (definedNames.length) { #<definedNames> # for (var di = 0; di < definedNames.length; di++) { #<definedName name="_xlnm._FilterDatabase" hidden="1" localSheetId="${definedNames[di].localSheetId}">${definedNames[di].name}!$${definedNames[di].from}:$${definedNames[di].to}</definedName> # } #</definedNames># } #<calcPr calcId="145621" /></workbook>'),
                v = t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" mc:Ignorable="x14ac"><dimension ref="A1" /><sheetViews><sheetView #if(index==0) {# tabSelected="1" #}# workbookViewId="0"># if (frozenRows || frozenColumns) { #<pane state="frozen"# if (frozenColumns) { # xSplit="${frozenColumns}"# } ## if (frozenRows) { # ySplit="${frozenRows}"# } # topLeftCell="${String.fromCharCode(65 + (frozenColumns || 0))}${(frozenRows || 0)+1}"/># } #</sheetView></sheetViews><sheetFormatPr x14ac:dyDescent="0.25" defaultRowHeight="#= defaults.rowHeight ? defaults.rowHeight * 0.75 : 15 #" # if (defaults.columnWidth) { # defaultColWidth="#= kendo.ooxml.toWidth(defaults.columnWidth) #" # } # /># if (columns && columns.length > 0) { #<cols># for (var ci = 0; ci < columns.length; ci++) { ## var column = columns[ci]; ## var columnIndex = typeof column.index === "number" ? column.index + 1 : (ci + 1); ## if (column.width) { #<col min="${columnIndex}" max="${columnIndex}" customWidth="1"# if (column.autoWidth) { # width="${((column.width*7+5)/7*256)/256}" bestFit="1"# } else { # width="#= kendo.ooxml.toWidth(column.width) #" # } #/># } ## } #</cols># } #<sheetData># for (var ri = 0; ri < data.length; ri++) { ## var row = data[ri]; ## var rowIndex = typeof row.index === "number" ? row.index + 1 : (ri + 1); #<row r="${rowIndex}" x14ac:dyDescent="0.25" # if (row.height) { # ht="#= kendo.ooxml.toHeight(row.height) #" customHeight="1" # } # ># for (var ci = 0; ci < row.data.length; ci++) { ## var cell = row.data[ci];#<c r="#=cell.ref#"# if (cell.style) { # s="#=cell.style#" # } ## if (cell.type) { # t="#=cell.type#"# } #># if (cell.formula != null) { #<f>${cell.formula}</f># } ## if (cell.value != null) { #<v>${cell.value}</v># } #</c># } #</row># } #</sheetData># if (filter) { #<autoFilter ref="${filter.from}:${filter.to}"/># } ## if (mergeCells.length) { #<mergeCells count="${mergeCells.length}"># for (var ci = 0; ci < mergeCells.length; ci++) { #<mergeCell ref="${mergeCells[ci]}"/># } #</mergeCells># } #<pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3" /></worksheet>'),
                _ = t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"># for (var idx = 1; idx <= count; idx++) { #<Relationship Id="rId${idx}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${idx}.xml" /># } #<Relationship Id="rId${count+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" /><Relationship Id="rId${count+2}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" /></Relationships>'),
                b = t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="${count}" uniqueCount="${uniqueCount}"># for (var index in indexes) { #<si><t>${index.substring(1)}</t></si># } #</sst>'),
                w = t.template('<?xml version="1.0" encoding="UTF-8"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><numFmts count="${formats.length}"># for (var fi = 0; fi < formats.length; fi++) { ## var format = formats[fi]; #<numFmt formatCode="${format.format}" numFmtId="${165+fi}" /># } #</numFmts><fonts count="${fonts.length+1}" x14ac:knownFonts="1"><font><sz val="11" /><color theme="1" /><name val="Calibri" /><family val="2" /><scheme val="minor" /></font># for (var fi = 0; fi < fonts.length; fi++) { ## var font = fonts[fi]; #<font># if (font.fontSize) { #<sz val="${font.fontSize}" /># } else { #<sz val="11" /># } ## if (font.bold) { #<b/># } ## if (font.italic) { #<i/># } ## if (font.underline) { #<u/># } ## if (font.color) { #<color rgb="${font.color}" /># } else { #<color theme="1" /># } ## if (font.fontFamily) { #<name val="${font.fontFamily}" /><family val="2" /># } else { #<name val="Calibri" /><family val="2" /><scheme val="minor" /># } #</font># } #</fonts><fills count="${fills.length+2}"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill># for (var fi = 0; fi < fills.length; fi++) { ## var fill = fills[fi]; ## if (fill.background) { #<fill><patternFill patternType="solid"><fgColor rgb="${fill.background}"/></patternFill></fill># } ## } #</fills><borders count="${borders.length+1}"><border><left/><right/><top/><bottom/><diagonal/></border># for (var bi = 0; bi < borders.length; bi++) { ##= kendo.ooxml.borderTemplate(borders[bi]) ## } #</borders><cellStyleXfs count="1"><xf borderId="0" fillId="0" fontId="0" /></cellStyleXfs><cellXfs count="${styles.length+1}"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/># for (var si = 0; si < styles.length; si++) { ## var style = styles[si]; #<xf xfId="0"# if (style.fontId) { # fontId="${style.fontId}" applyFont="1"# } ## if (style.fillId) { # fillId="${style.fillId}" applyFill="1"# } ## if (style.numFmtId) { # numFmtId="${style.numFmtId}" applyNumberFormat="1"# } ## if (style.textAlign || style.verticalAlign || style.wrap) { # applyAlignment="1"# } ## if (style.borderId) { # borderId="${style.borderId}" applyBorder="1"# } #># if (style.textAlign || style.verticalAlign || style.wrap) { #<alignment# if (style.textAlign) { # horizontal="${style.textAlign}"# } ## if (style.verticalAlign) { # vertical="${style.verticalAlign}"# } ## if (style.wrap) { # wrapText="1"# } #/># } #</xf># } #</cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles><dxfs count="0" /><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleMedium9" /></styleSheet>'),
                y = new Date(1900, 0, 0),
                k = t.Class.extend({
                    init: function(e, t, n, i) {
                        this.options = e, this._strings = t, this._styles = n, this._borders = i
                    },
                    toXML: function(e) {
                        var t, n, r, a, s, l;
                        for (this._mergeCells = this.options.mergedCells || [], this._rowsByIndex = [], t = this.options.rows || [], n = 0; t.length > n; n++) r = t[n].index, "number" != typeof r && (r = n), t[n].index = r, this._rowsByIndex[r] = t[n];
                        for (a = [], n = 0; t.length > n; n++) a.push(this._row(t[n], n));
                        return a.sort(function(e, t) {
                            return e.index - t.index
                        }), s = this.options.filter, s && "number" == typeof s.from && "number" == typeof s.to && (s = {
                            from: i(o(this.options), s.from),
                            to: i(o(this.options), s.to)
                        }), l = this.options.freezePane || {}, v({
                            frozenColumns: this.options.frozenColumns || l.colSplit,
                            frozenRows: this.options.frozenRows || l.rowSplit,
                            columns: this.options.columns,
                            defaults: this.options.defaults || {},
                            data: a,
                            index: e,
                            mergeCells: this._mergeCells,
                            filter: s
                        })
                    },
                    _row: function(t) {
                        var n = [],
                            i = 0,
                            r = this,
                            o = {};
                        return e.each(t.cells, function(a, s) {
                            var l, c;
                            s && ("number" == typeof s.index ? (l = s.index, i = l - a) : l = a + i, s.colSpan && (i += s.colSpan - 1), c = r._cell(s, t.index, l), e.each(c, function(e, t) {
                                o[t.ref] || (o[t.ref] = !0, n.push(t))
                            }))
                        }), {
                            data: n,
                            height: t.height,
                            index: t.index
                        }
                    },
                    _lookupString: function(e) {
                        var t = "$" + e,
                            n = this._strings.indexes[t];
                        return void 0 !== n ? e = n : (e = this._strings.indexes[t] = this._strings.uniqueCount, this._strings.uniqueCount++), this._strings.count++, e
                    },
                    _lookupStyle: function(n) {
                        var i, r = t.stringify(n);
                        return "{}" == r ? 0 : (i = e.inArray(r, this._styles), 0 > i && (i = this._styles.push(r) - 1), i + 1)
                    },
                    _lookupBorder: function(n) {
                        var i, r = t.stringify(n);
                        if ("{}" != r) return i = e.inArray(r, this._borders), 0 > i && (i = this._borders.push(r) - 1), i + 1
                    },
                    _cell: function(e, n, r) {
                        var o, a, s, l, c, d, u, h, f, p, m, g, v, _;
                        if (!e) return [];
                        if (o = e.value, a = {}, e.borderLeft && (a.left = e.borderLeft), e.borderRight && (a.right = e.borderRight), e.borderTop && (a.top = e.borderTop), e.borderBottom && (a.bottom = e.borderBottom), a = this._lookupBorder(a), s = {
                            bold: e.bold,
                            color: e.color,
                            background: e.background,
                            italic: e.italic,
                            underline: e.underline,
                            fontFamily: e.fontFamily || e.fontName,
                            fontSize: e.fontSize,
                            format: e.format,
                            textAlign: e.textAlign || e.hAlign,
                            verticalAlign: e.verticalAlign || e.vAlign,
                            wrap: e.wrap,
                            borderId: a
                        }, l = this.options.columns || [], c = l[r], d = typeof o, c && c.autoWidth && (u = o, "number" === d && (u = t.toString(o, e.format)), c.width = Math.max(c.width || 0, (u + "").length)), "string" === d ? (o = this._lookupString(o), d = "s") : "number" === d ? d = "n" : "boolean" === d ? (d = "b", o = +o) : o && o.getTime ? (d = null, h = (o.getTimezoneOffset() - y.getTimezoneOffset()) * t.date.MS_PER_MINUTE, o = (o - y - h) / t.date.MS_PER_DAY + 1, s.format || (s.format = "mm-dd-yy")) : (d = null, o = null), s = this._lookupStyle(s), f = [], p = i(n, r), f.push({
                            value: o,
                            formula: e.formula,
                            type: d,
                            style: s,
                            ref: p
                        }), m = e.colSpan || 1, g = e.rowSpan || 1, m > 1 || g > 1) {
                            for (this._mergeCells.push(p + ":" + i(n + g - 1, r + m - 1)), _ = n + 1; n + g > _; _++)
                                for (this._rowsByIndex[_] || (this._rowsByIndex[_] = {
                                    index: _,
                                    cells: []
                                }), v = r; r + m > v; v++) this._rowsByIndex[_].cells.splice(v, 0, {});
                            for (v = r + 1; r + m > v; v++) f.push({
                                ref: i(n, v)
                            })
                        }
                        return f
                    }
                }),
                x = {
                    General: 0,
                    0: 1,
                    "0.00": 2,
                    "#,##0": 3,
                    "#,##0.00": 4,
                    "0%": 9,
                    "0.00%": 10,
                    "0.00E+00": 11,
                    "# ?/?": 12,
                    "# ??/??": 13,
                    "mm-dd-yy": 14,
                    "d-mmm-yy": 15,
                    "d-mmm": 16,
                    "mmm-yy": 17,
                    "h:mm AM/PM": 18,
                    "h:mm:ss AM/PM": 19,
                    "h:mm": 20,
                    "h:mm:ss": 21,
                    "m/d/yy h:mm": 22,
                    "#,##0 ;(#,##0)": 37,
                    "#,##0 ;[Red](#,##0)": 38,
                    "#,##0.00;(#,##0.00)": 39,
                    "#,##0.00;[Red](#,##0.00)": 40,
                    "mm:ss": 45,
                    "[h]:mm:ss": 46,
                    "mmss.0": 47,
                    "##0.0E+0": 48,
                    "@": 49,
                    "[$-404]e/m/d": 27,
                    "m/d/yy": 30,
                    t0: 59,
                    "t0.00": 60,
                    "t#,##0": 61,
                    "t#,##0.00": 62,
                    "t0%": 67,
                    "t0.00%": 68,
                    "t# ?/?": 69,
                    "t# ??/??": 70
                },
                C = t.Class.extend({
                    init: function(t) {
                        this.options = t || {}, this._strings = {
                            indexes: {},
                            count: 0,
                            uniqueCount: 0
                        }, this._styles = [], this._borders = [], this._sheets = e.map(this.options.sheets || [], e.proxy(function(e) {
                            return e.defaults = this.options, new k(e, this._strings, this._styles, this._borders)
                        }, this))
                    },
                    toDataURL: function() {
                        var n, i, a, s, c, d, u, v, y, k, C, S, T, D;
                        if ("undefined" == typeof JSZip) throw Error("JSZip not found. Check http://docs.telerik.com/kendo-ui/framework/excel/introduction#requirements for more details.");
                        for (n = new JSZip, i = n.folder("docProps"), i.file("core.xml", f({
                            creator: this.options.creator || "Kendo UI",
                            lastModifiedBy: this.options.creator || "Kendo UI",
                            created: this.options.date || (new Date).toJSON(),
                            modified: this.options.date || (new Date).toJSON()
                        })), a = this._sheets.length, i.file("app.xml", p({
                            sheets: this._sheets
                        })), s = n.folder("_rels"), s.file(".rels", h), c = n.folder("xl"), d = c.folder("_rels"), d.file("workbook.xml.rels", _({
                            count: a
                        })), c.file("workbook.xml", g({
                            sheets: this._sheets,
                            definedNames: e.map(this._sheets, function(e, t) {
                                var n = e.options,
                                    i = n.filter;
                                return i && void 0 !== i.from && void 0 !== i.to ? {
                                    localSheetId: t,
                                    name: n.name || n.title || "Sheet" + (t + 1),
                                    from: r(o(n), i.from),
                                    to: r(o(n), i.to)
                                } : void 0
                            })
                        })), u = c.folder("worksheets"), v = 0; a > v; v++) u.file(t.format("sheet{0}.xml", v + 1), this._sheets[v].toXML(v));
                        return y = e.map(this._borders, e.parseJSON), k = e.map(this._styles, e.parseJSON), C = function(e) {
                            return e.underline || e.bold || e.italic || e.color || e.fontFamily || e.fontSize
                        }, S = e.map(k, function(e) {
                            return e.color && (e.color = l(e.color)), C(e) ? e : void 0
                        }), T = e.map(k, function(e) {
                            return e.format && void 0 === x[e.format] ? e : void 0
                        }), D = e.map(k, function(e) {
                            return e.background ? (e.background = l(e.background), e) : void 0
                        }), c.file("styles.xml", w({
                            fonts: S,
                            fills: D,
                            formats: T,
                            borders: y,
                            styles: e.map(k, function(t) {
                                var n = {};
                                return C(t) && (n.fontId = e.inArray(t, S) + 1), t.background && (n.fillId = e.inArray(t, D) + 2), n.textAlign = t.textAlign, n.verticalAlign = t.verticalAlign, n.wrap = t.wrap, n.borderId = t.borderId, t.format && (n.numFmtId = void 0 !== x[t.format] ? x[t.format] : 165 + e.inArray(t, T)), n
                            })
                        })), c.file("sharedStrings.xml", b(this._strings)), n.file("[Content_Types].xml", m({
                            count: a
                        })), "data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64," + n.generate({
                            compression: "DEFLATE"
                        })
                    }
                });
            t.ooxml = {
                Workbook: C,
                Worksheet: k,
                toWidth: a,
                toHeight: s,
                borderTemplate: u
            }
        }(kendo.jQuery, kendo), kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.excel.min", ["kendo.core.min", "kendo.data.min", "kendo.ooxml.min"], e)
    }(function() {
        return function(e, t) {
            t.ExcelExporter = t.Class.extend({
                init: function(n) {
                    var i, r, o;
                    n.columns = this._trimColumns(n.columns || []), this.allColumns = e.map(this._leafColumns(n.columns || []), this._prepareColumn), this.columns = e.grep(this.allColumns, function(e) {
                        return !e.hidden
                    }), this.options = n, i = n.dataSource, i instanceof t.data.DataSource ? (this.dataSource = new i.constructor(e.extend({}, i.options, {
                        page: n.allPages ? 0 : i.page(),
                        filter: i.filter(),
                        pageSize: n.allPages ? i.total() : i.pageSize(),
                        sort: i.sort(),
                        group: i.group(),
                        aggregate: i.aggregate()
                    })), r = i.data(), r.length > 0 && (this.dataSource._data = r, o = this.dataSource.transport, i._isServerGrouped() && o.options.data && (o.options.data = null))) : this.dataSource = t.data.DataSource.create(i)
                },
                _trimColumns: function(t) {
                    var n = this;
                    return e.grep(t, function(e) {
                        var t = !!e.field;
                        return !t && e.columns && (t = n._trimColumns(e.columns).length > 0), t
                    })
                },
                _leafColumns: function(e) {
                    var t, n = [];
                    for (t = 0; e.length > t; t++) e[t].columns ? n = n.concat(this._leafColumns(e[t].columns)) : n.push(e[t]);
                    return n
                },
                workbook: function() {
                    return e.Deferred(e.proxy(function(t) {
                        this.dataSource.fetch().then(e.proxy(function() {
                            var e = {
                                sheets: [{
                                    columns: this._columns(),
                                    rows: this._rows(),
                                    freezePane: this._freezePane(),
                                    filter: this._filter()
                                }]
                            };
                            t.resolve(e, this.dataSource.view())
                        }, this))
                    }, this)).promise()
                },
                _prepareColumn: function(n) {
                    var i, r;
                    if (n.field) return i = function(e) {
                        return e.get(n.field)
                    }, r = null, n.values && (r = {}, e.each(n.values, function() {
                        r[this.value] = this.text
                    }), i = function(e) {
                        return r[e.get(n.field)]
                    }), e.extend({}, n, {
                        value: i,
                        values: r,
                        groupHeaderTemplate: t.template(n.groupHeaderTemplate || "#= title #: #= value #"),
                        groupFooterTemplate: n.groupFooterTemplate ? t.template(n.groupFooterTemplate) : null,
                        footerTemplate: n.footerTemplate ? t.template(n.footerTemplate) : null
                    })
                },
                _filter: function() {
                    if (!this.options.filterable) return null;
                    var e = this._depth();
                    return {
                        from: e,
                        to: e + this.columns.length - 1
                    }
                },
                _dataRow: function(t, n, i) {
                    var r, o, a, s, l, c, d, u, h, f;
                    for (this._hierarchical() && (n = this.dataSource.level(t) + 1), r = [], o = 0; n > o; o++) r[o] = {
                        background: "#dfdfdf",
                        color: "#333"
                    };
                    if (i && t.items) return a = e.grep(this.allColumns, function(e) {
                        return e.field == t.field
                    })[0], s = a && a.title ? a.title : t.field, l = a ? a.groupHeaderTemplate : null, c = s + ": " + t.value, d = e.extend({
                        title: s,
                        field: t.field,
                        value: a && a.values ? a.values[t.value] : t.value,
                        aggregates: t.aggregates
                    }, t.aggregates[t.field]), l && (c = l(d)), r.push({
                        value: c,
                        background: "#dfdfdf",
                        color: "#333",
                        colSpan: this.columns.length + i - n
                    }), u = this._dataRows(t.items, n + 1), u.unshift({
                        type: "group-header",
                        cells: r
                    }), u.concat(this._footer(t));
                    for (h = [], f = 0; this.columns.length > f; f++) h[f] = this._cell(t, this.columns[f]);
                    return this._hierarchical() && (h[0].colSpan = i - n + 1), [{
                        type: "data",
                        cells: r.concat(h)
                    }]
                },
                _dataRows: function(e, t) {
                    var n, i = this._depth(),
                        r = [];
                    for (n = 0; e.length > n; n++) r.push.apply(r, this._dataRow(e[n], t, i));
                    return r
                },
                _footer: function(t) {
                    var n = [],
                        i = !1,
                        r = e.map(this.columns, e.proxy(function(n) {
                            return n.groupFooterTemplate ? (i = !0, {
                                background: "#dfdfdf",
                                color: "#333",
                                value: n.groupFooterTemplate(e.extend({}, this.dataSource.aggregates(), t.aggregates, t.aggregates[n.field]))
                            }) : {
                                background: "#dfdfdf",
                                color: "#333"
                            }
                        }, this));
                    return i && n.push({
                        type: "group-footer",
                        cells: e.map(Array(this.dataSource.group().length), function() {
                            return {
                                background: "#dfdfdf",
                                color: "#333"
                            }
                        }).concat(r)
                    }), n
                },
                _isColumnVisible: function(e) {
                    return this._visibleColumns([e]).length > 0 && (e.field || e.columns)
                },
                _visibleColumns: function(t) {
                    var n = this;
                    return e.grep(t, function(e) {
                        var t = !e.hidden;
                        return t && e.columns && (t = n._visibleColumns(e.columns).length > 0), t
                    })
                },
                _headerRow: function(t, n) {
                    var i = e.map(t.cells, function(e) {
                        return {
                            background: "#7a7a7a",
                            color: "#fff",
                            value: e.title,
                            colSpan: e.colSpan > 1 ? e.colSpan : 1,
                            rowSpan: t.rowSpan > 1 && !e.colSpan ? t.rowSpan : 1
                        }
                    });
                    return this._hierarchical() && (i[0].colSpan = this._depth() + 1), {
                        type: "header",
                        cells: e.map(Array(n.length), function() {
                            return {
                                background: "#7a7a7a",
                                color: "#fff"
                            }
                        }).concat(i)
                    }
                },
                _prependHeaderRows: function(e) {
                    var t, n = this.dataSource.group(),
                        i = [{
                            rowSpan: 1,
                            cells: [],
                            index: 0
                        }];
                    for (this._prepareHeaderRows(i, this.options.columns), t = i.length - 1; t >= 0; t--) e.unshift(this._headerRow(i[t], n))
                },
                _prepareHeaderRows: function(e, t, n, i) {
                    var r, o, a, s = i || e[e.length - 1],
                        l = e[s.index + 1],
                        c = 0;
                    for (a = 0; t.length > a; a++) r = t[a], this._isColumnVisible(r) && (o = {
                        title: r.title || r.field,
                        colSpan: 0
                    }, s.cells.push(o), r.columns && r.columns.length && (l || (l = {
                        rowSpan: 0,
                        cells: [],
                        index: e.length
                    }, e.push(l)), o.colSpan = this._trimColumns(this._visibleColumns(r.columns)).length, this._prepareHeaderRows(e, r.columns, o, l), c += o.colSpan - 1, s.rowSpan = e.length - s.index));
                    n && (n.colSpan += c)
                },
                _rows: function() {
                    var t, n, i = this.dataSource.group(),
                        r = this._dataRows(this.dataSource.view(), 0);
                    return this.columns.length && (this._prependHeaderRows(r), t = !1, n = e.map(this.columns, e.proxy(function(n) {
                        if (n.footerTemplate) {
                            t = !0;
                            var i = this.dataSource.aggregates();
                            return {
                                background: "#dfdfdf",
                                color: "#333",
                                value: n.footerTemplate(e.extend({}, i, i[n.field]))
                            }
                        }
                        return {
                            background: "#dfdfdf",
                            color: "#333"
                        }
                    }, this)), t && r.push({
                        type: "footer",
                        cells: e.map(Array(i.length), function() {
                            return {
                                background: "#dfdfdf",
                                color: "#333"
                            }
                        }).concat(n)
                    })), r
                },
                _headerDepth: function(e) {
                    var t, n, i = 1,
                        r = 0;
                    for (t = 0; e.length > t; t++) e[t].columns && (n = this._headerDepth(e[t].columns), n > r && (r = n));
                    return i + r
                },
                _freezePane: function() {
                    var t = this._visibleColumns(this.options.columns || []),
                        n = this._visibleColumns(this._trimColumns(this._leafColumns(e.grep(t, function(e) {
                            return e.locked
                        })))).length;
                    return {
                        rowSplit: this._headerDepth(t),
                        colSplit: n ? n + this.dataSource.group().length : 0
                    }
                },
                _cell: function(e, t) {
                    return {
                        value: t.value(e)
                    }
                },
                _hierarchical: function() {
                    return this.options.hierarchy && this.dataSource.level
                },
                _depth: function() {
                    var e, t, n, i = this.dataSource,
                        r = 0;
                    if (this._hierarchical()) {
                        for (e = i.view(), t = 0; e.length > t; t++) n = i.level(e[t]), n > r && (r = n);
                        r++
                    } else r = i.group().length;
                    return r
                },
                _columns: function() {
                    var t = this._depth(),
                        n = e.map(Array(t), function() {
                            return {
                                width: 20
                            }
                        });
                    return n.concat(e.map(this.columns, function(e) {
                        return {
                            width: parseInt(e.width, 10),
                            autoWidth: e.width ? !1 : !0
                        }
                    }))
                }
            }), t.ExcelMixin = {
                extend: function(t) {
                    t.events.push("excelExport"), t.options.excel = e.extend(t.options.excel, this.options), t.saveAsExcel = this.saveAsExcel
                },
                options: {
                    proxyURL: "",
                    allPages: !1,
                    filterable: !1,
                    fileName: "Export.xlsx"
                },
                saveAsExcel: function() {
                    var n = this.options.excel || {},
                        i = new t.ExcelExporter({
                            columns: this.columns,
                            dataSource: this.dataSource,
                            allPages: n.allPages,
                            filterable: n.filterable,
                            hierarchy: n.hierarchy
                        });
                    i.workbook().then(e.proxy(function(e, i) {
                        if (!this.trigger("excelExport", {
                            workbook: e,
                            data: i
                        })) {
                            var r = new t.ooxml.Workbook(e);
                            t.saveAs({
                                dataURI: r.toDataURL(),
                                fileName: e.fileName || n.fileName,
                                proxyURL: n.proxyURL,
                                forceProxy: n.forceProxy
                            })
                        }
                    }, this))
                }
            }
        }(kendo.jQuery, kendo), kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.data.signalr.min", ["kendo.data.min"], e)
    }(function() {
        return function(e) {
            var t = kendo.data.RemoteTransport.extend({
                init: function(e) {
                    var t, n = e && e.signalr ? e.signalr : {},
                        i = n.promise;
                    if (!i) throw Error('The "promise" option must be set.');
                    if ("function" != typeof i.done || "function" != typeof i.fail) throw Error('The "promise" option must be a Promise.');
                    if (this.promise = i, t = n.hub, !t) throw Error('The "hub" option must be set.');
                    if ("function" != typeof t.on || "function" != typeof t.invoke) throw Error('The "hub" option is not a valid SignalR hub proxy.');
                    this.hub = t, kendo.data.RemoteTransport.fn.init.call(this, e)
                },
                push: function(e) {
                    var t = this.options.signalr.client || {};
                    t.create && this.hub.on(t.create, e.pushCreate), t.update && this.hub.on(t.update, e.pushUpdate), t.destroy && this.hub.on(t.destroy, e.pushDestroy)
                },
                _crud: function(t, n) {
                    var i, r, o = this.hub,
                        a = this.options.signalr.server;
                    if (!a || !a[n]) throw Error(kendo.format('The "server.{0}" option must be set.', n));
                    i = [a[n]], r = this.parameterMap(t.data, n), e.isEmptyObject(r) || i.push(r), this.promise.done(function() {
                        o.invoke.apply(o, i).done(t.success).fail(t.error)
                    })
                },
                read: function(e) {
                    this._crud(e, "read")
                },
                create: function(e) {
                    this._crud(e, "create")
                },
                update: function(e) {
                    this._crud(e, "update")
                },
                destroy: function(e) {
                    this._crud(e, "destroy")
                }
            });
            e.extend(!0, kendo.data, {
                transports: {
                    signalr: t
                }
            })
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.color.min", ["kendo.core.min"], e)
    }(function() {
        ! function(e, t, n) {
            function i(e, r) {
                var o, s;
                if (null == e || "none" == e) return null;
                if (e instanceof l) return e;
                if (e = e.toLowerCase(), o = a.exec(e)) return e = "transparent" == o[1] ? new c(1, 1, 1, 0) : i(f.namedColors[o[1]], r), e.match = [o[1]], e;
                if ((o = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(e)) ? s = new d(n(o[1], 16), n(o[2], 16), n(o[3], 16), 1) : (o = /^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(e)) ? s = new d(n(o[1] + o[1], 16), n(o[2] + o[2], 16), n(o[3] + o[3], 16), 1) : (o = /^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(e)) ? s = new d(n(o[1], 10), n(o[2], 10), n(o[3], 10), 1) : (o = /^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(e)) ? s = new d(n(o[1], 10), n(o[2], 10), n(o[3], 10), t(o[4])) : (o = /^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(e)) ? s = new c(t(o[1]) / 100, t(o[2]) / 100, t(o[3]) / 100, 1) : (o = /^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(e)) && (s = new c(t(o[1]) / 100, t(o[2]) / 100, t(o[3]) / 100, t(o[4]))), s) s.match = o;
                else if (!r) throw Error("Cannot parse color: " + e);
                return s
            }

            function r(e, t, n) {
                for (n || (n = "0"), e = e.toString(16); t > e.length;) e = "0" + e;
                return e
            }

            function o(e, t, n) {
                return 0 > n && (n += 1), n > 1 && (n -= 1), 1 / 6 > n ? e + 6 * (t - e) * n : .5 > n ? t : 2 / 3 > n ? e + (t - e) * (2 / 3 - n) * 6 : e
            }
            var a, s, l, c, d, u, h, f = function(e) {
                var t, n, i, r, o, a = this,
                    s = f.formats;
                if (1 === arguments.length)
                    for (e = a.resolveColor(e), r = 0; s.length > r; r++) t = s[r].re, n = s[r].process, i = t.exec(e), i && (o = n(i), a.r = o[0], a.g = o[1], a.b = o[2]);
                else a.r = arguments[0], a.g = arguments[1], a.b = arguments[2];
                a.r = a.normalizeByte(a.r), a.g = a.normalizeByte(a.g), a.b = a.normalizeByte(a.b)
            };
            f.prototype = {
                toHex: function() {
                    var e = this,
                        t = e.padDigit,
                        n = e.r.toString(16),
                        i = e.g.toString(16),
                        r = e.b.toString(16);
                    return "#" + t(n) + t(i) + t(r)
                },
                resolveColor: function(e) {
                    return e = e || "black", "#" == e.charAt(0) && (e = e.substr(1, 6)), e = e.replace(/ /g, ""), e = e.toLowerCase(), e = f.namedColors[e] || e
                },
                normalizeByte: function(e) {
                    return 0 > e || isNaN(e) ? 0 : e > 255 ? 255 : e
                },
                padDigit: function(e) {
                    return 1 === e.length ? "0" + e : e
                },
                brightness: function(e) {
                    var t = this,
                        n = Math.round;
                    return t.r = n(t.normalizeByte(t.r * e)), t.g = n(t.normalizeByte(t.g * e)), t.b = n(t.normalizeByte(t.b * e)), t
                },
                percBrightness: function() {
                    var e = this;
                    return Math.sqrt(.241 * e.r * e.r + .691 * e.g * e.g + .068 * e.b * e.b)
                }
            }, f.formats = [{
                re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
                process: function(e) {
                    return [n(e[1], 10), n(e[2], 10), n(e[3], 10)]
                }
            }, {
                re: /^(\w{2})(\w{2})(\w{2})$/,
                process: function(e) {
                    return [n(e[1], 16), n(e[2], 16), n(e[3], 16)]
                }
            }, {
                re: /^(\w{1})(\w{1})(\w{1})$/,
                process: function(e) {
                    return [n(e[1] + e[1], 16), n(e[2] + e[2], 16), n(e[3] + e[3], 16)]
                }
            }], f.namedColors = {
                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",
                darkgrey: "a9a9a9",
                darkgreen: "006400",
                darkkhaki: "bdb76b",
                darkmagenta: "8b008b",
                darkolivegreen: "556b2f",
                darkorange: "ff8c00",
                darkorchid: "9932cc",
                darkred: "8b0000",
                darksalmon: "e9967a",
                darkseagreen: "8fbc8f",
                darkslateblue: "483d8b",
                darkslategray: "2f4f4f",
                darkslategrey: "2f4f4f",
                darkturquoise: "00ced1",
                darkviolet: "9400d3",
                deeppink: "ff1493",
                deepskyblue: "00bfff",
                dimgray: "696969",
                dimgrey: "696969",
                dodgerblue: "1e90ff",
                firebrick: "b22222",
                floralwhite: "fffaf0",
                forestgreen: "228b22",
                fuchsia: "ff00ff",
                gainsboro: "dcdcdc",
                ghostwhite: "f8f8ff",
                gold: "ffd700",
                goldenrod: "daa520",
                gray: "808080",
                grey: "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",
                lightgray: "d3d3d3",
                lightgrey: "d3d3d3",
                lightgreen: "90ee90",
                lightpink: "ffb6c1",
                lightsalmon: "ffa07a",
                lightseagreen: "20b2aa",
                lightskyblue: "87cefa",
                lightslategray: "778899",
                lightslategrey: "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",
                slategrey: "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"
            }, a = ["transparent"];
            for (s in f.namedColors) f.namedColors.hasOwnProperty(s) && a.push(s);
            a = RegExp("^(" + a.join("|") + ")(\\W|$)", "i"), l = kendo.Class.extend({
                toHSV: function() {
                    return this
                },
                toRGB: function() {
                    return this
                },
                toHex: function() {
                    return this.toBytes().toHex()
                },
                toBytes: function() {
                    return this
                },
                toCss: function() {
                    return "#" + this.toHex()
                },
                toCssRgba: function() {
                    var e = this.toBytes();
                    return "rgba(" + e.r + ", " + e.g + ", " + e.b + ", " + t((+this.a).toFixed(3)) + ")"
                },
                toDisplay: function() {
                    return kendo.support.browser.msie && kendo.support.browser.version < 9 ? this.toCss() : this.toCssRgba()
                },
                equals: function(e) {
                    return e === this || null !== e && this.toCssRgba() == i(e).toCssRgba()
                },
                diff: function(e) {
                    if (null == e) return NaN;
                    var t = this.toBytes();
                    return e = e.toBytes(), Math.sqrt(Math.pow(.3 * (t.r - e.r), 2) + Math.pow(.59 * (t.g - e.g), 2) + Math.pow(.11 * (t.b - e.b), 2))
                },
                clone: function() {
                    var e = this.toBytes();
                    return e === this && (e = new d(e.r, e.g, e.b, e.a)), e
                }
            }), c = l.extend({
                init: function(e, t, n, i) {
                    this.r = e, this.g = t, this.b = n, this.a = i
                },
                toHSV: function() {
                    var e, t, n = this.r,
                        i = this.g,
                        r = this.b,
                        o = Math.min(n, i, r),
                        a = Math.max(n, i, r),
                        s = a,
                        l = a - o;
                    return 0 === l ? new u(0, 0, s, this.a) : (0 !== a ? (t = l / a, e = n == a ? (i - r) / l : i == a ? 2 + (r - n) / l : 4 + (n - i) / l, e *= 60, 0 > e && (e += 360)) : (t = 0, e = -1), new u(e, t, s, this.a))
                },
                toHSL: function() {
                    var e, t, n, i = this.r,
                        r = this.g,
                        o = this.b,
                        a = Math.max(i, r, o),
                        s = Math.min(i, r, o),
                        l = (a + s) / 2;
                    if (a == s) e = t = 0;
                    else {
                        switch (n = a - s, t = l > .5 ? n / (2 - a - s) : n / (a + s), a) {
                            case i:
                                e = (r - o) / n + (o > r ? 6 : 0);
                                break;
                            case r:
                                e = (o - i) / n + 2;
                                break;
                            case o:
                                e = (i - r) / n + 4
                        }
                        e *= 60, t *= 100, l *= 100
                    }
                    return new h(e, t, l, this.a)
                },
                toBytes: function() {
                    return new d(255 * this.r, 255 * this.g, 255 * this.b, this.a)
                }
            }), d = c.extend({
                init: function(e, t, n, i) {
                    this.r = Math.round(e), this.g = Math.round(t), this.b = Math.round(n), this.a = i
                },
                toRGB: function() {
                    return new c(this.r / 255, this.g / 255, this.b / 255, this.a)
                },
                toHSV: function() {
                    return this.toRGB().toHSV()
                },
                toHSL: function() {
                    return this.toRGB().toHSL()
                },
                toHex: function() {
                    return r(this.r, 2) + r(this.g, 2) + r(this.b, 2)
                },
                toBytes: function() {
                    return this
                }
            }), u = l.extend({
                init: function(e, t, n, i) {
                    this.h = e, this.s = t, this.v = n, this.a = i
                },
                toRGB: function() {
                    var e, t, n, i, r, o, a, s, l = this.h,
                        d = this.s,
                        u = this.v;
                    if (0 === d) t = n = i = u;
                    else switch (l /= 60, e = Math.floor(l), r = l - e, o = u * (1 - d), a = u * (1 - d * r), s = u * (1 - d * (1 - r)), e) {
                        case 0:
                            t = u, n = s, i = o;
                            break;
                        case 1:
                            t = a, n = u, i = o;
                            break;
                        case 2:
                            t = o, n = u, i = s;
                            break;
                        case 3:
                            t = o, n = a, i = u;
                            break;
                        case 4:
                            t = s, n = o, i = u;
                            break;
                        default:
                            t = u, n = o, i = a
                    }
                    return new c(t, n, i, this.a)
                },
                toHSL: function() {
                    return this.toRGB().toHSL()
                },
                toBytes: function() {
                    return this.toRGB().toBytes()
                }
            }), h = l.extend({
                init: function(e, t, n, i) {
                    this.h = e, this.s = t, this.l = n, this.a = i
                },
                toRGB: function() {
                    var e, t, n, i, r, a = this.h,
                        s = this.s,
                        l = this.l;
                    return 0 === s ? e = t = n = l : (a /= 360, s /= 100, l /= 100, i = .5 > l ? l * (1 + s) : l + s - l * s, r = 2 * l - i, e = o(r, i, a + 1 / 3), t = o(r, i, a), n = o(r, i, a - 1 / 3)), new c(e, t, n, this.a)
                },
                toHSV: function() {
                    return this.toRGB().toHSV()
                },
                toBytes: function() {
                    return this.toRGB().toBytes()
                }
            }), f.fromBytes = function(e, t, n, i) {
                return new d(e, t, n, null != i ? i : 1)
            }, f.fromRGB = function(e, t, n, i) {
                return new c(e, t, n, null != i ? i : 1)
            }, f.fromHSV = function(e, t, n, i) {
                return new u(e, t, n, null != i ? i : 1)
            }, f.fromHSL = function(e, t, n, i) {
                return new h(e, t, n, null != i ? i : 1)
            }, kendo.Color = f, kendo.parseColor = i
        }(window.kendo.jQuery, parseFloat, parseInt)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("util/main.min", ["kendo.core.min"], e)
    }(function() {
        return function() {
            function e(e) {
                return typeof e !== H
            }

            function t(e, t) {
                var i = n(t);
                return M.round(e * i) / i
            }

            function n(e) {
                return e ? M.pow(10, e) : 1
            }

            function i(e, t, n) {
                return M.max(M.min(e, n), t)
            }

            function r(e) {
                return e * z
            }

            function o(e) {
                return e / z
            }

            function a(e) {
                return "number" == typeof e && !isNaN(e)
            }

            function s(t, n) {
                return e(t) ? t : n
            }

            function l(e) {
                return e * e
            }

            function c(e) {
                var t, n = [];
                for (t in e) n.push(t + e[t]);
                return n.sort().join("")
            }

            function d(e) {
                var t, n = 2166136261;
                for (t = 0; e.length > t; ++t) n += (n << 1) + (n << 4) + (n << 7) + (n << 8) + (n << 24), n ^= e.charCodeAt(t);
                return n >>> 0
            }

            function u(e) {
                return d(c(e))
            }

            function h(e) {
                var t, n = e.length,
                    i = B,
                    r = L;
                for (t = 0; n > t; t++) r = M.max(r, e[t]), i = M.min(i, e[t]);
                return {
                    min: i,
                    max: r
                }
            }

            function f(e) {
                return h(e).min
            }

            function p(e) {
                return h(e).max
            }

            function m(e) {
                return v(e).min
            }

            function g(e) {
                return v(e).max
            }

            function v(e) {
                var t, n, i, r = B,
                    o = L;
                for (t = 0, n = e.length; n > t; t++) i = e[t], null !== i && isFinite(i) && (r = M.min(r, i), o = M.max(o, i));
                return {
                    min: r === B ? void 0 : r,
                    max: o === L ? void 0 : o
                }
            }

            function _(e) {
                return e ? e[e.length - 1] : void 0
            }

            function b(e, t) {
                return e.push.apply(e, t), e
            }

            function w(e) {
                return R.template(e, {
                    useWithBlock: !1,
                    paramName: "d"
                })
            }

            function y(t, n) {
                return e(n) && null !== n ? " " + t + "='" + n + "' " : ""
            }

            function k(e) {
                var t, n = "";
                for (t = 0; e.length > t; t++) n += y(e[t][0], e[t][1]);
                return n
            }

            function x(t) {
                var n, i, r = "";
                for (n = 0; t.length > n; n++) i = t[n][1], e(i) && (r += t[n][0] + ":" + i + ";");
                return "" !== r ? r : void 0
            }

            function C(e) {
                return "string" != typeof e && (e += "px"), e
            }

            function S(e) {
                var t, n, i = [];
                if (e)
                    for (t = R.toHyphens(e).split("-"), n = 0; t.length > n; n++) i.push("k-pos-" + t[n]);
                return i.join(" ")
            }

            function T(t) {
                return "" === t || null === t || "none" === t || "transparent" === t || !e(t)
            }

            function D(e) {
                for (var t = {
                    1: "i",
                    10: "x",
                    100: "c",
                    2: "ii",
                    20: "xx",
                    200: "cc",
                    3: "iii",
                    30: "xxx",
                    300: "ccc",
                    4: "iv",
                    40: "xl",
                    400: "cd",
                    5: "v",
                    50: "l",
                    500: "d",
                    6: "vi",
                    60: "lx",
                    600: "dc",
                    7: "vii",
                    70: "lxx",
                    700: "dcc",
                    8: "viii",
                    80: "lxxx",
                    800: "dccc",
                    9: "ix",
                    90: "xc",
                    900: "cm",
                    1e3: "m"
                }, n = [1e3, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1], i = ""; e > 0;) n[0] > e ? n.shift() : (i += t[n[0]], e -= n[0]);
                return i
            }

            function A(e) {
                var t, n, i, r, o;
                for (e = e.toLowerCase(), t = {
                    i: 1,
                    v: 5,
                    x: 10,
                    l: 50,
                    c: 100,
                    d: 500,
                    m: 1e3
                }, n = 0, i = 0, r = 0; e.length > r; ++r) {
                    if (o = t[e.charAt(r)], !o) return null;
                    n += o, o > i && (n -= 2 * i), i = o
                }
                return n
            }

            function E(e) {
                var t = Object.create(null);
                return function() {
                    var n, i = "";
                    for (n = arguments.length; --n >= 0;) i += ":" + arguments[n];
                    return i in t ? t[i] : e.apply(this, arguments)
                }
            }

            function F(e) {
                for (var t, n, i = [], r = 0, o = e.length; o > r;) t = e.charCodeAt(r++), t >= 55296 && 56319 >= t && o > r ? (n = e.charCodeAt(r++), 56320 == (64512 & n) ? i.push(((1023 & t) << 10) + (1023 & n) + 65536) : (i.push(t), r--)) : i.push(t);
                return i
            }

            function I(e) {
                return e.map(function(e) {
                    var t = "";
                    return e > 65535 && (e -= 65536, t += String.fromCharCode(e >>> 10 & 1023 | 55296), e = 56320 | 1023 & e), t += String.fromCharCode(e)
                }).join("")
            }
            var M = Math,
                R = window.kendo,
                P = R.deepExtend,
                z = M.PI / 180,
                B = Number.MAX_VALUE,
                L = -Number.MAX_VALUE,
                H = "undefined",
                N = Date.now;
            N || (N = function() {
                return (new Date).getTime()
            }), P(R, {
                util: {
                    MAX_NUM: B,
                    MIN_NUM: L,
                    append: b,
                    arrayLimits: h,
                    arrayMin: f,
                    arrayMax: p,
                    defined: e,
                    deg: o,
                    hashKey: d,
                    hashObject: u,
                    isNumber: a,
                    isTransparent: T,
                    last: _,
                    limitValue: i,
                    now: N,
                    objectKey: c,
                    round: t,
                    rad: r,
                    renderAttr: y,
                    renderAllAttr: k,
                    renderPos: S,
                    renderSize: C,
                    renderStyle: x,
                    renderTemplate: w,
                    sparseArrayLimits: v,
                    sparseArrayMin: m,
                    sparseArrayMax: g,
                    sqr: l,
                    valueOrDefault: s,
                    romanToArabic: A,
                    arabicToRoman: D,
                    memoize: E,
                    ucs2encode: I,
                    ucs2decode: F
                }
            }), R.drawing.util = R.util, R.dataviz.util = R.util
        }(), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("util/text-metrics.min", ["kendo.core.min", "util/main.min"], e)
    }(function() {
        ! function(e) {
            function t() {
                return {
                    width: 0,
                    height: 0,
                    baseline: 0
                }
            }

            function n(e, t, n) {
                return u.current.measure(e, t, n)
            }

            function i(e, t) {
                var n = [];
                if (e.length > 0 && document.fonts) {
                    try {
                        n = e.map(function(e) {
                            return document.fonts.load(e)
                        })
                    } catch (i) {
                        o.logToConsole(i)
                    }
                    Promise.all(n).then(t, t)
                } else t()
            }
            var r = document,
                o = window.kendo,
                a = o.Class,
                s = o.util,
                l = s.defined,
                c = a.extend({
                    init: function(e) {
                        this._size = e, this._length = 0, this._map = {}
                    },
                    put: function(e, t) {
                        var n = this,
                            i = n._map,
                            r = {
                                key: e,
                                value: t
                            };
                        i[e] = r, n._head ? (n._tail.newer = r, r.older = n._tail, n._tail = r) : n._head = n._tail = r, n._length >= n._size ? (i[n._head.key] = null, n._head = n._head.newer, n._head.older = null) : n._length++
                    },
                    get: function(e) {
                        var t = this,
                            n = t._map[e];
                        return n ? (n === t._head && n !== t._tail && (t._head = n.newer, t._head.older = null), n !== t._tail && (n.older && (n.older.newer = n.newer, n.newer.older = n.older), n.older = t._tail, n.newer = null, t._tail.newer = n, t._tail = n), n.value) : void 0
                    }
                }),
                d = e("<div style='position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: nowrap!important;' />")[0],
                u = a.extend({
                    init: function(e) {
                        this._cache = new c(1e3), this._initOptions(e)
                    },
                    options: {
                        baselineMarkerSize: 1
                    },
                    measure: function(n, i, o) {
                        var a, c, u, h, f, p, m, g;
                        if (!n) return t();
                        if (a = s.objectKey(i), c = s.hashKey(n + a), u = this._cache.get(c), u) return u;
                        h = t(), f = o ? o : d, p = this._baselineMarker().cloneNode(!1);
                        for (m in i) g = i[m], l(g) && (f.style[m] = g);
                        return e(f).text(n), f.appendChild(p), r.body.appendChild(f), (n + "").length && (h.width = f.offsetWidth - this.options.baselineMarkerSize, h.height = f.offsetHeight, h.baseline = p.offsetTop + this.options.baselineMarkerSize), h.width > 0 && h.height > 0 && this._cache.put(c, h), f.parentNode.removeChild(f), h
                    },
                    _baselineMarker: function() {
                        return e("<div class='k-baseline-marker' style='display: inline-block; vertical-align: baseline;width: " + this.options.baselineMarkerSize + "px; height: " + this.options.baselineMarkerSize + "px;overflow: hidden;' />")[0]
                    }
                });
            u.current = new u, o.util.TextMetrics = u, o.util.LRUCache = c, o.util.loadFonts = i, o.util.measureText = n
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("util/base64.min", ["util/main.min"], e)
    }(function() {
        return function() {
            function e(e) {
                var n, i, r, a, s, l, c, d = "",
                    u = 0;
                for (e = t(e); e.length > u;) n = e.charCodeAt(u++), i = e.charCodeAt(u++), r = e.charCodeAt(u++), a = n >> 2, s = (3 & n) << 4 | i >> 4, l = (15 & i) << 2 | r >> 6, c = 63 & r, isNaN(i) ? l = c = 64 : isNaN(r) && (c = 64), d = d + o.charAt(a) + o.charAt(s) + o.charAt(l) + o.charAt(c);
                return d
            }

            function t(e) {
                var t, n, i = "";
                for (t = 0; e.length > t; t++) n = e.charCodeAt(t), 128 > n ? i += r(n) : 2048 > n ? (i += r(192 | n >>> 6), i += r(128 | 63 & n)) : 65536 > n && (i += r(224 | n >>> 12), i += r(128 | n >>> 6 & 63), i += r(128 | 63 & n));
                return i
            }
            var n = window.kendo,
                i = n.deepExtend,
                r = String.fromCharCode,
                o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
            i(n.util, {
                encodeBase64: e,
                encodeUTF8: t
            })
        }(), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("mixins/observers.min", ["kendo.core.min"], e)
    }(function() {
        return function(e) {
            var t = Math,
                n = window.kendo,
                i = n.deepExtend,
                r = e.inArray,
                o = {
                    observers: function() {
                        return this._observers = this._observers || []
                    },
                    addObserver: function(e) {
                        return this._observers ? this._observers.push(e) : this._observers = [e], this
                    },
                    removeObserver: function(e) {
                        var t = this.observers(),
                            n = r(e, t);
                        return -1 != n && t.splice(n, 1), this
                    },
                    trigger: function(e, t) {
                        var n, i, r = this._observers;
                        if (r && !this._suspended)
                            for (i = 0; r.length > i; i++) n = r[i], n[e] && n[e](t);
                        return this
                    },
                    optionsChange: function(e) {
                        this.trigger("optionsChange", e)
                    },
                    geometryChange: function(e) {
                        this.trigger("geometryChange", e)
                    },
                    suspend: function() {
                        return this._suspended = (this._suspended || 0) + 1, this
                    },
                    resume: function() {
                        return this._suspended = t.max((this._suspended || 0) - 1, 0), this
                    },
                    _observerField: function(e, t) {
                        this[e] && this[e].removeObserver(this), this[e] = t, t.addObserver(this)
                    }
                };
            i(n, {
                mixins: {
                    ObserversMixin: o
                }
            })
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("drawing/geometry.min", ["util/main.min", "mixins/observers.min"], e)
    }(function() {
        return function() {
            function e(e) {
                return null === e ? null : e instanceof m ? e : new m(e)
            }

            function t(e) {
                return e && _.isFunction(e.matrix) ? e.matrix() : e
            }

            function n(e, t, n, i) {
                var r = 0,
                    o = 0;
                return i && (r = g.atan2(i.c * n, i.a * t), 0 !== i.b && (o = g.atan2(i.d * n, i.b * t))), {
                    x: r,
                    y: o
                }
            }

            function i(e, t) {
                for (; t > e;) e += 90;
                return e
            }

            function r(e, t) {
                var n, i, r;
                for (n = 0; t.length > n; n++) i = t[n], r = i.charAt(0).toUpperCase() + i.substring(1, i.length), e["set" + r] = o(i), e["get" + r] = a(i)
            }

            function o(e) {
                return function(t) {
                    return this[e] !== t && (this[e] = t, this.geometryChange()), this
                }
            }

            function a(e) {
                return function() {
                    return this[e]
                }
            }

            function s(e, t, n) {
                e > t && (t += 360);
                var i = g.abs(t - e);
                return n || (i = 360 - i), i
            }

            function l(e, t, n, i, r, o) {
                var a = T((r - e) / n, 3),
                    s = T((o - t) / i, 3);
                return T(S(g.atan2(s, a)))
            }

            function c(e, t, n, i, r, o, a, c) {
                var d, u, h, f, p, m, _, b, w, y, k, x, C, S, T, D, A, E;
                if (t !== i) w = n - e, y = i - t, k = v(r, 2), x = v(o, 2), C = (x * w * (e + n) + k * y * (t + i)) / (2 * k * y), S = C - i, T = -(w * x) / (k * y), p = 1 / k + v(T, 2) / x, m = 2 * (T * S / x - n / k), _ = v(n, 2) / k + v(S, 2) / x - 1, b = g.sqrt(v(m, 2) - 4 * p * _), d = (-m - b) / (2 * p), u = C + T * d, h = (-m + b) / (2 * p), f = C + T * h;
                else {
                    if (e === n) return !1;
                    m = -2 * i, _ = v((n - e) * o / (2 * r), 2) + v(i, 2) - v(o, 2), b = g.sqrt(v(m, 2) - 4 * _), d = h = (e + n) / 2, u = (-m - b) / 2, f = (-m + b) / 2
                }
                return D = l(d, u, r, o, e, t), A = l(d, u, r, o, n, i), E = s(D, A, c), (a && 180 >= E || !a && E > 180) && (d = h, u = f, D = l(d, u, r, o, e, t), A = l(d, u, r, o, n, i)), {
                    center: new F(d, u),
                    startAngle: D,
                    endAngle: A
                }
            }
            var d, u, h, f, p, m, g = Math,
                v = g.pow,
                _ = window.kendo,
                b = _.Class,
                w = _.deepExtend,
                y = _.mixins.ObserversMixin,
                k = _.util,
                x = k.defined,
                C = k.rad,
                S = k.deg,
                T = k.round,
                D = g.PI / 2,
                A = k.MIN_NUM,
                E = k.MAX_NUM,
                F = b.extend({
                    init: function(e, t) {
                        this.x = e || 0, this.y = t || 0
                    },
                    equals: function(e) {
                        return e && e.x === this.x && e.y === this.y
                    },
                    clone: function() {
                        return new F(this.x, this.y)
                    },
                    rotate: function(t, n) {
                        return this.transform(e().rotate(t, n))
                    },
                    translate: function(e, t) {
                        return this.x += e, this.y += t, this.geometryChange(), this
                    },
                    translateWith: function(e) {
                        return this.translate(e.x, e.y)
                    },
                    move: function(e, t) {
                        return this.x = this.y = 0, this.translate(e, t)
                    },
                    scale: function(e, t) {
                        return x(t) || (t = e), this.x *= e, this.y *= t, this.geometryChange(), this
                    },
                    scaleCopy: function(e, t) {
                        return this.clone().scale(e, t)
                    },
                    transform: function(e) {
                        var n = t(e),
                            i = this.x,
                            r = this.y;
                        return this.x = n.a * i + n.c * r + n.e, this.y = n.b * i + n.d * r + n.f, this.geometryChange(), this
                    },
                    transformCopy: function(e) {
                        var t = this.clone();
                        return e && t.transform(e), t
                    },
                    distanceTo: function(e) {
                        var t = this.x - e.x,
                            n = this.y - e.y;
                        return g.sqrt(t * t + n * n)
                    },
                    round: function(e) {
                        return this.x = T(this.x, e), this.y = T(this.y, e), this.geometryChange(), this
                    },
                    toArray: function(e) {
                        var t = x(e),
                            n = t ? T(this.x, e) : this.x,
                            i = t ? T(this.y, e) : this.y;
                        return [n, i]
                    }
                });
            r(F.fn, ["x", "y"]), w(F.fn, y), F.fn.toString = function(e, t) {
                var n = this.x,
                    i = this.y;
                return x(e) && (n = T(n, e), i = T(i, e)), t = t || " ", n + t + i
            }, F.create = function(e, t) {
                return x(e) ? e instanceof F ? e : 1 === arguments.length && 2 === e.length ? new F(e[0], e[1]) : new F(e, t) : void 0
            }, F.min = function() {
                var e, t, n = k.MAX_NUM,
                    i = k.MAX_NUM;
                for (e = 0; e < arguments.length; e++) t = arguments[e], n = g.min(t.x, n), i = g.min(t.y, i);
                return new F(n, i)
            }, F.max = function() {
                var e, t, n = k.MIN_NUM,
                    i = k.MIN_NUM;
                for (e = 0; e < arguments.length; e++) t = arguments[e], n = g.max(t.x, n), i = g.max(t.y, i);
                return new F(n, i)
            }, F.minPoint = function() {
                return new F(A, A)
            }, F.maxPoint = function() {
                return new F(E, E)
            }, F.ZERO = new F(0, 0), d = b.extend({
                init: function(e, t) {
                    this.width = e || 0, this.height = t || 0
                },
                equals: function(e) {
                    return e && e.width === this.width && e.height === this.height
                },
                clone: function() {
                    return new d(this.width, this.height)
                },
                toArray: function(e) {
                    var t = x(e),
                        n = t ? T(this.width, e) : this.width,
                        i = t ? T(this.height, e) : this.height;
                    return [n, i]
                }
            }), r(d.fn, ["width", "height"]), w(d.fn, y), d.create = function(e, t) {
                return x(e) ? e instanceof d ? e : 1 === arguments.length && 2 === e.length ? new d(e[0], e[1]) : new d(e, t) : void 0
            }, d.ZERO = new d(0, 0), u = b.extend({
                init: function(e, t) {
                    this.setOrigin(e || new F), this.setSize(t || new d)
                },
                clone: function() {
                    return new u(this.origin.clone(), this.size.clone())
                },
                equals: function(e) {
                    return e && e.origin.equals(this.origin) && e.size.equals(this.size)
                },
                setOrigin: function(e) {
                    return this._observerField("origin", F.create(e)), this.geometryChange(), this
                },
                getOrigin: function() {
                    return this.origin
                },
                setSize: function(e) {
                    return this._observerField("size", d.create(e)), this.geometryChange(), this
                },
                getSize: function() {
                    return this.size
                },
                width: function() {
                    return this.size.width
                },
                height: function() {
                    return this.size.height
                },
                topLeft: function() {
                    return this.origin.clone()
                },
                bottomRight: function() {
                    return this.origin.clone().translate(this.width(), this.height())
                },
                topRight: function() {
                    return this.origin.clone().translate(this.width(), 0)
                },
                bottomLeft: function() {
                    return this.origin.clone().translate(0, this.height())
                },
                center: function() {
                    return this.origin.clone().translate(this.width() / 2, this.height() / 2)
                },
                bbox: function(e) {
                    var t = this.topLeft().transformCopy(e),
                        n = this.topRight().transformCopy(e),
                        i = this.bottomRight().transformCopy(e),
                        r = this.bottomLeft().transformCopy(e);
                    return u.fromPoints(t, n, i, r)
                },
                transformCopy: function(e) {
                    return u.fromPoints(this.topLeft().transform(e), this.bottomRight().transform(e))
                }
            }), w(u.fn, y), u.fromPoints = function() {
                var e = F.min.apply(this, arguments),
                    t = F.max.apply(this, arguments),
                    n = new d(t.x - e.x, t.y - e.y);
                return new u(e, n)
            }, u.union = function(e, t) {
                return u.fromPoints(F.min(e.topLeft(), t.topLeft()), F.max(e.bottomRight(), t.bottomRight()))
            }, u.intersect = function(e, t) {
                return e = {
                    left: e.topLeft().x,
                    top: e.topLeft().y,
                    right: e.bottomRight().x,
                    bottom: e.bottomRight().y
                }, t = {
                    left: t.topLeft().x,
                    top: t.topLeft().y,
                    right: t.bottomRight().x,
                    bottom: t.bottomRight().y
                }, t.right >= e.left && e.right >= t.left && t.bottom >= e.top && e.bottom >= t.top ? u.fromPoints(new F(g.max(e.left, t.left), g.max(e.top, t.top)), new F(g.min(e.right, t.right), g.min(e.bottom, t.bottom))) : void 0
            }, h = b.extend({
                init: function(e, t) {
                    this.setCenter(e || new F), this.setRadius(t || 0)
                },
                setCenter: function(e) {
                    return this._observerField("center", F.create(e)), this.geometryChange(), this
                },
                getCenter: function() {
                    return this.center
                },
                equals: function(e) {
                    return e && e.center.equals(this.center) && e.radius === this.radius
                },
                clone: function() {
                    return new h(this.center.clone(), this.radius)
                },
                pointAt: function(e) {
                    return this._pointAt(C(e))
                },
                bbox: function(e) {
                    var t, i, r, o, a = F.maxPoint(),
                        s = F.minPoint(),
                        l = n(this.center, this.radius, this.radius, e);
                    for (t = 0; 4 > t; t++) i = this._pointAt(l.x + t * D).transformCopy(e), r = this._pointAt(l.y + t * D).transformCopy(e), o = new F(i.x, r.y), a = F.min(a, o), s = F.max(s, o);
                    return u.fromPoints(a, s)
                },
                _pointAt: function(e) {
                    var t = this.center,
                        n = this.radius;
                    return new F(t.x - n * g.cos(e), t.y - n * g.sin(e))
                }
            }), r(h.fn, ["radius"]), w(h.fn, y), f = b.extend({
                init: function(e, t) {
                    this.setCenter(e || new F), t = t || {}, this.radiusX = t.radiusX, this.radiusY = t.radiusY || t.radiusX, this.startAngle = t.startAngle, this.endAngle = t.endAngle, this.anticlockwise = t.anticlockwise || !1
                },
                clone: function() {
                    return new f(this.center, {
                        radiusX: this.radiusX,
                        radiusY: this.radiusY,
                        startAngle: this.startAngle,
                        endAngle: this.endAngle,
                        anticlockwise: this.anticlockwise
                    })
                },
                setCenter: function(e) {
                    return this._observerField("center", F.create(e)), this.geometryChange(), this
                },
                getCenter: function() {
                    return this.center
                },
                MAX_INTERVAL: 45,
                pointAt: function(e) {
                    var t = this.center,
                        n = C(e);
                    return new F(t.x + this.radiusX * g.cos(n), t.y + this.radiusY * g.sin(n))
                },
                curvePoints: function() {
                    var e, t, n, i = this.startAngle,
                        r = this.anticlockwise ? -1 : 1,
                        o = [this.pointAt(i)],
                        a = i,
                        s = this._arcInterval(),
                        l = s.endAngle - s.startAngle,
                        c = g.ceil(l / this.MAX_INTERVAL),
                        d = l / c;
                    for (e = 1; c >= e; e++) t = a + r * d, n = this._intervalCurvePoints(a, t), o.push(n.cp1, n.cp2, n.p2), a = t;
                    return o
                },
                bbox: function(e) {
                    for (var t, r, o = this, a = o._arcInterval(), s = a.startAngle, l = a.endAngle, c = n(this.center, this.radiusX, this.radiusY, e), d = S(c.x), h = S(c.y), f = o.pointAt(s).transformCopy(e), p = o.pointAt(l).transformCopy(e), m = F.min(f, p), g = F.max(f, p), v = i(d, s), _ = i(h, s); l > v || l > _;) l > v && (t = o.pointAt(v).transformCopy(e), v += 90), l > _ && (r = o.pointAt(_).transformCopy(e), _ += 90), f = new F(t.x, r.y), m = F.min(m, f), g = F.max(g, f);
                    return u.fromPoints(m, g)
                },
                _arcInterval: function() {
                    var e, t = this.startAngle,
                        n = this.endAngle,
                        i = this.anticlockwise;
                    return i && (e = t, t = n, n = e), (t > n || i && t === n) && (n += 360), {
                        startAngle: t,
                        endAngle: n
                    }
                },
                _intervalCurvePoints: function(e, t) {
                    var n = this,
                        i = n.pointAt(e),
                        r = n.pointAt(t),
                        o = n._derivativeAt(e),
                        a = n._derivativeAt(t),
                        s = (C(t) - C(e)) / 3,
                        l = new F(i.x + s * o.x, i.y + s * o.y),
                        c = new F(r.x - s * a.x, r.y - s * a.y);
                    return {
                        p1: i,
                        cp1: l,
                        cp2: c,
                        p2: r
                    }
                },
                _derivativeAt: function(e) {
                    var t = this,
                        n = C(e);
                    return new F(-t.radiusX * g.sin(n), t.radiusY * g.cos(n))
                }
            }), r(f.fn, ["radiusX", "radiusY", "startAngle", "endAngle", "anticlockwise"]), w(f.fn, y), f.fromPoints = function(e, t, n, i, r, o) {
                var a = c(e.x, e.y, t.x, t.y, n, i, r, o);
                return new f(a.center, {
                    startAngle: a.startAngle,
                    endAngle: a.endAngle,
                    radiusX: n,
                    radiusY: i,
                    anticlockwise: 0 === o
                })
            }, p = b.extend({
                init: function(e, t, n, i, r, o) {
                    this.a = e || 0, this.b = t || 0, this.c = n || 0, this.d = i || 0, this.e = r || 0, this.f = o || 0
                },
                multiplyCopy: function(e) {
                    return new p(this.a * e.a + this.c * e.b, this.b * e.a + this.d * e.b, this.a * e.c + this.c * e.d, this.b * e.c + this.d * e.d, this.a * e.e + this.c * e.f + this.e, this.b * e.e + this.d * e.f + this.f)
                },
                invert: function() {
                    var e = this.a,
                        t = this.b,
                        n = this.c,
                        i = this.d,
                        r = this.e,
                        o = this.f,
                        a = e * i - t * n;
                    return 0 === a ? null : new p(i / a, -t / a, -n / a, e / a, (n * o - i * r) / a, (t * r - e * o) / a)
                },
                clone: function() {
                    return new p(this.a, this.b, this.c, this.d, this.e, this.f)
                },
                equals: function(e) {
                    return e ? this.a === e.a && this.b === e.b && this.c === e.c && this.d === e.d && this.e === e.e && this.f === e.f : !1
                },
                round: function(e) {
                    return this.a = T(this.a, e), this.b = T(this.b, e), this.c = T(this.c, e), this.d = T(this.d, e), this.e = T(this.e, e), this.f = T(this.f, e), this
                },
                toArray: function(e) {
                    var t, n = [this.a, this.b, this.c, this.d, this.e, this.f];
                    if (x(e))
                        for (t = 0; n.length > t; t++) n[t] = T(n[t], e);
                    return n
                }
            }), p.fn.toString = function(e, t) {
                return this.toArray(e).join(t || ",")
            }, p.translate = function(e, t) {
                return new p(1, 0, 0, 1, e, t)
            }, p.unit = function() {
                return new p(1, 0, 0, 1, 0, 0)
            }, p.rotate = function(e, t, n) {
                var i = new p;
                return i.a = g.cos(C(e)), i.b = g.sin(C(e)), i.c = -i.b, i.d = i.a, i.e = t - t * i.a + n * i.b || 0, i.f = n - n * i.a - t * i.b || 0, i
            }, p.scale = function(e, t) {
                return new p(e, 0, 0, t, 0, 0)
            }, p.IDENTITY = p.unit(), m = b.extend({
                init: function(e) {
                    this._matrix = e || p.unit()
                },
                clone: function() {
                    return new m(this._matrix.clone())
                },
                equals: function(e) {
                    return e && e._matrix.equals(this._matrix)
                },
                _optionsChange: function() {
                    this.optionsChange({
                        field: "transform",
                        value: this
                    })
                },
                translate: function(e, t) {
                    return this._matrix = this._matrix.multiplyCopy(p.translate(e, t)), this._optionsChange(), this
                },
                scale: function(e, t, n) {
                    return x(t) || (t = e), n && (n = F.create(n), this._matrix = this._matrix.multiplyCopy(p.translate(n.x, n.y))), this._matrix = this._matrix.multiplyCopy(p.scale(e, t)), n && (this._matrix = this._matrix.multiplyCopy(p.translate(-n.x, -n.y))), this._optionsChange(), this
                },
                rotate: function(e, t) {
                    return t = F.create(t) || F.ZERO, this._matrix = this._matrix.multiplyCopy(p.rotate(e, t.x, t.y)), this._optionsChange(), this
                },
                multiply: function(e) {
                    var n = t(e);
                    return this._matrix = this._matrix.multiplyCopy(n), this._optionsChange(), this
                },
                matrix: function(e) {
                    return e ? (this._matrix = e, this._optionsChange(), this) : this._matrix
                }
            }), w(m.fn, y), w(_, {
                geometry: {
                    Arc: f,
                    Circle: h,
                    Matrix: p,
                    Point: F,
                    Rect: u,
                    Size: d,
                    Transformation: m,
                    transform: e,
                    toMatrix: t
                }
            }), _.dataviz.geometry = _.geometry
        }(), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("drawing/core.min", ["drawing/geometry.min"], e)
    }(function() {
        ! function(e) {
            var t, n, i, r = e.noop,
                o = Object.prototype.toString,
                a = window.kendo,
                s = a.Class,
                l = a.ui.Widget,
                c = a.deepExtend,
                d = a.util,
                u = d.defined,
                h = l.extend({
                    init: function(e, t) {
                        this.options = c({}, this.options, t), l.fn.init.call(this, e, this.options), this._click = this._handler("click"), this._mouseenter = this._handler("mouseenter"), this._mouseleave = this._handler("mouseleave"), this._visual = new a.drawing.Group, this.options.width && this.element.css("width", this.options.width), this.options.height && this.element.css("height", this.options.height)
                    },
                    options: {
                        name: "Surface"
                    },
                    events: ["click", "mouseenter", "mouseleave", "resize"],
                    draw: function(e) {
                        this._visual.children.push(e)
                    },
                    clear: function() {
                        this._visual.children = []
                    },
                    destroy: function() {
                        this._visual = null, l.fn.destroy.call(this)
                    },
                    exportVisual: function() {
                        return this._visual
                    },
                    getSize: function() {
                        return {
                            width: this.element.width(),
                            height: this.element.height()
                        }
                    },
                    setSize: function(e) {
                        this.element.css({
                            width: e.width,
                            height: e.height
                        }), this._size = e, this._resize()
                    },
                    eventTarget: function(t) {
                        for (var n, i = e(t.touch ? t.touch.initialTouch : t.target); !n && i.length > 0 && (n = i[0]._kendoNode, !i.is(this.element) && 0 !== i.length);) i = i.parent();
                        return n ? n.srcElement : void 0
                    },
                    _resize: r,
                    _handler: function(e) {
                        var t = this;
                        return function(n) {
                            var i = t.eventTarget(n);
                            i && t.trigger(e, {
                                element: i,
                                originalEvent: n
                            })
                        }
                    }
                });
            a.ui.plugin(h), h.create = function(e, t) {
                return i.current.create(e, t)
            }, t = s.extend({
                init: function(e) {
                    this.childNodes = [], this.parent = null, e && (this.srcElement = e, this.observe())
                },
                destroy: function() {
                    var e, t;
                    for (this.srcElement && this.srcElement.removeObserver(this), e = this.childNodes, t = 0; e.length > t; t++) this.childNodes[t].destroy();
                    this.parent = null
                },
                load: r,
                observe: function() {
                    this.srcElement && this.srcElement.addObserver(this)
                },
                append: function(e) {
                    this.childNodes.push(e), e.parent = this
                },
                insertAt: function(e, t) {
                    this.childNodes.splice(t, 0, e), e.parent = this
                },
                remove: function(e, t) {
                    var n, i = e + t;
                    for (n = e; i > n; n++) this.childNodes[n].removeSelf();
                    this.childNodes.splice(e, t)
                },
                removeSelf: function() {
                    this.clear(), this.destroy()
                },
                clear: function() {
                    this.remove(0, this.childNodes.length)
                },
                invalidate: function() {
                    this.parent && this.parent.invalidate()
                },
                geometryChange: function() {
                    this.invalidate()
                },
                optionsChange: function() {
                    this.invalidate()
                },
                childrenChange: function(e) {
                    "add" === e.action ? this.load(e.items, e.index) : "remove" === e.action && this.remove(e.index, e.items.length), this.invalidate()
                }
            }), n = s.extend({
                init: function(e, t) {
                    var n, i;
                    this.prefix = t || "";
                    for (n in e) i = e[n], i = this._wrap(i, n), this[n] = i
                },
                get: function(e) {
                    return a.getter(e, !0)(this)
                },
                set: function(e, t) {
                    var n, i = a.getter(e, !0)(this);
                    i !== t && (n = this._set(e, this._wrap(t, e)), n || this.optionsChange({
                        field: this.prefix + e,
                        value: t
                    }))
                },
                _set: function(e, t) {
                    var i, r, o, s = e.indexOf(".") >= 0;
                    if (s)
                        for (i = e.split("."), r = ""; i.length > 1;) {
                            if (r += i.shift(), o = a.getter(r, !0)(this), o || (o = new n({}, r + "."), o.addObserver(this), this[r] = o), o instanceof n) return o.set(i.join("."), t), s;
                            r += "."
                        }
                    return this._clear(e), a.setter(e)(this, t), s
                },
                _clear: function(e) {
                    var t = a.getter(e, !0)(this);
                    t && t.removeObserver && t.removeObserver(this)
                },
                _wrap: function(e, t) {
                    var i = o.call(e);
                    return null !== e && u(e) && "[object Object]" === i && (e instanceof n || e instanceof s || (e = new n(e, this.prefix + t + ".")), e.addObserver(this)), e
                }
            }), c(n.fn, a.mixins.ObserversMixin), i = function() {
                this._items = []
            }, i.prototype = {
                register: function(e, t, n) {
                    var i = this._items,
                        r = i[0],
                        o = {
                            name: e,
                            type: t,
                            order: n
                        };
                    !r || r.order > n ? i.unshift(o) : i.push(o)
                },
                create: function(e, t) {
                    var n, i, r = this._items,
                        o = r[0];
                    if (t && t.type)
                        for (n = t.type.toLowerCase(), i = 0; r.length > i; i++)
                            if (r[i].name === n) {
                                o = r[i];
                                break
                            } return o ? new o.type(e, t) : void a.logToConsole("Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\n- The browser does not support SVG, VML and Canvas. User agent: " + navigator.userAgent + "\n- The Kendo UI scripts are not fully loaded")
                }
            }, i.current = new i, c(a, {
                drawing: {
                    DASH_ARRAYS: {
                        dot: [1.5, 3.5],
                        dash: [4, 3.5],
                        longdash: [8, 3.5],
                        dashdot: [3.5, 3.5, 1.5, 3.5],
                        longdashdot: [8, 3.5, 1.5, 3.5],
                        longdashdotdot: [8, 3.5, 1.5, 3.5, 1.5, 3.5]
                    },
                    Color: a.Color,
                    BaseNode: t,
                    OptionsStore: n,
                    Surface: h,
                    SurfaceFactory: i
                }
            }), a.dataviz.drawing = a.drawing
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("drawing/mixins.min", ["drawing/core.min"], e)
    }(function() {
        ! function() {
            var e = window.kendo,
                t = e.deepExtend,
                n = e.util.defined,
                i = "gradient",
                r = {
                    extend: function(e) {
                        e.fill = this.fill, e.stroke = this.stroke
                    },
                    fill: function(e, t) {
                        var r, o = this.options;
                        return n(e) ? (e && e.nodeType != i ? (r = {
                            color: e
                        }, n(t) && (r.opacity = t), o.set("fill", r)) : o.set("fill", e), this) : o.get("fill")
                    },
                    stroke: function(e, t, i) {
                        return n(e) ? (this.options.set("stroke.color", e), n(t) && this.options.set("stroke.width", t), n(i) && this.options.set("stroke.opacity", i), this) : this.options.get("stroke")
                    }
                },
                o = {
                    extend: function(e, t) {
                        e.traverse = function(e) {
                            var n, i, r = this[t];
                            for (n = 0; r.length > n; n++) i = r[n], i.traverse ? i.traverse(e) : e(i);
                            return this
                        }
                    }
                };
            t(e.drawing, {
                mixins: {
                    Paintable: r,
                    Traversable: o
                }
            })
        }()
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("drawing/shapes.min", ["drawing/core.min", "drawing/mixins.min", "util/text-metrics.min", "mixins/observers.min"], e)
    }(function() {
        ! function(e) {
            function t(e, t, n) {
                var i, r, o, a;
                for (r = 0; e.length > r; r++) o = e[r], o.visible() && (a = t ? o.bbox(n) : o.rawBBox(), a && (i = i ? G.Rect.union(i, a) : a));
                return i
            }

            function n(e, t) {
                var n, i, r, o;
                for (i = 0; e.length > i; i++) r = e[i], r.visible() && (o = r.clippedBBox(t), o && (n = n ? G.Rect.union(n, o) : o));
                return n
            }

            function i(e, t) {
                e.origin.x -= t, e.origin.y -= t, e.size.width += 2 * t, e.size.height += 2 * t
            }

            function r(e, t) {
                for (var n = 0; t.length > n; n++) e[t[n]] = o(t[n])
            }

            function o(e) {
                var t = "_" + e;
                return function(e) {
                    return re(e) ? (this._observerField(t, e), this.geometryChange(), this) : this[t]
                }
            }

            function a(e, t) {
                for (var n = 0; t.length > n; n++) e[t[n]] = s(t[n])
            }

            function s(e) {
                var t = "_" + e;
                return function(e) {
                    return re(e) ? (this._observerField(t, $.create(e)), this.geometryChange(), this) : this[t]
                }
            }

            function l(e, t) {
                for (var n = 0; t.length > n; n++) e[t[n]] = c(t[n])
            }

            function c(e) {
                return function(t) {
                    return re(t) ? (this.options.set(e, t), this) : this.options.get(e)
                }
            }

            function d() {
                return "kdef" + me++
            }

            function u(e, t, n) {
                k(e, t, n, "x", "width")
            }

            function h(e, t, n) {
                k(e, t, n, "y", "height")
            }

            function f(e) {
                y(w(e), "x", "y", "width")
            }

            function p(e) {
                y(w(e), "y", "x", "height")
            }

            function m(e, t) {
                return v(e, t, "x", "y", "width")
            }

            function g(e, t) {
                return v(e, t, "y", "x", "height")
            }

            function v(e, t, n, i, r) {
                var o, a, s, l, c = [],
                    d = b(e, t, r),
                    u = t.origin.clone();
                for (l = 0; d.length > l; l++)
                    for (s = d[l], o = s[0], u[i] = o.bbox.origin[i], S(u, o.bbox, o.element), o.bbox.origin[n] = u[n], y(s, n, i, r), c.push([]), a = 0; s.length > a; a++) c[l].push(s[a].element);
                return c
            }

            function _(e, t) {
                var n, i, r = e.clippedBBox(),
                    o = r.size,
                    a = t.size;
                (o.width > a.width || o.height > a.height) && (n = Z.min(a.width / o.width, a.height / o.height), i = e.transform() || G.transform(), i.scale(n, n), e.transform(i))
            }

            function b(e, t, n) {
                var i, r, o, a, s = t.size[n],
                    l = 0,
                    c = [],
                    d = [],
                    u = function() {
                        d.push({
                            element: i,
                            bbox: o
                        })
                    };
                for (a = 0; e.length > a; a++) i = e[a], o = i.clippedBBox(), o && (r = o.size[n], l + r > s ? d.length ? (c.push(d), d = [], u(), l = r) : (u(), c.push(d), d = [], l = 0) : (u(), l += r));
                return d.length && c.push(d), c
            }

            function w(e) {
                var t, n, i, r = [];
                for (i = 0; e.length > i; i++) t = e[i], n = t.clippedBBox(), n && r.push({
                    element: t,
                    bbox: n
                });
                return r
            }

            function y(e, t, n, i) {
                var r, o, a, s, l;
                if (e.length > 1)
                    for (r = e[0].bbox, o = new $, l = 1; e.length > l; l++) a = e[l].element, s = e[l].bbox, o[t] = r.origin[t] + r.size[i], o[n] = s.origin[n], S(o, s, a), s.origin[t] = o[t], r = s
            }

            function k(e, t, n, i, r) {
                var o, a, s;
                for (n = n || "start", s = 0; e.length > s; s++) o = e[s].clippedBBox(), o && (a = o.origin.clone(), a[i] = x(o.size[r], t, n, i, r), S(a, o, e[s]))
            }

            function x(e, t, n, i, r) {
                var o;
                return o = n == ge ? t.origin[i] : n == ve ? t.origin[i] + t.size[r] - e : t.origin[i] + (t.size[r] - e) / 2
            }

            function C(e, t, n) {
                var i = n.transform() || G.transform(),
                    r = i.matrix();
                r.e += e, r.f += t, i.matrix(r), n.transform(i)
            }

            function S(e, t, n) {
                C(e.x - t.origin.x, e.y - t.origin.y, n)
            }
            var T, D, A, E, F, I, M, R, P, z, B, L, H, N, O, V, U, W = window.kendo,
                j = W.Class,
                q = W.deepExtend,
                G = W.geometry,
                $ = G.Point,
                Y = G.Size,
                K = G.Matrix,
                Q = G.toMatrix,
                X = W.drawing,
                J = X.OptionsStore,
                Z = Math,
                ee = Z.pow,
                te = W.util,
                ne = te.append,
                ie = te.arrayLimits,
                re = te.defined,
                oe = te.last,
                ae = te.valueOrDefault,
                se = W.mixins.ObserversMixin,
                le = e.inArray,
                ce = [].push,
                de = [].pop,
                ue = [].splice,
                he = [].shift,
                fe = [].slice,
                pe = [].unshift,
                me = 1,
                ge = "start",
                ve = "end",
                _e = "horizontal",
                be = j.extend({
                    nodeType: "Element",
                    init: function(e) {
                        this._initOptions(e)
                    },
                    _initOptions: function(e) {
                        var t, n;
                        e = e || {}, t = e.transform, n = e.clip, t && (e.transform = G.transform(t)), n && !n.id && (n.id = d()), this.options = new J(e), this.options.addObserver(this)
                    },
                    transform: function(e) {
                        return re(e) ? void this.options.set("transform", G.transform(e)) : this.options.get("transform")
                    },
                    parentTransform: function() {
                        for (var e, t, n = this; n.parent;) n = n.parent, e = n.transform(), e && (t = e.matrix().multiplyCopy(t || K.unit()));
                        return t ? G.transform(t) : void 0
                    },
                    currentTransform: function(e) {
                        var t, n, i = this.transform(),
                            r = Q(i);
                        return re(e) || (e = this.parentTransform()), t = Q(e), n = r && t ? t.multiplyCopy(r) : r || t, n ? G.transform(n) : void 0
                    },
                    visible: function(e) {
                        return re(e) ? (this.options.set("visible", e), this) : this.options.get("visible") !== !1
                    },
                    clip: function(e) {
                        var t = this.options;
                        return re(e) ? (e && !e.id && (e.id = d()), t.set("clip", e), this) : t.get("clip")
                    },
                    opacity: function(e) {
                        return re(e) ? (this.options.set("opacity", e), this) : ae(this.options.get("opacity"), 1)
                    },
                    clippedBBox: function(e) {
                        var t, n = this._clippedBBox(e);
                        return n ? (t = this.clip(), t ? G.Rect.intersect(n, t.bbox(e)) : n) : void 0
                    },
                    _clippedBBox: function(e) {
                        return this.bbox(e)
                    }
                });
            q(be.fn, se), T = j.extend({
                init: function(e) {
                    e = e || [], this.length = 0, this._splice(0, e.length, e)
                },
                elements: function(e) {
                    return e ? (this._splice(0, this.length, e), this._change(), this) : this.slice(0)
                },
                push: function() {
                    var e = arguments,
                        t = ce.apply(this, e);
                    return this._add(e), t
                },
                slice: fe,
                pop: function() {
                    var e = this.length,
                        t = de.apply(this);
                    return e && this._remove([t]), t
                },
                splice: function(e, t) {
                    var n = fe.call(arguments, 2),
                        i = this._splice(e, t, n);
                    return this._change(), i
                },
                shift: function() {
                    var e = this.length,
                        t = he.apply(this);
                    return e && this._remove([t]), t
                },
                unshift: function() {
                    var e = arguments,
                        t = pe.apply(this, e);
                    return this._add(e), t
                },
                indexOf: function(e) {
                    var t, n, i = this;
                    for (t = 0, n = i.length; n > t; t++)
                        if (i[t] === e) return t;
                    return -1
                },
                _splice: function(e, t, n) {
                    var i = ue.apply(this, [e, t].concat(n));
                    return this._clearObserver(i), this._setObserver(n), i
                },
                _add: function(e) {
                    this._setObserver(e), this._change()
                },
                _remove: function(e) {
                    this._clearObserver(e), this._change()
                },
                _setObserver: function(e) {
                    for (var t = 0; e.length > t; t++) e[t].addObserver(this)
                },
                _clearObserver: function(e) {
                    for (var t = 0; e.length > t; t++) e[t].removeObserver(this)
                },
                _change: function() {}
            }), q(T.fn, se), D = be.extend({
                nodeType: "Group",
                init: function(e) {
                    be.fn.init.call(this, e), this.children = []
                },
                childrenChange: function(e, t, n) {
                    this.trigger("childrenChange", {
                        action: e,
                        items: t,
                        index: n
                    })
                },
                append: function() {
                    return ne(this.children, arguments), this._reparent(arguments, this), this.childrenChange("add", arguments), this
                },
                insert: function(e, t) {
                    return this.children.splice(e, 0, t), t.parent = this, this.childrenChange("add", [t], e), this
                },
                insertAt: function(e, t) {
                    return this.insert(t, e)
                },
                remove: function(e) {
                    var t = le(e, this.children);
                    return t >= 0 && (this.children.splice(t, 1), e.parent = null, this.childrenChange("remove", [e], t)), this
                },
                removeAt: function(e) {
                    if (e >= 0 && this.children.length > e) {
                        var t = this.children[e];
                        this.children.splice(e, 1), t.parent = null, this.childrenChange("remove", [t], e)
                    }
                    return this
                },
                clear: function() {
                    var e = this.children;
                    return this.children = [], this._reparent(e, null), this.childrenChange("remove", e, 0), this
                },
                bbox: function(e) {
                    return t(this.children, !0, this.currentTransform(e))
                },
                rawBBox: function() {
                    return t(this.children, !1)
                },
                _clippedBBox: function(e) {
                    return n(this.children, this.currentTransform(e))
                },
                currentTransform: function(e) {
                    return be.fn.currentTransform.call(this, e) || null
                },
                _reparent: function(e, t) {
                    var n, i, r;
                    for (n = 0; e.length > n; n++) i = e[n], r = i.parent, r && r != this && r.remove && r.remove(i), i.parent = t
                }
            }), X.mixins.Traversable.extend(D.fn, "children"), A = be.extend({
                nodeType: "Text",
                init: function(e, t, n) {
                    be.fn.init.call(this, n), this.content(e), this.position(t || new G.Point), this.options.font || (this.options.font = "12px sans-serif"), re(this.options.fill) || this.fill("#000")
                },
                content: function(e) {
                    return re(e) ? (this.options.set("content", e), this) : this.options.get("content")
                },
                measure: function() {
                    var e = te.measureText(this.content(), {
                        font: this.options.get("font")
                    });
                    return e
                },
                rect: function() {
                    var e = this.measure(),
                        t = this.position().clone();
                    return new G.Rect(t, [e.width, e.height])
                },
                bbox: function(e) {
                    var t = Q(this.currentTransform(e));
                    return this.rect().bbox(t)
                },
                rawBBox: function() {
                    return this.rect().bbox()
                }
            }), X.mixins.Paintable.extend(A.fn), a(A.fn, ["position"]), E = be.extend({
                nodeType: "Circle",
                init: function(e, t) {
                    be.fn.init.call(this, t), this.geometry(e || new G.Circle), re(this.options.stroke) || this.stroke("#000")
                },
                bbox: function(e) {
                    var t = Q(this.currentTransform(e)),
                        n = this._geometry.bbox(t),
                        r = this.options.get("stroke.width");
                    return r && i(n, r / 2), n
                },
                rawBBox: function() {
                    return this._geometry.bbox()
                }
            }), X.mixins.Paintable.extend(E.fn), r(E.fn, ["geometry"]), F = be.extend({
                nodeType: "Arc",
                init: function(e, t) {
                    be.fn.init.call(this, t), this.geometry(e || new G.Arc), re(this.options.stroke) || this.stroke("#000")
                },
                bbox: function(e) {
                    var t = Q(this.currentTransform(e)),
                        n = this.geometry().bbox(t),
                        r = this.options.get("stroke.width");
                    return r && i(n, r / 2), n
                },
                rawBBox: function() {
                    return this.geometry().bbox()
                },
                toPath: function() {
                    var e, t = new R,
                        n = this.geometry().curvePoints();
                    if (n.length > 0)
                        for (t.moveTo(n[0].x, n[0].y), e = 1; n.length > e; e += 3) t.curveTo(n[e], n[e + 1], n[e + 2]);
                    return t
                }
            }), X.mixins.Paintable.extend(F.fn), r(F.fn, ["geometry"]), I = T.extend({
                _change: function() {
                    this.geometryChange()
                }
            }), M = j.extend({
                init: function(e, t, n) {
                    this.anchor(e || new $), this.controlIn(t), this.controlOut(n)
                },
                bboxTo: function(e, t) {
                    var n, i = this.anchor().transformCopy(t),
                        r = e.anchor().transformCopy(t);
                    return n = this.controlOut() && e.controlIn() ? this._curveBoundingBox(i, this.controlOut().transformCopy(t), e.controlIn().transformCopy(t), r) : this._lineBoundingBox(i, r)
                },
                _lineBoundingBox: function(e, t) {
                    return G.Rect.fromPoints(e, t)
                },
                _curveBoundingBox: function(e, t, n, i) {
                    var r = [e, t, n, i],
                        o = this._curveExtremesFor(r, "x"),
                        a = this._curveExtremesFor(r, "y"),
                        s = ie([o.min, o.max, e.x, i.x]),
                        l = ie([a.min, a.max, e.y, i.y]);
                    return G.Rect.fromPoints(new $(s.min, l.min), new $(s.max, l.max))
                },
                _curveExtremesFor: function(e, t) {
                    var n = this._curveExtremes(e[0][t], e[1][t], e[2][t], e[3][t]);
                    return {
                        min: this._calculateCurveAt(n.min, t, e),
                        max: this._calculateCurveAt(n.max, t, e)
                    }
                },
                _calculateCurveAt: function(e, t, n) {
                    var i = 1 - e;
                    return ee(i, 3) * n[0][t] + 3 * ee(i, 2) * e * n[1][t] + 3 * ee(e, 2) * i * n[2][t] + ee(e, 3) * n[3][t]
                },
                _curveExtremes: function(e, t, n, i) {
                    var r, o, a = e - 3 * t + 3 * n - i,
                        s = -2 * (e - 2 * t + n),
                        l = e - t,
                        c = Z.sqrt(s * s - 4 * a * l),
                        d = 0,
                        u = 1;
                    return 0 === a ? 0 !== s && (d = u = -l / s) : isNaN(c) || (d = (-s + c) / (2 * a), u = (-s - c) / (2 * a)), r = Z.max(Z.min(d, u), 0), (0 > r || r > 1) && (r = 0), o = Z.min(Z.max(d, u), 1), (o > 1 || 0 > o) && (o = 1), {
                        min: r,
                        max: o
                    }
                }
            }), a(M.fn, ["anchor", "controlIn", "controlOut"]), q(M.fn, se), R = be.extend({
                nodeType: "Path",
                init: function(e) {
                    be.fn.init.call(this, e), this.segments = new I, this.segments.addObserver(this), re(this.options.stroke) || (this.stroke("#000"), re(this.options.stroke.lineJoin) || this.options.set("stroke.lineJoin", "miter"))
                },
                moveTo: function(e, t) {
                    return this.suspend(), this.segments.elements([]), this.resume(), this.lineTo(e, t), this
                },
                lineTo: function(e, t) {
                    var n = re(t) ? new $(e, t) : e,
                        i = new M(n);
                    return this.segments.push(i), this
                },
                curveTo: function(e, t, n) {
                    var i, r;
                    return this.segments.length > 0 && (i = oe(this.segments), r = new M(n, t), this.suspend(), i.controlOut(e), this.resume(), this.segments.push(r)), this
                },
                arc: function(e, t, n, i, r) {
                    var o, a, s, l, c;
                    return this.segments.length > 0 && (o = oe(this.segments), a = o.anchor(), s = te.rad(e), l = new $(a.x - n * Z.cos(s), a.y - i * Z.sin(s)), c = new G.Arc(l, {
                        startAngle: e,
                        endAngle: t,
                        radiusX: n,
                        radiusY: i,
                        anticlockwise: r
                    }), this._addArcSegments(c)), this
                },
                arcTo: function(e, t, n, i, r) {
                    var o, a, s;
                    return this.segments.length > 0 && (o = oe(this.segments), a = o.anchor(), s = G.Arc.fromPoints(a, e, t, n, i, r), this._addArcSegments(s)), this
                },
                _addArcSegments: function(e) {
                    var t, n;
                    for (this.suspend(), t = e.curvePoints(), n = 1; t.length > n; n += 3) this.curveTo(t[n], t[n + 1], t[n + 2]);
                    this.resume(), this.geometryChange()
                },
                close: function() {
                    return this.options.closed = !0, this.geometryChange(), this
                },
                bbox: function(e) {
                    var t = Q(this.currentTransform(e)),
                        n = this._bbox(t),
                        r = this.options.get("stroke.width");
                    return r && i(n, r / 2), n
                },
                rawBBox: function() {
                    return this._bbox()
                },
                _bbox: function(e) {
                    var t, n, i, r, o = this.segments,
                        a = o.length;
                    if (1 === a) n = o[0].anchor().transformCopy(e), t = new G.Rect(n, Y.ZERO);
                    else if (a > 0)
                        for (i = 1; a > i; i++) r = o[i - 1].bboxTo(o[i], e), t = t ? G.Rect.union(t, r) : r;
                    return t
                }
            }), X.mixins.Paintable.extend(R.fn), R.fromRect = function(e, t) {
                return new R(t).moveTo(e.topLeft()).lineTo(e.topRight()).lineTo(e.bottomRight()).lineTo(e.bottomLeft()).close()
            }, R.fromPoints = function(e, t) {
                var n, i, r;
                if (e) {
                    for (n = new R(t), i = 0; e.length > i; i++) r = $.create(e[i]), r && (0 === i ? n.moveTo(r) : n.lineTo(r));
                    return n
                }
            }, R.fromArc = function(e, t) {
                var n = new R(t),
                    i = e.startAngle,
                    r = e.pointAt(i);
                return n.moveTo(r.x, r.y), n.arc(i, e.endAngle, e.radiusX, e.radiusY, e.anticlockwise), n
            }, P = be.extend({
                nodeType: "MultiPath",
                init: function(e) {
                    be.fn.init.call(this, e), this.paths = new I, this.paths.addObserver(this), re(this.options.stroke) || this.stroke("#000")
                },
                moveTo: function(e, t) {
                    var n = new R;
                    return n.moveTo(e, t), this.paths.push(n), this
                },
                lineTo: function(e, t) {
                    return this.paths.length > 0 && oe(this.paths).lineTo(e, t), this
                },
                curveTo: function(e, t, n) {
                    return this.paths.length > 0 && oe(this.paths).curveTo(e, t, n), this
                },
                arc: function(e, t, n, i, r) {
                    return this.paths.length > 0 && oe(this.paths).arc(e, t, n, i, r), this
                },
                arcTo: function(e, t, n, i, r) {
                    return this.paths.length > 0 && oe(this.paths).arcTo(e, t, n, i, r), this
                },
                close: function() {
                    return this.paths.length > 0 && oe(this.paths).close(), this
                },
                bbox: function(e) {
                    return t(this.paths, !0, this.currentTransform(e))
                },
                rawBBox: function() {
                    return t(this.paths, !1)
                },
                _clippedBBox: function(e) {
                    return n(this.paths, this.currentTransform(e))
                }
            }), X.mixins.Paintable.extend(P.fn), z = be.extend({
                nodeType: "Image",
                init: function(e, t, n) {
                    be.fn.init.call(this, n), this.src(e), this.rect(t || new G.Rect)
                },
                src: function(e) {
                    return re(e) ? (this.options.set("src", e), this) : this.options.get("src")
                },
                bbox: function(e) {
                    var t = Q(this.currentTransform(e));
                    return this._rect.bbox(t)
                },
                rawBBox: function() {
                    return this._rect.bbox()
                }
            }), r(z.fn, ["rect"]), B = j.extend({
                init: function(e, t, n) {
                    this.options = new J({
                        offset: e,
                        color: t,
                        opacity: re(n) ? n : 1
                    }), this.options.addObserver(this)
                }
            }), l(B.fn, ["offset", "color", "opacity"]), q(B.fn, se), B.create = function(e) {
                if (re(e)) {
                    var t;
                    return t = e instanceof B ? e : e.length > 1 ? new B(e[0], e[1], e[2]) : new B(e.offset, e.color, e.opacity)
                }
            }, L = T.extend({
                _change: function() {
                    this.optionsChange({
                        field: "stops"
                    })
                }
            }), H = j.extend({
                nodeType: "gradient",
                init: function(e) {
                    this.stops = new L(this._createStops(e.stops)), this.stops.addObserver(this), this._userSpace = e.userSpace, this.id = d()
                },
                userSpace: function(e) {
                    return re(e) ? (this._userSpace = e, this.optionsChange(), this) : this._userSpace
                },
                _createStops: function(e) {
                    var t, n = [];
                    for (e = e || [], t = 0; e.length > t; t++) n.push(B.create(e[t]));
                    return n
                },
                addStop: function(e, t, n) {
                    this.stops.push(new B(e, t, n))
                },
                removeStop: function(e) {
                    var t = this.stops.indexOf(e);
                    t >= 0 && this.stops.splice(t, 1)
                }
            }), q(H.fn, se, {
                optionsChange: function(e) {
                    this.trigger("optionsChange", {
                        field: "gradient" + (e ? "." + e.field : ""),
                        value: this
                    })
                },
                geometryChange: function() {
                    this.optionsChange()
                }
            }), N = H.extend({
                init: function(e) {
                    e = e || {}, H.fn.init.call(this, e), this.start(e.start || new $), this.end(e.end || new $(1, 0))
                }
            }), a(N.fn, ["start", "end"]), O = H.extend({
                init: function(e) {
                    e = e || {}, H.fn.init.call(this, e), this.center(e.center || new $), this._radius = re(e.radius) ? e.radius : 1, this._fallbackFill = e.fallbackFill
                },
                radius: function(e) {
                    return re(e) ? (this._radius = e, this.geometryChange(), this) : this._radius
                },
                fallbackFill: function(e) {
                    return re(e) ? (this._fallbackFill = e, this.optionsChange(), this) : this._fallbackFill
                }
            }), a(O.fn, ["center"]), V = be.extend({
                nodeType: "Rect",
                init: function(e, t) {
                    be.fn.init.call(this, t), this.geometry(e || new G.Rect), re(this.options.stroke) || this.stroke("#000")
                },
                bbox: function(e) {
                    var t = Q(this.currentTransform(e)),
                        n = this._geometry.bbox(t),
                        r = this.options.get("stroke.width");
                    return r && i(n, r / 2), n
                },
                rawBBox: function() {
                    return this._geometry.bbox()
                }
            }), X.mixins.Paintable.extend(V.fn), r(V.fn, ["geometry"]), U = D.extend({
                init: function(e, t) {
                    D.fn.init.call(this, W.deepExtend({}, this._defaults, t)), this._rect = e, this._fieldMap = {}
                },
                _defaults: {
                    alignContent: ge,
                    justifyContent: ge,
                    alignItems: ge,
                    spacing: 0,
                    orientation: _e,
                    lineSpacing: 0,
                    wrap: !0
                },
                rect: function(e) {
                    return e ? (this._rect = e, this) : this._rect
                },
                _initMap: function() {
                    var e = this.options,
                        t = this._fieldMap;
                    e.orientation == _e ? (t.sizeField = "width", t.groupsSizeField = "height", t.groupAxis = "x", t.groupsAxis = "y") : (t.sizeField = "height", t.groupsSizeField = "width", t.groupAxis = "y", t.groupsAxis = "x")
                },
                reflow: function() {
                    var e, t, n, i, r, o, a, s, l, c, d, u, h, f, p, m, g, v, _, b, w, y, k, C, T, D;
                    if (this._rect && 0 !== this.children.length) {
                        for (this._initMap(), this.options.transform && this.transform(null), e = this.options, t = this._fieldMap, n = this._rect, i = this._initGroups(), r = i.groups, o = i.groupsSize, a = t.sizeField, s = t.groupsSizeField, l = t.groupAxis, c = t.groupsAxis, d = x(o, n, e.alignContent, c, s), u = new $, h = new $, f = new G.Size, b = 0; r.length > b; b++) {
                            for (v = r[b], u[l] = p = x(v.size, n, e.justifyContent, l, a), u[c] = d, f[a] = v.size, f[s] = v.lineSize, _ = new G.Rect(u, f), w = 0; v.bboxes.length > w; w++) g = v.elements[w], m = v.bboxes[w], h[l] = p, h[c] = x(m.size[s], _, e.alignItems, c, s), S(h, m, g), p += m.size[a] + e.spacing;
                            d += v.lineSize + e.lineSpacing
                        }!e.wrap && v.size > n.size[a] && (y = n.size[a] / _.size[a], k = _.topLeft().scale(y, y), C = _.size[s] * y, T = x(C, n, e.alignContent, c, s), D = G.transform(), "x" === l ? D.translate(n.origin.x - k.x, T - k.y) : D.translate(T - k.x, n.origin.y - k.y), D.scale(y, y), this.transform(D))
                    }
                },
                _initGroups: function() {
                    var e, t, n, i = this.options,
                        r = this.children,
                        o = i.lineSpacing,
                        a = this._fieldMap.sizeField,
                        s = -o,
                        l = [],
                        c = this._newGroup(),
                        d = function() {
                            l.push(c), s += c.lineSize + o
                        };
                    for (n = 0; r.length > n; n++) t = r[n], e = r[n].clippedBBox(), t.visible() && e && (i.wrap && c.size + e.size[a] + i.spacing > this._rect.size[a] ? 0 === c.bboxes.length ? (this._addToGroup(c, e, t), d(), c = this._newGroup()) : (d(), c = this._newGroup(), this._addToGroup(c, e, t)) : this._addToGroup(c, e, t));
                    return c.bboxes.length && d(), {
                        groups: l,
                        groupsSize: s
                    }
                },
                _addToGroup: function(e, t, n) {
                    e.size += t.size[this._fieldMap.sizeField] + this.options.spacing, e.lineSize = Math.max(t.size[this._fieldMap.groupsSizeField], e.lineSize), e.bboxes.push(t), e.elements.push(n)
                },
                _newGroup: function() {
                    return {
                        lineSize: 0,
                        size: -this.options.spacing,
                        bboxes: [],
                        elements: []
                    }
                }
            }), q(X, {
                align: u,
                Arc: F,
                Circle: E,
                Element: be,
                ElementsArray: T,
                fit: _,
                Gradient: H,
                GradientStop: B,
                Group: D,
                Image: z,
                Layout: U,
                LinearGradient: N,
                MultiPath: P,
                Path: R,
                RadialGradient: O,
                Rect: V,
                Segment: M,
                stack: f,
                Text: A,
                vAlign: h,
                vStack: p,
                vWrap: g,
                wrap: m
            })
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("drawing/parser.min", ["drawing/shapes.min"], e)
    }(function() {
        ! function(e) {
            function t(e) {
                var t = [];
                return e.replace(m, function(e, n) {
                    t.push(parseFloat(n))
                }), t
            }

            function n(e, t, n) {
                var i, r = t ? 0 : 1;
                for (i = 0; e.length > i; i += 2) e.splice(i + r, 0, n)
            }

            function i(e, t) {
                return e && t ? t.scaleCopy(2).translate(-e.x, -e.y) : void 0
            }

            function r(e, t, n) {
                var i = 1 / 3;
                return t = t.clone().scale(2 / 3), {
                    controlOut: t.clone().translateWith(e.scaleCopy(i)),
                    controlIn: t.translateWith(n.scaleCopy(i))
                }
            }
            var o = window.kendo,
                a = o.drawing,
                s = o.geometry,
                l = o.Class,
                c = s.Point,
                d = o.deepExtend,
                u = e.trim,
                h = o.util,
                f = h.last,
                p = /([a-df-z]{1})([^a-df-z]*)(z)?/gi,
                m = /[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g,
                g = "m",
                v = "z",
                _ = l.extend({
                    parse: function(e, n) {
                        var i, r = new a.MultiPath(n),
                            o = new c;
                        return e.replace(p, function(e, n, a, s) {
                            var l = n.toLowerCase(),
                                c = l === n,
                                d = t(u(a));
                            if (l === g && (c ? (o.x += d[0], o.y += d[1]) : (o.x = d[0], o.y = d[1]), r.moveTo(o.x, o.y), d.length > 2 && (l = "l", d.splice(0, 2))), b[l]) b[l](r, {
                                parameters: d,
                                position: o,
                                isRelative: c,
                                previousCommand: i
                            }), s && s.toLowerCase() === v && r.close();
                            else if (l !== g) throw Error("Error while parsing SVG path. Unsupported command: " + l);
                            i = l
                        }), r
                    }
                }),
                b = {
                    l: function(e, t) {
                        var n, i, r = t.parameters,
                            o = t.position;
                        for (n = 0; r.length > n; n += 2) i = new c(r[n], r[n + 1]), t.isRelative && i.translateWith(o), e.lineTo(i.x, i.y), o.x = i.x, o.y = i.y
                    },
                    c: function(e, t) {
                        var n, i, r, o, a = t.parameters,
                            s = t.position;
                        for (o = 0; a.length > o; o += 6) n = new c(a[o], a[o + 1]), i = new c(a[o + 2], a[o + 3]), r = new c(a[o + 4], a[o + 5]), t.isRelative && (i.translateWith(s), n.translateWith(s), r.translateWith(s)), e.curveTo(n, i, r), s.x = r.x, s.y = r.y
                    },
                    v: function(e, t) {
                        var i = t.isRelative ? 0 : t.position.x;
                        n(t.parameters, !0, i), this.l(e, t)
                    },
                    h: function(e, t) {
                        var i = t.isRelative ? 0 : t.position.y;
                        n(t.parameters, !1, i), this.l(e, t)
                    },
                    a: function(e, t) {
                        var n, i, r, o, a, s, l = t.parameters,
                            d = t.position;
                        for (n = 0; l.length > n; n += 7) i = l[n], r = l[n + 1], o = l[n + 3], a = l[n + 4], s = new c(l[n + 5], l[n + 6]), t.isRelative && s.translateWith(d), e.arcTo(s, i, r, o, a), d.x = s.x, d.y = s.y
                    },
                    s: function(e, t) {
                        var n, r, o, a, s, l = t.parameters,
                            d = t.position,
                            u = t.previousCommand;
                        for (("s" == u || "c" == u) && (a = f(f(e.paths).segments).controlIn()), s = 0; l.length > s; s += 4) o = new c(l[s], l[s + 1]), r = new c(l[s + 2], l[s + 3]), t.isRelative && (o.translateWith(d), r.translateWith(d)), n = a ? i(a, d) : d.clone(), a = o, e.curveTo(n, o, r), d.x = r.x, d.y = r.y
                    },
                    q: function(e, t) {
                        var n, i, o, a, s = t.parameters,
                            l = t.position;
                        for (a = 0; s.length > a; a += 4) o = new c(s[a], s[a + 1]), i = new c(s[a + 2], s[a + 3]), t.isRelative && (o.translateWith(l), i.translateWith(l)), n = r(l, o, i), e.curveTo(n.controlOut, n.controlIn, i), l.x = i.x, l.y = i.y
                    },
                    t: function(e, t) {
                        var n, o, a, s, l, d = t.parameters,
                            u = t.position,
                            h = t.previousCommand;
                        for (("q" == h || "t" == h) && (s = f(f(e.paths).segments), o = s.controlIn().clone().translateWith(u.scaleCopy(-1 / 3)).scale(1.5)), l = 0; d.length > l; l += 2) a = new c(d[l], d[l + 1]), t.isRelative && a.translateWith(u), o = o ? i(o, u) : u.clone(), n = r(u, o, a), e.curveTo(n.controlOut, n.controlIn, a), u.x = a.x, u.y = a.y
                    }
                };
            _.current = new _, a.Path.parse = function(e, t) {
                return _.current.parse(e, t)
            }, d(a, {
                PathParser: _
            })
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("drawing/svg.min", ["drawing/shapes.min", "util/main.min"], e)
    }(function() {
        ! function(e) {
            function t(e) {
                var t, n, i, r;
                try {
                    t = e.getScreenCTM ? e.getScreenCTM() : null
                } catch (o) {}
                t && (n = -t.e % 1, i = -t.f % 1, r = e.style, (0 !== n || 0 !== i) && (r.left = n + "px", r.top = i + "px"))
            }

            function n() {
                var e = document.getElementsByTagName("base")[0],
                    t = "",
                    n = document.location.href,
                    i = n.indexOf("#");
                return e && !d.support.browser.msie && (-1 !== i && (n = n.substring(0, i)), t = n), t
            }

            function i(e) {
                return "url(" + n() + "#" + e + ")"
            }

            function r(e) {
                var t, n, i, r = new P,
                    o = e.clippedBBox();
                return o && (t = o.getOrigin(), n = new f.Group, n.transform(h.transform().translate(-t.x, -t.y)), n.children.push(e), e = n), r.load([e]), i = "<?xml version='1.0' ?><svg xmlns='" + E + "' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>" + r.render() + "</svg>", r.destroy(), i
            }

            function o(t, n) {
                var i = r(t);
                return n && n.raw || (i = "data:image/svg+xml;base64," + m.encodeBase64(i)), e.Deferred().resolve(i).promise()
            }

            function a(e, t) {
                return "clip" == e || "fill" == e && (!t || t.nodeType == C)
            }

            function s(e) {
                if (!e || !e.indexOf || e.indexOf("&") < 0) return e;
                var t = s._element;
                return t.innerHTML = e, t.textContent || t.innerText
            }
            var l, c = document,
                d = window.kendo,
                u = d.deepExtend,
                h = d.geometry,
                f = d.drawing,
                p = f.BaseNode,
                m = d.util,
                g = m.defined,
                v = m.isTransparent,
                _ = m.renderAttr,
                b = m.renderAllAttr,
                w = m.renderTemplate,
                y = e.inArray,
                k = "butt",
                x = f.DASH_ARRAYS,
                C = "gradient",
                S = "none",
                T = ".kendo",
                D = "solid",
                A = " ",
                E = "http://www.w3.org/2000/svg",
                F = "transform",
                I = "undefined",
                M = f.Surface.extend({
                    init: function(e, n) {
                        f.Surface.fn.init.call(this, e, n), this._root = new P(this.options), Q(this.element[0], this._template(this)), this._rootElement = this.element[0].firstElementChild, t(this._rootElement), this._root.attachTo(this._rootElement), this.element.on("click" + T, this._click), this.element.on("mouseover" + T, this._mouseenter), this.element.on("mouseout" + T, this._mouseleave), this.resize()
                    },
                    type: "svg",
                    destroy: function() {
                        this._root && (this._root.destroy(), this._root = null, this._rootElement = null, this.element.off(T)), f.Surface.fn.destroy.call(this)
                    },
                    translate: function(e) {
                        var t = d.format("{0} {1} {2} {3}", Math.round(e.x), Math.round(e.y), this._size.width, this._size.height);
                        this._offset = e, this._rootElement.setAttribute("viewBox", t)
                    },
                    draw: function(e) {
                        f.Surface.fn.draw.call(this, e), this._root.load([e])
                    },
                    clear: function() {
                        f.Surface.fn.clear.call(this), this._root.clear()
                    },
                    svg: function() {
                        return "<?xml version='1.0' ?>" + this._template(this)
                    },
                    exportVisual: function() {
                        var e, t = this._visual,
                            n = this._offset;
                        return n && (e = new f.Group, e.children.push(t), e.transform(h.transform().translate(-n.x, -n.y)), t = e), t
                    },
                    _resize: function() {
                        this._offset && this.translate(this._offset)
                    },
                    _template: w("<svg style='width: 100%; height: 100%; overflow: hidden;' xmlns='" + E + "' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>#= d._root.render() #</svg>")
                }),
                R = p.extend({
                    init: function(e) {
                        p.fn.init.call(this, e), this.definitions = {}
                    },
                    destroy: function() {
                        this.element && (this.element._kendoNode = null, this.element = null), this.clearDefinitions(), p.fn.destroy.call(this)
                    },
                    load: function(e, t) {
                        var n, i, r, o, a = this,
                            s = a.element;
                        for (o = 0; e.length > o; o++) i = e[o], r = i.children, n = new K[i.nodeType](i), g(t) ? a.insertAt(n, t) : a.append(n), n.createDefinitions(), r && r.length > 0 && n.load(r), s && n.attachTo(s, t)
                    },
                    root: function() {
                        for (var e = this; e.parent;) e = e.parent;
                        return e
                    },
                    attachTo: function(e, t) {
                        var n, i = c.createElement("div");
                        Q(i, "<svg xmlns='" + E + "' version='1.1'>" + this.render() + "</svg>"), n = i.firstChild.firstChild, n && (g(t) ? e.insertBefore(n, e.childNodes[t] || null) : e.appendChild(n), this.setElement(n))
                    },
                    setElement: function(e) {
                        var t, n, i = this.childNodes;
                        for (this.element && (this.element._kendoNode = null), this.element = e, this.element._kendoNode = this, n = 0; i.length > n; n++) t = e.childNodes[n], i[n].setElement(t)
                    },
                    clear: function() {
                        var e, t;
                        for (this.clearDefinitions(), this.element && (this.element.innerHTML = ""), e = this.childNodes, t = 0; e.length > t; t++) e[t].destroy();
                        this.childNodes = []
                    },
                    removeSelf: function() {
                        if (this.element) {
                            var e = this.element.parentNode;
                            e && e.removeChild(this.element), this.element = null
                        }
                        p.fn.removeSelf.call(this)
                    },
                    template: w("#= d.renderChildren() #"),
                    render: function() {
                        return this.template(this)
                    },
                    renderChildren: function() {
                        var e, t = this.childNodes,
                            n = "";
                        for (e = 0; t.length > e; e++) n += t[e].render();
                        return n
                    },
                    optionsChange: function(e) {
                        var t = e.field,
                            n = e.value;
                        "visible" === t ? this.css("display", n ? "" : S) : l[t] && a(t, n) ? this.updateDefinition(t, n) : "opacity" === t && this.attr("opacity", n), p.fn.optionsChange.call(this, e)
                    },
                    attr: function(e, t) {
                        this.element && this.element.setAttribute(e, t)
                    },
                    allAttr: function(e) {
                        for (var t = 0; e.length > t; t++) this.attr(e[t][0], e[t][1])
                    },
                    css: function(e, t) {
                        this.element && (this.element.style[e] = t)
                    },
                    allCss: function(e) {
                        for (var t = 0; e.length > t; t++) this.css(e[t][0], e[t][1])
                    },
                    removeAttr: function(e) {
                        this.element && this.element.removeAttribute(e)
                    },
                    mapTransform: function(e) {
                        var t = [];
                        return e && t.push([F, "matrix(" + e.matrix().toString(6) + ")"]), t
                    },
                    renderTransform: function() {
                        return b(this.mapTransform(this.srcElement.transform()))
                    },
                    transformChange: function(e) {
                        e ? this.allAttr(this.mapTransform(e)) : this.removeAttr(F)
                    },
                    mapStyle: function() {
                        var e = this.srcElement.options,
                            t = [
                                ["cursor", e.cursor]
                            ];
                        return e.visible === !1 && t.push(["display", S]), t
                    },
                    renderStyle: function() {
                        return _("style", m.renderStyle(this.mapStyle(!0)))
                    },
                    renderOpacity: function() {
                        return _("opacity", this.srcElement.options.opacity)
                    },
                    createDefinitions: function() {
                        var e, t, n, i, r = this.srcElement,
                            o = this.definitions;
                        if (r) {
                            n = r.options;
                            for (t in l) e = n.get(t), e && a(t, e) && (o[t] = e, i = !0);
                            i && this.definitionChange({
                                action: "add",
                                definitions: o
                            })
                        }
                    },
                    definitionChange: function(e) {
                        this.parent && this.parent.definitionChange(e)
                    },
                    updateDefinition: function(e, t) {
                        var n = this.definitions,
                            r = n[e],
                            o = l[e],
                            a = {};
                        r && (a[e] = r, this.definitionChange({
                            action: "remove",
                            definitions: a
                        }), delete n[e]), t ? (a[e] = t, this.definitionChange({
                            action: "add",
                            definitions: a
                        }), n[e] = t, this.attr(o, i(t.id))) : r && this.removeAttr(o)
                    },
                    clearDefinitions: function() {
                        var e, t = this.definitions;
                        for (e in t) {
                            this.definitionChange({
                                action: "remove",
                                definitions: t
                            }), this.definitions = {};
                            break
                        }
                    },
                    renderDefinitions: function() {
                        return b(this.mapDefinitions())
                    },
                    mapDefinitions: function() {
                        var e, t = this.definitions,
                            n = [];
                        for (e in t) n.push([l[e], i(t[e].id)]);
                        return n
                    }
                }),
                P = R.extend({
                    init: function(e) {
                        R.fn.init.call(this), this.options = e, this.defs = new z
                    },
                    attachTo: function(e) {
                        this.element = e, this.defs.attachTo(e.firstElementChild)
                    },
                    clear: function() {
                        p.fn.clear.call(this)
                    },
                    template: w("#=d.defs.render()##= d.renderChildren() #"),
                    definitionChange: function(e) {
                        this.defs.definitionChange(e)
                    }
                }),
                z = R.extend({
                    init: function() {
                        R.fn.init.call(this), this.definitionMap = {}
                    },
                    attachTo: function(e) {
                        this.element = e
                    },
                    template: w("<defs>#= d.renderChildren()#</defs>"),
                    definitionChange: function(e) {
                        var t = e.definitions,
                            n = e.action;
                        "add" == n ? this.addDefinitions(t) : "remove" == n && this.removeDefinitions(t)
                    },
                    createDefinition: function(e, t) {
                        var n;
                        return "clip" == e ? n = B : "fill" == e && (t instanceof f.LinearGradient ? n = G : t instanceof f.RadialGradient && (n = $)), new n(t)
                    },
                    addDefinitions: function(e) {
                        for (var t in e) this.addDefinition(t, e[t])
                    },
                    addDefinition: function(e, t) {
                        var n, i = this.definitionMap,
                            r = t.id,
                            o = this.element,
                            a = i[r];
                        a ? a.count++ : (n = this.createDefinition(e, t), i[r] = {
                            element: n,
                            count: 1
                        }, this.append(n), o && n.attachTo(this.element))
                    },
                    removeDefinitions: function(e) {
                        for (var t in e) this.removeDefinition(e[t])
                    },
                    removeDefinition: function(e) {
                        var t = this.definitionMap,
                            n = e.id,
                            i = t[n];
                        i && (i.count--, 0 === i.count && (this.remove(y(i.element, this.childNodes), 1), delete t[n]))
                    }
                }),
                B = R.extend({
                    init: function(e) {
                        R.fn.init.call(this), this.srcElement = e, this.id = e.id, this.load([e])
                    },
                    template: w("<clipPath id='#=d.id#'>#= d.renderChildren()#</clipPath>")
                }),
                L = R.extend({
                    template: w("<g#= d.renderTransform() + d.renderStyle() + d.renderOpacity() + d.renderDefinitions()#>#= d.renderChildren() #</g>"),
                    optionsChange: function(e) {
                        e.field == F && this.transformChange(e.value), R.fn.optionsChange.call(this, e)
                    }
                }),
                H = R.extend({
                    geometryChange: function() {
                        this.attr("d", this.renderData()), this.invalidate()
                    },
                    optionsChange: function(e) {
                        switch (e.field) {
                            case "fill":
                                e.value ? this.allAttr(this.mapFill(e.value)) : this.removeAttr("fill");
                                break;
                            case "fill.color":
                                this.allAttr(this.mapFill({
                                    color: e.value
                                }));
                                break;
                            case "stroke":
                                e.value ? this.allAttr(this.mapStroke(e.value)) : this.removeAttr("stroke");
                                break;
                            case F:
                                this.transformChange(e.value);
                                break;
                            default:
                                var t = this.attributeMap[e.field];
                                t && this.attr(t, e.value)
                        }
                        R.fn.optionsChange.call(this, e)
                    },
                    attributeMap: {
                        "fill.opacity": "fill-opacity",
                        "stroke.color": "stroke",
                        "stroke.width": "stroke-width",
                        "stroke.opacity": "stroke-opacity"
                    },
                    content: function() {
                        this.element && (this.element.textContent = this.srcElement.content())
                    },
                    renderData: function() {
                        return this.printPath(this.srcElement)
                    },
                    printPath: function(e) {
                        var t, n, i, r, o, a = e.segments,
                            s = a.length;
                        if (s > 0) {
                            for (t = [], o = 1; s > o; o++) i = this.segmentType(a[o - 1], a[o]), i !== r && (r = i, t.push(i)), t.push("L" === i ? this.printPoints(a[o].anchor()) : this.printPoints(a[o - 1].controlOut(), a[o].controlIn(), a[o].anchor()));
                            return n = "M" + this.printPoints(a[0].anchor()) + A + t.join(A), e.options.closed && (n += "Z"), n
                        }
                    },
                    printPoints: function() {
                        var e, t = arguments,
                            n = t.length,
                            i = [];
                        for (e = 0; n > e; e++) i.push(t[e].toString(3));
                        return i.join(A)
                    },
                    segmentType: function(e, t) {
                        return e.controlOut() && t.controlIn() ? "C" : "L"
                    },
                    mapStroke: function(e) {
                        var t = [];
                        return e && !v(e.color) ? (t.push(["stroke", e.color]), t.push(["stroke-width", e.width]), t.push(["stroke-linecap", this.renderLinecap(e)]), t.push(["stroke-linejoin", e.lineJoin]), g(e.opacity) && t.push(["stroke-opacity", e.opacity]), g(e.dashType) && t.push(["stroke-dasharray", this.renderDashType(e)])) : t.push(["stroke", S]), t
                    },
                    renderStroke: function() {
                        return b(this.mapStroke(this.srcElement.options.stroke))
                    },
                    renderDashType: function(e) {
                        var t, n, i, r = e.width || 1,
                            o = e.dashType;
                        if (o && o != D) {
                            for (t = x[o.toLowerCase()], n = [], i = 0; t.length > i; i++) n.push(t[i] * r);
                            return n.join(" ")
                        }
                    },
                    renderLinecap: function(e) {
                        var t = e.dashType,
                            n = e.lineCap;
                        return t && t != D ? k : n
                    },
                    mapFill: function(e) {
                        var t = [];
                        return e && e.nodeType == C || (e && !v(e.color) ? (t.push(["fill", e.color]), g(e.opacity) && t.push(["fill-opacity", e.opacity])) : t.push(["fill", S])), t
                    },
                    renderFill: function() {
                        return b(this.mapFill(this.srcElement.options.fill))
                    },
                    template: w("<path #= d.renderStyle() # #= d.renderOpacity() # #= kendo.util.renderAttr('d', d.renderData()) # #= d.renderStroke() # #= d.renderFill() # #= d.renderDefinitions() # #= d.renderTransform() #></path>")
                }),
                N = H.extend({
                    renderData: function() {
                        return this.printPath(this.srcElement.toPath())
                    }
                }),
                O = H.extend({
                    renderData: function() {
                        var e, t, n = this.srcElement.paths;
                        if (n.length > 0) {
                            for (e = [], t = 0; n.length > t; t++) e.push(this.printPath(n[t]));
                            return e.join(" ")
                        }
                    }
                }),
                V = H.extend({
                    geometryChange: function() {
                        var e = this.center();
                        this.attr("cx", e.x), this.attr("cy", e.y), this.attr("r", this.radius()), this.invalidate()
                    },
                    center: function() {
                        return this.srcElement.geometry().center
                    },
                    radius: function() {
                        return this.srcElement.geometry().radius
                    },
                    template: w("<circle #= d.renderStyle() # #= d.renderOpacity() # cx='#= d.center().x #' cy='#= d.center().y #' r='#= d.radius() #' #= d.renderStroke() # #= d.renderFill() # #= d.renderDefinitions() # #= d.renderTransform() # ></circle>")
                }),
                U = H.extend({
                    geometryChange: function() {
                        var e = this.pos();
                        this.attr("x", e.x), this.attr("y", e.y), this.invalidate()
                    },
                    optionsChange: function(e) {
                        "font" === e.field ? (this.attr("style", m.renderStyle(this.mapStyle())), this.geometryChange()) : "content" === e.field && H.fn.content.call(this, this.srcElement.content()), H.fn.optionsChange.call(this, e)
                    },
                    mapStyle: function(e) {
                        var t = H.fn.mapStyle.call(this, e),
                            n = this.srcElement.options.font;
                        return e && (n = d.htmlEncode(n)), t.push(["font", n]), t
                    },
                    pos: function() {
                        var e = this.srcElement.position(),
                            t = this.srcElement.measure();
                        return e.clone().setY(e.y + t.baseline)
                    },
                    renderContent: function() {
                        var e = this.srcElement.content();
                        return e = s(e), e = d.htmlEncode(e)
                    },
                    template: w("<text #= d.renderStyle() # #= d.renderOpacity() # x='#= this.pos().x #' y='#= this.pos().y #' #= d.renderStroke() # #= d.renderTransform() # #= d.renderDefinitions() # #= d.renderFill() #>#= d.renderContent() #</text>")
                }),
                W = H.extend({
                    geometryChange: function() {
                        this.allAttr(this.mapPosition()), this.invalidate()
                    },
                    optionsChange: function(e) {
                        "src" === e.field && this.allAttr(this.mapSource()), H.fn.optionsChange.call(this, e)
                    },
                    mapPosition: function() {
                        var e = this.srcElement.rect(),
                            t = e.topLeft();
                        return [
                            ["x", t.x],
                            ["y", t.y],
                            ["width", e.width() + "px"],
                            ["height", e.height() + "px"]
                        ]
                    },
                    renderPosition: function() {
                        return b(this.mapPosition())
                    },
                    mapSource: function(e) {
                        var t = this.srcElement.src();
                        return e && (t = d.htmlEncode(t)), [
                            ["xlink:href", t]
                        ]
                    },
                    renderSource: function() {
                        return b(this.mapSource(!0))
                    },
                    template: w("<image preserveAspectRatio='none' #= d.renderStyle() # #= d.renderTransform()# #= d.renderOpacity() # #= d.renderPosition() # #= d.renderSource() # #= d.renderDefinitions()#></image>")
                }),
                j = R.extend({
                    template: w("<stop #=d.renderOffset()# #=d.renderStyle()# />"),
                    renderOffset: function() {
                        return _("offset", this.srcElement.offset())
                    },
                    mapStyle: function() {
                        var e = this.srcElement;
                        return [
                            ["stop-color", e.color()],
                            ["stop-opacity", e.opacity()]
                        ]
                    },
                    optionsChange: function(e) {
                        "offset" == e.field ? this.attr(e.field, e.value) : ("color" == e.field || "opacity" == e.field) && this.css("stop-" + e.field, e.value)
                    }
                }),
                q = R.extend({
                    init: function(e) {
                        R.fn.init.call(this, e), this.id = e.id, this.loadStops()
                    },
                    loadStops: function() {
                        var e, t, n = this.srcElement,
                            i = n.stops,
                            r = this.element;
                        for (t = 0; i.length > t; t++) e = new j(i[t]), this.append(e), r && e.attachTo(r)
                    },
                    optionsChange: function(e) {
                        "gradient.stops" == e.field ? (p.fn.clear.call(this), this.loadStops()) : e.field == C && this.allAttr(this.mapCoordinates())
                    },
                    renderCoordinates: function() {
                        return b(this.mapCoordinates())
                    },
                    mapSpace: function() {
                        return ["gradientUnits", this.srcElement.userSpace() ? "userSpaceOnUse" : "objectBoundingBox"]
                    }
                }),
                G = q.extend({
                    template: w("<linearGradient id='#=d.id#' #=d.renderCoordinates()#>#= d.renderChildren()#</linearGradient>"),
                    mapCoordinates: function() {
                        var e = this.srcElement,
                            t = e.start(),
                            n = e.end(),
                            i = [
                                ["x1", t.x],
                                ["y1", t.y],
                                ["x2", n.x],
                                ["y2", n.y], this.mapSpace()
                            ];
                        return i
                    }
                }),
                $ = q.extend({
                    template: w("<radialGradient id='#=d.id#' #=d.renderCoordinates()#>#= d.renderChildren()#</radialGradient>"),
                    mapCoordinates: function() {
                        var e = this.srcElement,
                            t = e.center(),
                            n = e.radius(),
                            i = [
                                ["cx", t.x],
                                ["cy", t.y],
                                ["r", n], this.mapSpace()
                            ];
                        return i
                    }
                }),
                Y = H.extend({
                    geometryChange: function() {
                        var e = this.srcElement.geometry();
                        this.attr("x", e.origin.x), this.attr("y", e.origin.y), this.attr("width", e.size.width), this.attr("height", e.size.height), this.invalidate()
                    },
                    size: function() {
                        return this.srcElement.geometry().size
                    },
                    origin: function() {
                        return this.srcElement.geometry().origin
                    },
                    template: w("<rect #= d.renderStyle() # #= d.renderOpacity() # x='#= d.origin().x #' y='#= d.origin().y #' width='#= d.size().width #' height='#= d.size().height #'#= d.renderStroke() # #= d.renderFill() # #= d.renderDefinitions() # #= d.renderTransform() # />")
                }),
                K = {
                    Group: L,
                    Text: U,
                    Path: H,
                    MultiPath: O,
                    Circle: V,
                    Arc: N,
                    Image: W,
                    Rect: Y
                },
                Q = function(e, t) {
                    e.innerHTML = t
                };
            ! function() {
                var e = "<svg xmlns='" + E + "'></svg>",
                    t = c.createElement("div"),
                    n = typeof DOMParser != I;
                t.innerHTML = e, n && t.firstChild.namespaceURI != E && (Q = function(e, t) {
                    var n = new DOMParser,
                        i = n.parseFromString(t, "text/xml"),
                        r = c.adoptNode(i.documentElement);
                    e.innerHTML = "", e.appendChild(r)
                })
            }(), s._element = document.createElement("span"), l = {
                clip: "clip-path",
                fill: "fill"
            }, d.support.svg = function() {
                return c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")
            }(), d.support.svg && f.SurfaceFactory.current.register("svg", M, 10), u(f, {
                exportSVG: o,
                svg: {
                    ArcNode: N,
                    CircleNode: V,
                    ClipNode: B,
                    DefinitionNode: z,
                    GradientStopNode: j,
                    GroupNode: L,
                    ImageNode: W,
                    LinearGradientNode: G,
                    MultiPathNode: O,
                    Node: R,
                    PathNode: H,
                    RadialGradientNode: $,
                    RectNode: Y,
                    RootNode: P,
                    Surface: M,
                    TextNode: U,
                    _exportGroup: r
                }
            })
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("drawing/canvas.min", ["drawing/shapes.min", "kendo.color.min"], e)
    }(function() {
        ! function(e) {
            function t(t, n) {
                var i, r, o, a, s, l, c = {
                        width: "800px",
                        height: "600px",
                        cors: "Anonymous"
                    },
                    d = t.clippedBBox();
                return d && (i = d.getOrigin(), r = new y.Group, r.transform(w.transform().translate(-i.x, -i.y)), r.children.push(t), t = r, o = d.getSize(), c.width = o.width + "px", c.height = o.height + "px"), n = p(c, n), a = e("<div />").css({
                    display: "none",
                    width: n.width,
                    height: n.height
                }).appendTo(document.body), s = new D(a, n), s.draw(t),
                    l = s.image(), l.always(function() {
                    s.destroy(), a.remove()
                }), l
            }

            function n(e, t) {
                var n, i, r;
                for (r = 0; t.length > r; r++) i = t[r], n = f.parseColor(i.color()), n.a *= i.opacity(), e.addColorStop(i.offset(), n.toCssRgba())
            }
            var i, r, o, a, s, l, c, d, u, h = document,
                f = window.kendo,
                p = f.deepExtend,
                m = f.util,
                g = m.defined,
                v = m.isTransparent,
                _ = m.renderTemplate,
                b = m.valueOrDefault,
                w = f.geometry,
                y = f.drawing,
                k = y.BaseNode,
                x = "butt",
                C = y.DASH_ARRAYS,
                S = 1e3 / 60,
                T = "solid",
                D = y.Surface.extend({
                    init: function(t, n) {
                        y.Surface.fn.init.call(this, t, n), this.element[0].innerHTML = this._template(this);
                        var r = this.element[0].firstElementChild;
                        r.width = e(t).width(), r.height = e(t).height(), this._rootElement = r, this._root = new i(r)
                    },
                    destroy: function() {
                        y.Surface.fn.destroy.call(this), this._root && (this._root.destroy(), this._root = null)
                    },
                    type: "canvas",
                    draw: function(e) {
                        y.Surface.fn.draw.call(this, e), this._root.load([e], void 0, this.options.cors)
                    },
                    clear: function() {
                        y.Surface.fn.clear.call(this), this._root.clear()
                    },
                    image: function() {
                        var t, n = this._root,
                            i = this._rootElement,
                            r = [];
                        return n.traverse(function(e) {
                            e.loading && r.push(e.loading)
                        }), t = e.Deferred(), e.when.apply(e, r).done(function() {
                            n._invalidate();
                            try {
                                var e = i.toDataURL();
                                t.resolve(e)
                            } catch (r) {
                                t.reject(r)
                            }
                        }).fail(function(e) {
                            t.reject(e)
                        }), t.promise()
                    },
                    _resize: function() {
                        this._rootElement.width = this._size.width, this._rootElement.height = this._size.height, this._root.invalidate()
                    },
                    _template: _("<canvas style='width: 100%; height: 100%;'></canvas>")
                }),
                A = k.extend({
                    init: function(e) {
                        k.fn.init.call(this, e), e && this.initClip()
                    },
                    initClip: function() {
                        var e = this.srcElement.clip();
                        e && (this.clip = e, e.addObserver(this))
                    },
                    clear: function() {
                        this.srcElement && this.srcElement.removeObserver(this), this.clearClip(), k.fn.clear.call(this)
                    },
                    clearClip: function() {
                        this.clip && (this.clip.removeObserver(this), delete this.clip)
                    },
                    setClip: function(e) {
                        this.clip && (e.beginPath(), r.fn.renderPoints(e, this.clip), e.clip())
                    },
                    optionsChange: function(e) {
                        "clip" == e.field && (this.clearClip(), this.initClip()), k.fn.optionsChange.call(this, e)
                    },
                    setTransform: function(e) {
                        if (this.srcElement) {
                            var t = this.srcElement.transform();
                            t && e.transform.apply(e, t.matrix().toArray(6))
                        }
                    },
                    loadElements: function(e, t, n) {
                        var i, r, o, a, s = this;
                        for (a = 0; e.length > a; a++) r = e[a], o = r.children, i = new u[r.nodeType](r, n), o && o.length > 0 && i.load(o, t, n), g(t) ? s.insertAt(i, t) : s.append(i)
                    },
                    load: function(e, t, n) {
                        this.loadElements(e, t, n), this.invalidate()
                    },
                    setOpacity: function(e) {
                        if (this.srcElement) {
                            var t = this.srcElement.opacity();
                            g(t) && this.globalAlpha(e, t)
                        }
                    },
                    globalAlpha: function(e, t) {
                        t && e.globalAlpha && (t *= e.globalAlpha), e.globalAlpha = t
                    },
                    visible: function() {
                        var e = this.srcElement;
                        return !e || e && e.options.visible !== !1
                    }
                }),
                E = A.extend({
                    renderTo: function(e) {
                        var t, n, i;
                        if (this.visible()) {
                            for (e.save(), this.setTransform(e), this.setClip(e), this.setOpacity(e), t = this.childNodes, n = 0; t.length > n; n++) i = t[n], i.visible() && i.renderTo(e);
                            e.restore()
                        }
                    }
                });
            y.mixins.Traversable.extend(E.fn, "childNodes"), i = E.extend({
                init: function(t) {
                    E.fn.init.call(this), this.canvas = t, this.ctx = t.getContext("2d");
                    var n = e.proxy(this._invalidate, this);
                    this.invalidate = f.throttle(function() {
                        f.animationFrame(n)
                    }, S)
                },
                destroy: function() {
                    E.fn.destroy.call(this), this.canvas = null, this.ctx = null
                },
                load: function(e, t, n) {
                    this.loadElements(e, t, n), this._invalidate()
                },
                _invalidate: function() {
                    this.ctx && (this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), this.renderTo(this.ctx))
                }
            }), y.mixins.Traversable.extend(i.fn, "childNodes"), r = A.extend({
                renderTo: function(e) {
                    e.save(), this.setTransform(e), this.setClip(e), this.setOpacity(e), e.beginPath(), this.renderPoints(e, this.srcElement), this.setLineDash(e), this.setLineCap(e), this.setLineJoin(e), this.setFill(e), this.setStroke(e), e.restore()
                },
                setFill: function(e) {
                    var t = this.srcElement.options.fill,
                        n = !1;
                    return t && ("gradient" == t.nodeType ? (this.setGradientFill(e, t), n = !0) : v(t.color) || (e.fillStyle = t.color, e.save(), this.globalAlpha(e, t.opacity), e.fill(), e.restore(), n = !0)), n
                },
                setGradientFill: function(e, t) {
                    var i, r, o, a, s = this.srcElement.rawBBox();
                    t instanceof y.LinearGradient ? (r = t.start(), o = t.end(), i = e.createLinearGradient(r.x, r.y, o.x, o.y)) : t instanceof y.RadialGradient && (a = t.center(), i = e.createRadialGradient(a.x, a.y, 0, a.x, a.y, t.radius())), n(i, t.stops), e.save(), t.userSpace() || e.transform(s.width(), 0, 0, s.height(), s.origin.x, s.origin.y), e.fillStyle = i, e.fill(), e.restore()
                },
                setStroke: function(e) {
                    var t = this.srcElement.options.stroke;
                    return t && !v(t.color) && t.width > 0 ? (e.strokeStyle = t.color, e.lineWidth = b(t.width, 1), e.save(), this.globalAlpha(e, t.opacity), e.stroke(), e.restore(), !0) : void 0
                },
                dashType: function() {
                    var e = this.srcElement.options.stroke;
                    return e && e.dashType ? e.dashType.toLowerCase() : void 0
                },
                setLineDash: function(e) {
                    var t, n = this.dashType();
                    n && n != T && (t = C[n], e.setLineDash ? e.setLineDash(t) : (e.mozDash = t, e.webkitLineDash = t))
                },
                setLineCap: function(e) {
                    var t = this.dashType(),
                        n = this.srcElement.options.stroke;
                    t && t !== T ? e.lineCap = x : n && n.lineCap && (e.lineCap = n.lineCap)
                },
                setLineJoin: function(e) {
                    var t = this.srcElement.options.stroke;
                    t && t.lineJoin && (e.lineJoin = t.lineJoin)
                },
                renderPoints: function(e, t) {
                    var n, i, r, o, a, s, l = t.segments;
                    if (0 !== l.length) {
                        for (n = l[0], i = n.anchor(), e.moveTo(i.x, i.y), r = 1; l.length > r; r++) n = l[r], i = n.anchor(), o = l[r - 1], a = o.controlOut(), s = n.controlIn(), a && s ? e.bezierCurveTo(a.x, a.y, s.x, s.y, i.x, i.y) : e.lineTo(i.x, i.y);
                        t.options.closed && e.closePath()
                    }
                }
            }), o = r.extend({
                renderPoints: function(e) {
                    var t, n = this.srcElement.paths;
                    for (t = 0; n.length > t; t++) r.fn.renderPoints(e, n[t])
                }
            }), a = r.extend({
                renderPoints: function(e) {
                    var t = this.srcElement.geometry(),
                        n = t.center,
                        i = t.radius;
                    e.arc(n.x, n.y, i, 0, 2 * Math.PI)
                }
            }), s = r.extend({
                renderPoints: function(e) {
                    var t = this.srcElement.toPath();
                    r.fn.renderPoints.call(this, e, t)
                }
            }), l = r.extend({
                renderTo: function(e) {
                    var t = this.srcElement,
                        n = t.position(),
                        i = t.measure();
                    e.save(), this.setTransform(e), this.setClip(e), this.setOpacity(e), e.beginPath(), e.font = t.options.font, this.setFill(e) && e.fillText(t.content(), n.x, n.y + i.baseline), this.setStroke(e) && (this.setLineDash(e), e.strokeText(t.content(), n.x, n.y + i.baseline)), e.restore()
                }
            }), c = r.extend({
                init: function(t, n) {
                    r.fn.init.call(this, t), this.onLoad = e.proxy(this.onLoad, this), this.onError = e.proxy(this.onError, this), this.loading = e.Deferred();
                    var i = this.img = new Image;
                    n && !/^data:/i.test(t.src()) && (i.crossOrigin = n), i.src = t.src(), i.complete ? this.onLoad() : (i.onload = this.onLoad, i.onerror = this.onError)
                },
                renderTo: function(e) {
                    "resolved" === this.loading.state() && (e.save(), this.setTransform(e), this.setClip(e), this.drawImage(e), e.restore())
                },
                optionsChange: function(t) {
                    "src" === t.field ? (this.loading = e.Deferred(), this.img.src = this.srcElement.src()) : r.fn.optionsChange.call(this, t)
                },
                onLoad: function() {
                    this.loading.resolve(), this.invalidate()
                },
                onError: function() {
                    this.loading.reject(Error("Unable to load image '" + this.img.src + "'. Check for connectivity and verify CORS headers."))
                },
                drawImage: function(e) {
                    var t = this.srcElement.rect(),
                        n = t.topLeft();
                    e.drawImage(this.img, n.x, n.y, t.width(), t.height())
                }
            }), d = r.extend({
                renderPoints: function(e) {
                    var t = this.srcElement.geometry(),
                        n = t.origin,
                        i = t.size;
                    e.rect(n.x, n.y, i.width, i.height)
                }
            }), u = {
                Group: E,
                Text: l,
                Path: r,
                MultiPath: o,
                Circle: a,
                Arc: s,
                Image: c,
                Rect: d
            }, f.support.canvas = function() {
                return !!h.createElement("canvas").getContext
            }(), f.support.canvas && y.SurfaceFactory.current.register("canvas", D, 20), p(f.drawing, {
                exportImage: t,
                canvas: {
                    ArcNode: s,
                    CircleNode: a,
                    GroupNode: E,
                    ImageNode: c,
                    MultiPathNode: o,
                    Node: A,
                    PathNode: r,
                    RectNode: d,
                    RootNode: i,
                    Surface: D,
                    TextNode: l
                }
            })
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("drawing/vml.min", ["drawing/shapes.min", "kendo.color.min"], e)
    }(function() {
        ! function(e) {
            function t() {
                if (u.namespaces && !u.namespaces.kvml) {
                    u.namespaces.add("kvml", "urn:schemas-microsoft-com:vml");
                    var e = u.styleSheets.length > 30 ? u.styleSheets[0] : u.createStyleSheet();
                    e.addRule(".kvml", "behavior:url(#default#VML)")
                }
            }

            function n(e) {
                var t = u.createElement("kvml:" + e);
                return t.className = "kvml", t
            }

            function i(e) {
                var t, n = e.length,
                    i = [];
                for (t = 0; n > t; t++) i.push(e[t].scaleCopy(M).toString(0, ","));
                return i.join(" ")
            }

            function r(e, t) {
                var n, r, a, s, l, c = e.segments,
                    d = c.length;
                if (d > 0) {
                    for (n = [], l = 1; d > l; l++) a = o(c[l - 1], c[l]), a !== s && (s = a, n.push(a)), n.push("l" === a ? i([c[l].anchor()]) : i([c[l - 1].controlOut(), c[l].controlIn(), c[l].anchor()]));
                    return r = "m " + i([c[0].anchor()]) + " " + n.join(" "), e.options.closed && (r += " x"), t !== !0 && (r += " e"), r
                }
            }

            function o(e, t) {
                return e.controlOut() && t.controlIn() ? "c" : "l"
            }

            function a(e) {
                return 0 === e.indexOf("fill") || 0 === e.indexOf(P)
            }

            function s(e, t, n) {
                var i, r = n * E(t.opacity(), 1);
                return i = e ? l(e, t.color(), r) : l(t.color(), "#fff", 1 - r)
            }

            function l(e, t, n) {
                var i = new x(e),
                    r = new x(t),
                    o = c(i.r, r.r, n),
                    a = c(i.g, r.g, n),
                    s = c(i.b, r.b, n);
                return new x(o, a, s).toHex()
            }

            function c(e, t, n) {
                return h.round(n * t + (1 - n) * e)
            }
            var d, u = document,
                h = Math,
                f = h.atan2,
                p = h.ceil,
                m = h.sqrt,
                g = window.kendo,
                v = g.deepExtend,
                _ = e.noop,
                b = g.drawing,
                w = b.BaseNode,
                y = g.geometry,
                k = y.toMatrix,
                x = g.Color,
                C = g.util,
                S = C.isTransparent,
                T = C.defined,
                D = C.deg,
                A = C.round,
                E = C.valueOrDefault,
                F = "none",
                I = ".kendo",
                M = 100,
                R = M * M,
                P = "gradient",
                z = 4,
                B = b.Surface.extend({
                    init: function(e, n) {
                        b.Surface.fn.init.call(this, e, n), t(), this.element.empty(), this._root = new H, this._root.attachTo(this.element[0]), this.element.on("click" + I, this._click), this.element.on("mouseover" + I, this._mouseenter), this.element.on("mouseout" + I, this._mouseleave)
                    },
                    type: "vml",
                    destroy: function() {
                        this._root && (this._root.destroy(), this._root = null, this.element.off(I)), b.Surface.fn.destroy.call(this)
                    },
                    draw: function(e) {
                        b.Surface.fn.draw.call(this, e), this._root.load([e], void 0, null)
                    },
                    clear: function() {
                        b.Surface.fn.clear.call(this), this._root.clear()
                    }
                }),
                L = w.extend({
                    init: function(e) {
                        w.fn.init.call(this, e), this.createElement(), this.attachReference()
                    },
                    observe: _,
                    destroy: function() {
                        this.element && (this.element._kendoNode = null, this.element = null), w.fn.destroy.call(this)
                    },
                    clear: function() {
                        var e, t;
                        for (this.element && (this.element.innerHTML = ""), e = this.childNodes, t = 0; e.length > t; t++) e[t].destroy();
                        this.childNodes = []
                    },
                    removeSelf: function() {
                        this.element && (this.element.parentNode.removeChild(this.element), this.element = null), w.fn.removeSelf.call(this)
                    },
                    createElement: function() {
                        this.element = u.createElement("div")
                    },
                    attachReference: function() {
                        this.element._kendoNode = this
                    },
                    load: function(e, t, n, i) {
                        var r, o, a, s, l, c;
                        for (i = E(i, 1), this.srcElement && (i *= E(this.srcElement.options.opacity, 1)), r = 0; e.length > r; r++) o = e[r], a = o.children, s = o.currentTransform(n), l = i * E(o.options.opacity, 1), c = new le[o.nodeType](o, s, l), a && a.length > 0 && c.load(a, t, s, i), T(t) ? this.insertAt(c, t) : this.append(c), c.attachTo(this.element, t)
                    },
                    attachTo: function(e, t) {
                        T(t) ? e.insertBefore(this.element, e.children[t] || null) : e.appendChild(this.element)
                    },
                    optionsChange: function(e) {
                        "visible" == e.field && this.css("display", e.value !== !1 ? "" : F)
                    },
                    setStyle: function() {
                        this.allCss(this.mapStyle())
                    },
                    mapStyle: function() {
                        var e = [];
                        return this.srcElement && this.srcElement.options.visible === !1 && e.push(["display", F]), e
                    },
                    mapOpacityTo: function(e, t) {
                        var n = E(this.opacity, 1);
                        n *= E(t, 1), e.push(["opacity", n])
                    },
                    attr: function(e, t) {
                        this.element && (this.element[e] = t)
                    },
                    allAttr: function(e) {
                        for (var t = 0; e.length > t; t++) this.attr(e[t][0], e[t][1])
                    },
                    css: function(e, t) {
                        this.element && (this.element.style[e] = t)
                    },
                    allCss: function(e) {
                        for (var t = 0; e.length > t; t++) this.css(e[t][0], e[t][1])
                    }
                }),
                H = L.extend({
                    createElement: function() {
                        L.fn.createElement.call(this), this.allCss([
                            ["width", "100%"],
                            ["height", "100%"],
                            ["position", "relative"],
                            ["visibility", "visible"]
                        ])
                    },
                    attachReference: _
                }),
                N = g.Class.extend({
                    init: function(e, t) {
                        this.srcElement = e, this.observer = t, e.addObserver(this)
                    },
                    geometryChange: function() {
                        this.observer.optionsChange({
                            field: "clip",
                            value: this.srcElement
                        })
                    },
                    clear: function() {
                        this.srcElement.removeObserver(this)
                    }
                }),
                O = L.extend({
                    init: function(e) {
                        L.fn.init.call(this, e), e && this.initClip()
                    },
                    observe: function() {
                        w.fn.observe.call(this)
                    },
                    mapStyle: function() {
                        var e = L.fn.mapStyle.call(this);
                        return this.srcElement && this.srcElement.clip() && e.push(["clip", this.clipRect()]), e
                    },
                    optionsChange: function(e) {
                        "clip" == e.field && (this.clearClip(), this.initClip(), this.setClip()), L.fn.optionsChange.call(this, e)
                    },
                    clear: function() {
                        this.clearClip(), L.fn.clear.call(this)
                    },
                    initClip: function() {
                        this.srcElement.clip() && (this.clip = new N(this.srcElement.clip(), this), this.clip.observer = this)
                    },
                    clearClip: function() {
                        this.clip && (this.clip.clear(), this.clip = null, this.css("clip", this.clipRect()))
                    },
                    setClip: function() {
                        this.clip && this.css("clip", this.clipRect())
                    },
                    clipRect: function() {
                        var e, t, n, i = d,
                            r = this.srcElement.clip();
                        return r && (e = this.clipBBox(r), t = e.topLeft(), n = e.bottomRight(), i = g.format("rect({0}px {1}px {2}px {3}px)", t.y, n.x, n.y, t.x)), i
                    },
                    clipBBox: function(e) {
                        var t = this.srcElement.rawBBox().topLeft(),
                            n = e.rawBBox();
                        return n.origin.translate(-t.x, -t.y), n
                    }
                }),
                V = O.extend({
                    createElement: function() {
                        L.fn.createElement.call(this), this.setStyle()
                    },
                    attachTo: function(e, t) {
                        this.css("display", F), L.fn.attachTo.call(this, e, t), this.srcElement.options.visible !== !1 && this.css("display", "")
                    },
                    _attachTo: function(e) {
                        var t = document.createDocumentFragment();
                        t.appendChild(this.element), e.appendChild(t)
                    },
                    mapStyle: function() {
                        var e = O.fn.mapStyle.call(this);
                        return e.push(["position", "absolute"]), e.push(["white-space", "nowrap"]), e
                    },
                    optionsChange: function(e) {
                        "transform" === e.field && this.refreshTransform(), "opacity" === e.field && this.refreshOpacity(), O.fn.optionsChange.call(this, e)
                    },
                    refreshTransform: function(e) {
                        var t, n = this.srcElement.currentTransform(e),
                            i = this.childNodes,
                            r = i.length;
                        for (this.setClip(), t = 0; r > t; t++) i[t].refreshTransform(n)
                    },
                    currentOpacity: function() {
                        var e = E(this.srcElement.options.opacity, 1);
                        return this.parent && this.parent.currentOpacity && (e *= this.parent.currentOpacity()), e
                    },
                    refreshOpacity: function() {
                        var e, t = this.childNodes,
                            n = t.length,
                            i = this.currentOpacity();
                        for (e = 0; n > e; e++) t[e].refreshOpacity(i)
                    },
                    initClip: function() {
                        if (O.fn.initClip.call(this), this.clip) {
                            var e = this.clip.srcElement.bbox(this.srcElement.currentTransform());
                            e && (this.css("width", e.width() + e.origin.x), this.css("height", e.height() + e.origin.y))
                        }
                    },
                    clipBBox: function(e) {
                        return e.bbox(this.srcElement.currentTransform())
                    },
                    clearClip: function() {
                        O.fn.clearClip.call(this)
                    }
                }),
                U = L.extend({
                    init: function(e, t) {
                        this.opacity = t, L.fn.init.call(this, e)
                    },
                    createElement: function() {
                        this.element = n("stroke"), this.setOpacity()
                    },
                    optionsChange: function(e) {
                        0 === e.field.indexOf("stroke") && this.setStroke()
                    },
                    refreshOpacity: function(e) {
                        this.opacity = e, this.setStroke()
                    },
                    setStroke: function() {
                        this.allAttr(this.mapStroke())
                    },
                    setOpacity: function() {
                        this.setStroke()
                    },
                    mapStroke: function() {
                        var e, t = this.srcElement.options.stroke,
                            n = [];
                        return t && !S(t.color) && 0 !== t.width ? (n.push(["on", "true"]), n.push(["color", t.color]), n.push(["weight", (t.width || 1) + "px"]), this.mapOpacityTo(n, t.opacity), T(t.dashType) && n.push(["dashstyle", t.dashType]), T(t.lineJoin) && n.push(["joinstyle", t.lineJoin]), T(t.lineCap) && (e = t.lineCap.toLowerCase(), "butt" === e && (e = "butt" === e ? "flat" : e), n.push(["endcap", e]))) : n.push(["on", "false"]), n
                    }
                }),
                W = L.extend({
                    init: function(e, t, n) {
                        this.opacity = n, L.fn.init.call(this, e)
                    },
                    createElement: function() {
                        this.element = n("fill"), this.setFill()
                    },
                    optionsChange: function(e) {
                        a(e.field) && this.setFill()
                    },
                    refreshOpacity: function(e) {
                        this.opacity = e, this.setOpacity()
                    },
                    setFill: function() {
                        this.allAttr(this.mapFill())
                    },
                    setOpacity: function() {
                        this.setFill()
                    },
                    attr: function(e, t) {
                        var n, i = this.element;
                        if (i) {
                            for (n = e.split("."); n.length > 1;) i = i[n.shift()];
                            i[n[0]] = t
                        }
                    },
                    mapFill: function() {
                        var e = this.srcElement.fill(),
                            t = [
                                ["on", "false"]
                            ];
                        return e && (e.nodeType == P ? t = this.mapGradient(e) : S(e.color) || (t = this.mapFillColor(e))), t
                    },
                    mapFillColor: function(e) {
                        var t = [
                            ["on", "true"],
                            ["color", e.color]
                        ];
                        return this.mapOpacityTo(t, e.opacity), t
                    },
                    mapGradient: function(e) {
                        var t, n = this.srcElement.options,
                            i = n.fallbackFill || e.fallbackFill && e.fallbackFill();
                        return t = e instanceof b.LinearGradient ? this.mapLinearGradient(e) : e instanceof b.RadialGradient && e.supportVML ? this.mapRadialGradient(e) : i ? this.mapFillColor(i) : [
                            ["on", "false"]
                        ]
                    },
                    mapLinearGradient: function(e) {
                        var t = e.start(),
                            n = e.end(),
                            i = C.deg(f(n.y - t.y, n.x - t.x)),
                            r = [
                                ["on", "true"],
                                ["type", P],
                                ["focus", 0],
                                ["method", "none"],
                                ["angle", 270 - i]
                            ];
                        return this.addColors(r), r
                    },
                    mapRadialGradient: function(e) {
                        var t = this.srcElement.rawBBox(),
                            n = e.center(),
                            i = (n.x - t.origin.x) / t.width(),
                            r = (n.y - t.origin.y) / t.height(),
                            o = [
                                ["on", "true"],
                                ["type", "gradienttitle"],
                                ["focus", "100%"],
                                ["focusposition", i + " " + r],
                                ["method", "none"]
                            ];
                        return this.addColors(o), o
                    },
                    addColors: function(e) {
                        var t, n, i = this.srcElement.options,
                            r = E(this.opacity, 1),
                            o = [],
                            a = i.fill.stops,
                            l = i.baseColor,
                            c = this.element.colors ? "colors.value" : "colors",
                            d = s(l, a[0], r),
                            u = s(l, a[a.length - 1], r);
                        for (n = 0; a.length > n; n++) t = a[n], o.push(h.round(100 * t.offset()) + "% " + s(l, t, r));
                        e.push([c, o.join(",")], ["color", d], ["color2", u])
                    }
                }),
                j = L.extend({
                    init: function(e, t) {
                        this.transform = t, L.fn.init.call(this, e)
                    },
                    createElement: function() {
                        this.element = n("skew"), this.setTransform()
                    },
                    optionsChange: function(e) {
                        "transform" === e.field && this.refresh(this.srcElement.currentTransform())
                    },
                    refresh: function(e) {
                        this.transform = e, this.setTransform()
                    },
                    transformOrigin: function() {
                        return "-0.5,-0.5"
                    },
                    setTransform: function() {
                        this.allAttr(this.mapTransform())
                    },
                    mapTransform: function() {
                        var e = this.transform,
                            t = [],
                            n = k(e);
                        return n ? (n.round(z), t.push(["on", "true"], ["matrix", [n.a, n.c, n.b, n.d, 0, 0].join(",")], ["offset", n.e + "px," + n.f + "px"], ["origin", this.transformOrigin()])) : t.push(["on", "false"]), t
                    }
                }),
                q = O.extend({
                    init: function(e, t, n) {
                        this.fill = this.createFillNode(e, t, n), this.stroke = new U(e, n), this.transform = this.createTransformNode(e, t), O.fn.init.call(this, e)
                    },
                    attachTo: function(e, t) {
                        this.fill.attachTo(this.element), this.stroke.attachTo(this.element), this.transform.attachTo(this.element), L.fn.attachTo.call(this, e, t)
                    },
                    createFillNode: function(e, t, n) {
                        return new W(e, t, n)
                    },
                    createTransformNode: function(e, t) {
                        return new j(e, t)
                    },
                    createElement: function() {
                        this.element = n("shape"), this.setCoordsize(), this.setStyle()
                    },
                    optionsChange: function(e) {
                        a(e.field) ? this.fill.optionsChange(e) : 0 === e.field.indexOf("stroke") ? this.stroke.optionsChange(e) : "transform" === e.field ? this.transform.optionsChange(e) : "opacity" === e.field && (this.fill.setOpacity(), this.stroke.setOpacity()), O.fn.optionsChange.call(this, e)
                    },
                    refreshTransform: function(e) {
                        this.transform.refresh(this.srcElement.currentTransform(e))
                    },
                    refreshOpacity: function(e) {
                        e *= E(this.srcElement.options.opacity, 1), this.fill.refreshOpacity(e), this.stroke.refreshOpacity(e)
                    },
                    mapStyle: function(e, t) {
                        var n, i = O.fn.mapStyle.call(this);
                        return e && t || (e = t = M), i.push(["position", "absolute"], ["width", e + "px"], ["height", t + "px"]), n = this.srcElement.options.cursor, n && i.push(["cursor", n]), i
                    },
                    setCoordsize: function() {
                        this.allAttr([
                            ["coordorigin", "0 0"],
                            ["coordsize", R + " " + R]
                        ])
                    }
                }),
                G = L.extend({
                    createElement: function() {
                        this.element = n("path"), this.setPathData()
                    },
                    geometryChange: function() {
                        this.setPathData()
                    },
                    setPathData: function() {
                        this.attr("v", this.renderData())
                    },
                    renderData: function() {
                        return r(this.srcElement)
                    }
                }),
                $ = q.extend({
                    init: function(e, t, n) {
                        this.pathData = this.createDataNode(e), q.fn.init.call(this, e, t, n)
                    },
                    attachTo: function(e, t) {
                        this.pathData.attachTo(this.element), q.fn.attachTo.call(this, e, t)
                    },
                    createDataNode: function(e) {
                        return new G(e)
                    },
                    geometryChange: function() {
                        this.pathData.geometryChange(), q.fn.geometryChange.call(this)
                    }
                }),
                Y = G.extend({
                    renderData: function() {
                        var e, t, n, i = this.srcElement.paths;
                        if (i.length > 0) {
                            for (e = [], t = 0; i.length > t; t++) n = i.length - 1 > t, e.push(r(i[t], n));
                            return e.join(" ")
                        }
                    }
                }),
                K = $.extend({
                    createDataNode: function(e) {
                        return new Y(e)
                    }
                }),
                Q = j.extend({
                    transformOrigin: function() {
                        var e = this.srcElement.geometry().bbox(),
                            t = e.center(),
                            n = -p(t.x) / p(e.width()),
                            i = -p(t.y) / p(e.height());
                        return n + "," + i
                    }
                }),
                X = q.extend({
                    createElement: function() {
                        this.element = n("oval"), this.setStyle()
                    },
                    createTransformNode: function(e, t) {
                        return new Q(e, t)
                    },
                    geometryChange: function() {
                        q.fn.geometryChange.call(this), this.setStyle(), this.refreshTransform()
                    },
                    mapStyle: function() {
                        var e = this.srcElement.geometry(),
                            t = e.radius,
                            n = e.center,
                            i = p(2 * t),
                            r = q.fn.mapStyle.call(this, i, i);
                        return r.push(["left", p(n.x - t) + "px"], ["top", p(n.y - t) + "px"]), r
                    }
                }),
                J = G.extend({
                    renderData: function() {
                        return r(this.srcElement.toPath())
                    }
                }),
                Z = $.extend({
                    createDataNode: function(e) {
                        return new J(e)
                    }
                }),
                ee = G.extend({
                    createElement: function() {
                        G.fn.createElement.call(this), this.attr("textpathok", !0)
                    },
                    renderData: function() {
                        var e = this.srcElement.rect(),
                            t = e.center();
                        return "m " + i([new y.Point(e.topLeft().x, t.y)]) + " l " + i([new y.Point(e.bottomRight().x, t.y)])
                    }
                }),
                te = L.extend({
                    createElement: function() {
                        this.element = n("textpath"), this.attr("on", !0), this.attr("fitpath", !1), this.setStyle(), this.setString()
                    },
                    optionsChange: function(e) {
                        "content" === e.field ? this.setString() : this.setStyle(), L.fn.optionsChange.call(this, e)
                    },
                    mapStyle: function() {
                        return [
                            ["font", this.srcElement.options.font]
                        ]
                    },
                    setString: function() {
                        this.attr("string", this.srcElement.content())
                    }
                }),
                ne = $.extend({
                    init: function(e, t, n) {
                        this.path = new te(e), $.fn.init.call(this, e, t, n)
                    },
                    createDataNode: function(e) {
                        return new ee(e)
                    },
                    attachTo: function(e, t) {
                        this.path.attachTo(this.element), $.fn.attachTo.call(this, e, t)
                    },
                    optionsChange: function(e) {
                        ("font" === e.field || "content" === e.field) && (this.path.optionsChange(e), this.pathData.geometryChange(e)), $.fn.optionsChange.call(this, e)
                    }
                }),
                ie = G.extend({
                    renderData: function() {
                        var e = this.srcElement.rect(),
                            t = (new b.Path).moveTo(e.topLeft()).lineTo(e.topRight()).lineTo(e.bottomRight()).lineTo(e.bottomLeft()).close();
                        return r(t)
                    }
                }),
                re = j.extend({
                    init: function(e, t, n) {
                        this.opacity = n, j.fn.init.call(this, e, t)
                    },
                    createElement: function() {
                        this.element = n("fill"), this.attr("type", "frame"), this.attr("rotate", !0), this.setOpacity(), this.setSrc(), this.setTransform()
                    },
                    optionsChange: function(e) {
                        "src" === e.field && this.setSrc(), j.fn.optionsChange.call(this, e)
                    },
                    geometryChange: function() {
                        this.refresh()
                    },
                    refreshOpacity: function(e) {
                        this.opacity = e, this.setOpacity()
                    },
                    setOpacity: function() {
                        var e = [];
                        this.mapOpacityTo(e, this.srcElement.options.opacity), this.allAttr(e)
                    },
                    setSrc: function() {
                        this.attr("src", this.srcElement.src())
                    },
                    mapTransform: function() {
                        var e, t, n, i, r, o, a, s, l = this.srcElement,
                            c = l.rawBBox(),
                            d = c.center(),
                            u = M / 2,
                            h = M,
                            p = c.width() / h,
                            g = c.height() / h,
                            v = 0,
                            _ = this.transform;
                        return _ ? (n = k(_), i = m(n.a * n.a + n.b * n.b), r = m(n.c * n.c + n.d * n.d), p *= i, g *= r, o = D(f(n.b, n.d)), a = D(f(-n.c, n.a)), v = (o + a) / 2, 0 !== v ? (s = l.bbox().center(), e = (s.x - u) / h, t = (s.y - u) / h) : (e = (d.x * i + n.e - u) / h, t = (d.y * r + n.f - u) / h)) : (e = (d.x - u) / h, t = (d.y - u) / h), p = A(p, z), g = A(g, z), e = A(e, z), t = A(t, z), v = A(v, z), [
                            ["size", p + "," + g],
                            ["position", e + "," + t],
                            ["angle", v]
                        ]
                    }
                }),
                oe = $.extend({
                    createFillNode: function(e, t, n) {
                        return new re(e, t, n)
                    },
                    createDataNode: function(e) {
                        return new ie(e)
                    },
                    optionsChange: function(e) {
                        ("src" === e.field || "transform" === e.field) && this.fill.optionsChange(e), $.fn.optionsChange.call(this, e)
                    },
                    geometryChange: function() {
                        this.fill.geometryChange(), $.fn.geometryChange.call(this)
                    },
                    refreshTransform: function(e) {
                        $.fn.refreshTransform.call(this, e), this.fill.refresh(this.srcElement.currentTransform(e))
                    }
                }),
                ae = G.extend({
                    renderData: function() {
                        var e = this.srcElement.geometry(),
                            t = ["m", i([e.topLeft()]), "l", i([e.topRight(), e.bottomRight(), e.bottomLeft()]), "x e"];
                        return t.join(" ")
                    }
                }),
                se = $.extend({
                    createDataNode: function(e) {
                        return new ae(e)
                    }
                }),
                le = {
                    Group: V,
                    Text: ne,
                    Path: $,
                    MultiPath: K,
                    Circle: X,
                    Arc: Z,
                    Image: oe,
                    Rect: se
                };
            g.support.vml = function() {
                var e = g.support.browser;
                return e.msie && 9 > e.version
            }(), d = "inherit", g.support.browser.msie && 8 > g.support.browser.version && (d = "rect(auto auto auto auto)"), g.support.vml && b.SurfaceFactory.current.register("vml", B, 30), v(b, {
                vml: {
                    ArcDataNode: J,
                    ArcNode: Z,
                    CircleTransformNode: Q,
                    CircleNode: X,
                    FillNode: W,
                    GroupNode: V,
                    ImageNode: oe,
                    ImageFillNode: re,
                    ImagePathDataNode: ie,
                    MultiPathDataNode: Y,
                    MultiPathNode: K,
                    Node: L,
                    PathDataNode: G,
                    PathNode: $,
                    RectDataNode: ae,
                    RectNode: se,
                    RootNode: H,
                    StrokeNode: U,
                    Surface: B,
                    TextNode: ne,
                    TextPathNode: te,
                    TextPathDataNode: ee,
                    TransformNode: j
                }
            })
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("drawing/html.min", ["kendo.color.min", "drawing/shapes.min", "util/main.min", "util/text-metrics.min"], e)
    }(function() {
        ! function(e, t, n) {
            "use strict";

            function i(n, i) {
                function o(t) {
                    var n = new se.Group,
                        r = t.getBoundingClientRect();
                    return M(n, [1, 0, 0, 1, -r.left, -r.top]), pe._clipbox = !1, pe._matrix = le.Matrix.unit(), pe._stackingContext = {
                        element: t,
                        group: n
                    }, pe._avoidLinks = i.avoidLinks === !0 ? "a" : i.avoidLinks, e(t).addClass("k-pdf-export"), te(t, n), e(t).removeClass("k-pdf-export"), n
                }

                function a(t) {
                    return null != t ? ("string" == typeof t && (t = kendo.template(t.replace(/^\s+|\s+$/g, ""))), "function" == typeof t ? function(n) {
                        var i = t(n);
                        return i ? ("string" == typeof i && (i = i.replace(/^\s+|\s+$/g, "")), e(i)[0]) : void 0
                    } : function() {
                        return e(t).clone()[0]
                    }) : void 0
                }

                function s(t) {
                    var n, i, r, o, a = t.cloneNode(!1);
                    if (1 == t.nodeType) {
                        n = e(t), i = e(a), o = n.data();
                        for (r in o) i.data(r, o[r]);
                        if (/^canvas$/i.test(t.tagName)) a.getContext("2d").drawImage(t, 0, 0);
                        else if (/^input$/i.test(t.tagName)) t.removeAttribute("name");
                        else
                            for (r = t.firstChild; r; r = r.nextSibling) a.appendChild(s(r))
                    }
                    return a
                }

                function l(n, i, r, o, l, c, d) {
                    function u() {
                        function e() {
                            h(C, function() {
                                n({
                                    pages: C,
                                    container: T
                                })
                            })
                        }
                        var t, i;
                        ("-" != r || l) && p(S), t = v(), S.parentNode.insertBefore(t, S), t.appendChild(S), k ? (i = C.length, C.forEach(function(t, n) {
                            var r = k({
                                element: t,
                                pageNum: n + 1,
                                totalPages: C.length
                            });
                            r && (t.appendChild(r), f(r, function() {
                                0 === --i && e()
                            }))
                        })) : e()
                    }

                    function p(n) {
                        var i, o, a, s, c = w(n),
                            d = t(y(c, "padding-bottom")),
                            u = t(y(c, "border-bottom-width")),
                            h = D;
                        for (D += d + u, i = !0, o = n.firstChild; o; o = o.nextSibling)
                            if (1 == o.nodeType) {
                                if (i = !1, a = e(o), a.is(r)) {
                                    g(o);
                                    continue
                                }
                                if (!l) {
                                    p(o);
                                    continue
                                }
                                if (!/^(?:static|relative)$/.test(y(w(o), "position"))) continue;
                                s = _(o), 1 == s ? g(o) : s && (a.data("kendoChart") || /^(?:img|tr|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(o.tagName)) ? g(o) : p(o)
                            } else 3 == o.nodeType && l && (b(o, i), i = !1);
                        D = h
                    }

                    function m(e) {
                        var t = e.parentNode,
                            n = t.firstChild;
                        if (e === n) return !0;
                        if (e === t.children[0]) {
                            if (7 == n.nodeType || 8 == n.nodeType) return !0;
                            if (3 == n.nodeType) return !/\S/.test(n.data)
                        }
                        return !1
                    }

                    function g(t) {
                        var n, i, r;
                        return 1 == t.nodeType && t !== S && m(t) ? g(t.parentNode) : (n = e(t).closest("table").find("colgroup"), i = v(), r = x.createRange(), r.setStartBefore(S), r.setEndBefore(t), i.appendChild(r.extractContents()), S.parentNode.insertBefore(i, S), void(n[0] && n.clone().prependTo(e(t).closest("table"))))
                    }

                    function v() {
                        var t = x.createElement("KENDO-PDF-PAGE");
                        return e(t).css({
                            display: "block",
                            boxSizing: "content-box",
                            width: o || "auto",
                            padding: c.top + "px " + c.right + "px " + c.bottom + "px " + c.left + "px",
                            position: "relative",
                            height: l || "auto",
                            overflow: l || o ? "hidden" : "visible",
                            clear: "both"
                        }), d && d.pageClassName && (t.className = d.pageClassName), C.push(t), t
                    }

                    function _(e) {
                        var t, n, i = e.getBoundingClientRect();
                        return 0 === i.width || 0 === i.height ? 0 : (t = S.getBoundingClientRect().top, n = l - D, i.height > n ? 3 : i.top - t > n ? 1 : i.bottom - t > n ? 2 : 0)
                    }

                    function b(e, t) {
                        var n, i, r, o, a;
                        /\S/.test(e.data) && (n = e.data.length, i = x.createRange(), i.selectNodeContents(e), r = _(i), r && (o = e, 1 == r ? g(t ? e.parentNode : e) : (! function s(t, n, r) {
                            return i.setEnd(e, n), t == n || n == r ? n : _(i) ? s(t, t + n >> 1, n) : s(n, n + r >> 1, r)
                        }(0, n >> 1, n), !/\S/.test("" + i) && t ? g(e.parentNode) : (o = e.splitText(i.endOffset), a = v(), i.setStartBefore(S), a.appendChild(i.extractContents()), S.parentNode.insertBefore(a, S))), b(o)))
                    }
                    var k = a(d.template),
                        x = i.ownerDocument,
                        C = [],
                        S = s(i),
                        T = x.createElement("KENDO-PDF-DOCUMENT"),
                        D = 0;
                    e(S).find("tfoot").each(function() {
                        this.parentNode.appendChild(this)
                    }), e(S).find("ol").each(function() {
                        e(this).children().each(function(e) {
                            this.setAttribute("kendo-split-index", e)
                        })
                    }), e(T).css({
                        display: "block",
                        position: "absolute",
                        boxSizing: "content-box",
                        left: "-10000px",
                        top: "-10000px"
                    }), o && (e(T).css({
                        width: o,
                        paddingLeft: c.left,
                        paddingRight: c.right
                    }), e(S).css({
                        overflow: "hidden"
                    })), T.appendChild(S), i.parentNode.insertBefore(T, i), d.beforePageBreak ? setTimeout(function() {
                        d.beforePageBreak(T, u)
                    }, 15) : setTimeout(u, 15)
                }
                i || (i = {});
                var c = e.Deferred();
                if (n = e(n)[0], !n) return c.reject("No element to export");
                if ("function" != typeof window.getComputedStyle) throw Error("window.getComputedStyle is missing.  You are using an unsupported browser, or running in IE8 compatibility mode.  Drawing HTML is supported in Chrome, Firefox, Safari and IE9+.");
                return kendo.pdf && kendo.pdf.defineFont(r(n.ownerDocument)), f(n, function() {
                    var e, t = i && i.forcePageBreak,
                        r = i && i.paperSize && "auto" != i.paperSize,
                        a = r && kendo.pdf.getPaperOptions(function(e, t) {
                            return e in i ? i[e] : t
                        }),
                        s = r && a.paperSize[0],
                        d = r && a.paperSize[1],
                        u = i.margin && a.margin;
                    t || d ? (u || (u = {
                        left: 0,
                        top: 0,
                        right: 0,
                        bottom: 0
                    }), e = new se.Group({
                        pdf: {
                            multiPage: !0,
                            paperSize: r ? a.paperSize : "auto"
                        }
                    }), l(function(t) {
                        if (i.progress) {
                            var n = !1,
                                r = 0;
                            ! function a() {
                                t.pages.length > r ? (e.append(o(t.pages[r])), i.progress({
                                    pageNum: ++r,
                                    totalPages: t.pages.length,
                                    cancel: function() {
                                        n = !0
                                    }
                                }), n ? t.container.parentNode.removeChild(t.container) : setTimeout(a)) : (t.container.parentNode.removeChild(t.container), c.resolve(e))
                            }()
                        } else t.pages.forEach(function(t) {
                            e.append(o(t))
                        }), t.container.parentNode.removeChild(t.container), c.resolve(e)
                    }, n, t, s ? s - u.left - u.right : null, d ? d - u.top - u.bottom : null, u, i)) : c.resolve(o(n))
                }), c.promise()
            }

            function r(e) {
                function t(e) {
                    if (e) {
                        var t = null;
                        try {
                            t = e.cssRules
                        } catch (n) {}
                        t && i(e, t)
                    }
                }

                function n(e) {
                    var t, n = y(e.style, "src");
                    return n ? oe(n).reduce(function(e, t) {
                        var n = ae(t);
                        return n && e.push(n), e
                    }, []) : (t = ae(e.cssText), t ? [t] : [])
                }

                function i(e, i) {
                    var o, a, s, l, c, d, u;
                    for (o = 0; i.length > o; ++o) switch (a = i[o], a.type) {
                        case 3:
                            t(a.styleSheet);
                            break;
                        case 5:
                            s = a.style, l = oe(y(s, "font-family")), c = /^([56789]00|bold)$/i.test(y(s, "font-weight")), d = "italic" == y(s, "font-style"), u = n(a), u.length > 0 && r(e, l, c, d, u[0])
                    }
                }

                function r(e, t, n, i, r) {
                    /^data:/i.test(r) || /^[^\/:]+:\/\//.test(r) || /^\//.test(r) || (r = (e.href + "").replace(/[^\/]*$/, "") + r), t.forEach(function(e) {
                        e = e.replace(/^(['"]?)(.*?)\1$/, "$2"), n && (e += "|bold"), i && (e += "|italic"), o[e] = r
                    })
                }
                var o, a;
                for (null == e && (e = document), o = {}, a = 0; e.styleSheets.length > a; ++a) t(e.styleSheets[a]);
                return o
            }

            function o(e, t) {
                return Object.prototype.hasOwnProperty.call(e, t)
            }

            function a(e) {
                return e = "_counter_" + e, pe[e]
            }

            function s(e) {
                var t = [],
                    n = pe;
                for (e = "_counter_" + e; n;) o(n, e) && t.push(n[e]), n = Object.getPrototypeOf(n);
                return t.reverse()
            }

            function l(e, t) {
                var n = pe;
                for (e = "_counter_" + e; n && !o(n, e);) n = Object.getPrototypeOf(n);
                n || (n = pe._root), n[e] = (n[e] || 0) + (null == t ? 1 : t)
            }

            function c(e, t) {
                e = "_counter_" + e, pe[e] = null == t ? 0 : t
            }

            function d(e, n, i) {
                var r, o, a;
                for (r = 0; e.length > r;) o = e[r++], a = t(e[r]), isNaN(a) ? n(o, i) : (n(o, a), ++r)
            }

            function u(e, t) {
                var n = kendo.parseColor(e);
                return n && (n = n.toRGB(), t ? n = n.toCssRgba() : 0 === n.a && (n = null)), n
            }

            function h(e, t) {
                function n() {
                    --i <= 0 && t()
                }
                var i = 0;
                e.forEach(function(e) {
                    var t, r, o = e.querySelectorAll("img");
                    for (t = 0; o.length > t; ++t) r = o[t], r.complete || (i++, r.onload = r.onerror = n)
                }), i || n()
            }

            function f(e, t) {
                function n(e) {
                    fe[e] || (fe[e] = !0, o.push(e))
                }

                function i() {
                    --r <= 0 && t()
                }
                var r, o = [];
                ! function a(e) {
                    /^img$/i.test(e.tagName) && n(e.src), re(y(w(e), "background-image")).forEach(function(e) {
                        "url" == e.type && n(e.url)
                    }), e.children && ce.call(e.children).forEach(a)
                }(e), r = o.length, 0 === r && i(), o.forEach(function(e) {
                    var t = fe[e] = new Image;
                    /^data:/i.test(e) || (t.crossOrigin = "Anonymous"), t.src = e, t.complete ? i() : (t.onload = i, t.onerror = function() {
                        fe[e] = null, i()
                    })
                })
            }

            function p(e) {
                var t, i = "";
                do t = e % 26, i = String.fromCharCode(97 + t) + i, e = n.floor(e / 26); while (e > 0);
                return i
            }

            function m(e, t, n) {
                var i, r;
                pe = Object.create(pe), pe[e.tagName.toLowerCase()] = {
                    element: e,
                    style: t
                }, i = y(t, "text-decoration"), i && "none" != i && (r = y(t, "color"), i.split(/\s+/g).forEach(function(e) {
                    pe[e] || (pe[e] = r)
                })), b(t) && (pe._stackingContext = {
                    element: e,
                    group: n
                })
            }

            function g() {
                pe = Object.getPrototypeOf(pe)
            }

            function v(e) {
                if (null != pe._clipbox) {
                    var t = e.bbox(pe._matrix);
                    pe._clipbox = pe._clipbox ? le.Rect.intersect(pe._clipbox, t) : t
                }
            }

            function _() {
                var e = pe._clipbox;
                return null == e ? !0 : e ? 0 === e.width() || 0 === e.height() : void 0
            }

            function b(e) {
                function t(t) {
                    return y(e, t)
                }
                return "none" != t("transform") || "static" != t("position") && "auto" != t("z-index") || t("opacity") < 1 ? !0 : void 0
            }

            function w(e, t) {
                return window.getComputedStyle(e, t || null)
            }

            function y(e, t) {
                return e.getPropertyValue(t) || de.webkit && e.getPropertyValue("-webkit-" + t) || de.mozilla && e.getPropertyValue("-moz-" + t) || de.opera && e.getPropertyValue("-o-" + t) || de.msie && e.getPropertyValue("-ms-" + t)
            }

            function k(e, t, n, i) {
                e.setProperty(t, n, i), de.webkit ? e.setProperty("-webkit-" + t, n, i) : de.mozilla ? e.setProperty("-moz-" + t, n, i) : de.opera ? e.setProperty("-o-" + t, n, i) : de.msie && (e.setProperty("-ms-" + t, n, i), t = "ms" + t.replace(/(^|-)([a-z])/g, function(e, t, n) {
                    return t + n.toUpperCase()
                }), e[t] = n)
            }

            function x(e) {
                var t, n, i, r;
                if ((de.msie || de.chrome) && (t = e.getClientRects(), i = 0, 3 >= t.length)) {
                    for (r = 0; t.length > r; ++r) 1 >= t[r].width ? i++ : n = t[r];
                    if (i == t.length - 1) return n
                }
                return e.getBoundingClientRect()
            }

            function C(e, n) {
                return n = "border-" + n, {
                    width: t(y(e, n + "-width")),
                    style: y(e, n + "-style"),
                    color: u(y(e, n + "-color"), !0)
                }
            }

            function S(e, t) {
                var n = e.style.cssText,
                    i = t();
                return e.style.cssText = n, i
            }

            function T(e, n) {
                var i = y(e, "border-" + n + "-radius").split(/\s+/g).map(t);
                return 1 == i.length && i.push(i[0]), z({
                    x: i[0],
                    y: i[1]
                })
            }

            function D(e) {
                var t = e.getBoundingClientRect();
                return t = A(t, "border-*-width", e), t = A(t, "padding-*", e)
            }

            function A(e, n, i) {
                var r, o, a, s, l;
                return "string" == typeof n ? (r = w(i), o = t(y(r, n.replace("*", "top"))), a = t(y(r, n.replace("*", "right"))), s = t(y(r, n.replace("*", "bottom"))), l = t(y(r, n.replace("*", "left")))) : "number" == typeof n && (o = a = s = l = n), {
                    top: e.top + o,
                    right: e.right - a,
                    bottom: e.bottom - s,
                    left: e.left + l,
                    width: e.right - e.left - a - l,
                    height: e.bottom - e.top - s - o
                }
            }

            function E(e) {
                var n, i, r = y(e, "transform");
                return "none" == r ? null : (n = /^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(r), n ? (i = y(e, "transform-origin"), n = n[1].split(/\s*,\s*/g).map(t), i = i.split(/\s+/g).map(t), {
                    matrix: n,
                    origin: i
                }) : void 0)
            }

            function F(e) {
                return 180 * e / n.PI % 360
            }

            function I(e) {
                var i = t(e);
                return /grad$/.test(e) ? n.PI * i / 200 : /rad$/.test(e) ? i : /turn$/.test(e) ? n.PI * i * 2 : /deg$/.test(e) ? n.PI * i / 180 : void 0
            }

            function M(e, t) {
                return t = new le.Matrix(t[0], t[1], t[2], t[3], t[4], t[5]), e.transform(t), t
            }

            function R(e, t) {
                e.clip(t)
            }

            function P(e, t, n, i) {
                for (var r = new le.Arc([t, n], i).curvePoints(), o = 1; r.length > o;) e.curveTo(r[o++], r[o++], r[o++])
            }

            function z(e) {
                return (0 >= e.x || 0 >= e.y) && (e.x = e.y = 0), e
            }

            function B(e, t, i, r, o) {
                var a = n.max(0, t.x),
                    s = n.max(0, t.y),
                    l = n.max(0, i.x),
                    c = n.max(0, i.y),
                    d = n.max(0, r.x),
                    u = n.max(0, r.y),
                    h = n.max(0, o.x),
                    f = n.max(0, o.y),
                    p = n.min(e.width / (a + l), e.height / (c + u), e.width / (d + h), e.height / (f + s));
                return 1 > p && (a *= p, s *= p, l *= p, c *= p, d *= p, u *= p, h *= p, f *= p), {
                    tl: {
                        x: a,
                        y: s
                    },
                    tr: {
                        x: l,
                        y: c
                    },
                    br: {
                        x: d,
                        y: u
                    },
                    bl: {
                        x: h,
                        y: f
                    }
                }
            }

            function L(e, n, i) {
                var r, o, a, s, l, c, d, u, h = w(e),
                    f = T(h, "top-left"),
                    p = T(h, "top-right"),
                    m = T(h, "bottom-left"),
                    g = T(h, "bottom-right");
                return ("padding" == i || "content" == i) && (r = C(h, "top"), o = C(h, "right"), a = C(h, "bottom"), s = C(h, "left"), f.x -= s.width, f.y -= r.width, p.x -= o.width, p.y -= r.width, g.x -= o.width, g.y -= a.width, m.x -= s.width, m.y -= a.width, "content" == i && (l = t(y(h, "padding-top")), c = t(y(h, "padding-right")), d = t(y(h, "padding-bottom")), u = t(y(h, "padding-left")), f.x -= u, f.y -= l, p.x -= c, p.y -= l, g.x -= c, g.y -= d, m.x -= u, m.y -= d)), "number" == typeof i && (f.x -= i, f.y -= i, p.x -= i, p.y -= i, g.x -= i, g.y -= i, m.x -= i, m.y -= i), H(n, f, p, g, m)
            }

            function H(e, t, n, i, r) {
                var o = B(e, t, n, i, r),
                    a = o.tl,
                    s = o.tr,
                    l = o.br,
                    c = o.bl,
                    d = new se.Path({
                        fill: null,
                        stroke: null
                    });
                return d.moveTo(e.left, e.top + a.y), a.x && P(d, e.left + a.x, e.top + a.y, {
                    startAngle: -180,
                    endAngle: -90,
                    radiusX: a.x,
                    radiusY: a.y
                }), d.lineTo(e.right - s.x, e.top), s.x && P(d, e.right - s.x, e.top + s.y, {
                    startAngle: -90,
                    endAngle: 0,
                    radiusX: s.x,
                    radiusY: s.y
                }), d.lineTo(e.right, e.bottom - l.y), l.x && P(d, e.right - l.x, e.bottom - l.y, {
                    startAngle: 0,
                    endAngle: 90,
                    radiusX: l.x,
                    radiusY: l.y
                }), d.lineTo(e.left + c.x, e.bottom), c.x && P(d, e.left + c.x, e.bottom - c.y, {
                    startAngle: 90,
                    endAngle: 180,
                    radiusX: c.x,
                    radiusY: c.y
                }), d.close()
            }

            function N(e, n) {
                var i = t(e) + "";
                switch (n) {
                    case "decimal-leading-zero":
                        return 2 > i.length && (i = "0" + i), i;
                    case "lower-roman":
                        return ue(e).toLowerCase();
                    case "upper-roman":
                        return ue(e).toUpperCase();
                    case "lower-latin":
                    case "lower-alpha":
                        return p(e - 1);
                    case "upper-latin":
                    case "upper-alpha":
                        return p(e - 1).toUpperCase();
                    default:
                        return i
                }
            }

            function O(e, t) {
                function n(e, t, n) {
                    return n ? (n = n.replace(/^\s*(["'])(.*)\1\s*$/, "$2"), s(e).map(function(e) {
                        return N(e, t)
                    }).join(n)) : N(a(e) || 0, t)
                }
                var i, r = oe(t, /^\s+/),
                    o = [];
                return r.forEach(function(t) {
                    var r;
                    (i = /^\s*(["'])(.*)\1\s*$/.exec(t)) ? o.push(i[2].replace(/\\([0-9a-f]{4})/gi, function(e, t) {
                        return String.fromCharCode(parseInt(t, 16))
                    })): (i = /^\s*counter\((.*?)\)\s*$/.exec(t)) ? (r = oe(i[1]), o.push(n(r[0], r[1]))) : (i = /^\s*counters\((.*?)\)\s*$/.exec(t)) ? (r = oe(i[1]), o.push(n(r[0], r[2], r[1]))) : o.push((i = /^\s*attr\((.*?)\)\s*$/.exec(t)) ? e.getAttribute(i[1]) || "" : t)
                }), o.join("")
            }

            function V(e) {
                var t, n;
                if (e.cssText) return e.cssText;
                for (t = [], n = 0; e.length > n; ++n) t.push(e[n] + ": " + y(e, e[n]));
                return t.join(";\n")
            }

            function U(e, t) {
                function n(t, n) {
                    var r, o = w(e, t);
                    o.content && "normal" != o.content && "none" != o.content && "0px" != o.width && (r = e.ownerDocument.createElement(he), r.style.cssText = V(o), r.textContent = O(e, o.content), e.insertBefore(r, n), i.push(r))
                }
                var i, r;
                return e.tagName == he ? void W(e, t) : (i = [], n(":before", e.firstChild), n(":after", null), r = e.className, e.className += " kendo-pdf-hide-pseudo-elements", W(e, t), e.className = r, void i.forEach(function(t) {
                    e.removeChild(t)
                }))
            }

            function W(i, r) {
                function o(e) {
                    var t, n, r, o, a, s;
                    if (/^td$/i.test(i.tagName) && (t = pe.table, t && "collapse" == y(t.style, "border-collapse"))) {
                        if (n = C(t.style, "left").width, r = C(t.style, "top").width, 0 === n && 0 === r) return e;
                        if (o = t.element.getBoundingClientRect(), a = t.element.rows[0].cells[0], s = a.getBoundingClientRect(), s.top == o.top || s.left == o.left) return ce.call(e).map(function(e) {
                            return {
                                left: e.left + n,
                                top: e.top + r,
                                right: e.right + n,
                                bottom: e.bottom + r,
                                height: e.height,
                                width: e.width
                            }
                        })
                    }
                    return e
                }

                function a(e, t, i, o, a, s, l, c) {
                    function d(t, r, o) {
                        var a = n.PI / 2 * t / (t + i),
                            s = {
                                x: r.x - t,
                                y: r.y - i
                            },
                            l = new se.Path({
                                fill: {
                                    color: e
                                },
                                stroke: null
                            }).moveTo(0, 0);
                        M(l, o), P(l, 0, r.y, {
                            startAngle: -90,
                            endAngle: -F(a),
                            radiusX: r.x,
                            radiusY: r.y
                        }), s.x > 0 && s.y > 0 ? (l.lineTo(s.x * n.cos(a), r.y - s.y * n.sin(a)), P(l, 0, r.y, {
                            startAngle: -F(a),
                            endAngle: -90,
                            radiusX: s.x,
                            radiusY: s.y,
                            anticlockwise: !0
                        })) : s.x > 0 ? l.lineTo(s.x, i).lineTo(0, i) : l.lineTo(s.x, i).lineTo(s.x, 0), h.append(l.close())
                    }
                    if (!(0 >= i)) {
                        var u, h = new se.Group;
                        M(h, c), r.append(h), z(s), z(l), u = new se.Path({
                            fill: {
                                color: e
                            },
                            stroke: null
                        }), h.append(u), u.moveTo(s.x ? n.max(s.x, o) : 0, 0).lineTo(t - (l.x ? n.max(l.x, a) : 0), 0).lineTo(t - n.max(l.x, a), i).lineTo(n.max(s.x, o), i).close(), s.x && d(o, s, [-1, 0, 0, 1, s.x, 0]), l.x && d(a, l, [1, 0, 0, 1, t - l.x, 0])
                    }
                }

                function s(t) {
                    var n, o, a = new se.Group;
                    for (R(a, H(t, W, G, K, $)), r.append(a), "A" == i.tagName && i.href && !/^#?$/.test(e(i).attr("href")) && (pe._avoidLinks && e(i).is(pe._avoidLinks) || (a._pdfLink = {
                        url: i.href,
                        top: t.top,
                        right: t.right,
                        bottom: t.bottom,
                        left: t.left
                    })), X && (n = new se.Path({
                        fill: {
                            color: X.toCssRgba()
                        },
                        stroke: null
                    }), n.moveTo(t.left, t.top).lineTo(t.right, t.top).lineTo(t.right, t.bottom).lineTo(t.left, t.bottom).close(), a.append(n)), o = h.length; --o >= 0;) l(a, t, h[o], f[o % f.length], m[o % m.length], g[o % g.length], _[o % _.length])
                }

                function l(e, r, o, a, s, l, c) {
                    function d(e, r, o, d, u) {
                        function h() {
                            for (; _.origin.x > r.left;) _.origin.x -= o
                        }

                        function f() {
                            for (; _.origin.y > r.top;) _.origin.y -= d
                        }

                        function p() {
                            for (; r.right > _.origin.x;) u(e, _.clone()), _.origin.x += o
                        }
                        var m, g, v, _, b, w = o / d,
                            y = r;
                        if ("content-box" == l ? (y = A(y, "border-*-width", i), y = A(y, "padding-*", i)) : "padding-box" == l && (y = A(y, "border-*-width", i)), /^\s*auto(\s+auto)?\s*$/.test(c) || ("contain" == c ? (m = n.min(y.width / o, y.height / d), o *= m, d *= m) : "cover" == c ? (m = n.max(y.width / o, y.height / d), o *= m, d *= m) : (g = c.split(/\s+/g), o = /%$/.test(g[0]) ? y.width * t(g[0]) / 100 : t(g[0]), d = 1 == g.length || "auto" == g[1] ? o / w : /%$/.test(g[1]) ? y.height * t(g[1]) / 100 : t(g[1]))), v = (s + "").split(/\s+/), 1 == v.length && (v[1] = "50%"), v[0] = /%$/.test(v[0]) ? t(v[0]) / 100 * (y.width - o) : t(v[0]), v[1] = /%$/.test(v[1]) ? t(v[1]) / 100 * (y.height - d) : t(v[1]), _ = new le.Rect([y.left + v[0], y.top + v[1]], [o, d]), "no-repeat" == a) u(e, _);
                        else if ("repeat-x" == a) h(), p();
                        else if ("repeat-y" == a)
                            for (f(); r.bottom > _.origin.y;) u(e, _.clone()), _.origin.y += d;
                        else if ("repeat" == a)
                            for (h(), f(), b = _.origin.clone(); r.bottom > _.origin.y;) _.origin.x = b.x, p(), _.origin.y += d
                    }
                    if (o && "none" != o)
                        if ("url" == o.type) {
                            if (/^url\(\"data:image\/svg/i.test(o.url)) return;
                            var u = fe[o.url];
                            u && u.width > 0 && u.height > 0 && d(e, r, u.width, u.height, function(e, t) {
                                e.append(new se.Image(o.url, t))
                            })
                        } else {
                            if ("linear" != o.type) return;
                            d(e, r, r.width, r.height, j(o))
                        }
                }

                function c() {
                    function e(e) {
                        S(i, function() {
                            i.style.position = "relative";
                            var t = i.ownerDocument.createElement(he);
                            t.style.position = "absolute", t.style.boxSizing = "border-box", "outside" == n ? (t.style.width = "6em", t.style.left = "-6.8em", t.style.textAlign = "right") : t.style.left = "0px", e(t), i.insertBefore(t, i.firstChild), te(t, r), i.removeChild(t)
                        })
                    }

                    function t(e) {
                        var t, n = i.parentNode.children,
                            r = i.getAttribute("kendo-split-index");
                        if (null != r) return e(0 | r, n.length);
                        for (t = 0; n.length > t; ++t)
                            if (n[t] === i) return e(t, n.length)
                    }
                    var n, o = y(I, "list-style-type");
                    if ("none" != o) switch (n = y(I, "list-style-position"), o) {
                        case "circle":
                        case "disc":
                        case "square":
                            e(function(e) {
                                e.style.fontSize = "60%", e.style.lineHeight = "200%", e.style.paddingRight = "0.5em", e.style.fontFamily = "DejaVu Serif", e.innerHTML = {
                                    disc: "●",
                                    circle: "◯",
                                    square: "■"
                                } [o]
                            });
                            break;
                        case "decimal":
                        case "decimal-leading-zero":
                            e(function(e) {
                                t(function(t) {
                                    ++t, "decimal-leading-zero" == o && 2 > (t + "").length && (t = "0" + t), e.innerHTML = t + "."
                                })
                            });
                            break;
                        case "lower-roman":
                        case "upper-roman":
                            e(function(e) {
                                t(function(t) {
                                    t = ue(t + 1), "upper-roman" == o && (t = t.toUpperCase()), e.innerHTML = t + "."
                                })
                            });
                            break;
                        case "lower-latin":
                        case "lower-alpha":
                        case "upper-latin":
                        case "upper-alpha":
                            e(function(e) {
                                t(function(t) {
                                    t = p(t), /^upper/i.test(o) && (t = t.toUpperCase()), e.innerHTML = t + "."
                                })
                            })
                    }
                }

                function d(e, t, n) {
                    function o(e) {
                        return {
                            x: e.y,
                            y: e.x
                        }
                    }
                    var l, c, d, u, h, f, p, m;
                    if (0 !== e.width && 0 !== e.height && (s(e), l = U.width > 0 && (t && "ltr" == Q || n && "rtl" == Q), c = O.width > 0 && (n && "ltr" == Q || t && "rtl" == Q), 0 !== N.width || 0 !== U.width || 0 !== O.width || 0 !== V.width)) {
                        if (N.color == O.color && N.color == V.color && N.color == U.color && N.width == O.width && N.width == V.width && N.width == U.width && l && c) return e = A(e, N.width / 2), d = L(i, e, N.width / 2), d.options.stroke = {
                            color: N.color,
                            width: N.width
                        }, void r.append(d);
                        if (0 === W.x && 0 === G.x && 0 === K.x && 0 === $.x && 2 > N.width && 2 > U.width && 2 > O.width && 2 > V.width) return N.width > 0 && r.append(new se.Path({
                            stroke: {
                                width: N.width,
                                color: N.color
                            }
                        }).moveTo(e.left, e.top + N.width / 2).lineTo(e.right, e.top + N.width / 2)), V.width > 0 && r.append(new se.Path({
                            stroke: {
                                width: V.width,
                                color: V.color
                            }
                        }).moveTo(e.left, e.bottom - V.width / 2).lineTo(e.right, e.bottom - V.width / 2)), l && r.append(new se.Path({
                            stroke: {
                                width: U.width,
                                color: U.color
                            }
                        }).moveTo(e.left + U.width / 2, e.top).lineTo(e.left + U.width / 2, e.bottom)), void(c && r.append(new se.Path({
                            stroke: {
                                width: O.width,
                                color: O.color
                            }
                        }).moveTo(e.right - O.width / 2, e.top).lineTo(e.right - O.width / 2, e.bottom)));
                        u = B(e, W, G, K, $), h = u.tl, f = u.tr, p = u.br, m = u.bl, a(N.color, e.width, N.width, U.width, O.width, h, f, [1, 0, 0, 1, e.left, e.top]), a(V.color, e.width, V.width, O.width, U.width, p, m, [-1, 0, 0, -1, e.right, e.bottom]), a(U.color, e.height, U.width, V.width, N.width, o(m), o(h), [0, -1, 1, 0, e.left, e.bottom]), a(O.color, e.height, O.width, N.width, V.width, o(f), o(p), [0, 1, -1, 0, e.right, e.top])
                    }
                }
                var h, f, m, g, _, b, k, x, D, E, I = w(i),
                    N = C(I, "top"),
                    O = C(I, "right"),
                    V = C(I, "bottom"),
                    U = C(I, "left"),
                    W = T(I, "top-left"),
                    G = T(I, "top-right"),
                    $ = T(I, "bottom-left"),
                    K = T(I, "bottom-right"),
                    Q = y(I, "direction"),
                    X = y(I, "background-color");
                if (X = u(X), h = re(y(I, "background-image")), f = oe(y(I, "background-repeat")), m = oe(y(I, "background-position")), g = oe(y(I, "background-origin")), _ = oe(y(I, "background-size")), de.msie && 10 > de.version && (m = oe(i.currentStyle.backgroundPosition)), b = A(i.getBoundingClientRect(), "border-*-width", i), function() {
                    var e, n, i, o, a, s, l, c = y(I, "clip"),
                        d = /^\s*rect\((.*)\)\s*$/.exec(c);
                    d && (e = d[1].split(/[ ,]+/g), n = "auto" == e[0] ? b.top : t(e[0]) + b.top, i = "auto" == e[1] ? b.right : t(e[1]) + b.left, o = "auto" == e[2] ? b.bottom : t(e[2]) + b.top, a = "auto" == e[3] ? b.left : t(e[3]) + b.left, s = new se.Group, l = (new se.Path).moveTo(a, n).lineTo(i, n).lineTo(i, o).lineTo(a, o).close(), R(s, l), r.append(s), r = s, v(l))
                }(), E = y(I, "display"), "table-row" == E)
                    for (k = [], x = 0, D = i.children; D.length > x; ++x) k.push(D[x].getBoundingClientRect());
                else k = i.getClientRects(), 1 == k.length && (k = [i.getBoundingClientRect()]);
                for (k = o(k), x = 0; k.length > x; ++x) d(k[x], 0 === x, x == k.length - 1);
                return k.length > 0 && "list-item" == E && c(k[0]),
                    function() {
                        function e() {
                            var e = L(i, b, "padding"),
                                t = new se.Group;
                            R(t, e), r.append(t), r = t, v(e)
                        }
                        Y(i) ? e() : /^(hidden|auto|scroll)/.test(y(I, "overflow")) ? e() : /^(hidden|auto|scroll)/.test(y(I, "overflow-x")) ? e() : /^(hidden|auto|scroll)/.test(y(I, "overflow-y")) && e()
                    }(), q(i, r) || J(i, r), r
            }

            function j(e) {
                return function(i, r) {
                    var o, a, s, l, c, d, u, h, f, p, m, g, v, _ = r.width(),
                        b = r.height();
                    switch (e.type) {
                        case "linear":
                            switch (o = null != e.angle ? e.angle : n.PI, e.to) {
                                case "top":
                                    o = 0;
                                    break;
                                case "left":
                                    o = -n.PI / 2;
                                    break;
                                case "bottom":
                                    o = n.PI;
                                    break;
                                case "right":
                                    o = n.PI / 2;
                                    break;
                                case "top left":
                                case "left top":
                                    o = -n.atan2(b, _);
                                    break;
                                case "top right":
                                case "right top":
                                    o = n.atan2(b, _);
                                    break;
                                case "bottom left":
                                case "left bottom":
                                    o = n.PI + n.atan2(b, _);
                                    break;
                                case "bottom right":
                                case "right bottom":
                                    o = n.PI - n.atan2(b, _)
                            }
                            e.reverse && (o -= n.PI), o %= 2 * n.PI, 0 > o && (o += 2 * n.PI), a = n.abs(_ * n.sin(o)) + n.abs(b * n.cos(o)), s = n.atan(_ * n.tan(o) / b), l = n.sin(s), c = n.cos(s), d = n.abs(l) + n.abs(c), u = d / 2 * l, h = d / 2 * c, o > n.PI / 2 && 3 * n.PI / 2 >= o && (u = -u, h = -h), f = [], p = 0, m = e.stops.map(function(n, i) {
                                var r, o = n.percent;
                                return o ? o = t(o) / 100 : n.length ? o = t(n.length) / a : 0 === i ? o = 0 : i == e.stops.length - 1 && (o = 1), r = {
                                    color: n.color.toCssRgba(),
                                    offset: o
                                }, null != o ? (p = o, f.forEach(function(e, t) {
                                    var n = e.stop;
                                    n.offset = e.left + (p - e.left) * (t + 1) / (f.length + 1)
                                }), f = []) : f.push({
                                    left: p,
                                    stop: r
                                }), r
                            }), g = [.5 - u, .5 + h], v = [.5 + u, .5 - h], i.append(se.Path.fromRect(r).stroke(null).fill(new se.LinearGradient({
                                start: g,
                                end: v,
                                stops: m,
                                userSpace: !1
                            })));
                            break;
                        case "radial":
                            window.console && window.console.log && window.console.log("Radial gradients are not yet supported in HTML renderer")
                    }
                }
            }

            function q(t, n) {
                var i, r, o, a;
                return t.getAttribute(kendo.attr("role")) && (i = kendo.widgetInstance(e(t)), i && (i.exportDOMVisual || i.exportVisual)) ? (r = i.exportDOMVisual ? i.exportDOMVisual() : i.exportVisual()) ? (o = new se.Group, o.children.push(r), a = t.getBoundingClientRect(), o.transform(le.transform().translate(a.left, a.top)), n.append(o), !0) : !1 : void 0
            }

            function G(e, t, n) {
                var i = D(e),
                    r = new le.Rect([i.left, i.top], [i.width, i.height]),
                    o = new se.Image(t, r);
                R(o, L(e, i, "content")), n.append(o)
            }

            function $(e, n) {
                var i = w(e),
                    r = w(n),
                    o = t(y(i, "z-index")),
                    a = t(y(r, "z-index")),
                    s = y(i, "position"),
                    l = y(r, "position");
                return isNaN(o) && isNaN(a) ? /static|absolute/.test(s) && /static|absolute/.test(l) ? 0 : "static" == s ? -1 : "static" == l ? 1 : 0 : isNaN(o) ? 0 === a ? 0 : a > 0 ? -1 : 1 : isNaN(a) ? 0 === o ? 0 : o > 0 ? 1 : -1 : t(o) - t(a)
            }

            function Y(e) {
                return /^(?:textarea|select|input)$/i.test(e.tagName)
            }

            function K(e) {
                return e.selectedOptions && e.selectedOptions.length > 0 ? e.selectedOptions[0] : e.options[e.selectedIndex]
            }

            function Q(e, t) {
                var i = w(e),
                    r = y(i, "color"),
                    o = e.getBoundingClientRect();
                "checkbox" == e.type ? (t.append(se.Path.fromRect(new le.Rect([o.left + 1, o.top + 1], [o.width - 2, o.height - 2])).stroke(r, 1)), e.checked && t.append((new se.Path).stroke(r, 1.2).moveTo(o.left + .22 * o.width, o.top + .55 * o.height).lineTo(o.left + .45 * o.width, o.top + .75 * o.height).lineTo(o.left + .78 * o.width, o.top + .22 * o.width))) : (t.append(new se.Circle(new le.Circle([(o.left + o.right) / 2, (o.top + o.bottom) / 2], n.min(o.width - 2, o.height - 2) / 2)).stroke(r, 1)), e.checked && t.append(new se.Circle(new le.Circle([(o.left + o.right) / 2, (o.top + o.bottom) / 2], n.min(o.width - 8, o.height - 8) / 2)).fill(r).stroke(null)))
            }

            function X(e, t) {
                var n, i, r, o, a, s = e.tagName.toLowerCase();
                if ("input" == s && ("checkbox" == e.type || "radio" == e.type)) return Q(e, t);
                if (n = e.parentNode, i = e.ownerDocument, r = i.createElement(he), r.style.cssText = V(w(e)), "input" == s && (r.style.whiteSpace = "pre"), ("select" == s || "textarea" == s) && (r.style.overflow = "auto"), "select" == s)
                    if (e.multiple)
                        for (a = 0; e.options.length > a; ++a) o = i.createElement(he), o.style.cssText = V(w(e.options[a])), o.style.display = "block", o.textContent = e.options[a].textContent, r.appendChild(o);
                    else o = K(e), o && (r.textContent = o.textContent);
                else r.textContent = e.value;
                n.insertBefore(r, e), r.scrollLeft = e.scrollLeft, r.scrollTop = e.scrollTop, J(r, t), n.removeChild(r)
            }

            function J(e, t) {
                var n, i, r, o, a, s, l, c, d;
                switch (pe._stackingContext.element === e && (pe._stackingContext.group = t), e.tagName.toLowerCase()) {
                    case "img":
                        G(e, e.src, t);
                        break;
                    case "canvas":
                        try {
                            G(e, e.toDataURL("image/png"), t)
                        } catch (u) {}
                        break;
                    case "textarea":
                    case "input":
                    case "select":
                        X(e, t);
                        break;
                    default:
                        for (n = [], i = [], r = [], o = [], a = e.firstChild; a; a = a.nextSibling) switch (a.nodeType) {
                            case 3:
                                /\S/.test(a.data) && Z(e, a, t);
                                break;
                            case 1:
                                s = w(a), l = y(s, "display"), c = y(s, "float"), d = y(s, "position"), "static" != d ? o.push(a) : "inline" != l ? "none" != c ? i.push(a) : n.push(a) : r.push(a)
                        }
                        n.sort($).forEach(function(e) {
                            te(e, t)
                        }), i.sort($).forEach(function(e) {
                            te(e, t)
                        }), r.sort($).forEach(function(e) {
                            te(e, t)
                        }), o.sort($).forEach(function(e) {
                            te(e, t)
                        })
                }
            }

            function Z(e, i, r) {
                function o() {
                    var e, t, r, o, s, l, h, f = d,
                        p = c.substr(d).search(/\S/);
                    if (d += p, 0 > p || d >= u) return !0;
                    if (g.setStart(i, d), g.setEnd(i, d + 1), e = x(g), t = !1, b && (p = c.substr(d).search(/\s/), p >= 0 && (g.setEnd(i, d + p), r = g.getBoundingClientRect(), r.bottom == e.bottom && (e = r, t = !0, d += p))), !t) {
                        if (p = function m(t, n, r) {
                            g.setEnd(i, n);
                            var o = x(g);
                            return o.bottom != e.bottom && n > t ? m(t, t + n >> 1, n) : o.right != e.right ? (e = o, r > n ? m(n, n + r >> 1, r) : n) : n
                        }(d, n.min(u, d + T), u), p == d) return !0;
                        if (d = p, p = ("" + g).search(/\s+$/), 0 === p) return;
                        p > 0 && (g.setEnd(i, g.startOffset + p), e = g.getBoundingClientRect())
                    }
                    if (de.msie && (e = g.getClientRects()[0]), o = "" + g, /^(?:pre|pre-wrap)$/i.test(k)) {
                        if (/\t/.test(o)) {
                            for (s = 0, p = f; g.startOffset > p; ++p) l = c.charCodeAt(p), 9 == l ? s += 8 - s % 8 : 10 == l || 13 == l ? s = 0 : s++;
                            for (;
                                (p = o.search("	")) >= 0;) h = "        ".substr(0, 8 - (s + p) % 8), o = o.substr(0, p) + h + o.substr(p + 1)
                        }
                    } else o = o.replace(/\s+/g, " ");
                    a(o, e)
                }

                function a(e, t) {
                    var n, i, o;
                    de.msie && !isNaN(f) && (n = kendo.util.measureText(e, {
                        font: p
                    }), i = (t.top + t.bottom - n.height) / 2, t = {
                        top: i,
                        right: t.right,
                        bottom: i + n.height,
                        left: t.left,
                        height: n.height,
                        width: t.right - t.left
                    }), o = new ie(e, new le.Rect([t.left, t.top], [t.width, t.height]), {
                        font: p,
                        fill: {
                            color: m
                        }
                    }), r.append(o), s(t)
                }

                function s(e) {
                    function t(t, n) {
                        var i, o;
                        t && (i = h / 12, o = new se.Path({
                            stroke: {
                                width: i,
                                color: t
                            }
                        }), n -= i, o.moveTo(e.left, n).lineTo(e.right, n), r.append(o))
                    }
                    t(pe.underline, e.bottom), t(pe["line-through"], e.bottom - e.height / 2.7), t(pe.overline, e.top)
                }
                var l, c, d, u, h, f, p, m, g, v, b, k, C, S, T;
                if (!_() && (l = w(e), !(t(y(l, "text-indent")) < -500) && (c = i.data, d = 0, u = c.search(/\S\s*$/) + 1, u && (h = y(l, "font-size"), f = y(l, "line-height"), p = [y(l, "font-style"), y(l, "font-variant"), y(l, "font-weight"), h, y(l, "font-family")].join(" "), h = t(h), f = t(f), 0 !== h)))) {
                    for (m = y(l, "color"), g = e.ownerDocument.createRange(), v = y(l, "text-align"), b = "justify" == v, k = y(l, "white-space"), de.msie && (C = l.textOverflow, "ellipsis" == C && (S = e.style.textOverflow, e.style.textOverflow = "clip")), T = e.getBoundingClientRect().width / h * 5, 0 === T && (T = 500); !o(););
                    de.msie && "ellipsis" == C && (e.style.textOverflow = S)
                }
            }

            function ee(e, n, i) {
                var r, o, a, s, l, c;
                for ("auto" != i ? (r = pe._stackingContext.group, i = t(i)) : (r = n, i = 0), o = r.children, a = 0; o.length > a && !(null != o[a]._dom_zIndex && o[a]._dom_zIndex > i); ++a);
                return s = new se.Group, r.insertAt(s, a), s._dom_zIndex = i, r !== n && pe._clipbox && (l = pe._matrix.invert(), c = pe._clipbox.transformCopy(l), R(s, se.Path.fromRect(c))), s
            }

            function te(e, n) {
                var i, r, o, a, s, u, h, f = w(e),
                    p = y(f, "counter-reset");
                p && d(oe(p, /^\s+/), c, 0), i = y(f, "counter-increment"), i && d(oe(i, /^\s+/), l, 1), /^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(e.tagName) || null != pe._clipbox && (r = t(y(f, "opacity")), o = y(f, "visibility"), a = y(f, "display"), 0 !== r && "hidden" != o && "none" != a && (s = E(f), h = y(f, "z-index"), (s || 1 > r) && "auto" == h && (h = 0), u = ee(e, n, h), 1 > r && u.opacity(r * u.opacity()), m(e, f, u), s ? S(e, function() {
                    var t, n, i, r;
                    k(e.style, "transform", "none", "important"), k(e.style, "transition", "none", "important"), "static" == y(f, "position") && k(e.style, "position", "relative", "important"), t = e.getBoundingClientRect(), n = t.left + s.origin[0], i = t.top + s.origin[1], r = [1, 0, 0, 1, -n, -i], r = ne(r, s.matrix), r = ne(r, [1, 0, 0, 1, n, i]), r = M(u, r), pe._matrix = pe._matrix.multiplyCopy(r), U(e, u)
                }) : U(e, u), g()))
            }

            function ne(e, t) {
                var n = e[0],
                    i = e[1],
                    r = e[2],
                    o = e[3],
                    a = e[4],
                    s = e[5],
                    l = t[0],
                    c = t[1],
                    d = t[2],
                    u = t[3],
                    h = t[4],
                    f = t[5];
                return [n * l + i * d, n * c + i * u, r * l + o * d, r * c + o * u, a * l + s * d + h, a * c + s * u + f]
            }
            var ie, re, oe, ae, se = kendo.drawing,
                le = kendo.geometry,
                ce = Array.prototype.slice,
                de = kendo.support.browser,
                ue = kendo.util.arabicToRoman,
                he = "KENDO-PSEUDO-ELEMENT",
                fe = {},
                pe = {};
            pe._root = pe, ie = se.Text.extend({
                nodeType: "Text",
                init: function(e, t, n) {
                    se.Text.fn.init.call(this, e, t.getOrigin(), n), this._pdfRect = t
                },
                rect: function() {
                    return this._pdfRect
                },
                rawBBox: function() {
                    return this._pdfRect
                }
            }), se.drawDOM = i, i.getFontFaces = r, re = function() {
                function e(e) {
                    function p() {
                        var t = s.exec(e);
                        t && (e = e.substr(t[1].length))
                    }

                    function m(t) {
                        p();
                        var n = t.exec(e);
                        return n ? (e = e.substr(n[1].length), n[1]) : void 0
                    }

                    function g() {
                        var t, r, o = kendo.parseColor(e, !0);
                        return o ? (e = e.substr(o.match[0].length), o = o.toRGB(), (t = m(i)) || (r = m(n)), {
                            color: o,
                            length: t,
                            percent: r
                        }) : void 0
                    }

                    function v(t) {
                        var i, o, s, u, h, f, p = [],
                            v = !1;
                        if (m(l)) {
                            for (i = m(a), i ? (i = I(i), m(d)) : (o = m(r), "to" == o ? o = m(r) : o && /^-/.test(t) && (v = !0), s = m(r), m(d)), /-moz-/.test(t) && null == i && null == o && (u = m(n), h = m(n), v = !0, "0%" == u ? o = "left" : "100%" == u && (o = "right"), "0%" == h ? s = "top" : "100%" == h && (s = "bottom"), m(d)); e && !m(c) && (f = g());) p.push(f), m(d);
                            return {
                                type: "linear",
                                angle: i,
                                to: o && s ? o + " " + s : o ? o : s ? s : null,
                                stops: p,
                                reverse: v
                            }
                        }
                    }

                    function _() {
                        if (m(l)) {
                            var e = m(h);
                            return e = e.replace(/^['"]+|["']+$/g, ""), m(c), {
                                type: "url",
                                url: e
                            }
                        }
                    }
                    var b, w = e;
                    return o(f, w) ? f[w] : ((b = m(t)) ? b = v(b) : (b = m(u)) && (b = _()), f[w] = b || {
                        type: "none"
                    })
                }
                var t = /^((-webkit-|-moz-|-o-|-ms-)?linear-gradient\s*)\(/,
                    n = /^([-0-9.]+%)/,
                    i = /^([-0-9.]+px)/,
                    r = /^(left|right|top|bottom|to|center)\W/,
                    a = /^([-0-9.]+(deg|grad|rad|turn))/,
                    s = /^(\s+)/,
                    l = /^(\()/,
                    c = /^(\))/,
                    d = /^(,)/,
                    u = /^(url)\(/,
                    h = /^(.*?)\)/,
                    f = {},
                    p = {};
                return function(t) {
                    return o(p, t) ? p[t] : p[t] = oe(t).map(e)
                }
            }(), oe = function() {
                var e = {};
                return function(t, n) {
                    function i(e) {
                        return h = e.exec(t.substr(c))
                    }

                    function r(e) {
                        return e.replace(/^\s+|\s+$/g, "")
                    }
                    var a, s, l, c, d, u, h;
                    if (n || (n = /^\s*,\s*/), a = t + n, o(e, a)) return e[a];
                    for (s = [], l = 0, c = 0, d = 0, u = !1; t.length > c;) !u && i(/^[\(\[\{]/) ? (d++, c++) : !u && i(/^[\)\]\}]/) ? (d--, c++) : !u && i(/^[\"\']/) ? (u = h[0], c++) : "'" == u && i(/^\\\'/) ? c += 2 : '"' == u && i(/^\\\"/) ? c += 2 : "'" == u && i(/^\'/) ? (u = !1, c++) : '"' == u && i(/^\"/) ? (u = !1, c++) : i(n) ? (!u && !d && c > l && (s.push(r(t.substring(l, c))), l = c + h[0].length), c += h[0].length) : c++;
                    return c > l && s.push(r(t.substring(l, c))), e[a] = s
                }
            }(), ae = function() {
                var e = {};
                return function(t) {
                    var n, i = e[t];
                    return i || ((n = /url\((['"]?)([^'")]*?)\1\)\s+format\((['"]?)truetype\3\)/.exec(t)) ? i = e[t] = n[2] : (n = /url\((['"]?)([^'")]*?\.ttf)\1\)/.exec(t)) && (i = e[t] = n[2])), i
                }
            }()
        }(window.kendo.jQuery, parseFloat, Math)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("drawing/animation.min", ["drawing/geometry.min", "drawing/core.min"], e)
    }(function() {
        ! function(e) {
            var t = e.noop,
                n = window.kendo,
                i = n.Class,
                r = n.util,
                o = n.animationFrame,
                a = n.deepExtend,
                s = i.extend({
                    init: function(e, t) {
                        var n = this;
                        n.options = a({}, n.options, t), n.element = e
                    },
                    options: {
                        duration: 500,
                        easing: "swing"
                    },
                    setup: t,
                    step: t,
                    play: function() {
                        var t = this,
                            n = t.options,
                            i = e.easing[n.easing],
                            a = n.duration,
                            s = n.delay || 0,
                            l = r.now() + s,
                            c = l + a;
                        0 === a ? (t.step(1), t.abort()) : setTimeout(function() {
                            var e = function() {
                                var n, s, d, u;
                                t._stopped || (n = r.now(), s = r.limitValue(n - l, 0, a), d = s / a, u = i(d, s, 0, 1, a), t.step(u), c > n ? o(e) : t.abort())
                            };
                            e()
                        }, s)
                    },
                    abort: function() {
                        this._stopped = !0
                    },
                    destroy: function() {
                        this.abort()
                    }
                }),
                l = function() {
                    this._items = []
                };
            l.prototype = {
                register: function(e, t) {
                    this._items.push({
                        name: e,
                        type: t
                    })
                },
                create: function(e, t) {
                    var n, i, r, o = this._items;
                    if (t && t.type)
                        for (i = t.type.toLowerCase(), r = 0; o.length > r; r++)
                            if (o[r].name.toLowerCase() === i) {
                                n = o[r];
                                break
                            } return n ? new n.type(e, t) : void 0
                }
            }, l.current = new l, s.create = function(e, t, n) {
                return l.current.create(e, t, n)
            }, a(n.drawing, {
                Animation: s,
                AnimationFactory: l
            })
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.drawing.min", ["kendo.color.min", "util/main.min", "util/text-metrics.min", "util/base64.min", "mixins/observers.min", "drawing/geometry.min", "drawing/core.min", "drawing/mixins.min", "drawing/shapes.min", "drawing/parser.min", "drawing/svg.min", "drawing/canvas.min", "drawing/vml.min", "drawing/html.min", "drawing/animation.min"], e)
    }(function() {}, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.validator.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            function n(t) {
                var n, i = l.ui.validator.ruleResolvers || {},
                    r = {};
                for (n in i) e.extend(!0, r, i[n].resolve(t));
                return r
            }

            function i(e) {
                return e.replace(/&amp/g, "&amp;").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&lt;/g, "<").replace(/&gt;/g, ">")
            }

            function r(e) {
                return e = (e + "").split("."), e.length > 1 ? e[1].length : 0
            }

            function o(t) {
                return e(e.parseHTML ? e.parseHTML(t) : t)
            }

            function a(t, n) {
                var i, r, o, a, s = e();
                for (o = 0, a = t.length; a > o; o++) i = t[o], h.test(i.className) && (r = i.getAttribute(l.attr("for")), r === n && (s = s.add(i)));
                return s
            }
            var s, l = window.kendo,
                c = l.ui.Widget,
                d = ".kendoValidator",
                u = "k-invalid-msg",
                h = RegExp(u, "i"),
                f = "k-invalid",
                p = "k-valid",
                m = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,
                g = /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,
                v = ":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])",
                _ = ":checkbox:not([disabled],[readonly])",
                b = "[type=number],[type=range]",
                w = "blur",
                y = "name",
                k = "form",
                x = "novalidate",
                C = e.proxy,
                S = function(e, t) {
                    return "string" == typeof t && (t = RegExp("^(?:" + t + ")$")), t.test(e)
                },
                T = function(e, t, n) {
                    var i = e.val();
                    return e.filter(t).length && "" !== i ? S(i, n) : !0
                },
                D = function(e, t) {
                    return e.length ? null != e[0].attributes[t] : !1
                };
            l.ui.validator || (l.ui.validator = {
                rules: {},
                messages: {}
            }), s = c.extend({
                init: function(t, i) {
                    var r = this,
                        o = n(t),
                        a = "[" + l.attr("validate") + "!=false]";
                    i = i || {}, i.rules = e.extend({}, l.ui.validator.rules, o.rules, i.rules), i.messages = e.extend({}, l.ui.validator.messages, o.messages, i.messages), c.fn.init.call(r, t, i), r._errorTemplate = l.template(r.options.errorTemplate), r.element.is(k) && r.element.attr(x, x), r._inputSelector = v + a, r._checkboxSelector = _ + a, r._errors = {}, r._attachEvents(), r._isValidated = !1
                },
                events: ["validate", "change"],
                options: {
                    name: "Validator",
                    errorTemplate: '<span class="k-widget k-tooltip k-tooltip-validation"><span class="k-icon k-warning"> </span> #=message#</span>',
                    messages: {
                        required: "{0} is required",
                        pattern: "{0} is not valid",
                        min: "{0} should be greater than or equal to {1}",
                        max: "{0} should be smaller than or equal to {1}",
                        step: "{0} is not valid",
                        email: "{0} is not valid email",
                        url: "{0} is not valid URL",
                        date: "{0} is not valid date",
                        dateCompare: "End date should be greater than or equal to the start date"
                    },
                    rules: {
                        required: function(e) {
                            var t = e.filter("[type=checkbox]").length && !e.is(":checked"),
                                n = e.val();
                            return !(D(e, "required") && ("" === n || !n || t))
                        },
                        pattern: function(e) {
                            return e.filter("[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]").filter("[pattern]").length && "" !== e.val() ? S(e.val(), e.attr("pattern")) : !0
                        },
                        min: function(e) {
                            if (e.filter(b + ",[" + l.attr("type") + "=number]").filter("[min]").length && "" !== e.val()) {
                                var t = parseFloat(e.attr("min")) || 0,
                                    n = l.parseFloat(e.val());
                                return n >= t
                            }
                            return !0
                        },
                        max: function(e) {
                            if (e.filter(b + ",[" + l.attr("type") + "=number]").filter("[max]").length && "" !== e.val()) {
                                var t = parseFloat(e.attr("max")) || 0,
                                    n = l.parseFloat(e.val());
                                return t >= n
                            }
                            return !0
                        },
                        step: function(e) {
                            if (e.filter(b + ",[" + l.attr("type") + "=number]").filter("[step]").length && "" !== e.val()) {
                                var t, n = parseFloat(e.attr("min")) || 0,
                                    i = parseFloat(e.attr("step")) || 1,
                                    o = parseFloat(e.val()),
                                    a = r(i);
                                return a ? (t = Math.pow(10, a), Math.floor((o - n) * t) % (i * t) / Math.pow(100, a) === 0) : (o - n) % i === 0
                            }
                            return !0
                        },
                        email: function(e) {
                            return T(e, "[type=email],[" + l.attr("type") + "=email]", m)
                        },
                        url: function(e) {
                            return T(e, "[type=url],[" + l.attr("type") + "=url]", g)
                        },
                        date: function(e) {
                            return e.filter("[type^=date],[" + l.attr("type") + "=date]").length && "" !== e.val() ? null !== l.parseDate(e.val(), e.attr(l.attr("format"))) : !0
                        }
                    },
                    validateOnBlur: !0
                },
                destroy: function() {
                    c.fn.destroy.call(this), this.element.off(d)
                },
                value: function() {
                    return this._isValidated ? 0 === this.errors().length : !1
                },
                _submit: function(e) {
                    return this.validate() ? !0 : (e.stopPropagation(), e.stopImmediatePropagation(), e.preventDefault(), !1)
                },
                _checkElement: function(e) {
                    var t = this.value();
                    this.validateInput(e), this.value() !== t && this.trigger("change")
                },
                _attachEvents: function() {
                    var t = this;
                    t.element.is(k) && t.element.on("submit" + d, C(t._submit, t)), t.options.validateOnBlur && (t.element.is(v) ? (t.element.on(w + d, function() {
                        t._checkElement(t.element)
                    }), t.element.is(_) && t.element.on("click" + d, function() {
                        t._checkElement(t.element)
                    })) : (t.element.on(w + d, t._inputSelector, function() {
                        t._checkElement(e(this))
                    }), t.element.on("click" + d, t._checkboxSelector, function() {
                        t._checkElement(e(this))
                    })))
                },
                validate: function() {
                    var e, t, n, i, r = !1,
                        o = this.value();
                    if (this._errors = {}, this.element.is(v)) r = this.validateInput(this.element);
                    else {
                        for (i = !1, e = this.element.find(this._inputSelector), t = 0, n = e.length; n > t; t++) this.validateInput(e.eq(t)) || (i = !0);
                        r = !i
                    }
                    return this.trigger("validate", {
                        valid: r
                    }), o !== r && this.trigger("change"), r
                },
                validateInput: function(t) {
                    var n, r, a, s, c, d, h, m, g, v;
                    return t = e(t), this._isValidated = !0, n = this, r = n._errorTemplate, a = n._checkValidity(t), s = a.valid, c = "." + u, d = t.attr(y) || "", h = n._findMessageContainer(d).add(t.next(c).filter(function() {
                        var t = e(this);
                        return t.filter("[" + l.attr("for") + "]").length ? t.attr(l.attr("for")) === d : !0
                    })).hide(), t.removeAttr("aria-invalid"), s ? delete n._errors[d] : (m = n._extractMessage(t, a.key), n._errors[d] = m, g = o(r({
                        message: i(m)
                    })), v = h.attr("id"), n._decorateMessageContainer(g, d), v && g.attr("id", v), h.replaceWith(g).length || g.insertAfter(t), g.show(), t.attr("aria-invalid", !0)), t.toggleClass(f, !s), t.toggleClass(p, s), s
                },
                hideMessages: function() {
                    var e = this,
                        t = "." + u,
                        n = e.element;
                    n.is(v) ? n.next(t).hide() : n.find(t).hide()
                },
                _findMessageContainer: function(t) {
                    var n, i, r, o = l.ui.validator.messageLocators,
                        s = e();
                    for (i = 0, r = this.element.length; r > i; i++) s = s.add(a(this.element[i].getElementsByTagName("*"), t));
                    for (n in o) s = s.add(o[n].locate(this.element, t));
                    return s
                },
                _decorateMessageContainer: function(e, t) {
                    var n, i = l.ui.validator.messageLocators;
                    e.addClass(u).attr(l.attr("for"), t || "");
                    for (n in i) i[n].decorate(e, t);
                    e.attr("role", "alert")
                },
                _extractMessage: function(e, t) {
                    var n = this,
                        i = n.options.messages[t],
                        r = e.attr(y);
                    return i = l.isFunction(i) ? i(e) : i, l.format(e.attr(l.attr(t + "-msg")) || e.attr("validationMessage") || e.attr("title") || i || "", r, e.attr(t) || e.attr(l.attr(t)))
                },
                _checkValidity: function(e) {
                    var t, n = this.options.rules;
                    for (t in n)
                        if (!n[t].call(this, e)) return {
                            valid: !1,
                            key: t
                        };
                    return {
                        valid: !0
                    }
                },
                errors: function() {
                    var e, t = [],
                        n = this._errors;
                    for (e in n) t.push(n[e]);
                    return t
                }
            }), l.ui.plugin(s)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.userevents.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t) {
                var n = e.x.location,
                    i = e.y.location,
                    r = t.x.location,
                    o = t.y.location,
                    a = n - r,
                    s = i - o;
                return {
                    center: {
                        x: (n + r) / 2,
                        y: (i + o) / 2
                    },
                    distance: Math.sqrt(a * a + s * s)
                }
            }

            function i(e) {
                var t, n, i, r = [],
                    o = e.originalEvent,
                    s = e.currentTarget,
                    l = 0;
                if (e.api) r.push({
                    id: 2,
                    event: e,
                    target: e.target,
                    currentTarget: e.target,
                    location: e,
                    type: "api"
                });
                else if (e.type.match(/touch/))
                    for (n = o ? o.changedTouches : [], t = n.length; t > l; l++) i = n[l], r.push({
                        location: i,
                        event: e,
                        target: i.target,
                        currentTarget: s,
                        id: i.identifier,
                        type: "touch"
                    });
                else r.push(a.pointers || a.msPointers ? {
                        location: o,
                        event: e,
                        target: e.target,
                        currentTarget: s,
                        id: o.pointerId,
                        type: "pointer"
                    } : {
                        id: 1,
                        event: e,
                        target: e.target,
                        currentTarget: s,
                        location: e,
                        type: "mouse"
                    });
                return r
            }

            function r(e) {
                for (var t = o.eventMap.up.split(" "), n = 0, i = t.length; i > n; n++) e(t[n])
            }
            var o = window.kendo,
                a = o.support,
                s = window.document,
                l = o.Class,
                c = o.Observable,
                d = e.now,
                u = e.extend,
                h = a.mobileOS,
                f = h && h.android,
                p = 800,
                m = a.browser.msie ? 5 : 0,
                g = "press",
                v = "hold",
                _ = "select",
                b = "start",
                w = "move",
                y = "end",
                k = "cancel",
                x = "tap",
                C = "release",
                S = "gesturestart",
                T = "gesturechange",
                D = "gestureend",
                A = "gesturetap",
                E = {
                    api: 0,
                    touch: 0,
                    mouse: 9,
                    pointer: 9
                },
                F = !a.touch || a.mouseAndTouchPresent,
                I = l.extend({
                    init: function(e, t) {
                        var n = this;
                        n.axis = e, n._updateLocationData(t), n.startLocation = n.location, n.velocity = n.delta = 0, n.timeStamp = d()
                    },
                    move: function(e) {
                        var t = this,
                            n = e["page" + t.axis],
                            i = d(),
                            r = i - t.timeStamp || 1;
                        (n || !f) && (t.delta = n - t.location, t._updateLocationData(e), t.initialDelta = n - t.startLocation, t.velocity = t.delta / r, t.timeStamp = i)
                    },
                    _updateLocationData: function(e) {
                        var t = this,
                            n = t.axis;
                        t.location = e["page" + n], t.client = e["client" + n], t.screen = e["screen" + n]
                    }
                }),
                M = l.extend({
                    init: function(e, t, n) {
                        u(this, {
                            x: new I("X", n.location),
                            y: new I("Y", n.location),
                            type: n.type,
                            useClickAsTap: e.useClickAsTap,
                            threshold: e.threshold || E[n.type],
                            userEvents: e,
                            target: t,
                            currentTarget: n.currentTarget,
                            initialTouch: n.target,
                            id: n.id,
                            pressEvent: n,
                            _moved: !1,
                            _finished: !1
                        })
                    },
                    press: function() {
                        this._holdTimeout = setTimeout(e.proxy(this, "_hold"), this.userEvents.minHold), this._trigger(g, this.pressEvent)
                    },
                    _hold: function() {
                        this._trigger(v, this.pressEvent)
                    },
                    move: function(e) {
                        var t = this;
                        if (!t._finished) {
                            if (t.x.move(e.location), t.y.move(e.location), !t._moved) {
                                if (t._withinIgnoreThreshold()) return;
                                if (R.current && R.current !== t.userEvents) return t.dispose();
                                t._start(e)
                            }
                            t._finished || t._trigger(w, e)
                        }
                    },
                    end: function(e) {
                        this.endTime = d(), this._finished || (this._finished = !0, this._trigger(C, e), this._moved ? this._trigger(y, e) : this.useClickAsTap || this._trigger(x, e), clearTimeout(this._holdTimeout), this.dispose())
                    },
                    dispose: function() {
                        var t = this.userEvents,
                            n = t.touches;
                        this._finished = !0, this.pressEvent = null, clearTimeout(this._holdTimeout), n.splice(e.inArray(this, n), 1)
                    },
                    skip: function() {
                        this.dispose()
                    },
                    cancel: function() {
                        this.dispose()
                    },
                    isMoved: function() {
                        return this._moved
                    },
                    _start: function(e) {
                        clearTimeout(this._holdTimeout), this.startTime = d(), this._moved = !0, this._trigger(b, e)
                    },
                    _trigger: function(e, t) {
                        var n = this,
                            i = t.event,
                            r = {
                                touch: n,
                                x: n.x,
                                y: n.y,
                                target: n.target,
                                event: i
                            };
                        n.userEvents.notify(e, r) && i.preventDefault()
                    },
                    _withinIgnoreThreshold: function() {
                        var e = this.x.initialDelta,
                            t = this.y.initialDelta;
                        return Math.sqrt(e * e + t * t) <= this.threshold
                    }
                }),
                R = c.extend({
                    init: function(t, n) {
                        var i, l, d, h = this,
                            f = o.guid();
                        n = n || {}, i = h.filter = n.filter, h.threshold = n.threshold || m, h.minHold = n.minHold || p, h.touches = [], h._maxTouches = n.multiTouch ? 2 : 1, h.allowSelection = n.allowSelection, h.captureUpIfMoved = n.captureUpIfMoved, h.useClickAsTap = !n.fastTap && !a.delayedClick(), h.eventNS = f, t = e(t).handler(h), c.fn.init.call(h), u(h, {
                            element: t,
                            surface: e(n.global && F ? s.documentElement : n.surface || t),
                            stopPropagation: n.stopPropagation,
                            pressed: !1
                        }), h.surface.handler(h).on(o.applyEventMap("move", f), "_move").on(o.applyEventMap("up cancel", f), "_end"), t.on(o.applyEventMap("down", f), i, "_start"), h.useClickAsTap && t.on(o.applyEventMap("click", f), i, "_click"), (a.pointers || a.msPointers) && (11 > a.browser.version ? t.css("-ms-touch-action", "pinch-zoom double-tap-zoom") : t.css("touch-action", "pan-y")), n.preventDragEvent && t.on(o.applyEventMap("dragstart", f), o.preventDefault), t.on(o.applyEventMap("mousedown", f), i, {
                            root: t
                        }, "_select"), h.captureUpIfMoved && a.eventCapture && (l = h.surface[0], d = e.proxy(h.preventIfMoving, h), r(function(e) {
                            l.addEventListener(e, d, !0)
                        })), h.bind([g, v, x, b, w, y, C, k, S, T, D, A, _], n)
                    },
                    preventIfMoving: function(e) {
                        this._isMoved() && e.preventDefault()
                    },
                    destroy: function() {
                        var e, t = this;
                        t._destroyed || (t._destroyed = !0, t.captureUpIfMoved && a.eventCapture && (e = t.surface[0], r(function(n) {
                            e.removeEventListener(n, t.preventIfMoving)
                        })), t.element.kendoDestroy(t.eventNS), t.surface.kendoDestroy(t.eventNS), t.element.removeData("handler"), t.surface.removeData("handler"), t._disposeAll(), t.unbind(), delete t.surface, delete t.element, delete t.currentTarget)
                    },
                    capture: function() {
                        R.current = this
                    },
                    cancel: function() {
                        this._disposeAll(), this.trigger(k)
                    },
                    notify: function(e, t) {
                        var i = this,
                            r = i.touches;
                        if (this._isMultiTouch()) {
                            switch (e) {
                                case w:
                                    e = T;
                                    break;
                                case y:
                                    e = D;
                                    break;
                                case x:
                                    e = A
                            }
                            u(t, {
                                touches: r
                            }, n(r[0], r[1]))
                        }
                        return this.trigger(e, u(t, {
                            type: e
                        }))
                    },
                    press: function(e, t, n) {
                        this._apiCall("_start", e, t, n)
                    },
                    move: function(e, t) {
                        this._apiCall("_move", e, t)
                    },
                    end: function(e, t) {
                        this._apiCall("_end", e, t)
                    },
                    _isMultiTouch: function() {
                        return this.touches.length > 1
                    },
                    _maxTouchesReached: function() {
                        return this.touches.length >= this._maxTouches
                    },
                    _disposeAll: function() {
                        for (var e = this.touches; e.length > 0;) e.pop().dispose()
                    },
                    _isMoved: function() {
                        return e.grep(this.touches, function(e) {
                            return e.isMoved()
                        }).length
                    },
                    _select: function(e) {
                        (!this.allowSelection || this.trigger(_, {
                            event: e
                        })) && e.preventDefault()
                    },
                    _start: function(t) {
                        var n, r, o = this,
                            a = 0,
                            s = o.filter,
                            l = i(t),
                            c = l.length,
                            d = t.which;
                        if (!(d && d > 1 || o._maxTouchesReached()))
                            for (R.current = null, o.currentTarget = t.currentTarget, o.stopPropagation && t.stopPropagation(); c > a && !o._maxTouchesReached(); a++) r = l[a], n = s ? e(r.currentTarget) : o.element, n.length && (r = new M(o, n, r), o.touches.push(r), r.press(), o._isMultiTouch() && o.notify("gesturestart", {}))
                    },
                    _move: function(e) {
                        this._eachTouch("move", e)
                    },
                    _end: function(e) {
                        this._eachTouch("end", e)
                    },
                    _click: function(t) {
                        var n = {
                            touch: {
                                initialTouch: t.target,
                                target: e(t.currentTarget),
                                endTime: d(),
                                x: {
                                    location: t.pageX,
                                    client: t.clientX
                                },
                                y: {
                                    location: t.pageY,
                                    client: t.clientY
                                }
                            },
                            x: t.pageX,
                            y: t.pageY,
                            target: e(t.currentTarget),
                            event: t,
                            type: "tap"
                        };
                        this.trigger("tap", n) && t.preventDefault()
                    },
                    _eachTouch: function(e, t) {
                        var n, r, o, a, s = this,
                            l = {},
                            c = i(t),
                            d = s.touches;
                        for (n = 0; d.length > n; n++) r = d[n], l[r.id] = r;
                        for (n = 0; c.length > n; n++) o = c[n], a = l[o.id], a && a[e](o)
                    },
                    _apiCall: function(t, n, i, r) {
                        this[t]({
                            api: !0,
                            pageX: n,
                            pageY: i,
                            clientX: n,
                            clientY: i,
                            target: e(r || this.element)[0],
                            stopPropagation: e.noop,
                            preventDefault: e.noop
                        })
                    }
                });
            R.defaultThreshold = function(e) {
                m = e
            }, R.minHold = function(e) {
                p = e
            }, o.getTouches = i, o.touchDelta = n, o.UserEvents = R
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.draganddrop.min", ["kendo.core.min", "kendo.userevents.min"], e)
    }(function() {
        return function(e, t) {
            function n(t, n) {
                try {
                    return e.contains(t, n) || t == n
                } catch (i) {
                    return !1
                }
            }

            function i(e, t) {
                return parseInt(e.css(t), 10) || 0
            }

            function r(e, t) {
                return Math.min(Math.max(e, t.min), t.max)
            }

            function o(e, t) {
                var n = A(e),
                    r = n.left + i(e, "borderLeftWidth") + i(e, "paddingLeft"),
                    o = n.top + i(e, "borderTopWidth") + i(e, "paddingTop"),
                    a = r + e.width() - t.outerWidth(!0),
                    s = o + e.height() - t.outerHeight(!0);
                return {
                    x: {
                        min: r,
                        max: a
                    },
                    y: {
                        min: o,
                        max: s
                    }
                }
            }

            function a(n, i, r) {
                for (var o, a, s = 0, l = i && i.length, c = r && r.length; n && n.parentNode;) {
                    for (s = 0; l > s; s++)
                        if (o = i[s], o.element[0] === n) return {
                            target: o,
                            targetElement: n
                        };
                    for (s = 0; c > s; s++)
                        if (a = r[s], e.contains(a.element[0], n) && b.matchesSelector.call(n, a.options.filter)) return {
                            target: a,
                            targetElement: n
                        };
                    n = n.parentNode
                }
                return t
            }

            function s(e, t) {
                var n, i = t.options.group,
                    r = e[i];
                if (x.fn.destroy.call(t), r.length > 1) {
                    for (n = 0; r.length > n; n++)
                        if (r[n] == t) {
                            r.splice(n, 1);
                            break
                        }
                } else r.length = 0, delete e[i]
            }

            function l(e) {
                var t, n, i, r = c()[0];
                return e[0] === r ? (n = r.scrollTop, i = r.scrollLeft, {
                    top: n,
                    left: i,
                    bottom: n + y.height(),
                    right: i + y.width()
                }) : (t = e.offset(), t.bottom = t.top + e.height(), t.right = t.left + e.width(), t)
            }

            function c() {
                return e(_.support.browser.chrome ? w.body : w.documentElement)
            }

            function d(t) {
                var n, i = c();
                if (!t || t === w.body || t === w.documentElement) return i;
                for (n = e(t)[0]; n && !_.isScrollable(n) && n !== w.body;) n = n.parentNode;
                return n === w.body ? i : e(n)
            }

            function u(e, t, n) {
                var i = {
                        x: 0,
                        y: 0
                    },
                    r = 50;
                return r > e - n.left ? i.x = -(r - (e - n.left)) : r > n.right - e && (i.x = r - (n.right - e)), r > t - n.top ? i.y = -(r - (t - n.top)) : r > n.bottom - t && (i.y = r - (n.bottom - t)), i
            }
            var h, f, p, m, g, v, _ = window.kendo,
                b = _.support,
                w = window.document,
                y = e(window),
                k = _.Class,
                x = _.ui.Widget,
                C = _.Observable,
                S = _.UserEvents,
                T = e.proxy,
                D = e.extend,
                A = _.getOffset,
                E = {},
                F = {},
                I = {},
                M = _.elementUnderCursor,
                R = "keyup",
                P = "change",
                z = "dragstart",
                B = "hold",
                L = "drag",
                H = "dragend",
                N = "dragcancel",
                O = "hintDestroyed",
                V = "dragenter",
                U = "dragleave",
                W = "drop",
                j = C.extend({
                    init: function(t, n) {
                        var i = this,
                            r = t[0];
                        i.capture = !1, r.addEventListener ? (e.each(_.eventMap.down.split(" "), function() {
                            r.addEventListener(this, T(i._press, i), !0)
                        }), e.each(_.eventMap.up.split(" "), function() {
                            r.addEventListener(this, T(i._release, i), !0)
                        })) : (e.each(_.eventMap.down.split(" "), function() {
                            r.attachEvent(this, T(i._press, i))
                        }), e.each(_.eventMap.up.split(" "), function() {
                            r.attachEvent(this, T(i._release, i))
                        })), C.fn.init.call(i), i.bind(["press", "release"], n || {})
                    },
                    captureNext: function() {
                        this.capture = !0
                    },
                    cancelCapture: function() {
                        this.capture = !1
                    },
                    _press: function(e) {
                        var t = this;
                        t.trigger("press"), t.capture && e.preventDefault()
                    },
                    _release: function(e) {
                        var t = this;
                        t.trigger("release"), t.capture && (e.preventDefault(), t.cancelCapture())
                    }
                }),
                q = C.extend({
                    init: function(t) {
                        var n = this;
                        C.fn.init.call(n), n.forcedEnabled = !1, e.extend(n, t), n.scale = 1, n.horizontal ? (n.measure = "offsetWidth", n.scrollSize = "scrollWidth", n.axis = "x") : (n.measure = "offsetHeight", n.scrollSize = "scrollHeight", n.axis = "y")
                    },
                    makeVirtual: function() {
                        e.extend(this, {
                            virtual: !0,
                            forcedEnabled: !0,
                            _virtualMin: 0,
                            _virtualMax: 0
                        })
                    },
                    virtualSize: function(e, t) {
                        (this._virtualMin !== e || this._virtualMax !== t) && (this._virtualMin = e, this._virtualMax = t, this.update())
                    },
                    outOfBounds: function(e) {
                        return e > this.max || this.min > e
                    },
                    forceEnabled: function() {
                        this.forcedEnabled = !0
                    },
                    getSize: function() {
                        return this.container[0][this.measure]
                    },
                    getTotal: function() {
                        return this.element[0][this.scrollSize]
                    },
                    rescale: function(e) {
                        this.scale = e
                    },
                    update: function(e) {
                        var t = this,
                            n = t.virtual ? t._virtualMax : t.getTotal(),
                            i = n * t.scale,
                            r = t.getSize();
                        (0 !== n || t.forcedEnabled) && (t.max = t.virtual ? -t._virtualMin : 0, t.size = r, t.total = i, t.min = Math.min(t.max, r - i), t.minScale = r / n, t.centerOffset = (i - r) / 2, t.enabled = t.forcedEnabled || i > r, e || t.trigger(P, t))
                    }
                }),
                G = C.extend({
                    init: function(e) {
                        var t = this;
                        C.fn.init.call(t), t.x = new q(D({
                            horizontal: !0
                        }, e)), t.y = new q(D({
                            horizontal: !1
                        }, e)), t.container = e.container, t.forcedMinScale = e.minScale, t.maxScale = e.maxScale || 100, t.bind(P, e)
                    },
                    rescale: function(e) {
                        this.x.rescale(e), this.y.rescale(e), this.refresh()
                    },
                    centerCoordinates: function() {
                        return {
                            x: Math.min(0, -this.x.centerOffset),
                            y: Math.min(0, -this.y.centerOffset)
                        }
                    },
                    refresh: function() {
                        var e = this;
                        e.x.update(), e.y.update(), e.enabled = e.x.enabled || e.y.enabled, e.minScale = e.forcedMinScale || Math.min(e.x.minScale, e.y.minScale), e.fitScale = Math.max(e.x.minScale, e.y.minScale), e.trigger(P)
                    }
                }),
                $ = C.extend({
                    init: function(e) {
                        var t = this;
                        D(t, e), C.fn.init.call(t)
                    },
                    outOfBounds: function() {
                        return this.dimension.outOfBounds(this.movable[this.axis])
                    },
                    dragMove: function(e) {
                        var t = this,
                            n = t.dimension,
                            i = t.axis,
                            r = t.movable,
                            o = r[i] + e;
                        n.enabled && ((n.min > o && 0 > e || o > n.max && e > 0) && (e *= t.resistance), r.translateAxis(i, e), t.trigger(P, t))
                    }
                }),
                Y = k.extend({
                    init: function(t) {
                        var n, i, r, o, a = this;
                        D(a, {
                            elastic: !0
                        }, t), r = a.elastic ? .5 : 0, o = a.movable, a.x = n = new $({
                            axis: "x",
                            dimension: a.dimensions.x,
                            resistance: r,
                            movable: o
                        }), a.y = i = new $({
                            axis: "y",
                            dimension: a.dimensions.y,
                            resistance: r,
                            movable: o
                        }), a.userEvents.bind(["press", "move", "end", "gesturestart", "gesturechange"], {
                            gesturestart: function(e) {
                                a.gesture = e, a.offset = a.dimensions.container.offset()
                            },
                            press: function(t) {
                                e(t.event.target).closest("a").is("[data-navigate-on-press=true]") && t.sender.cancel()
                            },
                            gesturechange: function(e) {
                                var t, r, s, l = a.gesture,
                                    c = l.center,
                                    d = e.center,
                                    u = e.distance / l.distance,
                                    h = a.dimensions.minScale,
                                    f = a.dimensions.maxScale;
                                h >= o.scale && 1 > u && (u += .8 * (1 - u)), o.scale * u >= f && (u = f / o.scale), r = o.x + a.offset.left, s = o.y + a.offset.top, t = {
                                    x: (r - c.x) * u + d.x - r,
                                    y: (s - c.y) * u + d.y - s
                                }, o.scaleWith(u), n.dragMove(t.x), i.dragMove(t.y), a.dimensions.rescale(o.scale), a.gesture = e, e.preventDefault()
                            },
                            move: function(e) {
                                e.event.target.tagName.match(/textarea|input/i) || (n.dimension.enabled || i.dimension.enabled ? (n.dragMove(e.x.delta), i.dragMove(e.y.delta), e.preventDefault()) : e.touch.skip())
                            },
                            end: function(e) {
                                e.preventDefault()
                            }
                        })
                    }
                }),
                K = b.transitions.prefix + "Transform";
            f = b.hasHW3D ? function(e, t, n) {
                return "translate3d(" + e + "px," + t + "px,0) scale(" + n + ")"
            } : function(e, t, n) {
                return "translate(" + e + "px," + t + "px) scale(" + n + ")"
            }, p = C.extend({
                init: function(t) {
                    var n = this;
                    C.fn.init.call(n), n.element = e(t), n.element[0].style.webkitTransformOrigin = "left top", n.x = 0, n.y = 0, n.scale = 1, n._saveCoordinates(f(n.x, n.y, n.scale))
                },
                translateAxis: function(e, t) {
                    this[e] += t, this.refresh()
                },
                scaleTo: function(e) {
                    this.scale = e, this.refresh()
                },
                scaleWith: function(e) {
                    this.scale *= e, this.refresh()
                },
                translate: function(e) {
                    this.x += e.x, this.y += e.y, this.refresh()
                },
                moveAxis: function(e, t) {
                    this[e] = t, this.refresh()
                },
                moveTo: function(e) {
                    D(this, e), this.refresh()
                },
                refresh: function() {
                    var e, t = this,
                        n = t.x,
                        i = t.y;
                    t.round && (n = Math.round(n), i = Math.round(i)), e = f(n, i, t.scale), e != t.coordinates && (_.support.browser.msie && 10 > _.support.browser.version ? (t.element[0].style.position = "absolute", t.element[0].style.left = t.x + "px", t.element[0].style.top = t.y + "px") : t.element[0].style[K] = e, t._saveCoordinates(e), t.trigger(P))
                },
                _saveCoordinates: function(e) {
                    this.coordinates = e
                }
            }), m = x.extend({
                init: function(e, t) {
                    var n, i = this;
                    x.fn.init.call(i, e, t), n = i.options.group, n in F ? F[n].push(i) : F[n] = [i]
                },
                events: [V, U, W],
                options: {
                    name: "DropTarget",
                    group: "default"
                },
                destroy: function() {
                    s(F, this)
                },
                _trigger: function(e, n) {
                    var i = this,
                        r = E[i.options.group];
                    return r ? i.trigger(e, D({}, n.event, {
                        draggable: r,
                        dropTarget: n.dropTarget
                    })) : t
                },
                _over: function(e) {
                    this._trigger(V, e)
                },
                _out: function(e) {
                    this._trigger(U, e)
                },
                _drop: function(e) {
                    var t = this,
                        n = E[t.options.group];
                    n && (n.dropped = !t._trigger(W, e))
                }
            }), m.destroyGroup = function(e) {
                var t, n = F[e] || I[e];
                if (n) {
                    for (t = 0; n.length > t; t++) x.fn.destroy.call(n[t]);
                    n.length = 0, delete F[e], delete I[e]
                }
            }, m._cache = F, g = m.extend({
                init: function(e, t) {
                    var n, i = this;
                    x.fn.init.call(i, e, t), n = i.options.group, n in I ? I[n].push(i) : I[n] = [i]
                },
                destroy: function() {
                    s(I, this)
                },
                options: {
                    name: "DropTargetArea",
                    group: "default",
                    filter: null
                }
            }), v = x.extend({
                init: function(e, t) {
                    var n = this;
                    x.fn.init.call(n, e, t), n._activated = !1, n.userEvents = new S(n.element, {
                        global: !0,
                        allowSelection: !0,
                        filter: n.options.filter,
                        threshold: n.options.distance,
                        start: T(n._start, n),
                        hold: T(n._hold, n),
                        move: T(n._drag, n),
                        end: T(n._end, n),
                        cancel: T(n._cancel, n),
                        select: T(n._select, n)
                    }), n._afterEndHandler = T(n._afterEnd, n), n._captureEscape = T(n._captureEscape, n)
                },
                events: [B, z, L, H, N, O],
                options: {
                    name: "Draggable",
                    distance: _.support.touch ? 0 : 5,
                    group: "default",
                    cursorOffset: null,
                    axis: null,
                    container: null,
                    filter: null,
                    ignore: null,
                    holdToDrag: !1,
                    autoScroll: !1,
                    dropped: !1
                },
                cancelHold: function() {
                    this._activated = !1
                },
                _captureEscape: function(e) {
                    var t = this;
                    e.keyCode === _.keys.ESC && (t._trigger(N, {
                        event: e
                    }), t.userEvents.cancel())
                },
                _updateHint: function(t) {
                    var n, i = this,
                        o = i.options,
                        a = i.boundaries,
                        s = o.axis,
                        l = i.options.cursorOffset;
                    l ? n = {
                        left: t.x.location + l.left,
                        top: t.y.location + l.top
                    } : (i.hintOffset.left += t.x.delta, i.hintOffset.top += t.y.delta, n = e.extend({}, i.hintOffset)), a && (n.top = r(n.top, a.y), n.left = r(n.left, a.x)), "x" === s ? delete n.top : "y" === s && delete n.left, i.hint.css(n)
                },
                _shouldIgnoreTarget: function(t) {
                    var n = this.options.ignore;
                    return n && e(t).is(n)
                },
                _select: function(e) {
                    this._shouldIgnoreTarget(e.event.target) || e.preventDefault()
                },
                _start: function(n) {
                    var i, r = this,
                        a = r.options,
                        s = a.container,
                        l = a.hint;
                    return this._shouldIgnoreTarget(n.touch.initialTouch) || a.holdToDrag && !r._activated ? (r.userEvents.cancel(), t) : (r.currentTarget = n.target, r.currentTargetOffset = A(r.currentTarget), l && (r.hint && r.hint.stop(!0, !0).remove(), r.hint = _.isFunction(l) ? e(l.call(r, r.currentTarget)) : l, i = A(r.currentTarget), r.hintOffset = i, r.hint.css({
                        position: "absolute",
                        zIndex: 2e4,
                        left: i.left,
                        top: i.top
                    }).appendTo(w.body), r.angular("compile", function() {
                        r.hint.removeAttr("ng-repeat");
                        for (var t = e(n.target); !t.data("$$kendoScope") && t.length;) t = t.parent();
                        return {
                            elements: r.hint.get(),
                            scopeFrom: t.data("$$kendoScope")
                        }
                    })), E[a.group] = r, r.dropped = !1, s && (r.boundaries = o(s, r.hint)), e(w).on(R, r._captureEscape), r._trigger(z, n) && (r.userEvents.cancel(), r._afterEnd()), r.userEvents.capture(), t)
                },
                _hold: function(e) {
                    this.currentTarget = e.target, this._trigger(B, e) ? this.userEvents.cancel() : this._activated = !0
                },
                _drag: function(t) {
                    var n, i;
                    t.preventDefault(), n = this._elementUnderCursor(t), this._lastEvent = t, this._processMovement(t, n), this.options.autoScroll && (this._cursorElement !== n && (this._scrollableParent = d(n), this._cursorElement = n), this._scrollableParent[0] && (i = u(t.x.location, t.y.location, l(this._scrollableParent)), this._scrollCompenstation = e.extend({}, this.hintOffset), this._scrollVelocity = i, 0 === i.y && 0 === i.x ? (clearInterval(this._scrollInterval), this._scrollInterval = null) : this._scrollInterval || (this._scrollInterval = setInterval(e.proxy(this, "_autoScroll"), 50)))), this.hint && this._updateHint(t)
                },
                _processMovement: function(n, i) {
                    this._withDropTarget(i, function(i, r) {
                        if (!i) return h && (h._trigger(U, D(n, {
                            dropTarget: e(h.targetElement)
                        })), h = null), t;
                        if (h) {
                            if (r === h.targetElement) return;
                            h._trigger(U, D(n, {
                                dropTarget: e(h.targetElement)
                            }))
                        }
                        i._trigger(V, D(n, {
                            dropTarget: e(r)
                        })), h = D(i, {
                            targetElement: r
                        })
                    }), this._trigger(L, D(n, {
                        dropTarget: h,
                        elementUnderCursor: i
                    }))
                },
                _autoScroll: function() {
                    var e, t, n, i, r, o, a, s, l = this._scrollableParent[0],
                        d = this._scrollVelocity,
                        u = this._scrollCompenstation;
                    l && (e = this._elementUnderCursor(this._lastEvent), this._processMovement(this._lastEvent, e), i = l === c()[0], i ? (t = w.body.scrollHeight > y.height(), n = w.body.scrollWidth > y.width()) : (t = l.scrollHeight >= l.offsetHeight, n = l.scrollWidth >= l.offsetWidth), r = l.scrollTop + d.y, o = t && r > 0 && l.scrollHeight > r, a = l.scrollLeft + d.x, s = n && a > 0 && l.scrollWidth > a, o && (l.scrollTop += d.y), s && (l.scrollLeft += d.x), i && (s || o) && (o && (u.top += d.y), s && (u.left += d.x), this.hint.css(u)))
                },
                _end: function(t) {
                    this._withDropTarget(this._elementUnderCursor(t), function(n, i) {
                        n && (n._drop(D({}, t, {
                            dropTarget: e(i)
                        })), h = null)
                    }), this._cancel(this._trigger(H, t))
                },
                _cancel: function(e) {
                    var t = this;
                    t._scrollableParent = null, this._cursorElement = null, clearInterval(this._scrollInterval), t._activated = !1, t.hint && !t.dropped ? setTimeout(function() {
                        t.hint.stop(!0, !0), e ? t._afterEndHandler() : t.hint.animate(t.currentTargetOffset, "fast", t._afterEndHandler)
                    }, 0) : t._afterEnd()
                },
                _trigger: function(e, t) {
                    var n = this;
                    return n.trigger(e, D({}, t.event, {
                        x: t.x,
                        y: t.y,
                        currentTarget: n.currentTarget,
                        initialTarget: t.touch ? t.touch.initialTouch : null,
                        dropTarget: t.dropTarget,
                        elementUnderCursor: t.elementUnderCursor
                    }))
                },
                _elementUnderCursor: function(e) {
                    var t = M(e),
                        i = this.hint;
                    return i && n(i[0], t) && (i.hide(), t = M(e), t || (t = M(e)), i.show()), t
                },
                _withDropTarget: function(e, t) {
                    var n, i = this.options.group,
                        r = F[i],
                        o = I[i];
                    (r && r.length || o && o.length) && (n = a(e, r, o), n ? t(n.target, n.targetElement) : t())
                },
                destroy: function() {
                    var e = this;
                    x.fn.destroy.call(e), e._afterEnd(), e.userEvents.destroy(), this._scrollableParent = null, this._cursorElement = null, clearInterval(this._scrollInterval), e.currentTarget = null
                },
                _afterEnd: function() {
                    var t = this;
                    t.hint && t.hint.remove(), delete E[t.options.group], t.trigger("destroy"), t.trigger(O), e(w).off(R, t._captureEscape)
                }
            }), _.ui.plugin(m), _.ui.plugin(g), _.ui.plugin(v), _.TapCapture = j, _.containerBoundaries = o, D(_.ui, {
                Pane: Y,
                PaneDimensions: G,
                Movable: p
            }), _.ui.Draggable.utils = {
                autoScrollVelocity: u,
                scrollableViewPort: l,
                findScrollableParent: d
            }
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.mobile.scroller.min", ["kendo.fx.min", "kendo.draganddrop.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.mobile,
                r = n.effects,
                o = i.ui,
                a = e.proxy,
                s = e.extend,
                l = o.Widget,
                c = n.Class,
                d = n.ui.Movable,
                u = n.ui.Pane,
                h = n.ui.PaneDimensions,
                f = r.Transition,
                p = r.Animation,
                m = Math.abs,
                g = 500,
                v = .7,
                _ = .96,
                b = 10,
                w = 55,
                y = .5,
                k = 5,
                x = "km-scroller-release",
                C = "km-scroller-refresh",
                S = "pull",
                T = "change",
                D = "resize",
                A = "scroll",
                E = 2,
                F = p.extend({
                    init: function(e) {
                        var t = this;
                        p.fn.init.call(t), s(t, e), t.userEvents.bind("gestureend", a(t.start, t)), t.tapCapture.bind("press", a(t.cancel, t))
                    },
                    enabled: function() {
                        return this.dimensions.minScale > this.movable.scale
                    },
                    done: function() {
                        return .01 > this.dimensions.minScale - this.movable.scale
                    },
                    tick: function() {
                        var e = this.movable;
                        e.scaleWith(1.1), this.dimensions.rescale(e.scale)
                    },
                    onEnd: function() {
                        var e = this.movable;
                        e.scaleTo(this.dimensions.minScale), this.dimensions.rescale(e.scale)
                    }
                }),
                I = p.extend({
                    init: function(e) {
                        var t = this;
                        p.fn.init.call(t), s(t, e, {
                            transition: new f({
                                axis: e.axis,
                                movable: e.movable,
                                onEnd: function() {
                                    t._end()
                                }
                            })
                        }), t.tapCapture.bind("press", function() {
                            t.cancel()
                        }), t.userEvents.bind("end", a(t.start, t)), t.userEvents.bind("gestureend", a(t.start, t)), t.userEvents.bind("tap", a(t.onEnd, t))
                    },
                    onCancel: function() {
                        this.transition.cancel()
                    },
                    freeze: function(e) {
                        var t = this;
                        t.cancel(), t._moveTo(e)
                    },
                    onEnd: function() {
                        var e = this;
                        e.paneAxis.outOfBounds() ? e._snapBack() : e._end()
                    },
                    done: function() {
                        return m(this.velocity) < 1
                    },
                    start: function(e) {
                        var t, n = this;
                        n.dimension.enabled && (n.paneAxis.outOfBounds() ? n._snapBack() : (t = e.touch.id === E ? 0 : e.touch[n.axis].velocity, n.velocity = Math.max(Math.min(t * n.velocityMultiplier, w), -w), n.tapCapture.captureNext(), p.fn.start.call(n)))
                    },
                    tick: function() {
                        var e = this,
                            t = e.dimension,
                            n = e.paneAxis.outOfBounds() ? y : e.friction,
                            i = e.velocity *= n,
                            r = e.movable[e.axis] + i;
                        !e.elastic && t.outOfBounds(r) && (r = Math.max(Math.min(r, t.max), t.min), e.velocity = 0), e.movable.moveAxis(e.axis, r)
                    },
                    _end: function() {
                        this.tapCapture.cancelCapture(), this.end()
                    },
                    _snapBack: function() {
                        var e = this,
                            t = e.dimension,
                            n = e.movable[e.axis] > t.max ? t.max : t.min;
                        e._moveTo(n)
                    },
                    _moveTo: function(e) {
                        this.transition.moveTo({
                            location: e,
                            duration: g,
                            ease: f.easeOutExpo
                        })
                    }
                }),
                M = p.extend({
                    init: function(e) {
                        var t = this;
                        n.effects.Animation.fn.init.call(this), s(t, e, {
                            origin: {},
                            destination: {},
                            offset: {}
                        })
                    },
                    tick: function() {
                        this._updateCoordinates(), this.moveTo(this.origin)
                    },
                    done: function() {
                        return m(this.offset.y) < k && m(this.offset.x) < k
                    },
                    onEnd: function() {
                        this.moveTo(this.destination), this.callback && this.callback.call()
                    },
                    setCoordinates: function(e, t) {
                        this.offset = {}, this.origin = e, this.destination = t
                    },
                    setCallback: function(e) {
                        e && n.isFunction(e) ? this.callback = e : e = t
                    },
                    _updateCoordinates: function() {
                        this.offset = {
                            x: (this.destination.x - this.origin.x) / 4,
                            y: (this.destination.y - this.origin.y) / 4
                        }, this.origin = {
                            y: this.origin.y + this.offset.y,
                            x: this.origin.x + this.offset.x
                        }
                    }
                }),
                R = c.extend({
                    init: function(t) {
                        var n = this,
                            i = "x" === t.axis,
                            r = e('<div class="km-touch-scrollbar km-' + (i ? "horizontal" : "vertical") + '-scrollbar" />');
                        s(n, t, {
                            element: r,
                            elementSize: 0,
                            movable: new d(r),
                            scrollMovable: t.movable,
                            alwaysVisible: t.alwaysVisible,
                            size: i ? "width" : "height"
                        }), n.scrollMovable.bind(T, a(n.refresh, n)), n.container.append(r), t.alwaysVisible && n.show()
                    },
                    refresh: function() {
                        var e = this,
                            t = e.axis,
                            n = e.dimension,
                            i = n.size,
                            r = e.scrollMovable,
                            o = i / n.total,
                            a = Math.round(-r[t] * o),
                            s = Math.round(i * o);
                        o >= 1 ? this.element.css("display", "none") : this.element.css("display", ""), a + s > i ? s = i - a : 0 > a && (s += a, a = 0), e.elementSize != s && (e.element.css(e.size, s + "px"), e.elementSize = s), e.movable.moveAxis(t, a)
                    },
                    show: function() {
                        this.element.css({
                            opacity: v,
                            visibility: "visible"
                        })
                    },
                    hide: function() {
                        this.alwaysVisible || this.element.css({
                            opacity: 0
                        })
                    }
                }),
                P = l.extend({
                    init: function(i, r) {
                        var o, c, f, p, g, v, _, b, w, y = this;
                        return l.fn.init.call(y, i, r), i = y.element, (y._native = y.options.useNative && n.support.hasNativeScrolling) ? (i.addClass("km-native-scroller").prepend('<div class="km-scroll-header"/>'), s(y, {
                            scrollElement: i,
                            fixedContainer: i.children().first()
                        }), t) : (i.css("overflow", "hidden").addClass("km-scroll-wrapper").wrapInner('<div class="km-scroll-container"/>').prepend('<div class="km-scroll-header"/>'), o = i.children().eq(1), c = new n.TapCapture(i), f = new d(o), p = new h({
                            element: o,
                            container: i,
                            forcedEnabled: y.options.zoom
                        }), g = this.options.avoidScrolling, v = new n.UserEvents(i, {
                            fastTap: !0,
                            allowSelection: !0,
                            preventDragEvent: !0,
                            captureUpIfMoved: !0,
                            multiTouch: y.options.zoom,
                            start: function(t) {
                                p.refresh();
                                var n = m(t.x.velocity),
                                    i = m(t.y.velocity),
                                    r = 2 * n >= i,
                                    o = e.contains(y.fixedContainer[0], t.event.target),
                                    a = 2 * i >= n;
                                !o && !g(t) && y.enabled && (p.x.enabled && r || p.y.enabled && a) ? v.capture() : v.cancel()
                            }
                        }), _ = new u({
                            movable: f,
                            dimensions: p,
                            userEvents: v,
                            elastic: y.options.elastic
                        }), b = new F({
                            movable: f,
                            dimensions: p,
                            userEvents: v,
                            tapCapture: c
                        }), w = new M({
                            moveTo: function(e) {
                                y.scrollTo(e.x, e.y)
                            }
                        }), f.bind(T, function() {
                            y.scrollTop = -f.y, y.scrollLeft = -f.x, y.trigger(A, {
                                scrollTop: y.scrollTop,
                                scrollLeft: y.scrollLeft
                            })
                        }), y.options.mousewheelScrolling && i.on("DOMMouseScroll mousewheel", a(this, "_wheelScroll")), s(y, {
                            movable: f,
                            dimensions: p,
                            zoomSnapBack: b,
                            animatedScroller: w,
                            userEvents: v,
                            pane: _,
                            tapCapture: c,
                            pulled: !1,
                            enabled: !0,
                            scrollElement: o,
                            scrollTop: 0,
                            scrollLeft: 0,
                            fixedContainer: i.children().first()
                        }), y._initAxis("x"), y._initAxis("y"), y._wheelEnd = function() {
                            y._wheel = !1, y.userEvents.end(0, y._wheelY)
                        }, p.refresh(), y.options.pullToRefresh && y._initPullToRefresh(), t)
                    },
                    _wheelScroll: function(e) {
                        this._wheel || (this._wheel = !0, this._wheelY = 0, this.userEvents.press(0, this._wheelY)), clearTimeout(this._wheelTimeout), this._wheelTimeout = setTimeout(this._wheelEnd, 50);
                        var t = n.wheelDeltaY(e);
                        t && (this._wheelY += t, this.userEvents.move(0, this._wheelY)), e.preventDefault()
                    },
                    makeVirtual: function() {
                        this.dimensions.y.makeVirtual()
                    },
                    virtualSize: function(e, t) {
                        this.dimensions.y.virtualSize(e, t)
                    },
                    height: function() {
                        return this.dimensions.y.size
                    },
                    scrollHeight: function() {
                        return this.scrollElement[0].scrollHeight
                    },
                    scrollWidth: function() {
                        return this.scrollElement[0].scrollWidth
                    },
                    options: {
                        name: "Scroller",
                        zoom: !1,
                        pullOffset: 140,
                        visibleScrollHints: !1,
                        elastic: !0,
                        useNative: !1,
                        mousewheelScrolling: !0,
                        avoidScrolling: function() {
                            return !1
                        },
                        pullToRefresh: !1,
                        messages: {
                            pullTemplate: "Pull to refresh",
                            releaseTemplate: "Release to refresh",
                            refreshTemplate: "Refreshing"
                        }
                    },
                    events: [S, A, D],
                    _resize: function() {
                        this._native || this.contentResized()
                    },
                    setOptions: function(e) {
                        var t = this;
                        l.fn.setOptions.call(t, e), e.pullToRefresh && t._initPullToRefresh()
                    },
                    reset: function() {
                        this._native ? this.scrollElement.scrollTop(0) : (this.movable.moveTo({
                            x: 0,
                            y: 0
                        }), this._scale(1))
                    },
                    contentResized: function() {
                        this.dimensions.refresh(), this.pane.x.outOfBounds() && this.movable.moveAxis("x", this.dimensions.x.min), this.pane.y.outOfBounds() && this.movable.moveAxis("y", this.dimensions.y.min)
                    },
                    zoomOut: function() {
                        var e = this.dimensions;
                        e.refresh(), this._scale(e.fitScale), this.movable.moveTo(e.centerCoordinates())
                    },
                    enable: function() {
                        this.enabled = !0
                    },
                    disable: function() {
                        this.enabled = !1
                    },
                    scrollTo: function(e, t) {
                        this._native ? (this.scrollElement.scrollLeft(m(e)), this.scrollElement.scrollTop(m(t))) : (this.dimensions.refresh(), this.movable.moveTo({
                            x: e,
                            y: t
                        }))
                    },
                    animatedScrollTo: function(e, t, n) {
                        var i, r;
                        this._native ? this.scrollTo(e, t) : (i = {
                            x: this.movable.x,
                            y: this.movable.y
                        }, r = {
                            x: e,
                            y: t
                        }, this.animatedScroller.setCoordinates(i, r), this.animatedScroller.setCallback(n), this.animatedScroller.start())
                    },
                    pullHandled: function() {
                        var e = this;
                        e.refreshHint.removeClass(C), e.hintContainer.html(e.pullTemplate({})), e.yinertia.onEnd(), e.xinertia.onEnd(), e.userEvents.cancel()
                    },
                    destroy: function() {
                        l.fn.destroy.call(this), this.userEvents && this.userEvents.destroy()
                    },
                    _scale: function(e) {
                        this.dimensions.rescale(e), this.movable.scaleTo(e)
                    },
                    _initPullToRefresh: function() {
                        var e = this;
                        e.dimensions.y.forceEnabled(), e.pullTemplate = n.template(e.options.messages.pullTemplate), e.releaseTemplate = n.template(e.options.messages.releaseTemplate), e.refreshTemplate = n.template(e.options.messages.refreshTemplate), e.scrollElement.prepend('<span class="km-scroller-pull"><span class="km-icon"></span><span class="km-loading-left"></span><span class="km-loading-right"></span><span class="km-template">' + e.pullTemplate({}) + "</span></span>"), e.refreshHint = e.scrollElement.children().first(), e.hintContainer = e.refreshHint.children(".km-template"), e.pane.y.bind("change", a(e._paneChange, e)), e.userEvents.bind("end", a(e._dragEnd, e))
                    },
                    _dragEnd: function() {
                        var e = this;
                        e.pulled && (e.pulled = !1, e.refreshHint.removeClass(x).addClass(C), e.hintContainer.html(e.refreshTemplate({})), e.yinertia.freeze(e.options.pullOffset / 2), e.trigger("pull"))
                    },
                    _paneChange: function() {
                        var e = this;
                        e.movable.y / y > e.options.pullOffset ? e.pulled || (e.pulled = !0, e.refreshHint.removeClass(C).addClass(x), e.hintContainer.html(e.releaseTemplate({}))) : e.pulled && (e.pulled = !1, e.refreshHint.removeClass(x), e.hintContainer.html(e.pullTemplate({})))
                    },
                    _initAxis: function(e) {
                        var t = this,
                            n = t.movable,
                            i = t.dimensions[e],
                            r = t.tapCapture,
                            o = t.pane[e],
                            a = new R({
                                axis: e,
                                movable: n,
                                dimension: i,
                                container: t.element,
                                alwaysVisible: t.options.visibleScrollHints
                            });
                        i.bind(T, function() {
                            a.refresh()
                        }), o.bind(T, function() {
                            a.show()
                        }), t[e + "inertia"] = new I({
                            axis: e,
                            paneAxis: o,
                            movable: n,
                            tapCapture: r,
                            userEvents: t.userEvents,
                            dimension: i,
                            elastic: t.options.elastic,
                            friction: t.options.friction || _,
                            velocityMultiplier: t.options.velocityMultiplier || b,
                            end: function() {
                                a.hide(), t.trigger("scrollEnd", {
                                    axis: e,
                                    scrollTop: t.scrollTop,
                                    scrollLeft: t.scrollLeft
                                })
                            }
                        })
                    }
                });
            o.plugin(P)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.groupable.min", ["kendo.core.min", "kendo.draganddrop.min"], e)
    }(function() {
        return function(e, t) {
            function n(e) {
                return e.position().top + 3
            }
            var i = window.kendo,
                r = i.ui.Widget,
                o = e.proxy,
                a = !1,
                s = ".kendoGroupable",
                l = "change",
                c = i.template('<div class="k-group-indicator" data-#=data.ns#field="${data.field}" data-#=data.ns#title="${data.title || ""}" data-#=data.ns#dir="${data.dir || "asc"}"><a href="\\#" class="k-link"><span class="k-icon k-si-arrow-${(data.dir || "asc") == "asc" ? "n" : "s"}">(sorted ${(data.dir || "asc") == "asc" ? "ascending": "descending"})</span>${data.title ? data.title: data.field}</a><a class="k-button k-button-icon k-button-bare"><span class="k-icon k-group-delete"></span></a></div>', {
                    useWithBlock: !1
                }),
                d = function(t) {
                    return e('<div class="k-header k-drag-clue" />').css({
                        width: t.width(),
                        paddingLeft: t.css("paddingLeft"),
                        paddingRight: t.css("paddingRight"),
                        lineHeight: t.height() + "px",
                        paddingTop: t.css("paddingTop"),
                        paddingBottom: t.css("paddingBottom")
                    }).html(i.htmlEncode(t.attr(i.attr("title"))) || t.attr(i.attr("field"))).prepend('<span class="k-icon k-drag-status k-denied" />')
                },
                u = e('<div class="k-grouping-dropclue"/>'),
                h = r.extend({
                    init: function(c, h) {
                        var f, p, m = this,
                            g = i.guid(),
                            v = o(m._intializePositions, m),
                            _ = m._dropCuePositions = [];
                        r.fn.init.call(m, c, h), a = i.support.isRtl(c), p = a ? "right" : "left", m.draggable = f = m.options.draggable || new i.ui.Draggable(m.element, {
                            filter: m.options.draggableElements,
                            hint: d,
                            group: g
                        }), m.groupContainer = e(m.options.groupContainer, m.element).kendoDropTarget({
                            group: f.options.group,
                            dragenter: function(e) {
                                m._canDrag(e.draggable.currentTarget) && (e.draggable.hint.find(".k-drag-status").removeClass("k-denied").addClass("k-add"), u.css("top", n(m.groupContainer)).css(p, 0).appendTo(m.groupContainer))
                            },
                            dragleave: function(e) {
                                e.draggable.hint.find(".k-drag-status").removeClass("k-add").addClass("k-denied"), u.remove()
                            },
                            drop: function(t) {
                                var n, r = t.draggable.currentTarget,
                                    o = r.attr(i.attr("field")),
                                    s = r.attr(i.attr("title")),
                                    l = m.indicator(o),
                                    c = m._dropCuePositions,
                                    d = c[c.length - 1];
                                (r.hasClass("k-group-indicator") || m._canDrag(r)) && (d ? (n = m._dropCuePosition(i.getOffset(u).left + parseInt(d.element.css("marginLeft"), 10) * (a ? -1 : 1) + parseInt(d.element.css("marginRight"), 10)), n && m._canDrop(e(l), n.element, n.left) && (n.before ? n.element.before(l || m.buildIndicator(o, s)) : n.element.after(l || m.buildIndicator(o, s)), m._change())) : (m.groupContainer.append(m.buildIndicator(o, s)), m._change()))
                            }
                        }).kendoDraggable({
                            filter: "div.k-group-indicator",
                            hint: d,
                            group: f.options.group,
                            dragcancel: o(m._dragCancel, m),
                            dragstart: function(e) {
                                var t = e.currentTarget,
                                    i = parseInt(t.css("marginLeft"), 10),
                                    r = t.position(),
                                    o = a ? r.left - i : r.left + t.outerWidth();
                                v(), u.css({
                                    top: n(m.groupContainer),
                                    left: o
                                }).appendTo(m.groupContainer), this.hint.find(".k-drag-status").removeClass("k-denied").addClass("k-add")
                            },
                            dragend: function() {
                                m._dragEnd(this)
                            },
                            drag: o(m._drag, m)
                        }).on("click" + s, ".k-button", function(t) {
                            t.preventDefault(), m._removeIndicator(e(this).parent())
                        }).on("click" + s, ".k-link", function(t) {
                            var n = e(this).parent(),
                                r = m.buildIndicator(n.attr(i.attr("field")), n.attr(i.attr("title")), "asc" == n.attr(i.attr("dir")) ? "desc" : "asc");
                            n.before(r).remove(), m._change(), t.preventDefault()
                        }), f.bind(["dragend", "dragcancel", "dragstart", "drag"], {
                            dragend: function() {
                                m._dragEnd(this)
                            },
                            dragcancel: o(m._dragCancel, m),
                            dragstart: function(e) {
                                var n, i, r;
                                return m.options.allowDrag || m._canDrag(e.currentTarget) ? (v(), _.length ? (n = _[_.length - 1].element, i = parseInt(n.css("marginRight"), 10), r = n.position().left + n.outerWidth() + i) : r = 0, t) : (e.preventDefault(), t)
                            },
                            drag: o(m._drag, m)
                        }), m.dataSource = m.options.dataSource, m.dataSource && m._refreshHandler ? m.dataSource.unbind(l, m._refreshHandler) : m._refreshHandler = o(m.refresh, m), m.dataSource && (m.dataSource.bind("change", m._refreshHandler), m.refresh())
                    },
                    refresh: function() {
                        var t = this,
                            n = t.dataSource;
                        t.groupContainer && t.groupContainer.empty().append(e.map(n.group() || [], function(n) {
                            var r = n.field,
                                o = i.attr("field"),
                                a = t.element.find(t.options.filter).filter(function() {
                                    return e(this).attr(o) === r
                                });
                            return t.buildIndicator(n.field, a.attr(i.attr("title")), n.dir)
                        }).join("")), t._invalidateGroupContainer()
                    },
                    destroy: function() {
                        var e = this;
                        r.fn.destroy.call(e), e.groupContainer.off(s), e.groupContainer.data("kendoDropTarget") && e.groupContainer.data("kendoDropTarget").destroy(), e.groupContainer.data("kendoDraggable") && e.groupContainer.data("kendoDraggable").destroy(), e.options.draggable || e.draggable.destroy(), e.dataSource && e._refreshHandler && (e.dataSource.unbind("change", e._refreshHandler), e._refreshHandler = null), e.groupContainer = e.element = e.draggable = null
                    },
                    options: {
                        name: "Groupable",
                        filter: "th",
                        draggableElements: "th",
                        messages: {
                            empty: "Drag a column header and drop it here to group by that column"
                        }
                    },
                    indicator: function(t) {
                        var n = e(".k-group-indicator", this.groupContainer);
                        return e.grep(n, function(n) {
                            return e(n).attr(i.attr("field")) === t
                        })[0]
                    },
                    buildIndicator: function(e, t, n) {
                        return c({
                            field: e.replace(/"/g, "'"),
                            dir: n,
                            title: t,
                            ns: i.ns
                        })
                    },
                    descriptors: function() {
                        var t, n, r, o, a, s = this,
                            l = e(".k-group-indicator", s.groupContainer);
                        return t = s.element.find(s.options.filter).map(function() {
                            var t = e(this),
                                r = t.attr(i.attr("aggregates")),
                                s = t.attr(i.attr("field"));
                            if (r && "" !== r)
                                for (n = r.split(","), r = [], o = 0, a = n.length; a > o; o++) r.push({
                                    field: s,
                                    aggregate: n[o]
                                });
                            return r
                        }).toArray(), e.map(l, function(n) {
                            return n = e(n), r = n.attr(i.attr("field")), {
                                field: r,
                                dir: n.attr(i.attr("dir")),
                                aggregates: t || []
                            }
                        })
                    },
                    _removeIndicator: function(e) {
                        var t = this;
                        e.remove(), t._invalidateGroupContainer(), t._change()
                    },
                    _change: function() {
                        var e = this;
                        e.dataSource && e.dataSource.group(e.descriptors())
                    },
                    _dropCuePosition: function(t) {
                        var n, i, r, o, s, l = this._dropCuePositions;
                        if (u.is(":visible") && 0 !== l.length) return t = Math.ceil(t), n = l[l.length - 1], i = n.left, r = n.right, o = parseInt(n.element.css("marginLeft"), 10), s = parseInt(n.element.css("marginRight"), 10), t >= r && !a || i > t && a ? t = {
                            left: n.element.position().left + (a ? -o : n.element.outerWidth() + s),
                            element: n.element,
                            before: !1
                        } : (t = e.grep(l, function(e) {
                            return t >= e.left && e.right >= t || a && t > e.right
                        })[0], t && (t = {
                            left: a ? t.element.position().left + t.element.outerWidth() + s : t.element.position().left - o,
                            element: t.element,
                            before: !0
                        })), t
                    },
                    _drag: function(e) {
                        var t = this._dropCuePosition(e.x.location);
                        t && u.css({
                            left: t.left,
                            right: "auto"
                        })
                    },
                    _canDrag: function(e) {
                        var t = e.attr(i.attr("field"));
                        return "false" != e.attr(i.attr("groupable")) && t && (e.hasClass("k-group-indicator") || !this.indicator(t))
                    },
                    _canDrop: function(e, t, n) {
                        var i = e.next(),
                            r = e[0] !== t[0] && (!i[0] || t[0] !== i[0] || !a && n > i.position().left || a && n < i.position().left);
                        return r
                    },
                    _dragEnd: function(t) {
                        var n = this,
                            r = t.currentTarget.attr(i.attr("field")),
                            o = n.indicator(r);
                        t !== n.options.draggable && !t.dropped && o && n._removeIndicator(e(o)), n._dragCancel()
                    },
                    _dragCancel: function() {
                        u.remove(), this._dropCuePositions = []
                    },
                    _intializePositions: function() {
                        var t, n = this,
                            r = e(".k-group-indicator", n.groupContainer);
                        n._dropCuePositions = e.map(r, function(n) {
                            return n = e(n), t = i.getOffset(n).left, {
                                left: parseInt(t, 10),
                                right: parseInt(t + n.outerWidth(), 10),
                                element: n
                            }
                        })
                    },
                    _invalidateGroupContainer: function() {
                        var e = this.groupContainer;
                        e && e.is(":empty") && e.html(this.options.messages.empty)
                    }
                });
            i.ui.plugin(h)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.reorderable.min", ["kendo.core.min", "kendo.draganddrop.min"], e)
    }(function() {
        return function(e, t) {
            function n(t, n) {
                t = e(t), n ? t.find(".k-drag-status").removeClass("k-add").addClass("k-denied") : t.find(".k-drag-status").removeClass("k-denied").addClass("k-add")
            }
            var i = window.kendo,
                r = i.getOffset,
                o = i.ui.Widget,
                a = "change",
                s = "k-reorderable",
                l = o.extend({
                    init: function(t, l) {
                        var c, d = this,
                            u = i.guid() + "-reorderable";
                        o.fn.init.call(d, t, l), t = d.element.addClass(s), l = d.options, d.draggable = c = l.draggable || new i.ui.Draggable(t, {
                            group: u,
                            autoScroll: !0,
                            filter: l.filter,
                            hint: l.hint
                        }), d.reorderDropCue = e('<div class="k-reorder-cue"><div class="k-icon k-i-arrow-s"></div><div class="k-icon k-i-arrow-n"></div></div>'), t.find(c.options.filter).kendoDropTarget({
                            group: c.options.group,
                            dragenter: function(e) {
                                var t, i, o, a;
                                d._draggable && (t = this.element, o = !d._dropTargetAllowed(t) || d._isLastDraggable(), n(e.draggable.hint, o), o || (i = r(t), a = i.left, l.inSameContainer && !l.inSameContainer({
                                    source: t,
                                    target: d._draggable,
                                    sourceIndex: d._index(t),
                                    targetIndex: d._index(d._draggable)
                                }) ? d._dropTarget = t : d._index(t) > d._index(d._draggable) && (a += t.outerWidth()), d.reorderDropCue.css({
                                    height: t.outerHeight(),
                                    top: i.top,
                                    left: a
                                }).appendTo(document.body)))
                            },
                            dragleave: function(e) {
                                n(e.draggable.hint, !0), d.reorderDropCue.remove(), d._dropTarget = null
                            },
                            drop: function() {
                                var e, t;
                                d._dropTarget = null, d._draggable && (e = this.element, t = d._draggable, d._dropTargetAllowed(e) && !d._isLastDraggable() && d.trigger(a, {
                                    element: d._draggable,
                                    target: e,
                                    oldIndex: d._index(t),
                                    newIndex: d._index(e),
                                    position: r(d.reorderDropCue).left > r(e).left ? "after" : "before"
                                }))
                            }
                        }), c.bind(["dragcancel", "dragend", "dragstart", "drag"], {
                            dragcancel: function() {
                                d.reorderDropCue.remove(), d._draggable = null, d._elements = null
                            },
                            dragend: function() {
                                d.reorderDropCue.remove(), d._draggable = null, d._elements = null
                            },
                            dragstart: function(e) {
                                d._draggable = e.currentTarget, d._elements = d.element.find(d.draggable.options.filter)
                            },
                            drag: function(e) {
                                var t, n;
                                d._dropTarget && !this.hint.find(".k-drag-status").hasClass("k-denied") && (t = r(d._dropTarget).left, n = d._dropTarget.outerWidth(), d.reorderDropCue.css(e.pageX > t + n / 2 ? {
                                    left: t + n
                                } : {
                                    left: t
                                }))
                            }
                        })
                    },
                    options: {
                        name: "Reorderable",
                        filter: "*"
                    },
                    events: [a],
                    _isLastDraggable: function() {
                        var e, t = this.options.inSameContainer,
                            n = this._draggable[0],
                            i = this._elements.get(),
                            r = !1;
                        if (!t) return !1;
                        for (; !r && i.length > 0;) e = i.pop(), r = n !== e && t({
                            source: n,
                            target: e,
                            sourceIndex: this._index(n),
                            targetIndex: this._index(e)
                        });
                        return !r
                    },
                    _dropTargetAllowed: function(e) {
                        var t = this.options.inSameContainer,
                            n = this.options.dragOverContainers,
                            i = this._draggable;
                        return i[0] === e[0] ? !1 : t && n ? t({
                            source: i,
                            target: e,
                            sourceIndex: this._index(i),
                            targetIndex: this._index(e)
                        }) ? !0 : n(this._index(i), this._index(e)) : !0
                    },
                    _index: function(e) {
                        return this._elements.index(e)
                    },
                    destroy: function() {
                        var t = this;
                        o.fn.destroy.call(t), t.element.find(t.draggable.options.filter).each(function() {
                            var t = e(this);
                            t.data("kendoDropTarget") && t.data("kendoDropTarget").destroy()
                        }), t.draggable && (t.draggable.destroy(), t.draggable.element = t.draggable = null), t.elements = t.reorderDropCue = t._elements = t._draggable = null
                    }
                });
            i.ui.plugin(l)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.resizable.min", ["kendo.core.min", "kendo.draganddrop.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.ui,
                r = i.Widget,
                o = e.proxy,
                a = n.isFunction,
                s = e.extend,
                l = "horizontal",
                c = "vertical",
                d = "start",
                u = "resize",
                h = "resizeend",
                f = r.extend({
                    init: function(e, t) {
                        var n = this;
                        r.fn.init.call(n, e, t), n.orientation = n.options.orientation.toLowerCase() != c ? l : c, n._positionMouse = n.orientation == l ? "x" : "y", n._position = n.orientation == l ? "left" : "top", n._sizingDom = n.orientation == l ? "outerWidth" : "outerHeight", n.draggable = new i.Draggable(e, {
                            distance: 1,
                            filter: t.handle,
                            drag: o(n._resize, n),
                            dragcancel: o(n._cancel, n),
                            dragstart: o(n._start, n),
                            dragend: o(n._stop, n)
                        }), n.userEvents = n.draggable.userEvents
                    },
                    events: [u, h, d],
                    options: {
                        name: "Resizable",
                        orientation: l
                    },
                    resize: function() {},
                    _max: function(e) {
                        var n = this,
                            i = n.hint ? n.hint[n._sizingDom]() : 0,
                            r = n.options.max;
                        return a(r) ? r(e) : r !== t ? n._initialElementPosition + r - i : r
                    },
                    _min: function(e) {
                        var n = this,
                            i = n.options.min;
                        return a(i) ? i(e) : i !== t ? n._initialElementPosition + i : i
                    },
                    _start: function(t) {
                        var n = this,
                            i = n.options.hint,
                            r = e(t.currentTarget);
                        n._initialElementPosition = r.position()[n._position], n._initialMousePosition = t[n._positionMouse].startLocation, i && (n.hint = a(i) ? e(i(r)) : i, n.hint.css({
                            position: "absolute"
                        }).css(n._position, n._initialElementPosition).appendTo(n.element)), n.trigger(d, t), n._maxPosition = n._max(t), n._minPosition = n._min(t), e(document.body).css("cursor", r.css("cursor"))
                    },
                    _resize: function(e) {
                        var n, i = this,
                            r = i._maxPosition,
                            o = i._minPosition,
                            a = i._initialElementPosition + (e[i._positionMouse].location - i._initialMousePosition);
                        n = o !== t ? Math.max(o, a) : a, i.position = n = r !== t ? Math.min(r, n) : n, i.hint && i.hint.toggleClass(i.options.invalidClass || "", n == r || n == o).css(i._position, n), i.resizing = !0, i.trigger(u, s(e, {
                            position: n
                        }))
                    },
                    _stop: function(t) {
                        var n = this;
                        n.hint && n.hint.remove(), n.resizing = !1, n.trigger(h, s(t, {
                            position: n.position
                        })), e(document.body).css("cursor", "")
                    },
                    _cancel: function(e) {
                        var n = this;
                        n.hint && (n.position = t, n.hint.css(n._position, n._initialElementPosition), n._stop(e))
                    },
                    destroy: function() {
                        var e = this;
                        r.fn.destroy.call(e), e.draggable && e.draggable.destroy()
                    },
                    press: function(e) {
                        if (e) {
                            var t = e.position(),
                                n = this;
                            n.userEvents.press(t.left, t.top, e[0]), n.targetPosition = t, n.target = e
                        }
                    },
                    move: function(e) {
                        var n = this,
                            i = n._position,
                            r = n.targetPosition,
                            o = n.position;
                        o === t && (o = r[i]), r[i] = o + e, n.userEvents.move(r.left, r.top)
                    },
                    end: function() {
                        this.userEvents.end(), this.target = this.position = t
                    }
                });
            n.ui.plugin(f)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.sortable.min", ["kendo.draganddrop.min"], e)
    }(function() {
        return function(e, t) {
            function n(t, n) {
                try {
                    return e.contains(t, n) || t == n
                } catch (i) {
                    return !1
                }
            }

            function i(e) {
                return e.clone()
            }

            function r(e) {
                return e.clone().removeAttr("id").css("visibility", "hidden")
            }
            var o = window.kendo,
                a = o.ui.Widget,
                s = "start",
                l = "beforeMove",
                c = "move",
                d = "end",
                u = "change",
                h = "cancel",
                f = "sort",
                p = "remove",
                m = "receive",
                g = ">*",
                v = -1,
                _ = a.extend({
                    init: function(e, t) {
                        var n = this;
                        a.fn.init.call(n, e, t), n.options.placeholder || (n.options.placeholder = r), n.options.hint || (n.options.hint = i), n.draggable = n._createDraggable()
                    },
                    events: [s, l, c, d, u, h],
                    options: {
                        name: "Sortable",
                        hint: null,
                        placeholder: null,
                        filter: g,
                        holdToDrag: !1,
                        disabled: null,
                        container: null,
                        connectWith: null,
                        handler: null,
                        cursorOffset: null,
                        axis: null,
                        ignore: null,
                        autoScroll: !1,
                        cursor: "auto",
                        moveOnDragEnter: !1
                    },
                    destroy: function() {
                        this.draggable.destroy(), a.fn.destroy.call(this)
                    },
                    _createDraggable: function() {
                        var t = this,
                            n = t.element,
                            i = t.options;
                        return new o.ui.Draggable(n, {
                            filter: i.filter,
                            hint: o.isFunction(i.hint) ? i.hint : e(i.hint),
                            holdToDrag: i.holdToDrag,
                            container: i.container ? e(i.container) : null,
                            cursorOffset: i.cursorOffset,
                            axis: i.axis,
                            ignore: i.ignore,
                            autoScroll: i.autoScroll,
                            dragstart: e.proxy(t._dragstart, t),
                            dragcancel: e.proxy(t._dragcancel, t),
                            drag: e.proxy(t._drag, t),
                            dragend: e.proxy(t._dragend, t)
                        })
                    },
                    _dragstart: function(t) {
                        var n = this.draggedElement = t.currentTarget,
                            i = this.options.disabled,
                            r = this.options.handler,
                            a = this.options.placeholder,
                            l = this.placeholder = e(o.isFunction(a) ? a.call(this, n) : a);
                        i && n.is(i) ? t.preventDefault() : r && !e(t.initialTarget).is(r) ? t.preventDefault() : this.trigger(s, {
                            item: n,
                            draggableEvent: t
                        }) ? t.preventDefault() : (n.css("display", "none"), n.before(l), this._setCursor())
                    },
                    _dragcancel: function() {
                        this._cancel(), this.trigger(h, {
                            item: this.draggedElement
                        }), this._resetCursor()
                    },
                    _drag: function(n) {
                        var i, r, o, a, s, l = this.draggedElement,
                            c = this._findTarget(n),
                            d = {
                                left: n.x.location,
                                top: n.y.location
                            },
                            u = {
                                x: n.x.delta,
                                y: n.y.delta
                            },
                            h = this.options.axis,
                            f = this.options.moveOnDragEnter,
                            p = {
                                item: l,
                                list: this,
                                draggableEvent: n
                            };
                        if ("x" === h || "y" === h) return this._movementByAxis(h, d, u[h], p), t;
                        if (c) {
                            if (i = this._getElementCenter(c.element), r = {
                                left: Math.round(d.left - i.left),
                                top: Math.round(d.top - i.top)
                            }, e.extend(p, {
                                target: c.element
                            }), c.appendToBottom) return this._movePlaceholder(c, null, p), t;
                            if (c.appendAfterHidden && this._movePlaceholder(c, "next", p), this._isFloating(c.element) ? 0 > u.x && (f || 0 > r.left) ? o = "prev" : u.x > 0 && (f || r.left > 0) && (o = "next") : 0 > u.y && (f || 0 > r.top) ? o = "prev" : u.y > 0 && (f || r.top > 0) && (o = "next"), o) {
                                for (s = "prev" === o ? jQuery.fn.prev : jQuery.fn.next, a = s.call(c.element); a.length && !a.is(":visible");) a = s.call(a);
                                a[0] != this.placeholder[0] && this._movePlaceholder(c, o, p)
                            }
                        }
                    },
                    _dragend: function(n) {
                        var i, r, o, a, s = this.placeholder,
                            l = this.draggedElement,
                            c = this.indexOf(l),
                            h = this.indexOf(s),
                            g = this.options.connectWith;
                        return this._resetCursor(), o = {
                            action: f,
                            item: l,
                            oldIndex: c,
                            newIndex: h,
                            draggableEvent: n
                        }, h >= 0 ? r = this.trigger(d, o) : (i = s.parents(g).getKendoSortable(), o.action = p, a = e.extend({}, o, {
                            action: m,
                            oldIndex: v,
                            newIndex: i.indexOf(s)
                        }), r = !(!this.trigger(d, o) && !i.trigger(d, a))), r || h === c ? (this._cancel(), t) : (s.replaceWith(l), l.show(), this.draggable.dropped = !0, o = {
                            action: this.indexOf(l) != v ? f : p,
                            item: l,
                            oldIndex: c,
                            newIndex: this.indexOf(l),
                            draggableEvent: n
                        }, this.trigger(u, o), i && (a = e.extend({}, o, {
                            action: m,
                            oldIndex: v,
                            newIndex: i.indexOf(l)
                        }), i.trigger(u, a)), t)
                    },
                    _findTarget: function(n) {
                        var i, r, o = this._findElementUnderCursor(n),
                            a = this.options.connectWith;
                        return e.contains(this.element[0], o) ? (i = this.items(), r = i.filter(o)[0] || i.has(o)[0], r ? {
                            element: e(r),
                            sortable: this
                        } : null) : this.element[0] == o && this._isEmpty() ? {
                            element: this.element,
                            sortable: this,
                            appendToBottom: !0
                        } : this.element[0] == o && this._isLastHidden() ? (r = this.items().eq(0), {
                            element: r,
                            sortable: this,
                            appendAfterHidden: !0
                        }) : a ? this._searchConnectedTargets(o, n) : t
                    },
                    _findElementUnderCursor: function(e) {
                        var t = o.elementUnderCursor(e),
                            i = e.sender;
                        return n(i.hint[0], t) && (i.hint.hide(), t = o.elementUnderCursor(e), t || (t = o.elementUnderCursor(e)), i.hint.show()), t
                    },
                    _searchConnectedTargets: function(t, n) {
                        var i, r, o, a, s = e(this.options.connectWith);
                        for (a = 0; s.length > a; a++)
                            if (i = s.eq(a).getKendoSortable(), e.contains(s[a], t)) {
                                if (i) return r = i.items(), o = r.filter(t)[0] || r.has(t)[0], o ? (i.placeholder = this.placeholder, {
                                    element: e(o),
                                    sortable: i
                                }) : null
                            } else if (s[a] == t) {
                                if (i && i._isEmpty()) return {
                                    element: s.eq(a),
                                    sortable: i,
                                    appendToBottom: !0
                                };
                                if (this._isCursorAfterLast(i, n)) return o = i.items().last(), {
                                    element: o,
                                    sortable: i
                                }
                            }
                    },
                    _isCursorAfterLast: function(e, t) {
                        var n, i, r = e.items().last(),
                            a = {
                                left: t.x.location,
                                top: t.y.location
                            };
                        return n = o.getOffset(r), n.top += r.outerHeight(), n.left += r.outerWidth(), i = this._isFloating(r) ? n.left - a.left : n.top - a.top, 0 > i ? !0 : !1
                    },
                    _movementByAxis: function(t, n, i, r) {
                        var o, a = "x" === t ? n.left : n.top,
                            s = 0 > i ? this.placeholder.prev() : this.placeholder.next();
                        s.length && !s.is(":visible") && (s = 0 > i ? s.prev() : s.next()), e.extend(r, {
                            target: s
                        }), o = this._getElementCenter(s), o && (o = "x" === t ? o.left : o.top), s.length && 0 > i && 0 > a - o ? this._movePlaceholder({
                            element: s,
                            sortable: this
                        }, "prev", r) : s.length && i > 0 && a - o > 0 && this._movePlaceholder({
                            element: s,
                            sortable: this
                        }, "next", r)
                    },
                    _movePlaceholder: function(e, t, n) {
                        var i = this.placeholder;
                        e.sortable.trigger(l, n) || (t ? "prev" === t ? e.element.before(i) : "next" === t && e.element.after(i) : e.element.append(i), e.sortable.trigger(c, n))
                    },
                    _setCursor: function() {
                        var t, n = this.options.cursor;
                        n && "auto" !== n && (t = e(document.body), this._originalCursorType = t.css("cursor"), t.css({
                            cursor: n
                        }), this._cursorStylesheet || (this._cursorStylesheet = e("<style>* { cursor: " + n + " !important; }</style>")), this._cursorStylesheet.appendTo(t))
                    },
                    _resetCursor: function() {
                        this._originalCursorType && (e(document.body).css("cursor", this._originalCursorType), this._originalCursorType = null, this._cursorStylesheet.remove())
                    },
                    _getElementCenter: function(e) {
                        var t = e.length ? o.getOffset(e) : null;
                        return t && (t.top += e.outerHeight() / 2, t.left += e.outerWidth() / 2), t
                    },
                    _isFloating: function(e) {
                        return /left|right/.test(e.css("float")) || /inline|table-cell/.test(e.css("display"))
                    },
                    _cancel: function() {
                        this.draggedElement.show(), this.placeholder.remove()
                    },
                    _items: function() {
                        var e, t = this.options.filter;
                        return e = t ? this.element.find(t) : this.element.children()
                    },
                    indexOf: function(e) {
                        var t = this._items(),
                            n = this.placeholder,
                            i = this.draggedElement;
                        return n && e[0] == n[0] ? t.not(i).index(e) : t.not(n).index(e)
                    },
                    items: function() {
                        var e = this.placeholder,
                            t = this._items();
                        return e && (t = t.not(e)), t
                    },
                    _isEmpty: function() {
                        return !this.items().length
                    },
                    _isLastHidden: function() {
                        return 1 === this.items().length && this.items().is(":hidden")
                    }
                });
            o.ui.plugin(_)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.selectable.min", ["kendo.core.min", "kendo.userevents.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t) {
                if (!e.is(":visible")) return !1;
                var n = r.getOffset(e),
                    i = t.left + t.width,
                    o = t.top + t.height;
                return n.right = n.left + e.outerWidth(), n.bottom = n.top + e.outerHeight(), !(n.left > i || t.left > n.right || n.top > o || t.top > n.bottom)
            }
            var i, r = window.kendo,
                o = r.ui.Widget,
                a = e.proxy,
                s = Math.abs,
                l = "aria-selected",
                c = "k-state-selected",
                d = "k-state-selecting",
                u = "k-selectable",
                h = "change",
                f = ".kendoSelectable",
                p = "k-state-unselecting",
                m = "input,a,textarea,.k-multiselect-wrap,select,button,a.k-button>.k-icon,button.k-button>.k-icon,span.k-icon.k-i-expand,span.k-icon.k-i-collapse",
                g = r.support.browser.msie,
                v = !1;
            ! function(e) {
                ! function() {
                    e('<div class="parent"><span /></div>').on("click", ">*", function() {
                        v = !0
                    }).find("span").click().end().off()
                }()
            }(e), i = o.extend({
                init: function(t, n) {
                    var i, s = this;
                    o.fn.init.call(s, t, n), s._marquee = e("<div class='k-marquee'><div class='k-marquee-color'></div></div>"), s._lastActive = null, s.element.addClass(u), s.relatedTarget = s.options.relatedTarget, i = s.options.multiple, this.options.aria && i && s.element.attr("aria-multiselectable", !0), s.userEvents = new r.UserEvents(s.element, {
                        global: !0,
                        allowSelection: !0,
                        filter: (v ? "" : "." + u + " ") + s.options.filter,
                        tap: a(s._tap, s)
                    }), i && s.userEvents.bind("start", a(s._start, s)).bind("move", a(s._move, s)).bind("end", a(s._end, s)).bind("select", a(s._select, s))
                },
                events: [h],
                options: {
                    name: "Selectable",
                    filter: ">*",
                    multiple: !1,
                    relatedTarget: e.noop
                },
                _isElement: function(e) {
                    var t, n = this.element,
                        i = n.length,
                        r = !1;
                    for (e = e[0], t = 0; i > t; t++)
                        if (n[t] === e) {
                            r = !0;
                            break
                        } return r
                },
                _tap: function(t) {
                    var n, i = e(t.target),
                        r = this,
                        o = t.event.ctrlKey || t.event.metaKey,
                        a = r.options.multiple,
                        s = a && t.event.shiftKey,
                        l = t.event.which,
                        d = t.event.button;
                    !r._isElement(i.closest("." + u)) || l && 3 == l || d && 2 == d || this._allowSelection(t.event.target) && (n = i.hasClass(c), a && o || r.clear(), i = i.add(r.relatedTarget(i)), s ? r.selectRange(r._firstSelectee(), i) : (n && o ? (r._unselect(i), r._notify(h)) : r.value(i), r._lastActive = r._downTarget = i))
                },
                _start: function(n) {
                    var i, r = this,
                        o = e(n.target),
                        a = o.hasClass(c),
                        s = n.event.ctrlKey || n.event.metaKey;
                    if (this._allowSelection(n.event.target)) {
                        if (r._downTarget = o, !r._isElement(o.closest("." + u))) return r.userEvents.cancel(), t;
                        r.options.useAllItems ? r._items = r.element.find(r.options.filter) : (i = o.closest(r.element), r._items = i.find(r.options.filter)), n.sender.capture(), r._marquee.appendTo(document.body).css({
                            left: n.x.client + 1,
                            top: n.y.client + 1,
                            width: 0,
                            height: 0
                        }), s || r.clear(), o = o.add(r.relatedTarget(o)), a && (r._selectElement(o, !0), s && o.addClass(p))
                    }
                },
                _move: function(e) {
                    var t = this,
                        n = {
                            left: e.x.startLocation > e.x.location ? e.x.location : e.x.startLocation,
                            top: e.y.startLocation > e.y.location ? e.y.location : e.y.startLocation,
                            width: s(e.x.initialDelta),
                            height: s(e.y.initialDelta)
                        };
                    t._marquee.css(n), t._invalidateSelectables(n, e.event.ctrlKey || e.event.metaKey), e.preventDefault()
                },
                _end: function() {
                    var e, t = this;
                    t._marquee.remove(), t._unselect(t.element.find(t.options.filter + "." + p)).removeClass(p), e = t.element.find(t.options.filter + "." + d), e = e.add(t.relatedTarget(e)), t.value(e), t._lastActive = t._downTarget, t._items = null
                },
                _invalidateSelectables: function(e, t) {
                    var i, r, o, a, s = this._downTarget[0],
                        l = this._items;
                    for (i = 0, r = l.length; r > i; i++) a = l.eq(i), o = a.add(this.relatedTarget(a)), n(a, e) ? a.hasClass(c) ? t && s !== a[0] && o.removeClass(c).addClass(p) : a.hasClass(d) || a.hasClass(p) || o.addClass(d) : a.hasClass(d) ? o.removeClass(d) : t && a.hasClass(p) && o.removeClass(p).addClass(c)
                },
                value: function(e) {
                    var n = this,
                        i = a(n._selectElement, n);
                    return e ? (e.each(function() {
                        i(this)
                    }), n._notify(h), t) : n.element.find(n.options.filter + "." + c)
                },
                _firstSelectee: function() {
                    var e, t = this;
                    return null !== t._lastActive ? t._lastActive : (e = t.value(), e.length > 0 ? e[0] : t.element.find(t.options.filter)[0])
                },
                _selectElement: function(t, n) {
                    var i = e(t),
                        r = !n && this._notify("select", {
                            element: t
                        });
                    i.removeClass(d), r || (i.addClass(c), this.options.aria && i.attr(l, !0))
                },
                _notify: function(e, t) {
                    return t = t || {}, this.trigger(e, t)
                },
                _unselect: function(e) {
                    return e.removeClass(c), this.options.aria && e.attr(l, !1), e
                },
                _select: function(t) {
                    this._allowSelection(t.event.target) && (!g || g && !e(r._activeElement()).is(m)) && t.preventDefault()
                },
                _allowSelection: function(t) {
                    return e(t).is(m) ? (this.userEvents.cancel(), this._downTarget = null, !1) : !0
                },
                resetTouchEvents: function() {
                    this.userEvents.cancel()
                },
                clear: function() {
                    var e = this.element.find(this.options.filter + "." + c);
                    this._unselect(e)
                },
                selectRange: function(t, n) {
                    var i, r, o, a = this;
                    for (a.clear(), a.element.length > 1 && (o = a.options.continuousItems()), o && o.length || (o = a.element.find(a.options.filter)), t = e.inArray(e(t)[0], o), n = e.inArray(e(n)[0], o), t > n && (r = t, t = n, n = r), a.options.useAllItems || (n += a.element.length - 1), i = t; n >= i; i++) a._selectElement(o[i]);
                    a._notify(h)
                },
                destroy: function() {
                    var e = this;
                    o.fn.destroy.call(e), e.element.off(f), e.userEvents.destroy(), e._marquee = e._lastActive = e.element = e.userEvents = null
                }
            }), i.parseOptions = function(e) {
                var t = "string" == typeof e && e.toLowerCase();
                return {
                    multiple: t && t.indexOf("multiple") > -1,
                    cell: t && t.indexOf("cell") > -1
                }
            }, r.ui.plugin(i)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.button.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.ui.Widget,
                r = e.proxy,
                o = n.keys,
                a = "click",
                s = "k-button",
                l = "k-button-icon",
                c = "k-button-icontext",
                d = ".kendoButton",
                u = "disabled",
                h = "k-state-disabled",
                f = "k-state-focused",
                p = "k-state-selected",
                m = i.extend({
                    init: function(e, t) {
                        var o = this;
                        i.fn.init.call(o, e, t), e = o.wrapper = o.element, t = o.options, e.addClass(s).attr("role", "button"), t.enable = t.enable && !e.attr(u), o.enable(t.enable), o._tabindex(), o._graphics(), e.on(a + d, r(o._click, o)).on("focus" + d, r(o._focus, o)).on("blur" + d, r(o._blur, o)).on("keydown" + d, r(o._keydown, o)).on("keyup" + d, r(o._keyup, o)), n.notify(o)
                    },
                    destroy: function() {
                        var e = this;
                        e.wrapper.off(d), i.fn.destroy.call(e)
                    },
                    events: [a],
                    options: {
                        name: "Button",
                        icon: "",
                        spriteCssClass: "",
                        imageUrl: "",
                        enable: !0
                    },
                    _isNativeButton: function() {
                        return "button" == this.element.prop("tagName").toLowerCase()
                    },
                    _click: function(e) {
                        this.options.enable && this.trigger(a, {
                            event: e
                        }) && e.preventDefault()
                    },
                    _focus: function() {
                        this.options.enable && this.element.addClass(f)
                    },
                    _blur: function() {
                        this.element.removeClass(f)
                    },
                    _keydown: function(e) {
                        var t = this;
                        t._isNativeButton() || (e.keyCode == o.ENTER || e.keyCode == o.SPACEBAR) && (e.keyCode == o.SPACEBAR && (e.preventDefault(), t.options.enable && t.element.addClass(p)), t._click(e))
                    },
                    _keyup: function() {
                        this.element.removeClass(p)
                    },
                    _graphics: function() {
                        var t, n, i, r = this,
                            o = r.element,
                            a = r.options,
                            s = a.icon,
                            d = a.spriteCssClass,
                            u = a.imageUrl;
                        (d || u || s) && (i = !0, o.contents().not("span.k-sprite").not("span.k-icon").not("img.k-image").each(function(t, n) {
                            (1 == n.nodeType || 3 == n.nodeType && e.trim(n.nodeValue).length > 0) && (i = !1)
                        }), o.addClass(i ? l : c)), s ? (t = o.children("span.k-icon").first(), t[0] || (t = e('<span class="k-icon"></span>').prependTo(o)), t.addClass("k-i-" + s)) : d ? (t = o.children("span.k-sprite").first(), t[0] || (t = e('<span class="k-sprite"></span>').prependTo(o)), t.addClass(d)) : u && (n = o.children("img.k-image").first(), n[0] || (n = e('<img alt="icon" class="k-image" />').prependTo(o)), n.attr("src", u))
                    },
                    enable: function(e) {
                        var n = this,
                            i = n.element;
                        e === t && (e = !0), e = !!e, n.options.enable = e, i.toggleClass(h, !e).attr("aria-disabled", !e).attr(u, !e);
                        try {
                            i.blur()
                        } catch (r) {}
                    }
                });
            n.ui.plugin(m)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.pager.min", ["kendo.data.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t, n, i, r) {
                return e({
                    idx: t,
                    text: n,
                    ns: c.ns,
                    numeric: i,
                    title: r || ""
                })
            }

            function i(e, t, n) {
                return k({
                    className: e.substring(1),
                    text: t,
                    wrapClassName: n || ""
                })
            }

            function r(e, t, n, i) {
                e.find(t).parent().attr(c.attr("page"), n).attr("tabindex", -1).toggleClass("k-state-disabled", i)
            }

            function o(e, t) {
                r(e, f, 1, 1 >= t)
            }

            function a(e, t) {
                r(e, m, Math.max(1, t - 1), 1 >= t)
            }

            function s(e, t, n) {
                r(e, g, Math.min(n, t + 1), t >= n)
            }

            function l(e, t, n) {
                r(e, p, n, t >= n)
            }
            var c = window.kendo,
                d = c.ui,
                u = d.Widget,
                h = e.proxy,
                f = ".k-i-seek-w",
                p = ".k-i-seek-e",
                m = ".k-i-arrow-w",
                g = ".k-i-arrow-e",
                v = "change",
                _ = ".kendoPager",
                b = "click",
                w = "keydown",
                y = "disabled",
                k = c.template('<a href="\\#" title="#=text#" class="k-link k-pager-nav #= wrapClassName #"><span class="k-icon #= className #">#=text#</span></a>'),
                x = u.extend({
                    init: function(t, n) {
                        var r, d, y, k, x = this;
                        u.fn.init.call(x, t, n), n = x.options, x.dataSource = c.data.DataSource.create(n.dataSource), x.linkTemplate = c.template(x.options.linkTemplate), x.selectTemplate = c.template(x.options.selectTemplate), x.currentPageTemplate = c.template(x.options.currentPageTemplate), r = x.page(), d = x.totalPages(), x._refreshHandler = h(x.refresh, x), x.dataSource.bind(v, x._refreshHandler), n.previousNext && (x.element.find(f).length || (x.element.append(i(f, n.messages.first, "k-pager-first")), o(x.element, r, d)), x.element.find(m).length || (x.element.append(i(m, n.messages.previous)), a(x.element, r, d))), n.numeric && (x.list = x.element.find(".k-pager-numbers"), x.list.length || (x.list = e('<ul class="k-pager-numbers k-reset" />').appendTo(x.element))), n.input && (x.element.find(".k-pager-input").length || x.element.append('<span class="k-pager-input k-label">' + n.messages.page + '<input class="k-textbox">' + c.format(n.messages.of, d) + "</span>"), x.element.on(w + _, ".k-pager-input input", h(x._keydown, x))), n.previousNext && (x.element.find(g).length || (x.element.append(i(g, n.messages.next)), s(x.element, r, d)), x.element.find(p).length || (x.element.append(i(p, n.messages.last, "k-pager-last")), l(x.element, r, d))), n.pageSizes && (x.element.find(".k-pager-sizes").length || (y = n.pageSizes.length ? n.pageSizes : ["all", 5, 10, 20], k = e.map(y, function(e) {
                            return e.toLowerCase && "all" === e.toLowerCase() ? "<option value='all'>" + n.messages.allPages + "</option>" : "<option>" + e + "</option>"
                        }), e('<span class="k-pager-sizes k-label"><select/>' + n.messages.itemsPerPage + "</span>").appendTo(x.element).find("select").html(k.join("")).end().appendTo(x.element)), x.element.find(".k-pager-sizes select").val(x.pageSize()), c.ui.DropDownList && x.element.find(".k-pager-sizes select").show().kendoDropDownList(), x.element.on(v + _, ".k-pager-sizes select", h(x._change, x))), n.refresh && (x.element.find(".k-pager-refresh").length || x.element.append('<a href="#" class="k-pager-refresh k-link" title="' + n.messages.refresh + '"><span class="k-icon k-i-refresh">' + n.messages.refresh + "</span></a>"), x.element.on(b + _, ".k-pager-refresh", h(x._refreshClick, x))), n.info && (x.element.find(".k-pager-info").length || x.element.append('<span class="k-pager-info k-label" />')), x.element.on(b + _, "a", h(x._click, x)).addClass("k-pager-wrap k-widget k-floatwrap"), x.element.on(b + _, ".k-current-page", h(x._toggleActive, x)), n.autoBind && x.refresh(), c.notify(x)
                    },
                    destroy: function() {
                        var e = this;
                        u.fn.destroy.call(e), e.element.off(_), e.dataSource.unbind(v, e._refreshHandler), e._refreshHandler = null, c.destroy(e.element), e.element = e.list = null
                    },
                    events: [v],
                    options: {
                        name: "Pager",
                        selectTemplate: '<li><span class="k-state-selected">#=text#</span></li>',
                        currentPageTemplate: '<li class="k-current-page"><span class="k-link k-pager-nav">#=text#</span></li>',
                        linkTemplate: '<li><a tabindex="-1" href="\\#" class="k-link" data-#=ns#page="#=idx#" #if (title !== "") {# title="#=title#" #}#>#=text#</a></li>',
                        buttonCount: 10,
                        autoBind: !0,
                        numeric: !0,
                        info: !0,
                        input: !1,
                        previousNext: !0,
                        pageSizes: !1,
                        refresh: !1,
                        messages: {
                            allPages: "All",
                            display: "{0} - {1} of {2} items",
                            empty: "No items to display",
                            page: "Page",
                            of: "of {0}",
                            itemsPerPage: "items per page",
                            first: "Go to the first page",
                            previous: "Go to the previous page",
                            next: "Go to the next page",
                            last: "Go to the last page",
                            refresh: "Refresh",
                            morePages: "More pages"
                        }
                    },
                    setDataSource: function(e) {
                        var t = this;
                        t.dataSource.unbind(v, t._refreshHandler), t.dataSource = t.options.dataSource = e, e.bind(v, t._refreshHandler), t.options.autoBind && e.fetch()
                    },
                    refresh: function(e) {
                        var t, i, r, d, u, h, f = this,
                            p = 1,
                            m = f.page(),
                            g = "",
                            v = f.options,
                            _ = f.pageSize(),
                            b = f.dataSource.total(),
                            w = f.totalPages(),
                            k = f.linkTemplate,
                            x = v.buttonCount;
                        if (!e || "itemchange" != e.action) {
                            if (v.numeric) {
                                for (m > x && (r = m % x, p = 0 === r ? m - x + 1 : m - r + 1), i = Math.min(p + x - 1, w), p > 1 && (g += n(k, p - 1, "...", !1, v.messages.morePages)), t = p; i >= t; t++) g += n(t == m ? f.selectTemplate : k, t, t, !0);
                                w > i && (g += n(k, t, "...", !1, v.messages.morePages)), "" === g && (g = f.selectTemplate({
                                    text: 0
                                })), g = this.currentPageTemplate({
                                    text: m
                                }) + g, f.list.removeClass("k-state-expanded").html(g)
                            }
                            v.info && (g = b > 0 ? c.format(v.messages.display, (m - 1) * _ + 1, Math.min(m * _, b), b) : v.messages.empty, f.element.find(".k-pager-info").html(g)), v.input && f.element.find(".k-pager-input").html(f.options.messages.page + '<input class="k-textbox">' + c.format(v.messages.of, w)).find("input").val(m).attr(y, 1 > b).toggleClass("k-state-disabled", 1 > b), v.previousNext && (o(f.element, m, w), a(f.element, m, w), s(f.element, m, w), l(f.element, m, w)), v.pageSizes && (d = f.element.find(".k-pager-sizes option[value='all']").length > 0, u = d && _ === this.dataSource.total(), h = _, u && (_ = "all", h = v.messages.allPages), f.element.find(".k-pager-sizes select").val(_).filter("[" + c.attr("role") + "=dropdownlist]").kendoDropDownList("value", _).kendoDropDownList("text", h))
                        }
                    },
                    _keydown: function(e) {
                        if (e.keyCode === c.keys.ENTER) {
                            var t = this.element.find(".k-pager-input").find("input"),
                                n = parseInt(t.val(), 10);
                            (isNaN(n) || 1 > n || n > this.totalPages()) && (n = this.page()), t.val(n), this.page(n)
                        }
                    },
                    _refreshClick: function(e) {
                        e.preventDefault(), this.dataSource.read()
                    },
                    _change: function(e) {
                        var t = e.currentTarget.value,
                            n = parseInt(t, 10),
                            i = this.dataSource;
                        isNaN(n) ? "all" == (t + "").toLowerCase() && i.pageSize(i.total()) : i.pageSize(n)
                    },
                    _toggleActive: function() {
                        this.list.toggleClass("k-state-expanded")
                    },
                    _click: function(t) {
                        var n = e(t.currentTarget);
                        t.preventDefault(), n.is(".k-state-disabled") || this.page(n.attr(c.attr("page")))
                    },
                    totalPages: function() {
                        return Math.ceil((this.dataSource.total() || 0) / (this.pageSize() || 1))
                    },
                    pageSize: function() {
                        return this.dataSource.pageSize() || this.dataSource.total()
                    },
                    page: function(e) {
                        return e === t ? this.dataSource.total() > 0 ? this.dataSource.page() : 0 : (this.dataSource.page(e), this.trigger(v, {
                            index: e
                        }), t)
                    }
                });
            d.plugin(x)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.popup.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            function n(t, n) {
                return t === n || e.contains(t, n)
            }
            var i = window.kendo,
                r = i.ui,
                o = r.Widget,
                a = i.support,
                s = i.getOffset,
                l = "open",
                c = "close",
                d = "deactivate",
                u = "activate",
                h = "center",
                f = "left",
                p = "right",
                m = "top",
                g = "bottom",
                v = "absolute",
                _ = "hidden",
                b = "body",
                w = "location",
                y = "position",
                k = "visible",
                x = "effects",
                C = "k-state-active",
                S = "k-state-border",
                T = /k-state-border-(\w+)/,
                D = ".k-picker-wrap, .k-dropdown-wrap, .k-link",
                A = "down",
                E = e(document.documentElement),
                F = e(window),
                I = "scroll",
                M = a.transitions.css,
                R = M + "transform",
                P = e.extend,
                z = ".kendoPopup",
                B = ["font-size", "font-family", "font-stretch", "font-style", "font-weight", "line-height"],
                L = o.extend({
                    init: function(t, n) {
                        var r, s = this;
                        n = n || {}, n.isRtl && (n.origin = n.origin || g + " " + p, n.position = n.position || m + " " + p), o.fn.init.call(s, t, n), t = s.element, n = s.options, s.collisions = n.collision ? n.collision.split(" ") : [], s.downEvent = i.applyEventMap(A, i.guid()), 1 === s.collisions.length && s.collisions.push(s.collisions[0]), r = e(s.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"), n.appendTo = e(e(n.appendTo)[0] || r[0] || b), s.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl", !!n.isRtl).css({
                            position: v
                        }).appendTo(n.appendTo).on("mouseenter" + z, function() {
                            s._hovered = !0
                        }).on("mouseleave" + z, function() {
                            s._hovered = !1
                        }), s.wrapper = e(), n.animation === !1 && (n.animation = {
                            open: {
                                effects: {}
                            },
                            close: {
                                hide: !0,
                                effects: {}
                            }
                        }), P(n.animation.open, {
                            complete: function() {
                                s.wrapper.css({
                                    overflow: k
                                }), s._activated = !0, s._trigger(u)
                            }
                        }), P(n.animation.close, {
                            complete: function() {
                                s._animationClose()
                            }
                        }), s._mousedownProxy = function(e) {
                            s._mousedown(e)
                        }, s._resizeProxy = a.mobileOS.android ? function(e) {
                            setTimeout(function() {
                                s._resize(e)
                            }, 600)
                        } : function(e) {
                            s._resize(e)
                        }, n.toggleTarget && e(n.toggleTarget).on(n.toggleEvent + z, e.proxy(s.toggle, s))
                    },
                    events: [l, u, c, d],
                    options: {
                        name: "Popup",
                        toggleEvent: "click",
                        origin: g + " " + f,
                        position: m + " " + f,
                        anchor: b,
                        appendTo: null,
                        collision: "flip fit",
                        viewport: window,
                        copyAnchorStyles: !0,
                        autosize: !1,
                        modal: !1,
                        adjustSize: {
                            width: 0,
                            height: 0
                        },
                        animation: {
                            open: {
                                effects: "slideIn:down",
                                transition: !0,
                                duration: 200
                            },
                            close: {
                                duration: 100,
                                hide: !0
                            }
                        }
                    },
                    _animationClose: function() {
                        var e = this,
                            t = e.wrapper.data(w);
                        e.wrapper.hide(), t && e.wrapper.css(t), e.options.anchor != b && e._hideDirClass(), e._closing = !1, e._trigger(d)
                    },
                    destroy: function() {
                        var t, n = this,
                            r = n.options,
                            a = n.element.off(z);
                        o.fn.destroy.call(n), r.toggleTarget && e(r.toggleTarget).off(z), r.modal || (E.unbind(n.downEvent, n._mousedownProxy), n._toggleResize(!1)), i.destroy(n.element.children()), a.removeData(), r.appendTo[0] === document.body && (t = a.parent(".k-animation-container"), t[0] ? t.remove() : a.remove())
                    },
                    open: function(t, n) {
                        var r, o, s = this,
                            c = {
                                isFixed: !isNaN(parseInt(n, 10)),
                                x: t,
                                y: n
                            },
                            d = s.element,
                            u = s.options,
                            h = e(u.anchor),
                            f = d[0] && d.hasClass("km-widget");
                        if (!s.visible()) {
                            if (u.copyAnchorStyles && (f && "font-size" == B[0] && B.shift(), d.css(i.getComputedStyles(h[0], B))), d.data("animating") || s._trigger(l)) return;
                            s._activated = !1, u.modal || (E.unbind(s.downEvent, s._mousedownProxy).bind(s.downEvent, s._mousedownProxy), s._toggleResize(!1), s._toggleResize(!0)), s.wrapper = o = i.wrap(d, u.autosize).css({
                                overflow: _,
                                display: "block",
                                position: v
                            }), a.mobileOS.android && o.css(R, "translatez(0)"), o.css(y), e(u.appendTo)[0] == document.body && o.css(m, "-10000px"), s.flipped = s._position(c), r = s._openAnimation(), u.anchor != b && s._showDirClass(r), d.data(x, r.effects).kendoStop(!0).kendoAnimate(r)
                        }
                    },
                    _openAnimation: function() {
                        var e = P(!0, {}, this.options.animation.open);
                        return e.effects = i.parseEffects(e.effects, this.flipped), e
                    },
                    _hideDirClass: function() {
                        var t = e(this.options.anchor),
                            n = ((t.attr("class") || "").match(T) || ["", "down"])[1],
                            r = S + "-" + n;
                        t.removeClass(r).children(D).removeClass(C).removeClass(r), this.element.removeClass(S + "-" + i.directions[n].reverse)
                    },
                    _showDirClass: function(t) {
                        var n = t.effects.slideIn ? t.effects.slideIn.direction : "down",
                            r = S + "-" + n;
                        e(this.options.anchor).addClass(r).children(D).addClass(C).addClass(r), this.element.addClass(S + "-" + i.directions[n].reverse)
                    },
                    position: function() {
                        this.visible() && (this.flipped = this._position())
                    },
                    toggle: function() {
                        var e = this;
                        e[e.visible() ? c : l]()
                    },
                    visible: function() {
                        return this.element.is(":" + k)
                    },
                    close: function(n) {
                        var r, o, a, s, l = this,
                            d = l.options;
                        if (l.visible()) {
                            if (r = l.wrapper[0] ? l.wrapper : i.wrap(l.element).hide(), l._toggleResize(!1), l._closing || l._trigger(c)) return l._toggleResize(!0), t;
                            l.element.find(".k-popup").each(function() {
                                var t = e(this),
                                    i = t.data("kendoPopup");
                                i && i.close(n)
                            }), E.unbind(l.downEvent, l._mousedownProxy), n ? o = {
                                hide: !0,
                                effects: {}
                            } : (o = P(!0, {}, d.animation.close), a = l.element.data(x), s = o.effects, !s && !i.size(s) && a && i.size(a) && (o.effects = a, o.reverse = !0), l._closing = !0), l.element.kendoStop(!0), r.css({
                                overflow: _
                            }), l.element.kendoAnimate(o)
                        }
                    },
                    _trigger: function(e) {
                        return this.trigger(e, {
                            type: e
                        })
                    },
                    _resize: function(e) {
                        var t = this; - 1 !== a.resize.indexOf(e.type) ? (clearTimeout(t._resizeTimeout), t._resizeTimeout = setTimeout(function() {
                            t._position(), t._resizeTimeout = null
                        }, 50)) : (!t._hovered || t._activated && t.element.hasClass("k-list-container")) && t.close()
                    },
                    _toggleResize: function(e) {
                        var t = e ? "on" : "off",
                            n = a.resize;
                        a.mobileOS.ios || a.mobileOS.android || (n += " " + I), this._scrollableParents()[t](I, this._resizeProxy), F[t](n, this._resizeProxy)
                    },
                    _mousedown: function(t) {
                        var r = this,
                            o = r.element[0],
                            a = r.options,
                            s = e(a.anchor)[0],
                            l = a.toggleTarget,
                            c = i.eventTarget(t),
                            d = e(c).closest(".k-popup"),
                            u = d.parent().parent(".km-shim").length;
                        d = d[0], (u || !d || d === r.element[0]) && "popover" !== e(t.target).closest("a").data("rel") && (n(o, c) || n(s, c) || l && n(e(l)[0], c) || r.close())
                    },
                    _fit: function(e, t, n) {
                        var i = 0;
                        return e + t > n && (i = n - (e + t)), 0 > e && (i = -e), i
                    },
                    _flip: function(e, t, n, i, r, o, a) {
                        var s = 0;
                        return a = a || t, o !== r && o !== h && r !== h && (e + a > i && (s += -(n + t)), 0 > e + s && (s += n + t)), s
                    },
                    _scrollableParents: function() {
                        return e(this.options.anchor).parentsUntil("body").filter(function(e, t) {
                            return i.isScrollable(t)
                        })
                    },
                    _position: function(t) {
                        var n, r, o, l, c, d, u, h, f, p, m, g, _, b = this,
                            k = b.element,
                            x = b.wrapper,
                            C = b.options,
                            S = e(C.viewport),
                            T = S.offset(),
                            D = e(C.anchor),
                            A = C.origin.toLowerCase().split(" "),
                            E = C.position.toLowerCase().split(" "),
                            F = b.collisions,
                            I = a.zoomLevel(),
                            M = 10002,
                            R = !!(S[0] == window && window.innerWidth && 1.02 >= I),
                            z = 0,
                            B = document.documentElement,
                            L = R ? window.innerWidth : S.width(),
                            H = R ? window.innerHeight : S.height();
                        if (R && B.scrollHeight - B.clientHeight > 0 && (L -= i.support.scrollbar()), n = D.parents().filter(x.siblings()), n[0])
                            if (o = Math.max(+n.css("zIndex"), 0)) M = o + 10;
                            else
                                for (r = D.parentsUntil(n), l = r.length; l > z; z++) o = +e(r[z]).css("zIndex"), o && o > M && (M = o + 10);
                        return x.css("zIndex", M), x.css(t && t.isFixed ? {
                            left: t.x,
                            top: t.y
                        } : b._align(A, E)), c = s(x, y, D[0] === x.offsetParent()[0]), d = s(x), u = D.offsetParent().parent(".k-animation-container,.k-popup,.k-group"), u.length && (c = s(x, y, !0), d = s(x)), S[0] === window ? (d.top -= window.pageYOffset || document.documentElement.scrollTop || 0, d.left -= window.pageXOffset || document.documentElement.scrollLeft || 0) : (d.top -= T.top, d.left -= T.left), b.wrapper.data(w) || x.data(w, P({}, c)), h = P({}, d), f = P({}, c), p = C.adjustSize, "fit" === F[0] && (f.top += b._fit(h.top, x.outerHeight() + p.height, H / I)), "fit" === F[1] && (f.left += b._fit(h.left, x.outerWidth() + p.width, L / I)), m = P({}, f), g = k.outerHeight(), _ = x.outerHeight(), !x.height() && g && (_ += g), "flip" === F[0] && (f.top += b._flip(h.top, g, D.outerHeight(), H / I, A[0], E[0], _)), "flip" === F[1] && (f.left += b._flip(h.left, k.outerWidth(), D.outerWidth(), L / I, A[1], E[1], x.outerWidth())), k.css(y, v), x.css(f), f.left != m.left || f.top != m.top
                    },
                    _align: function(t, n) {
                        var i, r = this,
                            o = r.wrapper,
                            a = e(r.options.anchor),
                            l = t[0],
                            c = t[1],
                            d = n[0],
                            u = n[1],
                            f = s(a),
                            m = e(r.options.appendTo),
                            v = o.outerWidth(),
                            _ = o.outerHeight(),
                            b = a.outerWidth(),
                            w = a.outerHeight(),
                            y = f.top,
                            k = f.left,
                            x = Math.round;
                        return m[0] != document.body && (i = s(m), y -= i.top, k -= i.left), l === g && (y += w), l === h && (y += x(w / 2)), d === g && (y -= _), d === h && (y -= x(_ / 2)), c === p && (k += b), c === h && (k += x(b / 2)), u === p && (k -= v), u === h && (k -= x(v / 2)), k <0 ? k=0: k,  {
                            top: y,
                            left: k
                        }
                    }
                });
            r.plugin(L)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.notification.min", ["kendo.core.min", "kendo.popup.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.ui.Widget,
                r = e.proxy,
                o = e.extend,
                a = window.setTimeout,
                s = "click",
                l = "show",
                c = "hide",
                d = "k-notification",
                u = ".k-notification-wrap .k-i-close",
                h = "info",
                f = "success",
                p = "warning",
                m = "error",
                g = "top",
                v = "left",
                _ = "bottom",
                b = "right",
                w = "up",
                y = ".kendoNotification",
                k = '<div class="k-widget k-notification"></div>',
                x = '<div class="k-notification-wrap"><span class="k-icon k-i-note">#=typeIcon#</span>#=content#<span class="k-icon k-i-close">Hide</span></div>',
                C = x.replace("#=content#", "#:content#"),
                S = i.extend({
                    init: function(t, r) {
                        var o = this;
                        i.fn.init.call(o, t, r), r = o.options, r.appendTo && e(r.appendTo).is(t) || o.element.hide(), o._compileTemplates(r.templates), o._guid = "_" + n.guid(), o._isRtl = n.support.isRtl(t), o._compileStacking(r.stacking, r.position.top, r.position.left), n.notify(o)
                    },
                    events: [l, c],
                    options: {
                        name: "Notification",
                        position: {
                            pinned: !0,
                            top: null,
                            left: null,
                            bottom: 20,
                            right: 20
                        },
                        stacking: "default",
                        hideOnClick: !0,
                        button: !1,
                        allowHideAfter: 0,
                        autoHideAfter: 5e3,
                        appendTo: null,
                        width: null,
                        height: null,
                        templates: [],
                        animation: {
                            open: {
                                effects: "fade:in",
                                duration: 300
                            },
                            close: {
                                effects: "fade:out",
                                duration: 600,
                                hide: !0
                            }
                        }
                    },
                    _compileTemplates: function(t) {
                        var i = this,
                            r = n.template;
                        i._compiled = {}, e.each(t, function(t, n) {
                            i._compiled[n.type] = r(n.template || e("#" + n.templateId).html())
                        }), i._defaultCompiled = r(x), i._safeCompiled = r(C)
                    },
                    _getCompiled: function(e, t) {
                        var n = t ? this._safeCompiled : this._defaultCompiled;
                        return e ? this._compiled[e] || n : n
                    },
                    _compileStacking: function(e, t, n) {
                        var i, r, o = this,
                            a = {
                                paddingTop: 0,
                                paddingRight: 0,
                                paddingBottom: 0,
                                paddingLeft: 0
                            },
                            s = null !== n ? v : b;
                        switch (e) {
                            case "down":
                                i = _ + " " + s, r = g + " " + s, delete a.paddingBottom;
                                break;
                            case b:
                                i = g + " " + b, r = g + " " + v, delete a.paddingRight;
                                break;
                            case v:
                                i = g + " " + v, r = g + " " + b, delete a.paddingLeft;
                                break;
                            case w:
                                i = g + " " + s, r = _ + " " + s, delete a.paddingTop;
                                break;
                            default:
                                null !== t ? (i = _ + " " + s, r = g + " " + s, delete a.paddingBottom) : (i = g + " " + s, r = _ + " " + s, delete a.paddingTop)
                        }
                        o._popupOrigin = i, o._popupPosition = r, o._popupPaddings = a
                    },
                    _attachPopupEvents: function(e, t) {
                        function i(e) {
                            e.on(s + y, function() {
                                o._hidePopup(t)
                            })
                        }
                        var r, o = this,
                            l = e.allowHideAfter,
                            c = !isNaN(l) && l > 0;
                        t.options.anchor !== document.body && t.options.origin.indexOf(b) > 0 && t.bind("open", function() {
                            var e = n.getShadows(t.element);
                            a(function() {
                                t.wrapper.css("left", parseFloat(t.wrapper.css("left")) + e.left + e.right)
                            })
                        }), e.hideOnClick ? t.bind("activate", function() {
                            c ? a(function() {
                                i(t.element)
                            }, l) : i(t.element)
                        }) : e.button && (r = t.element.find(u), c ? a(function() {
                            i(r)
                        }, l) : i(r))
                    },
                    _showPopup: function(t, i) {
                        var r, s, l = this,
                            c = i.autoHideAfter,
                            d = i.position.left,
                            h = i.position.top;
                        s = e("." + l._guid + ":not(.k-hiding)").last(), r = new n.ui.Popup(t, {
                            anchor: s[0] ? s : document.body,
                            origin: l._popupOrigin,
                            position: l._popupPosition,
                            animation: i.animation,
                            modal: !0,
                            collision: "",
                            isRtl: l._isRtl,
                            close: function() {
                                l._triggerHide(this.element)
                            },
                            deactivate: function(e) {
                                e.sender.element.off(y), e.sender.element.find(u).off(y), e.sender.destroy()
                            }
                        }), l._attachPopupEvents(i, r), s[0] ? r.open() : (null === d && (d = e(window).width() - t.width() - i.position.right), null === h && (h = e(window).height() - t.height() - i.position.bottom), r.open(d, h)), r.wrapper.addClass(l._guid).css(o({
                            margin: 0
                        }, l._popupPaddings)), i.position.pinned ? (r.wrapper.css("position", "fixed"), s[0] && l._togglePin(r.wrapper, !0)) : s[0] || l._togglePin(r.wrapper, !1), c > 0 && a(function() {
                            l._hidePopup(r)
                        }, c)
                    },
                    _hidePopup: function(e) {
                        e.wrapper.addClass("k-hiding"), e.close()
                    },
                    _togglePin: function(t, n) {
                        var i = e(window),
                            r = n ? -1 : 1;
                        t.css({
                            top: parseInt(t.css(g), 10) + r * i.scrollTop(),
                            left: parseInt(t.css(v), 10) + r * i.scrollLeft()
                        })
                    },
                    _attachStaticEvents: function(e, t) {
                        function n(e) {
                            e.on(s + y, r(i._hideStatic, i, t))
                        }
                        var i = this,
                            o = e.allowHideAfter,
                            l = !isNaN(o) && o > 0;
                        e.hideOnClick ? l ? a(function() {
                            n(t)
                        }, o) : n(t) : e.button && (l ? a(function() {
                            n(t.find(u))
                        }, o) : n(t.find(u)))
                    },
                    _showStatic: function(e, t) {
                        var n = this,
                            i = t.autoHideAfter,
                            r = t.animation,
                            o = t.stacking == w || t.stacking == v ? "prependTo" : "appendTo";
                        e.addClass(n._guid)[o](t.appendTo).hide().kendoAnimate(r.open || !1), n._attachStaticEvents(t, e), i > 0 && a(function() {
                            n._hideStatic(e)
                        }, i)
                    },
                    _hideStatic: function(e) {
                        e.kendoAnimate(o(this.options.animation.close || !1, {
                            complete: function() {
                                e.off(y).find(u).off(y), e.remove()
                            }
                        })), this._triggerHide(e)
                    },
                    _triggerHide: function(e) {
                        this.trigger(c, {
                            element: e
                        }), this.angular("cleanup", function() {
                            return {
                                elements: e
                            }
                        })
                    },
                    show: function(i, r, a) {
                        var s, c, u = this,
                            f = u.options,
                            p = e(k);
                        return r || (r = h), null !== i && i !== t && "" !== i && (n.isFunction(i) && (i = i()), c = {
                            typeIcon: r,
                            content: ""
                        }, s = e.isPlainObject(i) ? o(c, i) : o(c, {
                            content: i
                        }), p.addClass(d + "-" + r).toggleClass(d + "-button", f.button).attr("data-role", "alert").css({
                            width: f.width,
                            height: f.height
                        }).append(u._getCompiled(r, a)(s)), u.angular("compile", function() {
                            return {
                                elements: p,
                                data: [{
                                    dataItem: s
                                }]
                            }
                        }), e(f.appendTo)[0] ? u._showStatic(p, f) : u._showPopup(p, f), u.trigger(l, {
                            element: p
                        })), u
                    },
                    showText: function(e, t) {
                        this.show(e, t, !0)
                    },
                    info: function(e) {
                        return this.show(e, h)
                    },
                    success: function(e) {
                        return this.show(e, f)
                    },
                    warning: function(e) {
                        return this.show(e, p)
                    },
                    error: function(e) {
                        return this.show(e, m)
                    },
                    hide: function() {
                        var t = this,
                            n = t.getNotifications();
                        return n.each(t.options.appendTo ? function(n, i) {
                            t._hideStatic(e(i))
                        } : function(n, i) {
                            var r = e(i).data("kendoPopup");
                            r && t._hidePopup(r)
                        }), t
                    },
                    getNotifications: function() {
                        var t = this,
                            n = e("." + t._guid);
                        return t.options.appendTo ? n : n.children("." + d)
                    },
                    setOptions: function(e) {
                        var n, r = this;
                        i.fn.setOptions.call(r, e), n = r.options, e.templates !== t && r._compileTemplates(n.templates), (e.stacking !== t || e.position !== t) && r._compileStacking(n.stacking, n.position.top, n.position.left)
                    },
                    destroy: function() {
                        i.fn.destroy.call(this), this.getNotifications().off(y).find(u).off(y)
                    }
                });
            n.ui.plugin(S)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.tooltip.min", ["kendo.core.min", "kendo.popup.min"], e)
    }(function() {
        return function(e, t) {
            function n(e) {
                for (; e.length;) i(e), e = e.parent()
            }

            function i(e) {
                var t = e.data(a.ns + "title");
                t && (e.attr("title", t), e.removeData(a.ns + "title"))
            }

            function r(e) {
                var t = e.attr("title");
                t && (e.data(a.ns + "title", t), e.attr("title", ""))
            }

            function o(e) {
                for (; e.length && !e.is("body");) r(e), e = e.parent()
            }
            var a = window.kendo,
                s = a.ui.Widget,
                l = a.ui.Popup,
                c = a.isFunction,
                d = e.isPlainObject,
                u = e.extend,
                h = e.proxy,
                f = e(document),
                p = a.isLocalUrl,
                m = "_tt_active",
                g = "aria-describedby",
                v = "show",
                _ = "hide",
                b = "error",
                w = "contentLoad",
                y = "requestStart",
                k = "k-content-frame",
                x = '<div role="tooltip" class="k-widget k-tooltip#if (!autoHide) {# k-tooltip-closable#}#">#if (!autoHide) {# <div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close">close</a></div> #}#<div class="k-tooltip-content"></div>#if (callout){ #<div class="k-callout k-callout-#=dir#"></div>#}#</div>',
                C = a.template("<iframe frameborder='0' class='" + k + "' src='#= content.url #'>This page requires frames in order to show content</iframe>"),
                S = ".kendoTooltip",
                T = {
                    bottom: {
                        origin: "bottom center",
                        position: "top center"
                    },
                    top: {
                        origin: "top center",
                        position: "bottom center"
                    },
                    left: {
                        origin: "center left",
                        position: "center right",
                        collision: "fit flip"
                    },
                    right: {
                        origin: "center right",
                        position: "center left",
                        collision: "fit flip"
                    },
                    center: {
                        position: "center center",
                        origin: "center center"
                    }
                },
                D = {
                    top: "bottom",
                    bottom: "top",
                    left: "right",
                    right: "left",
                    center: "center"
                },
                A = {
                    bottom: "n",
                    top: "s",
                    left: "e",
                    right: "w",
                    center: "n"
                },
                E = {
                    horizontal: {
                        offset: "top",
                        size: "outerHeight"
                    },
                    vertical: {
                        offset: "left",
                        size: "outerWidth"
                    }
                },
                F = function(e) {
                    return e.target.data(a.ns + "title")
                },
                I = s.extend({
                    init: function(e, t) {
                        var n, i = this;
                        s.fn.init.call(i, e, t), n = i.options.position.match(/left|right/) ? "horizontal" : "vertical", i.dimensions = E[n], i._documentKeyDownHandler = h(i._documentKeyDown, i), i.element.on(i.options.showOn + S, i.options.filter, h(i._showOn, i)).on("mouseenter" + S, i.options.filter, h(i._mouseenter, i)), this.options.autoHide && i.element.on("mouseleave" + S, i.options.filter, h(i._mouseleave, i))
                    },
                    options: {
                        name: "Tooltip",
                        filter: "",
                        content: F,
                        showAfter: 100,
                        callout: !0,
                        position: "bottom",
                        showOn: "mouseenter",
                        autoHide: !0,
                        width: null,
                        height: null,
                        animation: {
                            open: {
                                effects: "fade:in",
                                duration: 0
                            },
                            close: {
                                effects: "fade:out",
                                duration: 40,
                                hide: !0
                            }
                        }
                    },
                    events: [v, _, w, b, y],
                    _mouseenter: function(t) {
                        o(e(t.currentTarget))
                    },
                    _showOn: function(t) {
                        var n = this,
                            i = e(t.currentTarget);
                        n.options.showOn && n.options.showOn.match(/click|focus/) ? n._show(i) : (clearTimeout(n.timeout), n.timeout = setTimeout(function() {
                            n._show(i)
                        }, n.options.showAfter))
                    },
                    _appendContent: function(e) {
                        var t, n = this,
                            i = n.options.content,
                            r = n.content,
                            o = n.options.iframe;
                        d(i) && i.url ? ("iframe" in n.options || (o = !p(i.url)), n.trigger(y, {
                            options: i,
                            target: e
                        }), o ? (r.hide(), t = r.find("." + k)[0], t ? t.src = i.url || t.src : r.html(C({
                            content: i
                        })), r.find("." + k).off("load" + S).on("load" + S, function() {
                            n.trigger(w), r.show()
                        })) : (r.empty(), a.ui.progress(r, !0), n._ajaxRequest(i))) : i && c(i) ? (i = i({
                            sender: this,
                            target: e
                        }), r.html(i || "")) : r.html(i), n.angular("compile", function() {
                            return {
                                elements: r
                            }
                        })
                    },
                    _ajaxRequest: function(e) {
                        var t = this;
                        jQuery.ajax(u({
                            type: "GET",
                            dataType: "html",
                            cache: !1,
                            error: function(e, n) {
                                a.ui.progress(t.content, !1), t.trigger(b, {
                                    status: n,
                                    xhr: e
                                })
                            },
                            success: h(function(e) {
                                a.ui.progress(t.content, !1), t.content.html(e), t.trigger(w)
                            }, t)
                        }, e))
                    },
                    _documentKeyDown: function(e) {
                        e.keyCode === a.keys.ESC && this.hide()
                    },
                    refresh: function() {
                        var e = this,
                            t = e.popup;
                        t && t.options.anchor && e._appendContent(t.options.anchor)
                    },
                    hide: function() {
                        this.popup && this.popup.close()
                    },
                    show: function(e) {
                        e = e || this.element, o(e), this._show(e)
                    },
                    _show: function(e) {
                        var t = this,
                            i = t.target();
                        t.popup || t._initPopup(), i && i[0] != e[0] && (t.popup.close(), t.popup.element.kendoStop(!0, !0)), i && i[0] == e[0] || (t._appendContent(e), t.popup.options.anchor = e), t.popup.one("deactivate", function() {
                            n(e), e.removeAttr(g), this.element.removeAttr("id").attr("aria-hidden", !0), f.off("keydown" + S, t._documentKeyDownHandler)
                        }), t.popup.open()
                    },
                    _initPopup: function() {
                        var t = this,
                            n = t.options,
                            i = e(a.template(x)({
                                callout: n.callout && "center" !== n.position,
                                dir: A[n.position],
                                autoHide: n.autoHide
                            }));
                        t.popup = new l(i, u({
                            activate: function() {
                                var e = this.options.anchor,
                                    i = e[0].id || t.element[0].id;
                                i && (e.attr(g, i + m), this.element.attr("id", i + m)), n.callout && t._positionCallout(), this.element.removeAttr("aria-hidden"), f.on("keydown" + S, t._documentKeyDownHandler), t.trigger(v)
                            },
                            close: function() {
                                t.trigger(_)
                            },
                            copyAnchorStyles: !1,
                            animation: n.animation
                        }, T[n.position])), i.css({
                            width: n.width,
                            height: n.height
                        }), t.content = i.find(".k-tooltip-content"), t.arrow = i.find(".k-callout"), n.autoHide ? i.on("mouseleave" + S, h(t._mouseleave, t)) : i.on("click" + S, ".k-tooltip-button", h(t._closeButtonClick, t))
                    },
                    _closeButtonClick: function(e) {
                        e.preventDefault(), this.hide()
                    },
                    _mouseleave: function(t) {
                        if (this.popup) {
                            var i = e(t.currentTarget),
                                r = i.offset(),
                                o = t.pageX,
                                a = t.pageY;
                            if (r.right = r.left + i.outerWidth(), r.bottom = r.top + i.outerHeight(), o > r.left && r.right > o && a > r.top && r.bottom > a) return;
                            this.popup.close()
                        } else n(e(t.currentTarget));
                        clearTimeout(this.timeout)
                    },
                    _positionCallout: function() {
                        var t = this,
                            n = t.options.position,
                            i = t.dimensions,
                            r = i.offset,
                            o = t.popup,
                            a = o.options.anchor,
                            s = e(a).offset(),
                            l = parseInt(t.arrow.css("border-top-width"), 10),
                            c = e(o.element).offset(),
                            d = A[o.flipped ? D[n] : n],
                            u = s[r] - c[r] + e(a)[i.size]() / 2 - l;
                        t.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-" + d).css(r, u)
                    },
                    target: function() {
                        return this.popup ? this.popup.options.anchor : null
                    },
                    destroy: function() {
                        var e = this.popup;
                        e && (e.element.off(S), e.destroy()), clearTimeout(this.timeout), this.element.off(S), f.off("keydown" + S, this._documentKeyDownHandler), s.fn.destroy.call(this)
                    }
                });
            a.ui.plugin(I)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.list.min", ["kendo.data.min", "kendo.popup.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, n) {
                return e !== t && "" !== e && null !== e && ("boolean" === n ? e = !!e : "number" === n ? e = +e : "string" === n && (e = "" + e)), e
            }

            function i(e, t) {
                var n, i, r, o, a = t.length,
                    s = e.length,
                    l = [],
                    c = [];
                if (s)
                    for (r = 0; s > r; r++) {
                        for (n = e[r], i = !1, o = 0; a > o; o++)
                            if (n === t[o]) {
                                i = !0, l.push({
                                    index: r,
                                    item: n
                                });
                                break
                            } i || c.push(n)
                    }
                return {
                    changed: l,
                    unchanged: c
                }
            }

            function r(t, n) {
                var i, o = !1;
                return t.filters && (i = e.grep(t.filters, function(e) {
                    return o = r(e, n), e.filters ? e.filters.length : e.field != n
                }), o || t.filters.length === i.length || (o = !0), t.filters = i), o
            }
            var o, a, s = window.kendo,
                l = s.ui,
                c = l.Widget,
                d = s.keys,
                u = s.support,
                h = s.htmlEncode,
                f = s._activeElement,
                p = s.data.ObservableArray,
                m = "id",
                g = "change",
                v = "k-state-focused",
                _ = "k-state-hover",
                b = "k-loading",
                w = "open",
                y = "close",
                k = "cascade",
                x = "select",
                C = "selected",
                S = "requestStart",
                T = "requestEnd",
                D = "width",
                A = e.extend,
                E = e.proxy,
                F = e.isArray,
                I = u.browser,
                M = I.msie && 9 > I.version,
                R = /"/g,
                P = {
                    ComboBox: "DropDownList",
                    DropDownList: "ComboBox"
                },
                z = s.ui.DataBoundWidget.extend({
                    init: function(t, n) {
                        var i, r = this,
                            o = r.ns;
                        c.fn.init.call(r, t, n), t = r.element, n = r.options, r._isSelect = t.is(x), r._isSelect && r.element[0].length && (n.dataSource || (n.dataTextField = n.dataTextField || "text", n.dataValueField = n.dataValueField || "value")), r.ul = e('<ul unselectable="on" class="k-list k-reset"/>').attr({
                            tabIndex: -1,
                            "aria-hidden": !0
                        }), r.list = e("<div class='k-list-container'/>").append(r.ul).on("mousedown" + o, E(r._listMousedown, r)), i = t.attr(m), i && (r.list.attr(m, i + "-list"), r.ul.attr(m, i + "_listbox")), r._header(), r._accessors(), r._initValue()
                    },
                    options: {
                        valuePrimitive: !1,
                        headerTemplate: ""
                    },
                    setOptions: function(e) {
                        c.fn.setOptions.call(this, e), e && e.enable !== t && (e.enabled = e.enable)
                    },
                    focus: function() {
                        this._focused.focus()
                    },
                    readonly: function(e) {
                        this._editable({
                            readonly: e === t ? !0 : e,
                            disable: !1
                        })
                    },
                    enable: function(e) {
                        this._editable({
                            readonly: !1,
                            disable: !(e = e === t ? !0 : e)
                        })
                    },
                    _listOptions: function(t) {
                        var n = this,
                            i = n.options,
                            r = i.virtual,
                            o = E(n._listBound, n);
                        return r = "object" == typeof r ? r : {}, t = e.extend({
                            autoBind: !1,
                            selectable: !0,
                            dataSource: n.dataSource,
                            click: E(n._click, n),
                            change: E(n._listChange, n),
                            activate: E(n._activateItem, n),
                            deactivate: E(n._deactivateItem, n),
                            dataBinding: function() {
                                n.trigger("dataBinding"), n._angularItems("cleanup")
                            },
                            dataBound: o,
                            listBound: o,
                            height: i.height,
                            dataValueField: i.dataValueField,
                            dataTextField: i.dataTextField,
                            groupTemplate: i.groupTemplate,
                            fixedGroupTemplate: i.fixedGroupTemplate,
                            template: i.template
                        }, t, r), t.template || (t.template = "#:" + s.expr(t.dataTextField, "data") + "#"), t
                    },
                    _initList: function() {
                        var e = this,
                            t = e._listOptions({
                                selectedItemChange: E(e._listChange, e)
                            });
                        e.listView = e.options.virtual ? new s.ui.VirtualList(e.ul, t) : new s.ui.StaticList(e.ul, t), e._setListValue()
                    },
                    _setListValue: function(e) {
                        e = e || this.options.value, e !== t && this.listView.value(e).done(E(this._updateSelectionState, this))
                    },
                    _updateSelectionState: e.noop,
                    _listMousedown: function(e) {
                        this.filterInput && this.filterInput[0] === e.target || e.preventDefault()
                    },
                    _isFilterEnabled: function() {
                        var e = this.options.filter;
                        return e && "none" !== e
                    },
                    _clearFilter: function() {
                        this.options.virtual || this.listView.bound(!1), this._filterSource()
                    },
                    _filterSource: function(e, t) {
                        var n = this,
                            i = n.options,
                            o = n.dataSource,
                            a = A({}, o.filter() || {}),
                            s = r(a, i.dataTextField);
                        (e || s) && n.trigger("filtering", {
                            filter: e
                        }) || (a = {
                            filters: a.filters || [],
                            logic: "and"
                        }, e && a.filters.push(e), n._cascading && this.listView.setDSFilter(a), t ? o.read({
                            filter: a
                        }) : o.filter(a))
                    },
                    _header: function() {
                        var t, n = this,
                            i = n.options.headerTemplate;
                        e.isFunction(i) && (i = i({})), i && (n.list.prepend(i), t = n.ul.prev(), n.header = t[0] ? t : null, n.header && n.angular("compile", function() {
                            return {
                                elements: n.header
                            }
                        }))
                    },
                    _initValue: function() {
                        var e = this,
                            t = e.options.value;
                        null !== t ? e.element.val(t) : (t = e._accessor(), e.options.value = t), e._old = t
                    },
                    _ignoreCase: function() {
                        var e, t = this,
                            n = t.dataSource.reader.model;
                        n && n.fields && (e = n.fields[t.options.dataTextField], e && e.type && "string" !== e.type && (t.options.ignoreCase = !1))
                    },
                    _focus: function(e) {
                        return this.listView.focus(e)
                    },
                    current: function(e) {
                        return this._focus(e)
                    },
                    items: function() {
                        return this.ul[0].children
                    },
                    destroy: function() {
                        var e = this,
                            t = e.ns;
                        c.fn.destroy.call(e), e._unbindDataSource(), e.listView.destroy(), e.list.off(t), e.popup.destroy(), e._form && e._form.off("reset", e._resetHandler)
                    },
                    dataItem: function(n) {
                        var i = this;
                        if (n === t) return i.listView.selectedDataItems()[0];
                        if ("number" != typeof n) {
                            if (i.options.virtual) return i.dataSource.getByUid(e(n).data("uid"));
                            n = e(i.items()).index(n)
                        }
                        return i.dataSource.flatView()[n]
                    },
                    _activateItem: function() {
                        var e = this.listView.focus();
                        e && this._focused.add(this.filterInput).attr("aria-activedescendant", e.attr("id"))
                    },
                    _deactivateItem: function() {
                        this._focused.add(this.filterInput).removeAttr("aria-activedescendant")
                    },
                    _accessors: function() {
                        var e = this,
                            t = e.element,
                            n = e.options,
                            i = s.getter,
                            r = t.attr(s.attr("text-field")),
                            o = t.attr(s.attr("value-field"));
                        !n.dataTextField && r && (n.dataTextField = r), !n.dataValueField && o && (n.dataValueField = o), e._text = i(n.dataTextField), e._value = i(n.dataValueField)
                    },
                    _aria: function(e) {
                        var n = this,
                            i = n.options,
                            r = n._focused.add(n.filterInput);
                        i.suggest !== t && r.attr("aria-autocomplete", i.suggest ? "both" : "list"), e = e ? e + " " + n.ul[0].id : n.ul[0].id, r.attr("aria-owns", e), n.ul.attr("aria-live", n._isFilterEnabled() ? "polite" : "off")
                    },
                    _blur: function() {
                        var e = this;
                        e._change(), e.close()
                    },
                    _change: function() {
                        var e, i = this,
                            r = i.selectedIndex,
                            o = i.options.value,
                            a = i.value();
                        i._isSelect && !i.listView.bound() && o && (a = o), a !== n(i._old, typeof a) ? e = !0 : r !== t && r !== i._oldIndex && (e = !0), e && (i._old = a, i._oldIndex = r, i._typing || i.element.trigger(g), i.trigger(g)), i.typing = !1
                    },
                    _data: function() {
                        return this.dataSource.view()
                    },
                    _enable: function() {
                        var e = this,
                            n = e.options,
                            i = e.element.is("[disabled]");
                        n.enable !== t && (n.enabled = n.enable), !n.enabled || i ? e.enable(!1) : e.readonly(e.element.is("[readonly]"))
                    },
                    _dataValue: function(e) {
                        var n = this._value(e);
                        return n === t && (n = this._text(e)), n
                    },
                    _offsetHeight: function() {
                        var t = 0,
                            n = this.listView.content.prevAll(":visible");
                        return n.each(function() {
                            var n = e(this);
                            t += n.hasClass("k-list-filter") ? n.children().outerHeight() : n.outerHeight()
                        }), t
                    },
                    _height: function(e) {
                        var n, i, r = this,
                            o = r.list,
                            a = r.options.height,
                            s = r.popup.visible();
                        if (e) {
                            if (i = o.add(o.parent(".k-animation-container")).show(), !o.is(":visible")) return i.hide(), t;
                            a = r.listView.content[0].scrollHeight > a ? a : "auto", i.height(a), "auto" !== a && (n = r._offsetHeight(), n && (a -= n)), r.listView.content.height(a), s || i.hide()
                        }
                        return a
                    },
                    _adjustListWidth: function() {
                        var e, t, n = this.list,
                            i = n[0].style.width,
                            r = this.wrapper;
                        if (n.data(D) || !i) return e = window.getComputedStyle ? window.getComputedStyle(r[0], null) : 0, t = parseFloat(e && e.width) || r.outerWidth(), e && I.msie && (t += parseFloat(e.paddingLeft) + parseFloat(e.paddingRight) + parseFloat(e.borderLeftWidth) + parseFloat(e.borderRightWidth)), i = "border-box" !== n.css("box-sizing") ? t - (n.outerWidth() - n.width()) : t, n.css({
                            fontFamily: r.css("font-family"),
                            width: i
                        }).data(D, i), !0
                    },
                    _openHandler: function(e) {
                        this._adjustListWidth(), this.trigger(w) ? e.preventDefault() : (this._focused.attr("aria-expanded", !0), this.ul.attr("aria-hidden", !1))
                    },
                    _closeHandler: function(e) {
                        this.trigger(y) ? e.preventDefault() : (this._focused.attr("aria-expanded", !1), this.ul.attr("aria-hidden", !0))
                    },
                    _focusItem: function() {
                        var e = this.listView,
                            n = e.focus(),
                            i = e.select();
                        i = i[i.length - 1], i === t && this.options.highlightFirst && !n && (i = 0), i !== t ? e.focus(i) : e.scrollToIndex(0)
                    },
                    _calculateGroupPadding: function(e) {
                        var t = this.ul.children(".k-first:first"),
                            n = this.listView.content.prev(".k-group-header"),
                            i = 0;
                        n[0] && "none" !== n[0].style.display && ("auto" !== e && (i = s.support.scrollbar()), i += parseFloat(t.css("border-right-width"), 10) + parseFloat(t.children(".k-group").css("padding-right"), 10), n.css("padding-right", i))
                    },
                    _calculatePopupHeight: function(e) {
                        var t = this._height(this.dataSource.flatView().length || e);
                        this._calculateGroupPadding(t)
                    },
                    _resizePopup: function(e) {
                        this.options.virtual || (this.popup.element.is(":visible") ? this._calculatePopupHeight(e) : this.popup.one("open", function(e) {
                            return E(function() {
                                this._calculatePopupHeight(e)
                            }, this)
                        }.call(this, e)))
                    },
                    _popup: function() {
                        var e = this;
                        e.popup = new l.Popup(e.list, A({}, e.options.popup, {
                            anchor: e.wrapper,
                            open: E(e._openHandler, e),
                            close: E(e._closeHandler, e),
                            animation: e.options.animation,
                            isRtl: u.isRtl(e.wrapper)
                        }))
                    },
                    _makeUnselectable: function() {
                        M && this.list.find("*").not(".k-textbox").attr("unselectable", "on")
                    },
                    _toggleHover: function(t) {
                        e(t.currentTarget).toggleClass(_, "mouseenter" === t.type)
                    },
                    _toggle: function(e, n) {
                        var i = this,
                            r = u.mobileOS && (u.touch || u.MSPointers || u.pointers);
                        e = e !== t ? e : !i.popup.visible(), n || r || i._focused[0] === f() || (i._prevent = !0, i._focused.focus(), i._prevent = !1), i[e ? w : y]()
                    },
                    _triggerCascade: function() {
                        var e = this;
                        e._cascadeTriggered && e._old === e.value() && e._oldIndex === e.selectedIndex || (e._cascadeTriggered = !0, e.trigger(k, {
                            userTriggered: e._userTriggered
                        }))
                    },
                    _triggerChange: function() {
                        this._valueBeforeCascade !== this.value() && this.trigger(g)
                    },
                    _unbindDataSource: function() {
                        var e = this;
                        e.dataSource.unbind(S, e._requestStartHandler).unbind(T, e._requestEndHandler).unbind("error", e._errorHandler)
                    }
                });
            A(z, {
                inArray: function(e, t) {
                    var n, i, r = t.children;
                    if (!e || e.parentNode !== t) return -1;
                    for (n = 0, i = r.length; i > n; n++)
                        if (e === r[n]) return n;
                    return -1
                },
                unifyType: n
            }), s.ui.List = z, l.Select = z.extend({
                init: function(e, t) {
                    z.fn.init.call(this, e, t), this._initial = this.element.val()
                },
                setDataSource: function(e) {
                    var t, n = this;
                    n.options.dataSource = e, n._dataSource(), n.listView.bound() && (n._initialIndex = null), n.listView.setDataSource(n.dataSource), n.options.autoBind && n.dataSource.fetch(), t = n._parentWidget(), t && n._cascadeSelect(t)
                },
                close: function() {
                    this.popup.close()
                },
                select: function(e) {
                    var n = this;
                    return e === t ? n.selectedIndex : (n._select(e), n._old = n._accessor(), n._oldIndex = n.selectedIndex, t)
                },
                search: function(e) {
                    var t, n, i, r, o;
                    e = "string" == typeof e ? e : this.text(), t = this, n = e.length, i = t.options, r = i.ignoreCase, o = i.dataTextField, clearTimeout(t._typingTimeout), (!n || n >= i.minLength) && (t._state = "filter", t._isFilterEnabled() ? (t._open = !0, t._filterSource({
                        value: r ? e.toLowerCase() : e,
                        field: o,
                        operator: i.filter,
                        ignoreCase: r
                    })) : t._filter(e))
                },
                _accessor: function(e, t) {
                    return this[this._isSelect ? "_accessorSelect" : "_accessorInput"](e, t)
                },
                _accessorInput: function(e) {
                    var n = this.element[0];
                    return e === t ? n.value : (null === e && (e = ""), n.value = e, t)
                },
                _accessorSelect: function(e, n) {
                    var i, r = this.element[0],
                        o = r.selectedIndex;
                    return e === t ? (o > -1 && (i = r.options[o]), i && (e = i.value), e || "") : (o > -1 && (r.options[o].removeAttribute(C), r.options[o].selected = !1), n === t && (n = -1), null !== e && "" !== e && -1 == n ? this._custom(e) : (e ? r.value = e : r.selectedIndex = n, r.selectedIndex > -1 && (i = r.options[r.selectedIndex]), i && i.setAttribute(C, C)), t)
                },
                _custom: function(t) {
                    var n = this,
                        i = n.element,
                        r = n._customOption;
                    r || (r = e("<option/>"), n._customOption = r, i.append(r)), r.text(t), r[0].setAttribute(C, C), r[0].selected = !0
                },
                _hideBusy: function() {
                    var e = this;
                    clearTimeout(e._busy), e._arrow.removeClass(b), e._focused.attr("aria-busy", !1), e._busy = null
                },
                _showBusy: function() {
                    var e = this;
                    e._request = !0, e._busy || (e._busy = setTimeout(function() {
                        e._arrow && (e._focused.attr("aria-busy", !0), e._arrow.addClass(b))
                    }, 100))
                },
                _requestEnd: function() {
                    this._request = !1, this._hideBusy()
                },
                _dataSource: function() {
                    var t, n = this,
                        i = n.element,
                        r = n.options,
                        o = r.dataSource || {};
                    o = e.isArray(o) ? {
                        data: o
                    } : o, n._isSelect && (t = i[0].selectedIndex, t > -1 && (r.index = t), o.select = i, o.fields = [{
                        field: r.dataTextField
                    }, {
                        field: r.dataValueField
                    }]), n.dataSource ? n._unbindDataSource() : (n._requestStartHandler = E(n._showBusy, n), n._requestEndHandler = E(n._requestEnd, n), n._errorHandler = E(n._hideBusy, n)), n.dataSource = s.data.DataSource.create(o).bind(S, n._requestStartHandler).bind(T, n._requestEndHandler).bind("error", n._errorHandler)
                },
                _firstItem: function() {
                    this.listView.focusFirst()
                },
                _lastItem: function() {
                    this.listView.focusLast()
                },
                _nextItem: function() {
                    this.listView.focusNext()
                },
                _prevItem: function() {
                    this.listView.focusPrev()
                },
                _move: function(e) {
                    var n, i, r, o, a = this,
                        s = e.keyCode,
                        l = s === d.DOWN;
                    if (s === d.UP || l) {
                        if (e.altKey) a.toggle(l);
                        else {
                            if (!a.listView.bound()) return a._fetch || (a.dataSource.one(g, function() {
                                a._fetch = !1, a._move(e)
                            }), a._fetch = !0, a._filterSource()), e.preventDefault(), !0;
                            if (r = a._focus(), a._fetch || r && !r.hasClass("k-state-selected") || (l ? (a._nextItem(), a._focus() || a._lastItem()) : (a._prevItem(), a._focus() || a._firstItem())), a.trigger(x, {
                                item: a._focus()
                            })) return a._focus(r), t;
                            a._select(a._focus(), !0), a.popup.visible() || a._blur()
                        }
                        e.preventDefault(), i = !0
                    } else if (s === d.ENTER || s === d.TAB) {
                        if (a.popup.visible() && e.preventDefault(), r = a._focus(), n = a.dataItem(), a.popup.visible() || n && a.text() === a._text(n) || (r = null), o = a.filterInput && a.filterInput[0] === f(), r) {
                            if (a.trigger(x, {
                                item: r
                            })) return;
                            a._select(r)
                        } else a.input && (a._accessor(a.input.val()), a.listView.value(a.input.val()));
                        a._focusElement && a._focusElement(a.wrapper), o && s === d.TAB ? a.wrapper.focusout() : a._blur(), a.close(), i = !0
                    } else s === d.ESC && (a.popup.visible() && e.preventDefault(), a.close(), i = !0);
                    return i
                },
                _fetchData: function() {
                    var e = this,
                        t = !!e.dataSource.view().length;
                    e._request || e.options.cascadeFrom || e.listView.bound() || e._fetch || t || (e._fetch = !0, e.dataSource.fetch().done(function() {
                        e._fetch = !1
                    }))
                },
                _options: function(e, n, i) {
                    var r, o, a, s, l = this,
                        c = l.element,
                        d = e.length,
                        u = "",
                        f = 0;
                    for (n && (u = n); d > f; f++) r = "<option", o = e[f], a = l._text(o), s = l._value(o), s !== t && (s += "", -1 !== s.indexOf('"') && (s = s.replace(R, "&quot;")), r += ' value="' + s + '"'), r += ">", a !== t && (r += h(a)), r += "</option>", u += r;
                    c.html(u), i !== t && (c[0].value = i, c[0].value && !i && (c[0].selectedIndex = -1))
                },
                _reset: function() {
                    var t = this,
                        n = t.element,
                        i = n.attr("form"),
                        r = i ? e("#" + i) : n.closest("form");
                    r[0] && (t._resetHandler = function() {
                        setTimeout(function() {
                            t.value(t._initial)
                        })
                    }, t._form = r.on("reset", t._resetHandler))
                },
                _parentWidget: function() {
                    var t = this.options.name,
                        n = e("#" + this.options.cascadeFrom),
                        i = n.data("kendo" + t);
                    return i || (i = n.data("kendo" + P[t])), i
                },
                _cascade: function() {
                    var e, t = this,
                        n = t.options,
                        i = n.cascadeFrom;
                    if (i) {
                        if (e = t._parentWidget(), t._cascadeHandlerProxy = E(t._cascadeHandler, t), !e) return;
                        n.autoBind = !1, e.bind("set", function() {
                            t.one("set", function(e) {
                                t._selectedValue = e.value
                            })
                        }), e.first(k, t._cascadeHandlerProxy), e.listView.bound() ? (t._toggleCascadeOnFocus(), t._cascadeSelect(e)) : (e.one("dataBound", function() {
                            t._toggleCascadeOnFocus()
                        }), e.value() || t.enable(!1))
                    }
                },
                _toggleCascadeOnFocus: function() {
                    var e = this,
                        t = e._parentWidget();
                    t._focused.bind("focus", function() {
                        t.unbind(k, e._cascadeHandlerProxy), t.first(g, e._cascadeHandlerProxy)
                    }), t._focused.bind("focusout", function() {
                        t.unbind(g, e._cascadeHandlerProxy), t.first(k, e._cascadeHandlerProxy)
                    })
                },
                _cascadeHandler: function(e) {
                    var t = this._parentWidget(),
                        n = this.value();
                    this._userTriggered = e.userTriggered, this.listView.bound() && this._clearSelection(t, !0), this._cascadeSelect(t, n)
                },
                _cascadeChange: function(e) {
                    var t = this,
                        n = t._accessor() || t._selectedValue;
                    t._selectedValue = null, t._userTriggered ? t._clearSelection(e, !0) : n ? (n !== t.listView.value()[0] && t.value(n), t.dataSource.view()[0] && -1 !== t.selectedIndex || t._clearSelection(e, !0)) : t.dataSource.flatView().length && t.select(t.options.index), t.enable(), t._triggerCascade(), t._triggerChange(), t._userTriggered = !1
                },
                _cascadeSelect: function(e, n) {
                    var i, o, a = this,
                        s = e.dataItem(),
                        l = s ? e._value(s) : null,
                        c = a.options.cascadeFromField || e.options.dataValueField;
                    a._valueBeforeCascade = n !== t ? n : a.value(), l || 0 === l ? (i = a.dataSource.filter() || {}, r(i, c), o = function() {
                        a.unbind("dataBound", o), a._cascadeChange(e)
                    }, a.first("dataBound", o), a._cascading = !0, a._filterSource({
                        field: c,
                        operator: "eq",
                        value: l
                    }), a._cascading = !1) : (a.enable(!1), a._clearSelection(e), a._triggerCascade(), a._triggerChange(), a._userTriggered = !1)
                }
            }), o = ".StaticList", a = s.ui.DataBoundWidget.extend({
                init: function(t, n) {
                    c.fn.init.call(this, t, n), this.element.attr("role", "listbox").on("click" + o, "li", E(this._click, this)).on("mouseenter" + o, "li", function() {
                        e(this).addClass(_)
                    }).on("mouseleave" + o, "li", function() {
                        e(this).removeClass(_)
                    }), this.content = this.element.wrap("<div class='k-list-scroller' unselectable='on'></div>").parent(), this.header = this.content.before('<div class="k-group-header" style="display:none"></div>').prev(), this.bound(!1), this._optionID = s.guid(), this._selectedIndices = [], this._view = [], this._dataItems = [], this._values = [];
                    var i = this.options.value;
                    i && (this._values = e.isArray(i) ? i.slice(0) : [i]), this._getter(), this._templates(), this.setDataSource(this.options.dataSource), this._onScroll = E(function() {
                        var e = this;
                        clearTimeout(e._scrollId), e._scrollId = setTimeout(function() {
                            e._renderHeader()
                        }, 50)
                    }, this)
                },
                options: {
                    name: "StaticList",
                    dataValueField: null,
                    valuePrimitive: !1,
                    selectable: !0,
                    template: null,
                    groupTemplate: null,
                    fixedGroupTemplate: null
                },
                events: ["click", g, "activate", "deactivate", "dataBinding", "dataBound", "selectedItemChange"],
                setDataSource: function(t) {
                    var n, i = this,
                        r = t || {};
                    r = e.isArray(r) ? {
                        data: r
                    } : r, r = s.data.DataSource.create(r), i.dataSource ? (i.dataSource.unbind(g, i._refreshHandler), n = i.value(), i.value([]), i.bound(!1), i.value(n)) : i._refreshHandler = E(i.refresh, i), i.setDSFilter(r.filter()), i.dataSource = r.bind(g, i._refreshHandler), i._fixedHeader()
                },
                skip: function() {
                    return this.dataSource.skip()
                },
                setOptions: function(e) {
                    c.fn.setOptions.call(this, e), this._getter(), this._templates(), this._render()
                },
                destroy: function() {
                    this.element.off(o), this._refreshHandler && this.dataSource.unbind(g, this._refreshHandler), clearTimeout(this._scrollId), c.fn.destroy.call(this)
                },
                scrollToIndex: function(e) {
                    var t = this.element[0].children[e];
                    t && this.scroll(t)
                },
                scroll: function(e) {
                    if (e) {
                        e[0] && (e = e[0]);
                        var t = this.content[0],
                            n = e.offsetTop,
                            i = e.offsetHeight,
                            r = t.scrollTop,
                            o = t.clientHeight,
                            a = n + i;
                        r > n ? r = n : a > r + o && (r = a - o), t.scrollTop = r
                    }
                },
                selectedDataItems: function(e) {
                    return e === t ? this._dataItems.slice() : (this._dataItems = e, this._values = this._getValues(e), t)
                },
                _getValues: function(t) {
                    var n = this._valueGetter;
                    return e.map(t, function(e) {
                        return n(e)
                    })
                },
                focusNext: function() {
                    var e = this.focus();
                    e = e ? e.next() : 0, this.focus(e)
                },
                focusPrev: function() {
                    var e = this.focus();
                    e = e ? e.prev() : this.element[0].children.length - 1, this.focus(e)
                },
                focusFirst: function() {
                    this.focus(this.element[0].children[0])
                },
                focusLast: function() {
                    this.focus(this.element[0].children[this.element[0].children.length - 1])
                },
                focus: function(n) {
                    var i, r = this,
                        o = r._optionID;
                    return n === t ? r._current : (n = r._get(n), n = n[n.length - 1], n = e(this.element[0].children[n]), r._current && (r._current.removeClass(v).removeAttr("aria-selected").removeAttr(m), r.trigger("deactivate")), i = !!n[0], i && (n.addClass(v), r.scroll(n), n.attr("id", o)), r._current = i ? n : null, r.trigger("activate"), t)
                },
                focusIndex: function() {
                    return this.focus() ? this.focus().index() : t
                },
                skipUpdate: function(e) {
                    this._skipUpdate = e
                },
                select: function(n) {
                    var i, r, o = this,
                        a = o.options.selectable,
                        s = "multiple" !== a && a !== !1,
                        l = o._selectedIndices,
                        c = [],
                        d = [];
                    if (n === t) return l.slice();
                    if (n = o._get(n), 1 === n.length && -1 === n[0] && (n = []), r = o.isFiltered(), !r || s || !o._deselectFiltered(n)) {
                        if (s && !r && -1 !== e.inArray(n[n.length - 1], l)) return o._dataItems.length && o._view.length && (o._dataItems = [o._view[l[0]].item]), t;
                        i = o._deselect(n), d = i.removed, n = i.indices, n.length && (s && (n = [n[n.length - 1]]), c = o._select(n)), (c.length || d.length) && (o._valueComparer = null, o.trigger(g, {
                            added: c,
                            removed: d
                        }))
                    }
                },
                removeAt: function(e) {
                    return this._selectedIndices.splice(e, 1), this._values.splice(e, 1), this._valueComparer = null, {
                        position: e,
                        dataItem: this._dataItems.splice(e, 1)[0]
                    }
                },
                setValue: function(t) {
                    t = e.isArray(t) || t instanceof p ? t.slice(0) : [t], this._values = t, this._valueComparer = null
                },
                value: function(n) {
                    var i, r = this,
                        o = r._valueDeferred;
                    return n === t ? r._values.slice() : (r.setValue(n), o && "resolved" !== o.state() || (r._valueDeferred = o = e.Deferred()), r.bound() && (i = r._valueIndices(r._values), "multiple" === r.options.selectable && r.select(-1), r.select(i), o.resolve()), r._skipUpdate = !1, o)
                },
                items: function() {
                    return this.element.children(".k-item")
                },
                _click: function(t) {
                    t.isDefaultPrevented() || this.trigger("click", {
                        item: e(t.currentTarget)
                    }) || this.select(t.currentTarget)
                },
                _valueExpr: function(e, t) {
                    var i, r, o = this,
                        a = 0,
                        s = [];
                    if (!o._valueComparer || o._valueType !== e) {
                        for (o._valueType = e; t.length > a; a++) s.push(n(t[a], e));
                        i = "for (var idx = 0; idx < " + s.length + "; idx++) { if (current === values[idx]) {   return idx; }} return -1;", r = Function("current", "values", i), o._valueComparer = function(e) {
                            return r(e, s)
                        }
                    }
                    return o._valueComparer
                },
                _dataItemPosition: function(e, t) {
                    var n = this._valueGetter(e),
                        i = this._valueExpr(typeof n, t);
                    return i(n)
                },
                _getter: function() {
                    this._valueGetter = s.getter(this.options.dataValueField)
                },
                _deselect: function(t) {
                    var n, i, r, o = this,
                        a = o.element[0].children,
                        s = o.options.selectable,
                        l = o._selectedIndices,
                        c = o._dataItems,
                        d = o._values,
                        u = [],
                        h = 0,
                        f = 0;
                    if (t = t.slice(), s !== !0 && t.length) {
                        if ("multiple" === s)
                            for (; t.length > h; h++)
                                if (i = t[h], e(a[i]).hasClass("k-state-selected"))
                                    for (n = 0; l.length > n; n++)
                                        if (r = l[n], r === i) {
                                            e(a[r]).removeClass("k-state-selected"), u.push({
                                                position: n + f,
                                                dataItem: c.splice(n, 1)[0]
                                            }), l.splice(n, 1), t.splice(h, 1), d.splice(n, 1), f += 1, h -= 1, n -= 1;
                                            break
                                        }
                    } else {
                        for (; l.length > h; h++) e(a[l[h]]).removeClass("k-state-selected"), u.push({
                            position: h,
                            dataItem: c[h]
                        });
                        o._values = [], o._dataItems = [], o._selectedIndices = []
                    }
                    return {
                        indices: t,
                        removed: u
                    }
                },
                _deselectFiltered: function(t) {
                    for (var n, i, r, o = this.element[0].children, a = [], s = 0; t.length > s; s++) i = t[s], n = this._view[i].item, r = this._dataItemPosition(n, this._values), r > -1 && (a.push(this.removeAt(r)), e(o[i]).removeClass("k-state-selected"));
                    return a.length ? (this.trigger(g, {
                        added: [],
                        removed: a
                    }), !0) : !1
                },
                _select: function(t) {
                    var n, i, r = this,
                        o = r.element[0].children,
                        a = r._view,
                        s = [],
                        l = 0;
                    for (-1 !== t[t.length - 1] && r.focus(t); t.length > l; l++) i = t[l], n = a[i], -1 !== i && n && (n = n.item, r._selectedIndices.push(i), r._dataItems.push(n), r._values.push(r._valueGetter(n)), e(o[i]).addClass("k-state-selected").attr("aria-selected", !0), s.push({
                        dataItem: n
                    }));
                    return s
                },
                _get: function(n) {
                    return "number" == typeof n ? n = [n] : F(n) || (n = e(n).data("offset-index"), n === t && (n = -1), n = [n]), n
                },
                _template: function() {
                    var e = this,
                        t = e.options,
                        n = t.template;
                    return n ? (n = s.template(n), n = function(e) {
                        return '<li tabindex="-1" role="option" unselectable="on" class="k-item">' + n(e) + "</li>"
                    }) : n = s.template('<li tabindex="-1" role="option" unselectable="on" class="k-item">${' + s.expr(t.dataTextField, "data") + "}</li>", {
                        useWithBlock: !1
                    }), n
                },
                _templates: function() {
                    var e, t, n = {
                        template: this.options.template,
                        groupTemplate: this.options.groupTemplate,
                        fixedGroupTemplate: this.options.fixedGroupTemplate
                    };
                    for (t in n) e = n[t], e && "function" != typeof e && (n[t] = s.template(e));
                    this.templates = n
                },
                _normalizeIndices: function(e) {
                    for (var n = [], i = 0; e.length > i; i++) e[i] !== t && n.push(e[i]);
                    return n
                },
                _valueIndices: function(e, t) {
                    var n, i = this._view,
                        r = 0;
                    if (t = t ? t.slice() : [], !e.length) return [];
                    for (; i.length > r; r++) n = this._dataItemPosition(i[r].item, e), -1 !== n && (t[n] = r);
                    return this._normalizeIndices(t)
                },
                _firstVisibleItem: function() {
                    for (var t = this.element[0], n = this.content[0], i = n.scrollTop, r = e(t.children[0]).height(), o = Math.floor(i / r) || 0, a = t.children[o] || t.lastChild, s = i > a.offsetTop; a;)
                        if (s) {
                            if (a.offsetTop + r > i || !a.nextSibling) break;
                            a = a.nextSibling
                        } else {
                            if (i >= a.offsetTop || !a.previousSibling) break;
                            a = a.previousSibling
                        } return this._view[e(a).data("offset-index")]
                },
                _fixedHeader: function() {
                    this.isGrouped() && this.templates.fixedGroupTemplate ? (this.header.show(), this.content.scroll(this._onScroll)) : (this.header.hide(), this.content.off("scroll", this._onScroll))
                },
                _renderHeader: function() {
                    var e, t = this.templates.fixedGroupTemplate;
                    t && (e = this._firstVisibleItem(), e && this.header.html(t(e.group)))
                },
                _renderItem: function(e) {
                    var t = '<li tabindex="-1" role="option" unselectable="on" class="k-item',
                        n = e.item,
                        i = 0 !== e.index,
                        r = e.selected;
                    return i && e.newGroup && (t += " k-first"), r && (t += " k-state-selected"), t += '"' + (r ? ' aria-selected="true"' : "") + ' data-offset-index="' + e.index + '">', t += this.templates.template(n), i && e.newGroup && (t += '<div class="k-group">' + this.templates.groupTemplate(e.group) + "</div>"), t + "</li>"
                },
                _render: function() {
                    var e, t, n, i, r = "",
                        o = 0,
                        a = 0,
                        s = [],
                        l = this.dataSource.view(),
                        c = this.value(),
                        d = this.isGrouped();
                    if (d)
                        for (o = 0; l.length > o; o++)
                            for (t = l[o], n = !0, i = 0; t.items.length > i; i++) e = {
                                selected: this._selected(t.items[i], c),
                                item: t.items[i],
                                group: t.value,
                                newGroup: n,
                                index: a
                            }, s[a] = e, a += 1, r += this._renderItem(e), n = !1;
                    else
                        for (o = 0; l.length > o; o++) e = {
                            selected: this._selected(l[o], c),
                            item: l[o],
                            index: o
                        }, s[o] = e, r += this._renderItem(e);
                    this._view = s, this.element[0].innerHTML = r, d && s.length && this._renderHeader()
                },
                _selected: function(e, t) {
                    var n = !this.isFiltered() || "multiple" === this.options.selectable;
                    return n && -1 !== this._dataItemPosition(e, t)
                },
                setDSFilter: function(e) {
                    this._lastDSFilter = A({}, e)
                },
                isFiltered: function() {
                    return this._lastDSFilter || this.setDSFilter(this.dataSource.filter()), !s.data.Query.compareFilters(this.dataSource.filter(), this._lastDSFilter)
                },
                refresh: function(e) {
                    var t, n = this,
                        r = e && e.action,
                        o = n.options.skipUpdateOnBind,
                        a = "itemchange" === r;
                    n.trigger("dataBinding"), n._fixedHeader(), n._render(), n.bound(!0), a || "remove" === r ? (t = i(n._dataItems, e.items), t.changed.length && (a ? n.trigger("selectedItemChange", {
                        items: t.changed
                    }) : n.value(n._getValues(t.unchanged)))) : n.isFiltered() || n._skipUpdate ? (n.focus(0), n._skipUpdate && (n._skipUpdate = !1, n._selectedIndices = n._valueIndices(n._values, n._selectedIndices))) : o || r && "add" !== r || n.value(n._values), n._valueDeferred && n._valueDeferred.resolve(), n.trigger("dataBound")
                },
                bound: function(e) {
                    return e === t ? this._bound : (this._bound = e, t)
                },
                isGrouped: function() {
                    return (this.dataSource.group() || []).length
                }
            }), l.plugin(a)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.calendar.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t, n, i) {
                var r, o = e.getFullYear(),
                    a = t.getFullYear(),
                    s = n.getFullYear();
                return o -= o % i, r = o + (i - 1), a > o && (o = a), r > s && (r = s), o + "-" + r
            }

            function i(e) {
                for (var t, n = 0, i = e.min, r = e.max, o = e.start, a = e.setter, l = e.build, c = e.cells || 12, d = e.perRow || 4, u = e.content || z, h = e.empty || B, f = e.html || '<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><tbody><tr role="row">'; c > n; n++) n > 0 && n % d === 0 && (f += '</tr><tr role="row">'), o = new _e(o.getFullYear(), o.getMonth(), o.getDate(), 0, 0, 0), E(o, 0), t = l(o, n, e.disableDates), f += s(o, i, r) ? u(t) : h(t), a(o, 1);
                return f + "</tr></tbody></table>"
            }

            function r(e, t, n) {
                var i = e.getFullYear(),
                    r = t.getFullYear(),
                    o = r,
                    a = 0;
                return n && (r -= r % n, o = r - r % n + n - 1), i > o ? a = 1 : r > i && (a = -1), a
            }

            function o() {
                var e = new _e;
                return new _e(e.getFullYear(), e.getMonth(), e.getDate())
            }

            function a(e, t, n) {
                var i = o();
                return e && (i = new _e(+e)), t > i ? i = new _e(+t) : i > n && (i = new _e(+n)), i
            }

            function s(e, t, n) {
                return +e >= +t && +n >= +e
            }

            function l(e, t) {
                return e.slice(t).concat(e.slice(0, t))
            }

            function c(e, t, n) {
                t = t instanceof _e ? t.getFullYear() : e.getFullYear() + n * t, e.setFullYear(t)
            }

            function d(t) {
                var n = e(this).hasClass("k-state-disabled");
                n || e(this).toggleClass(X, se.indexOf(t.type) > -1 || t.type == oe)
            }

            function u(e) {
                e.preventDefault()
            }

            function h(e) {
                return M(e).calendars.standard
            }

            function f(e) {
                var n = be[e.start],
                    i = be[e.depth],
                    r = M(e.culture);
                e.format = F(e.format || r.calendars.standard.patterns.d), isNaN(n) && (n = 0, e.start = G), (i === t || i > n) && (e.depth = G), e.dates || (e.dates = [])
            }

            function p(e) {
                H && e.find("*").attr("unselectable", "on")
            }

            function m(e, t) {
                for (var n = 0, i = t.length; i > n; n++)
                    if (e === +t[n]) return !0;
                return !1
            }

            function g(e, t) {
                return e ? e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate() : !1
            }

            function v(e, t) {
                return e ? e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() : !1
            }

            function _(t) {
                return x.isFunction(t) ? t : e.isArray(t) ? w(t) : e.noop
            }

            function b(e) {
                var t, n = [];
                for (t = 0; e.length > t; t++) n.push(e[t].setHours(0, 0, 0, 0));
                return n
            }

            function w(t) {
                var n, i, r, o, a, s = [],
                    l = ["su", "mo", "tu", "we", "th", "fr", "sa"],
                    c = "if (found) { return true } else {return false}";
                if (t[0] instanceof _e) s = b(t), n = "var found = date && $.inArray(date.setHours(0, 0, 0, 0),[" + s + "]) > -1;" + c;
                else {
                    for (r = 0; t.length > r; r++) o = t[r].slice(0, 2).toLowerCase(), a = e.inArray(o, l), a > -1 && s.push(a);
                    n = "var found = date && $.inArray(date.getDay(),[" + s + "]) > -1;" + c
                }
                return i = Function("date", n)
            }

            function y(e, t) {
                return e instanceof Date && t instanceof Date && (e = e.getTime(), t = t.getTime()), e === t
            }
            var k, x = window.kendo,
                C = x.support,
                S = x.ui,
                T = S.Widget,
                D = x.keys,
                A = x.parseDate,
                E = x.date.adjustDST,
                F = x._extractFormat,
                I = x.template,
                M = x.getCulture,
                R = x.support.transitions,
                P = R ? R.css + "transform-origin" : "",
                z = I('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>', {
                    useWithBlock: !1
                }),
                B = I('<td role="gridcell">&nbsp;</td>', {
                    useWithBlock: !1
                }),
                L = x.support.browser,
                H = L.msie && 9 > L.version,
                N = ".kendoCalendar",
                O = "click" + N,
                V = "keydown" + N,
                U = "id",
                W = "min",
                j = "left",
                q = "slideIn",
                G = "month",
                $ = "century",
                Y = "change",
                K = "navigate",
                Q = "value",
                X = "k-state-hover",
                J = "k-state-disabled",
                Z = "k-state-focused",
                ee = "k-other-month",
                te = ' class="' + ee + '"',
                ne = "k-nav-today",
                ie = "td:has(.k-link)",
                re = "blur" + N,
                oe = "focus",
                ae = oe + N,
                se = C.touch ? "touchstart" : "mouseenter",
                le = C.touch ? "touchstart" + N : "mouseenter" + N,
                ce = C.touch ? "touchend" + N + " touchmove" + N : "mouseleave" + N,
                de = 6e4,
                ue = 864e5,
                he = "_prevArrow",
                fe = "_nextArrow",
                pe = "aria-disabled",
                me = "aria-selected",
                ge = e.proxy,
                ve = e.extend,
                _e = Date,
                be = {
                    month: 0,
                    year: 1,
                    decade: 2,
                    century: 3
                },
                we = T.extend({
                    init: function(t, n) {
                        var i, r, s = this;
                        T.fn.init.call(s, t, n), t = s.wrapper = s.element, n = s.options, n.url = window.unescape(n.url), s.options.disableDates = _(s.options.disableDates), s._templates(), s._header(), s._footer(s.footer), r = t.addClass("k-widget k-calendar").on(le + " " + ce, ie, d).on(V, "table.k-content", ge(s._move, s)).on(O, ie, function(t) {
                            var n = t.currentTarget.firstChild,
                                i = s._toDateObject(n); - 1 != n.href.indexOf("#") && t.preventDefault(), s.options.disableDates(i) && "month" == s._view.name || s._click(e(n))
                        }).on("mouseup" + N, "table.k-content, .k-footer", function() {
                            s._focusView(s.options.focusOnNav !== !1)
                        }).attr(U), r && (s._cellID = r + "_cell_selected"), f(n), i = A(n.value, n.format, n.culture), s._index = be[n.start], s._current = new _e(+a(i, n.min, n.max)), s._addClassProxy = function() {
                            if (s._active = !0, s._cell.hasClass(J)) {
                                var e = s._view.toDateString(o());
                                s._cell = s._cellByDate(e)
                            }
                            s._cell.addClass(Z)
                        }, s._removeClassProxy = function() {
                            s._active = !1, s._cell.removeClass(Z)
                        }, s.value(i), x.notify(s)
                    },
                    options: {
                        name: "Calendar",
                        value: null,
                        min: new _e(1900, 0, 1),
                        max: new _e(2099, 11, 31),
                        dates: [],
                        url: "",
                        culture: "",
                        footer: "",
                        format: "",
                        month: {},
                        start: G,
                        depth: G,
                        animation: {
                            horizontal: {
                                effects: q,
                                reverse: !0,
                                duration: 500,
                                divisor: 2
                            },
                            vertical: {
                                effects: "zoomIn",
                                duration: 400
                            }
                        }
                    },
                    events: [Y, K],
                    setOptions: function(e) {
                        var t = this;
                        f(e), e.dates[0] || (e.dates = t.options.dates), e.disableDates = _(e.disableDates), T.fn.setOptions.call(t, e), t._templates(), t._footer(t.footer), t._index = be[t.options.start], t.navigate()
                    },
                    destroy: function() {
                        var e = this,
                            t = e._today;
                        e.element.off(N), e._title.off(N), e[he].off(N), e[fe].off(N), x.destroy(e._table), t && x.destroy(t.off(N)), T.fn.destroy.call(e)
                    },
                    current: function() {
                        return this._current
                    },
                    view: function() {
                        return this._view
                    },
                    focus: function(e) {
                        e = e || this._table, this._bindTable(e), e.focus()
                    },
                    min: function(e) {
                        return this._option(W, e)
                    },
                    max: function(e) {
                        return this._option("max", e)
                    },
                    navigateToPast: function() {
                        this._navigate(he, -1)
                    },
                    navigateToFuture: function() {
                        this._navigate(fe, 1)
                    },
                    navigateUp: function() {
                        var e = this,
                            t = e._index;
                        e._title.hasClass(J) || e.navigate(e._current, ++t)
                    },
                    navigateDown: function(e) {
                        var n = this,
                            i = n._index,
                            r = n.options.depth;
                        if (e) return i === be[r] ? (y(n._value, n._current) && y(n._value, e) || (n.value(e), n.trigger(Y)), t) : (n.navigate(e, --i), t)
                    },
                    navigate: function(n, i) {
                        var r, o, s, l, c, d, u, h, f, m, g, v, _, b, w, y, x;
                        i = isNaN(i) ? be[i] : i, r = this, o = r.options, s = o.culture, l = o.min, c = o.max, d = r._title, u = r._table, h = r._oldTable, f = r._value, m = r._current, g = n && +n > +m, v = i !== t && i !== r._index, n || (n = m), r._current = n = new _e(+a(n, l, c)), i === t ? i = r._index : r._index = i, r._view = b = k.views[i], w = b.compare, y = i === be[$], d.toggleClass(J, y).attr(pe, y), y = w(n, l) < 1, r[he].toggleClass(J, y).attr(pe, y), y = w(n, c) > -1, r[fe].toggleClass(J, y).attr(pe, y), u && h && h.data("animating") && (h.kendoStop(!0, !0), u.kendoStop(!0, !0)), r._oldTable = u, (!u || r._changeView) && (d.html(b.title(n, l, c, s)), r._table = _ = e(b.content(ve({
                            min: l,
                            max: c,
                            date: n,
                            url: o.url,
                            dates: o.dates,
                            format: o.format,
                            culture: s,
                            disableDates: o.disableDates
                        }, r[b.name]))), p(_), x = u && u.data("start") === _.data("start"), r._animate({
                            from: u,
                            to: _,
                            vertical: v,
                            future: g,
                            replace: x
                        }), r.trigger(K), r._focus(n)), i === be[o.depth] && f && !r.options.disableDates(f) && r._class("k-state-selected", f), r._class(Z, n), !u && r._cell && r._cell.removeClass(Z), r._changeView = !0
                    },
                    value: function(e) {
                        var n = this,
                            i = n._view,
                            r = n.options,
                            o = n._view,
                            a = r.min,
                            l = r.max;
                        return e === t ? n._value : (null === e && (n._current = new Date(n._current.getFullYear(), n._current.getMonth(), n._current.getDate())), e = A(e, r.format, r.culture), null !== e && (e = new _e(+e), s(e, a, l) || (e = null)), n.options.disableDates(e) ? n._value === t && (n._value = null) : n._value = e, o && null === e && n._cell ? n._cell.removeClass("k-state-selected") : (n._changeView = !e || i && 0 !== i.compare(e, n._current), n.navigate(e)), t)
                    },
                    _move: function(t) {
                        var n, i, r, o, l = this,
                            c = l.options,
                            d = t.keyCode,
                            u = l._view,
                            h = l._index,
                            f = l.options.min,
                            p = l.options.max,
                            m = new _e(+l._current),
                            g = x.support.isRtl(l.wrapper),
                            v = l.options.disableDates;
                        return t.target === l._table[0] && (l._active = !0), t.ctrlKey ? d == D.RIGHT && !g || d == D.LEFT && g ? (l.navigateToFuture(), i = !0) : d == D.LEFT && !g || d == D.RIGHT && g ? (l.navigateToPast(), i = !0) : d == D.UP ? (l.navigateUp(), i = !0) : d == D.DOWN && (l._click(e(l._cell[0].firstChild)), i = !0) : (d == D.RIGHT && !g || d == D.LEFT && g ? (n = 1, i = !0) : d == D.LEFT && !g || d == D.RIGHT && g ? (n = -1, i = !0) : d == D.UP ? (n = 0 === h ? -7 : -4, i = !0) : d == D.DOWN ? (n = 0 === h ? 7 : 4, i = !0) : d == D.ENTER ? (l._click(e(l._cell[0].firstChild)), i = !0) : d == D.HOME || d == D.END ? (r = d == D.HOME ? "first" : "last", o = u[r](m), m = new _e(o.getFullYear(), o.getMonth(), o.getDate(), m.getHours(), m.getMinutes(), m.getSeconds(), m.getMilliseconds()), i = !0) : d == D.PAGEUP ? (i = !0, l.navigateToPast()) : d == D.PAGEDOWN && (i = !0, l.navigateToFuture()), (n || r) && (r || u.setDate(m, n), v(m) && (m = l._nextNavigatable(m, n)), s(m, f, p) && l._focus(a(m, c.min, c.max)))), i && t.preventDefault(), l._current
                    },
                    _nextNavigatable: function(e, t) {
                        var n = this,
                            i = !0,
                            r = n._view,
                            o = n.options.min,
                            a = n.options.max,
                            l = n.options.disableDates,
                            c = new Date(e.getTime());
                        for (r.setDate(c, -t); i;) {
                            if (r.setDate(e, t), !s(e, o, a)) {
                                e = c;
                                break
                            }
                            i = l(e)
                        }
                        return e
                    },
                    _animate: function(e) {
                        var t = this,
                            n = e.from,
                            i = e.to,
                            r = t._active;
                        n ? n.parent().data("animating") ? (n.off(N), n.parent().kendoStop(!0, !0).remove(), n.remove(), i.insertAfter(t.element[0].firstChild), t._focusView(r)) : !n.is(":visible") || t.options.animation === !1 || e.replace ? (i.insertAfter(n), n.off(N).remove(), t._focusView(r)) : t[e.vertical ? "_vertical" : "_horizontal"](n, i, e.future) : (i.insertAfter(t.element[0].firstChild), t._bindTable(i))
                    },
                    _horizontal: function(e, t, n) {
                        var i = this,
                            r = i._active,
                            o = i.options.animation.horizontal,
                            a = o.effects,
                            s = e.outerWidth();
                        a && -1 != a.indexOf(q) && (e.add(t).css({
                            width: s
                        }), e.wrap("<div/>"), i._focusView(r, e), e.parent().css({
                            position: "relative",
                            width: 2 * s,
                            "float": j,
                            "margin-left": n ? 0 : -s
                        }), t[n ? "insertAfter" : "insertBefore"](e), ve(o, {
                            effects: q + ":" + (n ? "right" : j),
                            complete: function() {
                                e.off(N).remove(), i._oldTable = null, t.unwrap(), i._focusView(r)
                            }
                        }), e.parent().kendoStop(!0, !0).kendoAnimate(o))
                    },
                    _vertical: function(e, t) {
                        var n, i, r = this,
                            o = r.options.animation.vertical,
                            a = o.effects,
                            s = r._active;
                        a && -1 != a.indexOf("zoom") && (t.css({
                            position: "absolute",
                            top: e.prev().outerHeight(),
                            left: 0
                        }).insertBefore(e), P && (n = r._cellByDate(r._view.toDateString(r._current)), i = n.position(), i = i.left + parseInt(n.width() / 2, 10) + "px " + (i.top + parseInt(n.height() / 2, 10) + "px"), t.css(P, i)), e.kendoStop(!0, !0).kendoAnimate({
                            effects: "fadeOut",
                            duration: 600,
                            complete: function() {
                                e.off(N).remove(), r._oldTable = null, t.css({
                                    position: "static",
                                    top: 0,
                                    left: 0
                                }), r._focusView(s)
                            }
                        }), t.kendoStop(!0, !0).kendoAnimate(o))
                    },
                    _cellByDate: function(t) {
                        return this._table.find("td:not(." + ee + ")").filter(function() {
                            return e(this.firstChild).attr(x.attr(Q)) === t
                        })
                    },
                    _class: function(t, n) {
                        var i, r = this,
                            o = r._cellID,
                            a = r._cell,
                            s = r._view.toDateString(n);
                        a && a.removeAttr(me).removeAttr("aria-label").removeAttr(U), n && (i = r.options.disableDates(n)), a = r._table.find("td:not(." + ee + ")").removeClass(t).filter(function() {
                            return e(this.firstChild).attr(x.attr(Q)) === s
                        }).attr(me, !0), (t === Z && !r._active && r.options.focusOnNav !== !1 || i) && (t = ""), a.addClass(t), a[0] && (r._cell = a), o && (a.attr(U, o), r._table.removeAttr("aria-activedescendant").attr("aria-activedescendant", o))
                    },
                    _bindTable: function(e) {
                        e.on(ae, this._addClassProxy).on(re, this._removeClassProxy)
                    },
                    _click: function(e) {
                        var t = this,
                            n = t.options,
                            i = new Date(+t._current),
                            r = t._toDateObject(e);
                        E(r, 0), t.options.disableDates(r) && "month" == t._view.name && (r = t._value), t._view.setDate(i, r), t.navigateDown(a(i, n.min, n.max))
                    },
                    _focus: function(e) {
                        var t = this,
                            n = t._view;
                        0 !== n.compare(e, t._current) ? t.navigate(e) : (t._current = e, t._class(Z, e))
                    },
                    _focusView: function(e, t) {
                        e && this.focus(t)
                    },
                    _footer: function(n) {
                        var i = this,
                            r = o(),
                            a = i.element,
                            s = a.find(".k-footer");
                        return n ? (s[0] || (s = e('<div class="k-footer"><a href="#" class="k-link k-nav-today"></a></div>').appendTo(a)), i._today = s.show().find(".k-link").html(n(r)).attr("title", x.toString(r, "D", i.options.culture)), i._toggle(), t) : (i._toggle(!1), s.hide(), t)
                    },
                    _header: function() {
                        var e, t = this,
                            n = t.element;
                        n.find(".k-header")[0] || n.html('<div class="k-header"><a href="#" role="button" class="k-link k-nav-prev"><span class="k-icon k-i-arrow-w"></span></a><a href="#" role="button" aria-live="assertive" aria-atomic="true" class="k-link k-nav-fast"></a><a href="#" role="button" class="k-link k-nav-next"><span class="k-icon k-i-arrow-e"></span></a></div>'), e = n.find(".k-link").on(le + " " + ce + " " + ae + " " + re, d).click(!1), t._title = e.eq(1).on(O, function() {
                            t._active = t.options.focusOnNav !== !1, t.navigateUp()
                        }), t[he] = e.eq(0).on(O, function() {
                            t._active = t.options.focusOnNav !== !1, t.navigateToPast()
                        }), t[fe] = e.eq(2).on(O, function() {
                            t._active = t.options.focusOnNav !== !1, t.navigateToFuture()
                        })
                    },
                    _navigate: function(e, t) {
                        var n = this,
                            i = n._index + 1,
                            r = new _e(+n._current);
                        e = n[e], e.hasClass(J) || (i > 3 ? r.setFullYear(r.getFullYear() + 100 * t) : k.views[i].setDate(r, t), n.navigate(r))
                    },
                    _option: function(e, n) {
                        var i, r = this,
                            o = r.options,
                            a = r._value || r._current;
                        return n === t ? o[e] : (n = A(n, o.format, o.culture), n && (o[e] = new _e(+n), i = e === W ? n > a : a > n, (i || v(a, n)) && (i && (r._value = null), r._changeView = !0), r._changeView || (r._changeView = !(!o.month.content && !o.month.empty)), r.navigate(r._value), r._toggle()), t)
                    },
                    _toggle: function(e) {
                        var n = this,
                            i = n.options,
                            r = n.options.disableDates(o()),
                            a = n._today;
                        e === t && (e = s(o(), i.min, i.max)), a && (a.off(O), e && !r ? a.addClass(ne).removeClass(J).on(O, ge(n._todayClick, n)) : a.removeClass(ne).addClass(J).on(O, u))
                    },
                    _todayClick: function(e) {
                        var t = this,
                            n = be[t.options.depth],
                            i = t.options.disableDates,
                            r = o();
                        e.preventDefault(), i(r) || (0 === t._view.compare(t._current, r) && t._index == n && (t._changeView = !1), t._value = r, t.navigate(r, n), t.trigger(Y))
                    },
                    _toDateObject: function(t) {
                        var n = e(t).attr(x.attr(Q)).split("/");
                        return n = new _e(n[0], n[1], n[2])
                    },
                    _templates: function() {
                        var e = this,
                            t = e.options,
                            n = t.footer,
                            i = t.month,
                            r = i.content,
                            o = i.empty;
                        e.month = {
                            content: I('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link#=data.linkClass#" href="#=data.url#" ' + x.attr("value") + '="#=data.dateString#" title="#=data.title#">' + (r || "#=data.value#") + "</a></td>", {
                                useWithBlock: !!r
                            }),
                            empty: I('<td role="gridcell">' + (o || "&nbsp;") + "</td>", {
                                useWithBlock: !!o
                            })
                        }, e.footer = n !== !1 ? I(n || '#= kendo.toString(data,"D","' + t.culture + '") #', {
                            useWithBlock: !1
                        }) : null
                    }
                });
            S.plugin(we), k = {
                firstDayOfMonth: function(e) {
                    return new _e(e.getFullYear(), e.getMonth(), 1)
                },
                firstVisibleDay: function(e, t) {
                    t = t || x.culture().calendar;
                    for (var n = t.firstDay, i = new _e(e.getFullYear(), e.getMonth(), 0, e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()); i.getDay() != n;) k.setTime(i, -1 * ue);
                    return i
                },
                setTime: function(e, t) {
                    var n = e.getTimezoneOffset(),
                        i = new _e(e.getTime() + t),
                        r = i.getTimezoneOffset() - n;
                    e.setTime(i.getTime() + r * de)
                },
                views: [{
                    name: G,
                    title: function(e, t, n, i) {
                        return h(i).months.names[e.getMonth()] + " " + e.getFullYear()
                    },
                    content: function(e) {
                        for (var t = this, n = 0, r = e.min, o = e.max, a = e.date, s = e.dates, c = e.format, d = e.culture, u = e.url, f = u && s[0], p = h(d), g = p.firstDay, v = p.days, _ = l(v.names, g), b = l(v.namesShort, g), w = k.firstVisibleDay(a, p), y = t.first(a), C = t.last(a), S = t.toDateString, T = new _e, D = '<table tabindex="0" role="grid" class="k-content" cellspacing="0" data-start="' + S(w) + '"><thead><tr role="row">'; 7 > n; n++) D += '<th scope="col" title="' + _[n] + '">' + b[n] + "</th>";
                        return T = new _e(T.getFullYear(), T.getMonth(), T.getDate()), E(T, 0), T = +T, i({
                            cells: 42,
                            perRow: 7,
                            html: D += '</tr></thead><tbody><tr role="row">',
                            start: w,
                            min: new _e(r.getFullYear(), r.getMonth(), r.getDate()),
                            max: new _e(o.getFullYear(), o.getMonth(), o.getDate()),
                            content: e.content,
                            empty: e.empty,
                            setter: t.setDate,
                            disableDates: e.disableDates,
                            build: function(e, t, n) {
                                var i = [],
                                    r = e.getDay(),
                                    o = "",
                                    a = "#";
                                return (y > e || e > C) && i.push(ee), n(e) && i.push(J), +e === T && i.push("k-today"), (0 === r || 6 === r) && i.push("k-weekend"), f && m(+e, s) && (a = u.replace("{0}", x.toString(e, c, d)), o = " k-action-link"), {
                                    date: e,
                                    dates: s,
                                    ns: x.ns,
                                    title: x.toString(e, "D", d),
                                    value: e.getDate(),
                                    dateString: S(e),
                                    cssClass: i[0] ? ' class="' + i.join(" ") + '"' : "",
                                    linkClass: o,
                                    url: a
                                }
                            }
                        })
                    },
                    first: function(e) {
                        return k.firstDayOfMonth(e)
                    },
                    last: function(e) {
                        var t = new _e(e.getFullYear(), e.getMonth() + 1, 0),
                            n = k.firstDayOfMonth(e),
                            i = Math.abs(t.getTimezoneOffset() - n.getTimezoneOffset());
                        return i && t.setHours(n.getHours() + i / 60), t
                    },
                    compare: function(e, t) {
                        var n, i = e.getMonth(),
                            r = e.getFullYear(),
                            o = t.getMonth(),
                            a = t.getFullYear();
                        return n = r > a ? 1 : a > r ? -1 : i == o ? 0 : i > o ? 1 : -1
                    },
                    setDate: function(e, t) {
                        var n = e.getHours();
                        t instanceof _e ? e.setFullYear(t.getFullYear(), t.getMonth(), t.getDate()) : k.setTime(e, t * ue), E(e, n)
                    },
                    toDateString: function(e) {
                        return e.getFullYear() + "/" + e.getMonth() + "/" + e.getDate()
                    }
                }, {
                    name: "year",
                    title: function(e) {
                        return e.getFullYear()
                    },
                    content: function(e) {
                        var t = h(e.culture).months.namesAbbr,
                            n = this.toDateString,
                            r = e.min,
                            o = e.max;
                        return i({
                            min: new _e(r.getFullYear(), r.getMonth(), 1),
                            max: new _e(o.getFullYear(), o.getMonth(), 1),
                            start: new _e(e.date.getFullYear(), 0, 1),
                            setter: this.setDate,
                            build: function(e) {
                                return {
                                    value: t[e.getMonth()],
                                    ns: x.ns,
                                    dateString: n(e),
                                    cssClass: ""
                                }
                            }
                        })
                    },
                    first: function(e) {
                        return new _e(e.getFullYear(), 0, e.getDate())
                    },
                    last: function(e) {
                        return new _e(e.getFullYear(), 11, e.getDate())
                    },
                    compare: function(e, t) {
                        return r(e, t)
                    },
                    setDate: function(e, t) {
                        var n, i = e.getHours();
                        t instanceof _e ? (n = t.getMonth(), e.setFullYear(t.getFullYear(), n, e.getDate()), n !== e.getMonth() && e.setDate(0)) : (n = e.getMonth() + t, e.setMonth(n), n > 11 && (n -= 12), n > 0 && e.getMonth() != n && e.setDate(0)), E(e, i)
                    },
                    toDateString: function(e) {
                        return e.getFullYear() + "/" + e.getMonth() + "/1"
                    }
                }, {
                    name: "decade",
                    title: function(e, t, i) {
                        return n(e, t, i, 10)
                    },
                    content: function(e) {
                        var t = e.date.getFullYear(),
                            n = this.toDateString;
                        return i({
                            start: new _e(t - t % 10 - 1, 0, 1),
                            min: new _e(e.min.getFullYear(), 0, 1),
                            max: new _e(e.max.getFullYear(), 0, 1),
                            setter: this.setDate,
                            build: function(e, t) {
                                return {
                                    value: e.getFullYear(),
                                    ns: x.ns,
                                    dateString: n(e),
                                    cssClass: 0 === t || 11 == t ? te : ""
                                }
                            }
                        })
                    },
                    first: function(e) {
                        var t = e.getFullYear();
                        return new _e(t - t % 10, e.getMonth(), e.getDate())
                    },
                    last: function(e) {
                        var t = e.getFullYear();
                        return new _e(t - t % 10 + 9, e.getMonth(), e.getDate())
                    },
                    compare: function(e, t) {
                        return r(e, t, 10)
                    },
                    setDate: function(e, t) {
                        c(e, t, 1)
                    },
                    toDateString: function(e) {
                        return e.getFullYear() + "/0/1"
                    }
                }, {
                    name: $,
                    title: function(e, t, i) {
                        return n(e, t, i, 100)
                    },
                    content: function(e) {
                        var t = e.date.getFullYear(),
                            n = e.min.getFullYear(),
                            r = e.max.getFullYear(),
                            o = this.toDateString,
                            a = n,
                            s = r;
                        return a -= a % 10, s -= s % 10, 10 > s - a && (s = a + 9), i({
                            start: new _e(t - t % 100 - 10, 0, 1),
                            min: new _e(a, 0, 1),
                            max: new _e(s, 0, 1),
                            setter: this.setDate,
                            build: function(e, t) {
                                var i = e.getFullYear(),
                                    a = i + 9;
                                return n > i && (i = n), a > r && (a = r), {
                                    ns: x.ns,
                                    value: i + " - " + a,
                                    dateString: o(e),
                                    cssClass: 0 === t || 11 == t ? te : ""
                                }
                            }
                        })
                    },
                    first: function(e) {
                        var t = e.getFullYear();
                        return new _e(t - t % 100, e.getMonth(), e.getDate())
                    },
                    last: function(e) {
                        var t = e.getFullYear();
                        return new _e(t - t % 100 + 99, e.getMonth(), e.getDate())
                    },
                    compare: function(e, t) {
                        return r(e, t, 100)
                    },
                    setDate: function(e, t) {
                        c(e, t, 10)
                    },
                    toDateString: function(e) {
                        var t = e.getFullYear();
                        return t - t % 10 + "/0/1"
                    }
                }]
            }, k.isEqualDatePart = g, k.makeUnselectable = p, k.restrictValue = a, k.isInRange = s, k.normalize = f, k.viewsEnum = be, k.disabled = _, x.calendar = k
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.datepicker.min", ["kendo.calendar.min", "kendo.popup.min"], e)
    }(function() {
        return function(e, t) {
            function n(t) {
                var n = t.parseFormats,
                    i = t.format;
                B.normalize(t), n = e.isArray(n) ? n : [n], n.length || n.push("yyyy-MM-dd"), -1 === e.inArray(i, n) && n.splice(0, 0, t.format), t.parseFormats = n
            }

            function i(e) {
                e.preventDefault()
            }
            var r, o = window.kendo,
                a = o.ui,
                s = a.Widget,
                l = o.parseDate,
                c = o.keys,
                d = o.template,
                u = o._activeElement,
                h = "<div />",
                f = "<span />",
                p = ".kendoDatePicker",
                m = "click" + p,
                g = "open",
                v = "close",
                _ = "change",
                b = "disabled",
                w = "readonly",
                y = "k-state-default",
                k = "k-state-focused",
                x = "k-state-selected",
                C = "k-state-disabled",
                S = "k-state-hover",
                T = "mouseenter" + p + " mouseleave" + p,
                D = "mousedown" + p,
                A = "id",
                E = "min",
                F = "max",
                I = "month",
                M = "aria-disabled",
                R = "aria-expanded",
                P = "aria-hidden",
                z = "aria-readonly",
                B = o.calendar,
                L = B.isInRange,
                H = B.restrictValue,
                N = B.isEqualDatePart,
                O = e.extend,
                V = e.proxy,
                U = Date,
                W = function(t) {
                    var n, i = this,
                        r = document.body,
                        s = e(h).attr(P, "true").addClass("k-calendar-container").appendTo(r);
                    i.options = t = t || {}, n = t.id, n && (n += "_dateview", s.attr(A, n), i._dateViewID = n), i.popup = new a.Popup(s, O(t.popup, t, {
                        name: "Popup",
                        isRtl: o.support.isRtl(t.anchor)
                    })), i.div = s, i.value(t.value)
                };
            W.prototype = {
                _calendar: function() {
                    var t, n = this,
                        r = n.calendar,
                        s = n.options;
                    r || (t = e(h).attr(A, o.guid()).appendTo(n.popup.element).on(D, i).on(m, "td:has(.k-link)", V(n._click, n)), n.calendar = r = new a.Calendar(t), n._setOptions(s), o.calendar.makeUnselectable(r.element), r.navigate(n._value || n._current, s.start), n.value(n._value))
                },
                _setOptions: function(e) {
                    this.calendar.setOptions({
                        focusOnNav: !1,
                        change: e.change,
                        culture: e.culture,
                        dates: e.dates,
                        depth: e.depth,
                        footer: e.footer,
                        format: e.format,
                        max: e.max,
                        min: e.min,
                        month: e.month,
                        start: e.start,
                        disableDates: e.disableDates
                    })
                },
                setOptions: function(e) {
                    var t = this.options,
                        n = e.disableDates;
                    n && (e.disableDates = B.disabled(n)), this.options = O(t, e, {
                        change: t.change,
                        close: t.close,
                        open: t.open
                    }), this.calendar && this._setOptions(this.options)
                },
                destroy: function() {
                    this.popup.destroy()
                },
                open: function() {
                    var e = this;
                    e._calendar(), e.popup.open()
                },
                close: function() {
                    this.popup.close()
                },
                min: function(e) {
                    this._option(E, e);
                },
                max: function(e) {
                    this._option(F, e)
                },
                toggle: function() {
                    var e = this;
                    e[e.popup.visible() ? v : g]()
                },
                move: function(e) {
                    var t = this,
                        n = e.keyCode,
                        i = t.calendar,
                        r = e.ctrlKey && n == c.DOWN || n == c.ENTER,
                        o = !1;
                    if (e.altKey) n == c.DOWN ? (t.open(), e.preventDefault(), o = !0) : n == c.UP && (t.close(), e.preventDefault(), o = !0);
                    else if (t.popup.visible()) {
                        if (n == c.ESC || r && i._cell.hasClass(x)) return t.close(), e.preventDefault(), !0;
                        t._current = i._move(e), o = !0
                    }
                    return o
                },
                current: function(e) {
                    this._current = e, this.calendar._focus(e)
                },
                value: function(e) {
                    var t = this,
                        n = t.calendar,
                        i = t.options,
                        r = i.disableDates;
                    r && r(e) && (e = null), t._value = e, t._current = new U(+H(e, i.min, i.max)), n && n.value(e)
                },
                _click: function(e) {
                    -1 !== e.currentTarget.className.indexOf(x) && this.close()
                },
                _option: function(e, t) {
                    var n = this,
                        i = n.calendar;
                    n.options[e] = t, i && i[e](t)
                }
            }, W.normalize = n, o.DateView = W, r = s.extend({
                init: function(t, i) {
                    var r, a, c = this;
                    s.fn.init.call(c, t, i), t = c.element, i = c.options, i.disableDates = o.calendar.disabled(i.disableDates), i.min = l(t.attr("min")) || l(i.min), i.max = l(t.attr("max")) || l(i.max), n(i), c._initialOptions = O({}, i), c._wrapper(), c.dateView = new W(O({}, i, {
                        id: t.attr(A),
                        anchor: c.wrapper,
                        change: function() {
                            c._change(this.value()), c.close()
                        },
                        close: function(e) {
                            c.trigger(v) ? e.preventDefault() : (t.attr(R, !1), a.attr(P, !0))
                        },
                        open: function(e) {
                            var n, i = c.options;
                            c.trigger(g) ? e.preventDefault() : (c.element.val() !== c._oldText && (n = l(t.val(), i.parseFormats, i.culture), c.dateView[n ? "current" : "value"](n)), t.attr(R, !0), a.attr(P, !1), c._updateARIA(n))
                        }
                    })), a = c.dateView.div, c._icon();
                    try {
                        t[0].setAttribute("type", "text")
                    } catch (d) {
                        t[0].type = "text"
                    }
                    t.addClass("k-input").attr({
                        role: "combobox",
                        "aria-expanded": !1,
                        "aria-owns": c.dateView._dateViewID
                    }), c._reset(), c._template(), r = t.is("[disabled]") || e(c.element).parents("fieldset").is(":disabled"), r ? c.enable(!1) : c.readonly(t.is("[readonly]")), c._old = c._update(i.value || c.element.val()), c._oldText = t.val(), o.notify(c)
                },
                events: [g, v, _],
                options: {
                    name: "DatePicker",
                    value: null,
                    footer: "",
                    format: "",
                    culture: "",
                    parseFormats: [],
                    min: new Date(1900, 0, 1),
                    max: new Date(2099, 11, 31),
                    start: I,
                    depth: I,
                    animation: {},
                    month: {},
                    dates: [],
                    ARIATemplate: 'Current focused date is #=kendo.toString(data.current, "D")#'
                },
                setOptions: function(e) {
                    var t = this,
                        i = t._value;
                    s.fn.setOptions.call(t, e), e = t.options, e.min = l(e.min), e.max = l(e.max), n(e), t.dateView.setOptions(e), i && (t.element.val(o.toString(i, e.format, e.culture)), t._updateARIA(i))
                },
                _editable: function(e) {
                    var t = this,
                        n = t._dateIcon.off(p),
                        r = t.element.off(p),
                        o = t._inputWrapper.off(p),
                        a = e.readonly,
                        s = e.disable;
                    a || s ? (o.addClass(s ? C : y).removeClass(s ? y : C), r.attr(b, s).attr(w, a).attr(M, s).attr(z, a)) : (o.addClass(y).removeClass(C).on(T, t._toggleHover), r.removeAttr(b).removeAttr(w).attr(M, !1).attr(z, !1).on("keydown" + p, V(t._keydown, t)).on("focusout" + p, V(t._blur, t)).on("focus" + p, function() {
                        t._inputWrapper.addClass(k)
                    }), n.on(m, V(t._click, t)).on(D, i))
                },
                readonly: function(e) {
                    this._editable({
                        readonly: e === t ? !0 : e,
                        disable: !1
                    })
                },
                enable: function(e) {
                    this._editable({
                        readonly: !1,
                        disable: !(e = e === t ? !0 : e)
                    })
                },
                destroy: function() {
                    var e = this;
                    s.fn.destroy.call(e), e.dateView.destroy(), e.element.off(p), e._dateIcon.off(p), e._inputWrapper.off(p), e._form && e._form.off("reset", e._resetHandler)
                },
                open: function() {
                    this.dateView.open()
                },
                close: function() {
                    this.dateView.close()
                },
                min: function(e) {
                    return this._option(E, e)
                },
                max: function(e) {
                    return this._option(F, e)
                },
                value: function(e) {
                    var n = this;
                    return e === t ? n._value : (n._old = n._update(e), null === n._old && n.element.val(""), n._oldText = n.element.val(), t)
                },
                _toggleHover: function(t) {
                    e(t.currentTarget).toggleClass(S, "mouseenter" === t.type)
                },
                _blur: function() {
                    var e = this,
                        t = e.element.val();
                    e.close(), t !== e._oldText && e._change(t), e._inputWrapper.removeClass(k)
                },
                _click: function() {
                    var e = this,
                        t = e.element;
                    e.dateView.toggle(), o.support.touch || t[0] === u() || t.focus()
                },
                _change: function(e) {
                    var t, n, i, r = this,
                        o = r.element.val();
                    e = r._update(e), t = +r._old != +e, n = t && !r._typing, i = o !== r.element.val(), (n || i) && r.element.trigger(_), t && (r._old = e, r._oldText = r.element.val(), r.trigger(_)), r._typing = !1
                },
                _keydown: function(e) {
                    var t = this,
                        n = t.dateView,
                        i = t.element.val(),
                        r = !1;
                    n.popup.visible() || e.keyCode != c.ENTER || i === t._oldText ? (r = n.move(e), t._updateARIA(n._current), r || (t._typing = !0)) : t._change(i)
                },
                _icon: function() {
                    var t, n = this,
                        i = n.element;
                    t = i.next("span.k-select"), t[0] || (t = e('<span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-calendar">select</span></span>').insertAfter(i)), n._dateIcon = t.attr({
                        role: "button",
                        "aria-controls": n.dateView._dateViewID
                    })
                },
                _option: function(e, n) {
                    var i = this,
                        r = i.options;
                    return n === t ? r[e] : (n = l(n, r.parseFormats, r.culture), n && (r[e] = new U(+n), i.dateView[e](n)), t)
                },
                _update: function(e) {
                    var t, n = this,
                        i = n.options,
                        r = i.min,
                        a = i.max,
                        s = n._value,
                        c = l(e, i.parseFormats, i.culture),
                        d = null === c && null === s || c instanceof Date && s instanceof Date;
                    return i.disableDates(c) && (c = null, n._old || (e = null)), +c === +s && d ? (t = o.toString(c, i.format, i.culture), t !== e && n.element.val(null === c ? e : t), c) : (null !== c && N(c, r) ? c = H(c, r, a) : L(c, r, a) || (c = null), n._value = c, n.dateView.value(c), n.element.val(c ? o.toString(c, i.format, i.culture) : e), n._updateARIA(c), c)
                },
                _wrapper: function() {
                    var t, n = this,
                        i = n.element;
                    t = i.parents(".k-datepicker"), t[0] || (t = i.wrap(f).parent().addClass("k-picker-wrap k-state-default"), t = t.wrap(f).parent()), t[0].style.cssText = i[0].style.cssText, i.css({
                        width: "100%",
                        height: i[0].style.height
                    }), n.wrapper = t.addClass("k-widget k-datepicker k-header").addClass(i[0].className), n._inputWrapper = e(t[0].firstChild)
                },
                _reset: function() {
                    var t = this,
                        n = t.element,
                        i = n.attr("form"),
                        r = i ? e("#" + i) : n.closest("form");
                    r[0] && (t._resetHandler = function() {
                        t.value(n[0].defaultValue), t.max(t._initialOptions.max), t.min(t._initialOptions.min)
                    }, t._form = r.on("reset", t._resetHandler))
                },
                _template: function() {
                    this._ariaTemplate = d(this.options.ARIATemplate)
                },
                _updateARIA: function(e) {
                    var t, n = this,
                        i = n.dateView.calendar;
                    n.element.removeAttr("aria-activedescendant"), i && (t = i._cell, t.attr("aria-label", n._ariaTemplate({
                        current: e || i.current()
                    })), n.element.attr("aria-activedescendant", t.attr("id")))
                }
            }), a.plugin(r)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.autocomplete.min", ["kendo.list.min", "kendo.mobile.scroller.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t, n) {
                return n ? t.substring(0, e).split(n).length - 1 : 0
            }

            function i(e, t, i) {
                return t.split(i)[n(e, t, i)]
            }

            function r(e, t, i, r) {
                var o = t.split(r);
                return o.splice(n(e, t, r), 1, i), r && "" !== o[o.length - 1] && o.push(""), o.join(r)
            }
            var o = window.kendo,
                a = o.support,
                s = o.caret,
                l = o._activeElement,
                c = a.placeholder,
                d = o.ui,
                u = d.List,
                h = o.keys,
                f = o.data.DataSource,
                p = "aria-disabled",
                m = "aria-readonly",
                g = "change",
                v = "k-state-default",
                _ = "disabled",
                b = "readonly",
                w = "k-state-focused",
                y = "k-state-selected",
                k = "k-state-disabled",
                x = "k-state-hover",
                C = ".kendoAutoComplete",
                S = "mouseenter" + C + " mouseleave" + C,
                T = e.proxy,
                D = u.extend({
                    init: function(t, n) {
                        var i, r, a = this;
                        a.ns = C, n = e.isArray(n) ? {
                            dataSource: n
                        } : n, u.fn.init.call(a, t, n), t = a.element, n = a.options, n.placeholder = n.placeholder || t.attr("placeholder"), c && t.attr("placeholder", n.placeholder), a._wrapper(), a._loader(), a._dataSource(), a._ignoreCase(), t[0].type = "text", i = a.wrapper, a._popup(), t.addClass("k-input").on("keydown" + C, T(a._keydown, a)).on("keypress" + C, T(a._keypress, a)).on("paste" + C, T(a._search, a)).on("focus" + C, function() {
                            a._prev = a._accessor(), a._oldText = a._prev, a._placeholder(!1), i.addClass(w)
                        }).on("focusout" + C, function() {
                            a._change(), a._placeholder(), i.removeClass(w)
                        }).attr({
                            autocomplete: "off",
                            role: "textbox",
                            "aria-haspopup": !0
                        }), a._enable(), a._old = a._accessor(), t[0].id && t.attr("aria-owns", a.ul[0].id), a._aria(), a._placeholder(), a._initList(), r = e(a.element).parents("fieldset").is(":disabled"), r && a.enable(!1), a.listView.bind("click", function(e) {
                            e.preventDefault()
                        }), a._resetFocusItemHandler = e.proxy(a._resetFocusItem, a), o.notify(a)
                    },
                    options: {
                        name: "AutoComplete",
                        enabled: !0,
                        suggest: !1,
                        template: "",
                        groupTemplate: "#:data#",
                        fixedGroupTemplate: "#:data#",
                        dataTextField: "",
                        minLength: 1,
                        delay: 200,
                        height: 200,
                        filter: "startswith",
                        ignoreCase: !0,
                        highlightFirst: !1,
                        separator: null,
                        placeholder: "",
                        animation: {},
                        virtual: !1,
                        value: null
                    },
                    _dataSource: function() {
                        var e = this;
                        e.dataSource && e._refreshHandler ? e._unbindDataSource() : (e._progressHandler = T(e._showBusy, e), e._errorHandler = T(e._hideBusy, e)), e.dataSource = f.create(e.options.dataSource).bind("progress", e._progressHandler).bind("error", e._errorHandler)
                    },
                    setDataSource: function(e) {
                        this.options.dataSource = e, this._dataSource(), this.listView.setDataSource(this.dataSource)
                    },
                    events: ["open", "close", g, "select", "filtering", "dataBinding", "dataBound"],
                    setOptions: function(e) {
                        var t = this._listOptions(e);
                        u.fn.setOptions.call(this, e), this.listView.setOptions(t), this._accessors(), this._aria()
                    },
                    _listOptions: function(t) {
                        var n = u.fn._listOptions.call(this, e.extend(t, {
                            skipUpdateOnBind: !0
                        }));
                        return n.dataValueField = n.dataTextField, n.selectedItemChange = null, n
                    },
                    _editable: function(e) {
                        var t = this,
                            n = t.element,
                            i = t.wrapper.off(C),
                            r = e.readonly,
                            o = e.disable;
                        r || o ? (i.addClass(o ? k : v).removeClass(o ? v : k), n.attr(_, o).attr(b, r).attr(p, o).attr(m, r)) : (i.addClass(v).removeClass(k).on(S, t._toggleHover), n.removeAttr(_).removeAttr(b).attr(p, !1).attr(m, !1))
                    },
                    close: function() {
                        var e = this,
                            t = e.listView.focus();
                        t && t.removeClass(y), e.popup.close()
                    },
                    destroy: function() {
                        var e = this;
                        e.element.off(C), e.wrapper.off(C), u.fn.destroy.call(e)
                    },
                    refresh: function() {
                        this.listView.refresh()
                    },
                    select: function(e) {
                        this._select(e)
                    },
                    search: function(e) {
                        var t, n = this,
                            r = n.options,
                            o = r.ignoreCase,
                            a = r.separator;
                        e = e || n._accessor(), clearTimeout(n._typingTimeout), a && (e = i(s(n.element)[0], e, a)), t = e.length, (!t || t >= r.minLength) && (n._open = !0, n._mute(function() {
                            this.listView.value([])
                        }), n._filterSource({
                            value: o ? e.toLowerCase() : e,
                            operator: r.filter,
                            field: r.dataTextField,
                            ignoreCase: o
                        }))
                    },
                    suggest: function(e) {
                        var i, r = this,
                            o = r._last,
                            a = r._accessor(),
                            c = r.element[0],
                            d = s(c)[0],
                            f = r.options.separator,
                            p = a.split(f),
                            m = n(d, a, f),
                            g = d;
                        return o == h.BACKSPACE || o == h.DELETE ? (r._last = t, t) : (e = e || "", "string" != typeof e && (e[0] && (e = r.dataSource.view()[u.inArray(e[0], r.ul[0])]), e = e ? r._text(e) : ""), 0 >= d && (d = a.toLowerCase().indexOf(e.toLowerCase()) + 1), i = a.substring(0, d).lastIndexOf(f), i = i > -1 ? d - (i + f.length) : d, a = p[m].substring(0, i), e && (e = "" + e, i = e.toLowerCase().indexOf(a.toLowerCase()), i > -1 && (e = e.substring(i + a.length), g = d + e.length, a += e), f && "" !== p[p.length - 1] && p.push("")), p[m] = a, r._accessor(p.join(f || "")), c === l() && s(c, d, g), t)
                    },
                    value: function(e) {
                        return e === t ? this._accessor() : (this.listView.value(e), this._accessor(e), this._old = this._accessor(), this._oldText = this._accessor(), t)
                    },
                    _click: function(e) {
                        var n = e.item,
                            i = this.element;
                        return e.preventDefault(), this._active = !0, this.trigger("select", {
                            item: n
                        }) ? (this.close(), t) : (this._oldText = i.val(), this._select(n), this._blur(), s(i, i.val().length), t)
                    },
                    _resetFocusItem: function() {
                        var e = this.options.highlightFirst ? 0 : -1;
                        this.options.virtual && this.listView.scrollTo(0), this.listView.focus(e)
                    },
                    _listBound: function() {
                        var e, n = this,
                            i = n.popup,
                            r = n.options,
                            o = n.dataSource.flatView(),
                            a = o.length,
                            s = n.element[0] === l();
                        n._angularItems("compile"), n._resizePopup(), i.position(), a && r.suggest && s && n.suggest(o[0]), n._open && (n._open = !1, e = a ? "open" : "close", n._typingTimeout && !s && (e = "close"), a && (n._resetFocusItem(), r.virtual && n.popup.unbind("activate", n._resetFocusItemHandler).one("activate", n._resetFocusItemHandler)), i[e](), n._typingTimeout = t), n._touchScroller && n._touchScroller.reset(), n._hideBusy(), n._makeUnselectable(), n.trigger("dataBound")
                    },
                    _mute: function(e) {
                        this._muted = !0, e.call(this), this._muted = !1
                    },
                    _listChange: function() {
                        var e = this._active || this.element[0] === l();
                        e && !this._muted && this._selectValue(this.listView.selectedDataItems()[0])
                    },
                    _selectValue: function(e) {
                        var t = this.options.separator,
                            n = "";
                        e && (n = this._text(e)), null === n && (n = ""), t && (n = r(s(this.element)[0], this._accessor(), n, t)), this._prev = n, this._accessor(n), this._placeholder()
                    },
                    _change: function() {
                        var e = this,
                            t = e.value(),
                            n = t !== u.unifyType(e._old, typeof t),
                            i = n && !e._typing,
                            r = e._oldText !== t;
                        (i || r) && e.element.trigger(g), n && (e._old = t, e.trigger(g)), e.typing = !1
                    },
                    _accessor: function(e) {
                        var n = this,
                            i = n.element[0];
                        return e === t ? (e = i.value, i.className.indexOf("k-readonly") > -1 && e === n.options.placeholder ? "" : e) : (i.value = null === e ? "" : e, n._placeholder(), t)
                    },
                    _keydown: function(e) {
                        var t = this,
                            n = e.keyCode,
                            i = t.popup.visible(),
                            r = this.listView.focus();
                        if (t._last = n, n === h.DOWN) i && this._move(r ? "focusNext" : "focusFirst"), e.preventDefault();
                        else if (n === h.UP) i && this._move(r ? "focusPrev" : "focusLast"), e.preventDefault();
                        else if (n === h.ENTER || n === h.TAB) {
                            if (n === h.ENTER && i && e.preventDefault(), i && r) {
                                if (t.trigger("select", {
                                    item: r
                                })) return;
                                this._select(r)
                            }
                            this._blur()
                        } else n === h.ESC ? (i && e.preventDefault(), t.close()) : t._search()
                    },
                    _keypress: function() {
                        this._oldText = this.element.val(), this._typing = !0
                    },
                    _move: function(e) {
                        this.listView[e](), this.options.suggest && this.suggest(this.listView.focus())
                    },
                    _hideBusy: function() {
                        var e = this;
                        clearTimeout(e._busy), e._loading.hide(), e.element.attr("aria-busy", !1), e._busy = null
                    },
                    _showBusy: function() {
                        var e = this;
                        e._busy || (e._busy = setTimeout(function() {
                            e.element.attr("aria-busy", !0), e._loading.show()
                        }, 100))
                    },
                    _placeholder: function(e) {
                        if (!c) {
                            var n, i = this,
                                r = i.element,
                                o = i.options.placeholder;
                            if (o) {
                                if (n = r.val(), e === t && (e = !n), e || (o = n !== o ? n : ""), n === i._old && !e) return;
                                r.toggleClass("k-readonly", e).val(o), o || r[0] !== document.activeElement || s(r[0], 0, 0)
                            }
                        }
                    },
                    _search: function() {
                        var e = this;
                        clearTimeout(e._typingTimeout), e._typingTimeout = setTimeout(function() {
                            e._prev !== e._accessor() && (e._prev = e._accessor(), e.search())
                        }, e.options.delay)
                    },
                    _select: function(e) {
                        this._active = !0, this.listView.select(e), this._active = !1
                    },
                    _loader: function() {
                        this._loading = e('<span class="k-icon k-loading" style="display:none"></span>').insertAfter(this.element)
                    },
                    _toggleHover: function(t) {
                        e(t.currentTarget).toggleClass(x, "mouseenter" === t.type)
                    },
                    _wrapper: function() {
                        var e, t = this,
                            n = t.element,
                            i = n[0];
                        e = n.parent(), e.is("span.k-widget") || (e = n.wrap("<span />").parent()), e.attr("tabindex", -1), e.attr("role", "presentation"), e[0].style.cssText = i.style.cssText, n.css({
                            width: "100%",
                            height: i.style.height
                        }), t._focused = t.element, t.wrapper = e.addClass("k-widget k-autocomplete k-header").addClass(i.className)
                    }
                });
            d.plugin(D)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.dropdownlist.min", ["kendo.list.min", "kendo.mobile.scroller.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t, n) {
                for (var i, r = 0, o = t.length - 1; o > r; ++r) i = t[r], i in e || (e[i] = {}), e = e[i];
                e[t[o]] = n
            }

            function i(e, t) {
                return e >= t && (e -= t), e
            }

            function r(e, t) {
                for (var n = 0; e.length > n; n++)
                    if (e.charAt(n) !== t) return !1;
                return !0
            }
            var o = window.kendo,
                a = o.ui,
                s = a.List,
                l = a.Select,
                c = o.support,
                d = o._activeElement,
                u = o.data.ObservableObject,
                h = o.keys,
                f = ".kendoDropDownList",
                p = "disabled",
                m = "readonly",
                g = "change",
                v = "k-state-focused",
                _ = "k-state-default",
                b = "k-state-disabled",
                w = "aria-disabled",
                y = "aria-readonly",
                k = "mouseenter" + f + " mouseleave" + f,
                x = "tabindex",
                C = "filter",
                S = "accept",
                T = "The `optionLabel` option is not valid due to missing fields. Define a custom optionLabel as shown here http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#configuration-optionLabel",
                D = e.proxy,
                A = l.extend({
                    init: function(n, i) {
                        var r, a, s, c = this,
                            d = i && i.index;
                        c.ns = f, i = e.isArray(i) ? {
                            dataSource: i
                        } : i, l.fn.init.call(c, n, i), i = c.options, n = c.element.on("focus" + f, D(c._focusHandler, c)), c._focusInputHandler = e.proxy(c._focusInput, c), c.optionLabel = e(), c._optionLabel(), c._inputTemplate(), c._reset(), c._prev = "", c._word = "", c._wrapper(), c._tabindex(), c.wrapper.data(x, c.wrapper.attr(x)), c._span(), c._popup(), c._mobile(), c._dataSource(), c._ignoreCase(), c._filterHeader(), c._aria(), c._enable(), c._oldIndex = c.selectedIndex = -1, d !== t && (i.index = d), c._initialIndex = i.index, c._initList(), c._cascade(), i.autoBind ? c.dataSource.fetch() : -1 === c.selectedIndex && (a = i.text || "", a || (r = i.optionLabel, r && 0 === i.index ? a = r : c._isSelect && (a = n.children(":selected").text())), c._textAccessor(a)), s = e(c.element).parents("fieldset").is(":disabled"), s && c.enable(!1), c.listView.bind("click", function(e) {
                            e.preventDefault()
                        }), o.notify(c)
                    },
                    options: {
                        name: "DropDownList",
                        enabled: !0,
                        autoBind: !0,
                        index: 0,
                        text: null,
                        value: null,
                        delay: 500,
                        height: 200,
                        dataTextField: "",
                        dataValueField: "",
                        optionLabel: "",
                        cascadeFrom: "",
                        cascadeFromField: "",
                        ignoreCase: !0,
                        animation: {},
                        filter: "none",
                        minLength: 1,
                        virtual: !1,
                        template: null,
                        valueTemplate: null,
                        optionLabelTemplate: null,
                        groupTemplate: "#:data#",
                        fixedGroupTemplate: "#:data#"
                    },
                    events: ["open", "close", g, "select", "filtering", "dataBinding", "dataBound", "cascade", "set"],
                    setOptions: function(e) {
                        l.fn.setOptions.call(this, e), this.listView.setOptions(this._listOptions(e)), this._optionLabel(), this._inputTemplate(), this._accessors(), this._filterHeader(), this._enable(), this._aria(), !this.value() && this.hasOptionLabel() && this.select(0)
                    },
                    destroy: function() {
                        var e = this;
                        l.fn.destroy.call(e), e.wrapper.off(f), e.element.off(f), e._inputWrapper.off(f), e._arrow.off(), e._arrow = null, e.optionLabel.off()
                    },
                    open: function() {
                        var e = this;
                        e.popup.visible() || (e.listView.bound() && e._state !== S ? e._allowOpening() && (e.popup.one("activate", e._focusInputHandler), e.popup.open(), e._focusItem()) : (e._open = !0, e._state = "rebind", e.filterInput && (e.filterInput.val(""), e._prev = ""), e._filterSource()))
                    },
                    _focusInput: function() {
                        this._focusElement(this.filterInput)
                    },
                    _allowOpening: function() {
                        return this.hasOptionLabel() || this.filterInput || this.dataSource.view().length
                    },
                    toggle: function(e) {
                        this._toggle(e, !0)
                    },
                    current: function(e) {
                        var n;
                        return e === t ? (n = this.listView.focus(), !n && 0 === this.selectedIndex && this.hasOptionLabel() ? this.optionLabel : n) : (this._focus(e), t)
                    },
                    dataItem: function(n) {
                        var i = this,
                            r = null;
                        if (null === n) return n;
                        if (n === t) r = i.listView.selectedDataItems()[0];
                        else {
                            if ("number" != typeof n) {
                                if (i.options.virtual) return i.dataSource.getByUid(e(n).data("uid"));
                                n = n.hasClass("k-list-optionlabel") ? -1 : e(i.items()).index(n)
                            } else i.hasOptionLabel() && (n -= 1);
                            r = i.dataSource.flatView()[n]
                        }
                        return r || (r = i._optionLabelDataItem()), r
                    },
                    refresh: function() {
                        this.listView.refresh()
                    },
                    text: function(e) {
                        var n, i, r = this,
                            o = r.options.ignoreCase;
                        return e = null === e ? "" : e, e === t ? r._textAccessor() : ("string" == typeof e && (i = o ? e.toLowerCase() : e, r._select(function(e) {
                            return e = r._text(e), o && (e = (e + "").toLowerCase()), e === i
                        }), n = r.dataItem(), n && (e = n)), r._textAccessor(e), t)
                    },
                    value: function(e) {
                        var n = this,
                            i = n.listView,
                            r = n.dataSource;
                        return e === t ? (e = n._accessor() || n.listView.value()[0], e === t || null === e ? "" : e) : ((e || !n.hasOptionLabel()) && (n._initialIndex = null), this.trigger("set", {
                            value: e
                        }), n._request && n.options.cascadeFrom && n.listView.bound() ? (n._valueSetter && r.unbind(g, n._valueSetter), n._valueSetter = D(function() {
                            n.value(e)
                        }, n), r.one(g, n._valueSetter), t) : (n._isFilterEnabled() && i.bound() && i.isFiltered() ? n._clearFilter() : n._fetchData(), i.value(e).done(function() {
                            -1 === n.selectedIndex && n.text() && (n.text(""), n._accessor("", -1)), n._old = n._accessor(), n._oldIndex = n.selectedIndex
                        }), t))
                    },
                    hasOptionLabel: function() {
                        return this.optionLabel && !!this.optionLabel[0]
                    },
                    _optionLabel: function() {
                        var n = this,
                            i = n.options,
                            r = i.optionLabel,
                            a = i.optionLabelTemplate;
                        return r ? (a || (a = "#:", a += "string" == typeof r ? "data" : o.expr(i.dataTextField, "data"), a += "#"), "function" != typeof a && (a = o.template(a)), n.optionLabelTemplate = a, n.hasOptionLabel() || (n.optionLabel = e('<div class="k-list-optionlabel"></div>').prependTo(n.list)), n.optionLabel.html(a(r)).off().click(D(n._click, n)).on(k, n._toggleHover), n.angular("compile", function() {
                            return {
                                elements: n.optionLabel,
                                data: [{
                                    dataItem: n._optionLabelDataItem()
                                }]
                            }
                        }), t) : (n.optionLabel.off().remove(), n.optionLabel = e(), t)
                    },
                    _optionLabelText: function() {
                        var e = this.options.optionLabel;
                        return "string" == typeof e ? e : this._text(e)
                    },
                    _optionLabelDataItem: function() {
                        var t = this,
                            n = t.options.optionLabel;
                        return t.hasOptionLabel() ? e.isPlainObject(n) ? new u(n) : t._assignInstance(t._optionLabelText(), "") : null
                    },
                    _buildOptions: function(e) {
                        var n, i, r = this;
                        r._isSelect && (n = r.listView.value()[0], i = r._optionLabelDataItem(), (n === t || null === n) && (n = ""), i && (i = '<option value="' + r._value(i) + '">' + r._text(i) + "</option>"), r._options(e, i, n), n !== s.unifyType(r._accessor(), typeof n) && (r._customOption = null, r._custom(n)))
                    },
                    _listBound: function() {
                        var e, t = this,
                            n = t._initialIndex,
                            i = t._state === C,
                            r = t.dataSource.flatView();
                        t._angularItems("compile"), t._presetValue = !1, t._resizePopup(!0), t.popup.position(), t._buildOptions(r), t._makeUnselectable(), i || (t._open && t.toggle(t._allowOpening()), t._open = !1, t._fetch || (r.length ? (!t.listView.value().length && n > -1 && null !== n && t.select(n), t._initialIndex = null, e = t.listView.selectedDataItems()[0], e && t.text() !== t._text(e) && t._selectValue(e)) : t._textAccessor() !== t._optionLabelText() && (t.listView.value(""), t._selectValue(null), t._oldIndex = t.selectedIndex))), t._hideBusy(), t.trigger("dataBound")
                    },
                    _listChange: function() {
                        this._selectValue(this.listView.selectedDataItems()[0]), (this._presetValue || this._old && -1 === this._oldIndex) && (this._oldIndex = this.selectedIndex)
                    },
                    _focusHandler: function() {
                        this.wrapper.focus()
                    },
                    _focusinHandler: function() {
                        this._inputWrapper.addClass(v), this._prevent = !1
                    },
                    _focusoutHandler: function() {
                        var e = this,
                            t = e._state === C,
                            n = window.self !== window.top,
                            i = e._focus();
                        e._prevent || (clearTimeout(e._typingTimeout), t && i && !e.trigger("select", {
                            item: i
                        }) && e._select(i, !e.dataSource.view().length), c.mobileOS.ios && n ? e._change() : e._blur(), e._inputWrapper.removeClass(v), e._prevent = !0, e._open = !1, e.element.blur())
                    },
                    _wrapperMousedown: function() {
                        this._prevent = !!this.filterInput
                    },
                    _wrapperClick: function(e) {
                        e.preventDefault(), this.popup.unbind("activate", this._focusInputHandler), this._focused = this.wrapper, this._toggle()
                    },
                    _editable: function(e) {
                        var t = this,
                            n = t.element,
                            i = e.disable,
                            r = e.readonly,
                            o = t.wrapper.add(t.filterInput).off(f),
                            a = t._inputWrapper.off(k);
                        r || i ? i ? (o.removeAttr(x), a.addClass(b).removeClass(_)) : (a.addClass(_).removeClass(b), o.on("focusin" + f, D(t._focusinHandler, t)).on("focusout" + f, D(t._focusoutHandler, t))) : (n.removeAttr(p).removeAttr(m), a.addClass(_).removeClass(b).on(k, t._toggleHover), o.attr(x, o.data(x)).attr(w, !1).attr(y, !1).on("keydown" + f, D(t._keydown, t)).on("focusin" + f, D(t._focusinHandler, t)).on("focusout" + f, D(t._focusoutHandler, t)).on("mousedown" + f, D(t._wrapperMousedown, t)), t.wrapper.on("click" + f, D(t._wrapperClick, t)), t.filterInput || o.on("keypress" + f, D(t._keypress, t))), n.attr(p, i).attr(m, r), o.attr(w, i).attr(y, r)
                    },
                    _keydown: function(e) {
                        var n, i, r = this,
                            o = e.keyCode,
                            a = e.altKey,
                            s = r.popup.visible();
                        if (r.filterInput && (n = r.filterInput[0] === d()), o === h.LEFT ? (o = h.UP, i = !0) : o === h.RIGHT && (o = h.DOWN, i = !0), !i || !n) {
                            if (e.keyCode = o, (a && o === h.UP || o === h.ESC) && r._focusElement(r.wrapper), o === h.ENTER && r._typingTimeout && r.filterInput && s) return e.preventDefault(), t;
                            i = r._move(e), i || (s && r.filterInput || (o === h.HOME ? (i = !0, r._firstItem()) : o === h.END && (i = !0, r._lastItem()), i && (r._select(r._focus()), e.preventDefault())), a || i || !r.filterInput || r._search())
                        }
                    },
                    _matchText: function(e, n) {
                        var i = this.options.ignoreCase;
                        return e === t || null === e ? !1 : (e += "", i && (e = e.toLowerCase()), 0 === e.indexOf(n))
                    },
                    _shuffleData: function(e, t) {
                        var n = this._optionLabelDataItem();
                        return n && (e = [n].concat(e)), e.slice(t).concat(e.slice(0, t))
                    },
                    _selectNext: function() {
                        var e, t, n, o = this,
                            a = o.dataSource.flatView(),
                            s = a.length + (o.hasOptionLabel() ? 1 : 0),
                            l = r(o._word, o._last),
                            c = o.selectedIndex;
                        for (-1 === c ? c = 0 : (c += l ? 1 : 0, c = i(c, s)), a = a.toJSON ? a.toJSON() : a.slice(), a = o._shuffleData(a, c), n = 0; s > n && (t = o._text(a[n]), !l || !o._matchText(t, o._last)) && !o._matchText(t, o._word); n++);
                        n !== s && (e = o._focus(), o._select(i(c + n, s)), o.trigger("select", {
                            item: o._focus()
                        }) && o._select(e), o.popup.visible() || o._change())
                    },
                    _keypress: function(e) {
                        var t, n = this;
                        0 !== e.which && e.keyCode !== o.keys.ENTER && (t = String.fromCharCode(e.charCode || e.keyCode), n.options.ignoreCase && (t = t.toLowerCase()), " " === t && e.preventDefault(), n._word += t, n._last = t, n._search())
                    },
                    _popupOpen: function() {
                        var e = this.popup;
                        e.wrapper = o.wrap(e.element), e.element.closest(".km-root")[0] && (e.wrapper.addClass("km-popup km-widget"), this.wrapper.addClass("km-widget"))
                    },
                    _popup: function() {
                        l.fn._popup.call(this), this.popup.one("open", D(this._popupOpen, this))
                    },
                    _click: function(n) {
                        var i = n.item || e(n.currentTarget);
                        return n.preventDefault(), this.trigger("select", {
                            item: i
                        }) ? (this.close(), t) : (this._userTriggered = !0, this._select(i), this._focusElement(this.wrapper), this._blur(), t)
                    },
                    _focusElement: function(e) {
                        var t = d(),
                            n = this.wrapper,
                            i = this.filterInput,
                            r = e === i ? n : i,
                            o = c.mobileOS && (c.touch || c.MSPointers || c.pointers);
                        i && i[0] === e[0] && o || i && r[0] === t && (this._prevent = !0, this._focused = e.focus())
                    },
                    _filter: function(e) {
                        var t, n;
                        e && (t = this, n = t.options.ignoreCase, n && (e = e.toLowerCase()), t._select(function(n) {
                            return t._matchText(t._text(n), e)
                        }))
                    },
                    _search: function() {
                        var e = this,
                            n = e.dataSource;
                        if (clearTimeout(e._typingTimeout), e._isFilterEnabled()) e._typingTimeout = setTimeout(function() {
                            var t = e.filterInput.val();
                            e._prev !== t && (e._prev = t, e.search(t)), e._typingTimeout = null
                        }, e.options.delay);
                        else {
                            if (e._typingTimeout = setTimeout(function() {
                                e._word = ""
                            }, e.options.delay), !e.listView.bound()) return n.fetch().done(function() {
                                e._selectNext()
                            }), t;
                            e._selectNext()
                        }
                    },
                    _get: function(t) {
                        var n, i, r, o = "function" == typeof t,
                            a = o ? e() : e(t);
                        if (this.hasOptionLabel() && ("number" == typeof t ? t > -1 && (t -= 1) : a.hasClass("k-list-optionlabel") && (t = -1)), o) {
                            for (n = this.dataSource.flatView(), r = 0; n.length > r; r++)
                                if (t(n[r])) {
                                    t = r, i = !0;
                                    break
                                } i || (t = -1)
                        }
                        return t
                    },
                    _firstItem: function() {
                        this.hasOptionLabel() ? this._focus(this.optionLabel) : this.listView.focusFirst()
                    },
                    _lastItem: function() {
                        this._resetOptionLabel(), this.listView.focusLast()
                    },
                    _nextItem: function() {
                        this.optionLabel.hasClass("k-state-focused") ? (this._resetOptionLabel(), this.listView.focusFirst()) : this.listView.focusNext()
                    },
                    _prevItem: function() {
                        this.optionLabel.hasClass("k-state-focused") || (this.listView.focusPrev(), this.listView.focus() || this._focus(this.optionLabel))
                    },
                    _focusItem: function() {
                        var e = this.listView,
                            n = e.focus(),
                            i = e.select();
                        i = i[i.length - 1], i === t && this.options.highlightFirst && !n && (i = 0), i !== t ? e.focus(i) : this.options.optionLabel ? (this._focus(this.optionLabel), this._select(this.optionLabel)) : e.scrollToIndex(0)
                    },
                    _resetOptionLabel: function(e) {
                        this.optionLabel.removeClass("k-state-focused" + (e || "")).removeAttr("id")
                    },
                    _focus: function(e) {
                        var n = this.listView,
                            i = this.optionLabel;
                        return e === t ? (e = n.focus(), !e && i.hasClass("k-state-focused") && (e = i), e) : (this._resetOptionLabel(), e = this._get(e), n.focus(e), -1 === e && (i.addClass("k-state-focused").attr("id", n._optionID), this._focused.add(this.filterInput).removeAttr("aria-activedescendant").attr("aria-activedescendant", n._optionID)), t)
                    },
                    _select: function(e, t) {
                        var n = this;
                        e = n._get(e), n.listView.select(e), t || n._state !== C || (n._state = S), -1 === e && n._selectValue(null)
                    },
                    _selectValue: function(e) {
                        var n = this,
                            i = n.options.optionLabel,
                            r = n.listView.select(),
                            o = "",
                            a = "";
                        r = r[r.length - 1], r === t && (r = -1), this._resetOptionLabel(" k-state-selected"), e ? (a = e, o = n._dataValue(e), i && (r += 1)) : i && (n._focus(n.optionLabel.addClass("k-state-selected")), a = n._optionLabelText(), o = "string" == typeof i ? "" : n._value(i), r = 0), n.selectedIndex = r, null === o && (o = ""), n._textAccessor(a), n._accessor(o, r), n._triggerCascade()
                    },
                    _mobile: function() {
                        var e = this,
                            t = e.popup,
                            n = c.mobileOS,
                            i = t.element.parents(".km-root").eq(0);
                        i.length && n && (t.options.animation.open.effects = n.android || n.meego ? "fadeIn" : n.ios || n.wp ? "slideIn:up" : t.options.animation.open.effects)
                    },
                    _filterHeader: function() {
                        var t;
                        this.filterInput && (this.filterInput.off(f).parent().remove(), this.filterInput = null), this._isFilterEnabled() && (t = '<span unselectable="on" class="k-icon k-i-search">select</span>', this.filterInput = e('<input class="k-textbox"/>').attr({
                            placeholder: this.element.attr("placeholder"),
                            role: "listbox",
                            "aria-haspopup": !0,
                            "aria-expanded": !1
                        }), this.list.prepend(e('<span class="k-list-filter" />').append(this.filterInput.add(t))))
                    },
                    _span: function() {
                        var t, n = this,
                            i = n.wrapper,
                            r = "span.k-input";
                        t = i.find(r), t[0] || (i.append('<span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input">&nbsp;</span><span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-arrow-s">select</span></span></span>').append(n.element), t = i.find(r)), n.span = t, n._inputWrapper = e(i[0].firstChild), n._arrow = i.find(".k-icon")
                    },
                    _wrapper: function() {
                        var e, t = this,
                            n = t.element,
                            i = n[0];
                        e = n.parent(), e.is("span.k-widget") || (e = n.wrap("<span />").parent(), e[0].style.cssText = i.style.cssText, e[0].title = i.title), n.hide(), t._focused = t.wrapper = e.addClass("k-widget k-dropdown k-header").addClass(i.className).css("display", "").attr({
                            accesskey: n.attr("accesskey"),
                            unselectable: "on",
                            role: "listbox",
                            "aria-haspopup": !0,
                            "aria-expanded": !1
                        })
                    },
                    _clearSelection: function(e) {
                        this.select(e.value() ? 0 : -1)
                    },
                    _inputTemplate: function() {
                        var t = this,
                            n = t.options.valueTemplate;
                        if (n = n ? o.template(n) : e.proxy(o.template("#:this._text(data)#", {
                            useWithBlock: !1
                        }), t), t.valueTemplate = n, t.hasOptionLabel() && !t.options.optionLabelTemplate) try {
                            t.valueTemplate(t._optionLabelDataItem())
                        } catch (i) {
                            throw Error(T)
                        }
                    },
                    _textAccessor: function(n) {
                        var i, r = null,
                            o = this.valueTemplate,
                            a = this.options,
                            s = a.optionLabel,
                            l = this.span;
                        if (n === t) return l.text();
                        e.isPlainObject(n) || n instanceof u ? r = n : s && this._optionLabelText() === n && (r = s, o = this.optionLabelTemplate), r || (r = this._assignInstance(n, this._accessor())), i = function() {
                            return {
                                elements: l.get(),
                                data: [{
                                    dataItem: r
                                }]
                            }
                        }, this.angular("cleanup", i);
                        try {
                            l.html(o(r))
                        } catch (c) {
                            l.html("")
                        }
                        this.angular("compile", i)
                    },
                    _preselect: function(e, t) {
                        e || t || (t = this._optionLabelText()), this._accessor(e), this._textAccessor(t), this._old = this._accessor(), this._oldIndex = this.selectedIndex, this.listView.setValue(e), this._initialIndex = null, this._presetValue = !0
                    },
                    _assignInstance: function(e, t) {
                        var i = this.options.dataTextField,
                            r = {};
                        return i ? (n(r, i.split("."), e), n(r, this.options.dataValueField.split("."), t), r = new u(r)) : r = e, r
                    }
                });
            a.plugin(A)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.combobox.min", ["kendo.list.min", "kendo.mobile.scroller.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.ui,
                r = i.List,
                o = i.Select,
                a = n.caret,
                s = n.support,
                l = s.placeholder,
                c = n._activeElement,
                d = n.keys,
                u = ".kendoComboBox",
                h = "click" + u,
                f = "mousedown" + u,
                p = "disabled",
                m = "readonly",
                g = "change",
                v = "k-state-default",
                _ = "k-state-focused",
                b = "k-state-disabled",
                w = "aria-disabled",
                y = "aria-readonly",
                k = "filter",
                x = "accept",
                C = "rebind",
                S = "mouseenter" + u + " mouseleave" + u,
                T = e.proxy,
                D = o.extend({
                    init: function(t, i) {
                        var r, a, s = this;
                        s.ns = u, i = e.isArray(i) ? {
                            dataSource: i
                        } : i, o.fn.init.call(s, t, i), i = s.options, t = s.element.on("focus" + u, T(s._focusHandler, s)), i.placeholder = i.placeholder || t.attr("placeholder"), s._reset(), s._wrapper(), s._input(), s._tabindex(s.input), s._popup(), s._dataSource(), s._ignoreCase(), s._enable(), s._oldIndex = s.selectedIndex = -1, s._aria(), s._initialIndex = i.index, s._initList(), s._cascade(), i.autoBind ? s._filterSource() : (r = i.text, !r && s._isSelect && (r = t.children(":selected").text()), r && s._setText(r)), r || s._placeholder(), a = e(s.element).parents("fieldset").is(":disabled"), a && s.enable(!1), n.notify(s)
                    },
                    options: {
                        name: "ComboBox",
                        enabled: !0,
                        index: -1,
                        text: null,
                        value: null,
                        autoBind: !0,
                        delay: 200,
                        dataTextField: "",
                        dataValueField: "",
                        minLength: 0,
                        height: 200,
                        highlightFirst: !0,
                        filter: "none",
                        placeholder: "",
                        suggest: !1,
                        cascadeFrom: "",
                        cascadeFromField: "",
                        ignoreCase: !0,
                        animation: {},
                        virtual: !1,
                        template: null,
                        groupTemplate: "#:data#",
                        fixedGroupTemplate: "#:data#"
                    },
                    events: ["open", "close", g, "select", "filtering", "dataBinding", "dataBound", "cascade", "set"],
                    setOptions: function(e) {
                        o.fn.setOptions.call(this, e), this.listView.setOptions(e), this._accessors(), this._aria()
                    },
                    destroy: function() {
                        var e = this;
                        e.input.off(u), e.element.off(u), e._inputWrapper.off(u), e._arrow.parent().off(h + " " + f), o.fn.destroy.call(e)
                    },
                    _focusHandler: function() {
                        this.input.focus()
                    },
                    _arrowClick: function() {
                        this._toggle()
                    },
                    _inputFocus: function() {
                        this._inputWrapper.addClass(_), this._placeholder(!1)
                    },
                    _inputFocusout: function() {
                        var e = this,
                            n = e.value();
                        return e._inputWrapper.removeClass(_), clearTimeout(e._typingTimeout), e._typingTimeout = null, e.text(e.text()), n !== e.value() && e.trigger("select", {
                            item: e._focus()
                        }) ? (e.value(n), t) : (e._placeholder(), e._blur(), e.element.blur(), t)
                    },
                    _editable: function(e) {
                        var t = this,
                            n = e.disable,
                            i = e.readonly,
                            r = t._inputWrapper.off(u),
                            o = t.element.add(t.input.off(u)),
                            a = t._arrow.parent().off(h + " " + f);
                        i || n ? (r.addClass(n ? b : v).removeClass(n ? v : b), o.attr(p, n).attr(m, i).attr(w, n).attr(y, i)) : (r.addClass(v).removeClass(b).on(S, t._toggleHover),
                            o.removeAttr(p).removeAttr(m).attr(w, !1).attr(y, !1), a.on(h, T(t._arrowClick, t)).on(f, function(e) {
                            e.preventDefault()
                        }), t.input.on("keydown" + u, T(t._keydown, t)).on("focus" + u, T(t._inputFocus, t)).on("focusout" + u, T(t._inputFocusout, t)))
                    },
                    open: function() {
                        var e = this,
                            t = e._state;
                        e.popup.visible() || (!e.listView.bound() && t !== k || t === x ? (e._open = !0, e._state = C, e._filterSource()) : (e.popup.open(), e._focusItem()))
                    },
                    _updateSelectionState: function() {
                        var e = this,
                            n = e.options.text,
                            i = e.options.value;
                        e.listView.isFiltered() || (-1 === e.selectedIndex ? ((n === t || null === n) && (n = i), e._accessor(i), e.input.val(n || e.input.val()), e._placeholder()) : -1 === e._oldIndex && (e._oldIndex = e.selectedIndex))
                    },
                    _buildOptions: function(e) {
                        var n, i = this;
                        i._isSelect && (n = i._customOption, i._state === C && (i._state = ""), i._customOption = t, i._options(e, "", i.value()), n && n[0].selected && i._custom(n.val()))
                    },
                    _updateSelection: function() {
                        var n, i = this,
                            r = i.listView,
                            o = i._initialIndex,
                            a = null !== o && o > -1,
                            s = i._state === k;
                        return s ? (e(r.focus()).removeClass("k-state-selected"), t) : (i._fetch || (r.value().length || (a ? i.select(o) : i._accessor() && r.value(i._accessor())), i._initialIndex = null, n = r.selectedDataItems()[0], n && (i._value(n) !== i.value() && i._custom(i._value(n)), i.text() && i.text() !== i._text(n) && i._selectValue(n))), t)
                    },
                    _updateItemFocus: function() {
                        var e = this.listView;
                        this.options.highlightFirst ? e.focus() || e.focusIndex() || e.focus(0) : e.focus(-1)
                    },
                    _listBound: function() {
                        var e = this,
                            n = e.input[0] === c(),
                            i = e.dataSource.flatView(),
                            r = e.listView.skip(),
                            o = r === t || 0 === r;
                        e._angularItems("compile"), e._presetValue = !1, e._resizePopup(), e.popup.position(), e._buildOptions(i), e._makeUnselectable(), e._updateSelection(), i.length && o && (e._updateItemFocus(), e.options.suggest && n && e.input.val() && e.suggest(i[0])), e._open && (e._open = !1, e._typingTimeout && !n ? e.popup.close() : e.toggle(!!i.length), e._typingTimeout = null), e._hideBusy(), e.trigger("dataBound")
                    },
                    _listChange: function() {
                        this._selectValue(this.listView.selectedDataItems()[0]), this._presetValue && (this._oldIndex = this.selectedIndex)
                    },
                    _get: function(e) {
                        var t, n, i;
                        if ("function" == typeof e) {
                            for (t = this.dataSource.flatView(), i = 0; t.length > i; i++)
                                if (e(t[i])) {
                                    e = i, n = !0;
                                    break
                                } n || (e = -1)
                        }
                        return e
                    },
                    _select: function(e, t) {
                        e = this._get(e), -1 === e && (this.input[0].value = "", this._accessor("")), this.listView.select(e), t || this._state !== k || (this._state = x)
                    },
                    _selectValue: function(e) {
                        var n = this.listView.select(),
                            i = "",
                            r = "";
                        n = n[n.length - 1], n === t && (n = -1), this.selectedIndex = n, -1 === n ? (i = r = this.input[0].value, this.listView.focus(-1)) : (e && (i = this._dataValue(e), r = this._text(e)), null === i && (i = "")), this._prev = this.input[0].value = r, this._accessor(i !== t ? i : r, n), this._placeholder(), this._triggerCascade()
                    },
                    refresh: function() {
                        this.listView.refresh()
                    },
                    suggest: function(e) {
                        var n, i = this,
                            o = i.input[0],
                            s = i.text(),
                            l = a(o)[0],
                            u = i._last;
                        return u == d.BACKSPACE || u == d.DELETE ? (i._last = t, t) : (e = e || "", "string" != typeof e && (e[0] && (e = i.dataSource.view()[r.inArray(e[0], i.ul[0])]), e = e ? i._text(e) : ""), 0 >= l && (l = s.toLowerCase().indexOf(e.toLowerCase()) + 1), e ? (e = "" + e, n = e.toLowerCase().indexOf(s.toLowerCase()), n > -1 && (s += e.substring(n + s.length))) : s = s.substring(0, l), s.length === l && e || (o.value = s, o === c() && a(o, l, s.length)), t)
                    },
                    text: function(e) {
                        var n, i, o, a, s, l;
                        return e = null === e ? "" : e, n = this, i = n.input[0], o = n.options.ignoreCase, a = e, e === t ? i.value : n.options.autoBind !== !1 || n.listView.bound() ? (s = n.dataItem(), s && n._text(s) === e && (l = n._value(s), l === r.unifyType(n._old, typeof l)) ? (n._triggerCascade(), t) : (o && (a = a.toLowerCase()), n._select(function(e) {
                            return e = n._text(e), o && (e = (e + "").toLowerCase()), e === a
                        }), 0 > n.selectedIndex && (n._accessor(e), i.value = e, n._triggerCascade()), n._prev = i.value, t)) : (n._setText(e), t)
                    },
                    toggle: function(e) {
                        this._toggle(e, !0)
                    },
                    value: function(e) {
                        var n = this,
                            i = n.options,
                            r = n.listView;
                        return e === t ? (e = n._accessor() || n.listView.value()[0], e === t || null === e ? "" : e) : (n.trigger("set", {
                            value: e
                        }), (e !== i.value || n.input.val() !== i.text) && (n._accessor(e), n._isFilterEnabled() && r.bound() && r.isFiltered() ? n._clearFilter() : n._fetchData(), r.value(e).done(function() {
                            -1 === n.selectedIndex && (n._accessor(e), n.input.val(e), n._placeholder(!0)), n._old = n._accessor(), n._oldIndex = n.selectedIndex, n._prev = n.input.val(), n._state === k && (n._state = x)
                        })), t)
                    },
                    _click: function(e) {
                        var n = e.item;
                        return e.preventDefault(), this.trigger("select", {
                            item: n
                        }) ? (this.close(), t) : (this._userTriggered = !0, this._select(n), this._blur(), t)
                    },
                    _filter: function(e) {
                        var n, i = this,
                            r = i.options,
                            o = i.dataSource,
                            a = r.ignoreCase,
                            s = function(n) {
                                var r = i._text(n);
                                return r !== t ? (r += "", "" !== r && "" === e ? !1 : (a && (r = r.toLowerCase()), 0 === r.indexOf(e))) : t
                            };
                        return a && (e = e.toLowerCase()), i.ul[0].firstChild ? (this.listView.focus(this._get(s)), n = this.listView.focus(), n && (r.suggest && i.suggest(n), this.open()), this.options.highlightFirst && !e && this.listView.focusFirst(), t) : (o.one(g, function() {
                            o.view()[0] && i.search(e)
                        }).fetch(), t)
                    },
                    _input: function() {
                        var t, n = this,
                            i = n.element.removeClass("k-input")[0],
                            r = i.accessKey,
                            o = n.wrapper,
                            a = "input.k-input",
                            s = i.name || "";
                        s && (s = 'name="' + s + '_input" '), t = o.find(a), t[0] || (o.append('<span tabindex="-1" unselectable="on" class="k-dropdown-wrap k-state-default"><input ' + s + 'class="k-input" type="text" autocomplete="off"/><span tabindex="-1" unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-arrow-s">select</span></span></span>').append(n.element), t = o.find(a)), t[0].style.cssText = i.style.cssText, t[0].title = i.title, i.maxLength > -1 && (t[0].maxLength = i.maxLength), t.addClass(i.className).val(this.options.text || i.value).css({
                            width: "100%",
                            height: i.style.height
                        }).attr({
                            role: "combobox",
                            "aria-expanded": !1
                        }).show(), l && t.attr("placeholder", n.options.placeholder), r && (i.accessKey = "", t[0].accessKey = r), n._focused = n.input = t, n._inputWrapper = e(o[0].firstChild), n._arrow = o.find(".k-icon").attr({
                            role: "button",
                            tabIndex: -1
                        }), i.id && n._arrow.attr("aria-controls", n.ul[0].id)
                    },
                    _keydown: function(e) {
                        var t = this,
                            n = e.keyCode;
                        t._last = n, clearTimeout(t._typingTimeout), t._typingTimeout = null, n == d.TAB || t._move(e) || t._search()
                    },
                    _placeholder: function(e) {
                        if (!l) {
                            var n, i = this,
                                r = i.input,
                                o = i.options.placeholder;
                            if (o) {
                                if (n = i.value(), e === t && (e = !n), r.toggleClass("k-readonly", e), !e) {
                                    if (n) return;
                                    o = ""
                                }
                                r.val(o), o || r[0] !== c() || a(r[0], 0, 0)
                            }
                        }
                    },
                    _search: function() {
                        var e = this;
                        e._typingTimeout = setTimeout(function() {
                            var t = e.text();
                            e._prev !== t && (e._prev = t, "none" === e.options.filter && e.listView.select(-1), e.search(t)), e._typingTimeout = null
                        }, e.options.delay)
                    },
                    _setText: function(e) {
                        this.input.val(e), this._prev = e
                    },
                    _wrapper: function() {
                        var e = this,
                            t = e.element,
                            n = t.parent();
                        n.is("span.k-widget") || (n = t.hide().wrap("<span />").parent(), n[0].style.cssText = t[0].style.cssText), e.wrapper = n.addClass("k-widget k-combobox k-header").addClass(t[0].className).css("display", "")
                    },
                    _clearSelection: function(e, t) {
                        var n = this,
                            i = e.value(),
                            r = i && -1 === e.selectedIndex; - 1 == this.selectedIndex && this.value() || (t || !i || r) && (n.options.value = "", n.value(""))
                    },
                    _preselect: function(e, t) {
                        this.input.val(t), this._accessor(e), this._old = this._accessor(), this._oldIndex = this.selectedIndex, this.listView.setValue(e), this._placeholder(), this._initialIndex = null, this._presetValue = !0
                    }
                });
            i.plugin(D)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.multiselect.min", ["kendo.list.min", "kendo.mobile.scroller.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t) {
                var n;
                if (null === e && null !== t || null !== e && null === t) return !1;
                if (n = e.length, n !== t.length) return !1;
                for (; n--;)
                    if (e[n] !== t[n]) return !1;
                return !0
            }
            var i = window.kendo,
                r = i.ui,
                o = r.List,
                a = i.keys,
                s = i._activeElement,
                l = i.data.ObservableArray,
                c = e.proxy,
                d = "id",
                u = "li",
                h = "accept",
                f = "filter",
                p = "rebind",
                m = "open",
                g = "close",
                v = "change",
                _ = "progress",
                b = "select",
                w = "aria-disabled",
                y = "aria-readonly",
                k = "k-state-focused",
                x = "k-loading-hidden",
                C = "k-state-hover",
                S = "k-state-disabled",
                T = "disabled",
                D = "readonly",
                A = ".kendoMultiSelect",
                E = "click" + A,
                F = "keydown" + A,
                I = "mouseenter" + A,
                M = "mouseleave" + A,
                R = I + " " + M,
                P = /"/g,
                z = e.isArray,
                B = ["font-family", "font-size", "font-stretch", "font-style", "font-weight", "letter-spacing", "text-transform", "line-height"],
                L = o.extend({
                    init: function(t, n) {
                        var r, a, s = this;
                        s.ns = A, o.fn.init.call(s, t, n), s._optionsMap = {}, s._customOptions = {}, s._wrapper(), s._tagList(), s._input(), s._textContainer(), s._loader(), s._tabindex(s.input), t = s.element.attr("multiple", "multiple").hide(), n = s.options, n.placeholder || (n.placeholder = t.data("placeholder")), r = t.attr(d), r && (s._tagID = r + "_tag_active", r += "_taglist", s.tagList.attr(d, r)), s._aria(r), s._dataSource(), s._ignoreCase(), s._popup(), s._tagTemplate(), s._initList(), s._reset(), s._enable(), s._placeholder(), n.autoBind ? s.dataSource.fetch() : n.value && s._preselect(n.value), a = e(s.element).parents("fieldset").is(":disabled"), a && s.enable(!1), i.notify(s)
                    },
                    options: {
                        name: "MultiSelect",
                        tagMode: "multiple",
                        enabled: !0,
                        autoBind: !0,
                        autoClose: !0,
                        highlightFirst: !0,
                        dataTextField: "",
                        dataValueField: "",
                        filter: "startswith",
                        ignoreCase: !0,
                        minLength: 0,
                        delay: 100,
                        value: null,
                        maxSelectedItems: null,
                        placeholder: "",
                        height: 200,
                        animation: {},
                        virtual: !1,
                        itemTemplate: "",
                        tagTemplate: "",
                        groupTemplate: "#:data#",
                        fixedGroupTemplate: "#:data#"
                    },
                    events: [m, g, v, b, "filtering", "dataBinding", "dataBound"],
                    setDataSource: function(e) {
                        this.options.dataSource = e, this._state = "", this._dataSource(), this.listView.setDataSource(this.dataSource), this.options.autoBind && this.dataSource.fetch()
                    },
                    setOptions: function(e) {
                        var t = this._listOptions(e);
                        o.fn.setOptions.call(this, e), this.listView.setOptions(t), this._accessors(), this._aria(this.tagList.attr(d)), this._tagTemplate()
                    },
                    currentTag: function(e) {
                        var n = this;
                        return e === t ? n._currentTag : (n._currentTag && (n._currentTag.removeClass(k).removeAttr(d), n.input.removeAttr("aria-activedescendant")), e && (e.addClass(k).attr(d, n._tagID), n.input.attr("aria-activedescendant", n._tagID)), n._currentTag = e, t)
                    },
                    dataItems: function() {
                        return this.listView.selectedDataItems()
                    },
                    destroy: function() {
                        var e = this,
                            t = e.ns;
                        clearTimeout(e._busy), clearTimeout(e._typingTimeout), e.wrapper.off(t), e.tagList.off(t), e.input.off(t), o.fn.destroy.call(e)
                    },
                    _activateItem: function() {
                        o.fn._activateItem.call(this), this.currentTag(null)
                    },
                    _listOptions: function(t) {
                        var n = this,
                            r = o.fn._listOptions.call(n, e.extend(t, {
                                selectedItemChange: c(n._selectedItemChange, n),
                                selectable: "multiple"
                            })),
                            a = this.options.itemTemplate || this.options.template,
                            s = r.itemTemplate || a || r.template;
                        return s || (s = "#:" + i.expr(r.dataTextField, "data") + "#"), r.template = s, r
                    },
                    _setListValue: function() {
                        o.fn._setListValue.call(this, this._initialValues.slice(0))
                    },
                    _listChange: function(e) {
                        this._state === p && (this._state = "", e.added = []), this._selectValue(e.added, e.removed)
                    },
                    _selectedItemChange: function(e) {
                        var t, n, i = e.items;
                        for (n = 0; i.length > n; n++) t = i[n], this.tagList.children().eq(t.index).children("span:first").html(this.tagTextTemplate(t.item))
                    },
                    _wrapperMousedown: function(t) {
                        var n = this,
                            r = "input" !== t.target.nodeName.toLowerCase(),
                            o = e(t.target),
                            a = o.hasClass("k-select") || o.hasClass("k-icon");
                        a && (a = !o.closest(".k-select").children(".k-i-arrow-s").length), !r || a && i.support.mobileOS || t.preventDefault(), a || (n.input[0] !== s() && r && n.input.focus(), 0 === n.options.minLength && n.open())
                    },
                    _inputFocus: function() {
                        this._placeholder(!1), this.wrapper.addClass(k)
                    },
                    _inputFocusout: function() {
                        var e = this;
                        clearTimeout(e._typingTimeout), e.wrapper.removeClass(k), e._placeholder(!e.listView.selectedDataItems()[0], !0), e.close(), e._state === f && (e._state = h, e.listView.skipUpdate(!0)), e.element.blur()
                    },
                    _removeTag: function(e) {
                        var n, i = this,
                            r = i._state,
                            o = e.index(),
                            a = i.listView,
                            s = a.value()[o],
                            l = i._customOptions[s];
                        l !== t || r !== h && r !== f || (l = i._optionsMap[s]), l !== t ? (n = i.element[0].children[l], n.removeAttribute("selected"), n.selected = !1, a.removeAt(o), e.remove()) : a.select(a.select()[o]), i.currentTag(null), i._change(), i._close()
                    },
                    _tagListClick: function(t) {
                        var n = e(t.currentTarget);
                        n.children(".k-i-arrow-s").length || this._removeTag(n.closest(u))
                    },
                    _editable: function(t) {
                        var n = this,
                            i = t.disable,
                            r = t.readonly,
                            o = n.wrapper.off(A),
                            a = n.tagList.off(A),
                            s = n.element.add(n.input.off(A));
                        r || i ? (i ? o.addClass(S) : o.removeClass(S), s.attr(T, i).attr(D, r).attr(w, i).attr(y, r)) : (o.removeClass(S).on(R, n._toggleHover).on("mousedown" + A + " touchend" + A, c(n._wrapperMousedown, n)), n.input.on(F, c(n._keydown, n)).on("paste" + A, c(n._search, n)).on("focus" + A, c(n._inputFocus, n)).on("focusout" + A, c(n._inputFocusout, n)), s.removeAttr(T).removeAttr(D).attr(w, !1).attr(y, !1), a.on(I, u, function() {
                            e(this).addClass(C)
                        }).on(M, u, function() {
                            e(this).removeClass(C)
                        }).on(E, "li.k-button .k-select", c(n._tagListClick, n)))
                    },
                    _close: function() {
                        var e = this;
                        e.options.autoClose ? e.close() : e.popup.position()
                    },
                    _filterSource: function(e, t) {
                        t || (t = this._retrieveData), this._retrieveData = !1, o.fn._filterSource.call(this, e, t)
                    },
                    close: function() {
                        this.popup.close()
                    },
                    open: function() {
                        var e = this;
                        e._request && (e._retrieveData = !1), e._retrieveData || !e.listView.bound() || e._state === h ? (e._open = !0, e._state = p, e.listView.skipUpdate(!0), e._filterSource()) : e._allowSelection() && (e.popup.open(), e._focusItem())
                    },
                    toggle: function(e) {
                        e = e !== t ? e : !this.popup.visible(), this[e ? m : g]()
                    },
                    refresh: function() {
                        this.listView.refresh()
                    },
                    _angularItems: function(t) {
                        var n = this;
                        n.angular(t, function() {
                            return {
                                elements: n.items(),
                                data: e.map(n.dataSource.flatView(), function(e) {
                                    return {
                                        dataItem: e
                                    }
                                })
                            }
                        })
                    },
                    _listBound: function() {
                        var e = this,
                            n = e.dataSource.flatView(),
                            i = e.listView.skip(),
                            r = n.length;
                        e._angularItems("compile"), e._render(n), e._resizePopup(), e._open && (e._open = !1, e.toggle(r)), e.popup.position(), !e.options.highlightFirst || i !== t && 0 !== i || e.listView.focusFirst(), e._touchScroller && e._touchScroller.reset(), e._hideBusy(), e._makeUnselectable(), e.trigger("dataBound")
                    },
                    search: function(e) {
                        var t, n, i = this,
                            r = i.options,
                            o = r.ignoreCase,
                            a = r.dataTextField,
                            s = i.input.val();
                        r.placeholder === s && (s = ""), clearTimeout(i._typingTimeout), e = "string" == typeof e ? e : s, n = e.length, (!n || n >= r.minLength) && (i._state = f, i._open = !0, t = {
                            value: o ? e.toLowerCase() : e,
                            field: a,
                            operator: r.filter,
                            ignoreCase: o
                        }, i._filterSource(t))
                    },
                    value: function(e) {
                        var n = this,
                            i = n.listView,
                            r = i.value().slice(),
                            o = n.options.maxSelectedItems,
                            a = i.bound() && i.isFiltered();
                        return e === t ? r : (e = n._normalizeValues(e), null !== o && e.length > o && (e = e.slice(0, o)), a && n._clearFilter(), i.value(e), n._old = e, a || n._fetchData(), t)
                    },
                    _preselect: function(t, n) {
                        var r = this;
                        z(t) || t instanceof i.data.ObservableArray || (t = [t]), (e.isPlainObject(t[0]) || t[0] instanceof i.data.ObservableObject || !r.options.dataValueField) && (r.dataSource.data(t), r.value(n || r._initialValues), r._retrieveData = !0)
                    },
                    _setOption: function(e, t) {
                        var n = this.element[0].children[this._optionsMap[e]];
                        n && (t ? n.setAttribute("selected", "selected") : n.removeAttribute("selected"), n.selected = t)
                    },
                    _fetchData: function() {
                        var e = this,
                            t = !!e.dataSource.view().length,
                            n = 0 === e.listView.value().length;
                        n || e._request || (e._retrieveData || !e._fetch && !t) && (e._fetch = !0, e._retrieveData = !1, e.dataSource.read().done(function() {
                            e._fetch = !1
                        }))
                    },
                    _isBound: function() {
                        return this.listView.bound() && !this._retrieveData
                    },
                    _dataSource: function() {
                        var e = this,
                            t = e.element,
                            n = e.options,
                            r = n.dataSource || {};
                        r = z(r) ? {
                            data: r
                        } : r, r.select = t, r.fields = [{
                            field: n.dataTextField
                        }, {
                            field: n.dataValueField
                        }], e.dataSource && e._refreshHandler ? e._unbindDataSource() : (e._progressHandler = c(e._showBusy, e), e._errorHandler = c(e._hideBusy, e)), e.dataSource = i.data.DataSource.create(r).bind(_, e._progressHandler).bind("error", e._errorHandler)
                    },
                    _reset: function() {
                        var t = this,
                            n = t.element,
                            i = n.attr("form"),
                            r = i ? e("#" + i) : n.closest("form");
                        r[0] && (t._resetHandler = function() {
                            setTimeout(function() {
                                t.value(t._initialValues), t._placeholder()
                            })
                        }, t._form = r.on("reset", t._resetHandler))
                    },
                    _initValue: function() {
                        var e = this.options.value || this.element.val();
                        this._old = this._initialValues = this._normalizeValues(e)
                    },
                    _normalizeValues: function(t) {
                        var n = this;
                        return null === t ? t = [] : t && e.isPlainObject(t) ? t = [n._value(t)] : t && e.isPlainObject(t[0]) ? t = e.map(t, function(e) {
                            return n._value(e)
                        }) : z(t) || t instanceof l || (t = [t]), t
                    },
                    _change: function() {
                        var e = this,
                            t = e.value();
                        n(t, e._old) || (e._old = t.slice(), e.trigger(v), e.element.trigger(v))
                    },
                    _click: function(e) {
                        var n = e.item;
                        return e.preventDefault(), this.trigger(b, {
                            item: n
                        }) ? (this._close(), t) : (this._select(n), this._change(), this._close(), t)
                    },
                    _keydown: function(n) {
                        var r = this,
                            o = n.keyCode,
                            s = r._currentTag,
                            l = r.listView.focus(),
                            c = r.input.val(),
                            d = i.support.isRtl(r.wrapper),
                            u = r.popup.visible();
                        if (o === a.DOWN) {
                            if (n.preventDefault(), !u) return r.open(), l || this.listView.focusFirst(), t;
                            l ? (this.listView.focusNext(), this.listView.focus() || this.listView.focusLast()) : this.listView.focusFirst()
                        } else if (o === a.UP) u && (l && this.listView.focusPrev(), this.listView.focus() || r.close()), n.preventDefault();
                        else if (o === a.LEFT && !d || o === a.RIGHT && d) c || (s = s ? s.prev() : e(r.tagList[0].lastChild), s[0] && r.currentTag(s));
                        else if (o === a.RIGHT && !d || o === a.LEFT && d) !c && s && (s = s.next(), r.currentTag(s[0] ? s : null));
                        else if (o === a.ENTER && u) {
                            if (l) {
                                if (r.trigger(b, {
                                    item: l
                                })) return r._close(), t;
                                r._select(l)
                            }
                            r._change(), r._close(), n.preventDefault()
                        } else o === a.ESC ? (u ? n.preventDefault() : r.currentTag(null), r.close()) : o === a.HOME ? u ? this.listView.focusFirst() : c || (s = r.tagList[0].firstChild, s && r.currentTag(e(s))) : o === a.END ? u ? this.listView.focusLast() : c || (s = r.tagList[0].lastChild, s && r.currentTag(e(s))) : o !== a.DELETE && o !== a.BACKSPACE || c ? (clearTimeout(r._typingTimeout), setTimeout(function() {
                            r._scale()
                        }), r._search()) : (o !== a.BACKSPACE || s || (s = e(r.tagList[0].lastChild)), s && s[0] && r._removeTag(s))
                    },
                    _hideBusy: function() {
                        var e = this;
                        clearTimeout(e._busy), e.input.attr("aria-busy", !1), e._loading.addClass(x), e._request = !1, e._busy = null
                    },
                    _showBusyHandler: function() {
                        this.input.attr("aria-busy", !0), this._loading.removeClass(x)
                    },
                    _showBusy: function() {
                        var e = this;
                        e._request = !0, e._busy || (e._busy = setTimeout(c(e._showBusyHandler, e), 100))
                    },
                    _placeholder: function(e, n) {
                        var r = this,
                            o = r.input,
                            a = s();
                        e === t && (e = !1, o[0] !== a && (e = !r.listView.selectedDataItems()[0])), r._prev = "", o.toggleClass("k-readonly", e).val(e ? r.options.placeholder : ""), o[0] !== a || n || i.caret(o[0], 0, 0), r._scale()
                    },
                    _scale: function() {
                        var e, t = this,
                            n = t.wrapper,
                            i = n.width(),
                            r = t._span.text(t.input.val());
                        n.is(":visible") ? e = r.width() + 25 : (r.appendTo(document.documentElement), i = e = r.width() + 25, r.appendTo(n)), t.input.width(e > i ? i : e)
                    },
                    _option: function(e, n, r) {
                        var o = "<option";
                        return e !== t && (e += "", -1 !== e.indexOf('"') && (e = e.replace(P, "&quot;")), o += ' value="' + e + '"'), r && (o += " selected"), o += ">", n !== t && (o += i.htmlEncode(n)), o += "</option>"
                    },
                    _render: function(e) {
                        var t, n, i, r, o, a, s = this.listView.selectedDataItems(),
                            l = this.listView.value(),
                            c = e.length,
                            d = "";
                        for (l.length !== s.length && (s = this._buildSelectedItems(l)), o = {}, a = {}, r = 0; c > r; r++) n = e[r], i = this._value(n), t = this._selectedItemIndex(i, s), -1 !== t && s.splice(t, 1), a[i] = r, d += this._option(i, this._text(n), -1 !== t);
                        if (s.length)
                            for (r = 0; s.length > r; r++) n = s[r], i = this._value(n), o[i] = c, a[i] = c, c += 1, d += this._option(i, this._text(n), !0);
                        this._customOptions = o, this._optionsMap = a, this.element.html(d)
                    },
                    _buildSelectedItems: function(e) {
                        var t, n, i = this.options.dataValueField,
                            r = this.options.dataTextField,
                            o = [];
                        for (n = 0; e.length > n; n++) t = {}, t[i] = e[n], t[r] = e[n], o.push(t);
                        return o
                    },
                    _selectedItemIndex: function(e, t) {
                        for (var n = this._value, i = 0; t.length > i; i++)
                            if (e === n(t[i])) return i;
                        return -1
                    },
                    _search: function() {
                        var e = this;
                        e._typingTimeout = setTimeout(function() {
                            var t = e.input.val();
                            e._prev !== t && (e._prev = t, e.search(t))
                        }, e.options.delay)
                    },
                    _allowSelection: function() {
                        var e = this.options.maxSelectedItems;
                        return null === e || e > this.listView.value().length
                    },
                    _angularTagItems: function(t) {
                        var n = this;
                        n.angular(t, function() {
                            return {
                                elements: n.tagList[0].children,
                                data: e.map(n.dataItems(), function(e) {
                                    return {
                                        dataItem: e
                                    }
                                })
                            }
                        })
                    },
                    _selectValue: function(e, t) {
                        var n, i, r, o = this,
                            a = o.value(),
                            s = o.dataSource.total(),
                            l = o.tagList,
                            c = o._value;
                        if (o._angularTagItems("cleanup"), "multiple" === o.options.tagMode) {
                            for (r = t.length - 1; r > -1; r--) n = t[r], l[0].removeChild(l[0].children[n.position]), o._setOption(c(n.dataItem), !1);
                            for (r = 0; e.length > r; r++) i = e[r], l.append(o.tagTemplate(i.dataItem)), o._setOption(c(i.dataItem), !0)
                        } else {
                            for ((!o._maxTotal || s > o._maxTotal) && (o._maxTotal = s), l.html(""), a.length && l.append(o.tagTemplate({
                                values: a,
                                dataItems: o.dataItems(),
                                maxTotal: o._maxTotal,
                                currentTotal: s
                            })), r = t.length - 1; r > -1; r--) o._setOption(c(t[r].dataItem), !1);
                            for (r = 0; e.length > r; r++) o._setOption(c(e[r].dataItem), !0)
                        }
                        o._angularTagItems("compile"), o._placeholder()
                    },
                    _select: function(e) {
                        var t = this;
                        t._state === p && (t._state = ""), t._allowSelection() && (this.listView.select(e), t._placeholder(), t._state === f && (t._state = h, t.listView.skipUpdate(!0)))
                    },
                    _input: function() {
                        var t = this,
                            n = t.element[0].accessKey,
                            i = t._innerWrapper.children("input.k-input");
                        i[0] || (i = e('<input class="k-input" style="width: 25px" />').appendTo(t._innerWrapper)), t.element.removeAttr("accesskey"), t._focused = t.input = i.attr({
                            accesskey: n,
                            autocomplete: "off",
                            role: "listbox",
                            "aria-expanded": !1
                        })
                    },
                    _tagList: function() {
                        var t = this,
                            n = t._innerWrapper.children("ul");
                        n[0] || (n = e('<ul role="listbox" unselectable="on" class="k-reset"/>').appendTo(t._innerWrapper)), t.tagList = n
                    },
                    _tagTemplate: function() {
                        var e, t = this,
                            n = t.options,
                            r = n.tagTemplate,
                            o = n.dataSource,
                            a = "multiple" === n.tagMode;
                        t.element[0].length && !o && (n.dataTextField = n.dataTextField || "text", n.dataValueField = n.dataValueField || "value"), e = a ? i.template("#:" + i.expr(n.dataTextField, "data") + "#", {
                            useWithBlock: !1
                        }) : i.template("#:values.length# item(s) selected"), t.tagTextTemplate = r = r ? i.template(r) : e, t.tagTemplate = function(e) {
                            return '<li class="k-button" unselectable="on"><span unselectable="on">' + r(e) + '</span><span unselectable="on" class="k-select"><span unselectable="on" class="k-icon ' + (a ? "k-i-close" : "k-i-arrow-s") + '">' + (a ? "delete" : "open") + "</span></span></li>"
                        }
                    },
                    _loader: function() {
                        this._loading = e('<span class="k-icon k-loading ' + x + '"></span>').insertAfter(this.input)
                    },
                    _textContainer: function() {
                        var t = i.getComputedStyles(this.input[0], B);
                        t.position = "absolute", t.visibility = "hidden", t.top = -3333, t.left = -3333, this._span = e("<span/>").css(t).appendTo(this.wrapper)
                    },
                    _wrapper: function() {
                        var t = this,
                            n = t.element,
                            i = n.parent("span.k-multiselect");
                        i[0] || (i = n.wrap('<div class="k-widget k-multiselect k-header" unselectable="on" />').parent(), i[0].style.cssText = n[0].style.cssText, i[0].title = n[0].title, e('<div class="k-multiselect-wrap k-floatwrap" unselectable="on" />').insertBefore(n)), t.wrapper = i.addClass(n[0].className).css("display", ""), t._innerWrapper = e(i[0].firstChild)
                    }
                });
            r.plugin(L)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.slider.min", ["kendo.draganddrop.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t, n) {
                var i = n ? " k-slider-horizontal" : " k-slider-vertical",
                    r = e.style ? e.style : t.attr("style"),
                    o = t.attr("class") ? " " + t.attr("class") : "",
                    a = "";
                return "bottomRight" == e.tickPlacement ? a = " k-slider-bottomright" : "topLeft" == e.tickPlacement && (a = " k-slider-topleft"), r = r ? " style='" + r + "'" : "", "<div class='k-widget k-slider" + i + o + "'" + r + "><div class='k-slider-wrap" + (e.showButtons ? " k-slider-buttons" : "") + a + "'></div></div>"
            }

            function i(e, t, n) {
                var i = "";
                return i = "increase" == t ? n ? "k-i-arrow-e" : "k-i-arrow-n" : n ? "k-i-arrow-w" : "k-i-arrow-s", "<a class='k-button k-button-" + t + "'><span class='k-icon " + i + "' title='" + e[t + "ButtonTitle"] + "'>" + e[t + "ButtonTitle"] + "</span></a>"
            }

            function r(e, t) {
                var n, i = "<ul class='k-reset k-slider-items'>",
                    r = x.floor(d(t / e.smallStep)) + 1;
                for (n = 0; r > n; n++) i += "<li class='k-tick' role='presentation'>&nbsp;</li>";
                return i += "</ul>"
            }

            function o(e, t) {
                var n = t.is("input") ? 1 : 2,
                    i = 2 == n ? e.leftDragHandleTitle : e.dragHandleTitle;
                return "<div class='k-slider-track'><div class='k-slider-selection'><!-- --></div><a href='#' class='k-draghandle' title='" + i + "' role='slider' aria-valuemin='" + e.min + "' aria-valuemax='" + e.max + "' aria-valuenow='" + (n > 1 ? e.selectionStart || e.min : e.value || e.min) + "'>Drag</a>" + (n > 1 ? "<a href='#' class='k-draghandle' title='" + e.rightDragHandleTitle + "'role='slider' aria-valuemin='" + e.min + "' aria-valuemax='" + e.max + "' aria-valuenow='" + (e.selectionEnd || e.max) + "'>Drag</a>" : "") + "</div>"
            }

            function a(e) {
                return function(t) {
                    return t + e
                }
            }

            function s(e) {
                return function() {
                    return e
                }
            }

            function l(e) {
                return (e + "").replace(".", m.cultures.current.numberFormat["."])
            }

            function c(e) {
                var t = "" + e,
                    n = 0;
                return t = t.split("."), t[1] && (n = t[1].length), n = n > 10 ? 10 : n
            }

            function d(e) {
                var t, n;
                return e = parseFloat(e, 10), t = c(e), n = x.pow(10, t || 0), x.round(e * n) / n
            }

            function u(e, n) {
                var i = w(e.getAttribute(n));
                return null === i && (i = t), i
            }

            function h(e) {
                return typeof e !== Y
            }

            function f(e) {
                return 1e4 * e
            }
            var p, m = window.kendo,
                g = m.ui.Widget,
                v = m.ui.Draggable,
                _ = e.extend,
                b = m.format,
                w = m.parseFloat,
                y = e.proxy,
                k = e.isArray,
                x = Math,
                C = m.support,
                S = C.pointers,
                T = C.msPointers,
                D = "change",
                A = "slide",
                E = ".slider",
                F = "touchstart" + E + " mousedown" + E,
                I = S ? "pointerdown" + E : T ? "MSPointerDown" + E : F,
                M = "touchend" + E + " mouseup" + E,
                R = S ? "pointerup" : T ? "MSPointerUp" + E : M,
                P = "moveSelection",
                z = "keydown" + E,
                B = "click" + E,
                L = "mouseover" + E,
                H = "focus" + E,
                N = "blur" + E,
                O = ".k-draghandle",
                V = ".k-slider-track",
                U = ".k-tick",
                W = "k-state-selected",
                j = "k-state-focused",
                q = "k-state-default",
                G = "k-state-disabled",
                $ = "disabled",
                Y = "undefined",
                K = "tabindex",
                Q = m.getTouches,
                X = g.extend({
                    init: function(e, t) {
                        var n, i = this;
                        if (g.fn.init.call(i, e, t), t = i.options, i._distance = d(t.max - t.min), i._isHorizontal = "horizontal" == t.orientation, i._isRtl = i._isHorizontal && m.support.isRtl(e), i._position = i._isHorizontal ? "left" : "bottom", i._sizeFn = i._isHorizontal ? "width" : "height", i._outerSize = i._isHorizontal ? "outerWidth" : "outerHeight", t.tooltip.format = t.tooltip.enabled ? t.tooltip.format || "{0}" : "{0}", 0 >= t.smallStep) throw Error("Kendo UI Slider smallStep must be a positive number.");
                        i._createHtml(), i.wrapper = i.element.closest(".k-slider"), i._trackDiv = i.wrapper.find(V), i._setTrackDivWidth(), i._maxSelection = i._trackDiv[i._sizeFn](), i._sliderItemsInit(), i._reset(), i._tabindex(i.wrapper.find(O)), i[t.enabled ? "enable" : "disable"](), n = m.support.isRtl(i.wrapper) ? -1 : 1, i._keyMap = {
                            37: a(-1 * n * t.smallStep),
                            40: a(-t.smallStep),
                            39: a(1 * n * t.smallStep),
                            38: a(+t.smallStep),
                            35: s(t.max),
                            36: s(t.min),
                            33: a(+t.largeStep),
                            34: a(-t.largeStep)
                        }, m.notify(i)
                    },
                    events: [D, A],
                    options: {
                        enabled: !0,
                        min: 0,
                        max: 10,
                        smallStep: 1,
                        largeStep: 5,
                        orientation: "horizontal",
                        tickPlacement: "both",
                        tooltip: {
                            enabled: !0,
                            format: "{0}"
                        }
                    },
                    _resize: function() {
                        this._setTrackDivWidth(), this.wrapper.find(".k-slider-items").remove(), this._maxSelection = this._trackDiv[this._sizeFn](), this._sliderItemsInit(), this._refresh(), this.options.enabled && this.enable(!0)
                    },
                    _sliderItemsInit: function() {
                        var e = this,
                            t = e.options,
                            n = e._maxSelection / ((t.max - t.min) / t.smallStep),
                            i = e._calculateItemsWidth(x.floor(e._distance / t.smallStep));
                        "none" != t.tickPlacement && n >= 2 && (e._trackDiv.before(r(t, e._distance)), e._setItemsWidth(i), e._setItemsTitle()), e._calculateSteps(i), "none" != t.tickPlacement && n >= 2 && t.largeStep >= t.smallStep && e._setItemsLargeTick()
                    },
                    getSize: function() {
                        return m.dimensions(this.wrapper)
                    },
                    _setTrackDivWidth: function() {
                        var e = this,
                            t = 2 * parseFloat(e._trackDiv.css(e._isRtl ? "right" : e._position), 10);
                        e._trackDiv[e._sizeFn](e.wrapper[e._sizeFn]() - 2 - t)
                    },
                    _setItemsWidth: function(t) {
                        var n, i = this,
                            r = i.options,
                            o = 0,
                            a = t.length - 1,
                            s = i.wrapper.find(U),
                            l = 0,
                            c = 2,
                            d = s.length,
                            u = 0;
                        for (n = 0; d - 2 > n; n++) e(s[n + 1])[i._sizeFn](t[n]);
                        if (i._isHorizontal ? (e(s[o]).addClass("k-first")[i._sizeFn](t[a - 1]), e(s[a]).addClass("k-last")[i._sizeFn](t[a])) : (e(s[a]).addClass("k-first")[i._sizeFn](t[a]), e(s[o]).addClass("k-last")[i._sizeFn](t[a - 1])), i._distance % r.smallStep !== 0 && !i._isHorizontal) {
                            for (n = 0; t.length > n; n++) u += t[n];
                            l = i._maxSelection - u, l += parseFloat(i._trackDiv.css(i._position), 10) + c, i.wrapper.find(".k-slider-items").css("padding-top", l)
                        }
                    },
                    _setItemsTitle: function() {
                        for (var t = this, n = t.options, i = t.wrapper.find(U), r = n.min, o = i.length, a = t._isHorizontal && !t._isRtl ? 0 : o - 1, s = t._isHorizontal && !t._isRtl ? o : -1, l = t._isHorizontal && !t._isRtl ? 1 : -1; a - s !== 0; a += l) e(i[a]).attr("title", b(n.tooltip.format, d(r))), r += n.smallStep
                    },
                    _setItemsLargeTick: function() {
                        var t, n, i, r = this,
                            o = r.options,
                            a = r.wrapper.find(U),
                            s = 0;
                        if (f(o.largeStep) % f(o.smallStep) === 0 || r._distance / o.largeStep >= 3)
                            for (r._isHorizontal || r._isRtl || (a = e.makeArray(a).reverse()), s = 0; a.length > s; s++) t = e(a[s]), n = r._values[s], i = d(f(n - this.options.min)), i % f(o.smallStep) === 0 && i % f(o.largeStep) === 0 && (t.addClass("k-tick-large").html("<span class='k-label'>" + t.attr("title") + "</span>"), 0 !== s && s !== a.length - 1 && t.css("line-height", t[r._sizeFn]() + "px"))
                    },
                    _calculateItemsWidth: function(e) {
                        var t, n, i, r = this,
                            o = r.options,
                            a = parseFloat(r._trackDiv.css(r._sizeFn)) + 1,
                            s = a / r._distance;
                        for (r._distance / o.smallStep - x.floor(r._distance / o.smallStep) > 0 && (a -= r._distance % o.smallStep * s), t = a / e, n = [], i = 0; e - 1 > i; i++) n[i] = t;
                        return n[e - 1] = n[e] = t / 2, r._roundWidths(n)
                    },
                    _roundWidths: function(e) {
                        var t, n = 0,
                            i = e.length;
                        for (t = 0; i > t; t++) n += e[t] - x.floor(e[t]), e[t] = x.floor(e[t]);
                        return n = x.round(n), this._addAdditionalSize(n, e)
                    },
                    _addAdditionalSize: function(e, t) {
                        if (0 === e) return t;
                        var n, i = parseFloat(t.length - 1) / parseFloat(1 == e ? e : e - 1);
                        for (n = 0; e > n; n++) t[parseInt(x.round(i * n), 10)] += 1;
                        return t
                    },
                    _calculateSteps: function(e) {
                        var t, n = this,
                            i = n.options,
                            r = i.min,
                            o = 0,
                            a = x.ceil(n._distance / i.smallStep),
                            s = 1;
                        if (a += n._distance / i.smallStep % 1 === 0 ? 1 : 0, e.splice(0, 0, 2 * e[a - 2]), e.splice(a - 1, 1, 2 * e.pop()), n._pixelSteps = [o], n._values = [r], 0 !== a) {
                            for (; a > s;) o += (e[s - 1] + e[s]) / 2, n._pixelSteps[s] = o, r += i.smallStep, n._values[s] = d(r), s++;
                            t = n._distance % i.smallStep === 0 ? a - 1 : a, n._pixelSteps[t] = n._maxSelection, n._values[t] = i.max, n._isRtl && (n._pixelSteps.reverse(), n._values.reverse())
                        }
                    },
                    _getValueFromPosition: function(e, t) {
                        var n, i = this,
                            r = i.options,
                            o = x.max(r.smallStep * (i._maxSelection / i._distance), 0),
                            a = 0,
                            s = o / 2;
                        if (i._isHorizontal ? (a = e - t.startPoint, i._isRtl && (a = i._maxSelection - a)) : a = t.startPoint - e, i._maxSelection - (parseInt(i._maxSelection % o, 10) - 3) / 2 < a) return r.max;
                        for (n = 0; i._pixelSteps.length > n; n++)
                            if (x.abs(i._pixelSteps[n] - a) - 1 <= s) return d(i._values[n])
                    },
                    _getFormattedValue: function(e, t) {
                        var n, i, r, o = this,
                            a = "",
                            s = o.options.tooltip;
                        return k(e) ? (i = e[0], r = e[1]) : t && t.type && (i = t.selectionStart, r = t.selectionEnd), t && (n = t.tooltipTemplate), !n && s.template && (n = m.template(s.template)), k(e) || t && t.type ? n ? a = n({
                            selectionStart: i,
                            selectionEnd: r
                        }) : (i = b(s.format, i), r = b(s.format, r), a = i + " - " + r) : (t && (t.val = e), a = n ? n({
                            value: e
                        }) : b(s.format, e)), a
                    },
                    _getDraggableArea: function() {
                        var e = this,
                            t = m.getOffset(e._trackDiv);
                        return {
                            startPoint: e._isHorizontal ? t.left : t.top + e._maxSelection,
                            endPoint: e._isHorizontal ? t.left + e._maxSelection : t.top
                        }
                    },
                    _createHtml: function() {
                        var e = this,
                            t = e.element,
                            r = e.options,
                            a = t.find("input");
                        2 == a.length ? (a.eq(0).prop("value", l(r.selectionStart)), a.eq(1).prop("value", l(r.selectionEnd))) : t.prop("value", l(r.value)), t.wrap(n(r, t, e._isHorizontal)).hide(), r.showButtons && t.before(i(r, "increase", e._isHorizontal)).before(i(r, "decrease", e._isHorizontal)), t.before(o(r, t))
                    },
                    _focus: function(t) {
                        var n = this,
                            i = t.target,
                            r = n.value(),
                            o = n._drag;
                        o || (i == n.wrapper.find(O).eq(0)[0] ? (o = n._firstHandleDrag, n._activeHandle = 0) : (o = n._lastHandleDrag, n._activeHandle = 1), r = r[n._activeHandle]), e(i).addClass(j + " " + W), o && (n._activeHandleDrag = o, o.selectionStart = n.options.selectionStart, o.selectionEnd = n.options.selectionEnd, o._updateTooltip(r))
                    },
                    _focusWithMouse: function(t) {
                        t = e(t);
                        var n = this,
                            i = t.is(O) ? t.index() : 0;
                        window.setTimeout(function() {
                            n.wrapper.find(O)[2 == i ? 1 : 0].focus()
                        }, 1), n._setTooltipTimeout()
                    },
                    _blur: function(t) {
                        var n = this,
                            i = n._activeHandleDrag;
                        e(t.target).removeClass(j + " " + W), i && (i._removeTooltip(), delete n._activeHandleDrag, delete n._activeHandle)
                    },
                    _setTooltipTimeout: function() {
                        var e = this;
                        e._tooltipTimeout = window.setTimeout(function() {
                            var t = e._drag || e._activeHandleDrag;
                            t && t._removeTooltip()
                        }, 300)
                    },
                    _clearTooltipTimeout: function() {
                        var e, t = this;
                        window.clearTimeout(this._tooltipTimeout), e = t._drag || t._activeHandleDrag, e && e.tooltipDiv && e.tooltipDiv.stop(!0, !1).css("opacity", 1)
                    },
                    _reset: function() {
                        var t = this,
                            n = t.element,
                            i = n.attr("form"),
                            r = i ? e("#" + i) : n.closest("form");
                        r[0] && (t._form = r.on("reset", y(t._formResetHandler, t)))
                    },
                    destroy: function() {
                        this._form && this._form.off("reset", this._formResetHandler), g.fn.destroy.call(this)
                    }
                }),
                J = X.extend({
                    init: function(n, i) {
                        var r, o = this;
                        n.type = "text", i = _({}, {
                            value: u(n, "value"),
                            min: u(n, "min"),
                            max: u(n, "max"),
                            smallStep: u(n, "step")
                        }, i), n = e(n), i && i.enabled === t && (i.enabled = !n.is("[disabled]")), X.fn.init.call(o, n, i), i = o.options, h(i.value) && null !== i.value || (i.value = i.min, n.prop("value", l(i.min))), i.value = x.max(x.min(i.value, i.max), i.min), r = o.wrapper.find(O), this._selection = new J.Selection(r, o, i), o._drag = new J.Drag(r, "", o, i)
                    },
                    options: {
                        name: "Slider",
                        showButtons: !0,
                        increaseButtonTitle: "Increase",
                        decreaseButtonTitle: "Decrease",
                        dragHandleTitle: "drag",
                        tooltip: {
                            format: "{0:#,#.##}"
                        },
                        value: null
                    },
                    enable: function(n) {
                        var i, r, o, a = this,
                            s = a.options;
                        a.disable(), n !== !1 && (a.wrapper.removeClass(G).addClass(q), a.wrapper.find("input").removeAttr($), i = function(n) {
                            var i, r, o, s = Q(n)[0];
                            if (s) {
                                if (i = a._isHorizontal ? s.location.pageX : s.location.pageY, r = a._getDraggableArea(), o = e(n.target), o.hasClass("k-draghandle")) return o.addClass(j + " " + W), t;
                                a._update(a._getValueFromPosition(i, r)), a._focusWithMouse(n.target), a._drag.dragstart(n), n.preventDefault()
                            }
                        }, a.wrapper.find(U + ", " + V).on(I, i).end().on(I, function() {
                            e(document.documentElement).one("selectstart", m.preventDefault)
                        }).on(R, function() {
                            a._drag._end()
                        }), a.wrapper.find(O).attr(K, 0).on(M, function() {
                            a._setTooltipTimeout()
                        }).on(B, function(e) {
                            a._focusWithMouse(e.target), e.preventDefault()
                        }).on(H, y(a._focus, a)).on(N, y(a._blur, a)), r = y(function(e) {
                            var t = a._nextValueByIndex(a._valueIndex + 1 * e);
                            a._setValueInRange(t), a._drag._updateTooltip(t)
                        }, a), s.showButtons && (o = y(function(e, t) {
                            this._clearTooltipTimeout(), (1 === e.which || C.touch && 0 === e.which) && (r(t), this.timeout = setTimeout(y(function() {
                                this.timer = setInterval(function() {
                                    r(t)
                                }, 60)
                            }, this), 200))
                        }, a), a.wrapper.find(".k-button").on(M, y(function(e) {
                            this._clearTimer(), a._focusWithMouse(e.target)
                        }, a)).on(L, function(t) {
                            e(t.currentTarget).addClass("k-state-hover")
                        }).on("mouseout" + E, y(function(t) {
                            e(t.currentTarget).removeClass("k-state-hover"), this._clearTimer()
                        }, a)).eq(0).on(F, y(function(e) {
                            o(e, 1)
                        }, a)).click(!1).end().eq(1).on(F, y(function(e) {
                            o(e, -1)
                        }, a)).click(m.preventDefault)), a.wrapper.find(O).off(z, !1).on(z, y(this._keydown, a)), s.enabled = !0)
                    },
                    disable: function() {
                        var t = this;
                        t.wrapper.removeClass(q).addClass(G), e(t.element).prop($, $), t.wrapper.find(".k-button").off(F).on(F, m.preventDefault).off(M).on(M, m.preventDefault).off("mouseleave" + E).on("mouseleave" + E, m.preventDefault).off(L).on(L, m.preventDefault), t.wrapper.find(U + ", " + V).off(I).off(R), t.wrapper.find(O).attr(K, -1).off(M).off(z).off(B).off(H).off(N), t.options.enabled = !1
                    },
                    _update: function(e) {
                        var t = this,
                            n = t.value() != e;
                        t.value(e), n && t.trigger(D, {
                            value: t.options.value
                        })
                    },
                    value: function(e) {
                        var n = this,
                            i = n.options;
                        return e = d(e), isNaN(e) ? i.value : (e >= i.min && i.max >= e && i.value != e && (n.element.prop("value", l(e)), i.value = e, n._refreshAriaAttr(e), n._refresh()), t)
                    },
                    _refresh: function() {
                        this.trigger(P, {
                            value: this.options.value
                        })
                    },
                    _refreshAriaAttr: function(e) {
                        var t, n = this,
                            i = n._drag;
                        t = i && i._tooltipDiv ? i._tooltipDiv.text() : n._getFormattedValue(e, null), this.wrapper.find(O).attr("aria-valuenow", e).attr("aria-valuetext", t)
                    },
                    _clearTimer: function() {
                        clearTimeout(this.timeout), clearInterval(this.timer)
                    },
                    _keydown: function(e) {
                        var t = this;
                        e.keyCode in t._keyMap && (t._clearTooltipTimeout(), t._setValueInRange(t._keyMap[e.keyCode](t.options.value)), t._drag._updateTooltip(t.value()), e.preventDefault())
                    },
                    _setValueInRange: function(e) {
                        var n = this,
                            i = n.options;
                        return e = d(e), isNaN(e) ? (n._update(i.min), t) : (e = x.max(x.min(e, i.max), i.min), n._update(e), t)
                    },
                    _nextValueByIndex: function(e) {
                        var t = this._values.length;
                        return this._isRtl && (e = t - 1 - e), this._values[x.max(0, x.min(e, t - 1))]
                    },
                    _formResetHandler: function() {
                        var e = this,
                            t = e.options.min;
                        setTimeout(function() {
                            var n = e.element[0].value;
                            e.value("" === n || isNaN(n) ? t : n)
                        })
                    },
                    destroy: function() {
                        var e = this;
                        X.fn.destroy.call(e), e.wrapper.off(E).find(".k-button").off(E).end().find(O).off(E).end().find(U + ", " + V).off(E).end(), e._drag.draggable.destroy(), e._drag._removeTooltip(!0)
                    }
                });
            J.Selection = function(e, t, n) {
                function i(i) {
                    var r = i - n.min,
                        o = t._valueIndex = x.ceil(d(r / n.smallStep)),
                        a = parseInt(t._pixelSteps[o], 10),
                        s = t._trackDiv.find(".k-slider-selection"),
                        l = parseInt(e[t._outerSize]() / 2, 10),
                        c = t._isRtl ? 2 : 0;
                    s[t._sizeFn](t._isRtl ? t._maxSelection - a : a), e.css(t._position, a - l - c)
                }
                i(n.value), t.bind([D, A, P], function(e) {
                    i(parseFloat(e.value, 10))
                })
            }, J.Drag = function(e, t, n, i) {
                var r = this;
                r.owner = n, r.options = i, r.element = e, r.type = t, r.draggable = new v(e, {
                    distance: 0,
                    dragstart: y(r._dragstart, r),
                    drag: y(r.drag, r),
                    dragend: y(r.dragend, r),
                    dragcancel: y(r.dragcancel, r)
                }), e.click(!1)
            }, J.Drag.prototype = {
                dragstart: function(e) {
                    this.owner._activeDragHandle = this, this.draggable.userEvents.cancel(), this._dragstart(e), this.dragend()
                },
                _dragstart: function(n) {
                    var i = this,
                        r = i.owner,
                        o = i.options;
                    return o.enabled ? (this.owner._activeDragHandle = this, r.element.off(L), r.wrapper.find("." + j).removeClass(j + " " + W), i.element.addClass(j + " " + W), e(document.documentElement).css("cursor", "pointer"), i.dragableArea = r._getDraggableArea(), i.step = x.max(o.smallStep * (r._maxSelection / r._distance), 0), i.type ? (i.selectionStart = o.selectionStart, i.selectionEnd = o.selectionEnd, r._setZIndex(i.type)) : i.oldVal = i.val = o.value, i._removeTooltip(!0), i._createTooltip(), t) : (n.preventDefault(), t)
                },
                _createTooltip: function() {
                    var t, n, i = this,
                        r = i.owner,
                        o = i.options.tooltip,
                        a = "",
                        s = e(window);
                    o.enabled && (o.template && (t = i.tooltipTemplate = m.template(o.template)), e(".k-slider-tooltip").remove(), i.tooltipDiv = e("<div class='k-widget k-tooltip k-slider-tooltip'><!-- --></div>").appendTo(document.body), a = r._getFormattedValue(i.val || r.value(), i), i.type || (n = "k-callout-" + (r._isHorizontal ? "s" : "e"), i.tooltipInnerDiv = "<div class='k-callout " + n + "'><!-- --></div>", a += i.tooltipInnerDiv), i.tooltipDiv.html(a), i._scrollOffset = {
                        top: s.scrollTop(),
                        left: s.scrollLeft()
                    }, i.moveTooltip())
                },
                drag: function(e) {
                    var t, n = this,
                        i = n.owner,
                        r = e.x.location,
                        o = e.y.location,
                        a = n.dragableArea.startPoint,
                        s = n.dragableArea.endPoint;
                    e.preventDefault(), n.val = i._isHorizontal ? i._isRtl ? n.constrainValue(r, a, s, s > r) : n.constrainValue(r, a, s, r >= s) : n.constrainValue(o, s, a, s >= o), n.oldVal != n.val && (n.oldVal = n.val, n.type ? ("firstHandle" == n.type ? n.selectionStart = n.selectionEnd > n.val ? n.val : n.selectionEnd = n.val : n.val > n.selectionStart ? n.selectionEnd = n.val : n.selectionStart = n.selectionEnd = n.val, t = {
                        values: [n.selectionStart, n.selectionEnd],
                        value: [n.selectionStart, n.selectionEnd]
                    }) : t = {
                        value: n.val
                    }, i.trigger(A, t)), n._updateTooltip(n.val)
                },
                _updateTooltip: function(e) {
                    var t = this,
                        n = t.options,
                        i = n.tooltip,
                        r = "";
                    i.enabled && (t.tooltipDiv || t._createTooltip(), r = t.owner._getFormattedValue(d(e), t), t.type || (r += t.tooltipInnerDiv), t.tooltipDiv.html(r), t.moveTooltip())
                },
                dragcancel: function() {
                    return this.owner._refresh(), e(document.documentElement).css("cursor", ""), this._end()
                },
                dragend: function() {
                    var t = this,
                        n = t.owner;
                    return e(document.documentElement).css("cursor", ""), t.type ? n._update(t.selectionStart, t.selectionEnd) : (n._update(t.val), t.draggable.userEvents._disposeAll()), t.draggable.userEvents.cancel(), t._end()
                },
                _end: function() {
                    var e = this,
                        t = e.owner;
                    return t._focusWithMouse(e.element), t.element.on(L), !1
                },
                _removeTooltip: function(t) {
                    var n = this,
                        i = n.owner;
                    n.tooltipDiv && i.options.tooltip.enabled && i.options.enabled && (t ? (n.tooltipDiv.remove(), n.tooltipDiv = null) : n.tooltipDiv.fadeOut("slow", function() {
                        e(this).remove(), n.tooltipDiv = null
                    }))
                },
                moveTooltip: function() {
                    var t, n, i, r, o = this,
                        a = o.owner,
                        s = 0,
                        l = 0,
                        c = o.element,
                        d = m.getOffset(c),
                        u = 8,
                        h = e(window),
                        f = o.tooltipDiv.find(".k-callout"),
                        p = o.tooltipDiv.outerWidth(),
                        g = o.tooltipDiv.outerHeight();
                    o.type ? (t = a.wrapper.find(O), d = m.getOffset(t.eq(0)), n = m.getOffset(t.eq(1)), a._isHorizontal ? (s = n.top, l = d.left + (n.left - d.left) / 2) : (s = d.top + (n.top - d.top) / 2, l = n.left), r = t.eq(0).outerWidth() + 2 * u) : (s = d.top, l = d.left, r = c.outerWidth() + 2 * u), a._isHorizontal ? (l -= parseInt((p - c[a._outerSize]()) / 2, 10), s -= g + f.height() + u) : (s -= parseInt((g - c[a._outerSize]()) / 2, 10), l -= p + f.width() + u), a._isHorizontal ? (i = o._flip(s, g, r, h.outerHeight() + o._scrollOffset.top), s += i, l += o._fit(l, p, h.outerWidth() + o._scrollOffset.left)) : (i = o._flip(l, p, r, h.outerWidth() + o._scrollOffset.left), s += o._fit(s, g, h.outerHeight() + o._scrollOffset.top), l += i), i > 0 && f && (f.removeClass(), f.addClass("k-callout k-callout-" + (a._isHorizontal ? "n" : "w"))), o.tooltipDiv.css({
                        top: s,
                        left: l
                    })
                },
                _fit: function(e, t, n) {
                    var i = 0;
                    return e + t > n && (i = n - (e + t)), 0 > e && (i = -e), i
                },
                _flip: function(e, t, n, i) {
                    var r = 0;
                    return e + t > i && (r += -(n + t)), 0 > e + r && (r += n + t), r
                },
                constrainValue: function(e, t, n, i) {
                    var r = this,
                        o = 0;
                    return o = e > t && n > e ? r.owner._getValueFromPosition(e, r.dragableArea) : i ? r.options.max : r.options.min
                }
            }, m.ui.plugin(J), p = X.extend({
                init: function(n, i) {
                    var r, o = this,
                        a = e(n).find("input"),
                        s = a.eq(0)[0],
                        c = a.eq(1)[0];
                    s.type = "text", c.type = "text", i && i.showButtons && (window.console && window.console.warn("showbuttons option is not supported for the range slider, ignoring"), i.showButtons = !1), i = _({}, {
                        selectionStart: u(s, "value"),
                        min: u(s, "min"),
                        max: u(s, "max"),
                        smallStep: u(s, "step")
                    }, {
                        selectionEnd: u(c, "value"),
                        min: u(c, "min"),
                        max: u(c, "max"),
                        smallStep: u(c, "step")
                    }, i), i && i.enabled === t && (i.enabled = !a.is("[disabled]")), X.fn.init.call(o, n, i), i = o.options, h(i.selectionStart) && null !== i.selectionStart || (i.selectionStart = i.min, a.eq(0).prop("value", l(i.min))), h(i.selectionEnd) && null !== i.selectionEnd || (i.selectionEnd = i.max, a.eq(1).prop("value", l(i.max))), r = o.wrapper.find(O), this._selection = new p.Selection(r, o, i), o._firstHandleDrag = new J.Drag(r.eq(0), "firstHandle", o, i), o._lastHandleDrag = new J.Drag(r.eq(1), "lastHandle", o, i)
                },
                options: {
                    name: "RangeSlider",
                    leftDragHandleTitle: "drag",
                    rightDragHandleTitle: "drag",
                    tooltip: {
                        format: "{0:#,#.##}"
                    },
                    selectionStart: null,
                    selectionEnd: null
                },
                enable: function(n) {
                    var i, r = this,
                        o = r.options;
                    r.disable(), n !== !1 && (r.wrapper.removeClass(G).addClass(q), r.wrapper.find("input").removeAttr($), i = function(n) {
                        var i, a, s, l, c, d, u, h = Q(n)[0];
                        if (h) {
                            if (i = r._isHorizontal ? h.location.pageX : h.location.pageY, a = r._getDraggableArea(), s = r._getValueFromPosition(i, a), l = e(n.target), l.hasClass("k-draghandle")) return r.wrapper.find("." + j).removeClass(j + " " + W), l.addClass(j + " " + W), t;
                            o.selectionStart > s ? (c = s, d = o.selectionEnd, u = r._firstHandleDrag) : s > r.selectionEnd ? (c = o.selectionStart, d = s, u = r._lastHandleDrag) : o.selectionEnd - s >= s - o.selectionStart ? (c = s, d = o.selectionEnd, u = r._firstHandleDrag) : (c = o.selectionStart, d = s, u = r._lastHandleDrag), u.dragstart(n), r._setValueInRange(c, d), r._focusWithMouse(u.element)
                        }
                    }, r.wrapper.find(U + ", " + V).on(I, i).end().on(I, function() {
                        e(document.documentElement).one("selectstart", m.preventDefault)
                    }).on(R, function() {
                        r._activeDragHandle && r._activeDragHandle._end()
                    }), r.wrapper.find(O).attr(K, 0).on(M, function() {
                        r._setTooltipTimeout()
                    }).on(B, function(e) {
                        r._focusWithMouse(e.target), e.preventDefault()
                    }).on(H, y(r._focus, r)).on(N, y(r._blur, r)), r.wrapper.find(O).off(z, m.preventDefault).eq(0).on(z, y(function(e) {
                        this._keydown(e, "firstHandle")
                    }, r)).end().eq(1).on(z, y(function(e) {
                        this._keydown(e, "lastHandle")
                    }, r)), r.options.enabled = !0)
                },
                disable: function() {
                    var e = this;
                    e.wrapper.removeClass(q).addClass(G), e.wrapper.find("input").prop($, $), e.wrapper.find(U + ", " + V).off(I).off(R), e.wrapper.find(O).attr(K, -1).off(M).off(z).off(B).off(H).off(N), e.options.enabled = !1
                },
                _keydown: function(e, t) {
                    var n, i, r, o = this,
                        a = o.options.selectionStart,
                        s = o.options.selectionEnd;
                    e.keyCode in o._keyMap && (o._clearTooltipTimeout(), "firstHandle" == t ? (r = o._activeHandleDrag = o._firstHandleDrag, a = o._keyMap[e.keyCode](a), a > s && (s = a)) : (r = o._activeHandleDrag = o._lastHandleDrag, s = o._keyMap[e.keyCode](s), a > s && (a = s)), o._setValueInRange(d(a), d(s)), n = Math.max(a, o.options.selectionStart), i = Math.min(s, o.options.selectionEnd), r.selectionEnd = Math.max(i, o.options.selectionStart), r.selectionStart = Math.min(n, o.options.selectionEnd), r._updateTooltip(o.value()[o._activeHandle]), e.preventDefault())
                },
                _update: function(e, t) {
                    var n = this,
                        i = n.value(),
                        r = i[0] != e || i[1] != t;
                    n.value([e, t]), r && n.trigger(D, {
                        values: [e, t],
                        value: [e, t]
                    })
                },
                value: function(e) {
                    return e && e.length ? this._value(e[0], e[1]) : this._value()
                },
                _value: function(e, n) {
                    var i = this,
                        r = i.options,
                        o = r.selectionStart,
                        a = r.selectionEnd;
                    return isNaN(e) && isNaN(n) ? [o, a] : (e = d(e), n = d(n), e >= r.min && r.max >= e && n >= r.min && r.max >= n && n >= e && (o != e || a != n) && (i.element.find("input").eq(0).prop("value", l(e)).end().eq(1).prop("value", l(n)), r.selectionStart = e, r.selectionEnd = n, i._refresh(), i._refreshAriaAttr(e, n)), t)
                },
                values: function(e, t) {
                    return k(e) ? this._value(e[0], e[1]) : this._value(e, t)
                },
                _refresh: function() {
                    var e = this,
                        t = e.options;
                    e.trigger(P, {
                        values: [t.selectionStart, t.selectionEnd],
                        value: [t.selectionStart, t.selectionEnd]
                    }), t.selectionStart == t.max && t.selectionEnd == t.max && e._setZIndex("firstHandle")
                },
                _refreshAriaAttr: function(e, t) {
                    var n, i = this,
                        r = i.wrapper.find(O),
                        o = i._activeHandleDrag;
                    n = i._getFormattedValue([e, t], o), r.eq(0).attr("aria-valuenow", e), r.eq(1).attr("aria-valuenow", t), r.attr("aria-valuetext", n)
                },
                _setValueInRange: function(e, t) {
                    var n = this.options;
                    e = x.max(x.min(e, n.max), n.min), t = x.max(x.min(t, n.max), n.min), e == n.max && t == n.max && this._setZIndex("firstHandle"), this._update(x.min(e, t), x.max(e, t))
                },
                _setZIndex: function(t) {
                    this.wrapper.find(O).each(function(n) {
                        e(this).css("z-index", "firstHandle" == t ? 1 - n : n)
                    })
                },
                _formResetHandler: function() {
                    var e = this,
                        t = e.options;
                    setTimeout(function() {
                        var n = e.element.find("input"),
                            i = n[0].value,
                            r = n[1].value;
                        e.values("" === i || isNaN(i) ? t.min : i, "" === r || isNaN(r) ? t.max : r)
                    })
                },
                destroy: function() {
                    var e = this;
                    X.fn.destroy.call(e), e.wrapper.off(E).find(U + ", " + V).off(E).end().find(O).off(E), e._firstHandleDrag.draggable.destroy(), e._lastHandleDrag.draggable.destroy()
                }
            }), p.Selection = function(e, t, n) {
                function i(i) {
                    i = i || [];
                    var o = i[0] - n.min,
                        a = i[1] - n.min,
                        s = x.ceil(d(o / n.smallStep)),
                        l = x.ceil(d(a / n.smallStep)),
                        c = t._pixelSteps[s],
                        u = t._pixelSteps[l],
                        h = parseInt(e.eq(0)[t._outerSize]() / 2, 10),
                        f = t._isRtl ? 2 : 0;
                    e.eq(0).css(t._position, c - h - f).end().eq(1).css(t._position, u - h - f), r(c, u)
                }

                function r(e, n) {
                    var i, r, o = t._trackDiv.find(".k-slider-selection");
                    i = x.abs(e - n), o[t._sizeFn](i), t._isRtl ? (r = x.max(e, n), o.css("right", t._maxSelection - r - 1)) : (r = x.min(e, n), o.css(t._position, r - 1))
                }
                i(t.value()), t.bind([D, A, P], function(e) {
                    i(e.values)
                })
            }, m.ui.plugin(p)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.colorpicker.min", ["kendo.core.min", "kendo.color.min", "kendo.popup.min", "kendo.slider.min", "kendo.userevents.min"], e)
    }(function() {
        return function(e, t, n) {
            function i(e, t, n) {
                n = d(n), n && !n.equals(e.color()) && ("change" == t && (e._value = n), n = 1 != n.a ? n.toCssRgba() : n.toCss(), e.trigger(t, {
                    value: n
                }))
            }

            function r(e, t, n) {
                var i, r;
                return e = Array.prototype.slice.call(e), i = e.length, r = e.indexOf(t), 0 > r ? 0 > n ? e[i - 1] : e[0] : (r += n, 0 > r ? r += i : r %= i, e[r])
            }

            function o(e) {
                e.preventDefault()
            }

            function a(e, t) {
                return function() {
                    return e.apply(t, arguments)
                }
            }
            var s = window.kendo,
                l = s.ui,
                c = l.Widget,
                d = s.parseColor,
                u = s.Color,
                h = s.keys,
                f = "background-color",
                p = "k-state-selected",
                m = "000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7",
                g = "FFFFFF,FFCCFF,FF99FF,FF66FF,FF33FF,FF00FF,CCFFFF,CCCCFF,CC99FF,CC66FF,CC33FF,CC00FF,99FFFF,99CCFF,9999FF,9966FF,9933FF,9900FF,FFFFCC,FFCCCC,FF99CC,FF66CC,FF33CC,FF00CC,CCFFCC,CCCCCC,CC99CC,CC66CC,CC33CC,CC00CC,99FFCC,99CCCC,9999CC,9966CC,9933CC,9900CC,FFFF99,FFCC99,FF9999,FF6699,FF3399,FF0099,CCFF99,CCCC99,CC9999,CC6699,CC3399,CC0099,99FF99,99CC99,999999,996699,993399,990099,FFFF66,FFCC66,FF9966,FF6666,FF3366,FF0066,CCFF66,CCCC66,CC9966,CC6666,CC3366,CC0066,99FF66,99CC66,999966,996666,993366,990066,FFFF33,FFCC33,FF9933,FF6633,FF3333,FF0033,CCFF33,CCCC33,CC9933,CC6633,CC3333,CC0033,99FF33,99CC33,999933,996633,993333,990033,FFFF00,FFCC00,FF9900,FF6600,FF3300,FF0000,CCFF00,CCCC00,CC9900,CC6600,CC3300,CC0000,99FF00,99CC00,999900,996600,993300,990000,66FFFF,66CCFF,6699FF,6666FF,6633FF,6600FF,33FFFF,33CCFF,3399FF,3366FF,3333FF,3300FF,00FFFF,00CCFF,0099FF,0066FF,0033FF,0000FF,66FFCC,66CCCC,6699CC,6666CC,6633CC,6600CC,33FFCC,33CCCC,3399CC,3366CC,3333CC,3300CC,00FFCC,00CCCC,0099CC,0066CC,0033CC,0000CC,66FF99,66CC99,669999,666699,663399,660099,33FF99,33CC99,339999,336699,333399,330099,00FF99,00CC99,009999,006699,003399,000099,66FF66,66CC66,669966,666666,663366,660066,33FF66,33CC66,339966,336666,333366,330066,00FF66,00CC66,009966,006666,003366,000066,66FF33,66CC33,669933,666633,663333,660033,33FF33,33CC33,339933,336633,333333,330033,00FF33,00CC33,009933,006633,003333,000033,66FF00,66CC00,669900,666600,663300,660000,33FF00,33CC00,339900,336600,333300,330000,00FF00,00CC00,009900,006600,003300,000000",
                v = {
                    apply: "Apply",
                    cancel: "Cancel"
                },
                _ = ".kendoColorTools",
                b = "click" + _,
                w = "keydown" + _,
                y = s.support.browser,
                k = y.msie && 9 > y.version,
                x = c.extend({
                    init: function(e, t) {
                        var n, i = this;
                        c.fn.init.call(i, e, t), e = i.element, t = i.options, i._value = t.value = d(t.value), i._tabIndex = e.attr("tabIndex") || 0, n = i._ariaId = t.ariaId, n && e.attr("aria-labelledby", n), t._standalone && (i._triggerSelect = i._triggerChange)
                    },
                    options: {
                        name: "ColorSelector",
                        value: null,
                        _standalone: !0
                    },
                    events: ["change", "select", "cancel"],
                    color: function(e) {
                        return e !== n && (this._value = d(e), this._updateUI(this._value)), this._value
                    },
                    value: function(e) {
                        return e = this.color(e), e && (e = this.options.opacity ? e.toCssRgba() : e.toCss()), e || null
                    },
                    enable: function(t) {
                        0 === arguments.length && (t = !0), e(".k-disabled-overlay", this.wrapper).remove(), t || this.wrapper.append("<div class='k-disabled-overlay'></div>"), this._onEnable(t)
                    },
                    _select: function(e, t) {
                        var n = this._value;
                        e = this.color(e), t || (this.element.trigger("change"), e.equals(n) ? this._standalone || this.trigger("cancel") : this.trigger("change", {
                            value: this.value()
                        }))
                    },
                    _triggerSelect: function(e) {
                        i(this, "select", e)
                    },
                    _triggerChange: function(e) {
                        i(this, "change", e)
                    },
                    destroy: function() {
                        this.element && this.element.off(_), this.wrapper && this.wrapper.off(_).find("*").off(_), this.wrapper = null, c.fn.destroy.call(this)
                    },
                    _updateUI: e.noop,
                    _selectOnHide: function() {
                        return null
                    },
                    _cancel: function() {
                        this.trigger("cancel")
                    }
                }),
                C = x.extend({
                    init: function(t, n) {
                        var i, r, o, l, c = this;
                        if (x.fn.init.call(c, t, n), t = c.wrapper = c.element, n = c.options, i = n.palette, "websafe" == i ? (i = g, n.columns = 18) : "basic" == i && (i = m), "string" == typeof i && (i = i.split(",")), e.isArray(i) && (i = e.map(i, function(e) {
                            return d(e)
                        })), c._selectedID = (n.ariaId || s.guid()) + "_selected", t.addClass("k-widget k-colorpalette").attr("role", "grid").attr("aria-readonly", "true").append(e(c._template({
                            colors: i,
                            columns: n.columns,
                            tileSize: n.tileSize,
                            value: c._value,
                            id: n.ariaId
                        }))).on(b, ".k-item", function(t) {
                            c._select(e(t.currentTarget).css(f))
                        }).attr("tabIndex", c._tabIndex).on(w, a(c._keydown, c)), r = n.tileSize) {
                            if (/number|string/.test(typeof r)) o = l = parseFloat(r);
                            else {
                                if ("object" != typeof r) throw Error("Unsupported value for the 'tileSize' argument");
                                o = parseFloat(r.width), l = parseFloat(r.height)
                            }
                            t.find(".k-item").css({
                                width: o,
                                height: l
                            })
                        }
                    },
                    focus: function() {
                        this.wrapper.focus()
                    },
                    options: {
                        name: "ColorPalette",
                        columns: 10,
                        tileSize: null,
                        palette: "basic"
                    },
                    _onEnable: function(e) {
                        e ? this.wrapper.attr("tabIndex", this._tabIndex) : this.wrapper.removeAttr("tabIndex")
                    },
                    _keydown: function(t) {
                        var n, i, a = this.wrapper,
                            s = a.find(".k-item"),
                            l = s.filter("." + p).get(0),
                            c = t.keyCode;
                        if (c == h.LEFT ? n = r(s, l, -1) : c == h.RIGHT ? n = r(s, l, 1) : c == h.DOWN ? n = r(s, l, this.options.columns) : c == h.UP ? n = r(s, l, -this.options.columns) : c == h.ENTER ? (o(t), l && this._select(e(l).css(f))) : c == h.ESC && this._cancel(), n) {
                            o(t), this._current(n);
                            try {
                                i = d(n.css(f)), this._triggerSelect(i)
                            } catch (u) {}
                        }
                    },
                    _current: function(t) {
                        this.wrapper.find("." + p).removeClass(p).attr("aria-selected", !1).removeAttr("id"), e(t).addClass(p).attr("aria-selected", !0).attr("id", this._selectedID), this.element.removeAttr("aria-activedescendant").attr("aria-activedescendant", this._selectedID)
                    },
                    _updateUI: function(t) {
                        var i = null;
                        this.wrapper.find(".k-item").each(function() {
                            var r = d(e(this).css(f));
                            return r && r.equals(t) ? (i = this, !1) : n
                        }), this._current(i)
                    },
                    _template: s.template('<table class="k-palette k-reset" role="presentation"><tr role="row"># for (var i = 0; i < colors.length; ++i) { ## var selected = colors[i].equals(value); ## if (i && i % columns == 0) { # </tr><tr role="row"> # } #<td role="gridcell" unselectable="on" style="background-color:#= colors[i].toCss() #"#= selected ? " aria-selected=true" : "" # #=(id && i === 0) ? "id=\\""+id+"\\" " : "" # class="k-item#= selected ? " ' + p + '" : "" #" aria-label="#= colors[i].toCss() #"></td># } #</tr></table>')
                }),
                S = x.extend({
                    init: function(t, n) {
                        var i = this;
                        x.fn.init.call(i, t, n), n = i.options, t = i.element, i.wrapper = t.addClass("k-widget k-flatcolorpicker").append(i._template(n)), i._hueElements = e(".k-hsv-rectangle, .k-transparency-slider .k-slider-track", t), i._selectedColor = e(".k-selected-color-display", t), i._colorAsText = e("input.k-color-value", t), i._sliders(), i._hsvArea(), i._updateUI(i._value || d("#f00")), t.find("input.k-color-value").on(w, function(t) {
                            var n, r, o = this;
                            if (t.keyCode == h.ENTER) try {
                                n = d(o.value), r = i.color(), i._select(n, n.equals(r))
                            } catch (a) {
                                e(o).addClass("k-state-error")
                            } else i.options.autoupdate && setTimeout(function() {
                                var e = d(o.value, !0);
                                e && i._updateUI(e, !0)
                            }, 10)
                        }).end().on(b, ".k-controls button.apply", function() {
                            i._select(i._getHSV())
                        }).on(b, ".k-controls button.cancel", function() {
                            i._updateUI(i.color()), i._cancel()
                        }), k && i._applyIEFilter()
                    },
                    destroy: function() {
                        this._hueSlider.destroy(), this._opacitySlider && this._opacitySlider.destroy(), this._hueSlider = this._opacitySlider = this._hsvRect = this._hsvHandle = this._hueElements = this._selectedColor = this._colorAsText = null, x.fn.destroy.call(this)
                    },
                    options: {
                        name: "FlatColorPicker",
                        opacity: !1,
                        buttons: !1,
                        input: !0,
                        preview: !0,
                        autoupdate: !0,
                        messages: v
                    },
                    _applyIEFilter: function() {
                        var e = this.element.find(".k-hue-slider .k-slider-track")[0],
                            t = e.currentStyle.backgroundImage;
                        t = t.replace(/^url\([\'\"]?|[\'\"]?\)$/g, ""), e.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + t + "', sizingMethod='scale')"
                    },
                    _sliders: function() {
                        function e(e) {
                            n._updateUI(n._getHSV(e.value, null, null, null))
                        }

                        function t(e) {
                            n._updateUI(n._getHSV(null, null, null, e.value / 100))
                        }
                        var n = this,
                            i = n.element;
                        n._hueSlider = i.find(".k-hue-slider").kendoSlider({
                            min: 0,
                            max: 359,
                            tickPlacement: "none",
                            showButtons: !1,
                            slide: e,
                            change: e
                        }).data("kendoSlider"), n._opacitySlider = i.find(".k-transparency-slider").kendoSlider({
                            min: 0,
                            max: 100,
                            tickPlacement: "none",
                            showButtons: !1,
                            slide: t,
                            change: t
                        }).data("kendoSlider")
                    },
                    _hsvArea: function() {
                        function e(e, n) {
                            var i = this.offset,
                                r = e - i.left,
                                o = n - i.top,
                                a = this.width,
                                s = this.height;
                            r = 0 > r ? 0 : r > a ? a : r, o = 0 > o ? 0 : o > s ? s : o, t._svChange(r / a, 1 - o / s)
                        }
                        var t = this,
                            n = t.element,
                            i = n.find(".k-hsv-rectangle"),
                            r = i.find(".k-draghandle").attr("tabIndex", 0).on(w, a(t._keydown, t));
                        t._hsvEvents = new s.UserEvents(i, {
                            global: !0,
                            press: function(t) {
                                this.offset = s.getOffset(i), this.width = i.width(), this.height = i.height(), r.focus(), e.call(this, t.x.location, t.y.location)
                            },
                            start: function() {
                                i.addClass("k-dragging"), r.focus()
                            },
                            move: function(t) {
                                t.preventDefault(), e.call(this, t.x.location, t.y.location)
                            },
                            end: function() {
                                i.removeClass("k-dragging")
                            }
                        }), t._hsvRect = i, t._hsvHandle = r
                    },
                    _onEnable: function(e) {
                        this._hueSlider.enable(e), this._opacitySlider && this._opacitySlider.enable(e), this.wrapper.find("input").attr("disabled", !e);
                        var t = this._hsvRect.find(".k-draghandle");
                        e ? t.attr("tabIndex", this._tabIndex) : t.removeAttr("tabIndex")
                    },
                    _keydown: function(e) {
                        function t(t, n) {
                            var r = i._getHSV();
                            r[t] += n * (e.shiftKey ? .01 : .05), 0 > r[t] && (r[t] = 0), r[t] > 1 && (r[t] = 1), i._updateUI(r), o(e)
                        }

                        function n(t) {
                            var n = i._getHSV();
                            n.h += t * (e.shiftKey ? 1 : 5), 0 > n.h && (n.h = 0), n.h > 359 && (n.h = 359), i._updateUI(n), o(e)
                        }
                        var i = this;
                        switch (e.keyCode) {
                            case h.LEFT:
                                e.ctrlKey ? n(-1) : t("s", -1);
                                break;
                            case h.RIGHT:
                                e.ctrlKey ? n(1) : t("s", 1);
                                break;
                            case h.UP:
                                t(e.ctrlKey && i._opacitySlider ? "a" : "v", 1);
                                break;
                            case h.DOWN:
                                t(e.ctrlKey && i._opacitySlider ? "a" : "v", -1);
                                break;
                            case h.ENTER:
                                i._select(i._getHSV());
                                break;
                            case h.F2:
                                i.wrapper.find("input.k-color-value").focus().select();
                                break;
                            case h.ESC:
                                i._cancel()
                        }
                    },
                    focus: function() {
                        this._hsvHandle.focus()
                    },
                    _getHSV: function(e, t, n, i) {
                        var r = this._hsvRect,
                            o = r.width(),
                            a = r.height(),
                            s = this._hsvHandle.position();
                        return null == e && (e = this._hueSlider.value()), null == t && (t = s.left / o), null == n && (n = 1 - s.top / a), null == i && (i = this._opacitySlider ? this._opacitySlider.value() / 100 : 1), u.fromHSV(e, t, n, i)
                    },
                    _svChange: function(e, t) {
                        var n = this._getHSV(null, e, t, null);
                        this._updateUI(n)
                    },
                    _updateUI: function(e, t) {
                        var n = this,
                            i = n._hsvRect;
                        e && (this._colorAsText.removeClass("k-state-error"), n._selectedColor.css(f, e.toDisplay()), t || n._colorAsText.val(n._opacitySlider ? e.toCssRgba() : e.toCss()), n._triggerSelect(e), e = e.toHSV(), n._hsvHandle.css({
                            left: e.s * i.width() + "px",
                            top: (1 - e.v) * i.height() + "px"
                        }), n._hueElements.css(f, u.fromHSV(e.h, 1, 1, 1).toCss()), n._hueSlider.value(e.h), n._opacitySlider && n._opacitySlider.value(100 * e.a))
                    },
                    _selectOnHide: function() {
                        return this.options.buttons ? null : this._getHSV()
                    },
                    _template: s.template('# if (preview) { #<div class="k-selected-color"><div class="k-selected-color-display"><input class="k-color-value" #= !data.input ? \'style="visibility: hidden;"\' : "" #></div></div># } #<div class="k-hsv-rectangle"><div class="k-hsv-gradient"></div><div class="k-draghandle"></div></div><input class="k-hue-slider" /># if (opacity) { #<input class="k-transparency-slider" /># } ## if (buttons) { #<div unselectable="on" class="k-controls"><button class="k-button k-primary apply">#: messages.apply #</button> <button class="k-button cancel">#: messages.cancel #</button></div># } #')
                }),
                T = c.extend({
                    init: function(t, n) {
                        var i, r, o, a, s, l = this;
                        c.fn.init.call(l, t, n), n = l.options, t = l.element, i = t.attr("value") || t.val(), i = i ? d(i, !0) : d(n.value, !0), l._value = n.value = i, r = l.wrapper = e(l._template(n)), t.hide().after(r), t.is("input") && (t.appendTo(r), o = t.closest("label"), a = t.attr("id"), a && (o = o.add('label[for="' + a + '"]')), o.click(function(e) {
                            l.open(), e.preventDefault()
                        })), l._tabIndex = t.attr("tabIndex") || 0, l.enable(!t.attr("disabled")), s = t.attr("accesskey"), s && (t.attr("accesskey", null), r.attr("accesskey", s)), l.bind("activate", function(e) {
                            e.isDefaultPrevented() || l.toggle()
                        }), l._updateUI(i)
                    },
                    destroy: function() {
                        this.wrapper.off(_).find("*").off(_), this._popup && (this._selector.destroy(), this._popup.destroy()), this._selector = this._popup = this.wrapper = null, c.fn.destroy.call(this)
                    },
                    enable: function(e) {
                        var t = this,
                            n = t.wrapper,
                            i = n.children(".k-picker-wrap"),
                            r = i.find(".k-select");
                        0 === arguments.length && (e = !0), t.element.attr("disabled", !e), n.attr("aria-disabled", !e), r.off(_).on("mousedown" + _, o), n.addClass("k-state-disabled").removeAttr("tabIndex").add("*", n).off(_), e && n.removeClass("k-state-disabled").attr("tabIndex", t._tabIndex).on("mouseenter" + _, function() {
                            i.addClass("k-state-hover")
                        }).on("mouseleave" + _, function() {
                            i.removeClass("k-state-hover")
                        }).on("focus" + _, function() {
                            i.addClass("k-state-focused")
                        }).on("blur" + _, function() {
                            i.removeClass("k-state-focused")
                        }).on(w, a(t._keydown, t)).on(b, ".k-select", a(t.toggle, t)).on(b, t.options.toolIcon ? ".k-tool-icon" : ".k-selected-color", function() {
                            t.trigger("activate")
                        })
                    },
                    _template: s.template('<span role="textbox" aria-haspopup="true" class="k-widget k-colorpicker k-header"><span class="k-picker-wrap k-state-default"># if (toolIcon) { #<span class="k-tool-icon #= toolIcon #"><span class="k-selected-color"></span></span># } else { #<span class="k-selected-color"></span># } #<span class="k-select" unselectable="on"><span class="k-icon k-i-arrow-s" unselectable="on"></span></span></span></span>'),
                    options: {
                        name: "ColorPicker",
                        palette: null,
                        columns: 10,
                        toolIcon: null,
                        value: null,
                        messages: v,
                        opacity: !1,
                        buttons: !0,
                        preview: !0,
                        ARIATemplate: 'Current selected color is #=data || ""#'
                    },
                    events: ["activate", "change", "select", "open", "close"],
                    open: function() {
                        this._getPopup().open()
                    },
                    close: function() {
                        this._getPopup().close()
                    },
                    toggle: function() {
                        this._getPopup().toggle()
                    },
                    color: x.fn.color,
                    value: x.fn.value,
                    _select: x.fn._select,
                    _triggerSelect: x.fn._triggerSelect,
                    _isInputTypeColor: function() {
                        var e = this.element[0];
                        return /^input$/i.test(e.tagName) && /^color$/i.test(e.type)
                    },
                    _updateUI: function(e) {
                        var t = "";
                        e && (t = this._isInputTypeColor() || 1 == e.a ? e.toCss() : e.toCssRgba(), this.element.val(t)), this._ariaTemplate || (this._ariaTemplate = s.template(this.options.ARIATemplate)), this.wrapper.attr("aria-label", this._ariaTemplate(t)), this._triggerSelect(e), this.wrapper.find(".k-selected-color").css(f, e ? e.toDisplay() : "transparent")
                    },
                    _keydown: function(e) {
                        var t = e.keyCode;
                        this._getPopup().visible() ? (t == h.ESC ? this._selector._cancel() : this._selector._keydown(e), o(e)) : (t == h.ENTER || t == h.DOWN) && (this.open(), o(e))
                    },
                    _getPopup: function() {
                        var t, i, r, o, a = this,
                            l = a._popup;
                        return l || (t = a.options, i = t.palette ? C : S, t._standalone = !1, delete t.select, delete t.change, delete t.cancel, r = s.guid(), o = a._selector = new i(e('<div id="' + r + '"/>').appendTo(document.body), t), a.wrapper.attr("aria-owns", r), a._popup = l = o.wrapper.kendoPopup({
                            anchor: a.wrapper,
                            adjustSize: {
                                width: 5,
                                height: 0
                            }
                        }).data("kendoPopup"), o.bind({
                            select: function(e) {
                                a._updateUI(d(e.value))
                            },
                            change: function() {
                                a._select(o.color()), a.close()
                            },
                            cancel: function() {
                                a.close()
                            }
                        }), l.bind({
                            close: function(e) {
                                if (a.trigger("close")) return e.preventDefault(), n;
                                a.wrapper.children(".k-picker-wrap").removeClass("k-state-focused");
                                var t = o._selectOnHide();
                                t ? a._select(t) : (a.wrapper.focus(), a._updateUI(a.color()))
                            },
                            open: function(e) {
                                a.trigger("open") ? e.preventDefault() : a.wrapper.children(".k-picker-wrap").addClass("k-state-focused")
                            },
                            activate: function() {
                                o._select(a.color(), !0), o.focus(), a.wrapper.children(".k-picker-wrap").addClass("k-state-focused")
                            }
                        })), l
                    }
                });
            l.plugin(C), l.plugin(S), l.plugin(T)
        }(jQuery, parseInt), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.numerictextbox.min", ["kendo.core.min", "kendo.userevents.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t) {
                return '<span unselectable="on" class="k-link"><span unselectable="on" class="k-icon k-i-arrow-' + e + '" title="' + t + '">' + t + "</span></span>"
            }
            var i = window.kendo,
                r = i.caret,
                o = i.keys,
                a = i.ui,
                s = a.Widget,
                l = i._activeElement,
                c = i._extractFormat,
                d = i.parseFloat,
                u = i.support.placeholder,
                h = i.getCulture,
                f = i._round,
                p = "change",
                m = "disabled",
                g = "readonly",
                v = "k-input",
                _ = "spin",
                b = ".kendoNumericTextBox",
                w = "touchend",
                y = "mouseleave" + b,
                k = "mouseenter" + b + " " + y,
                x = "k-state-default",
                C = "k-state-focused",
                S = "k-state-hover",
                T = "focus",
                D = ".",
                A = "k-state-selected",
                E = "k-state-disabled",
                F = "aria-disabled",
                I = "aria-readonly",
                M = /^(-)?(\d*)$/,
                R = null,
                P = e.proxy,
                z = e.extend,
                B = s.extend({
                    init: function(n, r) {
                        var o, a, l, d, u, h = this,
                            f = r && r.step !== t;
                        s.fn.init.call(h, n, r), r = h.options, n = h.element.on("focusout" + b, P(h._focusout, h)).attr("role", "spinbutton"), r.placeholder = r.placeholder || n.attr("placeholder"), h._initialOptions = z({}, r), h._reset(), h._wrapper(), h._arrows(), h._input(), i.support.mobileOS ? h._text.on(w + b + " " + T + b, function() {
                            h._toggleText(!1), n.focus()
                        }) : h._text.on(T + b, P(h._click, h)), o = h.min(n.attr("min")), a = h.max(n.attr("max")), l = h._parse(n.attr("step")), r.min === R && o !== R && (r.min = o), r.max === R && a !== R && (r.max = a), f || l === R || (r.step = l), n.attr("aria-valuemin", r.min).attr("aria-valuemax", r.max), r.format = c(r.format), d = r.value, h.value(d !== R ? d : n.val()), u = n.is("[disabled]") || e(h.element).parents("fieldset").is(":disabled"), u ? h.enable(!1) : h.readonly(n.is("[readonly]")), i.notify(h)
                    },
                    options: {
                        name: "NumericTextBox",
                        decimals: R,
                        min: R,
                        max: R,
                        value: R,
                        step: 1,
                        culture: "",
                        format: "n",
                        spinners: !0,
                        placeholder: "",
                        upArrowText: "Increase value",
                        downArrowText: "Decrease value"
                    },
                    events: [p, _],
                    _editable: function(e) {
                        var t = this,
                            n = t.element,
                            i = e.disable,
                            r = e.readonly,
                            o = t._text.add(n),
                            a = t._inputWrapper.off(k);
                        t._toggleText(!0), t._upArrowEventHandler.unbind("press"), t._downArrowEventHandler.unbind("press"), n.off("keydown" + b).off("keypress" + b).off("paste" + b), r || i ? (a.addClass(i ? E : x).removeClass(i ? x : E), o.attr(m, i).attr(g, r).attr(F, i).attr(I, r)) : (a.addClass(x).removeClass(E).on(k, t._toggleHover), o.removeAttr(m).removeAttr(g).attr(F, !1).attr(I, !1), t._upArrowEventHandler.bind("press", function(e) {
                            e.preventDefault(), t._spin(1), t._upArrow.addClass(A)
                        }), t._downArrowEventHandler.bind("press", function(e) {
                            e.preventDefault(), t._spin(-1), t._downArrow.addClass(A)
                        }), t.element.on("keydown" + b, P(t._keydown, t)).on("keypress" + b, P(t._keypress, t)).on("paste" + b, P(t._paste, t)))
                    },
                    readonly: function(e) {
                        this._editable({
                            readonly: e === t ? !0 : e,
                            disable: !1
                        })
                    },
                    enable: function(e) {
                        this._editable({
                            readonly: !1,
                            disable: !(e = e === t ? !0 : e)
                        })
                    },
                    destroy: function() {
                        var e = this;
                        e.element.add(e._text).add(e._upArrow).add(e._downArrow).add(e._inputWrapper).off(b), e._upArrowEventHandler.destroy(), e._downArrowEventHandler.destroy(), e._form && e._form.off("reset", e._resetHandler), s.fn.destroy.call(e)
                    },
                    min: function(e) {
                        return this._option("min", e)
                    },
                    max: function(e) {
                        return this._option("max", e)
                    },
                    step: function(e) {
                        return this._option("step", e)
                    },
                    value: function(e) {
                        var n, i = this;
                        return e === t ? i._value : (e = i._parse(e), n = i._adjust(e), e === n && (i._update(e), i._old = i._value), t)
                    },
                    focus: function() {
                        this._focusin()
                    },
                    _adjust: function(e) {
                        var t = this,
                            n = t.options,
                            i = n.min,
                            r = n.max;
                        return e === R ? e : (i !== R && i > e ? e = i : r !== R && e > r && (e = r),
                            e)
                    },
                    _arrows: function() {
                        var t, r = this,
                            o = function() {
                                clearTimeout(r._spinning), t.removeClass(A)
                            },
                            a = r.options,
                            s = a.spinners,
                            l = r.element;
                        t = l.siblings(".k-icon"), t[0] || (t = e(n("n", a.upArrowText) + n("s", a.downArrowText)).insertAfter(l), t.wrapAll('<span class="k-select"/>')), s || (t.parent().toggle(s), r._inputWrapper.addClass("k-expand-padding")), r._upArrow = t.eq(0), r._upArrowEventHandler = new i.UserEvents(r._upArrow, {
                            release: o
                        }), r._downArrow = t.eq(1), r._downArrowEventHandler = new i.UserEvents(r._downArrow, {
                            release: o
                        })
                    },
                    _blur: function() {
                        var e = this;
                        e._toggleText(!0), e._change(e.element.val())
                    },
                    _click: function(e) {
                        var t = this;
                        clearTimeout(t._focusing), t._focusing = setTimeout(function() {
                            var n, i, o, a = e.target,
                                s = r(a)[0],
                                l = a.value.substring(0, s),
                                c = t._format(t.options.format),
                                d = c[","],
                                u = 0;
                            d && (i = RegExp("\\" + d, "g"), o = RegExp("([\\d\\" + d + "]+)(\\" + c[D] + ")?(\\d+)?")), o && (n = o.exec(l)), n && (u = n[0].replace(i, "").length, -1 != l.indexOf("(") && 0 > t._value && u++), t._focusin(), r(t.element[0], u)
                        })
                    },
                    _change: function(e) {
                        var t = this;
                        t._update(e), e = t._value, t._old != e && (t._old = e, t._typing || t.element.trigger(p), t.trigger(p)), t._typing = !1
                    },
                    _culture: function(e) {
                        return e || h(this.options.culture)
                    },
                    _focusin: function() {
                        var e = this;
                        e._inputWrapper.addClass(C), e._toggleText(!1), e.element[0].focus()
                    },
                    _focusout: function() {
                        var e = this;
                        clearTimeout(e._focusing), e._inputWrapper.removeClass(C).removeClass(S), e._blur()
                    },
                    _format: function(e, t) {
                        var n = this._culture(t).numberFormat;
                        return e = e.toLowerCase(), e.indexOf("c") > -1 ? n = n.currency : e.indexOf("p") > -1 && (n = n.percent), n
                    },
                    _input: function() {
                        var t, n = this,
                            i = "k-formatted-value",
                            r = n.element.addClass(v).show()[0],
                            o = r.accessKey,
                            a = n.wrapper;
                        t = a.find(D + i), t[0] || (t = e('<input type="text"/>').insertBefore(r).addClass(i));
                        try {
                            r.setAttribute("type", "text")
                        } catch (s) {
                            r.type = "text"
                        }
                        t[0].tabIndex = r.tabIndex, t[0].style.cssText = r.style.cssText, t[0].title = r.title, t.prop("placeholder", n.options.placeholder), o && (t.attr("accesskey", o), r.accessKey = ""), n._text = t.addClass(r.className)
                    },
                    _keydown: function(e) {
                        var t = this,
                            n = e.keyCode;
                        t._key = n, n == o.DOWN ? t._step(-1) : n == o.UP ? t._step(1) : n == o.ENTER ? t._change(t.element.val()) : t._typing = !0
                    },
                    _keypress: function(e) {
                        var t, n, i, a, s, l, c, d, u, h, f;
                        0 === e.which || e.metaKey || e.ctrlKey || e.keyCode === o.BACKSPACE || e.keyCode === o.ENTER || (t = this, n = t.options.min, i = t.element, a = r(i), s = a[0], l = a[1], c = String.fromCharCode(e.which), d = t._format(t.options.format), u = t._key === o.NUMPAD_DOT, h = i.val(), u && (c = d[D]), h = h.substring(0, s) + c + h.substring(l), f = t._numericRegex(d).test(h), f && u ? (i.val(h), r(i, s + c.length), e.preventDefault()) : (null !== n && n >= 0 && "-" === h.charAt(0) || !f) && e.preventDefault(), t._key = 0)
                    },
                    _numericRegex: function(e) {
                        var t = this,
                            n = e[D],
                            i = t.options.decimals;
                        return n === D && (n = "\\" + n), i === R && (i = e.decimals), 0 === i ? M : (t._separator !== n && (t._separator = n, t._floatRegExp = RegExp("^(-)?(((\\d+(" + n + "\\d*)?)|(" + n + "\\d*)))?$")), t._floatRegExp)
                    },
                    _paste: function(e) {
                        var t = this,
                            n = e.target,
                            i = n.value;
                        setTimeout(function() {
                            t._parse(n.value) === R && t._update(i)
                        })
                    },
                    _option: function(e, n) {
                        var i = this,
                            r = i.options;
                        return n === t ? r[e] : (n = i._parse(n), (n || "step" !== e) && (r[e] = n, i.element.attr("aria-value" + e, n).attr(e, n)), t)
                    },
                    _spin: function(e, t) {
                        var n = this;
                        t = t || 500, clearTimeout(n._spinning), n._spinning = setTimeout(function() {
                            n._spin(e, 50)
                        }, t), n._step(e)
                    },
                    _step: function(e) {
                        var t = this,
                            n = t.element,
                            i = t._parse(n.val()) || 0;
                        l() != n[0] && t._focusin(), i += t.options.step * e, t._update(t._adjust(i)), t._typing = !1, t.trigger(_)
                    },
                    _toggleHover: function(t) {
                        e(t.currentTarget).toggleClass(S, "mouseenter" === t.type)
                    },
                    _toggleText: function(e) {
                        var t = this;
                        t._text.toggle(e), t.element.toggle(!e)
                    },
                    _parse: function(e, t) {
                        return d(e, this._culture(t), this.options.format)
                    },
                    _update: function(e) {
                        var t, n = this,
                            r = n.options,
                            o = r.format,
                            a = r.decimals,
                            s = n._culture(),
                            l = n._format(o, s);
                        a === R && (a = l.decimals), e = n._parse(e, s), t = e !== R, t && (e = parseFloat(f(e, a))), n._value = e = n._adjust(e), n._placeholder(i.toString(e, o, s)), t ? (e = "" + e, -1 !== e.indexOf("e") && (e = f(+e, a)), e = e.replace(D, l[D])) : e = "", n.element.val(e).attr("aria-valuenow", e)
                    },
                    _placeholder: function(e) {
                        this._text.val(e), u || e || this._text.val(this.options.placeholder)
                    },
                    _wrapper: function() {
                        var t, n = this,
                            i = n.element,
                            r = i[0];
                        t = i.parents(".k-numerictextbox"), t.is("span.k-numerictextbox") || (t = i.hide().wrap('<span class="k-numeric-wrap k-state-default" />').parent(), t = t.wrap("<span/>").parent()), t[0].style.cssText = r.style.cssText, r.style.width = "", n.wrapper = t.addClass("k-widget k-numerictextbox").addClass(r.className).css("display", ""), n._inputWrapper = e(t[0].firstChild)
                    },
                    _reset: function() {
                        var t = this,
                            n = t.element,
                            i = n.attr("form"),
                            r = i ? e("#" + i) : n.closest("form");
                        r[0] && (t._resetHandler = function() {
                            setTimeout(function() {
                                t.value(n[0].value), t.max(t._initialOptions.max), t.min(t._initialOptions.min)
                            })
                        }, t._form = r.on("reset", t._resetHandler))
                    }
                });
            a.plugin(B)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.filtermenu.min", ["kendo.datepicker.min", "kendo.numerictextbox.min", "kendo.dropdownlist.min", "kendo.binder.min"], e)
    }(function() {
        return function(e, t) {
            function n(t, i) {
                t.filters && (t.filters = e.grep(t.filters, function(e) {
                    return n(e, i), e.filters ? e.filters.length : e.field != i
                }))
            }

            function i(e) {
                var t, n, i, r, o, a;
                if (e && e.length)
                    for (a = [], t = 0, n = e.length; n > t; t++) i = e[t], o = "" !== i.text ? i.text || i.value || i : i.text, r = null == i.value ? i.text || i : i.value, a[t] = {
                        text: o,
                        value: r
                    };
                return a
            }

            function r(t, n) {
                return e.grep(t, function(t) {
                    return t.filters ? (t.filters = e.grep(t.filters, function(e) {
                        return e.field != n
                    }), t.filters.length) : t.field != n
                })
            }

            function o(t, n) {
                t.filters && (t.filters = e.grep(t.filters, function(e) {
                    return o(e, n), e.filters ? e.filters.length : e.field == n && "eq" == e.operator
                }))
            }

            function a(n) {
                return "and" == n.logic && n.filters.length > 1 ? [] : n.filters ? e.map(n.filters, function(e) {
                    return a(e)
                }) : null !== n.value && n.value !== t ? [n.value] : []
            }

            function s(e, n) {
                for (var i, r, o = c.getter(n, !0), a = [], s = 0, l = {}; e.length > s;) i = e[s++], r = o(i), r === t || null === r || l.hasOwnProperty(r) || (a.push(i), l[r] = !0);
                return a
            }

            function l(e, t) {
                return function(n) {
                    var i = e(n);
                    return s(i, t)
                }
            }
            var c = window.kendo,
                d = c.ui,
                u = e.proxy,
                h = "kendoPopup",
                f = "init",
                p = "refresh",
                m = "change",
                g = ".kendoFilterMenu",
                v = "Is equal to",
                _ = "Is not equal to",
                b = {
                    number: "numerictextbox",
                    date: "datepicker"
                },
                w = {
                    string: "text",
                    number: "number",
                    date: "date"
                },
                y = c.isFunction,
                k = d.Widget,
                x = '<div><div class="k-filter-help-text">#=messages.info#</div><label><input type="radio" data-#=ns#bind="checked: filters[0].value" value="true" name="filters[0].value"/>#=messages.isTrue#</label><label><input type="radio" data-#=ns#bind="checked: filters[0].value" value="false" name="filters[0].value"/>#=messages.isFalse#</label><div><button type="submit" class="k-button k-primary">#=messages.filter#</button><button type="reset" class="k-button">#=messages.clear#</button></div></div>',
                C = '<div><div class="k-filter-help-text">#=messages.info#</div><select data-#=ns#bind="value: filters[0].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select data-#=ns#bind="value:filters[0].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#" data-#=ns#value-primitive="true"></select>#}else{#<input data-#=ns#bind="value:filters[0].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}##if(extra){#<select class="k-filter-and" data-#=ns#bind="value: logic" data-#=ns#role="dropdownlist"><option value="and">#=messages.and#</option><option value="or">#=messages.or#</option></select><select data-#=ns#bind="value: filters[1].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select data-#=ns#bind="value:filters[1].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#" data-#=ns#value-primitive="true"></select>#}else{#<input data-#=ns#bind="value: filters[1].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""#/>#}##}#<div><button type="submit" class="k-button k-primary">#=messages.filter#</button><button type="reset" class="k-button">#=messages.clear#</button></div></div>',
                S = '<div data-#=ns#role="view" data-#=ns#init-widgets="false" data-#=ns#use-native-scrolling="true" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><button class="k-button k-cancel">#=messages.cancel#</button>#=title#<button type="submit" class="k-button k-submit">#=messages.filter#</button></div><form class="k-filter-menu k-mobile-list"><ul class="k-filter-help-text"><li><span class="k-link">#=messages.info#</span><ul><li class="k-item"><label class="k-label">#=messages.operator#<select data-#=ns#bind="value: filters[0].operator">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select></label></li><li class="k-item"><label class="k-label">#=messages.value##if(values){#<select data-#=ns#bind="value:filters[0].value"><option value="">#=messages.selectValue#</option>#for(var val in values){#<option value="#=values[val].value#">#=values[val].text#</option>#}#</select>#}else{#<input data-#=ns#bind="value:filters[0].value" class="k-textbox" type="#=inputType#" #=useRole ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}#</label></li>#if(extra){#</ul><ul class="k-filter-help-text"><li><span class="k-link"></span><li class="k-item"><label class="k-label"><input type="radio" name="logic" class="k-check" data-#=ns#bind="checked: logic" value="and" />#=messages.and#</label></li><li class="k-item"><label class="k-label"><input type="radio" name="logic" class="k-check" data-#=ns#bind="checked: logic" value="or" />#=messages.or#</label></li></ul><ul class="k-filter-help-text"><li><span class="k-link"></span><li class="k-item"><label class="k-label">#=messages.operator#<select data-#=ns#bind="value: filters[1].operator">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select></label></li><li class="k-item"><label class="k-label">#=messages.value##if(values){#<select data-#=ns#bind="value:filters[1].value"><option value="">#=messages.selectValue#</option>#for(var val in values){#<option value="#=values[val].value#">#=values[val].text#</option>#}#</select>#}else{#<input data-#=ns#bind="value:filters[1].value" class="k-textbox" type="#=inputType#" #=useRole ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}#</label></li>#}#</ul></li><li class="k-button-container"><button type="reset" class="k-button">#=messages.clear#</button></li></ul></div></form></div>',
                T = '<div data-#=ns#role="view" data-#=ns#init-widgets="false" data-#=ns#use-native-scrolling="true" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><button class="k-button k-cancel">#=messages.cancel#</button>#=title#<button type="submit" class="k-button k-submit">#=messages.filter#</button></div><form class="k-filter-menu k-mobile-list"><ul class="k-filter-help-text"><li><span class="k-link">#=messages.info#</span><ul><li class="k-item"><label class="k-label"><input class="k-check" type="radio" data-#=ns#bind="checked: filters[0].value" value="true" name="filters[0].value"/>#=messages.isTrue#</label></li><li class="k-item"><label class="k-label"><input class="k-check" type="radio" data-#=ns#bind="checked: filters[0].value" value="false" name="filters[0].value"/>#=messages.isFalse#</label></li></ul></li><li class="k-button-container"><button type="reset" class="k-button">#=messages.clear#</button></li></ul></form></div>',
                D = k.extend({
                    init: function(t, n) {
                        var i, r, o, a, s = this,
                            l = "string";
                        k.fn.init.call(s, t, n), i = s.operators = n.operators || {}, t = s.element, n = s.options, n.appendToElement || (o = t.addClass("k-with-icon k-filterable").find(".k-grid-filter"), o[0] || (o = t.prepend('<a class="k-grid-filter" href="#"><span class="k-icon k-filter">' + n.messages.filter + "</span></a>").find(".k-grid-filter")), o.attr("tabindex", -1).on("click" + g, u(s._click, s))), s.link = o || e(), s.dataSource = E.create(n.dataSource), s.field = n.field || t.attr(c.attr("field")), s.model = s.dataSource.reader.model, s._parse = function(e) {
                            return null != e ? e + "" : e
                        }, s.model && s.model.fields && (a = s.model.fields[s.field], a && (l = a.type || "string", a.parse && (s._parse = u(a.parse, a)))), n.values && (l = "enums"), s.type = l, i = i[l] || n.operators[l];
                        for (r in i) break;
                        s._defaultFilter = function() {
                            return {
                                field: s.field,
                                operator: r || "eq",
                                value: ""
                            }
                        }, s._refreshHandler = u(s.refresh, s), s.dataSource.bind(m, s._refreshHandler), n.appendToElement ? s._init() : s.refresh()
                    },
                    _init: function() {
                        var t, n = this,
                            i = n.options.ui,
                            r = y(i);
                        n.pane = n.options.pane, n.pane && (n._isMobile = !0), r || (t = i || b[n.type]), n._isMobile ? n._createMobileForm(t) : n._createForm(t), n.form.on("submit" + g, u(n._submit, n)).on("reset" + g, u(n._reset, n)), r && n.form.find(".k-textbox").removeClass("k-textbox").each(function() {
                            i(e(this))
                        }), n.form.find("[" + c.attr("role") + "=numerictextbox]").removeClass("k-textbox").end().find("[" + c.attr("role") + "=datetimepicker]").removeClass("k-textbox").end().find("[" + c.attr("role") + "=timepicker]").removeClass("k-textbox").end().find("[" + c.attr("role") + "=datepicker]").removeClass("k-textbox"), n.refresh(), n.trigger(f, {
                            field: n.field,
                            container: n.form
                        }), c.cycleForm(n.form)
                    },
                    _createForm: function(t) {
                        var n = this,
                            r = n.options,
                            o = n.operators || {},
                            a = n.type;
                        o = o[a] || r.operators[a], n.form = e('<form class="k-filter-menu"/>').html(c.template("boolean" === a ? x : C)({
                            field: n.field,
                            format: r.format,
                            ns: c.ns,
                            messages: r.messages,
                            extra: r.extra,
                            operators: o,
                            type: a,
                            role: t,
                            values: i(r.values)
                        })), r.appendToElement ? (n.element.append(n.form), n.popup = n.element.closest(".k-popup").data(h)) : n.popup = n.form[h]({
                            anchor: n.link,
                            open: u(n._open, n),
                            activate: u(n._activate, n),
                            close: function() {
                                n.options.closeCallback && n.options.closeCallback(n.element)
                            }
                        }).data(h), n.form.on("keydown" + g, u(n._keydown, n))
                    },
                    _createMobileForm: function(t) {
                        var n = this,
                            r = n.options,
                            o = n.operators || {},
                            a = n.type;
                        o = o[a] || r.operators[a], n.form = e("<div />").html(c.template("boolean" === a ? T : S)({
                            field: n.field,
                            title: r.title || n.field,
                            format: r.format,
                            ns: c.ns,
                            messages: r.messages,
                            extra: r.extra,
                            operators: o,
                            type: a,
                            role: t,
                            useRole: !c.support.input.date && "date" === a || "number" === a,
                            inputType: w[a],
                            values: i(r.values)
                        })), n.view = n.pane.append(n.form.html()), n.form = n.view.element.find("form"), n.view.element.on("click", ".k-submit", function(e) {
                            n.form.submit(), e.preventDefault()
                        }).on("click", ".k-cancel", function(e) {
                            n._closeForm(), e.preventDefault()
                        })
                    },
                    refresh: function() {
                        var e = this,
                            t = e.dataSource.filter() || {
                                filters: [],
                                logic: "and"
                            };
                        e.filterModel = c.observable({
                            logic: "and",
                            filters: [e._defaultFilter(), e._defaultFilter()]
                        }), e.form && c.bind(e.form.children().first(), e.filterModel), e._bind(t) ? e.link.addClass("k-state-active") : e.link.removeClass("k-state-active")
                    },
                    destroy: function() {
                        var e = this;
                        k.fn.destroy.call(e), e.form && (c.unbind(e.form), c.destroy(e.form), e.form.unbind(g), e.popup && (e.popup.destroy(), e.popup = null), e.form = null), e.view && (e.view.purge(), e.view = null), e.link.unbind(g), e._refreshHandler && (e.dataSource.unbind(m, e._refreshHandler), e.dataSource = null), e.element = e.link = e._refreshHandler = e.filterModel = null
                    },
                    _bind: function(e) {
                        var t, n, i, r, o = this,
                            a = e.filters,
                            s = !1,
                            l = 0,
                            c = o.filterModel;
                        for (t = 0, n = a.length; n > t; t++) r = a[t], r.field == o.field ? (c.set("logic", e.logic), i = c.filters[l], i || (c.filters.push({
                            field: o.field
                        }), i = c.filters[l]), i.set("value", o._parse(r.value)), i.set("operator", r.operator), l++, s = !0) : r.filters && (s = s || o._bind(r));
                        return s
                    },
                    _stripFilters: function(t) {
                        return e.grep(t, function(e) {
                            return "" !== e.value && null != e.value || "isnull" === e.operator || "isnotnull" === e.operator || "isempty" === e.operator || "isnotempty" === e.operator
                        })
                    },
                    _merge: function(e) {
                        var t, i, r, o = this,
                            a = e.logic || "and",
                            s = this._stripFilters(e.filters),
                            l = o.dataSource.filter() || {
                                filters: [],
                                logic: "and"
                            };
                        for (n(l, o.field), i = 0, r = s.length; r > i; i++) t = s[i], t.value = o._parse(t.value);
                        return s.length && (l.filters.length ? (e.filters = s, "and" !== l.logic && (l.filters = [{
                            logic: l.logic,
                            filters: l.filters
                        }], l.logic = "and"), l.filters.push(s.length > 1 ? e : s[0])) : (l.filters = s, l.logic = a)), l
                    },
                    filter: function(e) {
                        e = this._merge(e), e.filters.length && this.dataSource.filter(e)
                    },
                    clear: function() {
                        var t = this,
                            n = t.dataSource.filter() || {
                                filters: []
                            };
                        n.filters = e.grep(n.filters, function(e) {
                            return e.filters ? (e.filters = r(e.filters, t.field), e.filters.length) : e.field != t.field
                        }), n.filters.length || (n = null), t.dataSource.filter(n)
                    },
                    _submit: function(e) {
                        e.preventDefault(), e.stopPropagation(), this.filter(this.filterModel.toJSON()), this._closeForm()
                    },
                    _reset: function() {
                        this.clear(), this._closeForm()
                    },
                    _closeForm: function() {
                        this._isMobile ? this.pane.navigate("", this.options.animations.right) : this.popup.close()
                    },
                    _click: function(e) {
                        e.preventDefault(), e.stopPropagation(), this.popup || this.pane || this._init(), this._isMobile ? this.pane.navigate(this.view, this.options.animations.left) : this.popup.toggle()
                    },
                    _open: function() {
                        var t;
                        e(".k-filter-menu").not(this.form).each(function() {
                            t = e(this).data(h), t && t.close()
                        })
                    },
                    _activate: function() {
                        this.form.find(":kendoFocusable:first").focus()
                    },
                    _keydown: function(e) {
                        e.keyCode == c.keys.ESC && this.popup.close()
                    },
                    events: [f],
                    options: {
                        name: "FilterMenu",
                        extra: !0,
                        appendToElement: !1,
                        type: "string",
                        operators: {
                            string: {
                                eq: v,
                                neq: _,
                                startswith: "Starts with",
                                contains: "Contains",
                                doesnotcontain: "Does not contain",
                                endswith: "Ends with",
                                isnull: "Is null",
                                isnotnull: "Is not null",
                                isempty: "Is empty",
                                isnotempty: "Is not empty"
                            },
                            number: {
                                eq: v,
                                neq: _,
                                gte: "Is greater than or equal to",
                                gt: "Is greater than",
                                lte: "Is less than or equal to",
                                lt: "Is less than",
                                isnull: "Is null",
                                isnotnull: "Is not null"
                            },
                            date: {
                                eq: v,
                                neq: _,
                                gte: "Is after or equal to",
                                gt: "Is after",
                                lte: "Is before or equal to",
                                lt: "Is before",
                                isnull: "Is null",
                                isnotnull: "Is not null"
                            },
                            enums: {
                                eq: v,
                                neq: _,
                                isnull: "Is null",
                                isnotnull: "Is not null"
                            }
                        },
                        messages: {
                            info: "Show items with value that:",
                            isTrue: "is true",
                            isFalse: "is false",
                            filter: "Filter",
                            clear: "Clear",
                            and: "And",
                            or: "Or",
                            selectValue: "-Select value-",
                            operator: "Operator",
                            value: "Value",
                            cancel: "Cancel"
                        },
                        animations: {
                            left: "slide",
                            right: "slide:right"
                        }
                    }
                }),
                A = ".kendoFilterMultiCheck",
                E = c.data.DataSource,
                F = k.extend({
                    init: function(t, n) {
                        var i, r;
                        k.fn.init.call(this, t, n), n = this.options, this.element = e(t), i = this.field = this.options.field || this.element.attr(c.attr("field")), r = n.checkSource, this._foreignKeyValues() ? (this.checkSource = E.create(n.values), this.checkSource.fetch()) : n.forceUnique ? (r = n.dataSource.options, delete r.pageSize, this.checkSource = E.create(r), this.checkSource.reader.data = l(this.checkSource.reader.data, this.field)) : this.checkSource = E.create(r), this.dataSource = n.dataSource, this.model = this.dataSource.reader.model, this._parse = function(e) {
                            return e + ""
                        }, this.model && this.model.fields && (i = this.model.fields[this.field], i && ("number" == i.type ? this._parse = parseFloat : i.parse && (this._parse = u(i.parse, i)), this.type = i.type || "string")), n.appendToElement ? this._init() : this._createLink(), this._refreshHandler = u(this.refresh, this), this.dataSource.bind(m, this._refreshHandler)
                    },
                    _createLink: function() {
                        var e = this.element,
                            t = e.addClass("k-with-icon k-filterable").find(".k-grid-filter");
                        t[0] || (t = e.prepend('<a class="k-grid-filter" href="#"><span class="k-icon k-filter"/></a>').find(".k-grid-filter")), this._link = t.attr("tabindex", -1).on("click" + g, u(this._click, this))
                    },
                    _init: function() {
                        var e = this,
                            t = this.options.forceUnique,
                            n = this.options;
                        this.pane = n.pane, this.pane && (this._isMobile = !0), this._createForm(), this._foreignKeyValues() ? this.refresh() : t && !this.checkSource.options.serverPaging && this.dataSource.data().length ? (this.checkSource.data(s(this.dataSource.data(), this.field)), this.refresh()) : (this._attachProgress(), this.checkSource.fetch(function() {
                            e.refresh.call(e)
                        })), this.options.forceUnique || (this.checkChangeHandler = function() {
                            e.container.empty(), e.refresh()
                        }, this.checkSource.bind(m, this.checkChangeHandler)), this.form.on("keydown" + A, u(this._keydown, this)).on("submit" + A, u(this._filter, this)).on("reset" + A, u(this._reset, this)), this.trigger(f, {
                            field: this.field,
                            container: this.form
                        })
                    },
                    _attachProgress: function() {
                        var e = this;
                        this._progressHandler = function() {
                            d.progress(e.container, !0)
                        }, this._progressHideHandler = function() {
                            d.progress(e.container, !1)
                        }, this.checkSource.bind("progress", this._progressHandler).bind("change", this._progressHideHandler)
                    },
                    _input: function() {
                        var e = this;
                        e._clearTypingTimeout(), e._typingTimeout = setTimeout(function() {
                            e.search()
                        }, 100)
                    },
                    _clearTypingTimeout: function() {
                        this._typingTimeout && (clearTimeout(this._typingTimeout), this._typingTimeout = null)
                    },
                    search: function() {
                        var e, t, n, i = this.options.ignoreCase,
                            r = this.searchTextBox[0].value,
                            o = this.container.find("label");
                        for (i && (r = r.toLowerCase()), e = this.options.checkAll ? 1 : 0; o.length > e; e++) t = o[e], n = t.textContent || t.innerText, i && (n = n.toLowerCase()), t.style.display = n.indexOf(r) >= 0 ? "" : "none"
                    },
                    _createForm: function() {
                        var t, n, i = this.options,
                            r = "";
                        !this._isMobile && i.search && (r += "<div class='k-textbox k-space-right'><input placeholder='" + i.messages.search + "'/><span class='k-icon k-font-icon k-i-search' /></div>"), r += "<ul class='k-reset k-multicheck-wrap'></ul><button type='submit' class='k-button k-primary'>" + i.messages.filter + "</button>", r += "<button type='reset' class='k-button'>" + i.messages.clear + "</button>", this.form = e('<form class="k-filter-menu"/>').html(r), this.container = this.form.find(".k-multicheck-wrap"), i.search && (this.searchTextBox = this.form.find(".k-textbox > input"), this.searchTextBox.on("input", u(this._input, this))), this._isMobile ? (this.view = this.pane.append(this.form.addClass("k-mobile-list").wrap("<div/>").parent().html()), t = this.view.element, this.form = t.find("form"), this.container = t.find(".k-multicheck-wrap"), n = this, t.on("click", ".k-primary", function(e) {
                            n.form.submit(), e.preventDefault()
                        }).on("click", "[type=reset]", function(e) {
                            n._reset(), e.preventDefault()
                        })) : i.appendToElement ? (this.popup = this.element.closest(".k-popup").data(h), this.element.append(this.form)) : this.popup = this.form.kendoPopup({
                            anchor: this._link
                        }).data(h)
                    },
                    createCheckAllItem: function() {
                        var t = this.options,
                            n = c.template(t.itemTemplate({
                                field: "all",
                                mobile: this._isMobile
                            })),
                            i = e(n({
                                all: t.messages.checkAll
                            }));
                        this.container.prepend(i), this.checkBoxAll = i.find(":checkbox").eq(0).addClass("k-check-all"), this.checkAllHandler = u(this.checkAll, this), this.checkBoxAll.on(m + A, this.checkAllHandler)
                    },
                    updateCheckAllState: function() {
                        if (this.checkBoxAll) {
                            var e = this.container.find(":checkbox:not(.k-check-all)").length == this.container.find(":checked:not(.k-check-all)").length;
                            this.checkBoxAll.prop("checked", e)
                        }
                    },
                    refresh: function(e) {
                        var t = this.options.forceUnique,
                            n = this.dataSource,
                            i = this.getFilterArray();
                        this._link && this._link.toggleClass("k-state-active", 0 !== i.length), this.form && (e && t && e.sender === n && !n.options.serverPaging && ("itemchange" == e.action || "add" == e.action || "remove" == e.action || n.options.autoSync && "sync" === e.action) && !this._foreignKeyValues() && (this.checkSource.data(s(this.dataSource.data(), this.field)), this.container.empty()), this.container.is(":empty") && this.createCheckBoxes(), this.checkValues(i), this.trigger(p))
                    },
                    getFilterArray: function() {
                        var t, n = e.extend(!0, {}, {
                            filters: [],
                            logic: "and"
                        }, this.dataSource.filter());
                        return o(n, this.field), t = a(n)
                    },
                    createCheckBoxes: function() {
                        var e, t, n, i = this.options,
                            r = {
                                field: this.field,
                                format: i.format,
                                mobile: this._isMobile,
                                type: this.type
                            };
                        this.options.forceUnique ? this._foreignKeyValues() ? (e = this.checkSource.data(), r.valueField = "value", r.field = "text") : e = this.checkSource.data() : e = this.checkSource.view(), t = c.template(i.itemTemplate(r)), n = c.render(t, e), i.checkAll && (this.createCheckAllItem(), this.container.on(m + A, ":checkbox", u(this.updateCheckAllState, this))), this.container.append(n)
                    },
                    checkAll: function() {
                        var e = this.checkBoxAll.is(":checked");
                        this.container.find(":checkbox").prop("checked", e)
                    },
                    checkValues: function(t) {
                        var n = this;
                        e(e.grep(this.container.find(":checkbox").prop("checked", !1), function(i) {
                            var r, o, a = !1;
                            if (!e(i).is(".k-check-all"))
                                for (r = n._parse(e(i).val()), o = 0; t.length > o; o++)
                                    if (a = "date" == n.type ? t[o].getTime() == r.getTime() : t[o] == r) return a
                        })).prop("checked", !0), this.updateCheckAllState()
                    },
                    _filter: function(t) {
                        var n, i;
                        t.preventDefault(), t.stopPropagation(), n = {
                            logic: "or"
                        }, i = this, n.filters = e.map(this.form.find(":checkbox:checked:not(.k-check-all)"), function(t) {
                            return {
                                value: e(t).val(),
                                operator: "eq",
                                field: i.field
                            }
                        }), n = this._merge(n), n.filters.length && this.dataSource.filter(n), this._closeForm()
                    },
                    _stripFilters: function(t) {
                        return e.grep(t, function(e) {
                            return null != e.value
                        })
                    },
                    _foreignKeyValues: function() {
                        var e = this.options;
                        return e.values && !e.checkSource
                    },
                    destroy: function() {
                        var e = this;
                        k.fn.destroy.call(e), e.form && (c.unbind(e.form), c.destroy(e.form), e.form.unbind(A), e.popup && (e.popup.destroy(), e.popup = null), e.form = null, e.container && (e.container.unbind(A), e.container = null), e.checkBoxAll && e.checkBoxAll.unbind(A)), e.view && (e.view.purge(), e.view = null), e._link && e._link.unbind(g), e._refreshHandler && (e.dataSource.unbind(m, e._refreshHandler), e.dataSource = null), e.checkChangeHandler && e.checkSource.unbind(m, e.checkChangeHandler), e._progressHandler && e.checkSource.unbind("progress", e._progressHandler), e._progressHideHandler && e.checkSource.unbind("change", e._progressHideHandler), this._clearTypingTimeout(), this.searchTextBox = null, e.element = e.checkSource = e.container = e.checkBoxAll = e._link = e._refreshHandler = e.checkAllHandler = null
                    },
                    options: {
                        name: "FilterMultiCheck",
                        itemTemplate: function(e) {
                            var n = e.field,
                                i = e.format,
                                r = e.valueField,
                                o = e.mobile,
                                a = "";
                            return r === t && (r = n), "date" == e.type && (a = ":yyyy-MM-ddTHH:mm:sszzz"), "<li class='k-item'><label class='k-label'><input type='checkbox' class='" + (o ? "k-check" : "") + "'  value='#:kendo.format('{0" + a + "}'," + r + ")#'/>#:kendo.format('" + (i ? i : "{0}") + "', " + n + ")#</label></li>"
                        },
                        checkAll: !0,
                        search: !1,
                        ignoreCase: !0,
                        appendToElement: !1,
                        messages: {
                            checkAll: "Select All",
                            clear: "Clear",
                            filter: "Filter",
                            search: "Search"
                        },
                        forceUnique: !0,
                        animations: {
                            left: "slide",
                            right: "slide:right"
                        }
                    },
                    events: [f, p]
                });
            e.extend(F.fn, {
                _click: D.fn._click,
                _keydown: D.fn._keydown,
                _reset: D.fn._reset,
                _closeForm: D.fn._closeForm,
                clear: D.fn.clear,
                _merge: D.fn._merge
            }), d.plugin(D), d.plugin(F)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.menu.min", ["kendo.popup.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t) {
                return e = e.split(" ")[!t + 0] || e, e.replace("top", "up").replace("bottom", "down")
            }

            function i(e, t, n) {
                e = e.split(" ")[!t + 0] || e;
                var i = {
                        origin: ["bottom", n ? "right" : "left"],
                        position: ["top", n ? "right" : "left"]
                    },
                    r = /left|right/.test(e);
                return r ? (i.origin = ["top", e], i.position[1] = c.directions[e].reverse) : (i.origin[0] = e, i.position[0] = c.directions[e].reverse), i.origin = i.origin.join(" "), i.position = i.position.join(" "), i
            }

            function r(t, n) {
                try {
                    return e.contains(t, n)
                } catch (i) {
                    return !1
                }
            }

            function o(t) {
                t = e(t), t.addClass("k-item").children(x).addClass(I), t.children("a").addClass(T).children(x).addClass(I), t.filter(":not([disabled])").addClass(q), t.filter(".k-separator:empty").append("&nbsp;"), t.filter("li[disabled]").addClass(Y).removeAttr("disabled").attr("aria-disabled", !0), t.filter("[role]").length || t.attr("role", "menuitem"), t.children("." + T).length || t.contents().filter(function() {
                    return !(this.nodeName.match(y) || 3 == this.nodeType && !e.trim(this.nodeValue))
                }).wrapAll("<span class='" + T + "'/>"), a(t), s(t)
            }

            function a(t) {
                t = e(t), t.find("> .k-link > [class*=k-i-arrow]:not(.k-sprite)").remove(), t.filter(":has(.k-menu-group)").children(".k-link:not(:has([class*=k-i-arrow]:not(.k-sprite)))").each(function() {
                    var t = e(this),
                        n = t.parent().parent();
                    t.append("<span class='k-icon " + (n.hasClass(S + "-horizontal") ? "k-i-arrow-s" : "k-i-arrow-e") + "'/>")
                })
            }

            function s(t) {
                t = e(t), t.filter(".k-first:not(:first-child)").removeClass(F), t.filter(".k-last:not(:last-child)").removeClass(D), t.filter(":first-child").addClass(F), t.filter(":last-child").addClass(D)
            }
            var l, c = window.kendo,
                d = c.ui,
                u = c._activeElement,
                h = c.support.touch && c.support.mobileOS,
                f = "mousedown",
                p = "click",
                m = e.extend,
                g = e.proxy,
                v = e.each,
                _ = c.template,
                b = c.keys,
                w = d.Widget,
                y = /^(ul|a|div)$/i,
                k = ".kendoMenu",
                x = "img",
                C = "open",
                S = "k-menu",
                T = "k-link",
                D = "k-last",
                A = "close",
                E = "timer",
                F = "k-first",
                I = "k-image",
                M = "select",
                R = "zIndex",
                P = "activate",
                z = "deactivate",
                B = "touchstart" + k + " MSPointerDown" + k + " pointerdown" + k,
                L = c.support.pointers,
                H = c.support.msPointers,
                N = H || L,
                O = L ? "pointerover" : H ? "MSPointerOver" : "mouseenter",
                V = L ? "pointerout" : H ? "MSPointerOut" : "mouseleave",
                U = h || N,
                W = e(document.documentElement),
                j = "kendoPopup",
                q = "k-state-default",
                G = "k-state-hover",
                $ = "k-state-focused",
                Y = "k-state-disabled",
                K = ".k-menu",
                Q = ".k-menu-group",
                X = Q + ",.k-animation-container",
                J = ":not(.k-list) > .k-item",
                Z = ".k-item.k-state-disabled",
                ee = ".k-item:not(.k-state-disabled)",
                te = ".k-item:not(.k-state-disabled) > .k-link",
                ne = ":not(.k-item.k-separator)",
                ie = ne + ":eq(0)",
                re = ne + ":last",
                oe = "> div:not(.k-animation-container,.k-list-container)",
                ae = {
                    2: 1,
                    touch: 1
                },
                se = {
                    content: _("<div class='k-content #= groupCssClass() #' tabindex='-1'>#= content(item) #</div>"),
                    group: _("<ul class='#= groupCssClass(group) #'#= groupAttributes(group) # role='menu' aria-hidden='true'>#= renderItems(data) #</ul>"),
                    itemWrapper: _("<#= tag(item) # class='#= textClass(item) #'#= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) ##= arrow(data) #</#= tag(item) #>"),
                    item: _("<li class='#= wrapperCssClass(group, item) #' role='menuitem' #=item.items ? \"aria-haspopup='true'\": \"\"##=item.enabled === false ? \"aria-disabled='true'\" : ''#>#= itemWrapper(data) ## if (item.items) { ##= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } #</li>"),
                    image: _("<img class='k-image' alt='' src='#= imageUrl #' />"),
                    arrow: _("<span class='#= arrowClass(item, group) #'></span>"),
                    sprite: _("<span class='k-sprite #= spriteCssClass #'></span>"),
                    empty: _("")
                },
                le = {
                    wrapperCssClass: function(e, t) {
                        var n = "k-item",
                            i = t.index;
                        return n += t.enabled === !1 ? " k-state-disabled" : " k-state-default", e.firstLevel && 0 === i && (n += " k-first"), i == e.length - 1 && (n += " k-last"), t.cssClass && (n += " " + t.cssClass), n
                    },
                    textClass: function() {
                        return T
                    },
                    textAttributes: function(e) {
                        return e.url ? " href='" + e.url + "'" : ""
                    },
                    arrowClass: function(e, t) {
                        var n = "k-icon";
                        return n += t.horizontal ? " k-i-arrow-s" : " k-i-arrow-e"
                    },
                    text: function(e) {
                        return e.encoded === !1 ? e.text : c.htmlEncode(e.text)
                    },
                    tag: function(e) {
                        return e.url ? "a" : "span"
                    },
                    groupAttributes: function(e) {
                        return e.expanded !== !0 ? " style='display:none'" : ""
                    },
                    groupCssClass: function() {
                        return "k-group k-menu-group"
                    },
                    content: function(e) {
                        return e.content ? e.content : "&nbsp;"
                    }
                },
                ce = w.extend({
                    init: function(t, n) {
                        var i = this;
                        w.fn.init.call(i, t, n), t = i.wrapper = i.element, n = i.options, i._initData(n), i._updateClasses(), i._animations(n), i.nextItemZIndex = 100, i._tabindex(), i._focusProxy = g(i._focusHandler, i), t.on(B, ee, i._focusProxy).on(p + k, Z, !1).on(p + k, ee, g(i._click, i)).on("keydown" + k, g(i._keydown, i)).on("focus" + k, g(i._focus, i)).on("focus" + k, ".k-content", g(i._focus, i)).on(B + " " + f + k, ".k-content", g(i._preventClose, i)).on("blur" + k, g(i._removeHoverItem, i)).on("blur" + k, "[tabindex]", g(i._checkActiveElement, i)).on(O + k, ee, g(i._mouseenter, i)).on(V + k, ee, g(i._mouseleave, i)).on(O + k + " " + V + k + " " + f + k + " " + p + k, te, g(i._toggleHover, i)), n.openOnClick && (i.clicked = !1, i._documentClickHandler = g(i._documentClick, i), e(document).click(i._documentClickHandler)), t.attr("role", "menubar"), t[0].id && (i._ariaId = c.format("{0}_mn_active", t[0].id)), c.notify(i)
                    },
                    events: [C, A, P, z, M],
                    options: {
                        name: "Menu",
                        animation: {
                            open: {
                                duration: 200
                            },
                            close: {
                                duration: 100
                            }
                        },
                        orientation: "horizontal",
                        direction: "default",
                        openOnClick: !1,
                        closeOnClick: !0,
                        hoverDelay: 100,
                        popupCollision: t
                    },
                    _initData: function(e) {
                        var t = this;
                        e.dataSource && (t.angular("cleanup", function() {
                            return {
                                elements: t.element.children()
                            }
                        }), t.element.empty(), t.append(e.dataSource, t.element), t.angular("compile", function() {
                            return {
                                elements: t.element.children()
                            }
                        }))
                    },
                    setOptions: function(e) {
                        var t = this.options.animation;
                        this._animations(e), e.animation = m(!0, t, e.animation), "dataSource" in e && this._initData(e), this._updateClasses(), w.fn.setOptions.call(this, e)
                    },
                    destroy: function() {
                        var t = this;
                        w.fn.destroy.call(t), t.element.off(k), t._documentClickHandler && e(document).unbind("click", t._documentClickHandler), c.destroy(t.element)
                    },
                    enable: function(e, t) {
                        return this._toggleDisabled(e, t !== !1), this
                    },
                    disable: function(e) {
                        return this._toggleDisabled(e, !1), this
                    },
                    append: function(e, t) {
                        t = this.element.find(t);
                        var n = this._insert(e, t, t.length ? t.find("> .k-menu-group, > .k-animation-container > .k-menu-group") : null);
                        return v(n.items, function() {
                            n.group.append(this), a(this)
                        }), a(t), s(n.group.find(".k-first, .k-last").add(n.items)), this
                    },
                    insertBefore: function(e, t) {
                        t = this.element.find(t);
                        var n = this._insert(e, t, t.parent());
                        return v(n.items, function() {
                            t.before(this), a(this), s(this)
                        }), s(t), this
                    },
                    insertAfter: function(e, t) {
                        t = this.element.find(t);
                        var n = this._insert(e, t, t.parent());
                        return v(n.items, function() {
                            t.after(this), a(this), s(this)
                        }), s(t), this
                    },
                    _insert: function(t, n, i) {
                        var r, a, s, l, c = this;
                        return n && n.length || (i = c.element), s = e.isPlainObject(t), l = {
                            firstLevel: i.hasClass(S),
                            horizontal: i.hasClass(S + "-horizontal"),
                            expanded: !0,
                            length: i.children().length
                        }, n && !i.length && (i = e(ce.renderGroup({
                            group: l
                        })).appendTo(n)), s || e.isArray(t) ? r = e(e.map(s ? [t] : t, function(t, n) {
                            return "string" == typeof t ? e(t).get() : e(ce.renderItem({
                                group: l,
                                item: m(t, {
                                    index: n
                                })
                            })).get()
                        })) : (r = "string" == typeof t && "<" != t.charAt(0) ? c.element.find(t) : e(t), a = r.find("> ul").addClass("k-menu-group").attr("role", "menu"), r = r.filter("li"), r.add(a.find("> li")).each(function() {
                            o(this)
                        })), {
                            items: r,
                            group: i
                        }
                    },
                    remove: function(e) {
                        var t, n, i, r;
                        return e = this.element.find(e), t = this, n = e.parentsUntil(t.element, J), i = e.parent("ul:not(.k-menu)"), e.remove(), i && !i.children(J).length && (r = i.parent(".k-animation-container"), r.length ? r.remove() : i.remove()), n.length && (n = n.eq(0), a(n), s(n)), t
                    },
                    open: function(r) {
                        var o = this,
                            a = o.options,
                            s = "horizontal" == a.orientation,
                            l = a.direction,
                            d = c.support.isRtl(o.wrapper);
                        return r = o.element.find(r), /^(top|bottom|default)$/.test(l) && (l = d ? s ? (l + " left").replace("default", "bottom") : "left" : s ? (l + " right").replace("default", "bottom") : "right"), r.siblings().find(">.k-popup:visible,>.k-animation-container>.k-popup:visible").each(function() {
                            var t = e(this).data("kendoPopup");
                            t && t.close()
                        }), r.each(function() {
                            var r = e(this);
                            clearTimeout(r.data(E)), r.data(E, setTimeout(function() {
                                var u, f, p, g, v, _, b, w, y = r.find(".k-menu-group:first:hidden");
                                y[0] && o._triggerEvent({
                                    item: r[0],
                                    type: C
                                }) === !1 && (!y.find(".k-menu-group")[0] && y.children(".k-item").length > 1 ? (f = e(window).height(), p = function() {
                                    y.css({
                                        maxHeight: f - (y.outerHeight() - y.height()) - c.getShadows(y).bottom,
                                        overflow: "auto"
                                    })
                                }, c.support.browser.msie && 7 >= c.support.browser.version ? setTimeout(p, 0) : p()) : y.css({
                                    maxHeight: "",
                                    overflow: ""
                                }), r.data(R, r.css(R)), r.css(R, o.nextItemZIndex++), u = y.data(j), g = r.parent().hasClass(S), v = g && s, _ = i(l, g, d), b = a.animation.open.effects, w = b !== t ? b : "slideIn:" + n(l, g), u ? (u = y.data(j), u.options.origin = _.origin, u.options.position = _.position, u.options.animation.open.effects = w) : u = y.kendoPopup({
                                    activate: function() {
                                        o._triggerEvent({
                                            item: this.wrapper.parent(),
                                            type: P
                                        })
                                    },
                                    deactivate: function(e) {
                                        e.sender.element.removeData("targetTransform").css({
                                            opacity: ""
                                        }), o._triggerEvent({
                                            item: this.wrapper.parent(),
                                            type: z
                                        })
                                    },
                                    origin: _.origin,
                                    position: _.position,
                                    collision: a.popupCollision !== t ? a.popupCollision : v ? "fit" : "fit flip",
                                    anchor: r,
                                    appendTo: r,
                                    animation: {
                                        open: m(!0, {
                                            effects: w
                                        }, a.animation.open),
                                        close: a.animation.close
                                    },
                                    close: function(e) {
                                        var t = e.sender.wrapper.parent();
                                        o._triggerEvent({
                                            item: t[0],
                                            type: A
                                        }) ? e.preventDefault() : (t.css(R, t.data(R)), t.removeData(R), h && (t.removeClass(G), o._removeHoverItem()))
                                    }
                                }).data(j), y.removeAttr("aria-hidden"), u.open())
                            }, o.options.hoverDelay))
                        }), o
                    },
                    close: function(t, n) {
                        var i = this,
                            r = i.element;
                        return t = r.find(t), t.length || (t = r.find(">.k-item")), t.each(function() {
                            var t = e(this);
                            !n && i._isRootItem(t) && (i.clicked = !1), clearTimeout(t.data(E)), t.data(E, setTimeout(function() {
                                var e = t.find(".k-menu-group:not(.k-list-container):not(.k-calendar-container):first:visible").data(j);
                                e && (e.close(), e.element.attr("aria-hidden", !0))
                            }, i.options.hoverDelay))
                        }), i
                    },
                    _toggleDisabled: function(t, n) {
                        this.element.find(t).each(function() {
                            e(this).toggleClass(q, n).toggleClass(Y, !n).attr("aria-disabled", !n)
                        })
                    },
                    _toggleHover: function(t) {
                        var n = e(c.eventTarget(t) || t.target).closest(J),
                            i = t.type == O || -1 !== f.indexOf(t.type);
                        n.parents("li." + Y).length || n.toggleClass(G, i || "mousedown" == t.type || "click" == t.type), this._removeHoverItem()
                    },
                    _preventClose: function() {
                        this.options.closeOnClick || (this._closurePrevented = !0)
                    },
                    _checkActiveElement: function(t) {
                        var n = this,
                            i = e(t ? t.currentTarget : this._hoverItem()),
                            o = n._findRootParent(i)[0];
                        this._closurePrevented || setTimeout(function() {
                            (!document.hasFocus() || !r(o, c._activeElement()) && t && !r(o, t.currentTarget)) && n.close(o)
                        }, 0), this._closurePrevented = !1
                    },
                    _removeHoverItem: function() {
                        var e = this._hoverItem();
                        e && e.hasClass($) && (e.removeClass($), this._oldHoverItem = null)
                    },
                    _updateClasses: function() {
                        var e, t = this.element,
                            n = ".k-menu-init div ul";
                        t.removeClass("k-menu-horizontal k-menu-vertical"), t.addClass("k-widget k-reset k-header k-menu-init " + S).addClass(S + "-" + this.options.orientation), t.find("li > ul").filter(function() {
                            return !c.support.matchesSelector.call(this, n)
                        }).addClass("k-group k-menu-group").attr("role", "menu").attr("aria-hidden", t.is(":visible")).end().find("li > div").addClass("k-content").attr("tabindex", "-1"), e = t.find("> li,.k-menu-group > li"), t.removeClass("k-menu-init"), e.each(function() {
                            o(this)
                        })
                    },
                    _mouseenter: function(t) {
                        var n = this,
                            i = e(t.currentTarget),
                            o = i.children(".k-animation-container").length || i.children(Q).length;
                        t.delegateTarget == i.parents(K)[0] && (n.options.openOnClick && !n.clicked || h || (L || H) && t.originalEvent.pointerType in ae && n._isRootItem(i.closest(J)) || !r(t.currentTarget, t.relatedTarget) && o && n.open(i), (n.options.openOnClick && n.clicked || U) && i.siblings().each(g(function(e, t) {
                            n.close(t, !0)
                        }, n)))
                    },
                    _mouseleave: function(n) {
                        var i = this,
                            o = e(n.currentTarget),
                            a = o.children(".k-animation-container").length || o.children(Q).length;
                        return o.parentsUntil(".k-animation-container", ".k-list-container,.k-calendar-container")[0] ? (n.stopImmediatePropagation(), t) : (i.options.openOnClick || h || (L || H) && n.originalEvent.pointerType in ae || r(n.currentTarget, n.relatedTarget || n.target) || !a || r(n.currentTarget, c._activeElement()) || i.close(o), t)
                    },
                    _click: function(n) {
                        var i, r, o, a = this,
                            s = a.options,
                            l = e(c.eventTarget(n)),
                            d = l[0] ? l[0].nodeName.toUpperCase() : "",
                            u = "INPUT" == d || "SELECT" == d || "BUTTON" == d || "LABEL" == d,
                            h = l.closest("." + T),
                            f = l.closest(J),
                            p = h.attr("href"),
                            m = l.attr("href"),
                            g = e("<a href='#' />").attr("href"),
                            v = !!p && p !== g,
                            _ = v && !!p.match(/^#/),
                            b = !!m && m !== g,
                            w = s.openOnClick && o && a._isRootItem(f);
                        if (!l.closest(oe, f[0]).length) {
                            if (f.hasClass(Y)) return n.preventDefault(), t;
                            if (n.handled || !a._triggerEvent({
                                item: f[0],
                                type: M
                            }) || u || n.preventDefault(), n.handled = !0, r = f.children(X), o = r.is(":visible"), s.closeOnClick && (!v || _) && (!r.length || w)) return f.removeClass(G).css("height"), a._oldHoverItem = a._findRootParent(f), a.close(h.parentsUntil(a.element, J)), a.clicked = !1, -1 != "MSPointerUp".indexOf(n.type) && n.preventDefault(), t;
                            v && n.enterKey && h[0].click(), (a._isRootItem(f) && s.openOnClick || c.support.touch || (L || H) && a._isRootItem(f.closest(J))) && (v || u || b || n.preventDefault(), a.clicked = !0, i = r.is(":visible") ? A : C, (s.closeOnClick || i != A) && a[i](f))
                        }
                    },
                    _documentClick: function(e) {
                        r(this.element[0], e.target) || (this.clicked = !1)
                    },
                    _focus: function(n) {
                        var i = this,
                            r = n.target,
                            o = i._hoverItem(),
                            a = u();
                        return r == i.wrapper[0] || e(r).is(":kendoFocusable") ? (a === n.currentTarget && (o.length ? i._moveHover([], o) : i._oldHoverItem || i._moveHover([], i.wrapper.children().first())), t) : (n.stopPropagation(), e(r).closest(".k-content").closest(".k-menu-group").closest(".k-item").addClass($), i.wrapper.focus(), t)
                    },
                    _keydown: function(e) {
                        var n, i, r, o = this,
                            a = e.keyCode,
                            s = o._oldHoverItem,
                            l = c.support.isRtl(o.wrapper);
                        if (e.target == e.currentTarget || a == b.ESC) {
                            if (s || (s = o._oldHoverItem = o._hoverItem()), i = o._itemBelongsToVertival(s), r = o._itemHasChildren(s), a == b.RIGHT) n = o[l ? "_itemLeft" : "_itemRight"](s, i, r);
                            else if (a == b.LEFT) n = o[l ? "_itemRight" : "_itemLeft"](s, i, r);
                            else if (a == b.DOWN) n = o._itemDown(s, i, r);
                            else if (a == b.UP) n = o._itemUp(s, i, r);
                            else if (a == b.ESC) n = o._itemEsc(s, i);
                            else if (a == b.ENTER || a == b.SPACEBAR) n = s.children(".k-link"), n.length > 0 && (o._click({
                                target: n[0],
                                preventDefault: function() {},
                                enterKey: !0
                            }), o._moveHover(s, o._findRootParent(s)));
                            else if (a == b.TAB) return n = o._findRootParent(s), o._moveHover(s, n), o._checkActiveElement(), t;
                            n && n[0] && (e.preventDefault(), e.stopPropagation())
                        }
                    },
                    _hoverItem: function() {
                        return this.wrapper.find(".k-item.k-state-hover,.k-item.k-state-focused").filter(":visible")
                    },
                    _itemBelongsToVertival: function(e) {
                        var t = this.wrapper.hasClass("k-menu-vertical");
                        return e.length ? e.parent().hasClass("k-menu-group") || t : t
                    },
                    _itemHasChildren: function(e) {
                        return e.length ? e.children("ul.k-menu-group, div.k-animation-container").length > 0 : !1
                    },
                    _moveHover: function(t, n) {
                        var i = this,
                            r = i._ariaId;
                        t.length && n.length && t.removeClass($), n.length && (n[0].id && (r = n[0].id), n.addClass($), i._oldHoverItem = n, r && (i.element.removeAttr("aria-activedescendant"), e("#" + r).removeAttr("id"), n.attr("id", r), i.element.attr("aria-activedescendant", r)))
                    },
                    _findRootParent: function(e) {
                        return this._isRootItem(e) ? e : e.parentsUntil(K, "li.k-item").last()
                    },
                    _isRootItem: function(e) {
                        return e.parent().hasClass(S)
                    },
                    _itemRight: function(e, t, n) {
                        var i, r, o = this;
                        if (!e.hasClass(Y)) return t ? n ? (o.open(e), i = e.find(".k-menu-group").children().first()) : "horizontal" == o.options.orientation && (r = o._findRootParent(e), o.close(r), i = r.nextAll(ie)) : (i = e.nextAll(ie), i.length || (i = e.prevAll(re))), i && !i.length ? i = o.wrapper.children(".k-item").first() : i || (i = []), o._moveHover(e, i), i
                    },
                    _itemLeft: function(e, t) {
                        var n, i = this;
                        return t ? (n = e.parent().closest(".k-item"), i.close(n), i._isRootItem(n) && "horizontal" == i.options.orientation && (n = n.prevAll(ie))) : (n = e.prevAll(ie), n.length || (n = e.nextAll(re))), n.length || (n = i.wrapper.children(".k-item").last()), i._moveHover(e, n), n
                    },
                    _itemDown: function(e, t, n) {
                        var i, r = this;
                        if (t) i = e.nextAll(ie);
                        else {
                            if (!n || e.hasClass(Y)) return;
                            r.open(e), i = e.find(".k-menu-group").children().first()
                        }
                        return !i.length && e.length ? i = e.parent().children().first() : e.length || (i = r.wrapper.children(".k-item").first()), r._moveHover(e, i), i
                    },
                    _itemUp: function(e, t) {
                        var n, i = this;
                        if (t) return n = e.prevAll(ie), !n.length && e.length ? n = e.parent().children().last() : e.length || (n = i.wrapper.children(".k-item").last()), i._moveHover(e, n), n
                    },
                    _itemEsc: function(e, t) {
                        var n, i = this;
                        return t ? (n = e.parent().closest(".k-item"), i.close(n), i._moveHover(e, n), n) : e
                    },
                    _triggerEvent: function(e) {
                        var t = this;
                        return t.trigger(e.type, {
                            type: e.type,
                            item: e.item
                        })
                    },
                    _focusHandler: function(t) {
                        var n = this,
                            i = e(c.eventTarget(t)).closest(J);
                        setTimeout(function() {
                            n._moveHover([], i), i.children(".k-content")[0] && i.parent().closest(".k-item").removeClass($)
                        }, 200)
                    },
                    _animations: function(e) {
                        e && "animation" in e && !e.animation && (e.animation = {
                            open: {
                                effects: {}
                            },
                            close: {
                                hide: !0,
                                effects: {}
                            }
                        })
                    }
                });
            m(ce, {
                renderItem: function(e) {
                    e = m({
                        menu: {},
                        group: {}
                    }, e);
                    var t = se.empty,
                        n = e.item;
                    return se.item(m(e, {
                        image: n.imageUrl ? se.image : t,
                        sprite: n.spriteCssClass ? se.sprite : t,
                        itemWrapper: se.itemWrapper,
                        renderContent: ce.renderContent,
                        arrow: n.items || n.content ? se.arrow : t,
                        subGroup: ce.renderGroup
                    }, le))
                },
                renderGroup: function(e) {
                    return se.group(m({
                        renderItems: function(e) {
                            for (var t = "", n = 0, i = e.items, r = i ? i.length : 0, o = m({
                                length: r
                            }, e.group); r > n; n++) t += ce.renderItem(m(e, {
                                group: o,
                                item: m({
                                    index: n
                                }, i[n])
                            }));
                            return t
                        }
                    }, e, le))
                },
                renderContent: function(e) {
                    return se.content(m(e, le))
                }
            }), l = ce.extend({
                init: function(t, n) {
                    var i = this;
                    ce.fn.init.call(i, t, n), i.target = e(i.options.target), i._popup(), i._wire()
                },
                options: {
                    name: "ContextMenu",
                    filter: null,
                    showOn: "contextmenu",
                    orientation: "vertical",
                    alignToAnchor: !1,
                    target: "body"
                },
                events: [C, A, P, z, M],
                setOptions: function(t) {
                    var n = this;
                    ce.fn.setOptions.call(n, t), n.target.off(n.showOn + k, n._showProxy), n.userEvents && n.userEvents.destroy(), n.target = e(n.options.target), t.orientation && n.popup.wrapper[0] && n.popup.element.unwrap(), n._wire(), ce.fn.setOptions.call(this, t)
                },
                destroy: function() {
                    var e = this;
                    e.target.off(e.options.showOn + k), W.off(c.support.mousedown + k, e._closeProxy), e.userEvents && e.userEvents.destroy(), ce.fn.destroy.call(e)
                },
                open: function(n, i) {
                    var o = this;
                    return n = e(n)[0], r(o.element[0], e(n)[0]) ? ce.fn.open.call(o, n) : o._triggerEvent({
                        item: o.element,
                        type: C
                    }) === !1 && (o.popup.visible() && o.options.filter && (o.popup.close(!0), o.popup.element.kendoStop(!0)), i !== t ? (o.popup.wrapper.hide(), o.popup.open(n, i)) : (o.popup.options.anchor = (n ? n : o.popup.anchor) || o.target, o.popup.element.kendoStop(!0), o.popup.open()), W.off(o.popup.downEvent, o.popup._mousedownProxy), W.on(c.support.mousedown + k, o._closeProxy)), o
                },
                close: function() {
                    var t = this;
                    r(t.element[0], e(arguments[0])[0]) ? ce.fn.close.call(t, arguments[0]) : t.popup.visible() && t._triggerEvent({
                        item: t.element,
                        type: A
                    }) === !1 && (t.popup.close(), W.off(c.support.mousedown + k, t._closeProxy), t.unbind(M, t._closeTimeoutProxy))
                },
                _showHandler: function(e) {
                    var t, n = e,
                        i = this,
                        o = i.options;
                    e.event && (n = e.event, n.pageX = e.x.location, n.pageY = e.y.location), r(i.element[0], e.relatedTarget || e.target) || (i._eventOrigin = n, n.preventDefault(), n.stopImmediatePropagation(), i.element.find("." + $).removeClass($), (o.filter && c.support.matchesSelector.call(n.currentTarget, o.filter) || !o.filter) && (o.alignToAnchor ? (i.popup.options.anchor = n.currentTarget, i.open(n.currentTarget)) : (i.popup.options.anchor = n.currentTarget, i._targetChild ? (t = i.target.offset(), i.open(n.pageX - t.left, n.pageY - t.top)) : i.open(n.pageX, n.pageY))))
                },
                _closeHandler: function(t) {
                    var n, i = this,
                        o = e(t.relatedTarget || t.target),
                        a = o.closest(i.target.selector)[0] == i.target[0],
                        s = o.closest(ee).children(X),
                        l = r(i.element[0], o[0]);
                    i._eventOrigin = t, n = 3 !== t.which, i.popup.visible() && (n && a || !a) && (i.options.closeOnClick && !s[0] && l || !l) && (l ? (this.unbind(M, this._closeTimeoutProxy), i.bind(M, i._closeTimeoutProxy)) : i.close())
                },
                _wire: function() {
                    var e = this,
                        t = e.options,
                        n = e.target;
                    e._showProxy = g(e._showHandler, e), e._closeProxy = g(e._closeHandler, e), e._closeTimeoutProxy = g(e.close, e), n[0] && (c.support.mobileOS && "contextmenu" == t.showOn ? (e.userEvents = new c.UserEvents(n, {
                        filter: t.filter,
                        allowSelection: !1
                    }), n.on(t.showOn + k, !1), e.userEvents.bind("hold", e._showProxy)) : t.filter ? n.on(t.showOn + k, t.filter, e._showProxy) : n.on(t.showOn + k, e._showProxy))
                },
                _triggerEvent: function(n) {
                    var i = this,
                        r = e(i.popup.options.anchor)[0],
                        o = i._eventOrigin;
                    return i._eventOrigin = t, i.trigger(n.type, m({
                        type: n.type,
                        item: n.item || this.element[0],
                        target: r
                    }, o ? {
                        event: o
                    } : {}))
                },
                _popup: function() {
                    var e = this;
                    e._triggerProxy = g(e._triggerEvent, e), e.popup = e.element.addClass("k-context-menu").kendoPopup({
                        anchor: e.target || "body",
                        copyAnchorStyles: e.options.copyAnchorStyles,
                        collision: e.options.popupCollision || "fit",
                        animation: e.options.animation,
                        activate: e._triggerProxy,
                        deactivate: e._triggerProxy
                    }).data("kendoPopup"), e._targetChild = r(e.target[0], e.popup.element[0])
                }
            }), d.plugin(ce), d.plugin(l)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.columnmenu.min", ["kendo.popup.min", "kendo.filtermenu.min", "kendo.menu.min"], e)
    }(function() {
        return function(e, t) {
            function n(t) {
                return e.trim(t).replace(/&nbsp;/gi, "")
            }

            function i(e, t) {
                var n, i, r, o = {};
                for (n = 0, i = e.length; i > n; n++) r = e[n], o[r[t]] = r;
                return o
            }

            function r(e) {
                var t, n = [];
                for (t = 0; e.length > t; t++) e[t].columns ? n = n.concat(r(e[t].columns)) : n.push(e[t]);
                return n
            }
            var o = window.kendo,
                a = o.ui,
                s = e.proxy,
                l = e.extend,
                c = e.grep,
                d = e.map,
                u = e.inArray,
                h = "k-state-selected",
                f = "asc",
                p = "desc",
                m = "change",
                g = "init",
                v = "select",
                _ = "kendoPopup",
                b = "kendoFilterMenu",
                w = "kendoMenu",
                y = ".kendoColumnMenu",
                k = a.Widget,
                x = k.extend({
                    init: function(t, n) {
                        var i, r = this;
                        k.fn.init.call(r, t, n), t = r.element, n = r.options, r.owner = n.owner, r.dataSource = n.dataSource, r.field = t.attr(o.attr("field")), r.title = t.attr(o.attr("title")), i = t.find(".k-header-column-menu"), i[0] || (i = t.addClass("k-with-icon").prepend('<a class="k-header-column-menu" href="#"><span class="k-icon k-i-arrowhead-s">' + n.messages.settings + "</span></a>").find(".k-header-column-menu")), r.link = i.attr("tabindex", -1).on("click" + y, s(r._click, r)), r.wrapper = e('<div class="k-column-menu"/>'), r._refreshHandler = s(r.refresh, r), r.dataSource.bind(m, r._refreshHandler)
                    },
                    _init: function() {
                        var e = this;
                        e.pane = e.options.pane, e.pane && (e._isMobile = !0), e._isMobile ? e._createMobileMenu() : e._createMenu(), e.owner._muteAngularRebind(function() {
                            e._angularItems("compile")
                        }), e._sort(), e._columns(), e._filter(), e._lockColumns(), e.trigger(g, {
                            field: e.field,
                            container: e.wrapper
                        })
                    },
                    events: [g],
                    options: {
                        name: "ColumnMenu",
                        messages: {
                            sortAscending: "Sort Ascending",
                            sortDescending: "Sort Descending",
                            filter: "Filter",
                            columns: "Columns",
                            done: "Done",
                            settings: "Column Settings",
                            lock: "Lock",
                            unlock: "Unlock"
                        },
                        filter: "",
                        columns: !0,
                        sortable: !0,
                        filterable: !0,
                        animations: {
                            left: "slide"
                        }
                    },
                    _createMenu: function() {
                        var e = this,
                            t = e.options;
                        e.wrapper.html(o.template(C)({
                            ns: o.ns,
                            messages: t.messages,
                            sortable: t.sortable,
                            filterable: t.filterable,
                            columns: e._ownerColumns(),
                            showColumns: t.columns,
                            lockedColumns: t.lockedColumns
                        })), e.popup = e.wrapper[_]({
                            anchor: e.link,
                            open: s(e._open, e),
                            activate: s(e._activate, e),
                            close: function() {
                                e.options.closeCallback && e.options.closeCallback(e.element)
                            }
                        }).data(_), e.menu = e.wrapper.children()[w]({
                            orientation: "vertical",
                            closeOnClick: !1
                        }).data(w)
                    },
                    _createMobileMenu: function() {
                        var e = this,
                            t = e.options,
                            n = o.template(S)({
                                ns: o.ns,
                                field: e.field,
                                title: e.title || e.field,
                                messages: t.messages,
                                sortable: t.sortable,
                                filterable: t.filterable,
                                columns: e._ownerColumns(),
                                showColumns: t.columns,
                                lockedColumns: t.lockedColumns
                            });
                        e.view = e.pane.append(n), e.wrapper = e.view.element.find(".k-column-menu"), e.menu = new T(e.wrapper.children(), {
                            pane: e.pane
                        }), e.view.element.on("click", ".k-done", function(t) {
                            e.close(), t.preventDefault()
                        }), e.options.lockedColumns && e.view.bind("show", function() {
                            e._updateLockedColumns()
                        })
                    },
                    _angularItems: function(t) {
                        var n = this;
                        n.angular(t, function() {
                            var t = n.wrapper.find(".k-columns-item input[" + o.attr("field") + "]").map(function() {
                                    return e(this).closest("li")
                                }),
                                i = d(n._ownerColumns(), function(e) {
                                    return {
                                        column: e._originalObject
                                    }
                                });
                            return {
                                elements: t,
                                data: i
                            }
                        })
                    },
                    destroy: function() {
                        var e = this;
                        e._angularItems("cleanup"), k.fn.destroy.call(e), e.filterMenu && e.filterMenu.destroy(), e._refreshHandler && e.dataSource.unbind(m, e._refreshHandler), e.options.columns && e.owner && (e._updateColumnsMenuHandler && (e.owner.unbind("columnShow", e._updateColumnsMenuHandler), e.owner.unbind("columnHide", e._updateColumnsMenuHandler)), e._updateColumnsLockedStateHandler && (e.owner.unbind("columnLock", e._updateColumnsLockedStateHandler), e.owner.unbind("columnUnlock", e._updateColumnsLockedStateHandler))), e.menu && (e.menu.element.off(y), e.menu.destroy()), e.wrapper.off(y), e.popup && e.popup.destroy(), e.view && e.view.purge(), e.link.off(y), e.owner = null, e.wrapper = null, e.element = null
                    },
                    close: function() {
                        this.menu.close(), this.popup && (this.popup.close(), this.popup.element.off("keydown" + y))
                    },
                    _click: function(e) {
                        e.preventDefault(), e.stopPropagation();
                        var t = this.options;
                        t.filter && this.element.is(!t.filter) || (this.popup || this.pane || this._init(), this._isMobile ? this.pane.navigate(this.view, this.options.animations.left) : this.popup.toggle())
                    },
                    _open: function() {
                        var t = this;
                        e(".k-column-menu").not(t.wrapper).each(function() {
                            e(this).data(_).close()
                        }), t.popup.element.on("keydown" + y, function(e) {
                            e.keyCode == o.keys.ESC && t.close()
                        }), t.options.lockedColumns && t._updateLockedColumns()
                    },
                    _activate: function() {
                        this.menu.element.focus()
                    },
                    _ownerColumns: function() {
                        var e = r(this.owner.columns),
                            t = c(e, function(e) {
                                var t = !0,
                                    i = n(e.title || "");
                                return (e.menu === !1 || !e.field && !i.length) && (t = !1), t
                            });
                        return d(t, function(t) {
                            return {
                                originalField: t.field,
                                field: t.field || t.title,
                                title: t.title || t.field,
                                hidden: t.hidden,
                                index: u(t, e),
                                locked: !!t.locked,
                                _originalObject: t
                            }
                        })
                    },
                    _sort: function() {
                        var t = this;
                        t.options.sortable && (t.refresh(), t.menu.bind(v, function(n) {
                            var i, r = e(n.item);
                            r.hasClass("k-sort-asc") ? i = f : r.hasClass("k-sort-desc") && (i = p), i && (r.parent().find(".k-sort-" + (i == f ? p : f)).removeClass(h), t._sortDataSource(r, i), t.close())
                        }))
                    },
                    _sortDataSource: function(e, n) {
                        var i, r, o = this,
                            a = o.options.sortable,
                            s = null === a.compare ? t : a.compare,
                            l = o.dataSource,
                            c = l.sort() || [];
                        if (e.hasClass(h) && a && a.allowUnsort !== !1 ? (e.removeClass(h), n = t) : e.addClass(h), "multiple" === a.mode) {
                            for (i = 0, r = c.length; r > i; i++)
                                if (c[i].field === o.field) {
                                    c.splice(i, 1);
                                    break
                                } c.push({
                                field: o.field,
                                dir: n,
                                compare: s
                            })
                        } else c = [{
                            field: o.field,
                            dir: n,
                            compare: s
                        }];
                        l.sort(c)
                    },
                    _columns: function() {
                        var t = this;
                        t.options.columns && (t._updateColumnsMenu(), t._updateColumnsMenuHandler = s(t._updateColumnsMenu, t), t.owner.bind(["columnHide", "columnShow"], t._updateColumnsMenuHandler), t._updateColumnsLockedStateHandler = s(t._updateColumnsLockedState, t), t.owner.bind(["columnUnlock", "columnLock"], t._updateColumnsLockedStateHandler), t.menu.bind(v, function(n) {
                            var i, a, s, l = e(n.item),
                                d = r(t.owner.columns);
                            t._isMobile && n.preventDefault(), l.parent().closest("li.k-columns-item")[0] && (i = l.find(":checkbox"), i.attr("disabled") || (s = i.attr(o.attr("field")), a = c(d, function(e) {
                                return e.field == s || e.title == s
                            })[0], a.hidden === !0 ? t.owner.showColumn(a) : t.owner.hideColumn(a)))
                        }))
                    },
                    _updateColumnsMenu: function() {
                        var e, t, n, i, r, a, s = o.attr("field"),
                            l = o.attr("locked"),
                            h = c(this._ownerColumns(), function(e) {
                                return !e.hidden
                            }),
                            f = c(h, function(e) {
                                return e.originalField
                            }),
                            p = c(f, function(e) {
                                return e.locked === !0
                            }).length,
                            m = c(f, function(e) {
                                return e.locked !== !0
                            }).length;
                        for (h = d(h, function(e) {
                            return e.field
                        }), a = this.wrapper.find(".k-columns-item input[" + s + "]").prop("disabled", !1).prop("checked", !1), e = 0, t = a.length; t > e; e++) n = a.eq(e), r = "true" === n.attr(l), i = !1, u(n.attr(s), h) > -1 && (i = !0, n.prop("checked", i)), i && (1 == p && r && n.prop("disabled", !0), 1 != m || r || n.prop("disabled", !0))
                    },
                    _updateColumnsLockedState: function() {
                        var e, t, n, r, a = o.attr("field"),
                            s = o.attr("locked"),
                            l = i(this._ownerColumns(), "field"),
                            c = this.wrapper.find(".k-columns-item input[type=checkbox]");
                        for (e = 0, t = c.length; t > e; e++) n = c.eq(e), r = l[n.attr(a)], r && n.attr(s, r.locked);
                        this._updateColumnsMenu()
                    },
                    _filter: function() {
                        var t = this,
                            n = b,
                            i = t.options;
                        i.filterable !== !1 && (i.filterable.multi && (n = "kendoFilterMultiCheck", i.filterable.dataSource && (i.filterable.checkSource = i.filterable.dataSource, delete i.filterable.dataSource)), t.filterMenu = t.wrapper.find(".k-filterable")[n](l(!0, {}, {
                            appendToElement: !0,
                            dataSource: i.dataSource,
                            values: i.values,
                            field: t.field,
                            title: t.title
                        }, i.filterable)).data(n), t._isMobile && t.menu.bind(v, function(n) {
                            var i = e(n.item);
                            i.hasClass("k-filter-item") && t.pane.navigate(t.filterMenu.view, t.options.animations.left)
                        }))
                    },
                    _lockColumns: function() {
                        var t = this;
                        t.menu.bind(v, function(n) {
                            var i = e(n.item);
                            i.hasClass("k-lock") ? (t.owner.lockColumn(t.field), t.close()) : i.hasClass("k-unlock") && (t.owner.unlockColumn(t.field), t.close())
                        })
                    },
                    _updateLockedColumns: function() {
                        var e, t, n, i, r = this.field,
                            o = this.owner.columns,
                            a = c(o, function(e) {
                                return e.field == r || e.title == r
                            })[0];
                        a && (e = a.locked === !0, t = c(o, function(t) {
                            return !t.hidden && (t.locked && e || !t.locked && !e)
                        }).length, n = this.wrapper.find(".k-lock").removeClass("k-state-disabled"), i = this.wrapper.find(".k-unlock").removeClass("k-state-disabled"), (e || 1 == t) && n.addClass("k-state-disabled"), e && 1 != t || i.addClass("k-state-disabled"), this._updateColumnsLockedState())
                    },
                    refresh: function() {
                        var e, t, n, i = this,
                            r = i.options.dataSource.sort() || [],
                            o = i.field;
                        for (i.wrapper.find(".k-sort-asc, .k-sort-desc").removeClass(h), t = 0, n = r.length; n > t; t++) e = r[t], o == e.field && i.wrapper.find(".k-sort-" + e.dir).addClass(h);
                        i.link[i._filterExist(i.dataSource.filter()) ? "addClass" : "removeClass"]("k-state-active")
                    },
                    _filterExist: function(e) {
                        var t, n, i, r = !1;
                        if (e) {
                            for (e = e.filters, n = 0, i = e.length; i > n; n++) t = e[n], t.field == this.field ? r = !0 : t.filters && (r = r || this._filterExist(t));
                            return r
                        }
                    }
                }),
                C = '<ul>#if(sortable){#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-sprite k-i-sort-asc"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-sprite k-i-sort-desc"></span>${messages.sortDescending}</span></li>#if(showColumns || filterable){#<li class="k-separator"></li>#}##}##if(showColumns){#<li class="k-item k-columns-item"><span class="k-link"><span class="k-sprite k-i-columns"></span>${messages.columns}</span><ul>#for (var idx = 0; idx < columns.length; idx++) {#<li><input type="checkbox" data-#=ns#field="#=columns[idx].field.replace(/"/g,"&\\#34;")#" data-#=ns#index="#=columns[idx].index#" data-#=ns#locked="#=columns[idx].locked#"/>#=columns[idx].title#</li>#}#</ul></li>#if(filterable || lockedColumns){#<li class="k-separator"></li>#}##}##if(filterable){#<li class="k-item k-filter-item"><span class="k-link"><span class="k-sprite k-filter"></span>${messages.filter}</span><ul><li><div class="k-filterable"></div></li></ul></li>#if(lockedColumns){#<li class="k-separator"></li>#}##}##if(lockedColumns){#<li class="k-item k-lock"><span class="k-link"><span class="k-sprite k-i-lock"></span>${messages.lock}</span></li><li class="k-item k-unlock"><span class="k-link"><span class="k-sprite k-i-unlock"></span>${messages.unlock}</span></li>#}#</ul>',
                S = '<div data-#=ns#role="view" data-#=ns#init-widgets="false" data-#=ns#use-native-scrolling="true" class="k-grid-column-menu"><div data-#=ns#role="header" class="k-header">${messages.settings}<button class="k-button k-done">#=messages.done#</button></div><div class="k-column-menu k-mobile-list"><ul><li><span class="k-link">${title}</span><ul>#if(sortable){#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-sprite k-i-sort-asc"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-sprite k-i-sort-desc"></span>${messages.sortDescending}</span></li>#}##if(lockedColumns){#<li class="k-item k-lock"><span class="k-link"><span class="k-sprite k-i-lock"></span>${messages.lock}</span></li><li class="k-item k-unlock"><span class="k-link"><span class="k-sprite k-i-unlock"></span>${messages.unlock}</span></li>#}##if(filterable){#<li class="k-item k-filter-item"><span class="k-link k-filterable"><span class="k-sprite k-filter"></span>${messages.filter}</span></li>#}#</ul></li>#if(showColumns){#<li class="k-columns-item"><span class="k-link">${messages.columns}</span><ul>#for (var idx = 0; idx < columns.length; idx++) {#<li class="k-item"><label class="k-label"><input type="checkbox" class="k-check" data-#=ns#field="#=columns[idx].field.replace(/"/g,"&\\#34;")#" data-#=ns#index="#=columns[idx].index#" data-#=ns#locked="#=columns[idx].locked#"/>#=columns[idx].title#</label></li>#}#</ul></li>#}#</ul></div></div>',
                T = k.extend({
                    init: function(e, t) {
                        k.fn.init.call(this, e, t), this.element.on("click" + y, "li.k-item:not(.k-separator):not(.k-state-disabled)", "_click")
                    },
                    events: [v],
                    _click: function(t) {
                        e(t.target).is("[type=checkbox]") || t.preventDefault(), this.trigger(v, {
                            item: t.currentTarget
                        })
                    },
                    close: function() {
                        this.options.pane.navigate("")
                    },
                    destroy: function() {
                        k.fn.destroy.call(this), this.element.off(y)
                    }
                });
            a.plugin(x)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.columnsorter.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.ui,
                r = i.Widget,
                o = "dir",
                a = "asc",
                s = "single",
                l = "field",
                c = "desc",
                d = ".kendoColumnSorter",
                u = ".k-link",
                h = "aria-sort",
                f = e.proxy,
                p = r.extend({
                    init: function(e, t) {
                        var n, i = this;
                        r.fn.init.call(i, e, t), i._refreshHandler = f(i.refresh, i), i.dataSource = i.options.dataSource.bind("change", i._refreshHandler), n = i.element.find(u), n[0] || (n = i.element.wrapInner('<a class="k-link" href="#"/>').find(u)), i.link = n, i.element.on("click" + d, f(i._click, i))
                    },
                    options: {
                        name: "ColumnSorter",
                        mode: s,
                        allowUnsort: !0,
                        compare: null,
                        filter: ""
                    },
                    destroy: function() {
                        var e = this;
                        r.fn.destroy.call(e), e.element.off(d), e.dataSource.unbind("change", e._refreshHandler), e._refreshHandler = e.element = e.link = e.dataSource = null
                    },
                    refresh: function() {
                        var t, i, r, s, d = this,
                            u = d.dataSource.sort() || [],
                            f = d.element,
                            p = f.attr(n.attr(l));
                        for (f.removeAttr(n.attr(o)), f.removeAttr(h), t = 0, i = u.length; i > t; t++) r = u[t], p == r.field && f.attr(n.attr(o), r.dir);
                        s = f.attr(n.attr(o)), f.find(".k-i-arrow-n,.k-i-arrow-s").remove(), s === a ? (e('<span class="k-icon k-i-arrow-n" />').appendTo(d.link), f.attr(h, "ascending")) : s === c && (e('<span class="k-icon k-i-arrow-s" />').appendTo(d.link), f.attr(h, "descending"))
                    },
                    _click: function(e) {
                        var i, r, d = this,
                            u = d.element,
                            h = u.attr(n.attr(l)),
                            f = u.attr(n.attr(o)),
                            p = d.options,
                            m = null === d.options.compare ? t : d.options.compare,
                            g = d.dataSource.sort() || [];
                        if (e.preventDefault(), !p.filter || u.is(p.filter)) {
                            if (f = f === a ? c : f === c && p.allowUnsort ? t : a, p.mode === s) g = [{
                                field: h,
                                dir: f,
                                compare: m
                            }];
                            else if ("multiple" === p.mode) {
                                for (i = 0, r = g.length; r > i; i++)
                                    if (g[i].field === h) {
                                        g.splice(i, 1);
                                        break
                                    } g.push({
                                    field: h,
                                    dir: f,
                                    compare: m
                                })
                            }
                            this.dataSource.sort(g)
                        }
                    }
                });
            i.plugin(p)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.editable.min", ["kendo.datepicker.min", "kendo.numerictextbox.min", "kendo.validator.min", "kendo.binder.min"], e)
    }(function() {
        return function(e, t) {
            function n(t) {
                return t = null != t ? t : "", t.type || e.type(t) || "string"
            }

            function i(t) {
                t.find(":input:not(:button, [" + s.attr("role") + "=upload], [" + s.attr("skip") + "], [type=file]), select").each(function() {
                    var t = s.attr("bind"),
                        n = this.getAttribute(t) || "",
                        i = "checkbox" === this.type || "radio" === this.type ? "checked:" : "value:",
                        r = this.name; - 1 === n.indexOf(i) && r && (n += (n.length ? "," : "") + i + r, e(this).attr(t, n))
                })
            }

            function r(e) {
                var t, i, r = (e.model.fields || e.model)[e.field],
                    o = n(r),
                    a = r ? r.validation : {},
                    l = s.attr("type"),
                    c = s.attr("bind"),
                    d = {
                        name: e.field
                    };
                for (t in a) i = a[t], p(t, _) >= 0 ? d[l] = t : h(i) || (d[t] = f(i) ? i.value || t : i), d[s.attr(t + "-msg")] = i.message;
                return p(o, _) >= 0 && (d[l] = o), d[c] = ("boolean" === o ? "checked:" : "value:") + e.field, d
            }

            function o(e) {
                var t, n, i, r, o, a;
                if (e && e.length)
                    for (a = [], t = 0, n = e.length; n > t; t++) i = e[t], o = i.text || i.value || i, r = null == i.value ? i.text || i : i.value, a[t] = {
                        text: o,
                        value: r
                    };
                return a
            }

            function a(e, t) {
                var n, i, r = e ? e.validation || {} : {};
                for (n in r) i = r[n], f(i) && i.value && (i = i.value), h(i) && (t[n] = i)
            }
            var s = window.kendo,
                l = s.ui,
                c = l.Widget,
                d = e.extend,
                u = s.support.browser.msie && 9 > s.support.browser.version,
                h = s.isFunction,
                f = e.isPlainObject,
                p = e.inArray,
                m = /("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,
                g = '<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-warning"> </span>#=message#<div class="k-callout k-callout-n"></div></div>',
                v = "change",
                _ = ["url", "email", "number", "date", "boolean"],
                b = {
                    number: function(t, n) {
                        var i = r(n);
                        e('<input type="text"/>').attr(i).appendTo(t).kendoNumericTextBox({
                            format: n.format
                        }), e("<span " + s.attr("for") + '="' + n.field + '" class="k-invalid-msg"/>').hide().appendTo(t)
                    },
                    date: function(t, n) {
                        var i = r(n),
                            o = n.format;
                        o && (o = s._extractFormat(o)), i[s.attr("format")] = o, e('<input type="text"/>').attr(i).appendTo(t).kendoDatePicker({
                            format: n.format
                        }), e("<span " + s.attr("for") + '="' + n.field + '" class="k-invalid-msg"/>').hide().appendTo(t)
                    },
                    string: function(t, n) {
                        var i = r(n);
                        e('<input type="text" class="k-input k-textbox"/>').attr(i).appendTo(t)
                    },
                    "boolean": function(t, n) {
                        var i = r(n);
                        e('<input type="checkbox" />').attr(i).appendTo(t)
                    },
                    values: function(t, n) {
                        var i = r(n),
                            a = s.stringify(o(n.values));
                        e("<select " + s.attr("text-field") + '="text"' + s.attr("value-field") + '="value"' + s.attr("source") + "='" + (a ? a.replace(/\'/g, "&apos;") : a) + "'" + s.attr("role") + '="dropdownlist"/>').attr(i).appendTo(t), e("<span " + s.attr("for") + '="' + n.field + '" class="k-invalid-msg"/>').hide().appendTo(t)
                    }
                },
                w = c.extend({
                    init: function(t, n) {
                        var i = this;
                        n.target && (n.$angular = n.target.options.$angular), c.fn.init.call(i, t, n), i._validateProxy = e.proxy(i._validate, i), i.refresh()
                    },
                    events: [v],
                    options: {
                        name: "Editable",
                        editors: b,
                        clearContainer: !0,
                        errorTemplate: g
                    },
                    editor: function(e, t) {
                        var i = this,
                            r = i.options.editors,
                            o = f(e),
                            a = o ? e.field : e,
                            l = i.options.model || {},
                            c = o && e.values,
                            u = c ? "values" : n(t),
                            h = o && e.editor,
                            p = h ? e.editor : r[u],
                            g = i.element.find("[" + s.attr("container-for") + "=" + a.replace(m, "\\$1") + "]");
                        p = p ? p : r.string, h && "string" == typeof e.editor && (p = function(t) {
                            t.append(e.editor)
                        }), g = g.length ? g : i.element, p(g, d(!0, {}, o ? e : {
                            field: a
                        }, {
                            model: l
                        }))
                    },
                    _validate: function(t) {
                        var n, i = this,
                            r = t.value,
                            o = i._validationEventInProgress,
                            a = {},
                            l = s.attr("bind"),
                            c = t.field.replace(m, "\\$1"),
                            d = RegExp("(value|checked)\\s*:\\s*" + c + "\\s*(,|$)");
                        a[t.field] = t.value,
                            n = e(":input[" + l + '*="' + c + '"]', i.element).filter("[" + s.attr("validate") + "!='false']").filter(function() {
                                return d.test(e(this).attr(l))
                            }), n.length > 1 && (n = n.filter(function() {
                            var t = e(this);
                            return !t.is(":radio") || t.val() == r
                        }));
                        try {
                            i._validationEventInProgress = !0, (!i.validatable.validateInput(n) || !o && i.trigger(v, {
                                values: a
                            })) && t.preventDefault()
                        } finally {
                            i._validationEventInProgress = !1
                        }
                    },
                    end: function() {
                        return this.validatable.validate()
                    },
                    destroy: function() {
                        var e = this;
                        e.angular("cleanup", function() {
                            return {
                                elements: e.element
                            }
                        }), c.fn.destroy.call(e), e.options.model.unbind("set", e._validateProxy), s.unbind(e.element), e.validatable && e.validatable.destroy(), s.destroy(e.element), e.element.removeData("kendoValidator"), e.element.is("[" + s.attr("role") + "=editable]") && e.element.removeAttr(s.attr("role"))
                    },
                    refresh: function() {
                        var n, r, o, l, c, d, h, p, m = this,
                            g = m.options.fields || [],
                            v = m.options.clearContainer ? m.element.empty() : m.element,
                            _ = m.options.model || {},
                            b = {};
                        for (e.isArray(g) || (g = [g]), n = 0, r = g.length; r > n; n++) o = g[n], l = f(o), c = l ? o.field : o, d = (_.fields || _)[c], a(d, b), m.editor(o, d);
                        if (m.options.target && m.angular("compile", function() {
                            return {
                                elements: v,
                                data: v.map(function() {
                                    return {
                                        dataItem: _
                                    }
                                })
                            }
                        }), !r) {
                            h = _.fields || _;
                            for (c in h) a(h[c], b)
                        }
                        i(v), m.validatable && m.validatable.destroy(), s.bind(v, m.options.model), m.options.model.unbind("set", m._validateProxy), m.options.model.bind("set", m._validateProxy), m.validatable = new s.ui.Validator(v, {
                            validateOnBlur: !1,
                            errorTemplate: m.options.errorTemplate || t,
                            rules: b
                        }), p = v.find(":kendoFocusable").eq(0).focus(), u && p.focus()
                    }
                });
            l.plugin(w)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.window.min", ["kendo.draganddrop.min"], e)
    }(function() {
        return function(e, t) {
            function n(e) {
                return t !== e
            }

            function i(e, t, n) {
                return Math.max(Math.min(parseInt(e, 10), n === 1 / 0 ? n : parseInt(n, 10)), parseInt(t, 10))
            }

            function r() {
                return !this.type || this.type.toLowerCase().indexOf("script") >= 0
            }

            function o(e) {
                var t = this;
                t.owner = e, t._draggable = new c(e.wrapper, {
                    filter: ">" + k,
                    group: e.wrapper.id + "-resizing",
                    dragstart: h(t.dragstart, t),
                    drag: h(t.drag, t),
                    dragend: h(t.dragend, t)
                }), t._draggable.userEvents.bind("press", h(t.addOverlay, t)), t._draggable.userEvents.bind("release", h(t.removeOverlay, t))
            }

            function a(e, t) {
                var n = this;
                n.owner = e, n._draggable = new c(e.wrapper, {
                    filter: t,
                    group: e.wrapper.id + "-moving",
                    dragstart: h(n.dragstart, n),
                    drag: h(n.drag, n),
                    dragend: h(n.dragend, n),
                    dragcancel: h(n.dragcancel, n)
                }), n._draggable.userEvents.stopPropagation = !1
            }
            var s = window.kendo,
                l = s.ui.Widget,
                c = s.ui.Draggable,
                d = e.isPlainObject,
                u = s._activeElement,
                h = e.proxy,
                f = e.extend,
                p = e.each,
                m = s.template,
                g = "body",
                v = ".kendoWindow",
                _ = ".k-window",
                b = ".k-window-title",
                w = b + "bar",
                y = ".k-window-content",
                k = ".k-resize-handle",
                x = ".k-overlay",
                C = "k-content-frame",
                S = "k-loading",
                T = "k-state-hover",
                D = "k-state-focused",
                A = "k-window-maximized",
                E = ":visible",
                F = "hidden",
                I = "cursor",
                M = "open",
                R = "activate",
                P = "deactivate",
                z = "close",
                B = "refresh",
                L = "minimize",
                H = "maximize",
                N = "resize",
                O = "resizeEnd",
                V = "dragstart",
                U = "dragend",
                W = "error",
                j = "overflow",
                q = "zIndex",
                G = ".k-window-actions .k-i-minimize,.k-window-actions .k-i-maximize",
                $ = ".k-i-pin",
                Y = ".k-i-unpin",
                K = $ + "," + Y,
                Q = ".k-window-titlebar .k-window-action",
                X = ".k-window-titlebar .k-i-refresh",
                J = s.isLocalUrl,
                Z = l.extend({
                    init: function(i, o) {
                        var a, c, u, f, p, m, g, k = this,
                            x = {},
                            C = !1,
                            S = o && o.actions && !o.actions.length;
                        l.fn.init.call(k, i, o), o = k.options, f = o.position, i = k.element, p = o.content, S && (o.actions = []), k.appendTo = e(o.appendTo), p && !d(p) && (p = o.content = {
                            url: p
                        }), i.find("script").filter(r).remove(), i.parent().is(k.appendTo) || f.top !== t && f.left !== t || (i.is(E) ? (x = i.offset(), C = !0) : (c = i.css("visibility"), u = i.css("display"), i.css({
                            visibility: F,
                            display: ""
                        }), x = i.offset(), i.css({
                            visibility: c,
                            display: u
                        })), f.top === t && (f.top = x.top), f.left === t && (f.left = x.left)), n(o.visible) && null !== o.visible || (o.visible = i.is(E)), a = k.wrapper = i.closest(_), i.is(".k-content") && a[0] || (i.addClass("k-window-content k-content"), k._createWindow(i, o), a = k.wrapper = i.closest(_), k._dimensions()), k._position(), o.pinned && k.pin(!0), p && k.refresh(p), o.visible && k.toFront(), m = a.children(y), k._tabindex(m), o.visible && o.modal && k._overlay(a.is(E)).css({
                            opacity: .5
                        }), a.on("mouseenter" + v, Q, h(k._buttonEnter, k)).on("mouseleave" + v, Q, h(k._buttonLeave, k)).on("click" + v, "> " + Q, h(k._windowActionHandler, k)), m.on("keydown" + v, h(k._keydown, k)).on("focus" + v, h(k._focus, k)).on("blur" + v, h(k._blur, k)), this._resizable(), this._draggable(), g = i.attr("id"), g && (g += "_wnd_title", a.children(w).children(b).attr("id", g), m.attr({
                            role: "dialog",
                            "aria-labelledby": g
                        })), a.add(a.children(".k-resize-handle," + w)).on("mousedown" + v, h(k.toFront, k)), k.touchScroller = s.touchScroller(i), k._resizeHandler = h(k._onDocumentResize, k), k._marker = s.guid().substring(0, 8), e(window).on("resize" + v + k._marker, k._resizeHandler), o.visible && (k.trigger(M), k.trigger(R)), s.notify(k)
                    },
                    _buttonEnter: function(t) {
                        e(t.currentTarget).addClass(T)
                    },
                    _buttonLeave: function(t) {
                        e(t.currentTarget).removeClass(T)
                    },
                    _focus: function() {
                        this.wrapper.addClass(D)
                    },
                    _blur: function() {
                        this.wrapper.removeClass(D)
                    },
                    _dimensions: function() {
                        var e, t, n = this.wrapper,
                            r = this.options,
                            o = r.width,
                            a = r.height,
                            s = r.maxHeight,
                            l = ["minWidth", "minHeight", "maxWidth", "maxHeight"];
                        for (this.title(r.title), e = 0; l.length > e; e++) t = r[l[e]], t && t != 1 / 0 && n.css(l[e], t);
                        s && s != 1 / 0 && this.element.css("maxHeight", s), o && n.width(("" + o).indexOf("%") > 0 ? o : i(o, r.minWidth, r.maxWidth)), a && n.height(("" + a).indexOf("%") > 0 ? a : i(a, r.minHeight, r.maxHeight)), r.visible || n.hide()
                    },
                    _position: function() {
                        var e = this.wrapper,
                            t = this.options.position;
                        0 === t.top && (t.top = "" + t.top), 0 === t.left && (t.left = "" + t.left), e.css({
                            top: t.top || "",
                            left: t.left || ""
                        })
                    },
                    _animationOptions: function(e) {
                        var t = this.options.animation,
                            n = {
                                open: {
                                    effects: {}
                                },
                                close: {
                                    hide: !0,
                                    effects: {}
                                }
                            };
                        return t && t[e] || n[e]
                    },
                    _resize: function() {
                        s.resize(this.element.children())
                    },
                    _resizable: function() {
                        var t = this.options.resizable,
                            n = this.wrapper;
                        this.resizing && (n.off("dblclick" + v).children(k).remove(), this.resizing.destroy(), this.resizing = null), t && (n.on("dblclick" + v, w, h(function(t) {
                            e(t.target).closest(".k-window-action").length || this.toggleMaximization()
                        }, this)), p("n e s w se sw ne nw".split(" "), function(e, t) {
                            n.append(ee.resizeHandle(t))
                        }), this.resizing = new o(this)), n = null
                    },
                    _draggable: function() {
                        var e = this.options.draggable;
                        this.dragging && (this.dragging.destroy(), this.dragging = null), e && (this.dragging = new a(this, e.dragHandle || w))
                    },
                    _actions: function() {
                        var t = this.options.actions,
                            n = this.wrapper.children(w),
                            i = n.find(".k-window-actions");
                        t = e.map(t, function(e) {
                            return {
                                name: e
                            }
                        }), i.html(s.render(ee.action, t))
                    },
                    setOptions: function(e) {
                        var n, i;
                        l.fn.setOptions.call(this, e), n = this.options.scrollable !== !1, this.restore(), this._dimensions(), this._position(), this._resizable(), this._draggable(), this._actions(), t !== e.modal && (i = this.options.visible !== !1, this._overlay(e.modal && i)), this.element.css(j, n ? "" : "hidden")
                    },
                    events: [M, R, P, z, L, H, B, N, O, V, U, W],
                    options: {
                        name: "Window",
                        animation: {
                            open: {
                                effects: {
                                    zoom: {
                                        direction: "in"
                                    },
                                    fade: {
                                        direction: "in"
                                    }
                                },
                                duration: 350
                            },
                            close: {
                                effects: {
                                    zoom: {
                                        direction: "out",
                                        properties: {
                                            scale: .7
                                        }
                                    },
                                    fade: {
                                        direction: "out"
                                    }
                                },
                                duration: 350,
                                hide: !0
                            }
                        },
                        title: "",
                        actions: ["Close"],
                        autoFocus: !0,
                        modal: !1,
                        resizable: !0,
                        draggable: !0,
                        minWidth: 90,
                        minHeight: 50,
                        maxWidth: 1 / 0,
                        maxHeight: 1 / 0,
                        pinned: !1,
                        scrollable: !0,
                        position: {},
                        content: null,
                        visible: null,
                        height: null,
                        width: null,
                        appendTo: "body"
                    },
                    _closable: function() {
                        return e.inArray("close", e.map(this.options.actions, function(e) {
                            return e.toLowerCase()
                        })) > -1
                    },
                    _keydown: function(e) {
                        var t, n, r, o, a, l, c = this,
                            d = c.options,
                            u = s.keys,
                            h = e.keyCode,
                            f = c.wrapper,
                            p = 10,
                            m = c.options.isMaximized;
                        e.target != e.currentTarget || c._closing || (h == u.ESC && c._closable() && c._close(!1), !d.draggable || e.ctrlKey || m || (t = s.getOffset(f), h == u.UP ? n = f.css("top", t.top - p) : h == u.DOWN ? n = f.css("top", t.top + p) : h == u.LEFT ? n = f.css("left", t.left - p) : h == u.RIGHT && (n = f.css("left", t.left + p))), d.resizable && e.ctrlKey && !m && (h == u.UP ? (n = !0, o = f.height() - p) : h == u.DOWN && (n = !0, o = f.height() + p), h == u.LEFT ? (n = !0, r = f.width() - p) : h == u.RIGHT && (n = !0, r = f.width() + p), n && (a = i(r, d.minWidth, d.maxWidth), l = i(o, d.minHeight, d.maxHeight), isNaN(a) || (f.width(a), c.options.width = a + "px"), isNaN(l) || (f.height(l), c.options.height = l + "px"), c.resize())), n && e.preventDefault())
                    },
                    _overlay: function(t) {
                        var n = this.appendTo.children(x),
                            i = this.wrapper;
                        return n.length || (n = e("<div class='k-overlay' />")), n.insertBefore(i[0]).toggle(t).css(q, parseInt(i.css(q), 10) - 1), n
                    },
                    _actionForIcon: function(e) {
                        var t = /\bk-i-\w+\b/.exec(e[0].className)[0];
                        return {
                            "k-i-close": "_close",
                            "k-i-maximize": "maximize",
                            "k-i-minimize": "minimize",
                            "k-i-restore": "restore",
                            "k-i-refresh": "refresh",
                            "k-i-pin": "pin",
                            "k-i-unpin": "unpin"
                        } [t]
                    },
                    _windowActionHandler: function(n) {
                        var i, r;
                        if (!this._closing) return i = e(n.target).closest(".k-window-action").find(".k-icon"), r = this._actionForIcon(i), r ? (n.preventDefault(), this[r](), !1) : t
                    },
                    _modals: function() {
                        var t = this,
                            n = e(_).filter(function() {
                                var n = e(this),
                                    i = t._object(n),
                                    r = i && i.options;
                                return r && r.modal && r.visible && r.appendTo === t.options.appendTo && n.is(E)
                            }).sort(function(t, n) {
                                return +e(t).css("zIndex") - +e(n).css("zIndex")
                            });
                        return t = null, n
                    },
                    _object: function(e) {
                        var n = e.children(y),
                            i = s.widgetInstance(n);
                        return i instanceof Z ? i : t
                    },
                    center: function() {
                        var t, n, i = this,
                            r = i.options.position,
                            o = i.wrapper,
                            a = e(window),
                            s = 0,
                            l = 0;
                        return i.options.isMaximized ? i : (i.options.pinned || (s = a.scrollTop(), l = a.scrollLeft()), n = l + Math.max(0, (a.width() - o.width()) / 2), t = s + Math.max(0, (a.height() - o.height() - parseInt(o.css("paddingTop"), 10)) / 2), o.css({
                            left: n,
                            top: t
                        }), r.top = t, r.left = n, i)
                    },
                    title: function(e) {
                        var t, n = this,
                            i = n.wrapper,
                            r = n.options,
                            o = i.children(w),
                            a = o.children(b);
                        return arguments.length ? (e === !1 ? (i.addClass("k-window-titleless"), o.remove()) : (o.length ? a.html(e) : (i.prepend(ee.titlebar(r)), n._actions(), o = i.children(w)), t = o.outerHeight(), i.css("padding-top", t), o.css("margin-top", -t)), n.options.title = e, n) : a.html()
                    },
                    content: function(e, t) {
                        var i = this.wrapper.children(y),
                            r = i.children(".km-scroll-container");
                        return i = r[0] ? r : i, n(e) ? (this.angular("cleanup", function() {
                            return {
                                elements: i.children()
                            }
                        }), s.destroy(this.element.children()), i.empty().html(e), this.angular("compile", function() {
                            var e, n = [];
                            for (e = i.length; --e >= 0;) n.push({
                                dataItem: t
                            });
                            return {
                                elements: i.children(),
                                data: n
                            }
                        }), this) : i.html()
                    },
                    open: function() {
                        var t, n, i = this,
                            r = i.wrapper,
                            o = i.options,
                            a = this._animationOptions("open"),
                            l = r.children(y),
                            c = e(document);
                        return i.trigger(M) || (i._closing && r.kendoStop(!0, !0), i._closing = !1, i.toFront(), o.autoFocus && i.element.focus(), o.visible = !0, o.modal && (t = i._overlay(!1), t.kendoStop(!0, !0), a.duration && s.effects.Fade ? (n = s.fx(t).fadeIn(), n.duration(a.duration || 0), n.endValue(.5), n.play()) : t.css("opacity", .5), t.show()), r.is(E) || (l.css(j, F), r.show().kendoStop().kendoAnimate({
                            effects: a.effects,
                            duration: a.duration,
                            complete: h(this._activate, this)
                        }))), o.isMaximized && (i._documentScrollTop = c.scrollTop(), i._documentScrollLeft = c.scrollLeft(), e("html, body").css(j, F)), i
                    },
                    _activate: function() {
                        var e = this.options.scrollable !== !1;
                        this.options.autoFocus && this.element.focus(), this.element.css(j, e ? "" : "hidden"), this.trigger(R)
                    },
                    _removeOverlay: function(n) {
                        var i, r = this._modals(),
                            o = this.options,
                            a = o.modal && !r.length,
                            l = o.modal ? this._overlay(!0) : e(t),
                            c = this._animationOptions("close");
                        a ? !n && c.duration && s.effects.Fade ? (i = s.fx(l).fadeOut(), i.duration(c.duration || 0), i.startValue(.5), i.play()) : this._overlay(!1).remove() : r.length && this._object(r.last())._overlay(!0)
                    },
                    _close: function(t) {
                        var n = this,
                            i = n.wrapper,
                            r = n.options,
                            o = this._animationOptions("open"),
                            a = this._animationOptions("close"),
                            s = e(document);
                        if (i.is(E) && !n.trigger(z, {
                            userTriggered: !t
                        })) {
                            if (n._closing) return;
                            n._closing = !0, r.visible = !1, e(_).each(function(t, n) {
                                var r = e(n).children(y);
                                n != i && r.find("> ." + C).length > 0 && r.children(x).remove()
                            }), this._removeOverlay(), i.kendoStop().kendoAnimate({
                                effects: a.effects || o.effects,
                                reverse: a.reverse === !0,
                                duration: a.duration,
                                complete: h(this._deactivate, this)
                            })
                        }
                        n.options.isMaximized && (e("html, body").css(j, ""), n._documentScrollTop && n._documentScrollTop > 0 && s.scrollTop(n._documentScrollTop), n._documentScrollLeft && n._documentScrollLeft > 0 && s.scrollLeft(n._documentScrollLeft))
                    },
                    _deactivate: function() {
                        var e, t = this;
                        t.wrapper.hide().css("opacity", ""), t.trigger(P), t.options.modal && (e = t._object(t._modals().last()), e && e.toFront())
                    },
                    close: function() {
                        return this._close(!0), this
                    },
                    _actionable: function(t) {
                        return e(t).is(Q + "," + Q + " .k-icon,:input,a")
                    },
                    _shouldFocus: function(t) {
                        var n = u(),
                            i = this.element;
                        return this.options.autoFocus && !e(n).is(i) && !this._actionable(t) && (!i.find(n).length || !i.find(t).length)
                    },
                    toFront: function(t) {
                        var n, i, r = this,
                            o = r.wrapper,
                            a = o[0],
                            s = +o.css(q),
                            l = s,
                            c = t && t.target || null;
                        return e(_).each(function(t, n) {
                            var i = e(n),
                                r = i.css(q),
                                o = i.children(y);
                            isNaN(r) || (s = Math.max(+r, s)), n != a && o.find("> ." + C).length > 0 && o.append(ee.overlay)
                        }), (!o[0].style.zIndex || s > l) && o.css(q, s + 2), r.element.find("> .k-overlay").remove(), r._shouldFocus(c) && (r.element.focus(), n = e(window).scrollTop(), i = parseInt(o.position().top, 10), i > 0 && n > i && (n > 0 ? e(window).scrollTop(i) : o.css("top", n))), o = null, r
                    },
                    toggleMaximization: function() {
                        return this._closing ? this : this[this.options.isMaximized ? "restore" : "maximize"]()
                    },
                    restore: function() {
                        var t = this,
                            n = t.options,
                            i = n.minHeight,
                            r = t.restoreOptions,
                            o = e(document);
                        return n.isMaximized || n.isMinimized ? (i && i != 1 / 0 && t.wrapper.css("min-height", i), t.wrapper.css({
                            position: n.pinned ? "fixed" : "absolute",
                            left: r.left,
                            top: r.top,
                            width: r.width,
                            height: r.height
                        }).removeClass(A).find(".k-window-content,.k-resize-handle").show().end().find(".k-window-titlebar .k-i-restore").parent().remove().end().end().find(G).parent().show().end().end().find(K).parent().show(), t.options.width = r.width, t.options.height = r.height, e("html, body").css(j, ""), this._documentScrollTop && this._documentScrollTop > 0 && o.scrollTop(this._documentScrollTop), this._documentScrollLeft && this._documentScrollLeft > 0 && o.scrollLeft(this._documentScrollLeft), n.isMaximized = n.isMinimized = !1, t.resize(), t) : t
                    },
                    _sizingAction: function(e, t) {
                        var n = this,
                            i = n.wrapper,
                            r = i[0].style,
                            o = n.options;
                        return o.isMaximized || o.isMinimized ? n : (n.restoreOptions = {
                            width: r.width,
                            height: r.height
                        }, i.children(k).hide().end().children(w).find(G).parent().hide().eq(0).before(ee.action({
                            name: "Restore"
                        })), t.call(n), n.wrapper.children(w).find(K).parent().toggle("maximize" !== e), n.trigger(e), n)
                    },
                    maximize: function() {
                        this._sizingAction("maximize", function() {
                            var t = this,
                                n = t.wrapper,
                                i = n.position(),
                                r = e(document);
                            f(t.restoreOptions, {
                                left: i.left,
                                top: i.top
                            }), n.css({
                                left: 0,
                                top: 0,
                                position: "fixed"
                            }).addClass(A), this._documentScrollTop = r.scrollTop(), this._documentScrollLeft = r.scrollLeft(), e("html, body").css(j, F), t.options.isMaximized = !0, t._onDocumentResize()
                        })
                    },
                    minimize: function() {
                        this._sizingAction("minimize", function() {
                            var e = this;
                            e.wrapper.css({
                                height: "",
                                minHeight: ""
                            }), e.element.hide(), e.options.isMinimized = !0
                        })
                    },
                    pin: function(t) {
                        var n = this,
                            i = e(window),
                            r = n.wrapper,
                            o = parseInt(r.css("top"), 10),
                            a = parseInt(r.css("left"), 10);
                        (t || !n.options.pinned && !n.options.isMaximized) && (r.css({
                            position: "fixed",
                            top: o - i.scrollTop(),
                            left: a - i.scrollLeft()
                        }), r.children(w).find($).addClass("k-i-unpin").removeClass("k-i-pin"), n.options.pinned = !0)
                    },
                    unpin: function() {
                        var t = this,
                            n = e(window),
                            i = t.wrapper,
                            r = parseInt(i.css("top"), 10),
                            o = parseInt(i.css("left"), 10);
                        t.options.pinned && !t.options.isMaximized && (i.css({
                            position: "",
                            top: r + n.scrollTop(),
                            left: o + n.scrollLeft()
                        }), i.children(w).find(Y).addClass("k-i-pin").removeClass("k-i-unpin"), t.options.pinned = !1)
                    },
                    _onDocumentResize: function() {
                        var t, n, i = this,
                            r = i.wrapper,
                            o = e(window),
                            a = s.support.zoomLevel();
                        i.options.isMaximized && (t = o.width() / a, n = o.height() / a - parseInt(r.css("padding-top"), 10), r.css({
                            width: t,
                            height: n
                        }), i.options.width = t, i.options.height = n, i.resize())
                    },
                    refresh: function(t) {
                        var i, r, o, a = this,
                            s = a.options,
                            l = e(a.element);
                        return d(t) || (t = {
                            url: t
                        }), t = f({}, s.content, t), r = n(s.iframe) ? s.iframe : t.iframe, o = t.url, o ? (n(r) || (r = !J(o)), r ? (i = l.find("." + C)[0], i ? i.src = o || i.src : l.html(ee.contentFrame(f({}, s, {
                            content: t
                        }))), l.find("." + C).unbind("load" + v).on("load" + v, h(this._triggerRefresh, this))) : a._ajaxRequest(t)) : (t.template && a.content(m(t.template)({})), a.trigger(B)), l.toggleClass("k-window-iframecontent", !!r), a
                    },
                    _triggerRefresh: function() {
                        this.trigger(B)
                    },
                    _ajaxComplete: function() {
                        clearTimeout(this._loadingIconTimeout), this.wrapper.find(X).removeClass(S)
                    },
                    _ajaxError: function(e, t) {
                        this.trigger(W, {
                            status: t,
                            xhr: e
                        })
                    },
                    _ajaxSuccess: function(e) {
                        return function(t) {
                            var n = t;
                            e && (n = m(e)(t || {})), this.content(n, t), this.element.prop("scrollTop", 0), this.trigger(B)
                        }
                    },
                    _showLoading: function() {
                        this.wrapper.find(X).addClass(S)
                    },
                    _ajaxRequest: function(t) {
                        this._loadingIconTimeout = setTimeout(h(this._showLoading, this), 100), e.ajax(f({
                            type: "GET",
                            dataType: "html",
                            cache: !1,
                            error: h(this._ajaxError, this),
                            complete: h(this._ajaxComplete, this),
                            success: h(this._ajaxSuccess(t.template), this)
                        }, t))
                    },
                    _destroy: function() {
                        this.resizing && this.resizing.destroy(), this.dragging && this.dragging.destroy(), this.wrapper.off(v).children(y).off(v).end().find(".k-resize-handle,.k-window-titlebar").off(v), e(window).off("resize" + v + this._marker), clearTimeout(this._loadingIconTimeout), l.fn.destroy.call(this), this.unbind(t), s.destroy(this.wrapper), this._removeOverlay(!0)
                    },
                    destroy: function() {
                        this._destroy(), this.wrapper.empty().remove(), this.wrapper = this.appendTo = this.element = e()
                    },
                    _createWindow: function() {
                        var t, n, i = this.element,
                            r = this.options,
                            o = s.support.isRtl(i);
                        r.scrollable === !1 && i.attr("style", "overflow:hidden;"), n = e(ee.wrapper(r)), t = i.find("iframe:not(.k-content)").map(function() {
                            var e = this.getAttribute("src");
                            return this.src = "", e
                        }), n.toggleClass("k-rtl", o).appendTo(this.appendTo).append(i).find("iframe:not(.k-content)").each(function(e) {
                            this.src = t[e]
                        }), n.find(".k-window-title").css(o ? "left" : "right", n.find(".k-window-actions").outerWidth() + 10), i.css("visibility", "").show(), i.find("[data-role=editor]").each(function() {
                            var t = e(this).data("kendoEditor");
                            t && t.refresh()
                        }), n = i = null
                    }
                }),
                ee = {
                    wrapper: m("<div class='k-widget k-window bsbSkin' />"),
                    action: m("<a role='button' href='\\#' class='k-window-action k-link'><span role='presentation' class='k-icon k-i-#= name.toLowerCase() #'>#= name #</span></a>"),
                    titlebar: m("<div class='k-window-titlebar k-header'>&nbsp;<span class='k-window-title'>#= title #</span><div class='k-window-actions' /></div>"),
                    overlay: "<div class='k-overlay' />",
                    contentFrame: m("<iframe frameborder='0' title='#= title #' class='" + C + "' src='#= content.url #'>This page requires frames in order to show content</iframe>"),
                    resizeHandle: m("<div class='k-resize-handle k-resize-#= data #'></div>")
                };
            o.prototype = {
                addOverlay: function() {
                    this.owner.wrapper.append(ee.overlay)
                },
                removeOverlay: function() {
                    this.owner.wrapper.find(x).remove()
                },
                dragstart: function(t) {
                    var n = this,
                        i = n.owner,
                        r = i.wrapper;
                    n.elementPadding = parseInt(r.css("padding-top"), 10), n.initialPosition = s.getOffset(r, "position"), n.resizeDirection = t.currentTarget.prop("className").replace("k-resize-handle k-resize-", ""), n.initialSize = {
                        width: r.width(),
                        height: r.height()
                    }, n.containerOffset = s.getOffset(i.appendTo, "position"), r.children(k).not(t.currentTarget).hide(), e(g).css(I, t.currentTarget.css(I))
                },
                drag: function(e) {
                    var t, n, r, o, a = this,
                        s = a.owner,
                        l = s.wrapper,
                        c = s.options,
                        d = a.resizeDirection,
                        u = a.containerOffset,
                        h = a.initialPosition,
                        f = a.initialSize,
                        p = Math.max(e.x.location, u.left),
                        m = Math.max(e.y.location, u.top);
                    d.indexOf("e") >= 0 ? (t = p - h.left, l.width(i(t, c.minWidth, c.maxWidth))) : d.indexOf("w") >= 0 && (o = h.left + f.width, t = i(o - p, c.minWidth, c.maxWidth), l.css({
                        left: o - t - u.left,
                        width: t
                    })), d.indexOf("s") >= 0 ? (n = m - h.top - a.elementPadding, l.height(i(n, c.minHeight, c.maxHeight))) : d.indexOf("n") >= 0 && (r = h.top + f.height, n = i(r - m, c.minHeight, c.maxHeight), l.css({
                        top: r - n - u.top,
                        height: n
                    })), t && (s.options.width = t + "px"), n && (s.options.height = n + "px"), s.resize()
                },
                dragend: function(t) {
                    var n = this,
                        i = n.owner,
                        r = i.wrapper;
                    return r.children(k).not(t.currentTarget).show(), e(g).css(I, ""), i.touchScroller && i.touchScroller.reset(), 27 == t.keyCode && r.css(n.initialPosition).css(n.initialSize), i.trigger(O), !1
                },
                destroy: function() {
                    this._draggable && this._draggable.destroy(), this._draggable = this.owner = null
                }
            }, a.prototype = {
                dragstart: function(t) {
                    var n = this.owner,
                        i = n.element,
                        r = i.find(".k-window-actions"),
                        o = s.getOffset(n.appendTo);
                    n.trigger(V), n.initialWindowPosition = s.getOffset(n.wrapper, "position"), n.startPosition = {
                        left: t.x.client - n.initialWindowPosition.left,
                        top: t.y.client - n.initialWindowPosition.top
                    }, n.minLeftPosition = r.length > 0 ? r.outerWidth() + parseInt(r.css("right"), 10) - i.outerWidth() : 20 - i.outerWidth(), n.minLeftPosition -= o.left, n.minTopPosition = -o.top, n.wrapper.append(ee.overlay).children(k).hide(), e(g).css(I, t.currentTarget.css(I))
                },
                drag: function(t) {
                    var n = this.owner,
                        i = n.options.position,
                        r = Math.max(t.y.client - n.startPosition.top, n.minTopPosition),
                        o = Math.max(t.x.client - n.startPosition.left, n.minLeftPosition),
                        a = {
                            left: o,
                            top: r
                        };
                    e(n.wrapper).css(a), i.top = r, i.left = o
                },
                _finishDrag: function() {
                    var t = this.owner;
                    t.wrapper.children(k).toggle(!t.options.isMinimized).end().find(x).remove(), e(g).css(I, "")
                },
                dragcancel: function(e) {
                    this._finishDrag(), e.currentTarget.closest(_).css(this.owner.initialWindowPosition)
                },
                dragend: function() {
                    return this._finishDrag(), this.owner.trigger(U), !1
                },
                destroy: function() {
                    this._draggable && this._draggable.destroy(), this._draggable = this.owner = null
                }
            }, s.ui.plugin(Z)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.mobile.view.min", ["kendo.core.min", "kendo.fx.min", "kendo.mobile.scroller.min", "kendo.view.min"], e)
    }(function() {
        return function(e, t) {
            function n(e) {
                var t, n, i = e.find(k("popover")),
                    r = s.roles;
                for (t = 0, n = i.length; n > t; t++) o.initWidget(i[t], {}, r)
            }

            function i(e) {
                o.triggeredByInput(e) || e.preventDefault()
            }

            function r(t) {
                t.each(function() {
                    o.initWidget(e(this), {}, s.roles)
                })
            }
            var o = window.kendo,
                a = o.mobile,
                s = a.ui,
                l = o.attr,
                c = s.Widget,
                d = o.ViewClone,
                u = "init",
                h = '<div style="height: 100%; width: 100%; position: absolute; top: 0; left: 0; z-index: 20000; display: none" />',
                f = "beforeShow",
                p = "show",
                m = "afterShow",
                g = "beforeHide",
                v = "transitionEnd",
                _ = "transitionStart",
                b = "hide",
                w = "destroy",
                y = o.attrValue,
                k = o.roleSelector,
                x = o.directiveSelector,
                C = o.compileMobileDirective,
                S = c.extend({
                    init: function(t, n) {
                        c.fn.init.call(this, t, n), this.params = {}, e.extend(this, n), this.transition = this.transition || this.defaultTransition, this._id(), this.options.$angular ? this._overlay() : (this._layout(), this._overlay(), this._scroller(), this._model())
                    },
                    events: [u, f, p, m, g, b, w, _, v],
                    options: {
                        name: "View",
                        title: "",
                        layout: null,
                        getLayout: e.noop,
                        reload: !1,
                        transition: "",
                        defaultTransition: "",
                        useNativeScrolling: !1,
                        stretch: !1,
                        zoom: !1,
                        model: null,
                        modelScope: window,
                        scroller: {},
                        initWidgets: !0
                    },
                    enable: function(e) {
                        t === e && (e = !0), e ? this.overlay.hide() : this.overlay.show()
                    },
                    destroy: function() {
                        this.layout && this.layout.detach(this), this.trigger(w), c.fn.destroy.call(this), this.scroller && this.scroller.destroy(), this.options.$angular && this.element.scope().$destroy(), o.destroy(this.element)
                    },
                    purge: function() {
                        this.destroy(), this.element.remove()
                    },
                    triggerBeforeShow: function() {
                        return this.trigger(f, {
                            view: this
                        }) ? !1 : !0
                    },
                    triggerBeforeHide: function() {
                        return this.trigger(g, {
                            view: this
                        }) ? !1 : !0
                    },
                    showStart: function() {
                        var e = this.element;
                        e.css("display", ""), this.inited ? this._invokeNgController() : (this.inited = !0, this.trigger(u, {
                            view: this
                        })), this.layout && this.layout.attach(this), this._padIfNativeScrolling(), this.trigger(p, {
                            view: this
                        }), o.resize(e)
                    },
                    showEnd: function() {
                        this.trigger(m, {
                            view: this
                        }), this._padIfNativeScrolling()
                    },
                    hideEnd: function() {
                        var e = this;
                        e.element.hide(), e.trigger(b, {
                            view: e
                        }), e.layout && e.layout.trigger(b, {
                            view: e,
                            layout: e.layout
                        })
                    },
                    beforeTransition: function(e) {
                        this.trigger(_, {
                            type: e
                        })
                    },
                    afterTransition: function(e) {
                        this.trigger(v, {
                            type: e
                        })
                    },
                    _padIfNativeScrolling: function() {
                        if (a.appLevelNativeScrolling()) {
                            var e = o.support.mobileOS && o.support.mobileOS.android,
                                t = a.application.skin() || "",
                                n = a.application.os.android || t.indexOf("android") > -1,
                                i = "flat" === t || t.indexOf("material") > -1,
                                r = !e && !n || i ? "header" : "footer",
                                s = !e && !n || i ? "footer" : "header";
                            this.content.css({
                                paddingTop: this[r].height(),
                                paddingBottom: this[s].height()
                            })
                        }
                    },
                    contentElement: function() {
                        var e = this;
                        return e.options.stretch ? e.content : e.scrollerContent
                    },
                    clone: function() {
                        return new d(this)
                    },
                    _scroller: function() {
                        var t = this;
                        a.appLevelNativeScrolling() || (t.options.stretch ? t.content.addClass("km-stretched-view") : (t.content.kendoMobileScroller(e.extend(t.options.scroller, {
                            zoom: t.options.zoom,
                            useNative: t.options.useNativeScrolling
                        })), t.scroller = t.content.data("kendoMobileScroller"), t.scrollerContent = t.scroller.scrollElement), o.support.kineticScrollNeeded && (e(t.element).on("touchmove", ".km-header", i), t.options.useNativeScrolling || t.options.stretch || e(t.element).on("touchmove", ".km-content", i)))
                    },
                    _model: function() {
                        var e = this,
                            t = e.element,
                            i = e.options.model;
                        "string" == typeof i && (i = o.getter(i)(e.options.modelScope)), e.model = i, n(t), e.element.css("display", ""), e.options.initWidgets && (i ? o.bind(t, i, s, o.ui, o.dataviz.ui) : a.init(t.children())), e.element.css("display", "none")
                    },
                    _id: function() {
                        var e = this.element,
                            t = e.attr("id") || "";
                        this.id = y(e, "url") || "#" + t, "#" == this.id && (this.id = o.guid(), e.attr("id", this.id))
                    },
                    _layout: function() {
                        var e = k("content"),
                            t = this.element;
                        t.addClass("km-view"), this.header = t.children(k("header")).addClass("km-header"), this.footer = t.children(k("footer")).addClass("km-footer"), t.children(e)[0] || t.wrapInner("<div " + l("role") + '="content"></div>'), this.content = t.children(k("content")).addClass("km-content"), this.element.prepend(this.header).append(this.footer), this.layout = this.options.getLayout(this.layout), this.layout && this.layout.setup(this)
                    },
                    _overlay: function() {
                        this.overlay = e(h).appendTo(this.element)
                    },
                    _invokeNgController: function() {
                        var t, n, i;
                        this.options.$angular && (t = this.element.controller(), n = this.options.$angular[0], t && (i = e.proxy(this, "_callController", t, n), /^\$(digest|apply)$/.test(n.$$phase) ? i() : n.$apply(i)))
                    },
                    _callController: function(e, t) {
                        this.element.injector().invoke(e.constructor, e, {
                            $scope: t
                        })
                    }
                }),
                T = c.extend({
                    init: function(e, t) {
                        c.fn.init.call(this, e, t), e = this.element, this.header = e.children(this._locate("header")).addClass("km-header"), this.footer = e.children(this._locate("footer")).addClass("km-footer"), this.elements = this.header.add(this.footer), n(e), this.options.$angular || o.mobile.init(this.element.children()), this.element.detach(), this.trigger(u, {
                            layout: this
                        })
                    },
                    _locate: function(e) {
                        return this.options.$angular ? x(e) : k(e)
                    },
                    options: {
                        name: "Layout",
                        id: null,
                        platform: null
                    },
                    events: [u, p, b],
                    setup: function(e) {
                        e.header[0] || (e.header = this.header), e.footer[0] || (e.footer = this.footer)
                    },
                    detach: function(e) {
                        var t = this;
                        e.header === t.header && t.header[0] && e.element.prepend(t.header.detach()[0].cloneNode(!0)), e.footer === t.footer && t.footer.length && e.element.append(t.footer.detach()[0].cloneNode(!0))
                    },
                    attach: function(e) {
                        var t = this,
                            n = t.currentView;
                        n && t.detach(n), e.header === t.header && (t.header.detach(), e.element.children(k("header")).remove(), e.element.prepend(t.header)), e.footer === t.footer && (t.footer.detach(), e.element.children(k("footer")).remove(), e.element.append(t.footer)), t.trigger(p, {
                            layout: t,
                            view: e
                        }), t.currentView = e
                    }
                }),
                D = o.Observable,
                A = /<body[^>]*>(([\u000a\u000d\u2028\u2029]|.)*)<\/body>/i,
                E = "loadStart",
                F = "loadComplete",
                I = "showStart",
                M = "sameViewRequested",
                R = "viewShow",
                P = "viewTypeDetermined",
                z = "after",
                B = D.extend({
                    init: function(t) {
                        var n, i, a, s, l = this;
                        if (D.fn.init.call(l), e.extend(l, t), l.sandbox = e("<div />"), a = l.container, n = l._hideViews(a), l.rootView = n.first(), !l.rootView[0] && t.rootNeeded) throw i = a[0] == o.mobile.application.element[0] ? 'Your kendo mobile application element does not contain any direct child elements with data-role="view" attribute set. Make sure that you instantiate the mobile application using the correct container.' : 'Your pane element does not contain any direct child elements with data-role="view" attribute set.', Error(i);
                        l.layouts = {}, l.viewContainer = new o.ViewContainer(l.container), l.viewContainer.bind("accepted", function(e) {
                            e.view.params = l.params
                        }), l.viewContainer.bind("complete", function(e) {
                            l.trigger(R, {
                                view: e.view
                            })
                        }), l.viewContainer.bind(z, function() {
                            l.trigger(z)
                        }), this.getLayoutProxy = e.proxy(this, "_getLayout"), l._setupLayouts(a), s = a.children(l._locate("modalview drawer")), l.$angular ? (l.$angular[0].viewOptions = {
                            defaultTransition: l.transition,
                            loader: l.loader,
                            container: l.container,
                            getLayout: l.getLayoutProxy
                        }, s.each(function(n, i) {
                            C(e(i), t.$angular[0])
                        })) : r(s), this.bind(this.events, t)
                    },
                    events: [I, z, R, E, F, M, P],
                    destroy: function() {
                        o.destroy(this.container);
                        for (var e in this.layouts) this.layouts[e].destroy()
                    },
                    view: function() {
                        return this.viewContainer.view
                    },
                    showView: function(e, t, n) {
                        if (e = e.replace(RegExp("^" + this.remoteViewURLPrefix), ""), "" === e && this.remoteViewURLPrefix && (e = "/"), e.replace(/^#/, "") === this.url) return this.trigger(M), !1;
                        this.trigger(I);
                        var i = this,
                            r = function(n) {
                                return i.viewContainer.show(n, t, e)
                            },
                            a = i._findViewElement(e),
                            s = o.widgetInstance(a);
                        return i.url = e.replace(/^#/, ""), i.params = n, s && s.reload && (s.purge(), a = []), this.trigger(P, {
                            remote: 0 === a.length,
                            url: e
                        }), a[0] ? (s || (s = i._createView(a)), r(s)) : (this.serverNavigation ? location.href = e : i._loadView(e, r), !0)
                    },
                    append: function(e, t) {
                        var n, i, o, a = this.sandbox,
                            s = (t || "").split("?")[0],
                            c = this.container;
                        return A.test(e) && (e = RegExp.$1), a[0].innerHTML = e, c.append(a.children("script, style")), n = this._hideViews(a), o = n.first(), o.length || (n = o = a.wrapInner("<div data-role=view />").children()), s && o.hide().attr(l("url"), s), this._setupLayouts(a), i = a.children(this._locate("modalview drawer")), c.append(a.children(this._locate("layout modalview drawer")).add(n)), r(i), this._createView(o)
                    },
                    _locate: function(e) {
                        return this.$angular ? x(e) : k(e)
                    },
                    _findViewElement: function(e) {
                        var t, n = e.split("?")[0];
                        return n ? (t = this.container.children("[" + l("url") + "='" + n + "']"), t[0] || -1 !== n.indexOf("/") || (t = this.container.children("#" === n.charAt(0) ? n : "#" + n)), t) : this.rootView
                    },
                    _createView: function(e) {
                        return this.$angular ? C(e, this.$angular[0]) : o.initWidget(e, {
                            defaultTransition: this.transition,
                            loader: this.loader,
                            container: this.container,
                            getLayout: this.getLayoutProxy,
                            modelScope: this.modelScope,
                            reload: y(e, "reload")
                        }, s.roles)
                    },
                    _getLayout: function(e) {
                        return "" === e ? null : e ? this.layouts[e] : this.layouts[this.layout]
                    },
                    _loadView: function(t, n) {
                        this._xhr && this._xhr.abort(), this.trigger(E), this._xhr = e.get(o.absoluteURL(t, this.remoteViewURLPrefix), "html").always(e.proxy(this, "_xhrComplete", n, t))
                    },
                    _xhrComplete: function(e, t, n) {
                        var i = !0;
                        if ("object" == typeof n && 0 === n.status) {
                            if (!(n.responseText && n.responseText.length > 0)) return;
                            i = !0, n = n.responseText
                        }
                        this.trigger(F), i && e(this.append(n, t))
                    },
                    _hideViews: function(e) {
                        return e.children(this._locate("view splitview")).hide()
                    },
                    _setupLayouts: function(t) {
                        var n, i = this;
                        t.children(i._locate("layout")).each(function() {
                            n = i.$angular ? C(e(this), i.$angular[0]) : o.initWidget(e(this), {}, s.roles);
                            var t = n.options.platform;
                            t && t !== a.application.os.name ? n.destroy() : i.layouts[n.options.id] = n
                        })
                    }
                });
            o.mobile.ViewEngine = B, s.plugin(S), s.plugin(T)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.mobile.loader.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.mobile.ui,
                r = i.Widget,
                o = e.map(n.eventMap, function(e) {
                    return e
                }).join(" ").split(" "),
                a = r.extend({
                    init: function(t, n) {
                        var i = this,
                            o = e('<div class="km-loader"><span class="km-loading km-spin"></span><span class="km-loading-left"></span><span class="km-loading-right"></span></div>');
                        r.fn.init.call(i, o, n), i.container = t, i.captureEvents = !1, i._attachCapture(), o.append(i.options.loading).hide().appendTo(t)
                    },
                    options: {
                        name: "Loader",
                        loading: "<h1>Loading...</h1>",
                        timeout: 100
                    },
                    show: function() {
                        var e = this;
                        clearTimeout(e._loading), e.options.loading !== !1 && (e.captureEvents = !0, e._loading = setTimeout(function() {
                            e.element.show()
                        }, e.options.timeout))
                    },
                    hide: function() {
                        this.captureEvents = !1, clearTimeout(this._loading), this.element.hide()
                    },
                    changeMessage: function(e) {
                        this.options.loading = e, this.element.find(">h1").html(e)
                    },
                    transition: function() {
                        this.captureEvents = !0, this.container.css("pointer-events", "none")
                    },
                    transitionDone: function() {
                        this.captureEvents = !1, this.container.css("pointer-events", "")
                    },
                    _attachCapture: function() {
                        function e(e) {
                            n.captureEvents && e.preventDefault()
                        }
                        var t, n = this;
                        for (n.captureEvents = !1,
                                 t = 0; o.length > t; t++) n.container[0].addEventListener(o[t], e, !0)
                    }
                });
            i.plugin(a)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.mobile.pane.min", ["kendo.mobile.view.min", "kendo.mobile.loader.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.mobile,
                r = n.roleSelector,
                o = i.ui,
                a = o.Widget,
                s = i.ViewEngine,
                l = o.View,
                c = i.ui.Loader,
                d = "external",
                u = "href",
                h = "#!",
                f = "navigate",
                p = "viewShow",
                m = "sameViewRequested",
                g = n.support.mobileOS,
                v = g.ios && !g.appMode && g.flatVersion >= 700,
                _ = /popover|actionsheet|modalview|drawer/,
                b = "#:back",
                w = n.attrValue,
                y = a.extend({
                    init: function(e, t) {
                        var i = this;
                        a.fn.init.call(i, e, t), t = i.options, e = i.element, e.addClass("km-pane"), i.options.collapsible && e.addClass("km-collapsible-pane"), this.history = [], this.historyCallback = function(e, t, n) {
                            var r = i.transition;
                            return i.transition = null, v && n && (r = "none"), i.viewEngine.showView(e, r, t)
                        }, this._historyNavigate = function(e) {
                            if (e === b) {
                                if (1 === i.history.length) return;
                                i.history.pop(), e = i.history[i.history.length - 1]
                            } else i.history.push(e);
                            i.historyCallback(e, n.parseQueryStringParams(e))
                        }, this._historyReplace = function(e) {
                            var t = n.parseQueryStringParams(e);
                            i.history[i.history.length - 1] = e, i.historyCallback(e, t)
                        }, i.loader = new c(e, {
                            loading: i.options.loading
                        }), i.viewEngine = new s({
                            container: e,
                            transition: t.transition,
                            modelScope: t.modelScope,
                            rootNeeded: !t.initial,
                            serverNavigation: t.serverNavigation,
                            remoteViewURLPrefix: t.root || "",
                            layout: t.layout,
                            $angular: t.$angular,
                            loader: i.loader,
                            showStart: function() {
                                i.loader.transition(), i.closeActiveDialogs()
                            },
                            after: function() {
                                i.loader.transitionDone()
                            },
                            viewShow: function(e) {
                                i.trigger(p, e)
                            },
                            loadStart: function() {
                                i.loader.show()
                            },
                            loadComplete: function() {
                                i.loader.hide()
                            },
                            sameViewRequested: function() {
                                i.trigger(m)
                            },
                            viewTypeDetermined: function(e) {
                                e.remote && i.options.serverNavigation || i.trigger(f, {
                                    url: e.url
                                })
                            }
                        }), this._setPortraitWidth(), n.onResize(function() {
                            i._setPortraitWidth()
                        }), i._setupAppLinks()
                    },
                    closeActiveDialogs: function() {
                        var t = this.element.find(r("actionsheet popover modalview")).filter(":visible");
                        t.each(function() {
                            n.widgetInstance(e(this), o).close()
                        })
                    },
                    navigateToInitial: function() {
                        var e = this.options.initial;
                        return e && this.navigate(e), e
                    },
                    options: {
                        name: "Pane",
                        portraitWidth: "",
                        transition: "",
                        layout: "",
                        collapsible: !1,
                        initial: null,
                        modelScope: window,
                        loading: "<h1>Loading...</h1>"
                    },
                    events: [f, p, m],
                    append: function(e) {
                        return this.viewEngine.append(e)
                    },
                    destroy: function() {
                        a.fn.destroy.call(this), this.viewEngine.destroy(), this.userEvents.destroy()
                    },
                    navigate: function(e, t) {
                        e instanceof l && (e = e.id), this.transition = t, this._historyNavigate(e)
                    },
                    replace: function(e, t) {
                        e instanceof l && (e = e.id), this.transition = t, this._historyReplace(e)
                    },
                    bindToRouter: function(e) {
                        var t = this,
                            i = this.history,
                            r = this.viewEngine;
                        e.bind("init", function(t) {
                            var o, a = t.url,
                                s = e.pushState ? a : "/";
                            r.rootView.attr(n.attr("url"), s), o = i.length, "/" === a && o && (e.navigate(i[o - 1], !0), t.preventDefault())
                        }), e.bind("routeMissing", function(e) {
                            t.historyCallback(e.url, e.params, e.backButtonPressed) || e.preventDefault()
                        }), e.bind("same", function() {
                            t.trigger(m)
                        }), t._historyNavigate = function(t) {
                            e.navigate(t)
                        }, t._historyReplace = function(t) {
                            e.replace(t)
                        }
                    },
                    hideLoading: function() {
                        this.loader.hide()
                    },
                    showLoading: function() {
                        this.loader.show()
                    },
                    changeLoadingMessage: function(e) {
                        this.loader.changeMessage(e)
                    },
                    view: function() {
                        return this.viewEngine.view()
                    },
                    _setPortraitWidth: function() {
                        var e, t = this.options.portraitWidth;
                        t && (e = n.mobile.application.element.is(".km-vertical") ? t : "auto", this.element.css("width", e))
                    },
                    _setupAppLinks: function() {
                        var t = this,
                            i = "tab",
                            o = "[data-" + n.ns + "navigate-on-press]",
                            a = e.map(["button", "backbutton", "detailbutton", "listview-link"], function(e) {
                                return r(e) + ":not(" + o + ")"
                            }).join(",");
                        this.element.handler(this).on("down", r(i) + "," + o, "_mouseup").on("click", r(i) + "," + a + "," + o, "_appLinkClick"), this.userEvents = new n.UserEvents(this.element, {
                            fastTap: !0,
                            filter: a,
                            tap: function(e) {
                                e.event.currentTarget = e.touch.currentTarget, t._mouseup(e.event)
                            }
                        }), this.element.css("-ms-touch-action", "")
                    },
                    _appLinkClick: function(t) {
                        var n = e(t.currentTarget).attr("href"),
                            i = n && "#" !== n[0] && this.options.serverNavigation;
                        i || w(e(t.currentTarget), "rel") == d || t.preventDefault()
                    },
                    _mouseup: function(r) {
                        if (!(r.which > 1 || r.isDefaultPrevented())) {
                            var a = this,
                                s = e(r.currentTarget),
                                l = w(s, "transition"),
                                c = w(s, "rel") || "",
                                f = w(s, "target"),
                                p = s.attr(u),
                                m = v && 0 === s[0].offsetHeight,
                                g = p && "#" !== p[0] && this.options.serverNavigation;
                            m || g || c === d || t === p || p === h || (s.attr(u, h), setTimeout(function() {
                                s.attr(u, p)
                            }), c.match(_) ? (n.widgetInstance(e(p), o).openFor(s), ("actionsheet" === c || "drawer" === c) && r.stopPropagation()) : ("_top" === f ? a = i.application.pane : f && (a = e("#" + f).data("kendoMobilePane")), a.navigate(p, l)), r.preventDefault())
                        }
                    }
                });
            y.wrap = function(e) {
                e.is(r("view")) || (e = e.wrap("<div data-" + n.ns + 'role="view" data-stretch="true"></div>').parent());
                var t = e.wrap('<div class="km-pane-wrapper"><div></div></div>').parent(),
                    i = new y(t);
                return i.navigate(""), i
            }, o.plugin(y)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.mobile.popover.min", ["kendo.popup.min", "kendo.mobile.pane.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.mobile,
                r = i.ui,
                o = "hide",
                a = "open",
                s = "close",
                l = '<div class="km-popup-wrapper" />',
                c = '<div class="km-popup-arrow" />',
                d = '<div class="km-popup-overlay" />',
                u = "km-up km-down km-left km-right",
                h = r.Widget,
                f = {
                    down: {
                        origin: "bottom center",
                        position: "top center"
                    },
                    up: {
                        origin: "top center",
                        position: "bottom center"
                    },
                    left: {
                        origin: "center left",
                        position: "center right",
                        collision: "fit flip"
                    },
                    right: {
                        origin: "center right",
                        position: "center left",
                        collision: "fit flip"
                    }
                },
                p = {
                    animation: {
                        open: {
                            effects: "fade:in",
                            duration: 0
                        },
                        close: {
                            effects: "fade:out",
                            duration: 400
                        }
                    }
                },
                m = {
                    horizontal: {
                        offset: "top",
                        size: "height"
                    },
                    vertical: {
                        offset: "left",
                        size: "width"
                    }
                },
                g = {
                    up: "down",
                    down: "up",
                    left: "right",
                    right: "left"
                },
                v = h.extend({
                    init: function(t, i) {
                        var r, a, s = this,
                            u = t.closest(".km-modalview-wrapper"),
                            g = t.closest(".km-root").children(".km-pane").first(),
                            v = u[0] ? u : g;
                        i.viewport ? g = i.viewport : g[0] || (g = window), i.container ? v = i.container : v[0] || (v = document.body), r = {
                            viewport: g,
                            copyAnchorStyles: !1,
                            autosize: !0,
                            open: function() {
                                s.overlay.show()
                            },
                            activate: e.proxy(s._activate, s),
                            deactivate: function() {
                                s.overlay.hide(), s._apiCall || s.trigger(o), s._apiCall = !1
                            }
                        }, h.fn.init.call(s, t, i), t = s.element, i = s.options, t.wrap(l).addClass("km-popup").show(), a = s.options.direction.match(/left|right/) ? "horizontal" : "vertical", s.dimensions = m[a], s.wrapper = t.parent().css({
                            width: i.width,
                            height: i.height
                        }).addClass("km-popup-wrapper km-" + i.direction).hide(), s.arrow = e(c).prependTo(s.wrapper).hide(), s.overlay = e(d).appendTo(v).hide(), r.appendTo = s.overlay, i.className && s.overlay.addClass(i.className), s.popup = new n.ui.Popup(s.wrapper, e.extend(!0, r, p, f[i.direction]))
                    },
                    options: {
                        name: "Popup",
                        width: 240,
                        height: "",
                        direction: "down",
                        container: null,
                        viewport: null
                    },
                    events: [o],
                    show: function(t) {
                        this.popup.options.anchor = e(t), this.popup.open()
                    },
                    hide: function() {
                        this._apiCall = !0, this.popup.close()
                    },
                    destroy: function() {
                        h.fn.destroy.call(this), this.popup.destroy(), this.overlay.remove()
                    },
                    target: function() {
                        return this.popup.options.anchor
                    },
                    _activate: function() {
                        var t = this,
                            n = t.options.direction,
                            i = t.dimensions,
                            r = i.offset,
                            o = t.popup,
                            a = o.options.anchor,
                            s = e(a).offset(),
                            l = e(o.element).offset(),
                            c = o.flipped ? g[n] : n,
                            d = 2 * t.arrow[i.size](),
                            h = t.element[i.size]() - t.arrow[i.size](),
                            f = e(a)[i.size](),
                            p = s[r] - l[r] + f / 2;
                        d > p && (p = d), p > h && (p = h), t.wrapper.removeClass(u).addClass("km-" + c), t.arrow.css(r, p).show()
                    }
                }),
                _ = h.extend({
                    init: function(t, i) {
                        var o, a = this;
                        a.initialOpen = !1, h.fn.init.call(a, t, i), o = e.extend({
                            className: "km-popover-root",
                            hide: function() {
                                a.trigger(s)
                            }
                        }, this.options.popup), a.popup = new v(a.element, o), a.popup.overlay.on("move", function(e) {
                            e.target == a.popup.overlay[0] && e.preventDefault()
                        }), a.pane = new r.Pane(a.element, e.extend(this.options.pane, {
                            $angular: this.options.$angular
                        })), n.notify(a, r)
                    },
                    options: {
                        name: "PopOver",
                        popup: {},
                        pane: {}
                    },
                    events: [a, s],
                    open: function(e) {
                        this.popup.show(e), this.initialOpen ? this.pane.view()._invokeNgController() : (this.pane.navigateToInitial() || this.pane.navigate(""), this.popup.popup._position(), this.initialOpen = !0)
                    },
                    openFor: function(e) {
                        this.open(e), this.trigger(a, {
                            target: this.popup.target()
                        })
                    },
                    close: function() {
                        this.popup.hide()
                    },
                    destroy: function() {
                        h.fn.destroy.call(this), this.pane.destroy(), this.popup.destroy(), n.destroy(this.element)
                    }
                });
            r.plugin(v), r.plugin(_)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.mobile.shim.min", ["kendo.popup.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.mobile.ui,
                r = n.ui.Popup,
                o = '<div class="km-shim"/>',
                a = "hide",
                s = i.Widget,
                l = s.extend({
                    init: function(t, i) {
                        var l = this,
                            c = n.mobile.application,
                            d = n.support.mobileOS,
                            u = c ? c.os.name : d ? d.name : "ios",
                            h = "ios" === u || "wp" === u || (c ? c.os.skin : !1),
                            f = "blackberry" === u,
                            p = i.align || (h ? "bottom center" : f ? "center right" : "center center"),
                            m = i.position || (h ? "bottom center" : f ? "center right" : "center center"),
                            g = i.effect || (h ? "slideIn:up" : f ? "slideIn:left" : "fade:in"),
                            v = e(o).handler(l).hide();
                        s.fn.init.call(l, t, i), l.shim = v, t = l.element, i = l.options, i.className && l.shim.addClass(i.className), i.modal || l.shim.on("down", "_hide"), (c ? c.element : e(document.body)).append(v), l.popup = new r(l.element, {
                            anchor: v,
                            modal: !0,
                            appendTo: v,
                            origin: p,
                            position: m,
                            animation: {
                                open: {
                                    effects: g,
                                    duration: i.duration
                                },
                                close: {
                                    duration: i.duration
                                }
                            },
                            close: function(e) {
                                var t = !1;
                                l._apiCall || (t = l.trigger(a)), t && e.preventDefault(), l._apiCall = !1
                            },
                            deactivate: function() {
                                v.hide()
                            },
                            open: function() {
                                v.show()
                            }
                        }), n.notify(l)
                    },
                    events: [a],
                    options: {
                        name: "Shim",
                        modal: !1,
                        align: t,
                        position: t,
                        effect: t,
                        duration: 200
                    },
                    show: function() {
                        this.popup.open()
                    },
                    hide: function() {
                        this._apiCall = !0, this.popup.close()
                    },
                    destroy: function() {
                        s.fn.destroy.call(this), this.shim.kendoDestroy(), this.popup.destroy(), this.shim.remove()
                    },
                    _hide: function(t) {
                        t && e.contains(this.shim.children().children(".k-popup")[0], t.target) || this.popup.close()
                    }
                });
            i.plugin(l)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.mobile.actionsheet.min", ["kendo.mobile.popover.min", "kendo.mobile.shim.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.support,
                r = n.mobile.ui,
                o = r.Shim,
                a = r.Popup,
                s = r.Widget,
                l = "open",
                c = "close",
                d = "command",
                u = "li>a",
                h = "actionsheetContext",
                f = '<div class="km-actionsheet-wrapper" />',
                p = n.template('<li class="km-actionsheet-cancel"><a href="\\#">#:cancel#</a></li>'),
                m = s.extend({
                    init: function(t, l) {
                        var c, d, h, m = this,
                            g = i.mobileOS;
                        s.fn.init.call(m, t, l), l = m.options, h = l.type, t = m.element, d = "auto" === h ? g && g.tablet : "tablet" === h, c = d ? a : o, l.cancelTemplate && (p = n.template(l.cancelTemplate)), t.addClass("km-actionsheet").append(p({
                            cancel: m.options.cancel
                        })).wrap(f).on("up", u, "_click").on("click", u, n.preventDefault), m.view().bind("destroy", function() {
                            m.destroy()
                        }), m.wrapper = t.parent().addClass(h ? " km-actionsheet-" + h : ""), m.shim = new c(m.wrapper, e.extend({
                            modal: g.ios && 7 > g.majorVersion,
                            className: "km-actionsheet-root"
                        }, m.options.popup)), m._closeProxy = e.proxy(m, "_close"), m._shimHideProxy = e.proxy(m, "_shimHide"), m.shim.bind("hide", m._shimHideProxy), d && n.onResize(m._closeProxy), n.notify(m, r)
                    },
                    events: [l, c, d],
                    options: {
                        name: "ActionSheet",
                        cancel: "Cancel",
                        type: "auto",
                        popup: {
                            height: "auto"
                        }
                    },
                    open: function(t, n) {
                        var i = this;
                        i.target = e(t), i.context = n, i.shim.show(t)
                    },
                    close: function() {
                        this.context = this.target = null, this.shim.hide()
                    },
                    openFor: function(e) {
                        var t = this,
                            n = e.data(h);
                        t.open(e, n), t.trigger(l, {
                            target: e,
                            context: n
                        })
                    },
                    destroy: function() {
                        s.fn.destroy.call(this), n.unbindResize(this._closeProxy), this.shim.destroy()
                    },
                    _click: function(t) {
                        var i, r, o, a;
                        t.isDefaultPrevented() || (i = e(t.currentTarget), r = i.data("action"), r && (o = {
                            target: this.target,
                            context: this.context
                        }, a = this.options.$angular, a ? this.element.injector().get("$parse")(r)(a[0])(o) : n.getter(r)(window)(o)), this.trigger(d, {
                            target: this.target,
                            context: this.context,
                            currentTarget: i
                        }), t.preventDefault(), this._close())
                    },
                    _shimHide: function(e) {
                        this.trigger(c) ? e.preventDefault() : this.context = this.target = null
                    },
                    _close: function(e) {
                        this.trigger(c) ? e.preventDefault() : this.close()
                    }
                });
            r.plugin(m)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.progressbar.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.ui,
                r = i.Widget,
                o = "horizontal",
                a = "vertical",
                s = 0,
                l = 100,
                c = 0,
                d = 5,
                u = "k-progressbar",
                h = "k-progressbar-reverse",
                f = "k-progressbar-indeterminate",
                p = "k-complete",
                m = "k-state-selected",
                g = "k-progress-status",
                v = "k-state-selected",
                _ = "k-state-default",
                b = "k-state-disabled",
                w = {
                    VALUE: "value",
                    PERCENT: "percent",
                    CHUNK: "chunk"
                },
                y = "change",
                k = "complete",
                x = "boolean",
                C = Math,
                S = e.extend,
                T = e.proxy,
                D = 100,
                A = 400,
                E = 3,
                F = {
                    progressStatus: "<span class='k-progress-status-wrap'><span class='k-progress-status'></span></span>"
                },
                I = r.extend({
                    init: function(e, t) {
                        var n = this;
                        r.fn.init.call(this, e, t), t = n.options, n._progressProperty = t.orientation === o ? "width" : "height", n._fields(), t.value = n._validateValue(t.value), n._validateType(t.type), n._wrapper(), n._progressAnimation(), t.value !== t.min && t.value !== !1 && n._updateProgress()
                    },
                    setOptions: function(e) {
                        var t = this;
                        r.fn.setOptions.call(t, e), e.hasOwnProperty("reverse") && t.wrapper.toggleClass("k-progressbar-reverse", e.reverse), e.hasOwnProperty("enable") && t.enable(e.enable), t._progressAnimation(), t._validateValue(), t._updateProgress()
                    },
                    events: [y, k],
                    options: {
                        name: "ProgressBar",
                        orientation: o,
                        reverse: !1,
                        min: s,
                        max: l,
                        value: c,
                        enable: !0,
                        type: w.VALUE,
                        chunkCount: d,
                        showStatus: !0,
                        animation: {}
                    },
                    _fields: function() {
                        var t = this;
                        t._isStarted = !1, t.progressWrapper = t.progressStatus = e()
                    },
                    _validateType: function(i) {
                        var r = !1;
                        if (e.each(w, function(e, n) {
                            return n === i ? (r = !0, !1) : t
                        }), !r) throw Error(n.format("Invalid ProgressBar type '{0}'", i))
                    },
                    _wrapper: function() {
                        var e, t = this,
                            n = t.wrapper = t.element,
                            i = t.options,
                            r = i.orientation;
                        n.addClass("k-widget " + u), n.addClass(u + "-" + (r === o ? o : a)), i.enable === !1 && n.addClass(b), i.reverse && n.addClass(h), i.value === !1 && n.addClass(f), i.type === w.CHUNK ? t._addChunkProgressWrapper() : i.showStatus && (t.progressStatus = t.wrapper.prepend(F.progressStatus).find("." + g), e = i.value !== !1 ? i.value : i.min, t.progressStatus.text(i.type === w.VALUE ? e : t._calculatePercentage(e).toFixed() + "%"))
                    },
                    value: function(e) {
                        return this._value(e)
                    },
                    _value: function(e) {
                        var n, i = this,
                            r = i.options;
                        return e === t ? r.value : (typeof e !== x ? (e = i._roundValue(e), isNaN(e) || (n = i._validateValue(e), n !== r.value && (i.wrapper.removeClass(f), r.value = n, i._isStarted = !0, i._updateProgress()))) : e || (i.wrapper.addClass(f), r.value = !1), t)
                    },
                    _roundValue: function(e) {
                        e = parseFloat(e);
                        var t = C.pow(10, E);
                        return C.floor(e * t) / t
                    },
                    _validateValue: function(e) {
                        var t = this,
                            n = t.options;
                        if (e !== !1) {
                            if (n.min >= e || e === !0) return n.min;
                            if (e >= n.max) return n.max
                        } else if (e === !1) return !1;
                        return isNaN(t._roundValue(e)) ? n.min : e
                    },
                    _updateProgress: function() {
                        var e = this,
                            t = e.options,
                            n = e._calculatePercentage();
                        t.type === w.CHUNK ? (e._updateChunks(n), e._onProgressUpdateAlways(t.value)) : e._updateProgressWrapper(n)
                    },
                    _updateChunks: function(e) {
                        var t, n = this,
                            i = n.options,
                            r = i.chunkCount,
                            s = parseInt(D / r * 100, 10) / 100,
                            l = parseInt(100 * e, 10) / 100,
                            c = C.floor(l / s);
                        t = n.wrapper.find(i.orientation === o && !i.reverse || i.orientation === a && i.reverse ? "li.k-item:lt(" + c + ")" : "li.k-item:gt(-" + (c + 1) + ")"), n.wrapper.find("." + v).removeClass(v).addClass(_), t.removeClass(_).addClass(v)
                    },
                    _updateProgressWrapper: function(e) {
                        var t = this,
                            n = t.options,
                            i = t.wrapper.find("." + m),
                            r = t._isStarted ? t._animation.duration : 0,
                            o = {};
                        0 === i.length && t._addRegularProgressWrapper(), o[t._progressProperty] = e + "%", t.progressWrapper.animate(o, {
                            duration: r,
                            start: T(t._onProgressAnimateStart, t),
                            progress: T(t._onProgressAnimate, t),
                            complete: T(t._onProgressAnimateComplete, t, n.value),
                            always: T(t._onProgressUpdateAlways, t, n.value)
                        })
                    },
                    _onProgressAnimateStart: function() {
                        this.progressWrapper.show()
                    },
                    _onProgressAnimate: function(e) {
                        var t, n = this,
                            i = n.options,
                            r = parseFloat(e.elem.style[n._progressProperty], 10);
                        i.showStatus && (t = 1e4 / parseFloat(n.progressWrapper[0].style[n._progressProperty]), n.progressWrapper.find(".k-progress-status-wrap").css(n._progressProperty, t + "%")), i.type !== w.CHUNK && 98 >= r && n.progressWrapper.removeClass(p)
                    },
                    _onProgressAnimateComplete: function(e) {
                        var t, n = this,
                            i = n.options,
                            r = parseFloat(n.progressWrapper[0].style[n._progressProperty]);
                        i.type !== w.CHUNK && r > 98 && n.progressWrapper.addClass(p), i.showStatus && (t = i.type === w.VALUE ? e : i.type == w.PERCENT ? n._calculatePercentage(e).toFixed() + "%" : C.floor(n._calculatePercentage(e)) + "%", n.progressStatus.text(t)), e === i.min && n.progressWrapper.hide()
                    },
                    _onProgressUpdateAlways: function(e) {
                        var t = this,
                            n = t.options;
                        t._isStarted && t.trigger(y, {
                            value: e
                        }), e === n.max && t._isStarted && t.trigger(k, {
                            value: n.max
                        })
                    },
                    enable: function(e) {
                        var n = this,
                            i = n.options;
                        i.enable = t === e ? !0 : e, n.wrapper.toggleClass(b, !i.enable)
                    },
                    destroy: function() {
                        var e = this;
                        r.fn.destroy.call(e)
                    },
                    _addChunkProgressWrapper: function() {
                        var e, t = this,
                            n = t.options,
                            i = t.wrapper,
                            r = D / n.chunkCount,
                            o = "";
                        for (1 >= n.chunkCount && (n.chunkCount = 1), o += "<ul class='k-reset'>", e = n.chunkCount - 1; e >= 0; e--) o += "<li class='k-item k-state-default'></li>";
                        o += "</ul>", i.append(o).find(".k-item").css(t._progressProperty, r + "%").first().addClass("k-first").end().last().addClass("k-last"), t._normalizeChunkSize()
                    },
                    _normalizeChunkSize: function() {
                        var e = this,
                            t = e.options,
                            n = e.wrapper.find(".k-item:last"),
                            i = parseFloat(n[0].style[e._progressProperty]),
                            r = D - t.chunkCount * i;
                        r > 0 && n.css(e._progressProperty, i + r + "%")
                    },
                    _addRegularProgressWrapper: function() {
                        var t = this;
                        t.progressWrapper = e("<div class='" + m + "'></div>").appendTo(t.wrapper), t.options.showStatus && (t.progressWrapper.append(F.progressStatus), t.progressStatus = t.wrapper.find("." + g))
                    },
                    _calculateChunkSize: function() {
                        var e = this,
                            t = e.options.chunkCount,
                            n = e.wrapper.find("ul.k-reset");
                        return (parseInt(n.css(e._progressProperty), 10) - (t - 1)) / t
                    },
                    _calculatePercentage: function(e) {
                        var n = this,
                            i = n.options,
                            r = e !== t ? e : i.value,
                            o = i.min,
                            a = i.max;
                        return n._onePercent = C.abs((a - o) / 100), C.abs((r - o) / n._onePercent)
                    },
                    _progressAnimation: function() {
                        var e = this,
                            t = e.options,
                            n = t.animation;
                        e._animation = n === !1 ? {
                            duration: 0
                        } : S({
                            duration: A
                        }, t.animation)
                    }
                });
            n.ui.plugin(I)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("pdf/core.min", ["kendo.core.min", "util/main.min"], e)
    }(function() {
        ! function(e, t, n) {
            "use strict";

            function i() {
                function e() {
                    var t, r, o;
                    for (t = 0; t < arguments.length; ++t) {
                        if (r = arguments[t], r === n) throw Error("Cannot output undefined to PDF");
                        if (r instanceof y) r.beforeRender(e), r.render(e);
                        else if (V(r)) m(r, e);
                        else if (p(r)) g(r, e);
                        else if ("number" == typeof r) {
                            if (isNaN(r)) throw Error("Cannot output NaN to PDF");
                            o = r.toFixed(7), o.indexOf(".") >= 0 && (o = o.replace(/\.?0+$/, "")), "-0" == o && (o = "0"), i.writeString(o)
                        } else /string|boolean/.test(typeof r) ? i.writeString(r + "") : "function" == typeof r.get ? i.write(r.get()) : "object" == typeof r && (r ? e(new G(r)) : i.writeString("null"))
                    }
                }
                var t = 0,
                    i = R();
                return e.writeData = function(e) {
                    i.write(e)
                }, e.withIndent = function(n) {
                    ++t, n(e), --t
                }, e.indent = function() {
                    e(ie, u("", 2 * t, "  ")), e.apply(null, arguments)
                }, e.offset = function() {
                    return i.offset()
                }, e.toString = function() {
                    throw Error("FIX CALLER")
                }, e.get = function() {
                    return i.get()
                }, e.stream = function() {
                    return i
                }, e
            }

            function r(e, t) {
                var n = e.beforeRender,
                    i = e.render;
                e.beforeRender = function() {}, e.render = function(e) {
                    e(t, " 0 R")
                }, e.renderFull = function(r) {
                    e._offset = r.offset(), r(t, " 0 obj "), n.call(e, r), i.call(e, r), r(" endobj")
                }
            }

            function o(e) {
                var t, n, i;
                if ("function" != typeof e && (t = e, e = function(e, n) {
                    return e in t ? t[e] : n
                }), n = e("paperSize", ae.a4), !n) return {};
                if ("string" == typeof n && (n = ae[n.toLowerCase()], null == n)) throw Error("Unknown paper size");
                return n[0] = w(n[0]), n[1] = w(n[1]), e("landscape", !1) && (n = [Math.max(n[0], n[1]), Math.min(n[0], n[1])]), i = e("margin"), i && ("string" == typeof i || "number" == typeof i ? (i = w(i, 0), i = {
                    left: i,
                    top: i,
                    right: i,
                    bottom: i
                }) : i = {
                    left: w(i.left, 0),
                    top: w(i.top, 0),
                    right: w(i.right, 0),
                    bottom: w(i.bottom, 0)
                }, e("addMargin") && (n[0] += i.left + i.right, n[1] += i.top + i.bottom)), {
                    paperSize: n,
                    margin: i
                }
            }

            function a(e) {
                function t(t, n) {
                    return e && null != e[t] ? e[t] : n
                }
                var n, a, s = this,
                    l = i(),
                    c = 0,
                    d = [];
                s.getOption = t, s.attach = function(e) {
                    return d.indexOf(e) < 0 && (r(e, ++c), d.push(e)), e
                }, s.pages = [], s.FONTS = {}, s.IMAGES = {}, s.GRAD_COL_FUNCTIONS = {}, s.GRAD_OPC_FUNCTIONS = {}, s.GRAD_COL = {}, s.GRAD_OPC = {}, n = s.attach(new Y), a = s.attach(new K), n.setPages(a), s.addPage = function(e) {
                    var t, n, r, l = o(function(t, n) {
                            return e && null != e[t] ? e[t] : n
                        }),
                        c = l.paperSize,
                        d = l.margin,
                        u = c[0],
                        h = c[1];
                    return d && (u -= d.left + d.right, h -= d.top + d.bottom), t = new $(i(), null, !0), n = {
                        Contents: s.attach(t),
                        Parent: a,
                        MediaBox: [0, 0, c[0], c[1]]
                    }, r = new Z(s, n), r._content = t, a.addPage(s.attach(r)), r.transform(1, 0, 0, -1, 0, c[1]), d && (r.translate(d.left, d.top), r.rect(0, 0, u, h), r.clip()), s.pages.push(r), r
                }, s.render = function() {
                    var e, i;
                    for (l("%PDF-1.4", ie, "%ÂÁÚÏÎ", ie, ie), e = 0; d.length > e; ++e) d[e].renderFull(l), l(ie, ie);
                    for (i = l.offset(), l("xref", ie, 0, " ", d.length + 1, ie), l("0000000000 65535 f ", ie), e = 0; d.length > e; ++e) l(h(d[e]._offset, 10), " 00000 n ", ie);
                    return l(ie), l("trailer", ie), l(new G({
                        Size: d.length + 1,
                        Root: n,
                        Info: new G({
                            Producer: new U(t("producer", "Kendo UI PDF Generator v." + te.version)),
                            Title: new U(t("title", "")),
                            Author: new U(t("author", "")),
                            Subject: new U(t("subject", "")),
                            Keywords: new U(t("keywords", "")),
                            Creator: new U(t("creator", "Kendo UI PDF Generator v." + te.version)),
                            CreationDate: t("date", new Date)
                        })
                    }), ie, ie), l("startxref", ie, i, ie), l("%%EOF", ie), l.stream().offset(0)
                }
            }

            function s(t, n) {
                function i() {
                    e.console && (e.console.error ? e.console.error("Cannot load URL: %s", t) : e.console.log("Cannot load URL: %s", t)), n(null)
                }
                var r = new XMLHttpRequest;
                r.open("GET", t, !0), ne && (r.responseType = "arraybuffer"), r.onload = function() {
                    200 == r.status || 304 == r.status ? n(ne ? new Uint8Array(r.response) : new VBArray(r.responseBody).toArray()) : i()
                }, r.onerror = i, r.send(null)
            }

            function l(e, t) {
                var n = se[e];
                n ? t(n) : s(e, function(n) {
                    if (null == n) throw Error("Cannot load font from " + e);
                    var i = new te.pdf.TTFFont(n);
                    se[e] = i, t(i)
                })
            }

            function c(e, t) {
                function i(e) {
                    c.src = e, c.complete && !te.support.browser.msie ? o() : (c.onload = o, c.onerror = r)
                }

                function r() {
                    t(le[e] = "TAINTED")
                }

                function o() {
                    var i, o, l, d, u, h, f, p, m, g, v, _;
                    if (s && /^image\/jpe?g$/i.test(s.type)) return i = new FileReader, i.onload = function() {
                        c = new C(c.width, c.height, R(new Uint8Array(this.result))), URL.revokeObjectURL(a), t(le[e] = c)
                    }, i.readAsArrayBuffer(s), n;
                    o = document.createElement("canvas"), o.width = c.width, o.height = c.height, l = o.getContext("2d"), l.drawImage(c, 0, 0);
                    try {
                        d = l.getImageData(0, 0, c.width, c.height)
                    } catch (b) {
                        return r()
                    } finally {
                        a && URL.revokeObjectURL(a)
                    }
                    for (u = !1, h = R(), f = R(), p = d.data, m = 0; p.length > m;) h.writeByte(p[m++]), h.writeByte(p[m++]), h.writeByte(p[m++]), g = p[m++], 255 > g && (u = !0), f.writeByte(g);
                    u ? c = new S(c.width, c.height, h, f) : (v = o.toDataURL("image/jpeg"), v = v.substr(v.indexOf(";base64,") + 8), _ = R(), _.writeBase64(v), _.offset(0), c = new C(c.width, c.height, _)), t(le[e] = c)
                }
                var a, s, l, c = le[e];
                c ? t(c) : (c = new Image, /^data:/i.test(e) || (c.crossOrigin = "Anonymous"), ne && !/^data:/i.test(e) ? (l = new XMLHttpRequest, l.onload = function() {
                    s = l.response, a = URL.createObjectURL(s), i(a)
                }, l.onerror = r, l.open("GET", e, !0), l.responseType = "blob", l.send()) : i(e))
            }

            function d(e) {
                return function(t, n) {
                    var i = t.length,
                        r = i;
                    if (0 === i) return n();
                    for (; r-- > 0;) e(t[r], function() {
                        0 === --i && n()
                    })
                }
            }

            function u(e, t, n) {
                for (; t > e.length;) e = n + e;
                return e
            }

            function h(e, t) {
                return u(e + "", t, "0")
            }

            function f(e, t) {
                return Object.prototype.hasOwnProperty.call(e, t)
            }

            function p(e) {
                return e instanceof Date
            }

            function m(e, t) {
                t("["), e.length > 0 && t.withIndent(function() {
                    for (var n = 0; e.length > n; ++n) n > 0 && n % 8 === 0 ? t.indent(e[n]) : t(" ", e[n])
                }), t(" ]")
            }

            function g(e, t) {
                t("(D:", h(e.getUTCFullYear(), 4), h(e.getUTCMonth() + 1, 2), h(e.getUTCDate(), 2), h(e.getUTCHours(), 2), h(e.getUTCMinutes(), 2), h(e.getUTCSeconds(), 2), "Z)")
            }

            function v(e) {
                return e * (72 / 25.4)
            }

            function _(e) {
                return v(10 * e)
            }

            function b(e) {
                return 72 * e
            }

            function w(e, n) {
                var i, r;
                if ("number" == typeof e) return e;
                if ("string" == typeof e && (i = /^\s*([0-9.]+)\s*(mm|cm|in|pt)\s*$/.exec(e), i && (r = t(i[1]), !isNaN(r)))) return "pt" == i[2] ? r : {
                    mm: v,
                    cm: _,
                    "in": b
                } [i[2]](r);
                if (null != n) return n;
                throw Error("Can't parse unit: " + e)
            }

            function y() {}

            function k(e, t, n) {
                n || (n = y), e.prototype = new n;
                for (var i in t) f(t, i) && (e.prototype[i] = t[i]);
                return e
            }

            function x(e) {
                return f(q, e) ? q[e] : q[e] = new j(e)
            }

            function C(e, t, n) {
                this.asStream = function() {
                    var i = new $(n, {
                        Type: x("XObject"),
                        Subtype: x("Image"),
                        Width: e,
                        Height: t,
                        BitsPerComponent: 8,
                        ColorSpace: x("DeviceRGB"),
                        Filter: x("DCTDecode")
                    });
                    return i._resourceName = x("I" + ++re), i
                }
            }

            function S(e, t, n, i) {
                this.asStream = function(r) {
                    var o = new $(i, {
                            Type: x("XObject"),
                            Subtype: x("Image"),
                            Width: e,
                            Height: t,
                            BitsPerComponent: 8,
                            ColorSpace: x("DeviceGray")
                        }, !0),
                        a = new $(n, {
                            Type: x("XObject"),
                            Subtype: x("Image"),
                            Width: e,
                            Height: t,
                            BitsPerComponent: 8,
                            ColorSpace: x("DeviceRGB"),
                            SMask: r.attach(o)
                        }, !0);
                    return a._resourceName = x("I" + ++re), a
                }
            }

            function T(e) {
                return e.map(function(e) {
                    return V(e) ? T(e) : "number" == typeof e ? (Math.round(1e3 * e) / 1e3).toFixed(3) : e
                }).join(" ")
            }

            function D(e, t, n, i, r, o, a) {
                var s = T([t, n, i, r, o, a]),
                    l = e.GRAD_COL_FUNCTIONS[s];
                return l || (l = e.GRAD_COL_FUNCTIONS[s] = e.attach(new G({
                    FunctionType: 2,
                    Domain: [0, 1],
                    Range: [0, 1, 0, 1, 0, 1],
                    N: 1,
                    C0: [t, n, i],
                    C1: [r, o, a]
                }))), l
            }

            function A(e, t, n) {
                var i = T([t, n]),
                    r = e.GRAD_OPC_FUNCTIONS[i];
                return r || (r = e.GRAD_OPC_FUNCTIONS[i] = e.attach(new G({
                    FunctionType: 2,
                    Domain: [0, 1],
                    Range: [0, 1],
                    N: 1,
                    C0: [t],
                    C1: [n]
                }))), r
            }

            function E(e, t) {
                function n(e) {
                    return 1 == e.length ? e[0] : {
                        FunctionType: 3,
                        Functions: e,
                        Domain: [0, 1],
                        Bounds: u,
                        Encode: h
                    }
                }
                var i, r, o, a, s, l = !1,
                    c = [],
                    d = [],
                    u = [],
                    h = [];
                for (i = 1; t.length > i; ++i) r = t[i - 1], o = t[i], a = r.color, s = o.color, d.push(D(e, a.r, a.g, a.b, s.r, s.g, s.b)), (1 > a.a || 1 > s.a) && (l = !0), u.push(o.offset), h.push(0, 1);
                if (l)
                    for (i = 1; t.length > i; ++i) r = t[i - 1], o = t[i], a = r.color, s = o.color, c.push(A(e, a.a, s.a));
                return u.pop(), {
                    hasAlpha: l,
                    colors: n(d),
                    opacities: l ? n(c) : null
                }
            }

            function F(e, t, n, i, r, o) {
                var a, s, l;
                return o || (l = [t].concat(i), n.forEach(function(e) {
                    l.push(e.offset, e.color.r, e.color.g, e.color.b)
                }), s = T(l), a = e.GRAD_COL[s]), a || (a = new G({
                    Type: x("Shading"),
                    ShadingType: t ? 3 : 2,
                    ColorSpace: x("DeviceRGB"),
                    Coords: i,
                    Domain: [0, 1],
                    Function: r,
                    Extend: [!0, !0]
                }), e.attach(a), a._resourceName = "S" + ++re, s && (e.GRAD_COL[s] = a)), a
            }

            function I(e, t, n, i, r, o) {
                var a, s, l;
                return o || (l = [t].concat(i), n.forEach(function(e) {
                    l.push(e.offset, e.color.a)
                }), s = T(l), a = e.GRAD_OPC[s]), a || (a = new G({
                    Type: x("ExtGState"),
                    AIS: !1,
                    CA: 1,
                    ca: 1,
                    SMask: {
                        Type: x("Mask"),
                        S: x("Luminosity"),
                        G: e.attach(new $("/a0 gs /s0 sh", {
                            Type: x("XObject"),
                            Subtype: x("Form"),
                            FormType: 1,
                            BBox: o ? [o.left, o.top + o.height, o.left + o.width, o.top] : [0, 1, 1, 0],
                            Group: {
                                Type: x("Group"),
                                S: x("Transparency"),
                                CS: x("DeviceGray"),
                                I: !0
                            },
                            Resources: {
                                ExtGState: {
                                    a0: {
                                        CA: 1,
                                        ca: 1
                                    }
                                },
                                Shading: {
                                    s0: {
                                        ColorSpace: x("DeviceGray"),
                                        Coords: i,
                                        Domain: [0, 1],
                                        ShadingType: t ? 3 : 2,
                                        Function: r,
                                        Extend: [!0, !0]
                                    }
                                }
                            }
                        }))
                    }
                }), e.attach(a), a._resourceName = "O" + ++re, s && (e.GRAD_OPC[s] = a)), a
            }

            function M(e, t, n) {
                var i = "radial" == t.type,
                    r = E(e, t.stops),
                    o = i ? [t.start.x, t.start.y, t.start.r, t.end.x, t.end.y, t.end.r] : [t.start.x, t.start.y, t.end.x, t.end.y],
                    a = F(e, i, t.stops, o, r.colors, t.userSpace && n),
                    s = r.hasAlpha ? I(e, i, t.stops, o, r.opacities, t.userSpace && n) : null;
                return {
                    hasAlpha: r.hasAlpha,
                    shading: a,
                    opacity: s
                }
            }

            function R(t) {
                function n() {
                    return T >= D
                }

                function i() {
                    return D > T ? t[T++] : 0
                }

                function r(e) {
                    y(T), t[T++] = 255 & e, T > D && (D = T)
                }

                function o() {
                    return i() << 8 | i()
                }

                function a(e) {
                    r(e >> 8), r(e)
                }

                function s() {
                    var e = o();
                    return e >= 32768 ? e - 65536 : e
                }

                function l(e) {
                    a(0 > e ? e + 65536 : e)
                }

                function c() {
                    return 65536 * o() + o()
                }

                function d(e) {
                    a(e >>> 16 & 65535), a(65535 & e)
                }

                function u() {
                    var e = c();
                    return e >= 2147483648 ? e - 4294967296 : e
                }

                function h(e) {
                    d(0 > e ? e + 4294967296 : e)
                }

                function f() {
                    return c() / 65536
                }

                function p(e) {
                    d(Math.round(65536 * e))
                }

                function m() {
                    return u() / 65536
                }

                function g(e) {
                    h(Math.round(65536 * e))
                }

                function v(e) {
                    return w(e, i)
                }

                function _(e) {
                    return String.fromCharCode.apply(String, v(e))
                }

                function b(e) {
                    for (var t = 0; e.length > t; ++t) r(e.charCodeAt(t))
                }

                function w(e, t) {
                    for (var n = Array(e), i = 0; e > i; ++i) n[i] = t();
                    return n
                }
                var y, k, x, C, S, T = 0,
                    D = 0;
                return null == t ? t = ne ? new Uint8Array(256) : [] : D = t.length, y = ne ? function(e) {
                    if (e >= t.length) {
                        var n = new Uint8Array(Math.max(e + 256, 2 * t.length));
                        n.set(t, 0), t = n
                    }
                } : function() {}, k = ne ? function() {
                    return new Uint8Array(t.buffer, 0, D)
                } : function() {
                    return t
                }, x = ne ? function(e) {
                    if ("string" == typeof e) return b(e);
                    var n = e.length;
                    y(T + n), t.set(e, T), T += n, T > D && (D = T)
                } : function(e) {
                    if ("string" == typeof e) return b(e);
                    for (var t = 0; e.length > t; ++t) r(e[t])
                }, C = ne ? function(e, n) {
                    if (t.buffer.slice) return new Uint8Array(t.buffer.slice(e, e + n));
                    var i = new Uint8Array(n);
                    return i.set(new Uint8Array(t.buffer, e, n)), i
                } : function(e, n) {
                    return t.slice(e, e + n)
                }, S = {
                    eof: n,
                    readByte: i,
                    writeByte: r,
                    readShort: o,
                    writeShort: a,
                    readLong: c,
                    writeLong: d,
                    readFixed: f,
                    writeFixed: p,
                    readShort_: s,
                    writeShort_: l,
                    readLong_: u,
                    writeLong_: h,
                    readFixed_: m,
                    writeFixed_: g,
                    read: v,
                    write: x,
                    readString: _,
                    writeString: b,
                    times: w,
                    get: k,
                    slice: C,
                    offset: function(e) {
                        return null != e ? (T = e, S) : T
                    },
                    skip: function(e) {
                        T += e
                    },
                    toString: function() {
                        throw Error("FIX CALLER.  BinaryStream is no longer convertible to string!")
                    },
                    length: function() {
                        return D
                    },
                    saveExcursion: function(e) {
                        var t = T;
                        try {
                            return e()
                        } finally {
                            T = t
                        }
                    },
                    writeBase64: function(t) {
                        e.atob ? b(e.atob(t)) : x(oe.decode(t))
                    },
                    base64: function() {
                        return oe.encode(k())
                    }
                }
            }

            function P(e) {
                return e.replace(/^\s*(['"])(.*)\1\s*$/, "$2")
            }

            function z(e) {
                var t, n = /^\s*((normal|italic)\s+)?((normal|small-caps)\s+)?((normal|bold|\d+)\s+)?(([0-9.]+)(px|pt))(\/(([0-9.]+)(px|pt)|normal))?\s+(.*?)\s*$/i,
                    i = n.exec(e);
                return i ? (t = i[8] ? parseInt(i[8], 10) : 12, {
                    italic: i[2] && "italic" == i[2].toLowerCase(),
                    variant: i[4],
                    bold: i[6] && /bold|700/i.test(i[6]),
                    fontSize: t,
                    lineHeight: i[12] ? "normal" == i[12] ? t : parseInt(i[12], 10) : null,
                    fontFamily: i[14].split(/\s*,\s*/g).map(P)
                }) : {
                    fontSize: 12,
                    fontFamily: "sans-serif"
                }
            }

            function B(e) {
                function t(t) {
                    return e.bold && (t += "|bold"), e.italic && (t += "|italic"), t.toLowerCase()
                }
                var n, i, r, o = e.fontFamily;
                if (o instanceof Array)
                    for (r = 0; o.length > r && (n = t(o[r]), !(i = ee[n])); ++r);
                else i = ee[o.toLowerCase()];
                for (;
                    "function" == typeof i;) i = i();
                return i || (i = "Times-Roman"), i
            }

            function L(e, t) {
                e = e.toLowerCase(), ee[e] = function() {
                    return ee[t]
                }, ee[e + "|bold"] = function() {
                    return ee[t + "|bold"]
                }, ee[e + "|italic"] = function() {
                    return ee[t + "|italic"]
                }, ee[e + "|bold|italic"] = function() {
                    return ee[t + "|bold|italic"]
                }
            }

            function H(e, t) {
                if (1 == arguments.length)
                    for (var n in e) f(e, n) && H(n, e[n]);
                else switch (e = e.toLowerCase(), ee[e] = t, e) {
                    case "dejavu sans":
                        ee["sans-serif"] = t;
                        break;
                    case "dejavu sans|bold":
                        ee["sans-serif|bold"] = t;
                        break;
                    case "dejavu sans|italic":
                        ee["sans-serif|italic"] = t;
                        break;
                    case "dejavu sans|bold|italic":
                        ee["sans-serif|bold|italic"] = t;
                        break;
                    case "dejavu serif":
                        ee.serif = t;
                        break;
                    case "dejavu serif|bold":
                        ee["serif|bold"] = t;
                        break;
                    case "dejavu serif|italic":
                        ee["serif|italic"] = t;
                        break;
                    case "dejavu serif|bold|italic":
                        ee["serif|bold|italic"] = t;
                        break;
                    case "dejavu mono":
                        ee.monospace = t;
                        break;
                    case "dejavu mono|bold":
                        ee["monospace|bold"] = t;
                        break;
                    case "dejavu mono|italic":
                        ee["monospace|italic"] = t;
                        break;
                    case "dejavu mono|bold|italic":
                        ee["monospace|bold|italic"] = t
                }
            }

            function N(e, t) {
                var n = e[0],
                    i = e[1],
                    r = e[2],
                    o = e[3],
                    a = e[4],
                    s = e[5],
                    l = t[0],
                    c = t[1],
                    d = t[2],
                    u = t[3],
                    h = t[4],
                    f = t[5];
                return [n * l + i * d, n * c + i * u, r * l + o * d, r * c + o * u, a * l + s * d + h, a * c + s * u + f]
            }

            function O(e) {
                return 1 === e[0] && 0 === e[1] && 0 === e[2] && 1 === e[3] && 0 === e[4] && 0 === e[5]
            }
            var V, U, W, j, q, G, $, Y, K, Q, X, J, Z, ee, te = e.kendo,
                ne = !!e.Uint8Array,
                ie = "\n",
                re = 0,
                oe = function() {
                    var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
                    return {
                        decode: function(t) {
                            for (var n, i, r, o, a, s, l, c = t.replace(/[^A-Za-z0-9\+\/\=]/g, ""), d = 0, u = c.length, h = []; u > d;) n = e.indexOf(c.charAt(d++)), i = e.indexOf(c.charAt(d++)), r = e.indexOf(c.charAt(d++)), o = e.indexOf(c.charAt(d++)), a = n << 2 | i >>> 4, s = (15 & i) << 4 | r >>> 2, l = (3 & r) << 6 | o, h.push(a), 64 != r && h.push(s), 64 != o && h.push(l);
                            return h
                        },
                        encode: function(t) {
                            for (var n, i, r, o, a, s, l, c = 0, d = t.length, u = ""; d > c;) n = t[c++], i = t[c++], r = t[c++], o = n >>> 2, a = (3 & n) << 4 | i >>> 4, s = (15 & i) << 2 | r >>> 6, l = 63 & r, c - d == 2 ? s = l = 64 : c - d == 1 && (l = 64), u += e.charAt(o) + e.charAt(a) + e.charAt(s) + e.charAt(l);
                            return u
                        }
                    }
                }(),
                ae = {
                    a0: [2383.94, 3370.39],
                    a1: [1683.78, 2383.94],
                    a2: [1190.55, 1683.78],
                    a3: [841.89, 1190.55],
                    a4: [595.28, 841.89],
                    a5: [419.53, 595.28],
                    a6: [297.64, 419.53],
                    a7: [209.76, 297.64],
                    a8: [147.4, 209.76],
                    a9: [104.88, 147.4],
                    a10: [73.7, 104.88],
                    b0: [2834.65, 4008.19],
                    b1: [2004.09, 2834.65],
                    b2: [1417.32, 2004.09],
                    b3: [1000.63, 1417.32],
                    b4: [708.66, 1000.63],
                    b5: [498.9, 708.66],
                    b6: [354.33, 498.9],
                    b7: [249.45, 354.33],
                    b8: [175.75, 249.45],
                    b9: [124.72, 175.75],
                    b10: [87.87, 124.72],
                    c0: [2599.37, 3676.54],
                    c1: [1836.85, 2599.37],
                    c2: [1298.27, 1836.85],
                    c3: [918.43, 1298.27],
                    c4: [649.13, 918.43],
                    c5: [459.21, 649.13],
                    c6: [323.15, 459.21],
                    c7: [229.61, 323.15],
                    c8: [161.57, 229.61],
                    c9: [113.39, 161.57],
                    c10: [79.37, 113.39],
                    executive: [521.86, 756],
                    folio: [612, 936],
                    legal: [612, 1008],
                    letter: [612, 792],
                    tabloid: [792, 1224]
                },
                se = {
                    "Times-Roman": !0,
                    "Times-Bold": !0,
                    "Times-Italic": !0,
                    "Times-BoldItalic": !0,
                    Helvetica: !0,
                    "Helvetica-Bold": !0,
                    "Helvetica-Oblique": !0,
                    "Helvetica-BoldOblique": !0,
                    Courier: !0,
                    "Courier-Bold": !0,
                    "Courier-Oblique": !0,
                    "Courier-BoldOblique": !0,
                    Symbol: !0,
                    ZapfDingbats: !0
                },
                le = {},
                ce = d(l),
                de = d(c);
            a.prototype = {
                loadFonts: ce,
                loadImages: de,
                getFont: function(e) {
                    var t = this.FONTS[e];
                    if (!t) {
                        if (t = se[e], !t) throw Error("Font " + e + " has not been loaded");
                        t = this.attach(t === !0 ? new Q(e) : new X(this, t)), this.FONTS[e] = t
                    }
                    return t
                },
                getImage: function(e) {
                    var t = this.IMAGES[e];
                    if (!t) {
                        if (t = le[e], !t) throw Error("Image " + e + " has not been loaded");
                        if ("TAINTED" === t) return null;
                        t = this.IMAGES[e] = this.attach(t.asStream(this))
                    }
                    return t
                },
                getOpacityGS: function(e, n) {
                    var i, r, o, a = t(e).toFixed(3);
                    return e = t(a), a += n ? "S" : "F", i = this._opacityGSCache || (this._opacityGSCache = {}), r = i[a], r || (o = {
                        Type: x("ExtGState")
                    }, n ? o.CA = e : o.ca = e, r = this.attach(new G(o)), r._resourceName = x("GS" + ++re), i[a] = r), r
                },
                dict: function(e) {
                    return new G(e)
                },
                name: function(e) {
                    return x(e)
                },
                stream: function(e, t) {
                    return new $(t, e)
                }
            }, V = Array.isArray || function(e) {
                return e instanceof Array
            }, y.prototype.beforeRender = function() {}, U = k(function(e) {
                this.value = e
            }, {
                render: function(e) {
                    var t, n = "",
                        i = this.escape();
                    for (t = 0; i.length > t; ++t) n += String.fromCharCode(255 & i.charCodeAt(t));
                    e("(", n, ")")
                },
                escape: function() {
                    return this.value.replace(/([\(\)\\])/g, "\\$1")
                },
                toString: function() {
                    return this.value
                }
            }), W = k(function(e) {
                this.value = e
            }, {
                render: function(e) {
                    e("<");
                    for (var t = 0; this.value.length > t; ++t) e(h(this.value.charCodeAt(t).toString(16), 4));
                    e(">")
                }
            }, U), j = k(function(e) {
                this.name = e
            }, {
                render: function(e) {
                    e("/" + this.escape())
                },
                escape: function() {
                    return this.name.replace(/[^\x21-\x7E]/g, function(e) {
                        return "#" + h(e.charCodeAt(0).toString(16), 2)
                    })
                },
                toString: function() {
                    return this.name
                }
            }), q = {}, j.get = x, G = k(function(e) {
                this.props = e
            }, {
                render: function(e) {
                    var t = this.props,
                        n = !0;
                    e("<<"), e.withIndent(function() {
                        for (var i in t) f(t, i) && !/^_/.test(i) && (n = !1, e.indent(x(i), " ", t[i]))
                    }), n || e.indent(), e(">>")
                }
            }), $ = k(function(e, t, n) {
                if ("string" == typeof e) {
                    var i = R();
                    i.write(e), e = i
                }
                this.data = e, this.props = t || {}, this.compress = n
            }, {
                render: function(t) {
                    var n = this.data.get(),
                        i = this.props;
                    this.compress && e.pako && "function" == typeof e.pako.deflate && (i.Filter ? i.Filter instanceof Array || (i.Filter = [i.Filter]) : i.Filter = [], i.Filter.unshift(x("FlateDecode")), n = e.pako.deflate(n)), i.Length = n.length, t(new G(i), " stream", ie), t.writeData(n), t(ie, "endstream")
                }
            }), Y = k(function(e) {
                e = this.props = e || {}, e.Type = x("Catalog")
            }, {
                setPages: function(e) {
                    this.props.Pages = e
                }
            }, G), K = k(function() {
                this.props = {
                    Type: x("Pages"),
                    Kids: [],
                    Count: 0
                }
            }, {
                addPage: function(e) {
                    this.props.Kids.push(e), this.props.Count++
                }
            }, G), Q = k(function(e) {
                this.props = {
                    Type: x("Font"),
                    Subtype: x("Type1"),
                    BaseFont: x(e)
                }, this._resourceName = x("F" + ++re)
            }, {
                encodeText: function(e) {
                    return new U(e + "")
                }
            }, G), X = k(function(e, t, n) {
                var i, r;
                n = this.props = n || {}, n.Type = x("Font"), n.Subtype = x("Type0"), n.Encoding = x("Identity-H"), this._pdf = e, this._font = t, this._sub = t.makeSubset(), this._resourceName = x("F" + ++re), i = t.head, this.name = t.psName, r = this.scale = t.scale, this.bbox = [i.xMin * r, i.yMin * r, i.xMax * r, i.yMax * r], this.italicAngle = t.post.italicAngle, this.ascent = t.ascent * r, this.descent = t.descent * r, this.lineGap = t.lineGap * r, this.capHeight = t.os2.capHeight || this.ascent, this.xHeight = t.os2.xHeight || 0, this.stemV = 0, this.familyClass = (t.os2.familyClass || 0) >> 8, this.isSerif = this.familyClass >= 1 && 7 >= this.familyClass, this.isScript = 10 == this.familyClass, this.flags = (t.post.isFixedPitch ? 1 : 0) | (this.isSerif ? 2 : 0) | (this.isScript ? 8 : 0) | (0 !== this.italicAngle ? 64 : 0) | 32
            }, {
                encodeText: function(e) {
                    return new W(this._sub.encodeText(e + ""))
                },
                getTextWidth: function(e, t) {
                    var n, i, r = 0,
                        o = this._font.cmap.codeMap;
                    for (n = 0; t.length > n; ++n) i = o[t.charCodeAt(n)], r += this._font.widthOfGlyph(i || 0);
                    return r * e / 1e3
                },
                beforeRender: function() {
                    var e, t, n, r, o = this,
                        a = o._sub,
                        s = a.render(),
                        l = new $(R(s), {
                            Length1: s.length
                        }, !0),
                        c = o._pdf.attach(new G({
                            Type: x("FontDescriptor"),
                            FontName: x(o._sub.psName),
                            FontBBox: o.bbox,
                            Flags: o.flags,
                            StemV: o.stemV,
                            ItalicAngle: o.italicAngle,
                            Ascent: o.ascent,
                            Descent: o.descent,
                            CapHeight: o.capHeight,
                            XHeight: o.xHeight,
                            FontFile2: o._pdf.attach(l)
                        })),
                        d = a.ncid2ogid,
                        u = a.firstChar,
                        h = a.lastChar,
                        f = [];
                    ! function p(e, t) {
                        if (h >= e) {
                            var n = d[e];
                            null == n ? p(e + 1) : (t || f.push(e, t = []), t.push(o._font.widthOfGlyph(n)), p(e + 1, t))
                        }
                    }(u), e = new G({
                        Type: x("Font"),
                        Subtype: x("CIDFontType2"),
                        BaseFont: x(o._sub.psName),
                        CIDSystemInfo: new G({
                            Registry: new U("Adobe"),
                            Ordering: new U("Identity"),
                            Supplement: 0
                        }),
                        FontDescriptor: c,
                        FirstChar: u,
                        LastChar: h,
                        DW: Math.round(o._font.widthOfGlyph(0)),
                        W: f,
                        CIDToGIDMap: o._pdf.attach(o._makeCidToGidMap())
                    }), t = o.props, t.BaseFont = x(o._sub.psName), t.DescendantFonts = [o._pdf.attach(e)], n = new J(u, h, a.subset), r = new $(i(), null, !0), r.data(n), t.ToUnicode = o._pdf.attach(r)
                },
                _makeCidToGidMap: function() {
                    return new $(R(this._sub.cidToGidMap()), null, !0)
                }
            }, G), J = k(function(e, t, n) {
                this.firstChar = e, this.lastChar = t, this.map = n
            }, {
                render: function(e) {
                    e.indent("/CIDInit /ProcSet findresource begin"), e.indent("12 dict begin"), e.indent("begincmap"), e.indent("/CIDSystemInfo <<"), e.indent("  /Registry (Adobe)"), e.indent("  /Ordering (UCS)"), e.indent("  /Supplement 0"), e.indent(">> def"), e.indent("/CMapName /Adobe-Identity-UCS def"), e.indent("/CMapType 2 def"), e.indent("1 begincodespacerange"), e.indent("  <0000><ffff>"), e.indent("endcodespacerange");
                    var t = this;
                    e.indent(t.lastChar - t.firstChar + 1, " beginbfchar"), e.withIndent(function() {
                        var n, i, r, o;
                        for (n = t.firstChar; t.lastChar >= n; ++n) {
                            for (i = t.map[n], r = te.util.ucs2encode([i]), e.indent("<", h(n.toString(16), 4), ">", "<"), o = 0; r.length > o; ++o) e(h(r.charCodeAt(o).toString(16), 4));
                            e(">")
                        }
                    }), e.indent("endbfchar"), e.indent("endcmap"), e.indent("CMapName currentdict /CMap defineresource pop"), e.indent("end"), e.indent("end")
                }
            }), Z = k(function(e, t) {
                this._pdf = e, this._rcount = 0, this._textMode = !1, this._fontResources = {}, this._gsResources = {}, this._xResources = {}, this._patResources = {}, this._shResources = {}, this._opacity = 1, this._matrix = [1, 0, 0, 1, 0, 0], this._annotations = [], this._font = null, this._fontSize = null, this._contextStack = [], t = this.props = t || {}, t.Type = x("Page"), t.ProcSet = [x("PDF"), x("Text"), x("ImageB"), x("ImageC"), x("ImageI")], t.Resources = new G({
                    Font: new G(this._fontResources),
                    ExtGState: new G(this._gsResources),
                    XObject: new G(this._xResources),
                    Pattern: new G(this._patResources),
                    Shading: new G(this._shResources)
                }), t.Annots = this._annotations
            }, {
                _out: function() {
                    this._content.data.apply(null, arguments)
                },
                transform: function(e, t, n, i, r, o) {
                    O(arguments) || (this._matrix = N(arguments, this._matrix), this._out(e, " ", t, " ", n, " ", i, " ", r, " ", o, " cm"), this._out(ie))
                },
                translate: function(e, t) {
                    this.transform(1, 0, 0, 1, e, t)
                },
                scale: function(e, t) {
                    this.transform(e, 0, 0, t, 0, 0)
                },
                rotate: function(e) {
                    var t = Math.cos(e),
                        n = Math.sin(e);
                    this.transform(t, n, -n, t, 0, 0)
                },
                beginText: function() {
                    this._textMode = !0, this._out("BT", ie)
                },
                endText: function() {
                    this._textMode = !1, this._out("ET", ie)
                },
                _requireTextMode: function() {
                    if (!this._textMode) throw Error("Text mode required; call page.beginText() first")
                },
                _requireFont: function() {
                    if (!this._font) throw Error("No font selected; call page.setFont() first")
                },
                setFont: function(e, t) {
                    this._requireTextMode(), null == e ? e = this._font : e instanceof X || (e = this._pdf.getFont(e)), null == t && (t = this._fontSize), this._fontResources[e._resourceName] = e, this._font = e, this._fontSize = t, this._out(e._resourceName, " ", t, " Tf", ie)
                },
                setTextLeading: function(e) {
                    this._requireTextMode(), this._out(e, " TL", ie)
                },
                setTextRenderingMode: function(e) {
                    this._requireTextMode(), this._out(e, " Tr", ie)
                },
                showText: function(e, t) {
                    var n, i;
                    this._requireFont(), e.length > 1 && t && this._font instanceof X && (n = this._font.getTextWidth(this._fontSize, e), i = t / n * 100, this._out(i, " Tz ")), this._out(this._font.encodeText(e), " Tj", ie)
                },
                showTextNL: function(e) {
                    this._requireFont(), this._out(this._font.encodeText(e), " '", ie)
                },
                addLink: function(e, t) {
                    var n = this._toPage({
                            x: t.left,
                            y: t.bottom
                        }),
                        i = this._toPage({
                            x: t.right,
                            y: t.top
                        });
                    this._annotations.push(new G({
                        Type: x("Annot"),
                        Subtype: x("Link"),
                        Rect: [n.x, n.y, i.x, i.y],
                        Border: [0, 0, 0],
                        A: new G({
                            Type: x("Action"),
                            S: x("URI"),
                            URI: new U(e)
                        })
                    }))
                },
                setStrokeColor: function(e, t, n) {
                    this._out(e, " ", t, " ", n, " RG", ie)
                },
                setOpacity: function(e) {
                    this.setFillOpacity(e), this.setStrokeOpacity(e), this._opacity *= e
                },
                setStrokeOpacity: function(e) {
                    if (1 > e) {
                        var t = this._pdf.getOpacityGS(this._opacity * e, !0);
                        this._gsResources[t._resourceName] = t, this._out(t._resourceName, " gs", ie)
                    }
                },
                setFillColor: function(e, t, n) {
                    this._out(e, " ", t, " ", n, " rg", ie)
                },
                setFillOpacity: function(e) {
                    if (1 > e) {
                        var t = this._pdf.getOpacityGS(this._opacity * e, !1);
                        this._gsResources[t._resourceName] = t, this._out(t._resourceName, " gs", ie)
                    }
                },
                gradient: function(e, t) {
                    var n, i, r;
                    this.save(), this.rect(t.left, t.top, t.width, t.height), this.clip(), e.userSpace || this.transform(t.width, 0, 0, t.height, t.left, t.top), n = M(this._pdf, e, t), i = n.shading._resourceName, this._shResources[i] = n.shading, n.hasAlpha && (r = n.opacity._resourceName, this._gsResources[r] = n.opacity, this._out("/" + r + " gs ")), this._out("/" + i + " sh", ie), this.restore()
                },
                setDashPattern: function(e, t) {
                    this._out(e, " ", t, " d", ie)
                },
                setLineWidth: function(e) {
                    this._out(e, " w", ie)
                },
                setLineCap: function(e) {
                    this._out(e, " J", ie)
                },
                setLineJoin: function(e) {
                    this._out(e, " j", ie)
                },
                setMitterLimit: function(e) {
                    this._out(e, " M", ie)
                },
                save: function() {
                    this._contextStack.push(this._context()), this._out("q", ie)
                },
                restore: function() {
                    this._out("Q", ie), this._context(this._contextStack.pop())
                },
                moveTo: function(e, t) {
                    this._out(e, " ", t, " m", ie)
                },
                lineTo: function(e, t) {
                    this._out(e, " ", t, " l", ie)
                },
                bezier: function(e, t, n, i, r, o) {
                    this._out(e, " ", t, " ", n, " ", i, " ", r, " ", o, " c", ie)
                },
                bezier1: function(e, t, n, i) {
                    this._out(e, " ", t, " ", n, " ", i, " y", ie)
                },
                bezier2: function(e, t, n, i) {
                    this._out(e, " ", t, " ", n, " ", i, " v", ie)
                },
                close: function() {
                    this._out("h", ie)
                },
                rect: function(e, t, n, i) {
                    this._out(e, " ", t, " ", n, " ", i, " re", ie)
                },
                ellipse: function(e, t, n, i) {
                    function r(t) {
                        return e + t
                    }

                    function o(e) {
                        return t + e
                    }
                    var a = .5522847498307936;
                    this.moveTo(r(0), o(i)), this.bezier(r(n * a), o(i), r(n), o(i * a), r(n), o(0)), this.bezier(r(n), o(-i * a), r(n * a), o(-i), r(0), o(-i)), this.bezier(r(-n * a), o(-i), r(-n), o(-i * a), r(-n), o(0)), this.bezier(r(-n), o(i * a), r(-n * a), o(i), r(0), o(i))
                },
                circle: function(e, t, n) {
                    this.ellipse(e, t, n, n)
                },
                stroke: function() {
                    this._out("S", ie)
                },
                nop: function() {
                    this._out("n", ie)
                },
                clip: function() {
                    this._out("W n", ie)
                },
                clipStroke: function() {
                    this._out("W S", ie)
                },
                closeStroke: function() {
                    this._out("s", ie)
                },
                fill: function() {
                    this._out("f", ie)
                },
                fillStroke: function() {
                    this._out("B", ie)
                },
                drawImage: function(e) {
                    var t = this._pdf.getImage(e);
                    t && (this._xResources[t._resourceName] = t, this._out(t._resourceName, " Do", ie))
                },
                comment: function(e) {
                    var t = this;
                    e.split(/\r?\n/g).forEach(function(e) {
                        t._out("% ", e, ie)
                    })
                },
                _context: function(e) {
                    return null == e ? {
                        opacity: this._opacity,
                        matrix: this._matrix
                    } : (this._opacity = e.opacity, this._matrix = e.matrix, n)
                },
                _toPage: function(e) {
                    var t = this._matrix,
                        n = t[0],
                        i = t[1],
                        r = t[2],
                        o = t[3],
                        a = t[4],
                        s = t[5];
                    return {
                        x: n * e.x + r * e.y + a,
                        y: i * e.x + o * e.y + s
                    }
                }
            }, G), ee = {
                serif: "Times-Roman",
                "serif|bold": "Times-Bold",
                "serif|italic": "Times-Italic",
                "serif|bold|italic": "Times-BoldItalic",
                "sans-serif": "Helvetica",
                "sans-serif|bold": "Helvetica-Bold",
                "sans-serif|italic": "Helvetica-Oblique",
                "sans-serif|bold|italic": "Helvetica-BoldOblique",
                monospace: "Courier",
                "monospace|bold": "Courier-Bold",
                "monospace|italic": "Courier-Oblique",
                "monospace|bold|italic": "Courier-BoldOblique",
                zapfdingbats: "ZapfDingbats",
                "zapfdingbats|bold": "ZapfDingbats",
                "zapfdingbats|italic": "ZapfDingbats",
                "zapfdingbats|bold|italic": "ZapfDingbats"
            }, L("Times New Roman", "serif"), L("Courier New", "monospace"), L("Arial", "sans-serif"), L("Helvetica", "sans-serif"), L("Verdana", "sans-serif"), L("Tahoma", "sans-serif"), L("Georgia", "sans-serif"), L("Monaco", "monospace"), L("Andale Mono", "monospace"), te.pdf = {
                Document: a,
                BinaryStream: R,
                defineFont: H,
                parseFontDef: z,
                getFontURL: B,
                loadFonts: ce,
                loadImages: de,
                getPaperOptions: o,
                TEXT_RENDERING_MODE: {
                    fill: 0,
                    stroke: 1,
                    fillAndStroke: 2,
                    invisible: 3,
                    fillAndClip: 4,
                    strokeAndClip: 5,
                    fillStrokeClip: 6,
                    clip: 7
                }
            }
        }(window, parseFloat)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("pdf/ttf.min", ["pdf/core.min", "util/main.min"], e)
    }(function() {
        ! function(e) {
            "use strict";

            function t(e, t) {
                return Object.prototype.hasOwnProperty.call(e, t)
            }

            function n(e) {
                return Object.keys(e).sort(function(e, t) {
                    return e - t
                }).map(parseFloat)
            }

            function i(e) {
                var t, n, i;
                for (this.raw = e, this.scalerType = e.readLong(), this.tableCount = e.readShort(), this.searchRange = e.readShort(), this.entrySelector = e.readShort(), this.rangeShift = e.readShort(), t = this.tables = {}, n = 0; this.tableCount > n; ++n) i = {
                    tag: e.readString(4),
                    checksum: e.readLong(),
                    offset: e.readLong(),
                    length: e.readLong()
                }, t[i.tag] = i
            }

            function r(e) {
                function n(e, t) {
                    this.definition = t, this.length = t.length, this.offset = t.offset, this.file = e, this.rawData = e.raw, this.parse(e.raw)
                }
                n.prototype.raw = function() {
                    return this.rawData.slice(this.offset, this.length)
                };
                for (var i in e) t(e, i) && (n[i] = n.prototype[i] = e[i]);
                return n
            }

            function o() {
                var e, t = "",
                    n = _ + "";
                for (e = 0; n.length > e; ++e) t += String.fromCharCode(n.charCodeAt(e) - 48 + 65);
                return ++_, t
            }

            function a(e) {
                this.font = e, this.subset = {}, this.unicodes = {}, this.ogid2ngid = {
                    0: 0
                }, this.ngid2ogid = {
                    0: 0
                }, this.ncid2ogid = {}, this.next = this.firstChar = 1, this.nextGid = 1, this.psName = o() + "+" + this.font.psName
            }

            function s(e, t) {
                var n, i, r, o = this,
                    a = o.contents = w(e);
                if ("ttcf" == a.readString(4)) {
                    if (!t) throw Error("Must specify a name for TTC files");
                    for (a.readLong(), n = a.readLong(), i = 0; n > i; ++i)
                        if (r = a.readLong(), a.saveExcursion(function() {
                            a.offset(r), o.parse()
                        }), o.psName == t) return;
                    throw Error("Font " + t + " not found in collection")
                }
                a.offset(0), o.parse()
            }
            var l, c, d, u, h, f, p, m, g, v, _, b = e.kendo.pdf,
                w = b.BinaryStream;
            i.prototype = {
                readTable: function(e, t) {
                    var n = this.tables[e];
                    if (!n) throw Error("Table " + e + " not found in directory");
                    return this[e] = n.table = new t(this, n)
                },
                render: function(e) {
                    var n, i, r, o, a, s, l, c, d = Object.keys(e).length,
                        u = Math.pow(2, Math.floor(Math.log(d) / Math.LN2)),
                        h = 16 * u,
                        f = Math.floor(Math.log(u) / Math.LN2),
                        p = 16 * d - h,
                        m = w();
                    m.writeLong(this.scalerType), m.writeShort(d), m.writeShort(h), m.writeShort(f), m.writeShort(p), n = 16 * d, i = m.offset() + n, r = null, o = w();
                    for (a in e)
                        if (t(e, a))
                            for (s = e[a], m.writeString(a), m.writeLong(this.checksum(s)), m.writeLong(i), m.writeLong(s.length), o.write(s), "head" == a && (r = i), i += s.length; i % 4;) o.writeByte(0), i++;
                    return m.write(o.get()), l = this.checksum(m.get()), c = 2981146554 - l, m.offset(r + 8), m.writeLong(c), m.get()
                },
                checksum: function(e) {
                    e = w(e);
                    for (var t = 0; !e.eof();) t += e.readLong();
                    return 4294967295 & t
                }
            }, l = r({
                parse: function(e) {
                    e.offset(this.offset), this.version = e.readLong(), this.revision = e.readLong(), this.checkSumAdjustment = e.readLong(), this.magicNumber = e.readLong(), this.flags = e.readShort(), this.unitsPerEm = e.readShort(), this.created = e.read(8), this.modified = e.read(8), this.xMin = e.readShort_(), this.yMin = e.readShort_(), this.xMax = e.readShort_(), this.yMax = e.readShort_(), this.macStyle = e.readShort(), this.lowestRecPPEM = e.readShort(), this.fontDirectionHint = e.readShort_(), this.indexToLocFormat = e.readShort_(), this.glyphDataFormat = e.readShort_()
                },
                render: function(e) {
                    var t = w();
                    return t.writeLong(this.version), t.writeLong(this.revision), t.writeLong(0), t.writeLong(this.magicNumber), t.writeShort(this.flags), t.writeShort(this.unitsPerEm), t.write(this.created), t.write(this.modified), t.writeShort_(this.xMin), t.writeShort_(this.yMin), t.writeShort_(this.xMax), t.writeShort_(this.yMax), t.writeShort(this.macStyle), t.writeShort(this.lowestRecPPEM), t.writeShort_(this.fontDirectionHint), t.writeShort_(e), t.writeShort_(this.glyphDataFormat), t.get()
                }
            }), c = r({
                parse: function(e) {
                    e.offset(this.offset);
                    var t = this.file.head.indexToLocFormat;
                    this.offsets = 0 === t ? e.times(this.length / 2, function() {
                        return 2 * e.readShort()
                    }) : e.times(this.length / 4, e.readLong)
                },
                offsetOf: function(e) {
                    return this.offsets[e]
                },
                lengthOf: function(e) {
                    return this.offsets[e + 1] - this.offsets[e]
                },
                render: function(e) {
                    var t, n = w(),
                        i = e[e.length - 1] > 65535;
                    for (t = 0; e.length > t; ++t) i ? n.writeLong(e[t]) : n.writeShort(e[t] / 2);
                    return {
                        format: i ? 1 : 0,
                        table: n.get()
                    }
                }
            }), d = r({
                parse: function(e) {
                    e.offset(this.offset), this.version = e.readLong(), this.ascent = e.readShort_(), this.descent = e.readShort_(), this.lineGap = e.readShort_(), this.advanceWidthMax = e.readShort(), this.minLeftSideBearing = e.readShort_(), this.minRightSideBearing = e.readShort_(), this.xMaxExtent = e.readShort_(), this.caretSlopeRise = e.readShort_(), this.caretSlopeRun = e.readShort_(), this.caretOffset = e.readShort_(), e.skip(8), this.metricDataFormat = e.readShort_(), this.numOfLongHorMetrics = e.readShort()
                },
                render: function(e) {
                    var t = w();
                    return t.writeLong(this.version), t.writeShort_(this.ascent), t.writeShort_(this.descent), t.writeShort_(this.lineGap), t.writeShort(this.advanceWidthMax), t.writeShort_(this.minLeftSideBearing), t.writeShort_(this.minRightSideBearing), t.writeShort_(this.xMaxExtent), t.writeShort_(this.caretSlopeRise), t.writeShort_(this.caretSlopeRun), t.writeShort_(this.caretOffset), t.write([0, 0, 0, 0, 0, 0, 0, 0]), t.writeShort_(this.metricDataFormat), t.writeShort(e.length), t.get()
                }
            }), u = r({
                parse: function(e) {
                    e.offset(this.offset), this.version = e.readLong(), this.numGlyphs = e.readShort(), this.maxPoints = e.readShort(), this.maxContours = e.readShort(), this.maxComponentPoints = e.readShort(), this.maxComponentContours = e.readShort(), this.maxZones = e.readShort(), this.maxTwilightPoints = e.readShort(), this.maxStorage = e.readShort(), this.maxFunctionDefs = e.readShort(), this.maxInstructionDefs = e.readShort(), this.maxStackElements = e.readShort(), this.maxSizeOfInstructions = e.readShort(), this.maxComponentElements = e.readShort(), this.maxComponentDepth = e.readShort()
                },
                render: function(e) {
                    var t = w();
                    return t.writeLong(this.version), t.writeShort(e.length), t.writeShort(this.maxPoints), t.writeShort(this.maxContours), t.writeShort(this.maxComponentPoints), t.writeShort(this.maxComponentContours), t.writeShort(this.maxZones), t.writeShort(this.maxTwilightPoints), t.writeShort(this.maxStorage), t.writeShort(this.maxFunctionDefs), t.writeShort(this.maxInstructionDefs), t.writeShort(this.maxStackElements), t.writeShort(this.maxSizeOfInstructions), t.writeShort(this.maxComponentElements), t.writeShort(this.maxComponentDepth), t.get()
                }
            }), h = r({
                parse: function(e) {
                    var t, n, i;
                    e.offset(this.offset), t = this.file, n = t.hhea, this.metrics = e.times(n.numOfLongHorMetrics, function() {
                        return {
                            advance: e.readShort(),
                            lsb: e.readShort_()
                        }
                    }), i = t.maxp.numGlyphs - t.hhea.numOfLongHorMetrics, this.leftSideBearings = e.times(i, e.readShort_)
                },
                forGlyph: function(e) {
                    var t = this.metrics,
                        n = t.length;
                    return n > e ? t[e] : {
                        advance: t[n - 1].advance,
                        lsb: this.leftSideBearings[e - n]
                    }
                },
                render: function(e) {
                    var t, n, i = w();
                    for (t = 0; e.length > t; ++t) n = this.forGlyph(e[t]), i.writeShort(n.advance), i.writeShort_(n.lsb);
                    return i.get()
                }
            }), f = function() {
                function e(e) {
                    this.raw = e
                }

                function n(e) {
                    var t, n, r;
                    for (this.raw = e, t = this.glyphIds = [], n = this.idOffsets = [];;) {
                        if (r = e.readShort(), n.push(e.offset()), t.push(e.readShort()), !(r & a)) break;
                        e.skip(r & i ? 4 : 2), r & l ? e.skip(8) : r & s ? e.skip(4) : r & o && e.skip(2)
                    }
                }
                var i, o, a, s, l;
                return e.prototype = {
                    compound: !1,
                    render: function() {
                        return this.raw.get()
                    }
                }, i = 1, o = 8, a = 32, s = 64, l = 128, n.prototype = {
                    compound: !0,
                    render: function(e) {
                        var t, n, i = w(this.raw.get());
                        for (t = 0; this.glyphIds.length > t; ++t) n = this.glyphIds[t], i.offset(this.idOffsets[t]), i.writeShort(e[n]);
                        return i.get()
                    }
                }, r({
                    parse: function() {
                        this.cache = {}
                    },
                    glyphFor: function(i) {
                        var r, o, a, s, l, c, d, u, h, f, p, m = this.cache;
                        return t(m, i) ? m[i] : (r = this.file.loca, o = r.lengthOf(i), 0 === o ? m[i] = null : (a = this.rawData, s = this.offset + r.offsetOf(i), l = w(a.slice(s, o)), c = l.readShort_(), d = l.readShort_(), u = l.readShort_(), h = l.readShort_(), f = l.readShort_(), p = m[i] = -1 == c ? new n(l) : new e(l), p.numberOfContours = c, p.xMin = d, p.yMin = u, p.xMax = h, p.yMax = f, p))
                    },
                    render: function(e, t, n) {
                        var i, r, o, a = w(),
                            s = [];
                        for (i = 0; t.length > i; ++i) r = t[i], o = e[r], s.push(a.offset()), o && a.write(o.render(n));
                        return s.push(a.offset()), {
                            table: a.get(),
                            offsets: s
                        }
                    }
                })
            }(), p = function() {
                function e(e, t) {
                    this.text = e, this.length = e.length, this.platformID = t.platformID, this.platformSpecificID = t.platformSpecificID, this.languageID = t.languageID, this.nameID = t.nameID
                }
                return r({
                    parse: function(t) {
                        var n, i, r, o, a, s, l;
                        for (t.offset(this.offset), t.readShort(), n = t.readShort(), i = this.offset + t.readShort(), r = t.times(n, function() {
                            return {
                                platformID: t.readShort(),
                                platformSpecificID: t.readShort(),
                                languageID: t.readShort(),
                                nameID: t.readShort(),
                                length: t.readShort(),
                                offset: t.readShort() + i
                            }
                        }), o = this.strings = {}, a = 0; r.length > a; ++a) s = r[a], t.offset(s.offset), l = t.readString(s.length), o[s.nameID] || (o[s.nameID] = []), o[s.nameID].push(new e(l, s));
                        this.postscriptEntry = o[6][0], this.postscriptName = this.postscriptEntry.text.replace(/[^\x20-\x7F]/g, "")
                    },
                    render: function(n) {
                        var i, r, o, a, s, l, c = this.strings,
                            d = 0;
                        for (i in c) t(c, i) && (d += c[i].length);
                        r = w(), o = w(), r.writeShort(0), r.writeShort(d), r.writeShort(6 + 12 * d);
                        for (i in c)
                            if (t(c, i))
                                for (a = 6 == i ? [new e(n, this.postscriptEntry)] : c[i], s = 0; a.length > s; ++s) l = a[s], r.writeShort(l.platformID), r.writeShort(l.platformSpecificID), r.writeShort(l.languageID), r.writeShort(l.nameID), r.writeShort(l.length), r.writeShort(o.offset()), o.writeString(l.text);
                        return r.write(o.get()), r.get()
                    }
                })
            }(), m = function() {
                var e = ".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent ampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at 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 bracketleft backslash bracketright asciicircum underscore grave 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 braceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis Udieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave ecircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve ocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent sterling section bullet paragraph germandbls registered copyright trademark acute dieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu partialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash questiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft guillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash quotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis fraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered quotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis Egrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute Ucircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla hungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth eth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior onehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla Cacute cacute Ccaron ccaron dcroat".split(/\s+/g);
                return r({
                    parse: function(e) {
                        var t, n;
                        switch (e.offset(this.offset), this.format = e.readLong(), this.italicAngle = e.readFixed_(), this.underlinePosition = e.readShort_(), this.underlineThickness = e.readShort_(), this.isFixedPitch = e.readLong(), this.minMemType42 = e.readLong(), this.maxMemType42 = e.readLong(), this.minMemType1 = e.readLong(), this.maxMemType1 = e.readLong(), this.format) {
                            case 65536:
                            case 196608:
                                break;
                            case 131072:
                                for (t = e.readShort(), this.glyphNameIndex = e.times(t, e.readShort), this.names = [], n = this.offset + this.length; e.offset() < n;) this.names.push(e.readString(e.readByte()));
                                break;
                            case 151552:
                                t = e.readShort(), this.offsets = e.read(t);
                                break;
                            case 262144:
                                this.map = e.times(this.file.maxp.numGlyphs, e.readShort)
                        }
                    },
                    glyphFor: function(t) {
                        switch (this.format) {
                            case 65536:
                                return e[t] || ".notdef";
                            case 131072:
                                var n = this.glyphNameIndex[t];
                                return e.length > n ? e[n] : this.names[n - e.length] || ".notdef";
                            case 151552:
                            case 196608:
                                return ".notdef";
                            case 262144:
                                return this.map[t] || 65535
                        }
                    },
                    render: function(t) {
                        var n, i, r, o, a, s, l;
                        if (196608 == this.format) return this.raw();
                        for (n = w(this.rawData.slice(this.offset, 32)), n.writeLong(131072), n.offset(32), i = [], r = [], o = 0; t.length > o; ++o) a = t[o], s = this.glyphFor(a), l = e.indexOf(s), l >= 0 ? i.push(l) : (i.push(e.length + r.length), r.push(s));
                        for (n.writeShort(t.length), o = 0; i.length > o; ++o) n.writeShort(i[o]);
                        for (o = 0; r.length > o; ++o) n.writeByte(r[o].length), n.writeString(r[o]);
                        return n.get()
                    }
                })
            }(), g = function() {
                function t(t, n, i) {
                    var r = this;
                    r.platformID = t.readShort(), r.platformSpecificID = t.readShort(), r.offset = n + t.readLong(), t.saveExcursion(function() {
                        var n, o, a, s, l, c, d, u, h, f, p, m, g, v, _, b, w;
                        switch (t.offset(r.offset), r.format = t.readShort()) {
                            case 0:
                                for (r.length = t.readShort(), r.language = t.readShort(), o = 0; 256 > o; ++o) i[o] = t.readByte();
                                break;
                            case 4:
                                for (r.length = t.readShort(), r.language = t.readShort(), a = t.readShort() / 2, t.skip(6), s = t.times(a, t.readShort), t.skip(2), l = t.times(a, t.readShort), c = t.times(a, t.readShort_), d = t.times(a, t.readShort), u = (r.length + r.offset - t.offset()) / 2, h = t.times(u, t.readShort), o = 0; a > o; ++o)
                                    for (f = l[o], p = s[o], n = f; p >= n; ++n) 0 === d[o] ? m = n + c[o] : (g = d[o] / 2 - (a - o) + (n - f), m = h[g] || 0, 0 !== m && (m += c[o])), i[n] = 65535 & m;
                                break;
                            case 6:
                                for (r.length = t.readShort(), r.language = t.readShort(), n = t.readShort(), v = t.readShort(); v-- > 0;) i[n++] = t.readShort();
                                break;
                            case 12:
                                for (t.readShort(), r.length = t.readLong(), r.language = t.readLong(), _ = t.readLong(); _-- > 0;)
                                    for (n = t.readLong(), b = t.readLong(), w = t.readLong(); b >= n;) i[n++] = w++;
                                break;
                            default:
                                e.console && e.console.error("Unhandled CMAP format: " + r.format)
                        }
                    })
                }

                function i(e, t) {
                    function i(n) {
                        return t[e[n]]
                    }
                    var r, o, a, s, l, c, d, u, h, f, p, m, g, v, _, b, y, k = n(e),
                        x = [],
                        C = [],
                        S = null,
                        T = null;
                    for (r = 0; k.length > r; ++r) o = k[r], a = i(o), s = a - o, (null == S || s !== T) && (S && C.push(S), x.push(o), T = s), S = o;
                    for (S && C.push(S), C.push(65535), x.push(65535), l = x.length, c = 2 * l, d = 2 * Math.pow(2, Math.floor(Math.log(l) / Math.LN2)), u = Math.log(d / 2) / Math.LN2, h = c - d, f = [], p = [], m = [], r = 0; l > r; ++r) {
                        if (g = x[r], v = C[r], 65535 == g) {
                            f.push(0), p.push(0);
                            break
                        }
                        if (_ = i(g), g - _ >= 32768)
                            for (f.push(0), p.push(2 * (m.length + l - r)), b = g; v >= b; ++b) m.push(i(b));
                        else f.push(_ - g), p.push(0)
                    }
                    return y = w(), y.writeShort(3), y.writeShort(1), y.writeLong(12), y.writeShort(4), y.writeShort(16 + 8 * l + 2 * m.length), y.writeShort(0), y.writeShort(c), y.writeShort(d), y.writeShort(u), y.writeShort(h), C.forEach(y.writeShort), y.writeShort(0), x.forEach(y.writeShort), f.forEach(y.writeShort_), p.forEach(y.writeShort), m.forEach(y.writeShort), y.get()
                }
                return r({
                    parse: function(e) {
                        var n, i = this,
                            r = i.offset;
                        e.offset(r), i.codeMap = {}, i.version = e.readShort(), n = e.readShort(), i.tables = e.times(n, function() {
                            return new t(e, r, i.codeMap)
                        })
                    },
                    render: function(e, t) {
                        var n = w();
                        return n.writeShort(0), n.writeShort(1), n.write(i(e, t)), n.get()
                    }
                })
            }(), v = r({
                parse: function(e) {
                    e.offset(this.offset), this.version = e.readShort(), this.averageCharWidth = e.readShort_(), this.weightClass = e.readShort(), this.widthClass = e.readShort(), this.type = e.readShort(), this.ySubscriptXSize = e.readShort_(), this.ySubscriptYSize = e.readShort_(), this.ySubscriptXOffset = e.readShort_(), this.ySubscriptYOffset = e.readShort_(), this.ySuperscriptXSize = e.readShort_(), this.ySuperscriptYSize = e.readShort_(), this.ySuperscriptXOffset = e.readShort_(), this.ySuperscriptYOffset = e.readShort_(), this.yStrikeoutSize = e.readShort_(), this.yStrikeoutPosition = e.readShort_(), this.familyClass = e.readShort_(), this.panose = e.times(10, e.readByte), this.charRange = e.times(4, e.readLong), this.vendorID = e.readString(4), this.selection = e.readShort(), this.firstCharIndex = e.readShort(), this.lastCharIndex = e.readShort(), this.version > 0 && (this.ascent = e.readShort_(), this.descent = e.readShort_(), this.lineGap = e.readShort_(), this.winAscent = e.readShort(), this.winDescent = e.readShort(), this.codePageRange = e.times(2, e.readLong), this.version > 1 && (this.xHeight = e.readShort(), this.capHeight = e.readShort(), this.defaultChar = e.readShort(), this.breakChar = e.readShort(), this.maxContext = e.readShort()))
                },
                render: function() {
                    return this.raw()
                }
            }), _ = 1e5, a.prototype = {
                use: function(e) {
                    var t, n, i, r = this;
                    return "string" == typeof e ? kendo.util.ucs2decode(e).reduce(function(e, t) {
                        return e + String.fromCharCode(r.use(t))
                    }, "") : (t = r.unicodes[e], t || (t = r.next++, r.subset[t] = e, r.unicodes[e] = t, n = r.font.cmap.codeMap[e], n && (r.ncid2ogid[t] = n, null == r.ogid2ngid[n] && (i = r.nextGid++, r.ogid2ngid[n] = i, r.ngid2ogid[i] = n))), t)
                },
                encodeText: function(e) {
                    return this.use(e)
                },
                glyphIds: function() {
                    return n(this.ogid2ngid)
                },
                glyphsFor: function(e, t) {
                    var n, i, r;
                    for (t || (t = {}), n = 0; e.length > n; ++n) i = e[n], t[i] || (r = t[i] = this.font.glyf.glyphFor(i), r && r.compound && this.glyphsFor(r.glyphIds, t));
                    return t
                },
                render: function() {
                    var e, i, r, o, a, s, l, c, d = this.glyphsFor(this.glyphIds());
                    for (e in d) t(d, e) && (e = parseInt(e, 10), null == this.ogid2ngid[e] && (i = this.nextGid++, this.ogid2ngid[e] = i, this.ngid2ogid[i] = e));
                    return r = n(this.ngid2ogid), o = r.map(function(e) {
                        return this.ngid2ogid[e]
                    }, this), a = this.font, s = a.glyf.render(d, o, this.ogid2ngid), l = a.loca.render(s.offsets), this.lastChar = this.next - 1, c = {
                        cmap: g.render(this.ncid2ogid, this.ogid2ngid),
                        glyf: s.table,
                        loca: l.table,
                        hmtx: a.hmtx.render(o),
                        hhea: a.hhea.render(o),
                        maxp: a.maxp.render(o),
                        post: a.post.render(o),
                        name: a.name.render(this.psName),
                        head: a.head.render(l.format),
                        "OS/2": a.os2.render()
                    }, this.font.directory.render(c)
                },
                cidToGidMap: function() {
                    var e, t, n, i = w(),
                        r = 0;
                    for (e = this.firstChar; this.next > e; ++e) {
                        for (; e > r;) i.writeShort(0), r++;
                        t = this.ncid2ogid[e], t ? (n = this.ogid2ngid[t], i.writeShort(n)) : i.writeShort(0), r++
                    }
                    return i.get()
                }
            }, s.prototype = {
                parse: function() {
                    var e = this.directory = new i(this.contents);
                    this.head = e.readTable("head", l), this.loca = e.readTable("loca", c), this.hhea = e.readTable("hhea", d), this.maxp = e.readTable("maxp", u), this.hmtx = e.readTable("hmtx", h), this.glyf = e.readTable("glyf", f), this.name = e.readTable("name", p), this.post = e.readTable("post", m), this.cmap = e.readTable("cmap", g), this.os2 = e.readTable("OS/2", v), this.psName = this.name.postscriptName, this.ascent = this.os2.ascent || this.hhea.ascent, this.descent = this.os2.descent || this.hhea.descent, this.lineGap = this.os2.lineGap || this.hhea.lineGap, this.scale = 1e3 / this.head.unitsPerEm
                },
                widthOfGlyph: function(e) {
                    return this.hmtx.forGlyph(e).advance * this.scale
                },
                makeSubset: function() {
                    return new a(this)
                }
            }, b.TTFFont = s
        }(window)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("pdf/drawing.min", ["kendo.core.min", "kendo.color.min", "kendo.drawing.min", "pdf/core.min"], e)
    }(function() {
        ! function(e, t) {
            "use strict";

            function n(t, n) {
                function i(e, t, n) {
                    return n || (n = d), n.pdf && null != n.pdf[e] ? n.pdf[e] : t
                }

                function r() {
                    function r(e) {
                        var t, n, r, o, l, c = e.options,
                            d = T(e),
                            u = d.bbox;
                        e = d.root, t = i("paperSize", i("paperSize", "auto"), c), n = !1, "auto" == t && (u ? (r = u.getSize(), t = [r.width, r.height], n = !0, o = u.getOrigin(), d = new D.Group, d.transform(new A.Matrix(1, 0, 0, 1, -o.x, -o.y)), d.append(e), e = d) : t = "A4"), l = a.addPage({
                            paperSize: t,
                            margin: i("margin", i("margin"), c),
                            addMargin: n,
                            landscape: i("landscape", i("landscape", !1), c)
                        }), s(e, l, a)
                    }
                    if (!(--o > 0)) {
                        var a = new e.pdf.Document({
                            producer: i("producer"),
                            title: i("title"),
                            author: i("author"),
                            subject: i("subject"),
                            keywords: i("keywords"),
                            creator: i("creator"),
                            date: i("date")
                        });
                        u ? t.children.forEach(r) : r(t), n(a.render(), a)
                    }
                }
                var o, l = [],
                    c = [],
                    d = t.options,
                    u = i("multiPage");
                t.traverse(function(t) {
                    a({
                        Image: function(e) {
                            c.indexOf(e.src()) < 0 && c.push(e.src())
                        },
                        Text: function(t) {
                            var n = e.pdf.parseFontDef(t.options.font),
                                i = e.pdf.getFontURL(n);
                            l.indexOf(i) < 0 && l.push(i)
                        }
                    }, t)
                }), o = 2, e.pdf.loadFonts(l, r), e.pdf.loadImages(c, r)
            }

            function i(e, t) {
                n(e, function(e) {
                    t("data:application/pdf;base64," + e.base64())
                })
            }

            function r(e, t) {
                n(e, function(e) {
                    t(new Blob([e.get()], {
                        type: "application/pdf"
                    }))
                })
            }

            function o(t, n, o, a) {
                window.Blob && !e.support.browser.safari ? r(t, function(t) {
                    e.saveAs({
                        dataURI: t,
                        fileName: n
                    }), a && a(t)
                }) : i(t, function(t) {
                    e.saveAs({
                        dataURI: t,
                        fileName: n,
                        proxyURL: o
                    }), a && a(t)
                })
            }

            function a(e, t) {
                var n = e[t.nodeType];
                return n ? n.call.apply(n, arguments) : t
            }

            function s(e, t, n) {
                var i, r, o;
                e.options._pdfDebug && t.comment("BEGIN: " + e.options._pdfDebug), i = e.transform(), r = e.opacity(), t.save(), null != r && 1 > r && t.setOpacity(r),
                    l(e, t, n), c(e, t, n), i && (o = i.matrix(), t.transform(o.a, o.b, o.c, o.d, o.e, o.f)), d(e, t, n), a({
                    Path: g,
                    MultiPath: v,
                    Circle: _,
                    Arc: b,
                    Text: w,
                    Image: k,
                    Group: y,
                    Rect: x
                }, e, t, n), t.restore(), e.options._pdfDebug && t.comment("END: " + e.options._pdfDebug)
            }

            function l(e, t) {
                var n, i, r, o, a, s, l = e.stroke && e.stroke();
                if (l) {
                    if (n = l.color) {
                        if (n = S(n), null == n) return;
                        t.setStrokeColor(n.r, n.g, n.b), 1 != n.a && t.setStrokeOpacity(n.a)
                    }
                    if (i = l.width, null != i) {
                        if (0 === i) return;
                        t.setLineWidth(i)
                    }
                    r = l.dashType, r && t.setDashPattern(F[r], 0), o = l.lineCap, o && t.setLineCap(I[o]), a = l.lineJoin, a && t.setLineJoin(M[a]), s = l.opacity, null != s && t.setStrokeOpacity(s)
                }
            }

            function c(e, t) {
                var n, i, r = e.fill && e.fill();
                if (r && !(r instanceof D.Gradient)) {
                    if (n = r.color) {
                        if (n = S(n), null == n) return;
                        t.setFillColor(n.r, n.g, n.b), 1 != n.a && t.setFillOpacity(n.a)
                    }
                    i = r.opacity, null != i && t.setFillOpacity(i)
                }
            }

            function d(e, t, n) {
                var i = e.clip();
                i && (m(i, t, n), t.clip())
            }

            function u(e) {
                return e && (e instanceof D.Gradient || e.color && !/^(none|transparent)$/i.test(e.color) && (null == e.width || e.width > 0) && (null == e.opacity || e.opacity > 0))
            }

            function h(e, t, n, i) {
                var r, o, a, s, l, c, d, u = e.fill();
                return u instanceof D.Gradient ? (i ? t.clipStroke() : t.clip(), r = u instanceof D.RadialGradient, r ? (o = {
                    x: u.center().x,
                    y: u.center().y,
                    r: 0
                }, a = {
                    x: u.center().x,
                    y: u.center().y,
                    r: u.radius()
                }) : (o = {
                    x: u.start().x,
                    y: u.start().y
                }, a = {
                    x: u.end().x,
                    y: u.end().y
                }), s = {
                    type: r ? "radial" : "linear",
                    start: o,
                    end: a,
                    userSpace: u.userSpace(),
                    stops: u.stops.elements().map(function(e) {
                        var t, n = e.offset();
                        return n = /%$/.test(n) ? parseFloat(n) / 100 : parseFloat(n), t = S(e.color()), t.a *= e.opacity(), {
                            offset: n,
                            color: t
                        }
                    })
                }, l = e.rawBBox(), c = l.topLeft(), d = l.getSize(), l = {
                    left: c.x,
                    top: c.y,
                    width: d.width,
                    height: d.height
                }, t.gradient(s, l), !0) : void 0
            }

            function f(e, t, n) {
                u(e.fill()) && u(e.stroke()) ? h(e, t, n, !0) || t.fillStroke() : u(e.fill()) ? h(e, t, n, !1) || t.fill() : u(e.stroke()) ? t.stroke() : t.nop()
            }

            function p(e, t) {
                var n, i, r, o = e.segments;
                if (4 == o.length && e.options.closed) {
                    for (n = [], i = 0; o.length > i; ++i) {
                        if (o[i].controlIn()) return !1;
                        n[i] = o[i].anchor()
                    }
                    if (r = n[0].y == n[1].y && n[1].x == n[2].x && n[2].y == n[3].y && n[3].x == n[0].x || n[0].x == n[1].x && n[1].y == n[2].y && n[2].x == n[3].x && n[3].y == n[0].y) return t.rect(n[0].x, n[0].y, n[2].x - n[0].x, n[2].y - n[0].y), !0
                }
            }

            function m(e, t, n) {
                var i, r, o, a, s, l, c = e.segments;
                if (0 !== c.length && !p(e, t, n)) {
                    for (r = 0; c.length > r; ++r) o = c[r], a = o.anchor(), i ? (s = i.controlOut(), l = o.controlIn(), s && l ? t.bezier(s.x, s.y, l.x, l.y, a.x, a.y) : t.lineTo(a.x, a.y)) : t.moveTo(a.x, a.y), i = o;
                    e.options.closed && t.close()
                }
            }

            function g(e, t, n) {
                m(e, t, n), f(e, t, n)
            }

            function v(e, t, n) {
                var i, r = e.paths;
                for (i = 0; r.length > i; ++i) m(r[i], t, n);
                f(e, t, n)
            }

            function _(e, t, n) {
                var i = e.geometry();
                t.circle(i.center.x, i.center.y, i.radius), f(e, t, n)
            }

            function b(e, t, n) {
                var i, r = e.geometry().curvePoints();
                for (t.moveTo(r[0].x, r[0].y), i = 1; r.length > i;) t.bezier(r[i].x, r[i++].y, r[i].x, r[i++].y, r[i].x, r[i++].y);
                f(e, t, n)
            }

            function w(t, n) {
                var i, r = e.pdf.parseFontDef(t.options.font),
                    o = t._position;
                t.fill() && t.stroke() ? i = E.fillAndStroke : t.fill() ? i = E.fill : t.stroke() && (i = E.stroke), n.transform(1, 0, 0, -1, o.x, o.y + r.fontSize), n.beginText(), n.setFont(e.pdf.getFontURL(r), r.fontSize), n.setTextRenderingMode(i), n.showText(t.content(), t._pdfRect ? t._pdfRect.width() : null), n.endText()
            }

            function y(e, t, n) {
                var i, r;
                for (e._pdfLink && t.addLink(e._pdfLink.url, e._pdfLink), i = e.children, r = 0; i.length > r; ++r) s(i[r], t, n)
            }

            function k(e, t) {
                var n, i, r, o = e.src();
                o && (n = e.rect(), i = n.getOrigin(), r = n.getSize(), t.transform(r.width, 0, 0, -r.height, i.x, i.y + r.height), t.drawImage(o))
            }

            function x(e, t, n) {
                var i = e.geometry();
                t.rect(i.origin.x, i.origin.y, i.size.width, i.size.height), f(e, t, n)
            }

            function C(e, n) {
                var i, r = t.Deferred();
                for (i in n) e.options.set("pdf." + i, n[i]);
                return D.pdf.toDataURL(e, r.resolve), r.promise()
            }

            function S(t) {
                var n = e.parseColor(t, !0);
                return n ? n.toRGB() : null
            }

            function T(e) {
                function t(e) {
                    return l = !0, e
                }

                function n(e) {
                    return e.visible() && e.opacity() > 0 && (u(e.fill()) || u(e.stroke()))
                }

                function i(e) {
                    var t, n, i = [];
                    for (t = 0; e.length > t; ++t) n = s(e[t]), null != n && i.push(n);
                    return i
                }

                function r(e, t) {
                    var n, i = c,
                        r = d;
                    e.transform() && (d = d.multiplyCopy(e.transform().matrix())), n = e.clip(), n && (n = n.bbox(), n && (n = n.bbox(d), c = c ? A.Rect.intersect(c, n) : n));
                    try {
                        return t()
                    } finally {
                        c = i, d = r
                    }
                }

                function o(e) {
                    if (null == c) return !1;
                    var t = e.rawBBox().bbox(d);
                    return c && t && (t = A.Rect.intersect(t, c)), t
                }

                function s(s) {
                    return r(s, function() {
                        if (!(s instanceof D.Group || s instanceof D.MultiPath)) {
                            var r = o(s);
                            if (!r) return t(null);
                            h = h ? A.Rect.union(h, r) : r
                        }
                        return a({
                            Path: function(e) {
                                return 0 !== e.segments.length && n(e) ? e : t(null)
                            },
                            MultiPath: function(e) {
                                if (!n(e)) return t(null);
                                var r = new D.MultiPath(e.options);
                                return r.paths = i(e.paths), 0 === r.paths.length ? t(null) : r
                            },
                            Circle: function(e) {
                                return n(e) ? e : t(null)
                            },
                            Arc: function(e) {
                                return n(e) ? e : t(null)
                            },
                            Text: function(e) {
                                return /\S/.test(e.content()) && n(e) ? e : t(null)
                            },
                            Image: function(e) {
                                return e.visible() && e.opacity() > 0 ? e : t(null)
                            },
                            Group: function(n) {
                                var r = new D.Group(n.options);
                                return r.children = i(n.children), r._pdfLink = n._pdfLink, n === e || 0 !== r.children.length || n._pdfLink ? r : t(null)
                            },
                            Rect: function(e) {
                                return n(e) ? e : t(null)
                            }
                        }, s)
                    })
                }
                var l, c = !1,
                    d = A.Matrix.unit(),
                    h = null;
                do l = !1, e = s(e); while (e && l);
                return {
                    root: e,
                    bbox: h
                }
            }
            var D = e.drawing,
                A = e.geometry,
                E = e.pdf.TEXT_RENDERING_MODE,
                F = {
                    dash: [4],
                    dashDot: [4, 2, 1, 2],
                    dot: [1, 2],
                    longDash: [8, 2],
                    longDashDot: [8, 2, 1, 2],
                    longDashDotDot: [8, 2, 1, 2, 1, 2],
                    solid: []
                },
                I = {
                    butt: 0,
                    round: 1,
                    square: 2
                },
                M = {
                    miter: 0,
                    round: 1,
                    bevel: 2
                };
            e.deepExtend(D, {
                exportPDF: C,
                pdf: {
                    toDataURL: i,
                    toBlob: r,
                    saveAs: o,
                    toStream: n
                }
            })
        }(window.kendo, window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.pdf.min", ["kendo.core.min", "pdf/core.min", "pdf/ttf.min", "pdf/drawing.min", "kendo.drawing.min"], e)
    }(function() {
        return function(e, t) {
            e.PDFMixin = {
                extend: function(e) {
                    e.events.push("pdfExport"), e.options.pdf = this.options, e.saveAsPDF = this.saveAsPDF, e._drawPDF = this._drawPDF, e._drawPDFShadow = this._drawPDFShadow
                },
                options: {
                    fileName: "Export.pdf",
                    proxyURL: "",
                    paperSize: "auto",
                    allPages: !1,
                    landscape: !1,
                    margin: null,
                    title: null,
                    author: null,
                    subject: null,
                    keywords: null,
                    creator: "Kendo UI PDF Generator v." + e.version,
                    date: null
                },
                saveAsPDF: function() {
                    var n, i = new t.Deferred,
                        r = i.promise(),
                        o = {
                            promise: r
                        };
                    if (!this.trigger("pdfExport", o)) return n = this.options.pdf, n.multiPage = n.allPages, this._drawPDF(i).then(function(t) {
                        return e.drawing.exportPDF(t, n)
                    }).done(function(t) {
                        e.saveAs({
                            dataURI: t,
                            fileName: n.fileName,
                            proxyURL: n.proxyURL,
                            forceProxy: n.forceProxy,
                            proxyTarget: n.proxyTarget
                        }), i.resolve()
                    }).fail(function(e) {
                        i.reject(e)
                    }), r
                },
                _drawPDF: function(n) {
                    var i = new t.Deferred;
                    return e.drawing.drawDOM(this.wrapper).done(function(e) {
                        var t = {
                            page: e,
                            pageNumber: 1,
                            progress: 1,
                            totalPages: 1
                        };
                        n.notify(t), i.resolve(t.page)
                    }).fail(function(e) {
                        i.reject(e)
                    }), i
                },
                _drawPDFShadow: function(n, i) {
                    var r, o, a;
                    return n = n || {}, r = this.wrapper, o = t("<div class='k-pdf-export-shadow'>"), n.width && o.css({
                        width: n.width,
                        overflow: "visible"
                    }), r.before(o), o.append(n.content || r.clone(!0, !0)), a = t.Deferred(), setTimeout(function() {
                        var t = e.drawing.drawDOM(o, i);
                        t.always(function() {
                            o.remove()
                        }).then(function() {
                            a.resolve.apply(a, arguments)
                        }).fail(function() {
                            a.reject.apply(a, arguments)
                        }).progress(function() {
                            a.progress.apply(a, arguments)
                        })
                    }, 15), a.promise()
                }
            }
        }(kendo, window.kendo.jQuery), kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.grid.min", ["kendo.data.min", "kendo.columnsorter.min", "kendo.editable.min", "kendo.window.min", "kendo.filtermenu.min", "kendo.columnmenu.min", "kendo.groupable.min", "kendo.pager.min", "kendo.selectable.min", "kendo.sortable.min", "kendo.reorderable.min", "kendo.resizable.min", "kendo.mobile.actionsheet.min", "kendo.mobile.pane.min", "kendo.ooxml.min", "kendo.excel.min", "kendo.progressbar.min", "kendo.pdf.min"], e)
    }(function() {
        return function(e, t) {
            function n(e) {
                return Array(e + 1).join('<td class="k-group-cell">&nbsp;</td>')
            }

            function i(e) {
                var t, n = " ";
                if (e) {
                    if (typeof e === ct) return e;
                    for (t in e) n += t + '="' + e[t] + '"'
                }
                return n
            }

            function r(t, n) {
                e("th, th .k-grid-filter, th .k-link", t).add(document.body).css("cursor", n)
            }

            function o(t, n, i, r, o) {
                var a, s = n;
                for (n = e(), o = o || 1, a = 0; o > a; a++) n = n.add(t.eq(s + a));
                "number" == typeof i ? n[r ? "insertBefore" : "insertAfter"](t.eq(i)) : n.appendTo(i)
            }

            function a(t, n, i) {
                return e(t).add(n).find(i)
            }

            function s(e, t, n) {
                var i, r, o, a;
                for (n = ke(n) ? n : [n], i = 0, r = n.length; r > i; i++) o = n[i], _e(o) && o.click && (a = o.name || o.text, t.on(ot + Le, "a.k-grid-" + (a || "").replace(/\s/g, ""), {
                    commandName: a
                }, Se(o.click, e)))
            }

            function l(e, t, n) {
                return we(e, function(e) {
                    var i, r;
                    return e = typeof e === ct ? {
                        field: e
                    } : e, (!f(e) || n) && (e.attributes = W(e.attributes), e.footerAttributes = W(e.footerAttributes), e.headerAttributes = W(e.headerAttributes), i = !0), e.columns && (e.columns = l(e.columns, t, i)), r = ue.guid(), e.headerAttributes = be({
                        id: r
                    }, e.headerAttributes), be({
                        encoded: t,
                        hidden: i
                    }, e)
                })
            }

            function c(e, t) {
                var n = [];
                return d(e, t, n), n[n.length - 1]
            }

            function d(e, t, n) {
                var i, r;
                for (n = n || [], i = 0; t.length > i; i++) {
                    if (e === t[i]) return !0;
                    if (t[i].columns) {
                        if (r = n.length, n.push(t[i]), d(e, t[i].columns, n)) return !0;
                        n.splice(r, n.length - r)
                    }
                }
                return !1
            }

            function u(e, t) {
                var n = t ? j : W;
                e.hidden = !t, e.attributes = n(e.attributes), e.footerAttributes = n(e.footerAttributes), e.headerAttributes = n(e.headerAttributes)
            }

            function h() {
                return "none" !== this.style.display
            }

            function f(e) {
                return p([e]).length > 0
            }

            function p(e) {
                return ye(e, function(e) {
                    var t = !e.hidden;
                    return t && e.columns && (t = p(e.columns).length > 0), t
                })
            }

            function m(t) {
                return e(t).map(function() {
                    return this.toArray()
                })
            }

            function g(e, t, n) {
                var i = b(R(t)),
                    r = b(P(t)),
                    o = e.rowSpan;
                e.rowSpan = n ? i > r ? o - (i - r) || 1 : o + (r - i) : i > r ? o + (i - r) : o - (r - i) || 1
            }

            function v(t, n, i, r, o, a, s) {
                var l, c, d = b(t),
                    u = b([n]);
                d > u && (l = Array(s + 1).join('<th class="k-group-cell k-header" scope="col">&nbsp;</th>'), c = a.children(":not(.k-filter-row)"), e(Array(d - u + 1).join("<tr>" + l + "</tr>")).insertAfter(c.last())), F(a, d - u), w(i, r, o, a)
            }

            function _(t, n, i) {
                var r, o, a, s, l, c, d, u;
                for (i = i || 0, a = n, n = H(n), s = {}, l = t.find(">tr:not(.k-filter-row)"), c = function() {
                    var t = e(this);
                    return !t.hasClass("k-group-cell") && !t.hasClass("k-hierarchy-cell")
                }, d = 0, u = n.length; u > d; d++) r = y(n[d], a), s[r.row] || (s[r.row] = l.eq(r.row).find(".k-header").filter(c)), o = s[r.row].eq(r.cell), o.attr(ue.attr("index"), i + d);
                return n.length
            }

            function b(e) {
                var t, n, i = 1,
                    r = 0;
                for (t = 0; e.length > t; t++) e[t].columns && (n = b(e[t].columns), n > r && (r = n));
                return i + r
            }

            function w(t, n, i, r) {
                var o, a, s = C(t[0], n),
                    l = i.find(">tr:not(.k-filter-row):eq(" + s.row + ")>th.k-header"),
                    c = e(),
                    d = s.cell;
                for (o = 0; t.length > o; o++) c = c.add(l.eq(d + o));
                for (r.find(">tr:not(.k-filter-row)").eq(s.row).append(c), a = [], o = 0; t.length > o; o++) t[o].columns && (a = a.concat(t[o].columns));
                a.length && w(a, n, i, r)
            }

            function y(e, t, n, i) {
                var r, o;
                for (n = n || 0, i = i || {}, i[n] = i[n] || 0, o = 0; t.length > o; o++) {
                    if (t[o] == e) {
                        r = {
                            cell: i[n],
                            row: n
                        };
                        break
                    }
                    if (t[o].columns && (r = y(e, t[o].columns, n + 1, i))) break;
                    i[n]++
                }
                return r
            }

            function k(e, t, n, i) {
                var r, o = n.locked;
                do r = e[t], t += i ? 1 : -1; while (r && t > -1 && e.length > t && r != n && !r.columns && r.locked == o);
                return r
            }

            function x(e, t, n, i) {
                var r, o, a, s;
                return t.columns ? (t = t.columns, t[i ? 0 : t.length - 1]) : (r = c(t, e), o = r ? r.columns : e, a = xe(t, o), 0 === a && i ? a++ : a != o.length - 1 || i ? (a > 0 || 0 === a && !i) && (a += i ? -1 : 1) : a--, s = xe(n, o), t = k(o, a, n, s > a), t && t != n && t.columns ? x(e, t, n, i) : null)
            }

            function C(e, t, n, i) {
                var r, o;
                for (n = n || 0, i = i || {}, i[n] = i[n] || 0, o = 0; t.length > o; o++) {
                    if (t[o] == e) {
                        r = {
                            cell: i[n],
                            row: n
                        };
                        break
                    }
                    if (t[o].columns && (r = C(e, t[o].columns, n + 1, i))) break;
                    t[o].hidden || i[n]++
                }
                return r
            }

            function S(e) {
                var t = T(R(e));
                return t.concat(T(P(e)))
            }

            function T(e) {
                var t, n = [],
                    i = [];
                for (t = 0; e.length > t; t++) n.push(e[t]), e[t].columns && (i = i.concat(e[t].columns));
                return i.length && (n = n.concat(T(i))), n
            }

            function D(e) {
                var t, n, i = 0;
                for (n = 0; e.length > n; n++) t = e[n], t.columns ? i += D(t.columns) : t.hidden && i++;
                return i
            }

            function A(e) {
                var t, n, i, r = 0;
                for (n = 0, i = e.length; i > n; n++) t = e[n].style.width, t && -1 == t.indexOf("%") && (r += parseInt(t, 10));
                return r
            }

            function E(e, t) {
                var n, i, r = e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");
                for (i = 0; r.length > i; i++) n = r[i].rowSpan, n > 1 && (r[i].rowSpan = n - t || 1)
            }

            function F(e, t) {
                var n, i = e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");
                for (n = 0; i.length > n; n++) i[n].rowSpan += t
            }

            function I(t) {
                var n, i = t.find("tr:not(.k-filter-row)"),
                    r = i.filter(function() {
                        return !e(this).children().length
                    }).remove().length,
                    o = i.find("th:not(.k-group-cell,.k-hierarchy-cell)");
                for (n = 0; o.length > n; n++) o[n].rowSpan > 1 && (o[n].rowSpan -= r);
                return i.length - r
            }

            function M(e, t, n, i, r) {
                var o, a, s, l = [];
                for (o = 0, s = e.length; s > o; o++) a = n[i] || [], a.push(t.eq(r + o)), n[i] = a, e[o].columns && (l = l.concat(e[o].columns));
                l.length && M(l, t, n, i + 1, r + e.length)
            }

            function R(e) {
                return ye(e, function(e) {
                    return e.locked
                })
            }

            function P(e) {
                return ye(e, function(e) {
                    return !e.locked
                })
            }

            function z(e) {
                return ye(e, function(e) {
                    return !e.locked && f(e)
                })
            }

            function B(e) {
                return ye(e, function(e) {
                    return e.locked && f(e)
                })
            }

            function L(e) {
                var t, n = [];
                for (t = 0; e.length > t; t++) e[t].hidden || (e[t].columns ? n = n.concat(L(e[t].columns)) : n.push(e[t]));
                return n
            }

            function H(e) {
                var t, n = [];
                for (t = 0; e.length > t; t++) e[t].columns ? n = n.concat(H(e[t].columns)) : n.push(e[t]);
                return n
            }

            function N(n) {
                var i, r = n.find(">tr:not(.k-filter-row)"),
                    o = function() {
                        var t = e(this);
                        return !t.hasClass("k-group-cell") && !t.hasClass("k-hierarchy-cell")
                    },
                    a = e();
                return r.length > 1 && (a = r.find("th").filter(o).filter(function() {
                    return this.rowSpan > 1
                })), a = a.add(r.last().find("th").filter(o)), i = ue.attr("index"), a.sort(function(n, r) {
                    var o, a;
                    return n = e(n), r = e(r), o = n.attr(i), a = r.attr(i), o === t && (o = e(n).index()), a === t && (a = e(r).index()), o = parseInt(o, 10), a = parseInt(a, 10), o > a ? 1 : a > o ? -1 : 0
                }), a
            }

            function O(t) {
                var n, i, r, o, a, s, l, c = t.closest("table"),
                    d = e().add(t),
                    u = t.closest("tr"),
                    h = c.find("tr:not(.k-filter-row)"),
                    f = h.index(u);
                if (f > 0) {
                    for (n = h.eq(f - 1), i = n.find("th:not(.k-group-cell,.k-hierarchy-cell)").filter(function() {
                        return !e(this).attr("rowspan")
                    }), r = 0, o = u.find("th:not(.k-group-cell,.k-hierarchy-cell)").index(t), a = t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)").filter(function() {
                        return this.colSpan > 1
                    }), s = 0; a.length > s; s++) r += a[s].colSpan || 1;
                    for (o += Math.max(r - 1, 0), r = 0, s = 0; i.length > s; s++)
                        if (l = i.eq(s), r += l.attr("colSpan") ? l[0].colSpan : 1, o >= s && r > o) {
                            d = O(l).add(d);
                            break
                        }
                }
                return d
            }

            function V(t) {
                var n, i, r, o, a, s, l, c = t.closest("thead"),
                    d = e().add(t),
                    u = t.closest("tr"),
                    h = c.find("tr:not(.k-filter-row)"),
                    f = h.index(u) + t[0].rowSpan,
                    p = ue.attr("colspan");
                if (h.length - 1 >= f) {
                    for (n = u.next(), i = t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)"), i = i.filter(function() {
                        return !this.rowSpan || 1 === this.rowSpan
                    }), o = 0, r = 0; i.length > r; r++) o += parseInt(i.eq(r).attr(p), 10) || 1;
                    for (a = n.find("th:not(.k-group-cell,.k-hierarchy-cell)"), s = parseInt(t.attr(p), 10) || 1, r = 0; s > r;) n = a.eq(r + o), d = d.add(V(n)), l = parseInt(n.attr(p), 10), l > 1 && (s -= l - 1), r++
                }
                return d
            }

            function U(t, n, i, r) {
                var o, a = t;
                return r && t.empty(), pe ? t[0].innerHTML = i : (o = document.createElement("div"), o.innerHTML = "<table><tbody>" + i + "</tbody></table>", t = o.firstChild.firstChild, n[0].replaceChild(t, a[0]), t = e(t)), t
            }

            function W(e) {
                e = e || {};
                var t = e.style;
                return t ? (t = t.replace(/((.*)?display)(.*)?:([^;]*)/i, "$1:none"), t === e.style && (t = t.replace(/(.*)?/i, "display:none;$1"))) : t = "display:none", be({}, e, {
                    style: t
                })
            }

            function j(e) {
                e = e || {};
                var t = e.style;
                return t && (e.style = t.replace(/(display\s*:\s*none\s*;?)*/gi, "")), e
            }

            function q(t, n, i, r) {
                var o, a = t.find(">colgroup"),
                    s = we(n, function(e) {
                        return o = e.width, o && 0 !== parseInt(o, 10) ? ue.format('<col style="width:{0}"/>', typeof o === ct ? o : o + "px") : "<col />"
                    });
                (i || a.find(".k-hierarchy-col").length) && s.splice(0, 0, '<col class="k-hierarchy-col" />'), a.length && a.remove(), a = e(Array(r + 1).join('<col class="k-group-col">') + s.join("")), a.is("colgroup") || (a = e("<colgroup/>").append(a)), t.prepend(a), yt.msie && 8 == yt.version && (t.css("display", "inline-table"), window.setTimeout(function() {
                    t.css("display", "")
                }, 1))
            }

            function G(e, t) {
                var n, i, r = 0,
                    o = e.find("th:not(.k-group-cell)");
                for (n = 0, i = t.length; i > n; n++) t[n].locked && (o.eq(n).insertBefore(o.eq(r)), o = e.find("th:not(.k-group-cell)"), r++)
            }

            function $(e) {
                var t, n, i, r = {};
                for (n = 0, i = e.length; i > n; n++) t = e[n], r[t.value] = t.text;
                return r
            }

            function Y(e, t, n, i) {
                var r = n && n.length && _e(n[0]) && "value" in n[0],
                    o = r ? $(n)[e] : e;
                return o = null != o ? o : "", t ? ue.format(t, o) : i === !1 ? o : ue.htmlEncode(o)
            }

            function K(e, t, n) {
                for (var i, r = 0, o = e[r]; o;) {
                    if (i = n ? !0 : "none" !== o.style.display, i && !vt.test(o.className) && --t < 0) {
                        o.style.display = n ? "" : "none";
                        break
                    }
                    o = e[++r]
                }
            }

            function Q(t, n) {
                for (var i, r, o = 0, a = t.length; a > o; o += 1) r = t.eq(o), r.is(".k-grouping-row,.k-detail-row") ? (i = r.children(":not(.k-group-cell):first,.k-detail-cell").last(), i.attr("colspan", parseInt(i.attr("colspan"), 10) - 1)) : (r.hasClass("k-grid-edit-row") && (i = r.children(".k-edit-container")[0]) && (i = e(i), i.attr("colspan", parseInt(i.attr("colspan"), 10) - 1), i.find("col").eq(n).remove(), r = i.find("tr:first")), K(r[0].cells, n, !1))
            }

            function X(e) {
                var t, n, i = [];
                for (n = 0; e.length > n && (t = e[n], "field" in t && "value" in t && "items" in t); n++) i.push(t), t.hasSubgroups && (i = i.concat(X(t.items)));
                return i
            }

            function J(e) {
                var t, n, i = [];
                for (n = 0; e.length > n && (t = e[n], "field" in t && "value" in t && "items" in t); n++) t.hasSubgroups && (i = i.concat(J(t.items))), i.push(t.aggregates);
                return i
            }

            function Z(t, n) {
                for (var i, r, o, a = 0, s = t.length; s > a; a += 1) r = t.eq(a), r.is(".k-grouping-row,.k-detail-row") ? (i = r.children(":not(.k-group-cell):first,.k-detail-cell").last(), i.attr("colspan", parseInt(i.attr("colspan"), 10) + 1)) : (r.hasClass("k-grid-edit-row") && (i = r.children(".k-edit-container")[0]) && (i = e(i), i.attr("colspan", parseInt(i.attr("colspan"), 10) + 1), q(i.find(">form>table"), p(o), !1, 0), r = i.find("tr:first")), K(r[0].cells, n, !0))
            }

            function ee(e, t, n) {
                n = n || 1;
                var i, r, o;
                for (r = 0, o = e.length; o > r; r++) i = e.eq(r).children().last(), i.attr("colspan", parseInt(i.attr("colspan"), 10) + n), i = t.eq(r).children().last(), i.attr("colspan", parseInt(i.attr("colspan"), 10) - n)
            }

            function te(e) {
                var t, n, i = 0,
                    r = e.find(">colgroup>col");
                for (t = 0, n = r.length; n > t; t += 1) i += parseInt(r[t].style.width, 10);
                return i
            }

            function ne(e, t) {
                var n, i, r, o;
                e = e[0], t = t[0], e.rows.length !== t.rows.length && (n = e.offsetHeight, i = t.offsetHeight, n > i ? (r = t.rows[t.rows.length - 1], _t.test(r.className) && (r = t.rows[t.rows.length - 2]), o = n - i) : (r = e.rows[e.rows.length - 1], _t.test(r.className) && (r = e.rows[e.rows.length - 2]), o = i - n), r.style.height = r.offsetHeight + o + "px")
            }

            function ie(e, t) {
                var n, i = e.offsetHeight,
                    r = t.offsetHeight;
                i > r ? n = i + "px" : r > i && (n = r + "px"), n && (e.style.height = t.style.height = n)
            }

            function re(e, t) {
                var n, i, r;
                if (typeof e === ct && e === t) return e;
                if (_e(e) && e.name === t) return e;
                if (ke(e))
                    for (n = 0, i = e.length; i > n; n++)
                        if (r = e[n], typeof r === ct && r === t || r.name === t) return r;
                return null
            }

            function oe(t, n) {
                var i, r, o = yt.msie || yt.edge;
                if (n === !0) {
                    if (t = e(t), i = t.parent().scrollTop(), r = t.parent().scrollLeft(), o) try {
                        t[0].setActive()
                    } catch (a) {
                        t[0].focus()
                    } else t[0].focus();
                    t.parent().scrollTop(i).scrollLeft(r)
                } else e(t).one("focusin", function(e) {
                    e.preventDefault()
                }).focus()
            }

            function ae(t) {
                return e(t).is(":button,a,:input,a>.k-icon,textarea,span.k-select,span.k-icon,span.k-link,.k-input,.k-multiselect-wrap,.k-tool-icon")
            }

            function se(n) {
                var i = e(n.currentTarget),
                    r = i.is("th"),
                    o = this.table.add(this.lockedTable),
                    a = this.thead.parent().add(e(">table", this.lockedHeader)),
                    s = ae(n.target),
                    l = i.closest("table")[0];
                if (!ue.support.touch) return s && i.find(ue.roleSelector("filtercell")).length ? (this._setCurrent(i), t) : ((l === o[0] || l === o[1] || l === a[0] || l === a[1]) && (e(n.target).is("a.k-i-collapse, a.k-i-expand") || (this.options.navigatable && this._setCurrent(i), (r || !s) && setTimeout(function() {
                    xt && e(ue._activeElement()).hasClass("k-widget") || ae(ue._activeElement()) || oe(l, !0)
                }), r && n.preventDefault())), t)
            }

            function le(e) {
                return e && (e.hasClass("k-edit-cell") || e.parent().hasClass("k-grid-edit-row"))
            }

            function ce(e, t, i) {
                return '<tr role="row" class="k-grouping-row">' + n(t) + '<td colspan="' + e + '" aria-expanded="true"><p class="k-reset"><a class="k-icon k-i-collapse" href="#" tabindex="-1"></a>' + i + "</p></td></tr>"
            }

            function de(e) {
                return '<tr role="row" class="k-grouping-row"><td colspan="' + e + '" aria-expanded="true"><p class="k-reset">&nbsp;</p></td></tr>'
            }
            var ue = window.kendo,
                he = ue.ui,
                fe = ue.data.DataSource,
                pe = ue.support.tbodyInnerHtml,
                me = ue._activeElement,
                ge = he.Widget,
                ve = ue.keys,
                _e = e.isPlainObject,
                be = e.extend,
                we = e.map,
                ye = e.grep,
                ke = e.isArray,
                xe = e.inArray,
                Ce = Array.prototype.push,
                Se = e.proxy,
                Te = ue.isFunction,
                De = e.isEmptyObject,
                Ae = Math,
                Ee = "progress",
                Fe = "error",
                Ie = ":not(.k-group-cell):not(.k-hierarchy-cell):visible",
                Me = "tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",
                Re = "tr:not(.k-footer-template):visible",
                Pe = ":not(.k-group-cell):not(.k-hierarchy-cell):visible",
                ze = Re + ":first>" + Pe + ":first",
                Be = "th.k-header:not(.k-group-cell):not(.k-hierarchy-cell)",
                Le = ".kendoGrid",
                He = "edit",
                Ne = "save",
                Oe = "remove",
                Ve = "detailInit",
                Ue = "filterMenuInit",
                We = "columnMenuInit",
                je = "change",
                qe = "columnHide",
                Ge = "columnShow",
                $e = "saveChanges",
                Ye = "dataBound",
                Ke = "detailExpand",
                Qe = "detailCollapse",
                Xe = "k-state-focused",
                Je = "k-state-selected",
                Ze = "k-grid-norecords",
                et = "columnResize",
                tt = "columnReorder",
                nt = "columnLock",
                it = "columnUnlock",
                rt = "navigate",
                ot = "click",
                at = "height",
                st = "tabIndex",
                lt = "function",
                ct = "string",
                dt = "Are you sure you want to delete this record?",
                ut = "No records available.",
                ht = "Delete",
                ft = "Cancel",
                pt = /(\}|\#)/gi,
                mt = /#/gi,
                gt = "[\\x20\\t\\r\\n\\f]",
                vt = RegExp("(^|" + gt + ")(k-group-cell|k-hierarchy-cell)(" + gt + "|$)"),
                _t = RegExp("(^|" + gt + ")(k-filter-row)(" + gt + "|$)"),
                bt = '<a class="k-button k-button-icontext #=className#" #=attr# href="\\#"><span class="#=iconClass# #=imageClass#"></span>#=text#</a>',
                wt = !1,
                yt = ue.support.browser,
                kt = yt.msie && 7 == yt.version,
                xt = yt.msie && 8 == yt.version,
                Ct = ge.extend({
                    init: function(e, t) {
                        var n = this;
                        ge.fn.init.call(n, e, t), n._refreshHandler = Se(n.refresh, n), n.setDataSource(t.dataSource), n.wrap()
                    },
                    setDataSource: function(e) {
                        var t = this;
                        t.dataSource && t.dataSource.unbind(je, t._refreshHandler), t.dataSource = e, t.dataSource.bind(je, t._refreshHandler)
                    },
                    options: {
                        name: "VirtualScrollable",
                        itemHeight: e.noop,
                        prefetch: !0
                    },
                    destroy: function() {
                        var e = this;
                        ge.fn.destroy.call(e), e.dataSource.unbind(je, e._refreshHandler), e.wrapper.add(e.verticalScrollbar).off(Le), e.drag && (e.drag.destroy(), e.drag = null), e.wrapper = e.element = e.verticalScrollbar = null, e._refreshHandler = null
                    },
                    wrap: function() {
                        var t, n = this,
                            i = ue.support.scrollbar() + 1,
                            r = n.element;
                        r.css({
                            width: "auto",
                            overflow: "hidden"
                        }).css(wt ? "padding-left" : "padding-right", i), n.content = r.children().first(), t = n.wrapper = n.content.wrap('<div class="k-virtual-scrollable-wrap"/>').parent().bind("DOMMouseScroll" + Le + " mousewheel" + Le, Se(n._wheelScroll, n)), ue.support.kineticScrollNeeded && (n.drag = new ue.UserEvents(n.wrapper, {
                            global: !0,
                            start: function(e) {
                                e.sender.capture()
                            },
                            move: function(e) {
                                n.verticalScrollbar.scrollTop(n.verticalScrollbar.scrollTop() - e.y.delta), t.scrollLeft(t.scrollLeft() - e.x.delta), e.preventDefault()
                            }
                        })), n.verticalScrollbar = e('<div class="k-scrollbar k-scrollbar-vertical" />').css({
                            width: i
                        }).appendTo(r).bind("scroll" + Le, Se(n._scroll, n))
                    },
                    _wheelScroll: function(t) {
                        if (!t.ctrlKey) {
                            var n = this.verticalScrollbar,
                                i = n.scrollTop(),
                                r = ue.wheelDeltaY(t);
                            !r || r > 0 && 0 === i || 0 > r && i + n[0].clientHeight == n[0].scrollHeight || (t.preventDefault(), e(t.currentTarget).one("wheel" + Le, !1), this.verticalScrollbar.scrollTop(i + -r))
                        }
                    },
                    _scroll: function(e) {
                        var t = this,
                            n = !t.options.prefetch,
                            i = e.currentTarget.scrollTop,
                            r = t.dataSource,
                            o = t.itemHeight,
                            a = r.skip() || 0,
                            s = t._rangeStart || a,
                            l = t.element.innerHeight(),
                            c = !!(t._scrollbarTop && t._scrollbarTop > i),
                            d = Ae.max(Ae.floor(i / o), 0),
                            u = Ae.max(d + Ae.floor(l / o), 0);
                        t._scrollTop = i - s * o, t._scrollbarTop = i, t._scrolling = n, t._fetch(d, u, c) || (t.wrapper[0].scrollTop = t._scrollTop), n && (t._scrollingTimeout && clearTimeout(t._scrollingTimeout), t._scrollingTimeout = setTimeout(function() {
                            t._scrolling = !1, t._page(t._rangeStart, t.dataSource.take())
                        }, 100))
                    },
                    itemIndex: function(e) {
                        var t = this._rangeStart || this.dataSource.skip() || 0;
                        return t + e
                    },
                    position: function(e) {
                        var t, n = this._rangeStart || this.dataSource.skip() || 0,
                            i = this.dataSource.pageSize();
                        return t = e > n ? e - n + 1 : n - e - 1, t > i ? i : t
                    },
                    scrollIntoView: function(e) {
                        var t = this.wrapper[0],
                            n = t.clientHeight,
                            i = this._scrollTop || t.scrollTop,
                            r = e[0].offsetTop,
                            o = e[0].offsetHeight;
                        i > r ? this.verticalScrollbar[0].scrollTop -= n / 2 : r + o >= i + n && (this.verticalScrollbar[0].scrollTop += n / 2)
                    },
                    _fetch: function(t, n, i) {
                        var r = this,
                            o = r.dataSource,
                            a = r.itemHeight,
                            s = o.take(),
                            l = r._rangeStart || o.skip() || 0,
                            c = Ae.floor(t / s) * s,
                            d = !1,
                            u = .33;
                        return l > t ? (d = !0, l = Ae.max(0, n - s), r._scrollTop = (t - l) * a, r._page(l, s)) : n >= l + s && !i ? (d = !0, l = t, r._scrollTop = a, r._page(l, s)) : !r._fetching && r.options.prefetch && (c + s - s * u > t && t > s && o.prefetch(c - s, s, e.noop), n > c + s * u && o.prefetch(c + s, s, e.noop)), d
                    },
                    fetching: function() {
                        return this._fetching
                    },
                    _page: function(e, t) {
                        var n = this,
                            i = !n.options.prefetch,
                            r = n.dataSource;
                        clearTimeout(n._timeout), n._fetching = !0, n._rangeStart = e, r.inRange(e, t) ? r.range(e, t) : (i || ue.ui.progress(n.wrapper.parent(), !0), n._timeout = setTimeout(function() {
                            n._scrolling || (i && ue.ui.progress(n.wrapper.parent(), !0), r.range(e, t))
                        }, 100))
                    },
                    repaintScrollbar: function() {
                        var e, t = this,
                            n = "",
                            i = 25e4,
                            r = t.dataSource,
                            o = ue.support.kineticScrollNeeded ? 0 : ue.support.scrollbar(),
                            a = t.wrapper[0],
                            s = t.itemHeight = t.options.itemHeight() || 0,
                            l = a.scrollWidth > a.offsetWidth ? o : 0,
                            c = r.total() * s + l;
                        for (e = 0; e < Ae.floor(c / i); e++) n += '<div style="width:1px;height:' + i + 'px"></div>';
                        c % i && (n += '<div style="width:1px;height:' + c % i + 'px"></div>'), t.verticalScrollbar.html(n), a.scrollTop = t._scrollTop
                    },
                    refresh: function() {
                        var e = this,
                            t = e.dataSource,
                            n = e._rangeStart;
                        ue.ui.progress(e.wrapper.parent(), !1), clearTimeout(e._timeout), e.repaintScrollbar(), e.drag && e.drag.cancel(), n && !e._fetching && (e._rangeStart = t.skip(), 1 === t.page() && (e.verticalScrollbar[0].scrollTop = 0)), e._fetching = !1
                    }
                }),
                St = {
                    create: {
                        text: "Add new record",
                        imageClass: "k-add",
                        className: "k-grid-add",
                        iconClass: "k-icon"
                    },
                    cancel: {
                        text: "Cancel changes",
                        imageClass: "k-cancel",
                        className: "k-grid-cancel-changes",
                        iconClass: "k-icon"
                    },
                    save: {
                        text: "Save changes",
                        imageClass: "k-update",
                        className: "k-grid-save-changes",
                        iconClass: "k-icon"
                    },
                    destroy: {
                        text: "Delete",
                        imageClass: "k-delete",
                        className: "k-grid-delete",
                        iconClass: "k-icon"
                    },
                    edit: {
                        text: "Edit",
                        imageClass: "k-edit",
                        className: "k-grid-edit",
                        iconClass: "k-icon"
                    },
                    update: {
                        text: "Update",
                        imageClass: "k-update",
                        className: "k-primary k-grid-update",
                        iconClass: "k-icon"
                    },
                    canceledit: {
                        text: "Cancel",
                        imageClass: "k-cancel",
                        className: "k-grid-cancel",
                        iconClass: "k-icon"
                    },
                    excel: {
                        text: "Export to Excel",
                        imageClass: "k-i-excel",
                        className: "k-grid-excel",
                        iconClass: "k-icon"
                    },
                    pdf: {
                        text: "Export to PDF",
                        imageClass: "k-i-pdf",
                        className: "k-grid-pdf",
                        iconClass: "k-icon"
                    }
                },
                Tt = ue.ui.DataBoundWidget.extend({
                    init: function(t, n, i) {
                        var r = this;
                        n = ke(n) ? {
                            dataSource: n
                        } : n, ge.fn.init.call(r, t, n), i && (r._events = i), wt = ue.support.isRtl(t), r._element(), r._aria(), r._columns(r.options.columns), r._dataSource(), r._tbody(), r._pageable(), r._thead(), r._groupable(), r._toolbar(), r._setContentHeight(), r._templates(), r._navigatable(), r._selectable(), r._clipboard(), r._details(), r._editable(), r._attachCustomCommandsEvent(), r._minScreenSupport(), r.options.autoBind ? r.dataSource.fetch() : (r._group = r._groups() > 0, r._footer()), r.lockedContent && (r.wrapper.addClass("k-grid-lockedcolumns"), r._resizeHandler = function() {
                            r.resize()
                        }, e(window).on("resize" + Le, r._resizeHandler)), ue.notify(r)
                    },
                    events: [je, "dataBinding", "cancel", Ye, Ke, Qe, Ve, Ue, We, He, Ne, Oe, $e, et, tt, Ge, qe, nt, it, rt],
                    setDataSource: function(e) {
                        var t = this,
                            n = t.options.scrollable;
                        t.options.dataSource = e, t._dataSource(), t._pageable(), t._thead(), n && (n.virtual ? t.content.find(">.k-virtual-scrollable-wrap").scrollLeft(0) : t.content.scrollLeft(0)), t.options.groupable && t._groupable(), t.virtualScrollable && t.virtualScrollable.setDataSource(t.options.dataSource), t.options.navigatable && t._navigatable(), t.options.selectable && t._selectable(), t.options.autoBind && e.fetch()
                    },
                    options: {
                        name: "Grid",
                        columns: [],
                        toolbar: null,
                        autoBind: !0,
                        filterable: !1,
                        scrollable: !0,
                        sortable: !1,
                        selectable: !1,
                        allowCopy: !1,
                        navigatable: !1,
                        pageable: !1,
                        editable: !1,
                        groupable: !1,
                        rowTemplate: "",
                        altRowTemplate: "",
                        noRecords: !1,
                        dataSource: {},
                        height: null,
                        resizable: !1,
                        reorderable: !1,
                        columnMenu: !1,
                        detailTemplate: null,
                        columnResizeHandleWidth: 3,
                        mobile: "",
                        messages: {
                            editable: {
                                cancelDelete: ft,
                                confirmation: dt,
                                confirmDelete: ht
                            },
                            commands: {
                                create: St.create.text,
                                cancel: St.cancel.text,
                                save: St.save.text,
                                destroy: St.destroy.text,
                                edit: St.edit.text,
                                update: St.update.text,
                                canceledit: St.canceledit.text,
                                excel: St.excel.text,
                                pdf: St.pdf.text
                            },
                            noRecords: ut
                        }
                    },
                    destroy: function() {
                        var t, n = this;
                        n._angularItems("cleanup"), n._destroyColumnAttachments(), ge.fn.destroy.call(n), this._navigatableTables = null, n._resizeHandler && e(window).off("resize" + Le, n._resizeHandler), n.pager && n.pager.element && n.pager.destroy(), n.pager = null, n.groupable && n.groupable.element && n.groupable.element.kendoGroupable("destroy"), n.groupable = null, n.options.reorderable && n.wrapper.data("kendoReorderable").destroy(), n.selectable && n.selectable.element && (n.selectable.destroy(), n.clearArea(), n.copyHandler && (n.wrapper.off("keydown", n.copyHandler), n.unbind(n.copyHandler)), n.updateClipBoardState && (n.unbind(n.updateClipBoardState), n.updateClipBoardState = null), n.clearAreaHandler && n.wrapper.off("keyup", n.clearAreaHandler)), n.selectable = null, n.resizable && (n.resizable.destroy(), n._resizeUserEvents && (n._resizeHandleDocumentClickHandler && e(document).off("click", n._resizeHandleDocumentClickHandler), n._resizeUserEvents.destroy(), n._resizeUserEvents = null), n.resizable = null), n.virtualScrollable && n.virtualScrollable.element && n.virtualScrollable.destroy(), n.virtualScrollable = null, n._destroyEditable(), n.dataSource && (n.dataSource.unbind(je, n._refreshHandler).unbind(Ee, n._progressHandler).unbind(Fe, n._errorHandler), n._refreshHandler = n._progressHandler = n._errorHandler = null), t = n.element.add(n.wrapper).add(n.table).add(n.thead).add(n.wrapper.find(">.k-grid-toolbar")), n.content && (t = t.add(n.content).add(n.content.find(">.k-virtual-scrollable-wrap"))), n.lockedHeader && n._removeLockedContainers(), n.pane && n.pane.destroy(), n.minScreenResizeHandler && e(window).off("resize", n.minScreenResizeHandler), n._draggableInstance && n._draggableInstance.element && n._draggableInstance.destroy(), n._draggableInstance = null, t.off(Le), ue.destroy(n.wrapper), n.rowTemplate = n.altRowTemplate = n.lockedRowTemplate = n.lockedAltRowTemplate = n.detailTemplate = n.footerTemplate = n.groupFooterTemplate = n.lockedGroupFooterTemplate = n.noRecordsTemplate = null, n.scrollables = n.thead = n.tbody = n.element = n.table = n.content = n.footer = n.wrapper = n.lockedTable = n.lockedContent = n.lockedHeader = n.lockedFooter = n._groupableClickHandler = n._setContentWidthHandler = null
                    },
                    getOptions: function() {
                        var n, i, r, o = this.options;
                        return o.dataSource = null, n = be(!0, {}, this.options), n.columns = ue.deepExtend([], this.columns), i = this.dataSource, r = i.options.data && i._data, i.options.data = null, n.dataSource = e.extend(!0, {}, i.options), i.options.data = r, n.dataSource.data = r, n.dataSource.page = i.page(), n.dataSource.filter = i.filter(), n.dataSource.pageSize = i.pageSize(), n.dataSource.sort = i.sort(), n.dataSource.group = i.group(), n.dataSource.aggregate = i.aggregate(), n.dataSource.transport && (n.dataSource.transport.dataSource = null), n.pageable && n.pageable.pageSize && (n.pageable.pageSize = i.pageSize()), n.$angular = t, n
                    },
                    setOptions: function(e) {
                        var t, n, i, r, o = this.getOptions();
                        ue.deepExtend(o, e), e.dataSource || (o.dataSource = this.dataSource), t = this.wrapper, n = this._events, i = this.element, this.destroy(), this.options = null, this._isMobile && (r = t.closest(ue.roleSelector("pane")).parent(), r.after(t), r.remove(), t.removeClass("k-grid-mobile")), t[0] !== i[0] && (t.before(i), t.remove()), i.empty(), this.init(i, o, n), this._setEvents(o)
                    },
                    items: function() {
                        return this.lockedContent ? this._items(this.tbody).add(this._items(this.lockedTable.children("tbody"))) : this._items(this.tbody)
                    },
                    _items: function(t) {
                        return t.children().filter(function() {
                            var t = e(this);
                            return !t.hasClass("k-grouping-row") && !t.hasClass("k-detail-row") && !t.hasClass("k-group-footer")
                        })
                    },
                    dataItems: function() {
                        var e, t, n, i = ue.ui.DataBoundWidget.fn.dataItems.call(this);
                        if (this.lockedContent) {
                            for (e = i.length, t = Array(2 * e), n = e; --n >= 0;) t[n] = t[n + e] = i[n];
                            i = t
                        }
                        return i
                    },
                    _destroyColumnAttachments: function() {
                        var t = this;
                        t.resizeHandle = null, t.thead && (this.angular("cleanup", function() {
                            return {
                                elements: t.thead.get()
                            }
                        }), t.thead.add(t.lockedHeader).find("th").each(function() {
                            var t = e(this),
                                n = t.data("kendoFilterMenu"),
                                i = t.data("kendoColumnSorter"),
                                r = t.data("kendoColumnMenu");
                            n && n.destroy(), i && i.destroy(), r && r.destroy()
                        }))
                    },
                    _attachCustomCommandsEvent: function() {
                        var e, t, n, i = this,
                            r = H(i.columns || []);
                        for (t = 0, n = r.length; n > t; t++) e = r[t].command, e && s(i, i.wrapper, e)
                    },
                    _aria: function() {
                        var e = this.element.attr("id") || "aria";
                        e && (this._cellId = e + "_active_cell")
                    },
                    _element: function() {
                        var t = this,
                            n = t.element;
                        n.is("table") || (n = t.options.scrollable ? t.element.find("> .k-grid-content > table") : t.element.children("table"), n.length || (n = e("<table />").appendTo(t.element))), kt && n.attr("cellspacing", 0), t.table = n.attr("role", t._hasDetails() ? "treegrid" : "grid"), t._wrapper()
                    },
                    _createResizeHandle: function(t, n) {
                        var i, r, o, a, s, l, c, d = this,
                            u = d.options.columnResizeHandleWidth,
                            h = d.options.scrollable,
                            f = d.resizeHandle,
                            p = this._groups();
                        if (f && d.lockedContent && f.data("th")[0] !== n[0] && (f.off(Le).remove(), f = null), f || (f = d.resizeHandle = e('<div class="k-resize-handle"><div class="k-resize-handle-inner"></div></div>'), t.append(f)), wt) i = n.position().left, h && (a = n.closest(".k-grid-header-wrap, .k-grid-header-locked"), s = yt.msie ? a.scrollLeft() : 0, l = yt.webkit ? a[0].scrollWidth - a[0].offsetWidth - a.scrollLeft() : 0, c = yt.mozilla ? a[0].scrollWidth - a[0].offsetWidth - (a[0].scrollWidth - a[0].offsetWidth - a.scrollLeft()) : 0, i -= l - c + s);
                        else {
                            for (i = n[0].offsetWidth, r = N(n.closest("thead")).filter(":visible"), o = 0; r.length > o && r[o] != n[0]; o++) i += r[o].offsetWidth;
                            p > 0 && (i += t.find(".k-group-cell:first").outerWidth() * p), d._hasDetails() && (i += t.find(".k-hierarchy-cell:first").outerWidth())
                        }
                        f.css({
                            top: n.position().top,
                            left: i - u,
                            height: n.outerHeight(),
                            width: 3 * u
                        }).data("th", n).show(), f.off("dblclick" + Le).on("dblclick" + Le, function() {
                            d._autoFitLeafColumn(n.data("index"))
                        })
                    },
                    _positionColumnResizeHandle: function() {
                        var t = this,
                            n = t.options.columnResizeHandleWidth,
                            i = t.lockedHeader ? t.lockedHeader.find("thead:first") : e();
                        t.thead.add(i).on("mousemove" + Le, "th", function(i) {
                            var o, a, s, l = e(this);
                            l.hasClass("k-group-cell") || l.hasClass("k-hierarchy-cell") || (o = i.clientX / parseFloat(document.documentElement.style.zoom || document.body.style.zoom || 1), a = e(window).scrollLeft(), s = l.offset().left + (wt ? 0 : this.offsetWidth), o + a > s - n && s + n > o + a ? t._createResizeHandle(l.closest("div"), l) : t.resizeHandle ? t.resizeHandle.hide() : r(t.wrapper, ""))
                        })
                    },
                    _resizeHandleDocumentClick: function(t) {
                        e(t.target).closest(".k-column-active").length || (e(document).off(t), this._hideResizeHandle())
                    },
                    _hideResizeHandle: function() {
                        this.resizeHandle && (this.resizeHandle.data("th").removeClass("k-column-active"), this.lockedContent && !this._isMobile ? (this.resizeHandle.off(Le).remove(), this.resizeHandle = null) : this.resizeHandle.hide())
                    },
                    _positionColumnResizeHandleTouch: function() {
                        var t = this,
                            n = t.lockedHeader ? t.lockedHeader.find("thead:first") : e();
                        t._resizeUserEvents = new ue.UserEvents(n.add(t.thead), {
                            filter: "th:not(.k-group-cell):not(.k-hierarchy-cell)",
                            threshold: 10,
                            hold: function(n) {
                                var i = e(n.target);
                                n.preventDefault(), i.addClass("k-column-active"), t._createResizeHandle(i.closest("div"), i), t._resizeHandleDocumentClickHandler || (t._resizeHandleDocumentClickHandler = Se(t._resizeHandleDocumentClick, t)), e(document).on("click", t._resizeHandleDocumentClickHandler)
                            }
                        })
                    },
                    _resizable: function() {
                        var t, n, i, o, a, s, l, c = this,
                            d = c.options,
                            u = this._isMobile,
                            h = ue.support.mobileOS ? 0 : ue.support.scrollbar();
                        d.resizable && (t = d.scrollable ? c.wrapper.find(".k-grid-header-wrap:first") : c.wrapper, u ? c._positionColumnResizeHandleTouch(t) : c._positionColumnResizeHandle(t), c.resizable && c.resizable.destroy(), c.resizable = new he.Resizable(t.add(c.lockedHeader), {
                            handle: (d.scrollable ? "" : ">") + ".k-resize-handle",
                            hint: function(t) {
                                return e('<div class="k-grid-resize-indicator" />').css({
                                    height: t.data("th").outerHeight() + c.tbody.attr("clientHeight")
                                })
                            },
                            start: function(t) {
                                var h, f, p, m;
                                l = e(t.currentTarget).data("th"), u && c._hideResizeHandle(), h = l.closest("table"), f = e.inArray(l[0], N(l.closest("thead")).filter(":visible")), a = h.parent().hasClass("k-grid-header-locked"), p = a ? c.lockedTable : c.table, m = c.footer || e(), c.footer && c.lockedContent && (m = c.footer.children(a ? ".k-grid-footer-locked" : ".k-grid-footer-wrap")), r(c.wrapper, "col-resize"), s = d.scrollable ? h.find("col:not(.k-group-col):not(.k-hierarchy-col):eq(" + f + ")").add(p.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq(" + f + ")")).add(m.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq(" + f + ")")) : p.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq(" + f + ")"), n = t.x.location, i = l.outerWidth(), o = a ? p.children("tbody").outerWidth() : c.tbody.outerWidth(), yt.webkit && c.wrapper.addClass("k-grid-column-resizing")
                            },
                            resize: function(t) {
                                var r, u, f, p, m, g, v = wt ? -1 : 1,
                                    _ = i + t.x.location * v - n * v;
                                d.scrollable ? (a && c.lockedFooter ? r = c.lockedFooter.children("table") : c.footer && (r = c.footer.find(">.k-grid-footer-wrap>table")), r && r[0] || (r = e()), u = l.closest("table"), f = a ? c.lockedTable : c.table, p = !1, m = c.wrapper.width() - h, g = _, a && o - i + g > m && (g = i + (m - o - 2 * h), 0 > g && (g = _), p = !0), g > 10 && (s.css("width", g), o && (g = p ? m - 2 * h : o + t.x.location * v - n * v, f.add(u).add(r).css("width", g), a || (c._footerWidth = g)))) : _ > 10 && s.css("width", _)
                            },
                            resizeend: function() {
                                var e, t, n, o = l.outerWidth();
                                r(c.wrapper, ""), yt.webkit && c.wrapper.removeClass("k-grid-column-resizing"), i != o && (t = c.lockedHeader ? c.lockedHeader.find("thead:first tr:first").add(c.thead.find("tr:first")) : l.parent(), n = l.attr(ue.attr("index")), n || (n = t.find("th:not(.k-group-cell):not(.k-hierarchy-cell)").index(l)), e = H(c.columns)[n], e.width = o, c.trigger(et, {
                                    column: e,
                                    oldWidth: i,
                                    newWidth: o
                                }), c._applyLockedContainersWidth(), c._syncLockedContentHeight(), c._syncLockedHeaderHeight()), c._hideResizeHandle(), l = null
                            }
                        }))
                    },
                    _draggable: function() {
                        var t = this;
                        t.options.reorderable && (t._draggableInstance && t._draggableInstance.destroy(), t._draggableInstance = t.wrapper.kendoDraggable({
                            group: ue.guid(),
                            autoScroll: !0,
                            filter: t.content ? ".k-grid-header:first " + Be : "table:first>.k-grid-header " + Be,
                            drag: function() {
                                t._hideResizeHandle()
                            },
                            hint: function(t) {
                                var n = t.attr(ue.attr("title"));
                                return n && (n = ue.htmlEncode(n)), e('<div class="k-header k-drag-clue" />').css({
                                    width: t.width(),
                                    paddingLeft: t.css("paddingLeft"),
                                    paddingRight: t.css("paddingRight"),
                                    lineHeight: t.height() + "px",
                                    paddingTop: t.css("paddingTop"),
                                    paddingBottom: t.css("paddingBottom")
                                }).html(n || t.attr(ue.attr("field")) || t.text()).prepend('<span class="k-icon k-drag-status k-denied" />')
                            }
                        }).data("kendoDraggable"))
                    },
                    _reorderable: function() {
                        var t, n = this;
                        n.options.reorderable && (n.wrapper.data("kendoReorderable") && n.wrapper.data("kendoReorderable").destroy(), t = function(e, t, i) {
                            var r = e[t],
                                o = e[i],
                                a = c(r, n.columns);
                            return e = a ? a.columns : n.columns, xe(o, e)
                        }, n.wrapper.kendoReorderable({
                            draggable: n._draggableInstance,
                            dragOverContainers: function(e, i) {
                                var r = S(n.columns);
                                return r[e].lockable !== !1 && t(r, e, i) > -1
                            },
                            inSameContainer: function(i) {
                                return e(i.source).parent()[0] === e(i.target).parent()[0] && t(S(n.columns), i.sourceIndex, i.targetIndex) > -1
                            },
                            change: function(e) {
                                var i = S(n.columns),
                                    r = i[e.oldIndex],
                                    o = t(i, e.oldIndex, e.newIndex);
                                n.trigger(tt, {
                                    newIndex: o,
                                    oldIndex: xe(r, i),
                                    column: r
                                }), n.reorderColumn(o, r, "before" === e.position)
                            }
                        }))
                    },
                    _reorderHeader: function(e, t, n) {
                        var i, r, s, l, c = this,
                            d = y(e[0], c.columns),
                            u = y(t, c.columns),
                            h = [];
                        for (i = 0; e.length > i; i++) e[i].columns && (h = h.concat(e[i].columns));
                        r = a(c.lockedHeader, c.thead, "tr:eq(" + d.row + ")>th.k-header:not(.k-group-cell,.k-hierarchy-cell)"), s = R(e).length, l = R([t]).length, h.length ? (s > 0 && 0 === l ? v(e, t, h, c.columns, c.lockedHeader.find("thead"), c.thead, this._groups()) : 0 === s && l > 0 && v(e, t, h, c.columns, c.thead, c.lockedHeader.find("thead"), this._groups()), (t.columns || d.cell - u.cell > 1 || u.cell - d.cell > 1) && (t = x(c.columns, t, e[0], n), t && c._reorderHeader(h, t, n))) : s !== l && g(r[d.cell], c.columns, s), o(r, d.cell, u.cell, n, e.length)
                    },
                    _reorderContent: function(t, n, i) {
                        var r, s, l, c, d = this,
                            u = e(),
                            h = t[0],
                            f = p(t),
                            m = xe(h, H(d.columns)),
                            g = xe(n, H(d.columns)),
                            v = xe(h, L(d.columns)),
                            _ = xe(n, L(d.columns)),
                            b = R(d.columns).length,
                            w = !!n.locked,
                            y = d.footer || d.wrapper.find(".k-grid-footer"),
                            k = r = _;
                        for (n.hidden && (w ? (_ = d.lockedTable.find("colgroup"), k = d.lockedHeader.find("colgroup"), r = e(d.lockedFooter).find(">table>colgroup")) : (_ = d.tbody.prev(), k = d.thead.prev(), r = y.find(".k-grid-footer-wrap").find(">table>colgroup"))), d._hasFilterRow() && o(d.wrapper.find(".k-filter-row th:not(.k-group-cell,.k-hierarchy-cell)"), m, g, i, t.length), o(a(d.lockedHeader, d.thead.prev(), "col:not(.k-group-col,.k-hierarchy-col)"), v, k, i, f.length), d.options.scrollable && o(a(d.lockedTable, d.tbody.prev(), "col:not(.k-group-col,.k-hierarchy-col)"), v, _, i, f.length), y && y.length && (o(a(d.lockedFooter, y.find(".k-grid-footer-wrap"), ">table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"), v, r, i, f.length), o(y.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"), m, g, i, t.length)), s = d.tbody.children(":not(.k-grouping-row,.k-detail-row)"), d.lockedTable && (b > g ? m >= b && ee(d.lockedTable.find(">tbody>tr.k-grouping-row"), d.table.find(">tbody>tr.k-grouping-row"), t.length) : b > m && ee(d.table.find(">tbody>tr.k-grouping-row"), d.lockedTable.find(">tbody>tr.k-grouping-row"), t.length), u = d.lockedTable.find(">tbody>tr:not(.k-grouping-row,.k-detail-row)")), l = 0, c = s.length; c > l; l += 1) o(a(u[l], s[l], ">td:not(.k-group-cell,.k-hierarchy-cell)"), m, g, i, t.length)
                    },
                    _autoFitLeafColumn: function(e) {
                        this.autoFitColumn(H(this.columns)[e])
                    },
                    autoFitColumn: function(t) {
                        var n, i, r, o, a, s, l, c, d, u, p, m, g, v, _, b, w, y = this,
                            k = y.options,
                            x = y.columns,
                            C = y.lockedHeader ? N(y.lockedHeader.find(">table>thead")).filter(h).length : 0,
                            S = "col:not(.k-group-col):not(.k-hierarchy-col)",
                            D = "td:visible:not(.k-group-cell):not(.k-hierarchy-cell)";
                        if (t = "number" == typeof t ? x[t] : _e(t) ? ye(T(x), function(e) {
                            return e === t
                        })[0] : ye(T(x), function(e) {
                            return e.field === t
                        })[0], t && f(t)) {
                            for (n = xe(t, H(x)), o = t.locked, r = o ? y.lockedHeader.children("table") : y.thead.parent(), i = r.find("[data-index='" + n + "']"), s = o ? y.lockedTable : y.table, l = y.footer || e(), y.footer && y.lockedContent && (l = y.footer.children(o ? ".k-grid-footer-locked" : ".k-grid-footer-wrap")), c = l.find("table").first(), y.lockedHeader && !o && (n -= C), d = 0; x.length > d && x[d] !== t; d++) x[d].hidden && n--;
                            if (a = k.scrollable ? r.find(S).eq(n).add(s.children("colgroup").find(S).eq(n)).add(c.find("colgroup").find(S).eq(n)) : s.children("colgroup").find(S).eq(n), u = r.add(s).add(c), p = i.outerWidth(), a.width(""), u.css("table-layout", "fixed"), a.width("auto"), u.addClass("k-autofitting"), u.css("table-layout", ""), m = Math.ceil(Math.max(i.outerWidth(), s.find("tr:not(.k-grouping-row)").eq(0).children(D).eq(n).outerWidth(), c.find("tr").eq(0).children(D).eq(n).outerWidth())) + 1, a.width(m), t.width = m, k.scrollable) {
                                for (g = r.find("col"), _ = 0, b = 0, w = g.length; w > b; b += 1) {
                                    if (v = g[b].style.width, !v || -1 != v.indexOf("%")) {
                                        _ = 0;
                                        break
                                    }
                                    _ += parseInt(v, 10)
                                }
                                _ && u.each(function() {
                                    this.style.width = _ + "px"
                                })
                            }
                            yt.msie && 8 == yt.version && (u.css("display", "inline-table"), setTimeout(function() {
                                u.css("display", "table")
                            }, 1)), u.removeClass("k-autofitting"), y.trigger(et, {
                                column: t,
                                oldWidth: p,
                                newWidth: m
                            }), y._applyLockedContainersWidth(), y._syncLockedContentHeight(), y._syncLockedHeaderHeight()
                        }
                    },
                    reorderColumn: function(e, n, i) {
                        var r, o, a = this,
                            s = c(n, a.columns),
                            l = s ? s.columns : a.columns,
                            d = xe(n, l),
                            u = l[e],
                            h = !!u.locked,
                            f = R(a.columns).length;
                        d !== e && (n.locked || !h || 1 != P(a.columns).length) && (!n.locked || h || 1 != f) && (a._hideResizeHandle(), i === t && (i = d > e), o = [n], a._reorderHeader(o, u, i), a.lockedHeader && (I(a.thead), I(a.lockedHeader)), u.columns && (u = H(u.columns), u = u[i ? 0 : u.length - 1]), n.columns && (o = H(n.columns)), a._reorderContent(o, u, i), r = !!n.locked, r = r != h, n.locked = h, l.splice(i ? e : e + 1, 0, n), l.splice(e > d ? d : d + 1, 1), a._templates(), a._updateColumnCellIndex(), a._updateTablesWidth(), a._applyLockedContainersWidth(), a._syncLockedHeaderHeight(), a._syncLockedContentHeight(), a._updateFirstColumnClass(), r && (h ? a.trigger(nt, {
                            column: n
                        }) : a.trigger(it, {
                            column: n
                        })))
                    },
                    _updateColumnCellIndex: function() {
                        var e, t = 0;
                        this.lockedHeader && (e = this.lockedHeader.find("thead"), t = _(e, R(this.columns))), _(this.thead, P(this.columns), t)
                    },
                    lockColumn: function(e) {
                        var t, n = this.columns;
                        e = "number" == typeof e ? n[e] : ye(n, function(t) {
                            return t.field === e
                        })[0], !e || e.locked || e.hidden || (t = R(n).length - 1, this.reorderColumn(t, e, !1))
                    },
                    unlockColumn: function(e) {
                        var t, n = this.columns;
                        e = "number" == typeof e ? n[e] : ye(n, function(t) {
                            return t.field === e
                        })[0], e && e.locked && !e.hidden && (t = R(n).length, this.reorderColumn(t, e, !0))
                    },
                    cellIndex: function(t) {
                        var n = 0;
                        return this.lockedTable && !e.contains(this.lockedTable[0], t[0]) && (n = H(R(this.columns)).length), e(t).parent().children("td:not(.k-group-cell,.k-hierarchy-cell)").index(t) + n
                    },
                    _modelForContainer: function(t) {
                        t = e(t), t.is("tr") || "popup" === this._editMode() || (t = t.closest("tr"));
                        var n = t.attr(ue.attr("uid"));
                        return this.dataSource.getByUid(n)
                    },
                    _editable: function() {
                        var t, n = this,
                            i = n.selectable && n.selectable.options.multiple,
                            r = n.options.editable,
                            o = function() {
                                var t = me(),
                                    i = n._editContainer;
                                !i || e.contains(i[0], t) || i[0] === t || e(t).closest(".k-animation-container").length || n.editable.end() && n.closeCell()
                            };
                        r && (this.wrapper.addClass("k-editable"), t = n._editMode(), "incell" === t ? r.update !== !1 && n.wrapper.on(ot + Le, "tr:not(.k-grouping-row) > td", function(t) {
                            var r = e(this),
                                o = n.lockedTable && r.closest("table")[0] === n.lockedTable[0];
                            r.hasClass("k-hierarchy-cell") || r.hasClass("k-detail-cell") || r.hasClass("k-group-cell") || r.hasClass("k-edit-cell") || r.has("a.k-grid-delete").length || r.has("button.k-grid-delete").length || r.closest("tbody")[0] !== n.tbody[0] && !o || e(t.target).is(":input") || (n.editable ? n.editable.end() && (i && e(me()).blur(), n.closeCell(), n.editCell(r)) : n.editCell(r))
                        }).on("focusin" + Le, function() {
                            e.contains(this, me()) || (clearTimeout(n.timer), n.timer = null)
                        }).on("focusout" + Le, function() {
                            n.timer = setTimeout(o, 1)
                        }) : r.update !== !1 && n.wrapper.on(ot + Le, "tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit", function(t) {
                            t.preventDefault(), n.editRow(e(this).closest("tr"))
                        }), r.destroy !== !1 ? n.wrapper.on(ot + Le, "tbody>tr:not(.k-detail-row,.k-grouping-row):visible .k-grid-delete", function(t) {
                            t.preventDefault(), t.stopPropagation(), n.removeRow(e(this).closest("tr"))
                        }) : n.wrapper.on(ot + Le, "tbody>tr:not(.k-detail-row,.k-grouping-row):visible button.k-grid-delete", function(e) {
                            e.stopPropagation(), n._confirmation() || e.preventDefault()
                        }))
                    },
                    editCell: function(t) {
                        var n, i, r, o;
                        t = e(t), n = this, i = H(n.columns)[n.cellIndex(t)], r = n._modelForContainer(t), n.closeCell(), !r || r.editable && !r.editable(i.field) || i.command || !i.field || (n._attachModelChange(r), n._editContainer = t, n.editable = t.addClass("k-edit-cell").kendoEditable({
                            fields: {
                                field: i.field,
                                format: i.format,
                                editor: i.editor,
                                values: i.values
                            },
                            model: r,
                            target: n,
                            change: function(e) {
                                n.trigger(Ne, {
                                    values: e.values,
                                    container: t,
                                    model: r
                                }) && e.preventDefault()
                            }
                        }).data("kendoEditable"), o = t.parent().addClass("k-grid-edit-row"), n.lockedContent && ie(o[0], n._relatedRow(o).addClass("k-grid-edit-row")[0]), n.trigger(He, {
                            container: t,
                            model: r
                        }))
                    },
                    _adjustLockedHorizontalScrollBar: function() {
                        var e = this.table,
                            t = e.parent(),
                            n = e[0].offsetWidth > t[0].clientWidth ? ue.support.scrollbar() : 0;
                        this.lockedContent.height(t.height() - n)
                    },
                    _syncLockedContentHeight: function() {
                        this.lockedTable && (this.touchScroller || this._adjustLockedHorizontalScrollBar(), this._adjustRowsHeight(this.table, this.lockedTable))
                    },
                    _syncLockedHeaderHeight: function() {
                        var e, t;
                        this.lockedHeader && (e = this.lockedHeader.children("table"), t = this.thead.parent(), this._adjustRowsHeight(e, t), ne(e, t))
                    },
                    _syncLockedFooterHeight: function() {
                        this.lockedFooter && this.footer && this.footer.length && this._adjustRowsHeight(this.lockedFooter.children("table"), this.footer.find(".k-grid-footer-wrap > table"))
                    },
                    _destroyEditable: function() {
                        var e = this,
                            t = function() {
                                if (e.editable) {
                                    var t = e.editView ? e.editView.element : e._editContainer;
                                    t && (t.off(ot + Le, "a.k-grid-cancel", e._editCancelClickHandler), t.off(ot + Le, "a.k-grid-update", e._editUpdateClickHandler)), e._detachModelChange(), e.editable.destroy(), e.editable = null, e._editContainer = null, e._destroyEditView()
                                }
                            };
                        e.editable && ("popup" !== e._editMode() || e._isMobile ? t() : e._editContainer.data("kendoWindow").bind("deactivate", t).close()), e._actionSheet && (e._actionSheet.destroy(), e._actionSheet = null)
                    },
                    _destroyEditView: function() {
                        this.editView && (this.editView.purge(), this.editView = null, this.pane.navigate(""))
                    },
                    _attachModelChange: function(e) {
                        var t = this;
                        t._modelChangeHandler = function(e) {
                            t._modelChange({
                                field: e.field,
                                model: this
                            })
                        }, e.bind("change", t._modelChangeHandler)
                    },
                    _detachModelChange: function() {
                        var e = this,
                            t = e._editContainer,
                            n = e._modelForContainer(t);
                        n && n.unbind(je, e._modelChangeHandler)
                    },
                    closeCell: function(t) {
                        var n, i, r, o, a = this,
                            s = a._editContainer;
                        s && (n = s.closest("tr").attr(ue.attr("uid")), o = a.dataSource.getByUid(n), t && a.trigger("cancel", {
                            container: s,
                            model: o
                        }) || (s.removeClass("k-edit-cell"), i = H(a.columns)[a.cellIndex(s)], r = s.parent().removeClass("k-grid-edit-row"), a._destroyEditable(), a._displayCell(s, i, o), s.hasClass("k-dirty-cell") && e('<span class="k-dirty"/>').prependTo(s), a.trigger("itemChange", {
                            item: r,
                            data: o,
                            ns: he
                        }), a.lockedContent && ie(r.css("height", "")[0], a._relatedRow(r).css("height", "")[0])))
                    },
                    _displayCell: function(e, t, n) {
                        var i = this,
                            r = {
                                storage: {},
                                count: 0
                            },
                            o = be({}, ue.Template, i.options.templateSettings),
                            a = ue.template(i._cellTmpl(t, r), o);
                        r.count > 0 && (a = Se(a, r.storage)), e.empty().html(a(n)), i.angular("compile", function() {
                            return {
                                elements: e,
                                data: [{
                                    dataItem: n
                                }]
                            }
                        })
                    },
                    removeRow: function(e) {
                        this._confirmation(e) && this._removeRow(e)
                    },
                    _removeRow: function(t) {
                        var n, i = this,
                            r = i._editMode();
                        "incell" !== r && i.cancelRow(), t = e(t), i.lockedContent && (t = t.add(i._relatedRow(t))), t = t.hide(), n = i._modelForContainer(t), n && !i.trigger(Oe, {
                            row: t,
                            model: n
                        }) ? (i.dataSource.remove(n), ("inline" === r || "popup" === r) && i.dataSource.sync()) : "incell" === r && i._destroyEditable()
                    },
                    _editMode: function() {
                        var e = "incell",
                            t = this.options.editable;
                        return t !== !0 && (e = "string" == typeof t ? t : t.mode || e), e
                    },
                    editRow: function(n) {
                        var i, r, o, a = this;
                        n instanceof ue.data.ObservableObject ? i = n : (n = e(n), i = a._modelForContainer(n)), r = a._editMode(), a.cancelRow(), i && (n = a.tbody.children("[" + ue.attr("uid") + "=" + i.uid + "]"), a._attachModelChange(i), "popup" === r ? a._createPopupEditor(i) : "inline" === r ? a._createInlineEditor(n, i) : "incell" === r && e(n).children(Ie).each(function() {
                            var n = e(this),
                                r = H(a.columns)[a.cellIndex(n)];
                            return i = a._modelForContainer(n), i && (!i.editable || i.editable(r.field)) && r.field ? (a.editCell(n), !1) : t
                        }), o = a.editView ? a.editView.element : a._editContainer, o && (this._editCancelClickHandler || (this._editCancelClickHandler = Se(this._editCancelClick, this)), o.on(ot + Le, "a.k-grid-cancel", this._editCancelClickHandler), this._editUpdateClickHandler || (this._editUpdateClickHandler = Se(this._editUpdateClick, this)), o.on(ot + Le, "a.k-grid-update", this._editUpdateClickHandler)))
                    },
                    _editUpdateClick: function(e) {
                        e.preventDefault(), e.stopPropagation(), this.saveRow()
                    },
                    _editCancelClick: function(t) {
                        var n, i = this,
                            r = i.options.navigatable,
                            o = i.editable.options.model,
                            a = i.editView ? i.editView.element : i._editContainer;
                        t.preventDefault(), t.stopPropagation(), i.trigger("cancel", {
                            container: a,
                            model: o
                        }) || (n = i.items().index(e(i.current()).parent()), i.cancelRow(), r && (i._setCurrent(i.items().eq(n).children().filter(Pe).first()), oe(i.table, !0)))
                    },
                    _createPopupEditor: function(n) {
                        var i, r, o, a, s, l, c, d, u, h, f, p = this,
                            m = "<div " + ue.attr("uid") + '="' + n.uid + '" class="k-popup-edit-form' + (p._isMobile ? " k-mobile-list" : "") + '"><div class="k-edit-form-container">',
                            g = [],
                            v = H(p.columns),
                            _ = p.options.editable,
                            b = _.template,
                            w = _e(_) ? _.window : {},
                            y = be({}, ue.Template, p.options.templateSettings);
                        if (w = w || {}, b)
                            for (typeof b === ct && (b = window.unescape(b)), m += ue.template(b, y)(n), o = 0, a = v.length; a > o; o++) i = v[o], i.command && (d = re(i.command, "edit"), d && (r = d));
                        else
                            for (o = 0, a = v.length; a > o; o++) i = v[o], i.command ? i.command && (d = re(i.command, "edit"), d && (r = d)) : (m += '<div class="k-edit-label"><label for="' + i.field + '">' + (i.title || i.field || "") + "</label></div>", n.editable && !n.editable(i.field) || !i.field ? (h = {
                                storage: {},
                                count: 0
                            }, s = ue.template(p._cellTmpl(i, h), y), h.count > 0 && (s = Se(s, h.storage)), m += '<div class="k-edit-field">' + s(n) + "</div>") : (g.push({
                                field: i.field,
                                format: i.format,
                                editor: i.editor,
                                values: i.values
                            }), m += "<div " + ue.attr("container-for") + '="' + i.field + '" class="k-edit-field"></div>'));
                        r && _e(r) && (r.text && _e(r.text) && (l = r.text.update, c = r.text.cancel), r.attr && (u = r.attr)), p._isMobile ? (m += "</div></div>", p.editView = p.pane.append("<div data-" + ue.ns + 'role="view" data-' + ue.ns + 'use-native-scrolling="true" data-' + ue.ns + 'init-widgets="false" class="k-grid-edit-form"><div data-' + ue.ns + 'role="header" class="k-header">' + p._createButton({
                            name: "update",
                            text: l,
                            attr: u
                        }) + (w.title || "Edit") + p._createButton({
                            name: "canceledit",
                            text: c,
                            attr: u
                        }) + "</div>" + m + "</div>"), f = p._editContainer = p.editView.element.find(".k-popup-edit-form")) : (m += '<div class="k-edit-buttons k-state-default">', m += p._createButton({
                            name: "update",
                            text: l,
                            attr: u
                        }) + p._createButton({
                            name: "canceledit",
                            text: c,
                            attr: u
                        }), m += "</div></div></div>", f = p._editContainer = e(m).appendTo(p.wrapper).eq(0).kendoWindow(be({
                            modal: !0,
                            resizable: !1,
                            draggable: !0,
                            title: "Edit",
                            visible: !1,
                            close: function(i) {
                                if (i.userTriggered) {
                                    if (i.sender.element.focus(), p.trigger("cancel", {
                                        container: f,
                                        model: n
                                    })) return i.preventDefault(), t;
                                    var r = p.items().index(e(p.current()).parent());
                                    p.cancelRow(), p.options.navigatable && (p._setCurrent(p.items().eq(r).children().filter(Pe).first()), oe(p.table, !0))
                                }
                            }
                        }, w))), p.editable = p._editContainer.kendoEditable({
                            fields: g,
                            model: n,
                            clearContainer: !1,
                            target: p
                        }).data("kendoEditable"), p._isMobile && f.find("input[type=checkbox],input[type=radio]").parent(".k-edit-field").addClass("k-check").prev(".k-edit-label").addClass("k-check").click(function() {
                            e(this).next().children("input").click()
                        }), p._openPopUpEditor(), p.trigger(He, {
                            container: f,
                            model: n
                        })
                    },
                    _openPopUpEditor: function() {
                        this._isMobile ? this.pane.navigate(this.editView, this._editAnimation) : this._editContainer.data("kendoWindow").center().open()
                    },
                    _createInlineEditor: function(t, n) {
                        var i, r, o, a = this,
                            s = [];
                        a.lockedContent && (t = t.add(a._relatedRow(t))), t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function() {
                            if (r = e(this), i = H(a.columns)[a.cellIndex(r)], i.command || !i.field || n.editable && !n.editable(i.field)) {
                                if (i.command && (o = re(i.command, "edit"))) {
                                    r.empty();
                                    var t, l, c;
                                    _e(o) && (o.text && _e(o.text) && (t = o.text.update, l = o.text.cancel), o.attr && (c = o.attr)), e(a._createButton({
                                        name: "update",
                                        text: t,
                                        attr: c
                                    }) + a._createButton({
                                        name: "canceledit",
                                        text: l,
                                        attr: c
                                    })).appendTo(r)
                                }
                            } else s.push({
                                field: i.field,
                                format: i.format,
                                editor: i.editor,
                                values: i.values
                            }), r.attr(ue.attr("container-for"), i.field), r.empty()
                        }), a._editContainer = t, a.editable = new ue.ui.Editable(t.addClass("k-grid-edit-row"), {
                            target: a,
                            fields: s,
                            model: n,
                            clearContainer: !1
                        }), t.length > 1 && (ie(t[0], t[1]), a._applyLockedContainersWidth()), a.trigger(He, {
                            container: t,
                            model: n
                        })
                    },
                    cancelRow: function(e) {
                        var t, n = this,
                            i = n._editContainer;
                        if (i) {
                            if (t = n._modelForContainer(i), e && n.trigger("cancel", {
                                container: i,
                                model: t
                            })) return;
                            n._destroyEditable(), n.dataSource.cancelChanges(t), n._displayRow("popup" !== n._editMode() ? i : n.tbody.find("[" + ue.attr("uid") + "=" + t.uid + "]"))
                        }
                    },
                    saveRow: function() {
                        var e = this,
                            t = e._editContainer,
                            n = e._modelForContainer(t),
                            i = e.editable;
                        t && i && i.end() && !e.trigger(Ne, {
                            container: t,
                            model: n
                        }) && e.dataSource.sync()
                    },
                    _displayRow: function(t) {
                        var n, i, r, o, a, s = this,
                            l = s._modelForContainer(t),
                            c = t.hasClass("k-state-selected"),
                            d = t.hasClass("k-alt");
                        l && (s.lockedContent && (n = e((d ? s.lockedAltRowTemplate : s.lockedRowTemplate)(l)), s._relatedRow(t.last()).replaceWith(n)), s.angular("cleanup", function() {
                            return {
                                elements: t.get()
                            }
                        }), i = e((d ? s.altRowTemplate : s.rowTemplate)(l)), t.replaceWith(i), s.trigger("itemChange", {
                            item: i,
                            data: l,
                            ns: he
                        }), n && n.length && s.trigger("itemChange", {
                            item: n,
                            data: l,
                            ns: he
                        }), o = i, a = [{
                            dataItem: l
                        }], n && n.length && (o = i.add(n), a.push({
                            dataItem: l
                        })), s.angular("compile", function() {
                            return {
                                elements: o.get(),
                                data: a
                            }
                        }), c && s.options.selectable && s.select(i.add(n)), n && ie(i[0], n[0]), r = i.next(), r.hasClass("k-detail-row") && r.is(":visible") && i.find(".k-hierarchy-cell .k-icon").removeClass("k-plus").addClass("k-minus"))
                    },
                    _showMessage: function(t, n) {
                        var i, r, o, a = this;
                        return a._isMobile ? (i = ue.template('<ul><li class="km-actionsheet-title">#:title#</li><li><a href="\\#" class="k-button k-grid-delete">#:confirmDelete#</a></li></ul>'), r = e(i(t)).appendTo(a.view.element), o = a._actionSheet = new ue.mobile.ui.ActionSheet(r, {
                            cancel: t.cancelDelete,
                            cancelTemplate: '<li class="km-actionsheet-cancel"><a class="k-button" href="\\#">#:cancel#</a></li>',
                            close: function() {
                                this.destroy()
                            },
                            command: function(t) {
                                var i = e(t.currentTarget).parent();
                                i.hasClass("km-actionsheet-cancel") || a._removeRow(n)
                            },
                            popup: a._actionSheetPopupOptions
                        }), o.open(n), !1) : window.confirm(t.title)
                    },
                    _confirmation: function(e) {
                        var t = this,
                            n = t.options.editable,
                            i = n === !0 || typeof n === ct ? t.options.messages.editable.confirmation : n.confirmation;
                        return i !== !1 && null != i ? (typeof i === lt && (i = i(t._modelForContainer(e))), t._showMessage({
                            confirmDelete: n.confirmDelete || t.options.messages.editable.confirmDelete,
                            cancelDelete: n.cancelDelete || t.options.messages.editable.cancelDelete,
                            title: i === !0 ? t.options.messages.editable.confirmation : i
                        }, e)) : !0
                    },
                    cancelChanges: function() {
                        this.dataSource.cancelChanges()
                    },
                    saveChanges: function() {
                        var e = this;
                        (e.editable && e.editable.end() || !e.editable) && !e.trigger($e) && e.dataSource.sync()
                    },
                    addRow: function() {
                        var e, t, n, i, r, o, a = this,
                            s = a.dataSource,
                            l = a._editMode(),
                            c = a.options.editable.createAt || "",
                            d = s.pageSize(),
                            u = s.view() || [];
                        (a.editable && a.editable.end() || !a.editable) && ("incell" != l && a.cancelRow(), e = s.indexOf(u[0]), "bottom" == c.toLowerCase() && (e += u.length, d && !s.options.serverPaging && u.length >= d && (e -= 1)), 0 > e && (e = s.page() > s.totalPages() ? (s.page() - 1) * d : 0), t = s.insert(e, {}), n = t.uid, i = a.lockedContent ? a.lockedTable : a.table, r = i.find("tr[" + ue.attr("uid") + "=" + n + "]"), o = r.children("td:not(.k-group-cell,.k-hierarchy-cell)").eq(a._firstEditableColumnIndex(r)), "inline" === l && r.length ? a.editRow(r) : "popup" === l ? a.editRow(t) : o.length && a.editCell(o), "bottom" == c.toLowerCase() && a.lockedContent && (a.lockedContent[0].scrollTop = a.content[0].scrollTop = a.table[0].offsetHeight))
                    },
                    _firstEditableColumnIndex: function(e) {
                        var t, n, i, r = this,
                            o = H(r.columns),
                            a = r._modelForContainer(e);
                        for (n = 0, i = o.length; i > n; n++)
                            if (t = o[n], a && (!a.editable || a.editable(t.field)) && !t.command && t.field && t.hidden !== !0) return n;
                        return -1
                    },
                    _toolbar: function() {
                        var t, n = this,
                            i = n.wrapper,
                            r = n.options.toolbar,
                            o = n.options.editable;
                        r && (t = n.wrapper.find(".k-grid-toolbar"), t.length || (Te(r) || (r = typeof r === ct ? r : n._toolbarTmpl(r).replace(mt, "\\#"), r = Se(ue.template(r), n)), t = e('<div class="k-header k-grid-toolbar" />').html(r({})).prependTo(i), n.angular("compile", function() {
                            return {
                                elements: t.get()
                            }
                        })), o && o.create !== !1 && t.on(ot + Le, ".k-grid-add", function(e) {
                            e.preventDefault(), n.addRow()
                        }).on(ot + Le, ".k-grid-cancel-changes", function(e) {
                            e.preventDefault(), n.cancelChanges()
                        }).on(ot + Le, ".k-grid-save-changes", function(e) {
                            e.preventDefault(), n.saveChanges()
                        }), t.on(ot + Le, ".k-grid-excel", function(e) {
                            e.preventDefault(), n.saveAsExcel()
                        }), t.on(ot + Le, ".k-grid-pdf", function(e) {
                            e.preventDefault(), n.saveAsPDF()
                        }))
                    },
                    _toolbarTmpl: function(e) {
                        var t, n, i = this,
                            r = "";
                        if (ke(e))
                            for (t = 0, n = e.length; n > t; t++) r += i._createButton(e[t]);
                        return r
                    },
                    _createButton: function(e) {
                        var n, r = e.template || bt,
                            o = typeof e === ct ? e : e.name || e.text,
                            a = St[o] ? St[o].className : "k-grid-" + (o || "").replace(/\s/g, ""),
                            s = {
                                className: a,
                                text: o,
                                imageClass: "",
                                attr: "",
                                iconClass: ""
                            },
                            l = this.options.messages.commands;
                        if (!(o || _e(e) && e.template)) throw Error("Custom commands should have name specified");
                        return _e(e) ? (e = be(!0, {}, e), e.className && xe(s.className, e.className.split(" ")) < 0 ? e.className += " " + s.className : e.className === t && (e.className = s.className), "edit" === o && _e(e.text) && (e = be(!0, {}, e), e.text = e.text.edit), e.attr && (_e(e.attr) && (e.attr = i(e.attr)), typeof e.attr === ct && (n = e.attr.match(/class="(.+?)"/), n && xe(n[1], e.className.split(" ")) < 0 && (e.className += " " + n[1]))), s = be(!0, s, St[o], {
                            text: l[o]
                        }, e)) : s = be(!0, s, St[o], {
                            text: l[o]
                        }), ue.template(r)(s)
                    },
                    _hasFooters: function() {
                        return !!this.footerTemplate || !!this.groupFooterTemplate || this.footer && this.footer.length > 0 || this.wrapper.find(".k-grid-footer").length > 0
                    },
                    _groupable: function() {
                        var t = this;
                        t._groupableClickHandler ? t.table.add(t.lockedTable).off(ot + Le, t._groupableClickHandler) : t._groupableClickHandler = function(n) {
                            var i = e(this),
                                r = i.closest("tr");
                            i.hasClass("k-i-collapse") ? t.collapseGroup(r) : t.expandGroup(r), n.preventDefault(), n.stopPropagation()
                        }, t._isLocked() ? t.lockedTable.on(ot + Le, ".k-grouping-row .k-i-collapse, .k-grouping-row .k-i-expand", t._groupableClickHandler) : t.table.on(ot + Le, ".k-grouping-row .k-i-collapse, .k-grouping-row .k-i-expand", t._groupableClickHandler), t._attachGroupable()
                    },
                    _attachGroupable: function() {
                        var t = this,
                            n = t.wrapper,
                            i = t.options.groupable,
                            r = Be + "[" + ue.attr("field") + "]",
                            o = t.content ? ".k-grid-header:first " + r : "table:first>.k-grid-header " + r;
                        i && i.enabled !== !1 && (n.has("div.k-grouping-header")[0] || e("<div>&nbsp;</div>").addClass("k-grouping-header").prependTo(n), t.groupable && t.groupable.destroy(), t.groupable = new he.Groupable(n, be({}, i, {
                            draggable: t._draggableInstance,
                            groupContainer: ">div.k-grouping-header",
                            dataSource: t.dataSource,
                            draggableElements: o,
                            filter: o,
                            allowDrag: t.options.reorderable
                        })))
                    },
                    _continuousItems: function(t, n) {
                        var i, r, o, a, s, l, c, d;
                        if (this.lockedContent) {
                            for (i = this, r = i.table.add(i.lockedTable), o = e(t, r[0]), a = e(t, r[1]), s = n ? R(i.columns).length : 1, l = n ? i.columns.length - s : 1, c = [], d = 0; o.length > d; d += s) Ce.apply(c, o.slice(d, d + s)), Ce.apply(c, a.splice(0, l));
                            return c
                        }
                    },
                    _selectable: function() {
                        var n, i, r, o, a = this,
                            s = [],
                            l = a._isLocked(),
                            c = a.options.selectable;
                        c && (a.selectable && a.selectable.destroy(), c = ue.ui.Selectable.parseOptions(c), n = c.multiple, i = c.cell, a._hasDetails() && (s[s.length] = ".k-detail-row"), (a.options.groupable || a._hasFooters()) && (s[s.length] = ".k-grouping-row,.k-group-footer"), s = s.join(","), "" !== s && (s = ":not(" + s + ")"), r = a.table, l && (r = r.add(a.lockedTable)), o = ">" + (i ? Me : "tbody>tr" + s), a.selectable = new ue.ui.Selectable(r, {
                            filter: o,
                            aria: !0,
                            multiple: n,
                            change: function() {
                                a.trigger(je)
                            },
                            useAllItems: l && n && i,
                            relatedTarget: function(t) {
                                var n, r, o, s;
                                if (!i && l) {
                                    for (r = e(), o = 0, s = t.length; s > o; o++) n = a._relatedRow(t[o]), xe(n[0], t) < 0 && (r = r.add(n));
                                    return r
                                }
                            },
                            continuousItems: function() {
                                return a._continuousItems(o, i)
                            }
                        }), a.options.navigatable && r.on("keydown" + Le, function(o) {
                            var s = a.current(),
                                c = o.target;
                            if (o.keyCode === ve.SPACEBAR && e.inArray(c, r) > -1 && !s.is(".k-edit-cell,.k-header") && s.parent().is(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")) {
                                if (o.preventDefault(), o.stopPropagation(), s = i ? s : s.parent(), l && !i && (s = s.add(a._relatedRow(s))), n)
                                    if (o.ctrlKey) {
                                        if (s.hasClass(Je)) return s.removeClass(Je), a.trigger(je), t
                                    } else a.selectable.clear();
                                else a.selectable.clear();
                                a.selectable.value(s)
                            }
                        }))
                    },
                    _clipboard: function() {
                        var e, t = this.options,
                            n = t.selectable;
                        n && t.allowCopy && (e = this, t.navigatable || e.table.add(e.lockedTable).attr("tabindex", 0).on("mousedown" + Le + " keydown" + Le, ".k-detail-cell", function(e) {
                            e.target !== e.currentTarget && e.stopImmediatePropagation()
                        }).on("mousedown" + Le, Re + ">" + Pe, Se(se, e)), e.copyHandler = Se(e.copySelection, e), e.updateClipBoardState = function() {
                            e.areaClipBoard && e.areaClipBoard.val(e.getTSV()).focus().select()
                        }, e.bind("change", e.updateClipBoardState), e.wrapper.on("keydown", e.copyHandler), e.clearAreaHandler = Se(e.clearArea, e), e.wrapper.on("keyup", e.clearAreaHandler))
                    },
                    copySelection: function(t) {
                        t instanceof jQuery.Event && !t.ctrlKey && !t.metaKey || e(t.target).is("input:visible,textarea:visible") || window.getSelection && "" + window.getSelection() || document.selection && document.selection.createRange().text || (this.areaClipBoard || (this.areaClipBoard = e("<textarea />").css({
                            position: "fixed",
                            top: "50%",
                            left: "50%",
                            opacity: 0,
                            width: 0,
                            height: 0
                        }).appendTo(this.wrapper)), this.areaClipBoard.val(this.getTSV()).focus().select())
                    },
                    getTSV: function() {
                        var t, n, i, r, o, a, s = this,
                            l = s.select(),
                            c = "	",
                            d = s.options.allowCopy,
                            u = !0;
                        return e.isPlainObject(d) && d.delimeter && (c = d.delimeter), t = "", l.length && (l.eq(0).is("tr") && (l = l.find("td:not(.k-group-cell)")), u && l.filter(":visible"), n = [], i = this.columns.length, r = s._isLocked() && R(s.columns).length, o = !0, e.each(l, function(t, a) {
                            var l, c, d, h;
                            a = e(a), l = a.closest("tr"), c = l.index(), d = a.index(), u && (d -= a.prevAll(":hidden").length), r && o && (o = e.contains(s.lockedTable[0], a[0])), s._groups() && o && (d -= s._groups()), d = o ? d : d + r, i > d && (i = d), h = a.text(), n[c] || (n[c] = []), n[c][d] = h
                        }), a = n.length, n = e.each(n, function(e, t) {
                            t && (n[e] = t.slice(i), a > e && (a = e))
                        }), e.each(n.slice(a), function(e, n) {
                            t += n ? n.join(c) + "\r\n" : "\r\n"
                        })), t
                    },
                    clearArea: function(t) {
                        var n;
                        this.areaClipBoard && t && t.target === this.areaClipBoard[0] && (n = this.options.navigatable ? e(this.current()).closest("table") : this.table, oe(n, !0)), this.areaClipBoard && (this.areaClipBoard.remove(), this.areaClipBoard = null)
                    },
                    _minScreenSupport: function() {
                        var t = this.hideMinScreenCols();
                        t && (this.minScreenResizeHandler = Se(this.hideMinScreenCols, this), e(window).on("resize", this.minScreenResizeHandler));
                    },
                    hideMinScreenCols: function() {
                        var e = this.columns,
                            t = window.innerWidth > 0 ? window.innerWidth : screen.width;
                        return this._iterateMinScreenCols(e, t)
                    },
                    _iterateMinScreenCols: function(e, n) {
                        var i, r, o, a = !1;
                        for (i = 0; e.length > i; i++) r = e[i], o = r.minScreenWidth, o !== t && null !== o && (a = !0, o > n ? this.hideColumn(r) : this.showColumn(r)), !r.hidden && r.columns && (a = this._iterateMinScreenCols(r.columns, n) || a);
                        return a
                    },
                    _relatedRow: function(t) {
                        var n, i, r = this.lockedTable;
                        return t = e(t), r ? (n = t.closest(this.table.add(this.lockedTable)), i = n.find(">tbody>tr").index(t), n = n[0] === this.table[0] ? r : this.table, n.find(">tbody>tr").eq(i)) : t
                    },
                    clearSelection: function() {
                        var e = this;
                        e.selectable.clear(), e.trigger(je)
                    },
                    select: function(e) {
                        var n = this,
                            i = n.selectable;
                        return e = n.table.add(n.lockedTable).find(e), e.length ? (i.options.multiple || (i.clear(), e = e.first()), n._isLocked() && (e = e.add(e.map(function() {
                            return n._relatedRow(this)
                        }))), i.value(e), t) : i.value()
                    },
                    _updateCurrentAttr: function(t, n) {
                        var i, r = e(t).data("headerId");
                        e(t).removeClass(Xe).removeAttr("aria-describedby").closest("table").removeAttr("aria-activedescendant"), r ? (r = r.replace(this._cellId, ""), e(t).attr("id", r)) : e(t).removeAttr("id"), n.data("headerId", n.attr("id")).attr("id", this._cellId).addClass(Xe).closest("table").attr("aria-activedescendant", this._cellId), n.closest("tr").hasClass("k-grouping-row") || n.hasClass("k-header") ? n.attr("aria-describedby", this._cellId) : (i = this.columns[this.cellIndex(n)], i && (r = i.headerAttributes.id), n.attr("aria-describedby", r + " " + this._cellId)), this._current = n
                    },
                    _scrollCurrent: function() {
                        var t, n, i, r, o, a, s = this._current,
                            l = this.options.scrollable;
                        s && l && (t = s.parent(), n = t.closest("table").parent(), i = n.is(".k-grid-content-locked,.k-grid-header-locked"), r = n.is(".k-grid-content-locked,.k-grid-content,.k-virtual-scrollable-wrap"), o = e(this.content).find(">.k-virtual-scrollable-wrap").andSelf().last()[0], r && (l.virtual ? (a = Math.max(xe(t[0], this._items(t.parent())), 0), this._rowVirtualIndex = this.virtualScrollable.itemIndex(a), this.virtualScrollable.scrollIntoView(t)) : this._scrollTo(this._relatedRow(t)[0], o)), this.lockedContent && (this.lockedContent[0].scrollTop = o.scrollTop), i || this._scrollTo(s[0], o))
                    },
                    current: function(e) {
                        return this._setCurrent(e, !0)
                    },
                    _setCurrent: function(t, n) {
                        var i = this._current;
                        return t = e(t), t.length && (i && i[0] === t[0] || (this._updateCurrentAttr(i, t), this._scrollCurrent(), n || this.trigger(rt, {
                            element: t
                        }))), this._current
                    },
                    _removeCurrent: function() {
                        this._current && (this._current.removeClass(Xe), this._current = null)
                    },
                    _scrollTo: function(t, n) {
                        var i, r = t.tagName.toLowerCase(),
                            o = "td" === r || "th" === r,
                            a = t[o ? "offsetLeft" : "offsetTop"],
                            s = t[o ? "offsetWidth" : "offsetHeight"],
                            l = n[o ? "scrollLeft" : "scrollTop"],
                            c = n[o ? "clientWidth" : "clientHeight"],
                            d = a + s,
                            u = 0,
                            h = 0,
                            f = 0;
                        wt && o && (i = e(t).closest("table")[0], yt.msie ? h = i.offsetLeft : yt.mozilla && (f = i.offsetLeft - ue.support.scrollbar())), l = Math.abs(l + h - f), u = l > a ? a : d > l + c ? c >= s ? d - c : a : l, u = Math.abs(u + h) + f, n[o ? "scrollLeft" : "scrollTop"] = u
                    },
                    _navigatable: function() {
                        var t, n, i, r = this;
                        r.options.navigatable && (t = r.table.add(r.lockedTable), n = r.thead.parent().add(e(">table", r.lockedHeader)), i = t, r.options.scrollable && (i = i.add(n), n.attr(st, -1)), this._navigatableTables = i, i.off("mousedown" + Le + " focus" + Le + " focusout" + Le + " keydown" + Le), n.on("keydown" + Le, Se(r._openHeaderMenu, r)).find("a.k-link").attr("tabIndex", -1), t.attr(st, Ae.max(t.attr(st) || 0, 0)).on("mousedown" + Le + " keydown" + Le, ".k-detail-cell", function(e) {
                            e.target !== e.currentTarget && e.stopImmediatePropagation()
                        }), i.on(ue.support.touch ? "touchstart" + Le : "mousedown" + Le, Re + ">" + Pe, Se(se, r)).on("focus" + Le, Se(r._tableFocus, r)).on("focusout" + Le, Se(r._tableBlur, r)).on("keydown" + Le, Se(r._tableKeyDown, r)))
                    },
                    _openHeaderMenu: function(e) {
                        e.altKey && e.keyCode == ve.DOWN && (this.current().find(".k-grid-filter, .k-header-column-menu").click(), e.stopImmediatePropagation())
                    },
                    _setTabIndex: function(e) {
                        this._navigatableTables.attr(st, -1), e.attr(st, 0)
                    },
                    _tableFocus: function(t) {
                        var n, i;
                        ue.support.touch || (n = this.current(), i = e(t.currentTarget), n && n.is(":visible") ? n.addClass(Xe) : this._setCurrent(i.find(ze)), this._setTabIndex(i))
                    },
                    _tableBlur: function() {
                        var e = this.current();
                        e && e.removeClass(Xe)
                    },
                    _tableKeyDown: function(n) {
                        var i, r = this.current(),
                            o = this.virtualScrollable && this.virtualScrollable.fetching(),
                            a = e(n.target),
                            s = !n.isDefaultPrevented() && !a.is(":button,a,:input,a>.k-icon");
                        return o ? (n.preventDefault(), t) : (r = r ? r : e(this.lockedTable).add(this.table).find(ze), r.length && (i = !1, s && n.keyCode == ve.UP && (i = this._moveUp(r)), s && n.keyCode == ve.DOWN && (i = this._moveDown(r)), s && n.keyCode == (wt ? ve.LEFT : ve.RIGHT) && (i = this._moveRight(r, n.altKey)), s && n.keyCode == (wt ? ve.RIGHT : ve.LEFT) && (i = this._moveLeft(r, n.altKey)), s && n.keyCode == ve.PAGEDOWN && (i = this._handlePageDown()), s && n.keyCode == ve.PAGEUP && (i = this._handlePageUp()), (n.keyCode == ve.ENTER || n.keyCode == ve.F2) && (i = this._handleEnterKey(r, n.currentTarget, a)), n.keyCode == ve.ESC && (i = this._handleEscKey(r, n.currentTarget)), n.keyCode == ve.TAB && (i = this._handleTabKey(r, n.currentTarget, n.shiftKey)), i && (n.preventDefault(), n.stopPropagation())), t)
                    },
                    _moveLeft: function(e, t) {
                        var n, i, r = e.parent(),
                            o = r.parent();
                        return t ? this.collapseRow(r) : (i = o.find(Re).index(r), n = this._prevHorizontalCell(o, e, i), n[0] || (o = this._horizontalContainer(o), n = this._prevHorizontalCell(o, e, i), n[0] !== e[0] && oe(o.parent(), !0)), this._setCurrent(n)), !0
                    },
                    _moveRight: function(e, t) {
                        var n, i, r = e.parent(),
                            o = r.parent();
                        return t ? this.expandRow(r) : (i = o.find(Re).index(r), n = this._nextHorizontalCell(o, e, i), n[0] || (o = this._horizontalContainer(o, !0), n = this._nextHorizontalCell(o, e, i), n[0] !== e[0] && oe(o.parent(), !0)), this._setCurrent(n)), !0
                    },
                    _moveUp: function(e) {
                        var t = e.parent().parent(),
                            n = this._prevVerticalCell(t, e);
                        return n[0] || (t = this._verticalContainer(t, !0), n = this._prevVerticalCell(t, e), n[0] && oe(t.parent(), !0)), this._setCurrent(n), !0
                    },
                    _moveDown: function(e) {
                        var t = e.parent().parent(),
                            n = this._nextVerticalCell(t, e);
                        return n[0] || (t = this._verticalContainer(t), n = this._nextVerticalCell(t, e), n[0] && oe(t.parent(), !0)), this._setCurrent(n), !0
                    },
                    _handlePageDown: function() {
                        return this.options.pageable ? (this.dataSource.page(this.dataSource.page() + 1), !0) : !1
                    },
                    _handlePageUp: function() {
                        return this.options.pageable ? (this.dataSource.page(this.dataSource.page() - 1), !0) : !1
                    },
                    _handleTabKey: function(t, n, i) {
                        var r, o = this.options.editable && "incell" == this._editMode();
                        return !o || t.is("th") ? !1 : (r = e(me()).closest(".k-edit-cell"), r[0] && r[0] !== t[0] && (t = r), r = this._tabNext(t, n, i), r.length ? (this._handleEditing(t, r, r.closest("table")), !0) : !1)
                    },
                    _handleEscKey: function(t, n) {
                        var i, r = me(),
                            o = "incell" == this._editMode();
                        return le(t) ? (o ? this.closeCell(!0) : (i = e(t).parent().index(), r && r.blur(), this.cancelRow(!0), i >= 0 && this._setCurrent(this.items().eq(i).children(Pe).first())), yt.msie && 9 > yt.version && document.body.focus(), oe(n, !0), !0) : t.has(r).length ? (oe(n, !0), !0) : !1
                    },
                    _toggleCurrent: function(e, t) {
                        var n = e.parent();
                        return n.is(".k-grouping-row") ? (n.find(".k-icon:first").click(), !0) : !t && n.is(".k-master-row") ? (n.find(".k-icon:first").click(), !0) : !1
                    },
                    _handleEnterKey: function(t, n, i) {
                        var r, o = this.options.editable,
                            a = i.closest("[role=gridcell]");
                        return i.is("table") || e.contains(t[0], i[0]) || (t = a), t.is("th") ? (t.find(".k-link").click(), !0) : this._toggleCurrent(t, o) ? !0 : (r = t.find(":kendoFocusable:first"), r[0] && !t.hasClass("k-edit-cell") && t.hasClass("k-state-focused") ? (r.focus(), !0) : o && !i.is(":button,.k-button,textarea") ? (a[0] || (a = t), this._handleEditing(a, !1, n), !0) : !1)
                    },
                    _nextHorizontalCell: function(e, t, n) {
                        var i, r, o, a = t.nextAll(Ie);
                        return a.length || (i = e.find(Re), r = i.index(t.parent()), -1 != r) ? a.first() : t.hasClass("k-header") ? (o = [], M([R(this.columns)[0]], V(i.eq(0).children().first()), o, 0, 0), o[n] ? o[n][0] : t) : t.parent().hasClass("k-filter-row") ? i.last().children(Ie).first() : i.eq(n).children(Ie).first()
                    },
                    _prevHorizontalCell: function(e, t, n) {
                        var i, r, o, a, s = t.prevAll(Ie);
                        return s.length || (i = e.find(Re), r = i.index(t.parent()), -1 != r) ? s.first() : t.hasClass("k-header") ? (o = [], a = R(this.columns), M([a[a.length - 1]], V(i.eq(0).children().last()), o, 0, 0), o[n] ? o[n][0] : t) : t.parent().hasClass("k-filter-row") ? i.last().children(Ie).last() : i.eq(n).children(Ie).last()
                    },
                    _currentDataIndex: function(e, n) {
                        var i, r = n.attr("data-index");
                        return r ? (i = R(this.columns).length, i && !e.closest("div").hasClass("k-grid-content-locked")[0] ? r - i : r) : t
                    },
                    _prevVerticalCell: function(t, n) {
                        var i, r = n.parent(),
                            o = t.children(Re),
                            a = o.index(r),
                            s = this._currentDataIndex(t, n);
                        if (s || n.hasClass("k-header")) return i = O(n), i.eq(i.length - 2);
                        if (s = r.children(Ie).index(n), r.hasClass("k-filter-row")) return N(t).eq(s);
                        if (-1 == a) {
                            if (r = t.find(".k-filter-row"), !r[0]) return N(t).eq(s)
                        } else r = 0 === a ? e() : o.eq(a - 1);
                        return i = r.children(Ie), i.eq(i.length > s ? s : 0)
                    },
                    _nextVerticalCell: function(e, n) {
                        var i, r = n.parent(),
                            o = e.children(Re),
                            a = o.index(r),
                            s = this._currentDataIndex(e, n);
                        return -1 != a && s === t && n.hasClass("k-header") ? V(n).eq(1) : (s = s ? parseInt(s, 10) : r.children(Ie).index(n), r = o.eq(-1 == a ? 0 : a + n[0].rowSpan), i = r.children(Ie), i.eq(i.length > s ? s : 0))
                    },
                    _verticalContainer: function(e, t) {
                        var n = e.parent(),
                            i = this._navigatableTables.length,
                            r = Math.floor(i / 2),
                            o = xe(n[0], this._navigatableTables);
                        return t && (r *= -1), o += r, (o >= 0 || i > o) && (n = this._navigatableTables.eq(o)), n.find(t ? "thead" : "tbody")
                    },
                    _horizontalContainer: function(e, t) {
                        var n, i, r = this._navigatableTables.length;
                        return 2 >= r ? e : (n = e.parent(), i = xe(n[0], this._navigatableTables), i += t ? 1 : -1, !t || 2 != i && i != r ? !t && (1 == i || 0 > i) ? e : this._navigatableTables.eq(i).find("thead, tbody") : e)
                    },
                    _tabNext: function(e, t, n) {
                        var i = !0,
                            r = n ? e.prevAll(Ie + ":first") : e.nextAll(":visible:first");
                        return r.length || (r = e.parent(), this.lockedTable && (i = n && t == this.lockedTable[0] || !n && t == this.table[0], r = this._relatedRow(r)), i && (r = r[n ? "prevAll" : "nextAll"]("tr:not(.k-grouping-row):not(.k-detail-row):visible:first")), r = r.children(Ie + (n ? ":last" : ":first"))), r
                    },
                    _handleEditing: function(n, i, r) {
                        var o, a, s = this,
                            l = e(me()),
                            c = s._editMode(),
                            d = yt.msie,
                            u = d && 9 > yt.version,
                            h = s._editContainer;
                        if (r = e(r), a = "incell" == c ? n.hasClass("k-edit-cell") : n.parent().hasClass("k-grid-edit-row"), s.editable) {
                            if (e.contains(h[0], l[0]) && (yt.opera || u ? l.blur().change().triggerHandler("blur") : (l.blur(), d && l.blur())), !s.editable) return oe(r), t;
                            if (!s.editable.end()) return s._setCurrent("incell" == c ? h : h.children().filter(Ie).first()), o = h.find(":kendoFocusable:first")[0], o && o.focus(), t;
                            "incell" == c ? s.closeCell() : (s.saveRow(), a = !0)
                        }
                        i && s._setCurrent(i), u && document.body.focus(), oe(r, !0), (!a && !i || i) && ("incell" == c ? s.editCell(s.current()) : s.editRow(s.current().parent()))
                    },
                    _wrapper: function() {
                        var e = this,
                            t = e.table,
                            n = e.options.height,
                            i = e.element;
                        i.is("div") || (i = i.wrap("<div/>").parent()), e.wrapper = i.addClass("k-grid k-widget"), n && (e.wrapper.css(at, n), t.css(at, "auto")), e._initMobile()
                    },
                    _initMobile: function() {
                        var t, n = this.options,
                            i = this;
                        this._isMobile = n.mobile === !0 && ue.support.mobileOS || "phone" === n.mobile || "tablet" === n.mobile, this._isMobile && (t = this.wrapper.addClass("k-grid-mobile").wrap("<div data-" + ue.ns + 'stretch="true" data-' + ue.ns + 'role="view" data-' + ue.ns + 'init-widgets="false"></div>').parent(), this.pane = ue.mobile.ui.Pane.wrap(t), this.view = this.pane.view(), this._actionSheetPopupOptions = e(document.documentElement).hasClass("km-root") ? {
                            modal: !1
                        } : {
                            align: "bottom center",
                            position: "bottom center",
                            effect: "slideIn:up"
                        }, n.height && this.pane.element.parent().css(at, n.height), this._editAnimation = "slide", this.view.bind("show", function() {
                            i._isLocked() && (i._updateTablesWidth(), i._applyLockedContainersWidth(), i._syncLockedContentHeight(), i._syncLockedHeaderHeight(), i._syncLockedFooterHeight())
                        }))
                    },
                    _tbody: function() {
                        var t, n = this,
                            i = n.table;
                        t = i.find(">tbody"), t.length || (t = e("<tbody/>").appendTo(i)), n.tbody = t.attr("role", "rowgroup")
                    },
                    _scrollable: function() {
                        var t, n, i, r, o = this,
                            a = o.options,
                            s = a.scrollable,
                            l = s !== !0 && s.virtual && !o.virtualScrollable,
                            c = !ue.support.kineticScrollNeeded || l ? ue.support.scrollbar() : 0;
                        s && (t = o.wrapper.children(".k-grid-header"), t[0] || (t = e('<div class="k-grid-header" />').insertBefore(o.table)), t.css(wt ? "padding-left" : "padding-right", s.virtual ? c + 1 : c), n = e('<table role="grid" />'), kt && n.attr("cellspacing", 0), n.width(o.table[0].style.width), n.append(o.thead), t.empty().append(e('<div class="k-grid-header-wrap k-auto-scrollable" />').append(n)), o.content = o.table.parent(), o.content.is(".k-virtual-scrollable-wrap, .km-scroll-container") && (o.content = o.content.parent()), o.content.is(".k-grid-content, .k-virtual-scrollable-wrap") || (o.content = o.table.wrap('<div class="k-grid-content k-auto-scrollable" />').parent()), l && (o.virtualScrollable = new Ct(o.content, {
                            dataSource: o.dataSource,
                            itemHeight: function() {
                                return o._averageRowHeight()
                            }
                        })), o.scrollables = t.children(".k-grid-header-wrap").add(o.content), i = o.wrapper.find(".k-grid-footer"), i.length && (o.scrollables = o.scrollables.add(i.children(".k-grid-footer-wrap"))), s.virtual ? o.content.find(">.k-virtual-scrollable-wrap").unbind("scroll" + Le).bind("scroll" + Le, function() {
                            o.scrollables.scrollLeft(this.scrollLeft), o.lockedContent && (o.lockedContent[0].scrollTop = this.scrollTop)
                        }) : (o.scrollables.unbind("scroll" + Le).bind("scroll" + Le, function(e) {
                            o.scrollables.not(e.currentTarget).scrollLeft(this.scrollLeft), o.lockedContent && e.currentTarget == o.content[0] && (o.lockedContent[0].scrollTop = this.scrollTop)
                        }), r = o.content.data("kendoTouchScroller"), r && r.destroy(), r = ue.touchScroller(o.content), r && r.movable && (o.touchScroller = r, r.movable.bind("change", function(e) {
                            o.scrollables.scrollLeft(-e.sender.x), o.lockedContent && o.lockedContent.scrollTop(-e.sender.y)
                        }), o.one(Ye, function(e) {
                            e.sender.wrapper.addClass("k-grid-backface")
                        }))))
                    },
                    _renderNoRecordsContent: function() {
                        var t, n = this;
                        n.options.noRecords && (t = n.table.parent().children("." + Ze), t.length && (n.angular("cleanup", function() {
                            return {
                                elements: t.get()
                            }
                        }), t.remove()), n.dataSource && n.dataSource.view().length || (t = e(n.noRecordsTemplate({})).insertAfter(n.table), n.angular("compile", function() {
                            return {
                                elements: t.get(),
                                data: [{}]
                            }
                        })))
                    },
                    _setContentWidth: function(t) {
                        var n, i = this,
                            r = "k-grid-content-expander",
                            o = '<div class="' + r + '"></div>',
                            a = i.resizable;
                        i.options.scrollable && i.wrapper.is(":visible") && (n = i.table.parent().children("." + r), i._setContentWidthHandler = Se(i._setContentWidth, i), i.dataSource && i.dataSource.view().length ? n[0] && (n.remove(), a && a.unbind("resize", i._setContentWidthHandler)) : (n[0] || (n = e(o).appendTo(i.table.parent()), a && a.bind("resize", i._setContentWidthHandler)), i.thead && (n.width(i.thead.width()), t && i.content.scrollLeft(t))), i._applyLockedContainersWidth(), i.lockedHeader && 0 === i.table[0].clientWidth && (i.table[0].style.width = "1px"))
                    },
                    _applyLockedContainersWidth: function() {
                        if (this.options.scrollable && this.lockedHeader) {
                            var e, t = this.thead.parent(),
                                n = t.parent(),
                                i = this.wrapper[0].clientWidth,
                                r = this._groups(),
                                o = ue.support.scrollbar(),
                                a = this.lockedHeader.find(">table>colgroup>col:not(.k-group-col, .k-hierarchy-col)"),
                                s = t.find(">colgroup>col:not(.k-group-col, .k-hierarchy-col)"),
                                l = A(a),
                                c = A(s);
                            r > 0 && (l += this.lockedHeader.find(".k-group-cell:first").outerWidth() * r), l >= i && (l = i - 3 * o), this.lockedHeader.add(this.lockedContent).width(l), n[0].style.width = n.parent().width() - l - 2 + "px", t.add(this.table).width(c), this.virtualScrollable && (i -= o), this.content[0].style.width = i - l - 2 + "px", this.lockedFooter && this.lockedFooter.length && (this.lockedFooter.width(l), e = this.footer.find(".k-grid-footer-wrap"), e[0].style.width = n[0].clientWidth + "px", e.children().first().width(c))
                        }
                    },
                    _setContentHeight: function() {
                        var e, t = this,
                            n = t.options,
                            i = t.wrapper.innerHeight(),
                            r = t.wrapper.children(".k-grid-header"),
                            o = ue.support.scrollbar();
                        n.scrollable && t.wrapper.is(":visible") && (i -= r.outerHeight(), t.pager && (i -= t.pager.element.outerHeight()), n.groupable && (i -= t.wrapper.children(".k-grouping-header").outerHeight()), n.toolbar && (i -= t.wrapper.children(".k-grid-toolbar").outerHeight()), t.footerTemplate && (i -= t.wrapper.children(".k-grid-footer").outerHeight()), e = function(e) {
                            var t, n;
                            return e[0].style.height ? !0 : (t = e.height(), e.height("auto"), n = e.height(), t != n ? (e.height(""), !0) : (e.height(""), !1))
                        }, e(t.wrapper) && (i > 2 * o ? (t.lockedContent && (o = t.table[0].offsetWidth > t.table.parent()[0].clientWidth ? o : 0, t.lockedContent.height(i - o)), t.content.height(i)) : t.content.height(2 * o + 1)))
                    },
                    _averageRowHeight: function() {
                        var e, t = this,
                            n = t._items(t.tbody).length,
                            i = t._rowHeight;
                        return 0 === n ? i : (t._rowHeight || (t._rowHeight = i = t.table.outerHeight() / n, t._sum = i, t._measures = 1), e = t.table.outerHeight() / n, i !== e && (t._measures++, t._sum += e, t._rowHeight = t._sum / t._measures), i)
                    },
                    _dataSource: function() {
                        var e, n = this,
                            i = n.options,
                            r = i.dataSource;
                        r = ke(r) ? {
                            data: r
                        } : r, _e(r) && (be(r, {
                            table: n.table,
                            fields: n.columns
                        }), e = i.pageable, _e(e) && e.pageSize !== t && (r.pageSize = e.pageSize)), n.dataSource && n._refreshHandler ? n.dataSource.unbind(je, n._refreshHandler).unbind(Ee, n._progressHandler).unbind(Fe, n._errorHandler) : (n._refreshHandler = Se(n.refresh, n), n._progressHandler = Se(n._requestStart, n), n._errorHandler = Se(n._error, n)), n.dataSource = fe.create(r).bind(je, n._refreshHandler).bind(Ee, n._progressHandler).bind(Fe, n._errorHandler)
                    },
                    _error: function() {
                        this._progress(!1)
                    },
                    _requestStart: function() {
                        this._progress(!0)
                    },
                    _modelChange: function(t) {
                        var n, i, r, o, a, s, l, c, d, u, h = this,
                            f = h.tbody,
                            p = t.model,
                            m = h.tbody.find("tr[" + ue.attr("uid") + "=" + p.uid + "]"),
                            g = m.hasClass("k-alt"),
                            v = h._items(f).index(m),
                            _ = h.lockedContent;
                        if (_ && (n = h._relatedRow(m)), m.add(n).children(".k-edit-cell").length && !h.options.rowTemplate) m.add(n).children(":not(.k-group-cell,.k-hierarchy-cell)").each(function() {
                            i = e(this), r = H(h.columns)[h.cellIndex(i)], r.field === t.field && (i.hasClass("k-edit-cell") ? i.addClass("k-dirty-cell") : (h._displayCell(i, r, p), e('<span class="k-dirty"/>').prependTo(i)))
                        });
                        else if (!m.hasClass("k-grid-edit-row")) {
                            for (s = e().add(m), _ && (o = (g ? h.lockedAltRowTemplate : h.lockedRowTemplate)(p), s = s.add(n), n.replaceWith(o)), h.angular("cleanup", function() {
                                return {
                                    elements: s.get()
                                }
                            }), o = (g ? h.altRowTemplate : h.rowTemplate)(p), m.replaceWith(o), o = h._items(f).eq(v), u = [{
                                dataItem: p
                            }], _ && (m = m.add(n), n = h._relatedRow(o)[0], ie(o[0], n), o = o.add(n), u.push({
                                dataItem: p
                            })), h.angular("compile", function() {
                                return {
                                    elements: o.get(),
                                    data: u
                                }
                            }), a = h.options.selectable, a && m.hasClass("k-state-selected") && h.select(o), c = s.children(":not(.k-group-cell,.k-hierarchy-cell)"), l = o.children(":not(.k-group-cell,.k-hierarchy-cell)"), v = 0, d = h.columns.length; d > v; v++) r = h.columns[v], i = l.eq(v), a && c.eq(v).hasClass("k-state-selected") && i.addClass("k-state-selected"), r.field === t.field && e('<span class="k-dirty"/>').prependTo(i);
                            h.trigger("itemChange", {
                                item: o,
                                data: p,
                                ns: he
                            })
                        }
                    },
                    _pageable: function() {
                        var t, n = this,
                            i = n.options.pageable;
                        i && (t = n.wrapper.children("div.k-grid-pager"), t.length || (t = e('<div class="k-pager-wrap k-grid-pager"/>').appendTo(n.wrapper)), n.pager && n.pager.destroy(), n.pager = "object" == typeof i && i instanceof ue.ui.Pager ? i : new ue.ui.Pager(t, be({}, i, {
                            dataSource: n.dataSource
                        })))
                    },
                    _footer: function() {
                        var t, n, i, r = this,
                            o = r.dataSource.aggregates(),
                            a = "",
                            s = r.footerTemplate,
                            l = r.options,
                            c = r.footer || r.wrapper.find(".k-grid-footer");
                        s ? (a = e(r._wrapFooter(s(o))), c.length ? (n = a, r.angular("cleanup", function() {
                            return {
                                elements: c.get()
                            }
                        }), c.replaceWith(n), c = r.footer = n) : c = r.footer = l.scrollable ? l.pageable ? a.insertBefore(r.wrapper.children("div.k-grid-pager")) : a.appendTo(r.wrapper) : a.insertBefore(r.tbody), r.angular("compile", function() {
                            return {
                                elements: c.find("td:not(.k-group-cell, .k-hierarchy-cell)").get(),
                                data: we(r.columns, function(e) {
                                    return {
                                        column: e,
                                        aggregate: o[e.field]
                                    }
                                })
                            }
                        })) : c && !r.footer && (r.footer = c), c.length && (l.scrollable && (t = c.attr("tabindex", -1).children(".k-grid-footer-wrap"), r.scrollables = r.scrollables.filter(function() {
                            return !e(this).is(".k-grid-footer-wrap")
                        }).add(t)), r._footerWidth && c.find("table").css("width", r._footerWidth), t && (i = r.content.scrollLeft(), l.scrollable !== !0 && l.scrollable.virtual && (i = r.wrapper.find(".k-virtual-scrollable-wrap").scrollLeft()), t.scrollLeft(i))), r.lockedContent && (r._appendLockedColumnFooter(), r._applyLockedContainersWidth(), r._syncLockedFooterHeight())
                    },
                    _wrapFooter: function(t) {
                        var n = this,
                            i = "",
                            r = ue.support.mobileOS ? 0 : ue.support.scrollbar();
                        return n.options.scrollable ? (i = e('<div class="k-grid-footer"><div class="k-grid-footer-wrap"><table' + (kt ? ' cellspacing="0"' : "") + "><tbody>" + t + "</tbody></table></div></div>"), n._appendCols(i.find("table")), i.css(wt ? "padding-left" : "padding-right", r), i) : '<tfoot class="k-grid-footer">' + t + "</tfoot>"
                    },
                    _columnMenu: function() {
                        var e, n, i, r, o, a, s, l, c, d = this,
                            u = H(d.columns),
                            h = d.options,
                            f = h.columnMenu,
                            p = ye(d.columns, function(e) {
                                return e.columns !== t
                            }).length > 0,
                            m = this._isMobile,
                            g = function(e) {
                                d.trigger(We, {
                                    field: e.field,
                                    container: e.container
                                })
                            },
                            v = function(e) {
                                oe(e.closest("table"), !0)
                            },
                            _ = h.$angular;
                        if (f)
                            for ("boolean" == typeof f && (f = {}), a = N(d.thead), s = 0, l = a.length; l > s; s++) n = u[s], c = a.eq(s), n.command || !n.field && !c.attr("data-" + ue.ns + "field") || (e = c.data("kendoColumnMenu"), e && e.destroy(), r = n.sortable !== !1 && f.sortable !== !1 && h.sortable !== !1 ? be({}, h.sortable, {
                                compare: (n.sortable || {}).compare
                            }) : !1, o = h.filterable && n.filterable !== !1 && f.filterable !== !1 ? be({
                                pane: d.pane
                            }, h.filterable, n.filterable) : !1, n.filterable && n.filterable.dataSource && (o.forceUnique = !1, o.checkSource = n.filterable.dataSource), o && (o.format = n.format), i = {
                                dataSource: d.dataSource,
                                values: n.values,
                                columns: f.columns,
                                sortable: r,
                                filterable: o,
                                messages: f.messages,
                                owner: d,
                                closeCallback: v,
                                init: g,
                                pane: d.pane,
                                filter: m ? ":not(.k-column-active)" : "",
                                lockedColumns: !p && n.lockable !== !1 && R(u).length > 0
                            }, _ && (i.$angular = _), c.kendoColumnMenu(i))
                    },
                    _headerCells: function() {
                        return this.thead.find("th").filter(function() {
                            var t = e(this);
                            return !t.hasClass("k-group-cell") && !t.hasClass("k-hierarchy-cell")
                        })
                    },
                    _filterable: function() {
                        var e, t, n, i, r, o, a, s = this,
                            l = H(s.columns),
                            c = function(e) {
                                s.trigger(Ue, {
                                    field: e.field,
                                    container: e.container
                                })
                            },
                            d = function(e) {
                                oe(e.closest("table"), !0)
                            },
                            u = s.options.filterable;
                        if (u && typeof u.mode == ct && -1 == u.mode.indexOf("menu") && (u = !1), u && !s.options.columnMenu)
                            for (t = N(s.thead), i = 0, r = t.length; r > i; i++) n = t.eq(i), l[i].filterable === !1 || l[i].command || !l[i].field && !n.attr("data-" + ue.ns + "field") || (e = n.data("kendoFilterMenu"), e && e.destroy(), e = n.data("kendoFilterMultiCheck"), e && e.destroy(), o = l[i].filterable, a = be({}, u, o, {
                                dataSource: s.dataSource,
                                values: l[i].values,
                                format: l[i].format,
                                closeCallback: d,
                                title: l[i].title || l[i].field,
                                init: c,
                                pane: s.pane
                            }), o && o.messages && (a.messages = be(!0, {}, u.messages, o.messages)), o && o.dataSource && (a.forceUnique = !1, a.checkSource = o.dataSource), o && o.multi ? n.kendoFilterMultiCheck(a) : n.kendoFilterMenu(a))
                    },
                    _filterRow: function() {
                        var t, n, i, r, o, a, s, l, c, d, u, h, f, p, m = this;
                        if (m._hasFilterRow())
                            for (n = m.options.$angular, i = H(m.columns), r = m.options.filterable, o = m.thead.find(".k-filter-row"), this._updateHeader(this.dataSource.group().length), a = 0; i.length > a; a++)
                                if (l = i[a], c = m.options.filterable.operators, d = !1, u = e("<th/>"), h = l.field, l.hidden && u.hide(), o.append(u), h && l.filterable !== !1) {
                                    if (f = l.filterable && l.filterable.cell || {}, s = m.options.dataSource, s instanceof fe && (s = m.options.dataSource.options), p = be(!0, {}, r.messages), l.filterable && be(!0, p, l.filterable.messages), f.enabled === !1) {
                                        u.html("&nbsp;");
                                        continue
                                    }
                                    f.dataSource && (s = f.dataSource, d = !0), l.filterable && l.filterable.operators && (c = l.filterable.operators), t = {
                                        column: l,
                                        dataSource: m.dataSource,
                                        suggestDataSource: s,
                                        customDataSource: d,
                                        field: h,
                                        messages: p,
                                        values: l.values,
                                        template: f.template,
                                        delay: f.delay,
                                        inputWidth: f.inputWidth,
                                        suggestionOperator: f.suggestionOperator,
                                        minLength: f.minLength,
                                        dataTextField: f.dataTextField,
                                        operator: f.operator,
                                        operators: c,
                                        showOperators: f.showOperators
                                    }, n && (t.$angular = n), e("<span/>").attr(ue.attr("field"), h).appendTo(u).kendoFilterCell(t)
                                } else u.html("&nbsp;")
                    },
                    _sortable: function() {
                        var e, t, n, i, r, o, a = this,
                            s = H(a.columns),
                            l = a.options.sortable;
                        if (l) {
                            for (i = N(a.thead), r = 0, o = i.length; o > r; r++) e = s[r], e.sortable !== !1 && !e.command && e.field && (n = i.eq(r), t = n.data("kendoColumnSorter"), t && t.destroy(), n.attr("data-" + ue.ns + "field", e.field).kendoColumnSorter(be({}, l, e.sortable, {
                                dataSource: a.dataSource,
                                aria: !0,
                                filter: ":not(.k-column-active)"
                            })));
                            i = null
                        }
                    },
                    _columns: function(t) {
                        var n, i, r, o = this,
                            a = o.table,
                            s = a.find("col"),
                            c = o.options.dataSource;
                        if (t = t.length ? t : we(a.find("th"), function(t, n) {
                            t = e(t);
                            var i = t.attr(ue.attr("sortable")),
                                r = t.attr(ue.attr("filterable")),
                                o = t.attr(ue.attr("type")),
                                a = t.attr(ue.attr("groupable")),
                                l = t.attr(ue.attr("field")),
                                c = t.attr(ue.attr("title")),
                                d = t.attr(ue.attr("menu"));
                            return l || (l = t.text().replace(/\s|[^A-z0-9]/g, "")), {
                                field: l,
                                type: o,
                                title: c,
                                sortable: "false" !== i,
                                filterable: "false" !== r,
                                groupable: "false" !== a,
                                menu: d,
                                template: t.attr(ue.attr("template")),
                                width: s.eq(n).css("width")
                            }
                        }), n = !(o.table.find("tbody tr").length > 0 && (!c || !c.transport)), o.options.scrollable) {
                            if (r = t, i = R(t), t = P(t), i.length > 0 && 0 === t.length) throw Error("There should be at least one non locked column");
                            G(o.element.find("tr:has(th):first"), r), t = i.concat(t)
                        }
                        o.columns = l(t, n)
                    },
                    _groups: function() {
                        var e = this.dataSource.group();
                        return e ? e.length : 0
                    },
                    _tmpl: function(e, t, r, o) {
                        var a, s, l, c, d = this,
                            u = be({}, ue.Template, d.options.templateSettings),
                            h = t.length,
                            f = {
                                storage: {},
                                count: 0
                            },
                            p = d._hasDetails(),
                            m = [],
                            g = d._groups();
                        if (!e) {
                            for (e = "<tr", r && m.push("k-alt"), p && m.push("k-master-row"), m.length && (e += ' class="' + m.join(" ") + '"'), h && (e += " " + ue.attr("uid") + '="#=' + ue.expr("uid", u.paramName) + '#"'), e += " role='row'>", g > 0 && !o && (e += n(g)), p && (e += '<td class="k-hierarchy-cell"><a class="k-icon k-plus" href="\\#" tabindex="-1"></a></td>'), a = 0; h > a; a++) l = t[a], s = l.template, c = typeof s, e += "<td" + i(l.attributes) + " role='gridcell'>", e += d._cellTmpl(l, f), e += "</td>";
                            e += "</tr>"
                        }
                        return e = ue.template(e, u), f.count > 0 ? Se(e, f.storage) : e
                    },
                    _headerCellText: function(e) {
                        var t = this,
                            n = be({}, ue.Template, t.options.templateSettings),
                            i = e.headerTemplate,
                            r = typeof i,
                            o = e.title || e.field || "";
                        return r === lt ? o = ue.template(i, n)({}) : r === ct && (o = i), o
                    },
                    _cellTmpl: function(e, t) {
                        var n, i, r = this,
                            o = be({}, ue.Template, r.options.templateSettings),
                            a = e.template,
                            s = o.paramName,
                            l = e.field,
                            c = "",
                            d = e.format,
                            u = typeof a,
                            h = e.values;
                        if (e.command) {
                            if (ke(e.command)) {
                                for (n = 0, i = e.command.length; i > n; n++) c += r._createButton(e.command[n]);
                                return c.replace(mt, "\\#")
                            }
                            return r._createButton(e.command).replace(mt, "\\#")
                        }
                        return u === lt ? (t.storage["tmpl" + t.count] = a, c += "#=this.tmpl" + t.count + "(" + s + ")#", t.count++) : u === ct ? c += a : h && h.length && _e(h[0]) && "value" in h[0] && l ? (c += "#var v =" + ue.stringify($(h)).replace(mt, "\\#") + "#", c += "#var f = v[", o.useWithBlock || (c += s + "."), c += l + "]#", c += "${f != null ? f : ''}") : (c += e.encoded ? "#:" : "#=", d && (c += 'kendo.format("' + d.replace(pt, "\\$1") + '",'), l ? (l = ue.expr(l, s), c += l + "==null?'':" + l) : c += "''", d && (c += ")"), c += "#"), c
                    },
                    _templates: function() {
                        var t = this,
                            n = t.options,
                            i = t.dataSource,
                            r = i.group(),
                            o = t.footer || t.wrapper.find(".k-grid-footer"),
                            a = i.aggregate(),
                            s = H(t.columns),
                            l = H(R(t.columns)),
                            c = n.scrollable ? H(P(t.columns)) : s;
                        if (n.scrollable && l.length) {
                            if (n.rowTemplate || n.altRowTemplate) throw Error("Having both row template and locked columns is not supported");
                            t.rowTemplate = t._tmpl(n.rowTemplate, c, !1, !0), t.altRowTemplate = t._tmpl(n.altRowTemplate || n.rowTemplate, c, !0, !0), t.lockedRowTemplate = t._tmpl(n.rowTemplate, l), t.lockedAltRowTemplate = t._tmpl(n.altRowTemplate || n.rowTemplate, l, !0)
                        } else t.rowTemplate = t._tmpl(n.rowTemplate, c), t.altRowTemplate = t._tmpl(n.altRowTemplate || n.rowTemplate, c, !0);
                        t._hasDetails() && (t.detailTemplate = t._detailTmpl(n.detailTemplate || "")), (t._group && !De(a) || !De(a) && !o.length || ye(s, function(e) {
                            return e.footerTemplate
                        }).length) && (t.footerTemplate = t._footerTmpl(s, a, "footerTemplate", "k-footer-template")), r && ye(s, function(e) {
                            return e.groupFooterTemplate
                        }).length && (a = e.map(r, function(e) {
                            return e.aggregates
                        }), t.groupFooterTemplate = t._footerTmpl(c, a, "groupFooterTemplate", "k-group-footer", l.length), n.scrollable && l.length && (t.lockedGroupFooterTemplate = t._footerTmpl(l, a, "groupFooterTemplate", "k-group-footer"))), t.options.noRecords && (t.noRecordsTemplate = t._noRecordsTmpl())
                    },
                    _noRecordsTmpl: function() {
                        var t, n, i, r = '<div class="{0}">{1}</div>',
                            o = '<div class="k-grid-norecords-template"{1}>{0}</div>',
                            a = this.options.scrollable && !this.wrapper[0].style.height ? ' style="margin:0 auto;position:static;"' : "",
                            s = {
                                storage: {},
                                count: 0
                            },
                            l = e.extend({}, ue.Template, this.options.templateSettings),
                            c = l.paramName,
                            d = "";
                        return t = this.options.noRecords.template ? this.options.noRecords.template : ue.format(o, this.options.messages.noRecords, a), n = typeof t, "function" === n ? (s.storage["tmpl" + s.count] = t, d += "#=this.tmpl" + s.count + "(" + c + ")#", s.count++) : "string" === n && (d += t), i = ue.template(ue.format(r, Ze, d), l), s.count > 0 && (i = e.proxy(i, s.storage)), i
                    },
                    _footerTmpl: function(e, t, r, o, a) {
                        var s, l, c, d, u, h = this,
                            f = be({}, ue.Template, h.options.templateSettings),
                            p = f.paramName,
                            m = "",
                            g = {},
                            v = 0,
                            _ = {},
                            b = h._groups(),
                            w = h.dataSource._emptyAggregates(t);
                        for (m += '<tr class="' + o + '">', b > 0 && !a && (m += n(b)), h._hasDetails() && (m += '<td class="k-hierarchy-cell">&nbsp;</td>'), s = 0, l = e.length; l > s; s++) u = e[s], c = u[r], d = typeof c, m += "<td" + i(u.footerAttributes) + ">", c ? (d !== lt && (_ = w[u.field] ? be({}, f, {
                            paramName: p + "['" + u.field + "']"
                        }) : {}, c = ue.template(c, _)), g["tmpl" + v] = c, m += "#=this.tmpl" + v + "(" + p + ")#", v++) : m += "&nbsp;", m += "</td>";
                        return m += "</tr>", m = ue.template(m, f), v > 0 ? Se(m, g) : m
                    },
                    _detailTmpl: function(e) {
                        var t = this,
                            i = "",
                            r = be({}, ue.Template, t.options.templateSettings),
                            o = r.paramName,
                            a = {},
                            s = 0,
                            l = t._groups(),
                            c = p(H(t.columns)).length,
                            d = typeof e;
                        return i += '<tr class="k-detail-row">', l > 0 && (i += n(l)), i += '<td class="k-hierarchy-cell"></td><td class="k-detail-cell"' + (c ? ' colspan="' + c + '"' : "") + ">", d === lt ? (a["tmpl" + s] = e, i += "#=this.tmpl" + s + "(" + o + ")#", s++) : i += e, i += "</td></tr>", i = ue.template(i, r), s > 0 ? Se(i, a) : i
                    },
                    _hasDetails: function() {
                        var e = this;
                        return null !== e.options.detailTemplate || (e._events[Ve] || []).length
                    },
                    _hasFilterRow: function() {
                        var t = this.options.filterable,
                            n = t && typeof t.mode == ct && -1 != t.mode.indexOf("row"),
                            i = this.columns,
                            r = e.grep(i, function(e) {
                                return e.filterable === !1
                            });
                        return i.length && r.length == i.length && (n = !1), n
                    },
                    _details: function() {
                        var t = this;
                        if (t.options.scrollable && t._hasDetails() && R(t.columns).length) throw Error("Having both detail template and locked columns is not supported");
                        t.table.on(ot + Le, ".k-hierarchy-cell .k-plus, .k-hierarchy-cell .k-minus", function(n) {
                            var i, r, o = e(this),
                                a = o.hasClass("k-plus"),
                                s = o.closest("tr.k-master-row"),
                                l = t.detailTemplate,
                                c = t._hasDetails();
                            return o.toggleClass("k-plus", !a).toggleClass("k-minus", a), i = s.next(), c && !i.hasClass("k-detail-row") && (r = t.dataItem(s), i = e(l(r)).addClass(s.hasClass("k-alt") ? "k-alt" : "").insertAfter(s), t.angular("compile", function() {
                                return {
                                    elements: i.get(),
                                    data: [{
                                        dataItem: r
                                    }]
                                }
                            }), t.trigger(Ve, {
                                masterRow: s,
                                detailRow: i,
                                data: r,
                                detailCell: i.find(".k-detail-cell")
                            })), t.trigger(a ? Ke : Qe, {
                                masterRow: s,
                                detailRow: i
                            }), i.toggle(a), t._current && t._current.attr("aria-expanded", a), n.preventDefault(), !1
                        })
                    },
                    dataItem: function(t) {
                        if (t = e(t)[0], !t) return null;
                        var n, i, r = this.tbody.children(),
                            o = /k-grouping-row|k-detail-row|k-group-footer/,
                            a = t.sectionRowIndex;
                        for (i = a, n = 0; a > n; n++) o.test(r[n].className) && i--;
                        return this._data[i]
                    },
                    expandRow: function(t) {
                        e(t).find("> td .k-plus, > td .k-i-expand").click()
                    },
                    collapseRow: function(t) {
                        e(t).find("> td .k-minus, > td .k-i-collapse").click()
                    },
                    _createHeaderCells: function(e, n) {
                        var r, o, a, s, l, c, d = this,
                            u = "",
                            h = H(d.columns);
                        for (r = 0, s = e.length; s > r; r++) o = e[r].column || e[r], a = d._headerCellText(o), l = "", c = xe(o, h), o.command ? (u += "<th scope='col'" + i(o.headerAttributes), n && !e[r].colSpan && (u += " rowspan='" + n + "'"), c > -1 && (u += ue.attr("index") + "='" + c + "'"), u += ">" + a + "</th>") : (o.field && (l = ue.attr("field") + "='" + o.field + "' "), u += "<th scope='col' role='columnheader' " + l, n && !e[r].colSpan && (u += " rowspan='" + n + "'"), e[r].colSpan > 1 && (u += 'colspan="' + (e[r].colSpan - D(o.columns)) + '" ', u += ue.attr("colspan") + "='" + e[r].colSpan + "'"), o.title && (u += ue.attr("title") + '="' + o.title.replace('"', "&quot;").replace(/'/g, "'") + '" '), o.groupable !== t && (u += ue.attr("groupable") + "='" + o.groupable + "' "), o.aggregates && o.aggregates.length && (u += ue.attr("aggregates") + "='" + o.aggregates + "'"), c > -1 && (u += ue.attr("index") + "='" + c + "'"), u += i(o.headerAttributes), u += ">" + a + "</th>");
                        return u
                    },
                    _appendLockedColumnContent: function() {
                        var t, n, i, r, o, a = this.columns,
                            s = this.table.find("colgroup"),
                            l = s.find("col:not(.k-group-col,.k-hierarchy-col)"),
                            c = e(),
                            d = 0,
                            u = 0;
                        for (t = 0, n = a.length; n > t; t++)
                            if (a[t].locked)
                                if (f(a[t])) {
                                    for (r = 1, a[t].columns && (r = H(a[t].columns).length - D(a[t].columns)), r = r || 1, o = 0; r > o; o++) c = c.add(l.eq(t + u + o - d));
                                    u += r - 1
                                } else d++;
                        i = e('<div class="k-grid-content-locked"><table' + (kt ? ' cellspacing="0"' : "") + "><colgroup/><tbody></tbody></table></div>"), s.detach(), i.find("colgroup").append(c), s.insertBefore(this.table.find("tbody")),
                            this.lockedContent = i.insertBefore(this.content), this.lockedTable = i.children("table")
                    },
                    _appendLockedColumnFooter: function() {
                        var t, n, i = this,
                            r = i.footer,
                            o = r.find(".k-footer-template>td"),
                            a = r.find(".k-grid-footer-wrap>table>colgroup>col"),
                            s = e('<div class="k-grid-footer-locked"><table><colgroup /><tbody><tr class="k-footer-template"></tr></tbody></table></div>'),
                            l = i._groups(),
                            c = e(),
                            d = e();
                        for (c = c.add(o.filter(".k-group-cell")), t = 0, n = H(R(i.columns)).length; n > t; t++) c = c.add(o.eq(t + l));
                        for (d = d.add(a.filter(".k-group-col")), t = 0, n = p(H(B(i.columns))).length; n > t; t++) d = d.add(a.eq(t + l));
                        c.appendTo(s.find("tr")), d.appendTo(s.find("colgroup")), i.lockedFooter = s.prependTo(r)
                    },
                    _appendLockedColumnHeader: function(t) {
                        var n, i, r, o, a, s, l, c, d, u, h, p = this,
                            g = this.columns,
                            v = [],
                            _ = 0,
                            b = e(),
                            w = p._hasFilterRow(),
                            y = 0,
                            k = e(),
                            x = 0,
                            C = e(),
                            S = p.thead.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),
                            T = p.thead.find("tr:first .k-header:not(.k-group-cell,.k-hierarchy-cell)"),
                            A = p.thead.find(".k-filter-row").find("th:not(.k-group-cell,.k-hierarchy-cell)"),
                            F = 0;
                        for (n = 0, r = g.length; r > n; n++) {
                            if (g[n].locked) {
                                if (l = T.eq(n), x = H(g[n].columns || []).length, f(g[n])) {
                                    for (c = null, g[n].columns && (c = x - D(g[n].columns)), c = c || 1, d = 0; c > d; d++) b = b.add(S.eq(n + F + d - _));
                                    F += c - 1
                                }
                                for (M([g[n]], V(l), v, 0, 0), x = x || 1, u = 0; x > u; u++) k = k.add(A.eq(y + u));
                                y += x
                            }
                            g[n].columns && (_ += D(g[n].columns)), f(g[n]) || _++
                        }
                        if (v.length) {
                            for (i = '<div class="k-grid-header-locked" style="width:1px"><table' + (kt ? ' cellspacing="0"' : "") + "><colgroup/><thead>", i += Array(v.length + 1).join("<tr></tr>"), i += (w ? '<tr class="k-filter-row" />' : "") + "</thead></table></div>", s = e(i), S = s.find("colgroup"), S.append(p.thead.prev().find("col.k-group-col").add(b)), o = s.find("thead tr:not(.k-filter-row)"), n = 0, r = v.length; r > n; n++) C = m(v[n]), o.eq(n).append(p.thead.find("tr:eq(" + n + ") .k-group-cell").add(C));
                            return h = I(this.thead), h > v.length && E(s, h - v.length), a = s.find(".k-filter-row"), a.append(p.thead.find(".k-filter-row .k-group-cell").add(k)), this.lockedHeader = s.prependTo(t), this.thead.find(".k-group-cell").remove(), !0
                        }
                        return !1
                    },
                    _removeLockedContainers: function() {
                        var e = this.lockedHeader.add(this.lockedContent).add(this.lockedFooter);
                        ue.destroy(e), e.off(Le).remove(), this.lockedHeader = this.lockedContent = this.lockedFooter = null, this.selectable = null
                    },
                    _thead: function() {
                        var t, n, i, r, o, a, s, l = this,
                            c = l.columns,
                            d = l._hasDetails() && c.length,
                            u = l._hasFilterRow(),
                            h = "",
                            f = l.table.find(">thead"),
                            p = l.element.find("thead:first").length > 0;
                        if (f.length || (f = e("<thead/>").insertBefore(l.tbody)), l.lockedHeader && l.thead ? (n = l.thead.find("tr:has(th):not(.k-filter-row)").html(""), n.remove(), n = e(), l._removeLockedContainers()) : n = l.element.find(p ? "thead:first tr:has(th):not(.k-filter-row)" : "tr:has(th):first"), !n.length && (n = f.children().first(), !n.length)) {
                            for (i = [{
                                rowSpan: 1,
                                cells: [],
                                index: 0
                            }], l._prepareColumns(i, c), t = 0; i.length > t; t++) h += "<tr>", d && (h += '<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'), h += l._createHeaderCells(i[t].cells, i[t].rowSpan), h += "</tr>";
                            n = e(h)
                        }
                        u && (r = e("<tr/>"), r.addClass("k-filter-row"), (d || n.find(".k-hierarchy-cell").length) && r.prepend('<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'), o = (l.thead || f).find(".k-filter-row"), o.length && (ue.destroy(o), o.remove()), f.append(r)), n.children().length ? d && !n.find(".k-hierarchy-cell")[0] && n.prepend('<th class="k-hierarchy-cell" scope="col">&nbsp;</th>') : (h = "", d && (h += '<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'), h += l._createHeaderCells(c), n.html(h)), n.attr("role", "row").find("th").addClass("k-header"), l.options.scrollable || f.addClass("k-grid-header"), n.find("script").remove().end().prependTo(f), l.thead && l._destroyColumnAttachments(), this.angular("cleanup", function() {
                            return {
                                elements: f.find("th").get()
                            }
                        }), this.angular("compile", function() {
                            return {
                                elements: f.find("th").get(),
                                data: we(c, function(e) {
                                    return {
                                        column: e
                                    }
                                })
                            }
                        }), l.thead = f.attr("role", "rowgroup"), l._sortable(), l._filterable(), l._filterRow(), l._scrollable(), l._updateCols(), l._columnMenu(), s = this.options.scrollable && R(this.columns).length, s && (a = l._appendLockedColumnHeader(l.thead.closest(".k-grid-header")), l._appendLockedColumnContent(), l.lockedContent.bind("DOMMouseScroll" + Le + " mousewheel" + Le, Se(l._wheelScroll, l))), l._updateColumnCellIndex(), l._updateFirstColumnClass(), l._resizable(), l._draggable(), l._reorderable(), l._updateHeader(l._groups()), s && (a && l._syncLockedHeaderHeight(), l._applyLockedContainersWidth()), l.groupable && l._attachGroupable()
                    },
                    _retrieveFirstColumn: function(t, n) {
                        var i, r = e();
                        if (n.length && t[0]) {
                            for (i = t[0]; i.columns && i.columns.length;) i = i.columns[0], n = n.filter(":not(:first())");
                            r = r.add(n)
                        }
                        return r
                    },
                    _updateFirstColumnClass: function() {
                        var t, n, i = this,
                            r = i.columns || [],
                            o = i._hasDetails() && r.length;
                        o || i._groups() || (t = i.thead.find(">tr:not(.k-filter-row):not(:first)"), r = P(r), n = i._retrieveFirstColumn(r, t), i._isLocked() && (t = i.lockedHeader.find("thead>tr:not(.k-filter-row):not(:first)"), r = R(i.columns), n = n.add(i._retrieveFirstColumn(r, t))), n.each(function() {
                            var t = e(this).find("th");
                            t.removeClass("k-first"), t.eq(0).addClass("k-first")
                        }))
                    },
                    _prepareColumns: function(e, t, n, i) {
                        var r, o, a = i || e[e.length - 1],
                            s = e[a.index + 1],
                            l = 0;
                        for (r = 0; t.length > r; r++) o = {
                            column: t[r],
                            colSpan: 0
                        }, a.cells.push(o), t[r].columns && t[r].columns.length && (s || (s = {
                            rowSpan: 0,
                            cells: [],
                            index: e.length
                        }, e.push(s)), o.colSpan = t[r].columns.length, this._prepareColumns(e, t[r].columns, o, s), l += o.colSpan - 1, a.rowSpan = e.length - a.index);
                        n && (n.colSpan += l)
                    },
                    _wheelScroll: function(t) {
                        var n, i, r;
                        t.ctrlKey || (n = this.content, this.options.scrollable.virtual && (n = this.virtualScrollable.verticalScrollbar), i = n.scrollTop(), r = ue.wheelDeltaY(t), r && (t.preventDefault(), e(t.currentTarget).one("wheel" + Le, !1), n.scrollTop(i + -r)))
                    },
                    _isLocked: function() {
                        return null != this.lockedHeader
                    },
                    _updateHeaderCols: function() {
                        var e = this.thead.parent().add(this.table);
                        this._isLocked() ? q(e, L(z(this.columns)), this._hasDetails(), 0) : q(e, L(p(this.columns)), this._hasDetails(), 0)
                    },
                    _updateCols: function(e) {
                        e = e || this.thead.parent().add(this.table), this._appendCols(e, this._isLocked())
                    },
                    _updateLockedCols: function(e) {
                        this._isLocked() && (e = e || this.lockedHeader.find("table").add(this.lockedTable), q(e, L(B(this.columns)), this._hasDetails(), this._groups()))
                    },
                    _appendCols: function(e, t) {
                        t ? q(e, L(z(this.columns)), this._hasDetails(), 0) : q(e, L(p(this.columns)), this._hasDetails(), this._groups())
                    },
                    _autoColumns: function(e) {
                        if (e && e.toJSON) {
                            var t, n, i = this;
                            e = e.toJSON(), n = !(i.table.find("tbody tr").length > 0 && (!i.dataSource || !i.dataSource.transport));
                            for (t in e) i.columns.push({
                                field: t,
                                encoded: n,
                                headerAttributes: {
                                    id: ue.guid()
                                }
                            });
                            i._thead(), i._templates()
                        }
                    },
                    _rowsHtml: function(e, t) {
                        var n, i, r = this,
                            o = "",
                            a = t.rowTemplate,
                            s = t.altRowTemplate;
                        for (n = 0, i = e.length; i > n; n++) o += n % 2 ? s(e[n]) : a(e[n]), r._data.push(e[n]);
                        return o
                    },
                    _groupRowHtml: function(e, t, n, i, r, o) {
                        var a, s, l = this,
                            c = "",
                            d = e.field,
                            u = ye(H(l.columns), function(e) {
                                return e.field == d
                            })[0] || {},
                            h = u.groupHeaderTemplate,
                            f = (u.title || d) + ": " + Y(e.value, u.format, u.values, u.encoded),
                            p = l._groupAggregatesDefaultObject || {},
                            m = be({}, p, e.aggregates),
                            g = be({}, {
                                field: e.field,
                                value: e.value,
                                aggregates: m
                            }, e.aggregates[e.field]),
                            v = r.groupFooterTemplate,
                            _ = e.items;
                        if (h && (f = typeof h === lt ? h(g) : ue.template(h)(g)), c += i(t, n, f), e.hasSubgroups)
                            for (a = 0, s = _.length; s > a; a++) c += l._groupRowHtml(_[a], o ? t : t - 1, n + 1, i, r, o);
                        else c += l._rowsHtml(_, r);
                        return v && (c += v(m)), c
                    },
                    collapseGroup: function(t) {
                        var n, i, r, o, a, s, l, c, d, u;
                        for (t = e(t), i = this.options.groupable, r = i.showFooter, o = r ? 0 : 1, s = e(), this._isLocked() && (t.closest("div").hasClass("k-grid-content-locked") ? s = this.tbody.children("tr:eq(" + t.index() + ")").nextAll("tr") : (s = t.nextAll("tr"), t = this.lockedTable.find(">tbody>tr:eq(" + t.index() + ")"))), n = t.find(".k-group-cell").length, t.find(".k-i-collapse").addClass("k-i-expand").removeClass("k-i-collapse"), t.find("td[aria-expanded='true']:first").attr("aria-expanded", !1), t = t.nextAll("tr"), u = [], l = 0, c = t.length; c > l && (d = t.eq(l), a = d.find(".k-group-cell").length, d.hasClass("k-grouping-row") ? o++ : d.hasClass("k-group-footer") && o--, !(n >= a || d.hasClass("k-group-footer") && 0 > o)); l++) s.length && u.push(s[l]), u.push(d[0]);
                        e(u).hide()
                    },
                    expandGroup: function(t) {
                        t = e(t);
                        var n, i, r, o, a, s = this,
                            l = s.options.groupable.showFooter,
                            c = e(),
                            d = [],
                            u = 1;
                        for (this._isLocked() && (t.closest("div").hasClass("k-grid-content-locked") ? c = this.tbody.children("tr:eq(" + t.index() + ")").nextAll("tr") : (c = t.nextAll("tr"), t = this.lockedTable.find(">tbody>tr:eq(" + t.index() + ")"))), n = t.find(".k-group-cell").length, t.find(".k-i-expand").addClass("k-i-collapse").removeClass("k-i-expand"), t.find("td[aria-expanded='false']:first").attr("aria-expanded", !0), t = t.nextAll("tr"), o = 0, a = t.length; a > o && (i = t.eq(o), r = i.find(".k-group-cell").length, !(n >= r)); o++) r != n + 1 || i.hasClass("k-detail-row") || (i.show(), c.eq(o).show(), i.hasClass("k-grouping-row") && i.find(".k-icon").hasClass("k-i-collapse") && s.expandGroup(i), i.hasClass("k-master-row") && i.find(".k-icon").hasClass("k-minus") && (i.next().show(), c.eq(o + 1).show())), i.hasClass("k-grouping-row") && (l && d.push(i.is(":visible")), u++), i.hasClass("k-group-footer") && (l && i.toggle(d.pop()), 1 == u ? (i.show(), c.eq(o).show()) : u--)
                    },
                    _updateHeader: function(t) {
                        var n = this,
                            i = n._isLocked() ? n.lockedHeader.find("thead") : n.thead,
                            r = i.find("tr.k-filter-row").find("th.k-group-cell").length,
                            o = i.find("tr:first").find("th.k-group-cell").length,
                            a = i.children("tr:not(:first)").filter(function() {
                                return !e(this).children(":visible").length
                            });
                        t > o ? (e(Array(t - o + 1).join('<th class="k-group-cell k-header" scope="col">&nbsp;</th>')).prependTo(i.children("tr:not(.k-filter-row)")), n.element.is(":visible") && a.find("th.k-group-cell").hide()) : o > t && i.find("tr").each(function() {
                            e(this).find("th.k-group-cell").filter(":eq(" + t + "),:gt(" + t + ")").remove()
                        }), t > r && e(Array(t - r + 1).join('<th class="k-group-cell k-header" scope="col">&nbsp;</th>')).prependTo(i.find(".k-filter-row"))
                    },
                    _firstDataItem: function(e, t) {
                        return e && t && (e = e.hasSubgroups ? this._firstDataItem(e.items[0], t) : e.items[0]), e
                    },
                    _updateTablesWidth: function() {
                        var t, n = this;
                        n._isLocked() && (t = e(">.k-grid-footer>.k-grid-footer-wrap>table", n.wrapper).add(n.thead.parent()).add(n.table), n._footerWidth = te(t.eq(0)), t.width(n._footerWidth), t = e(">.k-grid-footer>.k-grid-footer-locked>table", n.wrapper).add(n.lockedHeader.find(">table")).add(n.lockedTable), t.width(te(t.eq(0))))
                    },
                    hideColumn: function(n) {
                        var i, r, o, s, l, c, d, m, g, v, _ = this,
                            b = 0,
                            w = _.footer || _.wrapper.find(".k-grid-footer"),
                            y = _.columns,
                            k = _.lockedHeader ? N(_.lockedHeader.find(">table>thead")).filter(h).length : 0;
                        if (n = "number" == typeof n ? y[n] : _e(n) ? ye(T(y), function(e) {
                            return e === n
                        })[0] : ye(T(y), function(e) {
                            return e.field === n
                        })[0], n && f(n)) {
                            if (n.columns && n.columns.length) {
                                for (c = C(n, y), u(n, !1), K(a(e(">table>thead", _.lockedHeader), _.thead, ">tr:eq(" + c.row + ")>th"), c.cell, !1), o = 0; n.columns.length > o; o++) this.hideColumn(n.columns[o]);
                                return _.trigger(qe, {
                                    column: n
                                }), t
                            }
                            if (g = xe(n, p(H(y))), u(n, !1), _._setParentsVisibility(n, !1), _._templates(), _._updateCols(), _._updateLockedCols(), v = _.thead, d = g, _.lockedHeader && k > g ? v = _.lockedHeader.find(">table>thead") : d -= k, i = N(v).filter(h).eq(d), i[0].style.display = "none", K(a(e(">table>thead", _.lockedHeader), _.thead, ">tr.k-filter-row>th"), g, !1), w[0] && (_._updateCols(w.find(">.k-grid-footer-wrap>table")), _._updateLockedCols(w.find(">.k-grid-footer-locked>table")), K(w.find(".k-footer-template>td"), g, !1)), _.lockedTable && k > g ? Q(_.lockedTable.find(">tbody>tr"), g) : Q(_.tbody.children(), g - k), _.lockedTable) _._updateTablesWidth(), _._applyLockedContainersWidth(), _._syncLockedContentHeight(), _._syncLockedHeaderHeight(), _._syncLockedFooterHeight();
                            else {
                                for (s = _.thead.prev().find("col"), o = 0, m = s.length; m > o; o += 1) {
                                    if (l = s[o].style.width, !l || -1 != l.indexOf("%")) {
                                        b = 0;
                                        break
                                    }
                                    b += parseInt(l, 10)
                                }
                                r = e(">.k-grid-header table:first,>.k-grid-footer table:first", _.wrapper).add(_.table), _._footerWidth = null, b && (r.each(function() {
                                    this.style.width = b + "px"
                                }), _._footerWidth = b), yt.msie && 8 == yt.version && (r.css("display", "inline-table"), setTimeout(function() {
                                    r.css("display", "table")
                                }, 1))
                            }
                            _._updateFirstColumnClass(), _.trigger(qe, {
                                column: n
                            })
                        }
                    },
                    _setParentsVisibility: function(t, n) {
                        var i, r, o, s, l, c = this.columns,
                            h = [],
                            f = n ? function(e) {
                                return p(e.columns).length && e.hidden
                            } : function(e) {
                                return !p(e.columns).length && !e.hidden
                            };
                        if (d(t, c, h) && h.length)
                            for (i = h.length - 1; i >= 0; i--) r = h[i], o = y(r, c), s = a(e(">table>thead", this.lockedHeader), this.thead, ">tr:eq(" + o.row + ")>th:not(.k-group-cell):not(.k-hierarchy-cell)").eq(o.cell), f(r) && (u(r, n), s[0].style.display = n ? "" : "none"), s.filter("[" + ue.attr("colspan") + "]").length && (l = parseInt(s.attr(ue.attr("colspan")), 10), s[0].colSpan = l - D(r.columns) || 1)
                    },
                    showColumn: function(n) {
                        var i, r, o, s, l, c, d, h, p, m, g, v = this,
                            _ = v.columns,
                            b = v.footer || v.wrapper.find(".k-grid-footer"),
                            w = v.lockedHeader ? N(v.lockedHeader.find(">table>thead")).length : 0;
                        if (n = "number" == typeof n ? _[n] : _e(n) ? ye(T(_), function(e) {
                            return e === n
                        })[0] : ye(T(_), function(e) {
                            return e.field === n
                        })[0], n && !f(n)) {
                            if (n.columns && n.columns.length) {
                                for (d = y(n, _), u(n, !0), K(a(e(">table>thead", v.lockedHeader), v.thead, ">tr:eq(" + d.row + ")>th"), d.cell, !0), i = 0; n.columns.length > i; i++) this.showColumn(n.columns[i]);
                                return v.trigger(Ge, {
                                    column: n
                                }), t
                            }
                            if (m = xe(n, H(_)), u(n, !0), v._setParentsVisibility(n, !0), v._templates(), v._updateCols(), v._updateLockedCols(), g = v.thead, c = m, v.lockedHeader && w > m ? g = v.lockedHeader.find(">table>thead") : c -= w, o = N(g).eq(c), o[0].style.display = "", K(a(e(">table>thead", v.lockedHeader), v.thead, ">tr.k-filter-row>th"), m, !0), b[0] && (v._updateCols(b.find(">.k-grid-footer-wrap>table")), v._updateLockedCols(b.find(">.k-grid-footer-locked>table")), K(b.find(".k-footer-template>td"), m, !0)), v.lockedTable && w > m ? Z(v.lockedTable.find(">tbody>tr"), m) : Z(v.tbody.children(), m - w), v.lockedTable) v._updateTablesWidth(), v._applyLockedContainersWidth(), v._syncLockedContentHeight(), v._syncLockedHeaderHeight();
                            else if (s = e(">.k-grid-header table:first,>.k-grid-footer table:first", v.wrapper).add(v.table), n.width) {
                                for (l = 0, p = v.thead.prev().find("col"), i = 0, r = p.length; r > i; i += 1) {
                                    if (h = p[i].style.width, h.indexOf("%") > -1) {
                                        l = 0;
                                        break
                                    }
                                    l += parseInt(h, 10)
                                }
                                v._footerWidth = null, l && (s.each(function() {
                                    this.style.width = l + "px"
                                }), v._footerWidth = l)
                            } else s.width("");
                            v._updateFirstColumnClass(), v.trigger(Ge, {
                                column: n
                            })
                        }
                    },
                    _progress: function(e) {
                        var t = this.element;
                        this.lockedContent ? t = this.wrapper : this.element.is("table") ? t = this.element.parent() : this.content && this.content.length && (t = this.content), ue.ui.progress(t, e)
                    },
                    _resize: function(e, t) {
                        this._syncLockedHeaderHeight(), this.content && (this._setContentWidth(), this._setContentHeight()), this.virtualScrollable && (t || this._rowHeight) && (t && (this._rowHeight = null), this.virtualScrollable.repaintScrollbar())
                    },
                    _isActiveInTable: function() {
                        var t = me();
                        return t ? this.table[0] === t || e.contains(this.table[0], t) || this._isLocked() && (this.lockedTable[0] === t || e.contains(this.lockedTable[0], t)) : !1
                    },
                    refresh: function(t) {
                        var n, i = this,
                            r = i.dataSource.view(),
                            o = i.options.navigatable,
                            a = e(i.current()),
                            s = !1,
                            l = (i.dataSource.group() || []).length,
                            c = i.content && i.content.scrollLeft(),
                            d = l + L(p(i.columns)).length;
                        t && "itemchange" === t.action && i.editable || (t = t || {}, i.trigger("dataBinding", {
                            action: t.action || "rebind",
                            index: t.index,
                            items: t.items
                        }) || (i._angularItems("cleanup"), o && (i._isActiveInTable() || i._editContainer && i._editContainer.data("kendoWindow")) && (s = a.is("th"), n = Math.max(i.cellIndex(a), 0)), i._destroyEditable(), i._progress(!1), i._hideResizeHandle(), i._data = [], i.columns.length || (i._autoColumns(i._firstDataItem(r[0], l)), d = l + i.columns.length), i._group = l > 0 || i._group, i._group && (i._templates(), i._updateCols(), i._updateLockedCols(), i._updateHeader(l), i._group = l > 0), i._renderContent(r, d, l), i._renderLockedContent(r, d, l), i._footer(), i._renderNoRecordsContent(), i._setContentHeight(), i._setContentWidth(c), i.lockedTable && (i.options.scrollable.virtual ? i.content.find(">.k-virtual-scrollable-wrap").trigger("scroll") : i.touchScroller ? i.touchScroller.movable.trigger("change") : (i.wrapper.one("scroll", function(e) {
                            e.stopPropagation()
                        }), i.content.trigger("scroll"))), i._restoreCurrent(n, s), i.touchScroller && i.touchScroller.contentResized(), i.selectable && i.selectable.resetTouchEvents(), i._muteAngularRebind(function() {
                            i._angularItems("compile")
                        }), i.trigger(Ye)))
                    },
                    _restoreCurrent: function(n, i) {
                        var r, o, a;
                        n === t || 0 > n || (this._removeCurrent(), i ? this._setCurrent(this.thead.find("th:not(.k-group-cell)").eq(n)) : (r = 0, this._rowVirtualIndex ? r = this.virtualScrollable.position(this._rowVirtualIndex) : n = 0, o = e(), this.lockedTable && (o = this.lockedTable.find(">tbody>tr").eq(r)), o = o.add(this.tbody.children().eq(r)), a = o.find(">td:not(.k-group-cell):not(.k-hierarchy-cell)").eq(n), this._setCurrent(a)), this._current && oe(this._current.closest("table")[0], !0))
                    },
                    _angularItems: function(e) {
                        ue.ui.DataBoundWidget.fn._angularItems.call(this, e), "cleanup" === e && this._cleanupDetailItems(), this._angularGroupItems(e), this._angularGroupFooterItems(e)
                    },
                    _cleanupDetailItems: function() {
                        var e = this;
                        e._hasDetails() && (e.angular("cleanup", function() {
                            return {
                                elements: e.tbody.children(".k-detail-row")
                            }
                        }), e.tbody.find(".k-detail-cell").empty())
                    },
                    _angularGroupItems: function(t) {
                        var n = this,
                            i = n.tbody;
                        n.lockedContent && (i = n.lockedTable.find("tbody")), n._group && n.angular(t, function() {
                            return {
                                elements: i.children(".k-grouping-row"),
                                data: e.map(X(n.dataSource.view()), function(e) {
                                    return {
                                        dataItem: e
                                    }
                                })
                            }
                        })
                    },
                    _angularGroupFooterItems: function(t) {
                        var n = this,
                            i = n.tbody;
                        n.lockedContent && (i = n.element), n._group && n.groupFooterTemplate && n.angular(t, function() {
                            return {
                                elements: i.find(".k-group-footer"),
                                data: e.map(J(n.dataSource.view()), function(e) {
                                    return {
                                        dataItem: e
                                    }
                                })
                            }
                        })
                    },
                    _renderContent: function(e, t, n) {
                        var i, r, o = this,
                            a = "",
                            s = null != o.lockedContent,
                            l = {
                                rowTemplate: o.rowTemplate,
                                altRowTemplate: o.altRowTemplate,
                                groupFooterTemplate: o.groupFooterTemplate
                            };
                        if (t = s ? t - L(B(o.columns)).length : t, n > 0)
                            for (t = s ? t - n : t, o.detailTemplate && t++, o.groupFooterTemplate && (o._groupAggregatesDefaultObject = o.dataSource.aggregates()), i = 0, r = e.length; r > i; i++) a += o._groupRowHtml(e[i], t, 0, s ? de : ce, l, s);
                        else a += o._rowsHtml(e, l);
                        o.tbody = U(o.tbody, o.table, a, this.options.$angular)
                    },
                    _renderLockedContent: function(e, t, n) {
                        var i, r, o, a = "",
                            s = {
                                rowTemplate: this.lockedRowTemplate,
                                altRowTemplate: this.lockedAltRowTemplate,
                                groupFooterTemplate: this.lockedGroupFooterTemplate
                            };
                        if (this.lockedContent) {
                            if (o = this.lockedTable, n > 0)
                                for (t -= p(H(P(this.columns))).length, i = 0, r = e.length; r > i; i++) a += this._groupRowHtml(e[i], t, 0, ce, s);
                            else a = this._rowsHtml(e, s);
                            U(o.children("tbody"), o, a, this.options.$angular), this._syncLockedContentHeight()
                        }
                    },
                    _adjustRowsHeight: function(e, t) {
                        var n, i, r, o, a = e[0].rows,
                            s = a.length,
                            l = t[0].rows,
                            c = e.add(t),
                            d = c.length,
                            u = [];
                        for (n = 0; s > n && l[n]; n++) a[n].style.height && (a[n].style.height = l[n].style.height = ""), i = a[n].offsetHeight, r = l[n].offsetHeight, o = 0, i > r ? o = i : r > i && (o = r), u.push(o);
                        for (n = 0; d > n; n++) c[n].style.display = "none";
                        for (n = 0; s > n; n++) u[n] && (a[n].style.height = l[n].style.height = u[n] + 1 + "px");
                        for (n = 0; d > n; n++) c[n].style.display = ""
                    }
                });
            ue.ExcelMixin && ue.ExcelMixin.extend(Tt.prototype), ue.PDFMixin && (ue.PDFMixin.extend(Tt.prototype), Tt.prototype._drawPDF = function(n) {
                function i() {
                    d && a !== t ? (c.unbind("change", r), c.one("change", function() {
                        s.resolve(o)
                    }), c.page(a)) : s.resolve(o)
                }

                function r() {
                    l._drawPDFShadow({
                        width: l.wrapper.width()
                    }, {
                        avoidLinks: l.options.pdf.avoidLinks
                    }).done(function(e) {
                        var t = c.page(),
                            r = d ? c.totalPages() : 1,
                            a = {
                                page: e,
                                pageNumber: t,
                                progress: t / r,
                                totalPages: r
                            };
                        n.notify(a), o.append(a.page), r > t ? c.page(t + 1) : i()
                    }).fail(function(e) {
                        s.reject(e)
                    })
                }
                var o, a, s = new e.Deferred,
                    l = this,
                    c = l.dataSource,
                    d = l.options.pdf.allPages;
                return this._initPDFProgress(n), o = new ue.drawing.Group, a = c.page(), d ? (c.bind("change", r), c.page(1)) : r(), s.promise()
            }, Tt.prototype._initPDFProgress = function(t) {
                var n, i = e("<div class='k-loading-pdf-mask'><div class='k-loading-color'/></div>");
                i.prepend(this.wrapper.clone().css({
                    position: "absolute",
                    top: 0,
                    left: 0
                })), this.wrapper.append(i), n = e("<div class='k-loading-pdf-progress'>").appendTo(i).kendoProgressBar({
                    type: "chunk",
                    chunkCount: 10,
                    min: 0,
                    max: 1,
                    value: 0
                }).data("kendoProgressBar"), t.progress(function(e) {
                    n.value(e.progress)
                }).always(function() {
                    ue.destroy(i), i.remove()
                })
            }), he.plugin(Tt), he.plugin(Ct)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.listview.min", ["kendo.data.min", "kendo.editable.min", "kendo.selectable.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = "change",
                r = "cancel",
                o = "dataBound",
                a = "dataBinding",
                s = n.ui.Widget,
                l = n.keys,
                c = ">*:not(.k-loading-mask)",
                d = "progress",
                u = "error",
                h = "k-state-focused",
                f = "k-state-selected",
                p = "k-edit-item",
                m = "edit",
                g = "remove",
                v = "save",
                _ = "click",
                b = ".kendoListView",
                w = e.proxy,
                y = n._activeElement,
                k = n.ui.progress,
                x = n.data.DataSource,
                C = n.ui.DataBoundWidget.extend({
                    init: function(t, i) {
                        var r = this;
                        i = e.isArray(i) ? {
                            dataSource: i
                        } : i, s.fn.init.call(r, t, i), i = r.options, r.wrapper = t = r.element, t[0].id && (r._itemId = t[0].id + "_lv_active"), r._element(), r._dataSource(), r._templates(), r._navigatable(), r._selectable(), r._pageable(), r._crudHandlers(), r.options.autoBind && r.dataSource.fetch(), n.notify(r)
                    },
                    events: [i, r, a, o, m, g, v],
                    options: {
                        name: "ListView",
                        autoBind: !0,
                        selectable: !1,
                        navigatable: !1,
                        template: "",
                        altTemplate: "",
                        editTemplate: ""
                    },
                    setOptions: function(e) {
                        s.fn.setOptions.call(this, e), this._templates(), this.selectable && (this.selectable.destroy(), this.selectable = null), this._selectable()
                    },
                    _templates: function() {
                        var e = this.options;
                        this.template = n.template(e.template || ""), this.altTemplate = n.template(e.altTemplate || e.template), this.editTemplate = n.template(e.editTemplate || "")
                    },
                    _item: function(e) {
                        return this.element.children()[e]()
                    },
                    items: function() {
                        return this.element.children()
                    },
                    dataItem: function(t) {
                        var i = n.attr("uid"),
                            r = e(t).closest("[" + i + "]").attr(i);
                        return this.dataSource.getByUid(r)
                    },
                    setDataSource: function(e) {
                        this.options.dataSource = e, this._dataSource(), this.options.autoBind && e.fetch()
                    },
                    _unbindDataSource: function() {
                        var e = this;
                        e.dataSource.unbind(i, e._refreshHandler).unbind(d, e._progressHandler).unbind(u, e._errorHandler)
                    },
                    _dataSource: function() {
                        var e = this;
                        e.dataSource && e._refreshHandler ? e._unbindDataSource() : (e._refreshHandler = w(e.refresh, e), e._progressHandler = w(e._progress, e), e._errorHandler = w(e._error, e)), e.dataSource = x.create(e.options.dataSource).bind(i, e._refreshHandler).bind(d, e._progressHandler).bind(u, e._errorHandler)
                    },
                    _progress: function() {
                        k(this.element, !0)
                    },
                    _error: function() {
                        k(this.element, !1)
                    },
                    _element: function() {
                        this.element.addClass("k-widget k-listview").attr("role", "listbox")
                    },
                    refresh: function(e) {
                        var i, r, s, l, c, d = this,
                            u = d.dataSource.view(),
                            h = "",
                            f = d.template,
                            p = d.altTemplate,
                            m = y();
                        if (e = e || {}, "itemchange" === e.action) return d._hasBindingTarget() || d.editable || (i = e.items[0], s = d.items().filter("[" + n.attr("uid") + "=" + i.uid + "]"), s.length > 0 && (l = s.index(), d.angular("cleanup", function() {
                            return {
                                elements: [s]
                            }
                        }), s.replaceWith(f(i)), s = d.items().eq(l), s.attr(n.attr("uid"), i.uid), d.angular("compile", function() {
                            return {
                                elements: [s],
                                data: [{
                                    dataItem: i
                                }]
                            }
                        }), d.trigger("itemChange", {
                            item: s,
                            data: i
                        }))), t;
                        if (!d.trigger(a, {
                            action: e.action || "rebind",
                            items: e.items,
                            index: e.index
                        })) {
                            for (d._angularItems("cleanup"), d._destroyEditable(), l = 0, c = u.length; c > l; l++) h += l % 2 ? p(u[l]) : f(u[l]);
                            for (d.element.html(h), r = d.items(), l = 0, c = u.length; c > l; l++) r.eq(l).attr(n.attr("uid"), u[l].uid).attr("role", "option").attr("aria-selected", "false");
                            d.element[0] === m && d.options.navigatable && d.current(r.eq(0)), d._angularItems("compile"), d.trigger(o)
                        }
                    },
                    _pageable: function() {
                        var t, i, r = this,
                            o = r.options.pageable;
                        e.isPlainObject(o) && (i = o.pagerId, t = e.extend({}, o, {
                            dataSource: r.dataSource,
                            pagerId: null
                        }), r.pager = new n.ui.Pager(e("#" + i), t))
                    },
                    _selectable: function() {
                        var e, r, o = this,
                            a = o.options.selectable,
                            s = o.options.navigatable;
                        a && (e = n.ui.Selectable.parseOptions(a).multiple, o.selectable = new n.ui.Selectable(o.element, {
                            aria: !0,
                            multiple: e,
                            filter: c,
                            change: function() {
                                o.trigger(i)
                            }
                        }), s && o.element.on("keydown" + b, function(n) {
                            if (n.keyCode === l.SPACEBAR) {
                                if (r = o.current(), n.target == n.currentTarget && n.preventDefault(), e)
                                    if (n.ctrlKey) {
                                        if (r && r.hasClass(f)) return r.removeClass(f), t
                                    } else o.selectable.clear();
                                else o.selectable.clear();
                                o.selectable.value(r)
                            }
                        }))
                    },
                    current: function(e) {
                        var n = this,
                            i = n.element,
                            r = n._current,
                            o = n._itemId;
                        return e === t ? r : (r && r[0] && (r[0].id === o && r.removeAttr("id"), r.removeClass(h), i.removeAttr("aria-activedescendant")), e && e[0] && (o = e[0].id || o, n._scrollTo(e[0]), i.attr("aria-activedescendant", o), e.addClass(h).attr("id", o)), n._current = e, t)
                    },
                    _scrollTo: function(t) {
                        var n, i, r = this,
                            o = !1,
                            a = "scroll";
                        "auto" == r.wrapper.css("overflow") || r.wrapper.css("overflow") == a ? n = r.wrapper[0] : (n = window, o = !0), i = function(i, r) {
                            var s = o ? e(t).offset()[i.toLowerCase()] : t["offset" + i],
                                l = t["client" + r],
                                c = e(n)[a + i](),
                                d = e(n)[r.toLowerCase()]();
                            s + l > c + d ? e(n)[a + i](s + l - d) : c > s && e(n)[a + i](s)
                        }, i("Top", "Height"), i("Left", "Width")
                    },
                    _navigatable: function() {
                        var t = this,
                            i = t.options.navigatable,
                            r = t.element,
                            o = function(n) {
                                t.current(e(n.currentTarget)), e(n.target).is(":button,a,:input,a>.k-icon,textarea") || r.focus()
                            };
                        i && (t._tabindex(), r.on("focus" + b, function() {
                            var e = t._current;
                            e && e.is(":visible") || (e = t._item("first")), t.current(e)
                        }).on("focusout" + b, function() {
                            t._current && t._current.removeClass(h)
                        }).on("keydown" + b, function(i) {
                            var o, a, s = i.keyCode,
                                c = t.current(),
                                d = e(i.target),
                                u = !d.is(":button,textarea,a,a>.t-icon,input"),
                                h = d.is(":text,:password"),
                                f = n.preventDefault,
                                m = r.find("." + p),
                                g = y();
                            if (!(!u && !h && l.ESC != s || h && l.ESC != s && l.ENTER != s))
                                if (l.UP === s || l.LEFT === s) c && (c = c.prev()), t.current(c && c[0] ? c : t._item("last")), f(i);
                                else if (l.DOWN === s || l.RIGHT === s) c && (c = c.next()), t.current(c && c[0] ? c : t._item("first")), f(i);
                                else if (l.PAGEUP === s) t.current(null), t.dataSource.page(t.dataSource.page() - 1), f(i);
                                else if (l.PAGEDOWN === s) t.current(null), t.dataSource.page(t.dataSource.page() + 1), f(i);
                                else if (l.HOME === s) t.current(t._item("first")), f(i);
                                else if (l.END === s) t.current(t._item("last")), f(i);
                                else if (l.ENTER === s) 0 !== m.length && (u || h) ? (o = t.items().index(m), g && g.blur(), t.save(), a = function() {
                                    t.element.trigger("focus"), t.current(t.items().eq(o))
                                }, t.one("dataBound", a)) : "" !== t.options.editTemplate && t.edit(c);
                                else if (l.ESC === s) {
                                    if (m = r.find("." + p), 0 === m.length) return;
                                    o = t.items().index(m), t.cancel(), t.element.trigger("focus"), t.current(t.items().eq(o))
                                }
                        }), r.on("mousedown" + b + " touchstart" + b, c, w(o, t)))
                    },
                    clearSelection: function() {
                        var e = this;
                        e.selectable.clear(), e.trigger(i)
                    },
                    select: function(n) {
                        var i = this,
                            r = i.selectable;
                        return n = e(n), n.length ? (r.options.multiple || (r.clear(), n = n.first()), r.value(n), t) : r.value()
                    },
                    _destroyEditable: function() {
                        var e = this;
                        e.editable && (e.editable.destroy(), delete e.editable)
                    },
                    _modelFromElement: function(e) {
                        var t = e.attr(n.attr("uid"));
                        return this.dataSource.getByUid(t)
                    },
                    _closeEditable: function() {
                        var e, t, i, r = this,
                            o = r.editable,
                            a = r.template;
                        return o && (o.element.index() % 2 && (a = r.altTemplate), r.angular("cleanup", function() {
                            return {
                                elements: [o.element]
                            }
                        }), e = r._modelFromElement(o.element), r._destroyEditable(), i = o.element.index(), o.element.replaceWith(a(e)), t = r.items().eq(i), t.attr(n.attr("uid"), e.uid), r._hasBindingTarget() && n.bind(t, e), r.angular("compile", function() {
                            return {
                                elements: [t],
                                data: [{
                                    dataItem: e
                                }]
                            }
                        })), !0
                    },
                    edit: function(e) {
                        var t, i, r = this,
                            o = r._modelFromElement(e),
                            a = o.uid;
                        r.cancel(), e = r.items().filter("[" + n.attr("uid") + "=" + a + "]"), i = e.index(), e.replaceWith(r.editTemplate(o)), t = r.items().eq(i).addClass(p).attr(n.attr("uid"), o.uid), r.editable = t.kendoEditable({
                            model: o,
                            clearContainer: !1,
                            errorTemplate: !1,
                            target: r
                        }).data("kendoEditable"), r.trigger(m, {
                            model: o,
                            item: t
                        })
                    },
                    save: function() {
                        var e, t, n = this,
                            i = n.editable;
                        i && (t = i.element, e = n._modelFromElement(t), i.end() && !n.trigger(v, {
                            model: e,
                            item: t
                        }) && (n._closeEditable(), n.dataSource.sync()))
                    },
                    remove: function(e) {
                        var t = this,
                            n = t.dataSource,
                            i = t._modelFromElement(e);
                        t.editable && (n.cancelChanges(t._modelFromElement(t.editable.element)), t._closeEditable()), t.trigger(g, {
                            model: i,
                            item: e
                        }) || (e.hide(), n.remove(i), n.sync())
                    },
                    add: function() {
                        var e, t = this,
                            n = t.dataSource,
                            i = n.indexOf((n.view() || [])[0]);
                        0 > i && (i = 0), t.cancel(), e = n.insert(i, {}), t.edit(t.element.find("[data-uid='" + e.uid + "']"))
                    },
                    cancel: function() {
                        var e, t, n = this,
                            i = n.dataSource;
                        n.editable && (e = n.editable.element, t = n._modelFromElement(e), n.trigger(r, {
                            model: t,
                            container: e
                        }) || (i.cancelChanges(t), n._closeEditable()))
                    },
                    _crudHandlers: function() {
                        var t = this,
                            i = _ + b;
                        t.element.on(i, ".k-edit-button", function(i) {
                            var r = e(this).closest("[" + n.attr("uid") + "]");
                            t.edit(r), i.preventDefault()
                        }), t.element.on(i, ".k-delete-button", function(i) {
                            var r = e(this).closest("[" + n.attr("uid") + "]");
                            t.remove(r), i.preventDefault()
                        }), t.element.on(i, ".k-update-button", function(e) {
                            t.save(), e.preventDefault()
                        }), t.element.on(i, ".k-cancel-button", function(e) {
                            t.cancel(), e.preventDefault()
                        })
                    },
                    destroy: function() {
                        var e = this;
                        s.fn.destroy.call(e), e._unbindDataSource(), e._destroyEditable(), e.element.off(b), e.pager && e.pager.destroy(), n.destroy(e.element)
                    }
                });
            n.ui.plugin(C)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.upload.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            function n(t) {
                return e.map(i(t), function(e) {
                    return e.name
                }).join(", ")
            }

            function i(e) {
                var t = e[0];
                return t.files ? r(t.files) : [{
                    name: s(t.value),
                    extension: a(t.value),
                    size: null
                }]
            }

            function r(t) {
                return e.map(t, function(e) {
                    return o(e)
                })
            }

            function o(e) {
                var t = e.name || e.fileName;
                return {
                    name: b.htmlEncode(t),
                    extension: a(t),
                    size: e.size || e.fileSize,
                    rawFile: e
                }
            }

            function a(e) {
                var t = e.match(x);
                return t ? t[0] : ""
            }

            function s(e) {
                var t = e.lastIndexOf("\\");
                return -1 != t ? e.substr(t + 1) : e
            }

            function l(t, n) {
                var i = b.guid();
                return e.map(t, function(e) {
                    return e.uid = n ? b.guid() : i, e
                })
            }

            function c(t) {
                return !t.multiple && e(".k-file", t.wrapper).length > 1
            }

            function d(n, i, r) {
                var o, a;
                return i._supportsRemove() ? (o = n.data("fileNames"), a = e.map(o, function(e) {
                    return e.name
                }), i._submitRemove(a, r, function(e, t, r) {
                    i._removeFileEntry(n), i.trigger(D, {
                        operation: "remove",
                        files: o,
                        response: e,
                        XMLHttpRequest: r
                    })
                }, function(e) {
                    c(i) && i._removeFileEntry(n), i.trigger(A, {
                        operation: "remove",
                        files: o,
                        XMLHttpRequest: e
                    }), k("Server response: " + e.responseText)
                }), t) : (c(i) && i._removeFileEntry(n), t)
            }

            function u(t, n, i) {
                var r = !1,
                    o = "";
                try {
                    o = e.parseJSON(h(t)), r = !0
                } catch (a) {
                    i()
                }
                r && n(o)
            }

            function h(e) {
                return (t === e || "" === e) && (e = "{}"), e
            }

            function f(e) {
                e.stopPropagation(), e.preventDefault()
            }

            function p(e, t, n, i) {
                var r, o;
                e.on("dragenter" + t, function() {
                    n(), o = new Date, r || (r = setInterval(function() {
                        var e = new Date - o;
                        e > 100 && (i(), clearInterval(r), r = null)
                    }, 100))
                }).on("dragover" + t, function() {
                    o = new Date
                })
            }

            function m(e) {
                return e.is(".k-file-progress, .k-file-success, .k-file-error")
            }

            function g(t) {
                return e(t.target).closest(".k-file")
            }
            var v, _, b = window.kendo,
                w = b.ui.Widget,
                y = b.antiForgeryTokens,
                k = b.logToConsole,
                x = /\.([^\.]+)$/,
                C = ".kendoUpload",
                S = "select",
                T = "upload",
                D = "success",
                A = "error",
                E = "complete",
                F = "cancel",
                I = "progress",
                M = "remove",
                R = w.extend({
                    init: function(t, n) {
                        var i, r, o, a = this;
                        w.fn.init.call(a, t, n), a.name = t.name, a.multiple = a.options.multiple, a.localization = a.options.localization, i = a.element, a.wrapper = i.closest(".k-upload"), 0 === a.wrapper.length && (a.wrapper = a._wrapInput(i)), a._activeInput(i), a.toggle(a.options.enabled), r = a._ns = C + "-" + b.guid(), i.closest("form").on("submit" + r, e.proxy(a._onParentFormSubmit, a)).on("reset" + r, e.proxy(a._onParentFormReset, a)), a.options.async.saveUrl ? (a._module = a._supportsFormData() ? new _(a) : new v(a), a._async = !0, o = a.options.files, o.length > 0 && a._renderInitialFiles(o)) : a._module = new P(a), a._supportsDrop() && a._setupDropZone(), a.wrapper.on("click", ".k-upload-action", e.proxy(a._onFileAction, a)).on("click", ".k-upload-selected", e.proxy(a._onUploadSelected, a)), a.element.val() && a._onInputChange({
                            target: a.element
                        })
                    },
                    events: [S, T, D, A, E, F, I, M],
                    options: {
                        name: "Upload",
                        enabled: !0,
                        multiple: !0,
                        showFileList: !0,
                        template: "",
                        files: [],
                        async: {
                            removeVerb: "POST",
                            autoUpload: !0,
                            withCredentials: !0
                        },
                        localization: {
                            select: "Select files...",
                            cancel: "Cancel",
                            retry: "Retry",
                            remove: "Remove",
                            uploadSelectedFiles: "Upload files",
                            dropFilesHere: "drop files here to upload",
                            statusUploading: "uploading",
                            statusUploaded: "uploaded",
                            statusWarning: "warning",
                            statusFailed: "failed",
                            headerStatusUploading: "Uploading...",
                            headerStatusUploaded: "Done"
                        }
                    },
                    setOptions: function(e) {
                        var t = this,
                            n = t.element;
                        w.fn.setOptions.call(t, e), t.multiple = t.options.multiple, n.attr("multiple", t._supportsMultiple() ? t.multiple : !1), t.toggle(t.options.enabled)
                    },
                    enable: function(e) {
                        e = t === e ? !0 : e, this.toggle(e)
                    },
                    disable: function() {
                        this.toggle(!1)
                    },
                    toggle: function(e) {
                        e = t === e ? e : !e, this.wrapper.toggleClass("k-state-disabled", e),
                            this.element.prop("disabled", e)
                    },
                    destroy: function() {
                        var t = this;
                        e(document).add(e(".k-dropzone", t.wrapper)).add(t.wrapper.closest("form")).off(t._ns), e(t.element).off(C), w.fn.destroy.call(t)
                    },
                    _addInput: function(t) {
                        if (t[0].nodeType) {
                            var n = this,
                                i = t.clone().val("");
                            i.insertAfter(n.element).data("kendoUpload", n), e(n.element).hide().attr("tabindex", "-1").removeAttr("id").off(C), n._activeInput(i), n.element.focus()
                        }
                    },
                    _activeInput: function(t) {
                        var n = this,
                            i = n.wrapper;
                        n.element = t, t.attr("multiple", n._supportsMultiple() ? n.multiple : !1).attr("autocomplete", "off").on("click" + C, function(e) {
                            i.hasClass("k-state-disabled") && e.preventDefault()
                        }).on("focus" + C, function() {
                            e(this).parent().addClass("k-state-focused")
                        }).on("blur" + C, function() {
                            e(this).parent().removeClass("k-state-focused")
                        }).on("change" + C, e.proxy(n._onInputChange, n)).on("keydown" + C, e.proxy(n._onInputKeyDown, n))
                    },
                    _onInputKeyDown: function(e) {
                        var t = this,
                            n = t.wrapper.find(".k-upload-action:first");
                        e.keyCode === b.keys.TAB && n.length > 0 && (e.preventDefault(), n.focus())
                    },
                    _onInputChange: function(t) {
                        var n = this,
                            i = e(t.target),
                            r = l(n._inputFiles(i), n._isAsyncNonBatch()),
                            o = n.trigger(S, {
                                files: r
                            });
                        o ? (n._addInput(i), i.remove()) : n._module.onSelect({
                            target: i
                        }, r)
                    },
                    _onDrop: function(t) {
                        var n, i = t.originalEvent.dataTransfer,
                            o = this,
                            a = i.files,
                            s = l(r(a), o._isAsyncNonBatch());
                        f(t), a.length > 0 && !o.wrapper.hasClass("k-state-disabled") && (!o.multiple && s.length > 1 && s.splice(1, s.length - 1), n = o.trigger(S, {
                            files: s
                        }), n || o._module.onSelect({
                            target: e(".k-dropzone", o.wrapper)
                        }, s))
                    },
                    _isAsyncNonBatch: function() {
                        return this._async && !this.options.async.batch || !1
                    },
                    _renderInitialFiles: function(t) {
                        var n, i, r = this,
                            o = 0;
                        for (t = l(t, !0), o = 0; t.length > o; o++) n = t[o], i = r._enqueueFile(n.name, {
                            fileNames: [n]
                        }), i.addClass("k-file-success").data("files", [t[o]]), e(".k-progress", i).width("100%"), r.options.template || e(".k-upload-status", i).prepend("<span class='k-upload-pct'>100%</span>"), r._supportsRemove() && r._fileAction(i, M)
                    },
                    _prepareTemplateData: function(e, t) {
                        var n = t.fileNames,
                            i = {},
                            r = 0,
                            o = 0;
                        for (o = 0; n.length > o; o++) r += n[o].size;
                        return i.name = e, i.size = r, i.files = t.fileNames, i
                    },
                    _prepareDefaultFileEntryTemplate: function(t, n) {
                        var i = "",
                            r = e("<li class='k-file'><span class='k-progress'></span><span class='k-icon'></span><span class='k-filename' title='" + t + "'>" + t + "</span><strong class='k-upload-status'></strong></li>");
                        return 1 == n.fileNames.length && n.fileNames[0].extension && (i = n.fileNames[0].extension.substring(1), e(".k-icon", r).addClass("k-i-" + i)), r
                    },
                    _enqueueFile: function(t, n) {
                        var i, r, o, a, s = this,
                            l = n.fileNames[0].uid,
                            c = e(".k-upload-files", s.wrapper),
                            d = s.options,
                            u = d.template;
                        return 0 === c.length && (c = e("<ul class='k-upload-files k-reset'></ul>").appendTo(s.wrapper), s.options.showFileList || c.hide(), s.wrapper.removeClass("k-upload-empty")), i = e(".k-file", c), u ? (o = s._prepareTemplateData(t, n), u = b.template(u), r = e("<li class='k-file'>" + u(o) + "</li>"), r.find(".k-upload-action").addClass("k-button k-button-bare"), s.angular("compile", function() {
                            return {
                                elements: r,
                                data: [o]
                            }
                        })) : r = s._prepareDefaultFileEntryTemplate(t, n), r.attr(b.attr("uid"), l).appendTo(c).data(n), s._async || e(".k-progress", r).width("100%"), !s.multiple && i.length > 0 && (a = {
                            files: i.data("fileNames")
                        }, s.trigger(M, a) || s._module.onRemove({
                            target: e(i, s.wrapper)
                        }, a.data)), r
                    },
                    _removeFileEntry: function(t) {
                        var n, i, r = this,
                            o = t.closest(".k-upload-files");
                        t.remove(), n = e(".k-file", o), i = e(".k-file-success, .k-file-error", o), i.length === n.length && this._hideUploadButton(), 0 === n.length && (o.remove(), r.wrapper.addClass("k-upload-empty"), r._hideHeaderUploadstatus())
                    },
                    _fileAction: function(e, t) {
                        var n = {
                                remove: "k-delete",
                                cancel: "k-cancel",
                                retry: "k-retry"
                            },
                            i = {
                                remove: "k-i-close",
                                cancel: "k-i-close",
                                retry: "k-i-refresh"
                            };
                        n.hasOwnProperty(t) && (this._clearFileAction(e), this.options.template ? e.find(".k-upload-action").addClass("k-button k-button-bare").append("<span class='k-icon " + i[t] + " " + n[t] + "' title='" + this.localization[t] + "'></span>").show() : (e.find(".k-upload-status .k-upload-action").remove(), e.find(".k-upload-status").append(this._renderAction(n[t], this.localization[t], i[t]))))
                    },
                    _fileState: function(t, n) {
                        var i = this.localization,
                            r = {
                                uploading: {
                                    text: i.statusUploading
                                },
                                uploaded: {
                                    text: i.statusUploaded
                                },
                                failed: {
                                    text: i.statusFailed
                                }
                            },
                            o = r[n];
                        o && e(".k-icon:not(.k-delete, .k-cancel, .k-retry)", t).text(o.text)
                    },
                    _renderAction: function(t, n, i) {
                        return e("" !== t ? "<button type='button' class='k-button k-button-bare k-upload-action'><span class='k-icon " + i + " " + t + "' title='" + n + "'></span></button>" : "<button type='button' class='k-button'>" + n + "</button>")
                    },
                    _clearFileAction: function(t) {
                        e(".k-upload-action", t).empty().hide()
                    },
                    _onFileAction: function(t) {
                        var n, i, r, o, a = this;
                        return a.wrapper.hasClass("k-state-disabled") || (n = e(t.target).closest(".k-upload-action"), i = n.find(".k-icon"), r = n.closest(".k-file"), o = {
                            files: r.data("fileNames")
                        }, i.hasClass("k-delete") ? a.trigger(M, o) || a._module.onRemove({
                            target: e(r, a.wrapper)
                        }, o.data) : i.hasClass("k-cancel") ? (a.trigger(F, o), a._module.onCancel({
                            target: e(r, a.wrapper)
                        }), this._checkAllComplete(), a._updateHeaderUploadStatus()) : i.hasClass("k-retry") && (e(".k-warning", r).remove(), a._module.onRetry({
                            target: e(r, a.wrapper)
                        }))), !1
                    },
                    _onUploadSelected: function() {
                        var e = this,
                            t = e.wrapper;
                        return t.hasClass("k-state-disabled") || this._module.onSaveSelected(), !1
                    },
                    _onFileProgress: function(t, n) {
                        var i;
                        n > 100 && (n = 100), this.options.template ? e(".k-progress", t.target).width(n + "%") : (i = e(".k-upload-pct", t.target), 0 === i.length && e(".k-upload-status", t.target).prepend("<span class='k-upload-pct'></span>"), e(".k-upload-pct", t.target).text(n + "%"), e(".k-progress", t.target).width(n + "%")), this.trigger(I, {
                            files: g(t).data("fileNames"),
                            percentComplete: n
                        })
                    },
                    _onUploadSuccess: function(e, t, n) {
                        var i = g(e);
                        this._fileState(i, "uploaded"), i.removeClass("k-file-progress").addClass("k-file-success"), this._updateHeaderUploadStatus(), this.trigger(D, {
                            files: i.data("fileNames"),
                            response: t,
                            operation: "upload",
                            XMLHttpRequest: n
                        }), this._supportsRemove() ? this._fileAction(i, M) : this._clearFileAction(i), this._checkAllComplete()
                    },
                    _onUploadError: function(t, n) {
                        var i = g(t),
                            r = e(".k-upload-pct", i);
                        this._fileState(i, "failed"), i.removeClass("k-file-progress").addClass("k-file-error"), e(".k-progress", i).width("100%"), r.length > 0 ? r.empty().removeClass("k-upload-pct").addClass("k-icon k-warning") : e(".k-upload-status", i).prepend("<span class='k-icon k-warning'></span>"), this._updateHeaderUploadStatus(), this._fileAction(i, "retry"), this.trigger(A, {
                            operation: "upload",
                            files: i.data("fileNames"),
                            XMLHttpRequest: n
                        }), k("Server response: " + n.responseText), this._checkAllComplete()
                    },
                    _showUploadButton: function() {
                        var t = e(".k-upload-selected", this.wrapper);
                        0 === t.length && (t = this._renderAction("", this.localization.uploadSelectedFiles).addClass("k-upload-selected")), this.wrapper.append(t)
                    },
                    _hideUploadButton: function() {
                        e(".k-upload-selected", this.wrapper).remove()
                    },
                    _showHeaderUploadStatus: function() {
                        var t = this.localization,
                            n = e(".k-dropzone", this.wrapper),
                            i = e(".k-upload-status-total", this.wrapper);
                        0 !== i.length && i.remove(), i = '<strong class="k-upload-status k-upload-status-total">' + t.headerStatusUploading + '<span class="k-icon k-loading">' + t.statusUploading + "</span></strong>", n.length > 0 ? n.append(i) : e(".k-upload-button", this.wrapper).after(i)
                    },
                    _updateHeaderUploadStatus: function() {
                        var t, n, i, r = this,
                            o = r.localization,
                            a = e(".k-file", r.wrapper).not(".k-file-success, .k-file-error");
                        0 === a.length && (t = e(".k-file.k-file-error", r.wrapper), n = e(".k-upload-status-total", r.wrapper), i = e(".k-icon", n).removeClass("k-loading").addClass(0 !== t.length ? "k-warning" : "k-i-tick").text(0 !== t.length ? o.statusWarning : o.statusUploaded), n.text(r.localization.headerStatusUploaded).append(i))
                    },
                    _hideHeaderUploadstatus: function() {
                        e(".k-upload-status-total", this.wrapper).remove()
                    },
                    _onParentFormSubmit: function() {
                        var n, i = this,
                            r = i.element;
                        t !== this._module.onAbort && this._module.onAbort(), r.value || (n = e(r), n.attr("disabled", "disabled"), window.setTimeout(function() {
                            n.removeAttr("disabled")
                        }, 0))
                    },
                    _onParentFormReset: function() {
                        e(".k-upload-files", this.wrapper).remove()
                    },
                    _supportsFormData: function() {
                        return "undefined" != typeof FormData
                    },
                    _supportsMultiple: function() {
                        var e = this._userAgent().indexOf("Windows") > -1;
                        return !(b.support.browser.opera || b.support.browser.safari && e)
                    },
                    _supportsDrop: function() {
                        var e = this._userAgent().toLowerCase(),
                            t = /chrome/.test(e),
                            n = !t && /safari/.test(e),
                            i = n && /windows/.test(e);
                        return !i && this._supportsFormData() && this.options.async.saveUrl
                    },
                    _userAgent: function() {
                        return navigator.userAgent
                    },
                    _setupDropZone: function() {
                        var t, n, i = this;
                        e(".k-upload-button", this.wrapper).wrap("<div class='k-dropzone'></div>"), t = i._ns, n = e(".k-dropzone", i.wrapper).append(e("<em>" + i.localization.dropFilesHere + "</em>")).on("dragenter" + t, f).on("dragover" + t, function(e) {
                            e.preventDefault()
                        }).on("drop" + t, e.proxy(this._onDrop, this)), p(n, t, function() {
                            n.closest(".k-upload").hasClass("k-state-disabled") || n.addClass("k-dropzone-hovered")
                        }, function() {
                            n.removeClass("k-dropzone-hovered")
                        }), p(e(document), t, function() {
                            n.closest(".k-upload").hasClass("k-state-disabled") || (n.addClass("k-dropzone-active"), n.closest(".k-upload").removeClass("k-upload-empty"))
                        }, function() {
                            n.removeClass("k-dropzone-active"), 0 === e("li.k-file", n.closest(".k-upload")).length && n.closest(".k-upload").addClass("k-upload-empty")
                        })
                    },
                    _supportsRemove: function() {
                        return !!this.options.async.removeUrl
                    },
                    _submitRemove: function(t, n, i, r) {
                        var o = this,
                            a = o.options.async.removeField || "fileNames",
                            s = e.extend(n, y());
                        s[a] = t, jQuery.ajax({
                            type: this.options.async.removeVerb,
                            dataType: "json",
                            dataFilter: h,
                            url: this.options.async.removeUrl,
                            traditional: !0,
                            data: s,
                            success: i,
                            error: r,
                            xhrFields: {
                                withCredentials: this.options.async.withCredentials
                            }
                        })
                    },
                    _wrapInput: function(e) {
                        var t = this,
                            n = t.options;
                        return e.wrap("<div class='k-widget k-upload k-header'><div class='k-button k-upload-button'></div></div>"), n.async.saveUrl || e.closest(".k-upload").addClass("k-upload-sync"), e.closest(".k-upload").addClass("k-upload-empty"), e.closest(".k-button").append("<span>" + this.localization.select + "</span>"), e.closest(".k-upload")
                    },
                    _checkAllComplete: function() {
                        0 === e(".k-file.k-file-progress", this.wrapper).length && this.trigger(E)
                    },
                    _inputFiles: function(e) {
                        return i(e)
                    }
                }),
                P = function(e) {
                    this.name = "syncUploadModule", this.element = e.wrapper, this.upload = e, this.element.closest("form").attr("enctype", "multipart/form-data").attr("encoding", "multipart/form-data")
                };
            P.prototype = {
                onSelect: function(t, i) {
                    var r, o = this.upload,
                        a = e(t.target);
                    o._addInput(a), r = o._enqueueFile(n(a), {
                        relatedInput: a,
                        fileNames: i
                    }), o._fileAction(r, M)
                },
                onRemove: function(e) {
                    var t = g(e);
                    t.data("relatedInput").remove(), this.upload._removeFileEntry(t)
                }
            }, v = function(e) {
                this.name = "iframeUploadModule", this.element = e.wrapper, this.upload = e, this.iframes = []
            }, R._frameId = 0, v.prototype = {
                onSelect: function(t, n) {
                    var i = this.upload,
                        r = e(t.target),
                        o = this.prepareUpload(r, n);
                    i.options.async.autoUpload ? this.performUpload(o) : (i._supportsRemove() && this.upload._fileAction(o, M), i._showUploadButton())
                },
                prepareUpload: function(t, i) {
                    var r, o, a, s = this.upload,
                        l = e(s.element),
                        c = s.options.async.saveField || t.attr("name");
                    return s._addInput(t), t.attr("name", c), r = this.createFrame(s.name + "_" + R._frameId++), this.registerFrame(r), o = this.createForm(s.options.async.saveUrl, r.attr("name")).append(l), a = s._enqueueFile(n(t), {
                        frame: r,
                        relatedInput: l,
                        fileNames: i
                    }), r.data({
                        form: o,
                        file: a
                    }), a
                },
                performUpload: function(t) {
                    var n, i, r, o = {
                            files: t.data("fileNames")
                        },
                        a = t.data("frame"),
                        s = this.upload;
                    if (s.trigger(T, o)) s._removeFileEntry(a.data("file")), this.cleanupFrame(a), this.unregisterFrame(a);
                    else {
                        s._hideUploadButton(), s._showHeaderUploadStatus(), a.appendTo(document.body), n = a.data("form").attr("action", s.options.async.saveUrl).appendTo(document.body), o.data = e.extend({}, o.data, y());
                        for (i in o.data) r = n.find("input[name='" + i + "']"), 0 === r.length && (r = e("<input>", {
                            type: "hidden",
                            name: i
                        }).prependTo(n)), r.val(o.data[i]);
                        s._fileAction(t, F), s._fileState(t, "uploading"), e(t).removeClass("k-file-error").addClass("k-file-progress"), a.one("load", e.proxy(this.onIframeLoad, this)), n[0].submit()
                    }
                },
                onSaveSelected: function() {
                    var t = this;
                    e(".k-file", this.element).each(function() {
                        var n = e(this),
                            i = m(n);
                        i || t.performUpload(n)
                    })
                },
                onIframeLoad: function(t) {
                    var n, i = e(t.target);
                    try {
                        n = i.contents().text()
                    } catch (r) {
                        n = "Error trying to get server response: " + r
                    }
                    this.processResponse(i, n)
                },
                processResponse: function(t, n) {
                    var i = t.data("file"),
                        r = this,
                        o = {
                            responseText: n
                        };
                    u(n, function(n) {
                        e.extend(o, {
                            statusText: "OK",
                            status: "200"
                        }), r.upload._onFileProgress({
                            target: e(i, r.upload.wrapper)
                        }, 100), r.upload._onUploadSuccess({
                            target: e(i, r.upload.wrapper)
                        }, n, o), r.cleanupFrame(t), r.unregisterFrame(t)
                    }, function() {
                        e.extend(o, {
                            statusText: "error",
                            status: "500"
                        }), r.upload._onUploadError({
                            target: e(i, r.upload.wrapper)
                        }, o)
                    })
                },
                onCancel: function(t) {
                    var n = e(t.target).data("frame");
                    this.stopFrameSubmit(n), this.cleanupFrame(n), this.unregisterFrame(n), this.upload._removeFileEntry(n.data("file"))
                },
                onRetry: function(e) {
                    var t = g(e);
                    this.performUpload(t)
                },
                onRemove: function(e, t) {
                    var n = g(e),
                        i = n.data("frame");
                    i ? (this.unregisterFrame(i), this.upload._removeFileEntry(n), this.cleanupFrame(i)) : d(n, this.upload, t)
                },
                onAbort: function() {
                    var t = this.element,
                        n = this;
                    e.each(this.iframes, function() {
                        e("input", this.data("form")).appendTo(t), n.stopFrameSubmit(this[0]), this.data("form").remove(), this.remove()
                    }), this.iframes = []
                },
                createFrame: function(t) {
                    return e("<iframe name='" + t + "' id='" + t + "' style='display:none;' />")
                },
                createForm: function(t, n) {
                    return e("<form enctype='multipart/form-data' method='POST' action='" + t + "' target='" + n + "'/>")
                },
                stopFrameSubmit: function(e) {
                    t !== e.stop ? e.stop() : e.document && e.document.execCommand("Stop")
                },
                registerFrame: function(e) {
                    this.iframes.push(e)
                },
                unregisterFrame: function(t) {
                    this.iframes = e.grep(this.iframes, function(e) {
                        return e.attr("name") != t.attr("name")
                    })
                },
                cleanupFrame: function(e) {
                    var t = e.data("form");
                    e.data("file").data("frame", null), setTimeout(function() {
                        t.remove(), e.remove()
                    }, 1)
                }
            }, _ = function(e) {
                this.name = "formDataUploadModule", this.element = e.wrapper, this.upload = e
            }, _.prototype = {
                onSelect: function(t, n) {
                    var i = this.upload,
                        r = this,
                        o = e(t.target),
                        a = this.prepareUpload(o, n);
                    e.each(a, function() {
                        i.options.async.autoUpload ? r.performUpload(this) : (i._supportsRemove() && i._fileAction(this, M), i._showUploadButton())
                    })
                },
                prepareUpload: function(t, n) {
                    var i = this.enqueueFiles(n);
                    return t.is("input") && (e.each(i, function() {
                        e(this).data("relatedInput", t)
                    }), t.data("relatedFileEntries", i), this.upload._addInput(t)), i
                },
                enqueueFiles: function(t) {
                    var n, i, r, o, a = this.upload,
                        s = t.length,
                        l = [];
                    if (a.options.async.batch === !0) n = e.map(t, function(e) {
                        return e.name
                    }).join(", "), o = a._enqueueFile(n, {
                        fileNames: t
                    }), o.data("files", t), l.push(o);
                    else
                        for (i = 0; s > i; i++) r = t[i], n = r.name, o = a._enqueueFile(n, {
                            fileNames: [r]
                        }), o.data("files", [r]), l.push(o);
                    return l
                },
                performUpload: function(t) {
                    var n, i = this.upload,
                        r = this.createFormData(),
                        o = this.createXHR(),
                        a = {
                            files: t.data("fileNames"),
                            XMLHttpRequest: o
                        };
                    if (i.trigger(T, a)) this.removeFileEntry(t);
                    else {
                        if (i._fileAction(t, F), i._hideUploadButton(), i._showHeaderUploadStatus(), a.formData) r = a.formData;
                        else {
                            a.data = e.extend({}, a.data, y());
                            for (n in a.data) r.append(n, a.data[n]);
                            this.populateFormData(r, t.data("files"))
                        }
                        i._fileState(t, "uploading"), e(t).removeClass("k-file-error").addClass("k-file-progress"), this.postFormData(i.options.async.saveUrl, r, t, o)
                    }
                },
                onSaveSelected: function() {
                    var t = this;
                    e(".k-file", this.element).each(function() {
                        var n = e(this),
                            i = m(n);
                        i || t.performUpload(n)
                    })
                },
                onCancel: function(e) {
                    var t = g(e);
                    this.stopUploadRequest(t), this.removeFileEntry(t)
                },
                onRetry: function(e) {
                    var t = g(e);
                    this.performUpload(t)
                },
                onRemove: function(e, t) {
                    var n = g(e);
                    n.hasClass("k-file-success") ? d(n, this.upload, t) : this.removeFileEntry(n)
                },
                createXHR: function() {
                    return new XMLHttpRequest
                },
                postFormData: function(e, t, n, i) {
                    var r = this;
                    n.data("request", i), i.addEventListener("load", function(e) {
                        r.onRequestSuccess.call(r, e, n)
                    }, !1), i.addEventListener(A, function(e) {
                        r.onRequestError.call(r, e, n)
                    }, !1), i.upload.addEventListener("progress", function(e) {
                        r.onRequestProgress.call(r, e, n)
                    }, !1), i.open("POST", e, !0), i.withCredentials = this.upload.options.async.withCredentials, i.send(t)
                },
                createFormData: function() {
                    return new FormData
                },
                populateFormData: function(e, t) {
                    var n, i = this.upload,
                        r = t.length;
                    for (n = 0; r > n; n++) e.append(i.options.async.saveField || i.name, t[n].rawFile);
                    return e
                },
                onRequestSuccess: function(t, n) {
                    function i() {
                        o.upload._onUploadError({
                            target: e(n, o.upload.wrapper)
                        }, r)
                    }
                    var r = t.target,
                        o = this;
                    r.status >= 200 && 299 >= r.status ? u(r.responseText, function(t) {
                        o.upload._onFileProgress({
                            target: e(n, o.upload.wrapper)
                        }, 100), o.upload._onUploadSuccess({
                            target: e(n, o.upload.wrapper)
                        }, t, r), o.cleanupFileEntry(n)
                    }, i) : i()
                },
                onRequestError: function(t, n) {
                    var i = t.target;
                    this.upload._onUploadError({
                        target: e(n, this.upload.wrapper)
                    }, i)
                },
                cleanupFileEntry: function(t) {
                    var n = t.data("relatedInput"),
                        i = !0;
                    n && (e.each(n.data("relatedFileEntries") || [], function() {
                        this.parent().length > 0 && this[0] != t[0] && (i = i && this.hasClass("k-file-success"))
                    }), i && n.remove())
                },
                removeFileEntry: function(e) {
                    this.cleanupFileEntry(e), this.upload._removeFileEntry(e)
                },
                onRequestProgress: function(t, n) {
                    var i = Math.round(100 * t.loaded / t.total);
                    this.upload._onFileProgress({
                        target: e(n, this.upload.wrapper)
                    }, i)
                },
                stopUploadRequest: function(e) {
                    e.data("request").abort()
                }
            }, b.ui.plugin(R)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.filebrowser.min", ["kendo.listview.min", "kendo.dropdownlist.min", "kendo.upload.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t, n) {
                var i, r;
                e.on("dragenter" + x, function() {
                    t(), r = new Date, i || (i = setInterval(function() {
                        var e = new Date - r;
                        e > 100 && (n(), clearInterval(i), i = null)
                    }, 100))
                }).on("dragover" + x, function() {
                    r = new Date
                })
            }

            function i(e, n) {
                return e !== t && e.match(/\/$/) || (e = (e || "") + "/"), e + n
            }

            function r(e) {
                if (!e) return "";
                var t = " bytes";
                return e >= 1073741824 ? (t = " GB", e /= 1073741824) : e >= 1048576 ? (t = " MB", e /= 1048576) : e >= 1024 && (t = " KB", e /= 1024), Math.round(100 * e) / 100 + t
            }

            function o(e, t) {
                var n = e[t];
                return h(n) ? n.from || n.field || t : n
            }
            var a, s, l, c, d = window.kendo,
                u = d.ui.Widget,
                h = e.isPlainObject,
                f = e.proxy,
                p = e.extend,
                m = d.support.placeholder,
                g = d.support.browser,
                v = d.isFunction,
                _ = /(^\/|\/$)/g,
                b = "change",
                w = "apply",
                y = "error",
                k = "click",
                x = ".kendoFileBrowser",
                C = ".kendoBreadcrumbs",
                S = ".kendoSearchBox",
                T = "name",
                D = "size",
                A = "type",
                E = {
                    field: A,
                    dir: "asc"
                },
                F = d.template('<li class="k-tile-empty"><strong>${text}</strong></li>'),
                I = '<div class="k-widget k-filebrowser-toolbar k-header k-floatwrap"><div class="k-toolbar-wrap"># if (showUpload) { # <div class="k-widget k-upload"><div class="k-button k-button-icontext k-upload-button"><span class="k-icon k-add"></span>#=messages.uploadFile#<input type="file" name="file" /></div></div># } ## if (showCreate) { #<button type="button" class="k-button k-button-icon"><span class="k-icon k-addfolder" /></button># } ## if (showDelete) { #<button type="button" class="k-button k-button-icon k-state-disabled"><span class="k-icon k-delete" /></button>&nbsp;# } #</div><div class="k-tiles-arrange"><label>#=messages.orderBy#: <select /></label></div></div>';
            p(!0, d.data, {
                schemas: {
                    filebrowser: {
                        data: function(e) {
                            return e.items || e || []
                        },
                        model: {
                            id: "name",
                            fields: {
                                name: "name",
                                size: "size",
                                type: "type"
                            }
                        }
                    }
                }
            }), p(!0, d.data, {
                transports: {
                    filebrowser: d.data.RemoteTransport.extend({
                        init: function(t) {
                            d.data.RemoteTransport.fn.init.call(this, e.extend(!0, {}, this.options, t))
                        },
                        _call: function(t, n) {
                            n.data = e.extend({}, n.data, {
                                path: this.options.path()
                            }), v(this.options[t]) ? this.options[t].call(this, n) : d.data.RemoteTransport.fn[t].call(this, n)
                        },
                        read: function(e) {
                            this._call("read", e)
                        },
                        create: function(e) {
                            this._call("create", e)
                        },
                        destroy: function(e) {
                            this._call("destroy", e)
                        },
                        update: function() {},
                        options: {
                            read: {
                                type: "POST"
                            },
                            update: {
                                type: "POST"
                            },
                            create: {
                                type: "POST"
                            },
                            destroy: {
                                type: "POST"
                            }
                        }
                    })
                }
            }), a = g.msie && 8 > g.version ? function(e) {
                return e.offsetTop
            } : function(t) {
                return t.offsetTop - e(t).height()
            }, s = u.extend({
                init: function(e, t) {
                    var n = this;
                    t = t || {}, u.fn.init.call(n, e, t), n.element.addClass("k-filebrowser"), n.element.on(k + x, ".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-delete)", f(n._deleteClick, n)).on(k + x, ".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-addfolder)", f(n._addClick, n)).on("keydown" + x, "li.k-state-selected input", f(n._directoryKeyDown, n)).on("blur" + x, "li.k-state-selected input", f(n._directoryBlur, n)), n._dataSource(), n.refresh(), n.path(n.options.path)
                },
                options: {
                    name: "FileBrowser",
                    messages: {
                        uploadFile: "Upload",
                        orderBy: "Arrange by",
                        orderByName: "Name",
                        orderBySize: "Size",
                        directoryNotFound: "A directory with this name was not found.",
                        emptyFolder: "Empty Folder",
                        deleteFile: 'Are you sure you want to delete "{0}"?',
                        invalidFileType: 'The selected file "{0}" is not valid. Supported file types are {1}.',
                        overwriteFile: 'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',
                        dropFilesHere: "drop file here to upload",
                        search: "Search"
                    },
                    transport: {},
                    path: "/",
                    fileTypes: "*.*"
                },
                events: [y, b, w],
                destroy: function() {
                    var e = this;
                    u.fn.destroy.call(e), e.dataSource.unbind(y, e._errorHandler), e.element.add(e.list).add(e.toolbar).off(x), d.destroy(e.element)
                },
                value: function() {
                    var e, n = this,
                        r = n._selectedItem(),
                        o = n.options.transport.fileUrl;
                    return r && "f" === r.get(A) ? (e = i(n.path(), r.get(T)).replace(_, ""), o && (e = v(o) ? o(e) : d.format(o, encodeURIComponent(e))), e) : t
                },
                _selectedItem: function() {
                    var e = this.listView,
                        n = e.select();
                    return n.length ? this.dataSource.getByUid(n.attr(d.attr("uid"))) : t
                },
                _toolbar: function() {
                    var t = this,
                        n = d.template(I),
                        i = t.options.messages,
                        r = [{
                            text: i.orderByName,
                            value: "name"
                        }, {
                            text: i.orderBySize,
                            value: "size"
                        }];
                    t.toolbar = e(n({
                        messages: i,
                        showUpload: t.options.transport.uploadUrl,
                        showCreate: t.options.transport.create,
                        showDelete: t.options.transport.destroy
                    })).appendTo(t.element).find(".k-upload input").kendoUpload({
                        multiple: !1,
                        localization: {
                            dropFilesHere: i.dropFilesHere
                        },
                        async: {
                            saveUrl: t.options.transport.uploadUrl,
                            autoUpload: !0
                        },
                        upload: f(t._fileUpload, t),
                        error: function(e) {
                            t._error({
                                xhr: e.XMLHttpRequest,
                                status: "error"
                            })
                        }
                    }).end(), t.upload = t.toolbar.find(".k-upload input").data("kendoUpload"), t.arrangeBy = t.toolbar.find(".k-tiles-arrange select").kendoDropDownList({
                        dataSource: r,
                        dataTextField: "text",
                        dataValueField: "value",
                        change: function() {
                            t.orderBy(this.value())
                        }
                    }).data("kendoDropDownList"), t._attachDropzoneEvents()
                },
                _attachDropzoneEvents: function() {
                    var t = this;
                    t.options.transport.uploadUrl && (n(e(document.documentElement), e.proxy(t._dropEnter, t), e.proxy(t._dropLeave, t)), t._scrollHandler = f(t._positionDropzone, t))
                },
                _dropEnter: function() {
                    this._positionDropzone(), e(document).on("scroll" + x, this._scrollHandler)
                },
                _dropLeave: function() {
                    this._removeDropzone(), e(document).off("scroll" + x, this._scrollHandler)
                },
                _positionDropzone: function() {
                    var e = this,
                        t = e.element,
                        n = t.offset();
                    e.toolbar.find(".k-dropzone").addClass("k-filebrowser-dropzone").offset(n).css({
                        width: t[0].clientWidth,
                        height: t[0].clientHeight,
                        lineHeight: t[0].clientHeight + "px"
                    })
                },
                _removeDropzone: function() {
                    this.toolbar.find(".k-dropzone").removeClass("k-filebrowser-dropzone").css({
                        width: "",
                        height: "",
                        lineHeight: "",
                        top: "",
                        left: ""
                    })
                },
                _deleteClick: function() {
                    var e = this,
                        t = e.listView.select(),
                        n = d.format(e.options.messages.deleteFile, t.find("strong").text());
                    t.length && e._showMessage(n, "confirm") && e.listView.remove(t)
                },
                _addClick: function() {
                    this.createDirectory()
                },
                _getFieldName: function(e) {
                    return o(this.dataSource.reader.model.fields, e)
                },
                _fileUpload: function(e) {
                    var t, n = this,
                        i = n.options,
                        r = i.fileTypes,
                        o = RegExp(("(" + r.split(",").join(")|(") + ")").replace(/\*\./g, ".*."), "i"),
                        a = e.files[0].name,
                        s = T,
                        l = D;
                    o.test(a) ? (e.data = {
                        path: n.path()
                    }, t = n._createFile(a), t ? n.upload.one("success", function(e) {
                        t.set(s, e.response[n._getFieldName(s)]), t.set(l, e.response[n._getFieldName(l)]), n._tiles = n.listView.items().filter("[" + d.attr("type") + "=f]")
                    }) : e.preventDefault()) : (e.preventDefault(), n._showMessage(d.format(i.messages.invalidFileType, a, r)))
                },
                _findFile: function(e) {
                    var t, n, i, r = this.dataSource.data(),
                        o = A,
                        a = T;
                    for (e = e.toLowerCase(), t = 0, i = r.length; i > t; t++)
                        if ("f" === r[t].get(o) && r[t].get(a).toLowerCase() === e) {
                            n = r[t];
                            break
                        } return n
                },
                _createFile: function(e) {
                    var t, n, i = this,
                        r = 0,
                        o = {},
                        a = A,
                        s = i.dataSource.view(),
                        l = i._findFile(e);
                    if (l) return i._showMessage(d.format(i.options.messages.overwriteFile, e), "confirm") ? (l._forceReload = !0, l) : null;
                    for (t = 0, n = s.length; n > t; t++)
                        if ("f" === s[t].get(a)) {
                            r = t;
                            break
                        } return o[a] = "f", o[T] = e, o[D] = 0, i.dataSource.insert(++r, o)
                },
                createDirectory: function() {
                    var e, t, n = this,
                        i = 0,
                        r = A,
                        o = T,
                        a = n.dataSource.data(),
                        s = n._nameDirectory(),
                        l = new n.dataSource.reader.model;
                    for (e = 0, t = a.length; t > e; e++) "d" === a[e].get(r) && (i = e);
                    l.set(r, "d"), l.set(o, s), n.listView.one("dataBound", function() {
                        var e = n.listView.items().filter("[" + d.attr("uid") + "=" + l.uid + "]"),
                            t = e.find("input");
                        e.length && this.edit(e), this.element.scrollTop(e.attr("offsetTop") - this.element[0].offsetHeight), setTimeout(function() {
                            t.select()
                        })
                    }).one("save", function(e) {
                        var t = e.model.get(o);
                        t ? e.model.set(o, n._nameExists(t, l.uid) ? n._nameDirectory() : t) : e.model.set(o, s)
                    }), n.dataSource.insert(++i, l)
                },
                _directoryKeyDown: function(e) {
                    13 == e.keyCode && e.currentTarget.blur()
                },
                _directoryBlur: function() {
                    this.listView.save()
                },
                _nameExists: function(e, t) {
                    var n, i, r = this.dataSource.data(),
                        o = A,
                        a = T;
                    for (n = 0, i = r.length; i > n; n++)
                        if ("d" === r[n].get(o) && r[n].get(a).toLowerCase() === e.toLowerCase() && r[n].uid !== t) return !0;
                    return !1
                },
                _nameDirectory: function() {
                    var t, n, i, r = "New folder",
                        o = this.dataSource.data(),
                        a = [],
                        s = A,
                        l = T;
                    for (n = 0, i = o.length; i > n; n++) "d" === o[n].get(s) && o[n].get(l).toLowerCase().indexOf(r.toLowerCase()) > -1 && a.push(o[n].get(l));
                    if (e.inArray(r, a) > -1) {
                        n = 2;
                        do t = r + " (" + n + ")", n++; while (e.inArray(t, a) > -1);
                        r = t
                    }
                    return r
                },
                orderBy: function(e) {
                    this.dataSource.sort([{
                        field: A,
                        dir: "asc"
                    }, {
                        field: e,
                        dir: "asc"
                    }])
                },
                search: function(e) {
                    this.dataSource.filter({
                        field: T,
                        operator: "contains",
                        value: e
                    })
                },
                _content: function() {
                    var t = this;
                    t.list = e('<ul class="k-reset k-floats k-tiles" />').appendTo(t.element).on("dblclick" + x, "li", f(t._dblClick, t)), t.listView = new d.ui.ListView(t.list, {
                        dataSource: t.dataSource,
                        template: t._itemTmpl(),
                        editTemplate: t._editTmpl(),
                        selectable: !0,
                        autoBind: !1,
                        dataBinding: function(e) {
                            t.toolbar.find(".k-delete").parent().addClass("k-state-disabled"), ("remove" === e.action || "sync" === e.action) && e.preventDefault()
                        },
                        dataBound: function() {
                            t.dataSource.view().length ? t._tiles = this.items().filter("[" + d.attr("type") + "=f]") : this.wrapper.append(F({
                                text: t.options.messages.emptyFolder
                            }))
                        },
                        change: f(t._listViewChange, t)
                    })
                },
                _dblClick: function(t) {
                    var n, r = this,
                        o = e(t.currentTarget);
                    o.hasClass("k-edit-item") && r._directoryBlur(), o.filter("[" + d.attr("type") + "=d]").length ? (n = r.dataSource.getByUid(o.attr(d.attr("uid"))), n && (r.path(i(r.path(), n.get(T))), r.breadcrumbs.value(r.path()))) : o.filter("[" + d.attr("type") + "=f]").length && r.trigger(w)
                },
                _listViewChange: function() {
                    var e = this._selectedItem();
                    e && (this.toolbar.find(".k-delete").parent().removeClass("k-state-disabled"), "f" === e.get(A) && this.trigger(b))
                },
                _dataSource: function() {
                    var e, t = this,
                        n = t.options,
                        i = n.transport,
                        r = p({}, E),
                        o = {
                            field: T,
                            dir: "asc"
                        },
                        a = {
                            type: i.type || "filebrowser",
                            sort: [r, o]
                        };
                    h(i) && (i.path = f(t.path, t), a.transport = i), h(n.schema) ? a.schema = n.schema : i.type && h(d.data.schemas[i.type]) && (e = d.data.schemas[i.type]), t.dataSource && t._errorHandler ? t.dataSource.unbind(y, t._errorHandler) : t._errorHandler = f(t._error, t), t.dataSource = d.data.DataSource.create(a).bind(y, t._errorHandler)
                },
                _navigation: function() {
                    var t = this,
                        n = e('<div class="k-floatwrap"><input/><input/></div>').appendTo(this.element);
                    t.breadcrumbs = n.find("input:first").kendoBreadcrumbs({
                        value: t.options.path,
                        change: function() {
                            t.path(this.value())
                        }
                    }).data("kendoBreadcrumbs"), t.searchBox = n.parent().find("input:last").kendoSearchBox({
                        label: t.options.messages.search,
                        change: function() {
                            t.search(this.value())
                        }
                    }).data("kendoSearchBox")
                },
                _error: function(e) {
                    var t, n = this;
                    n.trigger(y, e) || (t = e.xhr.status, "error" == e.status ? "404" == t ? n._showMessage(n.options.messages.directoryNotFound) : "0" != t && n._showMessage("Error! The requested URL returned " + t + " - " + e.xhr.statusText) : "timeout" == t && n._showMessage("Error! Server timeout."))
                },
                _showMessage: function(e, t) {
                    return window[t || "alert"](e)
                },
                refresh: function() {
                    var e = this;
                    e._navigation(), e._toolbar(), e._content()
                },
                _editTmpl: function() {
                    var e = '<li class="k-tile k-state-selected" ' + d.attr("uid") + '="#=uid#" ';
                    return e += d.attr("type") + '="${' + A + '}">', e += "#if(" + A + ' == "d") { #', e += '<div class="k-thumb"><span class="k-icon k-folder"></span></div>', e += "#}else{#", e += '<div class="k-thumb"><span class="k-icon k-loading"></span></div>', e += "#}#", e += "#if(" + A + ' == "d") { #', e += '<input class="k-input" ' + d.attr("bind") + '="value:' + T + '"/>', e += "#}#", e += "</li>", f(d.template(e), {
                        sizeFormatter: r
                    })
                },
                _itemTmpl: function() {
                    var e = '<li class="k-tile" ' + d.attr("uid") + '="#=uid#" ';
                    return e += d.attr("type") + '="${' + A + '}">', e += "#if(" + A + ' == "d") { #', e += '<div class="k-thumb"><span class="k-icon k-folder"></span></div>', e += "#}else{#", e += '<div class="k-thumb"><span class="k-icon k-file"></span></div>', e += "#}#", e += "<strong>${" + T + "}</strong>", e += "#if(" + A + ' == "f") { # <span class="k-filesize">${this.sizeFormatter(' + D + ")}</span> #}#", e += "</li>", f(d.template(e), {
                        sizeFormatter: r
                    })
                },
                path: function(e) {
                    var n = this,
                        i = n._path || "";
                    return e !== t ? (n._path = e.replace(_, "") + "/", n.dataSource.read({
                        path: n._path
                    }), t) : (i && (i = i.replace(_, "")), "/" === i || "" === i ? "" : i + "/")
                }
            }), l = u.extend({
                init: function(e, t) {
                    var n = this;
                    t = t || {}, u.fn.init.call(n, e, t), m && n.element.attr("placeholder", n.options.label), n._wrapper(), n.element.on("keydown" + S, f(n._keydown, n)).on("change" + S, f(n._updateValue, n)), n.wrapper.on(k + S, "a", f(n._click, n)), m || n.element.on("focus" + S, f(n._focus, n)).on("blur" + S, f(n._blur, n))
                },
                options: {
                    name: "SearchBox",
                    label: "Search",
                    value: ""
                },
                events: [b],
                destroy: function() {
                    var e = this;
                    e.wrapper.add(e.element).add(e.label).off(S), u.fn.destroy.call(e)
                },
                _keydown: function(e) {
                    13 === e.keyCode && this._updateValue()
                },
                _click: function(e) {
                    e.preventDefault(), this._updateValue()
                },
                _updateValue: function() {
                    var e = this,
                        t = e.element.val();
                    t !== e.value() && (e.value(t), e.trigger(b))
                },
                _blur: function() {
                    this._updateValue(), this._toggleLabel()
                },
                _toggleLabel: function() {
                    m || this.label.toggle(!this.element.val())
                },
                _focus: function() {
                    this.label.hide()
                },
                _wrapper: function() {
                    var t = this.element,
                        n = t.parents(".k-search-wrap");
                    t[0].style.width = "", t.addClass("k-input"), n.length || (n = t.wrap(e('<div class="k-widget k-search-wrap k-textbox"/>')).parent(), m || e('<label style="display:block">' + this.options.label + "</label>").insertBefore(t), e('<a href="#" class="k-icon k-i-search k-search"/>').appendTo(n)), this.wrapper = n, this.label = n.find(">label")
                },
                value: function(e) {
                    var n = this;
                    return e !== t ? (n.options.value = e, n.element.val(e), n._toggleLabel(), t) : n.options.value
                }
            }), c = u.extend({
                init: function(e, t) {
                    var n = this;
                    t = t || {}, u.fn.init.call(n, e, t), n._wrapper(), n.wrapper.on("focus" + C, "input", f(n._focus, n)).on("blur" + C, "input", f(n._blur, n)).on("keydown" + C, "input", f(n._keydown, n)).on(k + C, "a.k-i-arrow-n:first", f(n._rootClick, n)).on(k + C, "a:not(.k-i-arrow-n)", f(n._click, n)), n.value(n.options.value)
                },
                options: {
                    name: "Breadcrumbs",
                    gap: 50
                },
                events: [b],
                destroy: function() {
                    var e = this;
                    u.fn.destroy.call(e), e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(C)
                },
                _update: function(e) {
                    e = "/" === (e || "").charAt(0) ? e : "/" + (e || ""), e !== this.value() && (this.value(e), this.trigger(b))
                },
                _click: function(t) {
                    t.preventDefault(), this._update(this._path(e(t.target).prevAll("a:not(.k-i-arrow-n)").addBack()))
                },
                _rootClick: function(e) {
                    e.preventDefault(), this._update("")
                },
                _focus: function() {
                    var e = this,
                        t = e.element;
                    e.overlay.hide(), e.element.val(e.value()), setTimeout(function() {
                        t.select()
                    })
                },
                _blur: function() {
                    if (!this.overlay.is(":visible")) {
                        var e = this,
                            t = e.element,
                            n = t.val().replace(/\/{2,}/g, "/");
                        e.overlay.show(), t.val(""), e._update(n)
                    }
                },
                _keydown: function(e) {
                    var t = this;
                    13 === e.keyCode && (t._blur(), setTimeout(function() {
                        t.overlay.find("a:first").focus()
                    }))
                },
                _wrapper: function() {
                    var t, n = this.element,
                        i = n.parents(".k-breadcrumbs");
                    n[0].style.width = "", n.addClass("k-input"), i.length || (i = n.wrap(e('<div class="k-widget k-breadcrumbs k-textbox"/>')).parent()), t = i.find(".k-breadcrumbs-wrap"), t.length || (t = e('<div class="k-breadcrumbs-wrap"/>').appendTo(i)), this.wrapper = i, this.overlay = t
                },
                refresh: function() {
                    var n, i, r, o, a = "",
                        s = this.value();
                    for (s !== t && s.match(/^\//) || (s = "/" + (s || "")), n = s.split("/"),
                             r = 0, o = n.length; o > r; r++) i = n[r], i && (a || (a += '<a href="#" class="k-icon k-i-arrow-n">root</a>'), a += '<a class="k-link" href="#">' + n[r] + "</a>", a += '<span class="k-icon k-i-arrow-e">&gt;</span>');
                    this.overlay.empty().append(e(a)), this._adjustSectionWidth()
                },
                _adjustSectionWidth: function() {
                    var t, n = this,
                        i = n.wrapper,
                        r = i.width() - n.options.gap,
                        o = n.overlay.find("a");
                    o.each(function(n) {
                        t = e(this), t.parent().width() > r && (n == o.length - 1 ? t.width(r) : t.prev().addBack().hide())
                    })
                },
                value: function(e) {
                    return e !== t ? (this._value = e.replace(/\/{2,}/g, "/"), this.refresh(), t) : this._value
                },
                _path: function(t) {
                    return "/" + e.map(t, function(t) {
                        return e(t).text()
                    }).join("/")
                }
            }), d.ui.plugin(s), d.ui.plugin(c), d.ui.plugin(l)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.imagebrowser.min", ["kendo.filebrowser.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, n) {
                return e !== t && e.match(/\/$/) || (e = (e || "") + "/"), e + n
            }

            function i(e) {
                if (!e) return "";
                var t = " bytes";
                return e >= 1073741824 ? (t = " GB", e /= 1073741824) : e >= 1048576 ? (t = " MB", e /= 1048576) : e >= 1024 && (t = " KB", e /= 1024), Math.round(100 * e) / 100 + t
            }
            var r, o, a = window.kendo,
                s = a.ui.FileBrowser,
                l = e.isPlainObject,
                c = e.proxy,
                d = e.extend,
                u = a.support.browser,
                h = a.isFunction,
                f = /(^\/|\/$)/g,
                p = "error",
                m = ".kendoImageBrowser",
                g = "name",
                v = "size",
                _ = "type",
                b = {
                    field: _,
                    dir: "asc"
                },
                w = a.template('<li class="k-tile-empty"><strong>${text}</strong></li>');
            d(!0, a.data, {
                schemas: {
                    imagebrowser: {
                        data: function(e) {
                            return e.items || e || []
                        },
                        model: {
                            id: "name",
                            fields: {
                                name: "name",
                                size: "size",
                                type: "type"
                            }
                        }
                    }
                }
            }), d(!0, a.data, {
                transports: {
                    imagebrowser: a.data.RemoteTransport.extend({
                        init: function(t) {
                            a.data.RemoteTransport.fn.init.call(this, e.extend(!0, {}, this.options, t))
                        },
                        _call: function(t, n) {
                            n.data = e.extend({}, n.data, {
                                path: this.options.path()
                            }), h(this.options[t]) ? this.options[t].call(this, n) : a.data.RemoteTransport.fn[t].call(this, n)
                        },
                        read: function(e) {
                            this._call("read", e)
                        },
                        create: function(e) {
                            this._call("create", e)
                        },
                        destroy: function(e) {
                            this._call("destroy", e)
                        },
                        update: function() {},
                        options: {
                            read: {
                                type: "POST"
                            },
                            update: {
                                type: "POST"
                            },
                            create: {
                                type: "POST"
                            },
                            destroy: {
                                type: "POST"
                            }
                        }
                    })
                }
            }), r = u.msie && 8 > u.version ? function(e) {
                return e.offsetTop
            } : function(t) {
                return t.offsetTop - e(t).height()
            }, o = s.extend({
                init: function(e, t) {
                    var n = this;
                    t = t || {}, s.fn.init.call(n, e, t), n.element.addClass("k-imagebrowser")
                },
                options: {
                    name: "ImageBrowser",
                    fileTypes: "*.png,*.gif,*.jpg,*.jpeg"
                },
                value: function() {
                    var e, i = this,
                        r = i._selectedItem(),
                        o = i.options.transport.imageUrl;
                    return r && "f" === r.get(_) ? (e = n(i.path(), r.get(g)).replace(f, ""), o && (e = h(o) ? o(e) : a.format(o, encodeURIComponent(e))), e) : t
                },
                _fileUpload: function(e) {
                    var t, n = this,
                        i = n.options,
                        r = i.fileTypes,
                        o = RegExp(("(" + r.split(",").join(")|(") + ")").replace(/\*\./g, ".*."), "i"),
                        s = e.files[0].name,
                        l = g,
                        c = v;
                    o.test(s) ? (e.data = {
                        path: n.path()
                    }, t = n._createFile(s), t ? (t._uploading = !0, n.upload.one("success", function(e) {
                        delete t._uploading, t.set(l, e.response[n._getFieldName(l)]), t.set(c, e.response[n._getFieldName(c)]), n._tiles = n.listView.items().filter("[" + a.attr("type") + "=f]"), n._scroll()
                    })) : e.preventDefault()) : (e.preventDefault(), n._showMessage(a.format(i.messages.invalidFileType, s, r)))
                },
                _content: function() {
                    var t = this;
                    t.list = e('<ul class="k-reset k-floats k-tiles" />').appendTo(t.element).on("scroll" + m, c(t._scroll, t)).on("dblclick" + m, "li", c(t._dblClick, t)), t.listView = new a.ui.ListView(t.list, {
                        dataSource: t.dataSource,
                        template: t._itemTmpl(),
                        editTemplate: t._editTmpl(),
                        selectable: !0,
                        autoBind: !1,
                        dataBinding: function(e) {
                            t.toolbar.find(".k-delete").parent().addClass("k-state-disabled"), ("remove" === e.action || "sync" === e.action) && e.preventDefault()
                        },
                        dataBound: function() {
                            t.dataSource.view().length ? (t._tiles = this.items().filter("[" + a.attr("type") + "=f]"), t._scroll()) : this.wrapper.append(w({
                                text: t.options.messages.emptyFolder
                            }))
                        },
                        change: c(t._listViewChange, t)
                    })
                },
                _dataSource: function() {
                    var e, t = this,
                        n = t.options,
                        i = n.transport,
                        r = d({}, b),
                        o = {
                            field: g,
                            dir: "asc"
                        },
                        s = {
                            type: i.type || "imagebrowser",
                            sort: [r, o]
                        };
                    l(i) && (i.path = c(t.path, t), s.transport = i), l(n.schema) ? s.schema = n.schema : i.type && l(a.data.schemas[i.type]) && (e = a.data.schemas[i.type]), t.dataSource && t._errorHandler ? t.dataSource.unbind(p, t._errorHandler) : t._errorHandler = c(t._error, t), t.dataSource = a.data.DataSource.create(s).bind(p, t._errorHandler)
                },
                _loadImage: function(t) {
                    var n = this,
                        i = e(t),
                        r = n.dataSource.getByUid(i.attr(a.attr("uid"))),
                        o = r.get(g),
                        s = n.options.transport.thumbnailUrl,
                        l = e("<img />", {
                            alt: o
                        }),
                        c = "?";
                    r._uploading || (l.hide().on("load" + m, function() {
                        e(this).prev().remove().end().addClass("k-image").fadeIn()
                    }), i.find(".k-loading").after(l), h(s) ? s = s(n.path(), encodeURIComponent(o)) : (s.indexOf("?") >= 0 && (c = "&"), s = s + c + "path=" + encodeURIComponent(n.path() + o), r._forceReload && (s += "&_=" + (new Date).getTime(), delete r._forceReload)), l.attr("src", s), t.loaded = !0)
                },
                _scroll: function() {
                    var e = this;
                    e.options.transport && e.options.transport.thumbnailUrl && (clearTimeout(e._timeout), e._timeout = setTimeout(function() {
                        var n = e.list.outerHeight(),
                            i = e.list.scrollTop(),
                            o = i + n;
                        e._tiles.each(function() {
                            var n = r(this),
                                a = n + this.offsetHeight;
                            return (n >= i && o > n || a >= i && o > a) && e._loadImage(this), n > o ? !1 : t
                        }), e._tiles = e._tiles.filter(function() {
                            return !this.loaded
                        })
                    }, 250))
                },
                _itemTmpl: function() {
                    var e = this,
                        t = '<li class="k-tile" ' + a.attr("uid") + '="#=uid#" ';
                    return t += a.attr("type") + '="${' + _ + '}">', t += "#if(" + _ + ' == "d") { #', t += '<div class="k-thumb"><span class="k-icon k-folder"></span></div>', t += "#}else{#", t += e.options.transport && e.options.transport.thumbnailUrl ? '<div class="k-thumb"><span class="k-icon k-loading"></span></div>' : '<div class="k-thumb"><span class="k-icon k-file"></span></div>', t += "#}#", t += "<strong>${" + g + "}</strong>", t += "#if(" + _ + ' == "f") { # <span class="k-filesize">${this.sizeFormatter(' + v + ")}</span> #}#", t += "</li>", c(a.template(t), {
                        sizeFormatter: i
                    })
                }
            }), a.ui.plugin(o)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("util/undoredostack.min", ["kendo.core.min"], e)
    }(function() {
        ! function(e) {
            var t = e.Observable.extend({
                init: function(t) {
                    e.Observable.fn.init.call(this, t), this.clear()
                },
                events: ["undo", "redo"],
                push: function(e) {
                    this.stack = this.stack.slice(0, this.currentCommandIndex + 1), this.currentCommandIndex = this.stack.push(e) - 1
                },
                undo: function() {
                    if (this.canUndo()) {
                        var e = this.stack[this.currentCommandIndex--];
                        e.undo(), this.trigger("undo", {
                            command: e
                        })
                    }
                },
                redo: function() {
                    if (this.canRedo()) {
                        var e = this.stack[++this.currentCommandIndex];
                        e.redo(), this.trigger("redo", {
                            command: e
                        })
                    }
                },
                clear: function() {
                    this.stack = [], this.currentCommandIndex = -1
                },
                canUndo: function() {
                    return this.currentCommandIndex >= 0
                },
                canRedo: function() {
                    return this.currentCommandIndex != this.stack.length - 1
                }
            });
            e.deepExtend(e, {
                util: {
                    UndoRedoStack: t
                }
            })
        }(kendo)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/main.min", ["util/undoredostack.min", "kendo.combobox.min", "kendo.dropdownlist.min", "kendo.window.min", "kendo.colorpicker.min"], e)
    }(function() {
        ! function(e, t) {
            var n, i, r, o, a = window.kendo,
                s = a.Class,
                l = a.ui.Widget,
                c = a.support.mobileOS,
                d = a.support.browser,
                u = e.extend,
                h = e.proxy,
                f = a.deepExtend,
                p = a.keys,
                m = s.extend({
                    init: function(e) {
                        this.options = e
                    },
                    getHtml: function() {
                        var e = this.options;
                        return a.template(e.template, {
                            useWithBlock: !1
                        })(e)
                    }
                }),
                g = {
                    editorWrapperTemplate: '<table cellspacing="4" cellpadding="0" class="k-widget k-editor k-header" role="presentation"><tbody><tr role="presentation"><td class="k-editor-toolbar-wrap" role="presentation"><ul class="k-editor-toolbar" role="toolbar" /></td></tr><tr><td class="k-editable-area" /></tr></tbody></table>',
                    buttonTemplate: '<a href="" role="button" class="k-tool"#= data.popup ? " data-popup" : "" # unselectable="on" title="#= data.title #"><span unselectable="on" class="k-tool-icon #= data.cssClass #"></span><span class="k-tool-text">#= data.title #</span></a>',
                    colorPickerTemplate: '<div class="k-colorpicker #= data.cssClass #" />',
                    comboBoxTemplate: '<select title="#= data.title #" class="#= data.cssClass #" />',
                    dropDownListTemplate: '<span class="k-editor-dropdown"><select title="#= data.title #" class="#= data.cssClass #" /></span>',
                    separatorTemplate: '<span class="k-separator" />',
                    overflowAnchorTemplate: '<a href="" role="button" class="k-tool k-overflow-anchor" data-popup unselectable="on"><span unselectable="on" class="k-icon k-i-more"></span></a>',
                    formatByName: function(t, n) {
                        for (var i = 0; n.length > i; i++)
                            if (e.inArray(t, n[i].tags) >= 0) return n[i]
                    },
                    registerTool: function(e, t) {
                        var n = t.options;
                        n && n.template && (n.template.options.cssClass = "k-" + e), t.name || (t.options.name = e, t.name = e.toLowerCase()), w.defaultTools[e] = t
                    },
                    registerFormat: function(e, t) {
                        w.fn.options.formats[e] = t
                    }
                },
                v = {
                    bold: "Bold",
                    italic: "Italic",
                    underline: "Underline",
                    strikethrough: "Strikethrough",
                    superscript: "Superscript",
                    subscript: "Subscript",
                    justifyCenter: "Center text",
                    justifyLeft: "Align text left",
                    justifyRight: "Align text right",
                    justifyFull: "Justify",
                    insertUnorderedList: "Insert unordered list",
                    insertOrderedList: "Insert ordered list",
                    indent: "Indent",
                    outdent: "Outdent",
                    createLink: "Insert hyperlink",
                    unlink: "Remove hyperlink",
                    insertImage: "Insert image",
                    insertFile: "Insert file",
                    insertHtml: "Insert HTML",
                    viewHtml: "View HTML",
                    fontName: "Select font family",
                    fontNameInherit: "(inherited font)",
                    fontSize: "Select font size",
                    fontSizeInherit: "(inherited size)",
                    formatBlock: "Format",
                    formatting: "Format",
                    foreColor: "Color",
                    backColor: "Background color",
                    style: "Styles",
                    emptyFolder: "Empty Folder",
                    editAreaTitle: "Editable area. Press F10 for toolbar.",
                    uploadFile: "Upload",
                    orderBy: "Arrange by:",
                    orderBySize: "Size",
                    orderByName: "Name",
                    invalidFileType: 'The selected file "{0}" is not valid. Supported file types are {1}.',
                    deleteFile: 'Are you sure you want to delete "{0}"?',
                    overwriteFile: 'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',
                    directoryNotFound: "A directory with this name was not found.",
                    imageWebAddress: "Web address",
                    imageAltText: "Alternate text",
                    imageWidth: "Width (px)",
                    imageHeight: "Height (px)",
                    fileWebAddress: "Web address",
                    fileTitle: "Title",
                    linkWebAddress: "Web address",
                    linkText: "Text",
                    linkToolTip: "ToolTip",
                    linkOpenInNewWindow: "Open link in new window",
                    dialogUpdate: "Update",
                    dialogInsert: "Insert",
                    dialogCancel: "Cancel",
                    createTable: "Create table",
                    createTableHint: "Create a {0} x {1} table",
                    addColumnLeft: "Add column on the left",
                    addColumnRight: "Add column on the right",
                    addRowAbove: "Add row above",
                    addRowBelow: "Add row below",
                    deleteRow: "Delete row",
                    deleteColumn: "Delete column"
                },
                _ = !c || c.ios && c.flatVersion >= 500 || !c.ios && t !== document.documentElement.contentEditable,
                b = {
                    basic: ["bold", "italic", "underline"],
                    alignment: ["justifyLeft", "justifyCenter", "justifyRight"],
                    lists: ["insertUnorderedList", "insertOrderedList"],
                    indenting: ["indent", "outdent"],
                    links: ["createLink", "unlink"],
                    tables: ["createTable", "addColumnLeft", "addColumnRight", "addRowAbove", "addRowBelow", "deleteRow", "deleteColumn"]
                },
                w = l.extend({
                    init: function(n, i) {
                        var r, o, s, c, d, p = this,
                            m = a.ui.editor,
                            g = m.Dom;
                        _ && (l.fn.init.call(p, n, i), p.options = f({}, p.options, i), p.options.tools = p.options.tools.slice(), n = p.element, d = n[0], c = g.name(d), this._registerHandler(n.closest("form"), "submit", h(p.update, p, t)), s = u({}, p.options), s.editor = p, "textarea" == c ? (p._wrapTextarea(), o = p.wrapper.find(".k-editor-toolbar"), d.id && o.attr("aria-controls", d.id)) : (p.element.attr("contenteditable", !0).addClass("k-widget k-editor k-editor-inline"), s.popup = !0, o = e('<ul class="k-editor-toolbar" role="toolbar" />').insertBefore(n)), p.toolbar = new m.Toolbar(o[0], s), p.toolbar.bindTo(p), "textarea" == c && setTimeout(function() {
                            var e = p.wrapper[0].style.height,
                                t = parseInt(e, 10),
                                n = p.wrapper.height();
                            e.indexOf("px") > 0 && !isNaN(t) && n > t && p.wrapper.height(t - (n - t))
                        }), p._resizable(), p._initializeContentElement(p), p.keyboard = new m.Keyboard([new m.BackspaceHandler(p), new m.TypingHandler(p), new m.SystemHandler(p)]), p.clipboard = new m.Clipboard(this), p.undoRedoStack = new a.util.UndoRedoStack, i && i.value ? r = i.value : p.textarea ? (r = d.value, p.options.encoded && e.trim(d.defaultValue).length && (r = d.defaultValue), r = r.replace(/[\r\n\v\f\t ]+/gi, " ")) : r = d.innerHTML, p.value(r || a.ui.editor.emptyElementContent), this._registerHandler(document, {
                            mousedown: function() {
                                p._endTyping()
                            },
                            mouseup: function() {
                                p._mouseup()
                            }
                        }), p.toolbar.resize(), a.notify(p))
                    },
                    setOptions: function(e) {
                        var t = this;
                        l.fn.setOptions.call(t, e), e.tools && t.toolbar.bindTo(t)
                    },
                    _endTyping: function() {
                        var e = this.keyboard;
                        try {
                            e.isTypingInProgress() && (e.endTyping(!0), this.saveSelection())
                        } catch (t) {}
                    },
                    _selectionChange: function() {
                        d.msie || a.ui.editor.Dom.ensureTrailingBreaks(this.body), this._selectionStarted = !1, this.saveSelection(), this.trigger("select", {})
                    },
                    _resizable: function() {
                        var n = this.options.resizable,
                            i = e.isPlainObject(n) ? n.content === t || n.content === !0 : n;
                        i && this.textarea && (e("<div class='k-resize-handle'><span class='k-icon k-resize-se' /></div>").insertAfter(this.textarea), this.wrapper.kendoResizable(u({}, this.options.resizable, {
                            start: function(t) {
                                var n = this.editor = e(t.currentTarget).closest(".k-editor");
                                this.initialSize = n.height(), n.find("td:last").append("<div class='k-overlay' />")
                            },
                            resize: function(e) {
                                var t = e.y.initialDelta,
                                    n = this.initialSize + t,
                                    i = this.options.min || 0,
                                    r = this.options.max || 1 / 0;
                                n = Math.min(r, Math.max(i, n)), this.editor.height(n)
                            },
                            resizeend: function() {
                                this.editor.find(".k-overlay").remove(), this.editor = null
                            }
                        })))
                    },
                    _wrapTextarea: function() {
                        var t = this,
                            n = t.element,
                            i = n[0].style.width,
                            r = n[0].style.height,
                            o = g.editorWrapperTemplate,
                            a = e(o).insertBefore(n).width(i).height(r),
                            s = a.find(".k-editable-area");
                        n.attr("autocomplete", "off").appendTo(s).addClass("k-content k-raw-content").css("display", "none"), t.textarea = n, t.wrapper = a
                    },
                    _createContentElement: function(t) {
                        var n, i, r, o = this,
                            s = o.textarea,
                            l = o.options.domain,
                            c = l || document.domain,
                            d = "",
                            u = 'javascript:""';
                        return (l || c != location.hostname) && (d = '<script>document.domain="' + c + '"</script>', u = "javascript:document.write('" + d + "')"), s.hide(), n = e("<iframe />", {
                            title: o.options.messages.editAreaTitle,
                            frameBorder: "0"
                        })[0], e(n).css("display", "").addClass("k-content").attr("tabindex", s[0].tabIndex).insertBefore(s), n.src = u, i = n.contentWindow || n, r = i.document || n.contentDocument, e(n).one("load", function() {
                            o.toolbar.decorateFrom(r.body)
                        }), r.open(), r.write("<!DOCTYPE html><html><head><meta charset='utf-8' /><style>html,body{padding:0;margin:0;height:100%;min-height:100%;}body{font-size:12px;font-family:Verdana,Geneva,sans-serif;margin-top:-1px;padding:1px .2em 0;word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space;" + (a.support.isRtl(s) ? "direction:rtl;" : "") + "}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em}h3{font-size:1.16em}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.7em}p{margin:0 0 1em;}.k-marker{display:none;}.k-paste-container,.Apple-style-span{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}ul,ol{padding-left:2.5em}span{-ms-high-contrast-adjust:none;}a{color:#00a}code{font-size:1.23em}telerik\\3Ascript{display: none;}.k-table{table-layout:fixed;width:100%;border-spacing:0;margin: 0 0 1em;}.k-table td{min-width:1px;padding:.2em .3em;}.k-table,.k-table td{outline:0;border: 1px dotted #ccc;}.k-table p{margin:0;padding:0;}k\\:script{display:none;}</style>" + d + "<script>(function(d,c){d[c]('header'),d[c]('article'),d[c]('nav'),d[c]('section'),d[c]('footer');})(document, 'createElement');</script>" + e.map(t, function(e) {
                            return "<link rel='stylesheet' href='" + e + "'>"
                        }).join("") + "</head><body autocorrect='off' contenteditable='true'></body></html>"), r.close(), i
                    },
                    _blur: function() {
                        var e = this.textarea,
                            t = e ? e.val() : this._oldValue,
                            n = this.options.encoded ? this.encodedValue() : this.value();
                        this.update(), e && e.trigger("blur"), n != t && this.trigger("change")
                    },
                    _spellCorrect: function(e) {
                        var n, i = !1;
                        this._registerHandler(e.body, {
                            contextmenu: function() {
                                e.one("select", function() {
                                    n = null
                                }), e._spellCorrectTimeout = setTimeout(function() {
                                    n = new a.ui.editor.RestorePoint(e.getRange()), i = !1
                                }, 10)
                            },
                            input: function() {
                                return n ? a.support.browser.mozilla && !i ? (i = !0, t) : (a.ui.editor._finishUpdate(e, n), t) : t
                            }
                        })
                    },
                    _registerHandler: function(t, n, i) {
                        var r, o = ".kendoEditor";
                        if (t = e(t), this._handlers || (this._handlers = []), t.length)
                            if (e.isPlainObject(n))
                                for (r in n) n.hasOwnProperty(r) && this._registerHandler(t, r, n[r]);
                            else n = n.split(" ").join(o + " ") + o, this._handlers.push({
                                element: t,
                                type: n,
                                handler: i
                            }), t.on(n, i)
                    },
                    _deregisterHandlers: function() {
                        var e, t, n = this._handlers;
                        for (e = 0; n.length > e; e++) t = n[e], t.element.off(t.type, t.handler);
                        this._handlers = []
                    },
                    _initializeContentElement: function() {
                        var n, i, r = this;
                        r.textarea ? (r.window = r._createContentElement(r.options.stylesheets), n = r.document = r.window.contentDocument || r.window.document, r.body = n.body, i = r.window, this._registerHandler(n, "mouseup", h(this._mouseup, this))) : (r.window = window, n = r.document = document, r.body = r.element[0], i = r.body, r.toolbar.decorateFrom(r.body)), this._registerHandler(i, "blur", h(this._blur, this));
                        try {
                            n.execCommand("enableInlineTableEditing", null, !1)
                        } catch (o) {}
                        a.support.touch && this._registerHandler(n, {
                            selectionchange: h(this._selectionChange, this),
                            keydown: function() {
                                a._activeElement() != n.body && r.window.focus()
                            }
                        }), this._spellCorrect(r), this._registerHandler(r.body, {
                            dragstart: function(e) {
                                e.preventDefault()
                            },
                            keydown: function(e) {
                                var n, i, o, a, s, l;
                                return e.keyCode !== p.BACKSPACE && e.keyCode !== p.DELETE || "true" === r.body.getAttribute("contenteditable") ? e.keyCode === p.F10 ? (setTimeout(h(r.toolbar.focus, r.toolbar), 100), e.preventDefault(), t) : ((e.keyCode == p.LEFT || e.keyCode == p.RIGHT) && (n = r.getRange(), i = e.keyCode == p.LEFT, o = n[i ? "startContainer" : "endContainer"], a = n[i ? "startOffset" : "endOffset"], s = i ? -1 : 1, i && (a -= 1), a + s > 0 && 3 == o.nodeType && "\ufeff" == o.nodeValue[a] && (n.setStart(o, a + s), n.collapse(!0), r.selectRange(n))), (l = r.keyboard.toolFromShortcut(r.toolbar.tools, e)) ? (e.preventDefault(), /^(undo|redo)$/.test(l) || r.keyboard.endTyping(!0), r.trigger("keydown", e), r.exec(l), !1) : (r.keyboard.clearTimeout(), r.keyboard.keydown(e), t)) : !1
                            },
                            keyup: function(t) {
                                var n = [8, 9, 33, 34, 35, 36, 37, 38, 39, 40, 40, 45, 46];
                                (e.inArray(t.keyCode, n) > -1 || 65 == t.keyCode && t.ctrlKey && !t.altKey && !t.shiftKey) && r._selectionChange(), r.keyboard.keyup(t)
                            },
                            mousedown: function(t) {
                                if (r._selectionStarted = !0, !d.gecko) {
                                    var n = e(t.target);
                                    (2 == t.which || 1 == t.which && t.ctrlKey) && n.is("a[href]") && window.open(n.attr("href"), "_new")
                                }
                            },
                            click: function(e) {
                                var t, n = a.ui.editor.Dom;
                                "img" === n.name(e.target) && (t = r.createRange(), t.selectNode(e.target), r.selectRange(t))
                            },
                            "cut copy paste": function(e) {
                                r.clipboard["on" + e.type](e)
                            },
                            focusin: function() {
                                r.body.hasAttribute("contenteditable") && (e(this).addClass("k-state-active"), r.toolbar.show())
                            },
                            focusout: function() {
                                setTimeout(function() {
                                    var t = a._activeElement(),
                                        n = r.body,
                                        i = r.toolbar;
                                    t == n || e.contains(n, t) || e(t).is(".k-editortoolbar-dragHandle") || i.focused() || (e(n).removeClass("k-state-active"), i.hide())
                                }, 10)
                            }
                        })
                    },
                    _mouseup: function() {
                        var e = this;
                        e._selectionStarted && setTimeout(function() {
                            e._selectionChange()
                        }, 1)
                    },
                    refresh: function() {
                        var e = this;
                        e.textarea && (e.textarea.val(e.value()), e.wrapper.find("iframe").remove(), e._initializeContentElement(e), e.value(e.textarea.val()))
                    },
                    events: ["select", "change", "execute", "error", "paste", "keydown", "keyup"],
                    options: {
                        name: "Editor",
                        messages: v,
                        formats: {},
                        encoded: !0,
                        domain: null,
                        resizable: !1,
                        serialization: {
                            entities: !0,
                            semantic: !0,
                            scripts: !1
                        },
                        stylesheets: [],
                        dialogOptions: {
                            modal: !0,
                            resizable: !1,
                            draggable: !0,
                            animation: !1
                        },
                        imageBrowser: null,
                        fileBrowser: null,
                        fontName: [{
                            text: "Arial",
                            value: "Arial,Helvetica,sans-serif"
                        }, {
                            text: "Courier New",
                            value: "'Courier New',Courier,monospace"
                        }, {
                            text: "Georgia",
                            value: "Georgia,serif"
                        }, {
                            text: "Impact",
                            value: "Impact,Charcoal,sans-serif"
                        }, {
                            text: "Lucida Console",
                            value: "'Lucida Console',Monaco,monospace"
                        }, {
                            text: "Tahoma",
                            value: "Tahoma,Geneva,sans-serif"
                        }, {
                            text: "Times New Roman",
                            value: "'Times New Roman',Times,serif"
                        }, {
                            text: "Trebuchet MS",
                            value: "'Trebuchet MS',Helvetica,sans-serif"
                        }, {
                            text: "Verdana",
                            value: "Verdana,Geneva,sans-serif"
                        }],
                        fontSize: [{
                            text: "1 (8pt)",
                            value: "xx-small"
                        }, {
                            text: "2 (10pt)",
                            value: "x-small"
                        }, {
                            text: "3 (12pt)",
                            value: "small"
                        }, {
                            text: "4 (14pt)",
                            value: "medium"
                        }, {
                            text: "5 (18pt)",
                            value: "large"
                        }, {
                            text: "6 (24pt)",
                            value: "x-large"
                        }, {
                            text: "7 (36pt)",
                            value: "xx-large"
                        }],
                        formatBlock: [{
                            text: "Paragraph",
                            value: "p"
                        }, {
                            text: "Quotation",
                            value: "blockquote"
                        }, {
                            text: "Heading 1",
                            value: "h1"
                        }, {
                            text: "Heading 2",
                            value: "h2"
                        }, {
                            text: "Heading 3",
                            value: "h3"
                        }, {
                            text: "Heading 4",
                            value: "h4"
                        }, {
                            text: "Heading 5",
                            value: "h5"
                        }, {
                            text: "Heading 6",
                            value: "h6"
                        }],
                        tools: [].concat.call(["formatting"], b.basic, b.alignment, b.lists, b.indenting, b.links, ["insertImage"], b.tables)
                    },
                    destroy: function() {
                        l.fn.destroy.call(this), this._deregisterHandlers(), clearTimeout(this._spellCorrectTimeout), this._focusOutside(), this.toolbar.destroy(), a.destroy(this.wrapper)
                    },
                    _focusOutside: function() {
                        if (a.support.browser.msie && this.textarea) {
                            var t = e("<input style='position:fixed;left:1px;top:1px;width:1px;height:1px;font-size:0;border:0;opacity:0' />").appendTo(document.body).focus();
                            t.blur().remove()
                        }
                    },
                    state: function(e) {
                        var t, n, i = w.defaultTools[e],
                            r = i && (i.options.finder || i.finder),
                            o = a.ui.editor.RangeUtils;
                        return r ? (t = this.getRange(), n = o.textNodes(t), !n.length && t.collapsed && (n = [t.startContainer]), r.getFormat ? r.getFormat(n) : r.isFormatted(n)) : !1
                    },
                    value: function(e) {
                        var n = this.body,
                            i = a.ui.editor,
                            r = i.Serializer.domToXhtml(n, this.options.serialization);
                        return e === t ? r : (e != r && (i.Serializer.htmlToDom(e, n), d.msie || a.ui.editor.Dom.ensureTrailingBreaks(this.body), this.selectionRestorePoint = null, this.update(), this.toolbar.refreshTools()), t)
                    },
                    saveSelection: function(t) {
                        t = t || this.getRange();
                        var n = t.commonAncestorContainer,
                            i = this.body;
                        (n == i || e.contains(i, n)) && (this.selectionRestorePoint = new a.ui.editor.RestorePoint(t))
                    },
                    _focusBody: function() {
                        var e, t = this.body,
                            n = this.wrapper && this.wrapper.find("iframe")[0],
                            i = this.document.documentElement,
                            r = a._activeElement();
                        r != t && r != n && (e = i.scrollTop, t.focus(), i.scrollTop = e)
                    },
                    restoreSelection: function() {
                        this._focusBody(), this.selectionRestorePoint && this.selectRange(this.selectionRestorePoint.toRange())
                    },
                    focus: function() {
                        this.restoreSelection()
                    },
                    update: function(e) {
                        e = e || this.options.encoded ? this.encodedValue() : this.value(), this.textarea ? this.textarea.val(e) : this._oldValue = e
                    },
                    encodedValue: function() {
                        return a.ui.editor.Dom.encode(this.value())
                    },
                    createRange: function(e) {
                        return a.ui.editor.RangeUtils.createRange(e || this.document)
                    },
                    getSelection: function() {
                        return a.ui.editor.SelectionUtils.selectionFromDocument(this.document)
                    },
                    selectRange: function(e) {
                        this._focusBody();
                        var t = this.getSelection();
                        t.removeAllRanges(), t.addRange(e), this.saveSelection(e)
                    },
                    getRange: function() {
                        var e = this.getSelection(),
                            t = e && e.rangeCount > 0 ? e.getRangeAt(0) : this.createRange(),
                            n = this.document;
                        return t.startContainer != n || t.endContainer != n || t.startOffset || t.endOffset || (t.setStart(this.body, 0), t.collapse(!0)), t
                    },
                    selectedHtml: function() {
                        return a.ui.editor.Serializer.domToXhtml(this.getRange().cloneContents())
                    },
                    paste: function(t, n) {
                        this.focus();
                        var i = new a.ui.editor.InsertHtmlCommand(e.extend({
                            range: this.getRange(),
                            html: t
                        }, n));
                        i.editor = this, i.exec()
                    },
                    exec: function(e, n) {
                        var i, r, o, a, s = this,
                            l = null;
                        if (!e) throw Error("kendoEditor.exec(): `name` parameter cannot be empty");
                        if ("true" !== s.body.getAttribute("contenteditable") && "print" !== e) return !1;
                        if (e = e.toLowerCase(), s.keyboard.isTypingInProgress() || s.restoreSelection(), r = s.toolbar.toolById(e), !r)
                            for (a in w.defaultTools)
                                if (a.toLowerCase() == e) {
                                    r = w.defaultTools[a];
                                    break
                                } if (r) {
                            if (i = s.getRange(), r.command && (l = r.command(u({
                                range: i
                            }, n))), o = s.trigger("execute", {
                                name: e,
                                command: l
                            })) return;
                            if (/^(undo|redo)$/i.test(e)) s.undoRedoStack[e]();
                            else if (l && (l.managesUndoRedo || s.undoRedoStack.push(l), l.editor = s, l.exec(), l.async)) return l.change = h(s._selectionChange, s), t;
                            s._selectionChange()
                        }
                    }
                });
            w.defaultTools = {
                undo: {
                    options: {
                        key: "Z",
                        ctrl: !0
                    }
                },
                redo: {
                    options: {
                        key: "Y",
                        ctrl: !0
                    }
                }
            }, a.ui.plugin(w), n = s.extend({
                init: function(e) {
                    this.options = e
                },
                initialize: function(e, t) {
                    e.attr({
                        unselectable: "on",
                        title: t.title
                    }), e.children(".k-tool-text").html(t.title)
                },
                command: function(e) {
                    return new this.options.command(e)
                },
                update: e.noop
            }), n.exec = function(e, t, n) {
                e.exec(t, {
                    value: n
                })
            }, i = n.extend({
                init: function(e) {
                    n.fn.init.call(this, e)
                },
                command: function(e) {
                    var t = this;
                    return new a.ui.editor.FormatCommand(u(e, {
                        formatter: t.options.formatter
                    }))
                },
                update: function(e, t) {
                    var n = this.options.finder.isFormatted(t);
                    e.toggleClass("k-state-selected", n), e.attr("aria-pressed", n)
                }
            }), g.registerTool("separator", new n({
                template: new m({
                    template: g.separatorTemplate
                })
            })), r = d.msie && 9 > d.version ? "\ufeff" : "", o = '<br class="k-br" />', d.msie && (10 > d.version ? o = "\ufeff" : 11 > d.version && (o = " ")), u(a.ui, {
                editor: {
                    ToolTemplate: m,
                    EditorUtils: g,
                    Tool: n,
                    FormatTool: i,
                    _bomFill: r,
                    emptyElementContent: o
                }
            }), a.PDFMixin && (a.PDFMixin.extend(w.prototype), w.prototype._drawPDF = function() {
                return a.drawing.drawDOM(this.body, this.options.pdf)
            }, w.prototype.saveAsPDF = function() {
                var t, n, i = new e.Deferred,
                    r = i.promise(),
                    o = {
                        promise: r
                    };
                if (!this.trigger("pdfExport", o)) return t = this.options.pdf, n = t.paperSize, this._drawPDF(i).then(function(e) {
                    return t.paperSize = "auto", a.drawing.exportPDF(e, t)
                }).done(function(e) {
                    a.saveAs({
                        dataURI: e,
                        fileName: t.fileName,
                        proxyURL: t.proxyURL,
                        forceProxy: t.forceProxy
                    }), t.paperSize = n, i.resolve()
                }).fail(function(e) {
                    i.reject(e)
                }), r
            })
        }(window.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/dom.min", ["editor/main.min"], e)
    }(function() {
        ! function(e) {
            function t(e) {
                var t, n, i = {};
                for (t = 0, n = e.length; n > t; t++) i[e[t]] = !0;
                return i
            }
            var n, i, r, o, a, s, l, c, d, u, h, f = window.kendo,
                p = e.map,
                m = e.extend,
                g = f.support.browser,
                v = "style",
                _ = "float",
                b = "cssFloat",
                w = "styleFloat",
                y = "class",
                k = "k-marker",
                x = t("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed".split(",")),
                C = "div,p,h1,h2,h3,h4,h5,h6,address,applet,blockquote,button,center,dd,dir,dl,dt,fieldset,form,frameset,hr,iframe,isindex,map,menu,noframes,noscript,object,pre,script,table,tbody,td,tfoot,th,thead,tr,header,article,nav,footer,section,aside,main,figure,figcaption".split(","),
                S = C.concat(["ul", "ol", "li"]),
                T = t(S),
                D = "span,em,a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,strike,strong,sub,sup,textarea,tt,u,var,data,time,mark,ruby".split(","),
                A = t(D),
                E = t("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected".split(",")),
                F = function(e) {
                    1 == e.nodeType && e.normalize()
                };
            g.msie && g.version >= 8 && (F = function(e) {
                if (1 == e.nodeType && e.firstChild)
                    for (var t = e.firstChild, n = t;;) {
                        if (n = n.nextSibling, !n) break;
                        3 == n.nodeType && 3 == t.nodeType && (n.nodeValue = t.nodeValue + n.nodeValue, h.remove(t)), t = n
                    }
            }), n = /^\s+$/, i = /^[\n\r\t]+$/, r = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i, o = /\ufeff/g, a = /^(\s+|\ufeff)$/, l = "color,padding-left,padding-right,padding-top,padding-bottom,background-color,background-attachment,background-image,background-position,background-repeat,border-top-style,border-top-width,border-top-color,border-bottom-style,border-bottom-width,border-bottom-color,border-left-style,border-left-width,border-left-color,border-right-style,border-right-width,border-right-color,font-family,font-size,font-style,font-variant,font-weight,line-height".split(","), c = /[<>\&]/g, d = /[\u00A0-\u2666<>\&]/g, u = {
                34: "quot",
                38: "amp",
                39: "apos",
                60: "lt",
                62: "gt",
                160: "nbsp",
                161: "iexcl",
                162: "cent",
                163: "pound",
                164: "curren",
                165: "yen",
                166: "brvbar",
                167: "sect",
                168: "uml",
                169: "copy",
                170: "ordf",
                171: "laquo",
                172: "not",
                173: "shy",
                174: "reg",
                175: "macr",
                176: "deg",
                177: "plusmn",
                178: "sup2",
                179: "sup3",
                180: "acute",
                181: "micro",
                182: "para",
                183: "middot",
                184: "cedil",
                185: "sup1",
                186: "ordm",
                187: "raquo",
                188: "frac14",
                189: "frac12",
                190: "frac34",
                191: "iquest",
                192: "Agrave",
                193: "Aacute",
                194: "Acirc",
                195: "Atilde",
                196: "Auml",
                197: "Aring",
                198: "AElig",
                199: "Ccedil",
                200: "Egrave",
                201: "Eacute",
                202: "Ecirc",
                203: "Euml",
                204: "Igrave",
                205: "Iacute",
                206: "Icirc",
                207: "Iuml",
                208: "ETH",
                209: "Ntilde",
                210: "Ograve",
                211: "Oacute",
                212: "Ocirc",
                213: "Otilde",
                214: "Ouml",
                215: "times",
                216: "Oslash",
                217: "Ugrave",
                218: "Uacute",
                219: "Ucirc",
                220: "Uuml",
                221: "Yacute",
                222: "THORN",
                223: "szlig",
                224: "agrave",
                225: "aacute",
                226: "acirc",
                227: "atilde",
                228: "auml",
                229: "aring",
                230: "aelig",
                231: "ccedil",
                232: "egrave",
                233: "eacute",
                234: "ecirc",
                235: "euml",
                236: "igrave",
                237: "iacute",
                238: "icirc",
                239: "iuml",
                240: "eth",
                241: "ntilde",
                242: "ograve",
                243: "oacute",
                244: "ocirc",
                245: "otilde",
                246: "ouml",
                247: "divide",
                248: "oslash",
                249: "ugrave",
                250: "uacute",
                251: "ucirc",
                252: "uuml",
                253: "yacute",
                254: "thorn",
                255: "yuml",
                402: "fnof",
                913: "Alpha",
                914: "Beta",
                915: "Gamma",
                916: "Delta",
                917: "Epsilon",
                918: "Zeta",
                919: "Eta",
                920: "Theta",
                921: "Iota",
                922: "Kappa",
                923: "Lambda",
                924: "Mu",
                925: "Nu",
                926: "Xi",
                927: "Omicron",
                928: "Pi",
                929: "Rho",
                931: "Sigma",
                932: "Tau",
                933: "Upsilon",
                934: "Phi",
                935: "Chi",
                936: "Psi",
                937: "Omega",
                945: "alpha",
                946: "beta",
                947: "gamma",
                948: "delta",
                949: "epsilon",
                950: "zeta",
                951: "eta",
                952: "theta",
                953: "iota",
                954: "kappa",
                955: "lambda",
                956: "mu",
                957: "nu",
                958: "xi",
                959: "omicron",
                960: "pi",
                961: "rho",
                962: "sigmaf",
                963: "sigma",
                964: "tau",
                965: "upsilon",
                966: "phi",
                967: "chi",
                968: "psi",
                969: "omega",
                977: "thetasym",
                978: "upsih",
                982: "piv",
                8226: "bull",
                8230: "hellip",
                8242: "prime",
                8243: "Prime",
                8254: "oline",
                8260: "frasl",
                8472: "weierp",
                8465: "image",
                8476: "real",
                8482: "trade",
                8501: "alefsym",
                8592: "larr",
                8593: "uarr",
                8594: "rarr",
                8595: "darr",
                8596: "harr",
                8629: "crarr",
                8656: "lArr",
                8657: "uArr",
                8658: "rArr",
                8659: "dArr",
                8660: "hArr",
                8704: "forall",
                8706: "part",
                8707: "exist",
                8709: "empty",
                8711: "nabla",
                8712: "isin",
                8713: "notin",
                8715: "ni",
                8719: "prod",
                8721: "sum",
                8722: "minus",
                8727: "lowast",
                8730: "radic",
                8733: "prop",
                8734: "infin",
                8736: "ang",
                8743: "and",
                8744: "or",
                8745: "cap",
                8746: "cup",
                8747: "int",
                8756: "there4",
                8764: "sim",
                8773: "cong",
                8776: "asymp",
                8800: "ne",
                8801: "equiv",
                8804: "le",
                8805: "ge",
                8834: "sub",
                8835: "sup",
                8836: "nsub",
                8838: "sube",
                8839: "supe",
                8853: "oplus",
                8855: "otimes",
                8869: "perp",
                8901: "sdot",
                8968: "lceil",
                8969: "rceil",
                8970: "lfloor",
                8971: "rfloor",
                9001: "lang",
                9002: "rang",
                9674: "loz",
                9824: "spades",
                9827: "clubs",
                9829: "hearts",
                9830: "diams",
                338: "OElig",
                339: "oelig",
                352: "Scaron",
                353: "scaron",
                376: "Yuml",
                710: "circ",
                732: "tilde",
                8194: "ensp",
                8195: "emsp",
                8201: "thinsp",
                8204: "zwnj",
                8205: "zwj",
                8206: "lrm",
                8207: "rlm",
                8211: "ndash",
                8212: "mdash",
                8216: "lsquo",
                8217: "rsquo",
                8218: "sbquo",
                8220: "ldquo",
                8221: "rdquo",
                8222: "bdquo",
                8224: "dagger",
                8225: "Dagger",
                8240: "permil",
                8249: "lsaquo",
                8250: "rsaquo",
                8364: "euro"
            }, h = {
                block: T,
                inline: A,
                findNodeIndex: function(e, t) {
                    var n = 0;
                    if (!e) return -1;
                    for (;;) {
                        if (e = e.previousSibling, !e) break;
                        t && 3 == e.nodeType || n++
                    }
                    return n
                },
                isDataNode: function(e) {
                    return e && null !== e.nodeValue && null !== e.data
                },
                isAncestorOf: function(t, n) {
                    try {
                        return !h.isDataNode(t) && (e.contains(t, h.isDataNode(n) ? n.parentNode : n) || n.parentNode == t)
                    } catch (i) {
                        return !1
                    }
                },
                isAncestorOrSelf: function(e, t) {
                    return h.isAncestorOf(e, t) || e == t
                },
                findClosestAncestor: function(e, t) {
                    if (h.isAncestorOf(e, t))
                        for (; t && t.parentNode != e;) t = t.parentNode;
                    return t
                },
                getNodeLength: function(e) {
                    return h.isDataNode(e) ? e.length : e.childNodes.length
                },
                splitDataNode: function(e, t) {
                    for (var n, i = e.cloneNode(!1), r = "", o = e.nextSibling; o && 3 == o.nodeType && o.nodeValue;) r += o.nodeValue, n = o, o = o.nextSibling, h.remove(n);
                    e.deleteData(t, e.length), i.deleteData(0, t), i.nodeValue += r, h.insertAfter(i, e)
                },
                attrEquals: function(e, t) {
                    var n, i;
                    for (n in t)
                        if (i = e[n], n == _ && (i = e[f.support.cssFloat ? b : w]), "object" == typeof i) {
                            if (!h.attrEquals(i, t[n])) return !1
                        } else if (i != t[n]) return !1;
                    return !0
                },
                blockParentOrBody: function(e) {
                    return h.parentOfType(e, S) || e.ownerDocument.body
                },
                blockParents: function(t) {
                    var n, i, r, o = [];
                    for (n = 0, i = t.length; i > n; n++) r = h.parentOfType(t[n], h.blockElements), r && e.inArray(r, o) < 0 && o.push(r);
                    return o
                },
                windowFromDocument: function(e) {
                    return e.defaultView || e.parentWindow
                },
                normalize: F,
                blockElements: S,
                nonListBlockElements: C,
                inlineElements: D,
                empty: x,
                fillAttrs: E,
                toHex: function(e) {
                    var t = r.exec(e);
                    return t ? "#" + p(t.slice(1), function(e) {
                        return e = parseInt(e, 10).toString(16), e.length > 1 ? e : "0" + e
                    }).join("") : e
                },
                encode: function(e, t) {
                    var n = !t || t.entities ? d : c;
                    return e.replace(n, function(e) {
                        var t = e.charCodeAt(0),
                            n = u[t];
                        return n ? "&" + n + ";" : e
                    })
                },
                stripBom: function(e) {
                    return (e || "").replace(o, "")
                },
                insignificant: function(e) {
                    var t = e.attributes;
                    return "k-marker" == e.className || h.is(e, "br") && ("k-br" == e.className || t._moz_dirty || t._moz_editor_bogus_node)
                },
                significantNodes: function(t) {
                    return e.grep(t, function(e) {
                        var t = h.name(e);
                        return "br" == t ? !1 : h.insignificant(e) ? !1 : 3 == e.nodeType && a.test(e.nodeValue) ? !1 : 1 == e.nodeType && !x[t] && h.emptyNode(e) ? !1 : !0;
                    })
                },
                emptyNode: function(e) {
                    return 1 == e.nodeType && !h.significantNodes(e.childNodes).length
                },
                name: function(e) {
                    return e.nodeName.toLowerCase()
                },
                significantChildNodes: function(t) {
                    return e.grep(t.childNodes, function(e) {
                        return 3 != e.nodeType || !h.isWhitespace(e)
                    })
                },
                lastTextNode: function(e) {
                    var t, n = null;
                    if (3 == e.nodeType) return e;
                    for (t = e.lastChild; t; t = t.previousSibling)
                        if (n = h.lastTextNode(t)) return n;
                    return n
                },
                is: function(e, t) {
                    return h.name(e) == t
                },
                isMarker: function(e) {
                    return e.className == k
                },
                isWhitespace: function(e) {
                    return n.test(e.nodeValue)
                },
                isEmptyspace: function(e) {
                    return i.test(e.nodeValue)
                },
                isBlock: function(e) {
                    return T[h.name(e)]
                },
                isEmpty: function(e) {
                    return x[h.name(e)]
                },
                isInline: function(e) {
                    return A[h.name(e)]
                },
                scrollContainer: function(e) {
                    var t = h.windowFromDocument(e),
                        n = (t.contentWindow || t).document || t.ownerDocument || t;
                    return n = f.support.browser.webkit || "BackCompat" == n.compatMode ? n.body : n.documentElement
                },
                scrollTo: function(t) {
                    var n, i, r = e(h.isDataNode(t) ? t.parentNode : t),
                        o = h.windowFromDocument(t.ownerDocument),
                        a = o.innerHeight,
                        s = h.scrollContainer(t.ownerDocument);
                    n = r.offset().top, i = r[0].offsetHeight, i || (i = parseInt(r.css("line-height"), 10) || Math.ceil(1.2 * parseInt(r.css("font-size"), 10)) || 15), i + n > s.scrollTop + a && (s.scrollTop = i + n - a)
                },
                persistScrollTop: function(e) {
                    s = h.scrollContainer(e).scrollTop
                },
                restoreScrollTop: function(e) {
                    h.scrollContainer(e).scrollTop = s
                },
                insertAt: function(e, t, n) {
                    e.insertBefore(t, e.childNodes[n] || null)
                },
                insertBefore: function(e, t) {
                    return t.parentNode ? t.parentNode.insertBefore(e, t) : t
                },
                insertAfter: function(e, t) {
                    return t.parentNode.insertBefore(e, t.nextSibling)
                },
                remove: function(e) {
                    e.parentNode.removeChild(e)
                },
                removeTextSiblings: function(e) {
                    for (var t = e.parentNode; e.nextSibling && 3 == e.nextSibling.nodeType;) t.removeChild(e.nextSibling);
                    for (; e.previousSibling && 3 == e.previousSibling.nodeType;) t.removeChild(e.previousSibling)
                },
                trim: function(e) {
                    var t, n;
                    for (t = e.childNodes.length - 1; t >= 0; t--) n = e.childNodes[t], h.isDataNode(n) ? (h.stripBom(n.nodeValue).length || h.remove(n), h.isWhitespace(n) && h.insertBefore(n, e)) : n.className != k && (h.trim(n), n.childNodes.length || h.isEmpty(n) || h.remove(n));
                    return e
                },
                closest: function(e, t) {
                    for (; e && h.name(e) != t;) e = e.parentNode;
                    return e
                },
                sibling: function(e, t) {
                    do e = e[t]; while (e && 1 != e.nodeType);
                    return e
                },
                next: function(e) {
                    return h.sibling(e, "nextSibling")
                },
                prev: function(e) {
                    return h.sibling(e, "previousSibling")
                },
                parentOfType: function(e, t) {
                    do e = e.parentNode; while (e && !h.ofType(e, t));
                    return e
                },
                ofType: function(t, n) {
                    return e.inArray(h.name(t), n) >= 0
                },
                changeTag: function(e, t, n) {
                    var i, r, o, a, s, l = h.create(e.ownerDocument, t),
                        c = e.attributes;
                    if (!n)
                        for (i = 0, r = c.length; r > i; i++) s = c[i], s.specified && (o = s.nodeName, a = s.nodeValue, o == y ? l.className = a : o == v ? l.style.cssText = e.style.cssText : l.setAttribute(o, a));
                    for (; e.firstChild;) l.appendChild(e.firstChild);
                    return h.insertBefore(l, e), h.remove(e), l
                },
                editableParent: function(e) {
                    for (; e && (3 == e.nodeType || "true" !== e.contentEditable);) e = e.parentNode;
                    return e
                },
                wrap: function(e, t) {
                    return h.insertBefore(t, e), t.appendChild(e), t
                },
                unwrap: function(e) {
                    for (var t = e.parentNode; e.firstChild;) t.insertBefore(e.firstChild, e);
                    t.removeChild(e)
                },
                create: function(e, t, n) {
                    return h.attr(e.createElement(t), n)
                },
                attr: function(e, t) {
                    t = m({}, t), t && v in t && (h.style(e, t.style), delete t.style);
                    for (var n in t) null === t[n] ? (e.removeAttribute(n), delete t[n]) : "className" == n && (e[n] = t[n]);
                    return m(e, t)
                },
                style: function(t, n) {
                    e(t).css(n || {})
                },
                unstyle: function(e, t) {
                    for (var n in t) n == _ && (n = f.support.cssFloat ? b : w), e.style[n] = "";
                    "" === e.style.cssText && e.removeAttribute(v)
                },
                inlineStyle: function(t, n, i) {
                    var r, o = e(h.create(t.ownerDocument, n, i));
                    return t.appendChild(o[0]), r = p(l, function(e) {
                        return g.msie && "line-height" == e && "1px" == o.css(e) ? "line-height:1.5" : e + ":" + o.css(e)
                    }).join(";"), o.remove(), r
                },
                getEffectiveBackground: function(e) {
                    var t = e.css("background-color");
                    return t.indexOf("rgba(0, 0, 0, 0") < 0 && "transparent" !== t ? t : "html" === e[0].tagName.toLowerCase() ? "Window" : h.getEffectiveBackground(e.parent())
                },
                removeClass: function(t, n) {
                    var i, r, o = " " + t.className + " ",
                        a = n.split(" ");
                    for (i = 0, r = a.length; r > i; i++) o = o.replace(" " + a[i] + " ", " ");
                    o = e.trim(o), o.length ? t.className = o : t.removeAttribute(y)
                },
                commonAncestor: function() {
                    var e, t, n, i, r, o = arguments.length,
                        a = [],
                        s = 1 / 0,
                        l = null;
                    if (!o) return null;
                    if (1 == o) return arguments[0];
                    for (e = 0; o > e; e++) {
                        for (t = [], n = arguments[e]; n;) t.push(n), n = n.parentNode;
                        a.push(t.reverse()), s = Math.min(s, t.length)
                    }
                    if (1 == o) return a[0][0];
                    for (e = 0; s > e; e++) {
                        for (i = a[0][e], r = 1; o > r; r++)
                            if (i != a[r][e]) return l;
                        l = i
                    }
                    return l
                },
                closestSplittableParent: function(t) {
                    var n, i, r;
                    return n = 1 == t.length ? h.parentOfType(t[0], ["ul", "ol"]) : h.commonAncestor.apply(null, t), n || (n = h.parentOfType(t[0], ["p", "td"]) || t[0].ownerDocument.body), h.isInline(n) && (n = h.blockParentOrBody(n)), i = p(t, h.editableParent), r = h.commonAncestor(i)[0], e.contains(n, r) && (n = r), n
                },
                closestEditable: function(t, n) {
                    var i, r = h.editableParent(t);
                    return i = h.ofType(t, n) ? t : h.parentOfType(t, n), i && r && e.contains(i, r) ? i = r : !i && r && (i = r), i
                },
                closestEditableOfType: function(e, t) {
                    var n = h.closestEditable(e, t);
                    return n && h.ofType(n, t) ? n : void 0
                },
                filter: function(e, t, n) {
                    for (var i, r = 0, o = t.length, a = []; o > r; r++) i = h.name(t[r]), (!n && i == e || n && i != e) && a.push(t[r]);
                    return a
                },
                ensureTrailingBreaks: function(t) {
                    var n = e(t).find("p,td,th"),
                        i = n.length,
                        r = 0;
                    if (i)
                        for (; i > r; r++) h.ensureTrailingBreak(n[r]);
                    else h.ensureTrailingBreak(t)
                },
                removeTrailingBreak: function(t) {
                    e(t).find("br[type=_moz],.k-br").remove()
                },
                ensureTrailingBreak: function(e) {
                    var t, n, i;
                    h.removeTrailingBreak(e), t = e.lastChild, n = t && h.name(t), (!n || "br" != n && "img" != n || "br" == n && "k-br" != t.className) && (i = e.ownerDocument.createElement("br"), i.className = "k-br", e.appendChild(i))
                }
            }, f.ui.editor.Dom = h
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/serializer.min", ["editor/dom.min"], e)
    }(function() {
        ! function(e, t) {
            var n, i, r = window.kendo,
                o = r.ui.editor,
                a = o.Dom,
                s = e.extend,
                l = "xx-small,x-small,small,medium,large,x-large,xx-large".split(","),
                c = /"/g,
                d = /<br[^>]*>/i,
                u = /^\d+(\.\d*)?(px)?$/i,
                h = /<p><\/p>/i,
                f = /(\*?[-#\/\*\\\w]+(?:\[[0-9a-z_-]+\])?)\s*:\s*((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/g,
                p = /^sizzle-\d+/i,
                m = /^k-script-/i,
                g = /\s*onerror\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/i,
                v = document.createElement("div");
            v.innerHTML = " <hr>", n = 3 === v.firstChild.nodeType, v = null, i = {
                toEditableHtml: function(e) {
                    var t = '<br class="k-br">';
                    return e = e || "", e.replace(/<!\[CDATA\[(.*)?\]\]>/g, "<!--[CDATA[$1]]-->").replace(/<(\/?)script([^>]*)>/gi, "<$1k:script$2>").replace(/<img([^>]*)>/gi, function(e) {
                        return e.replace(g, "")
                    }).replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/gi, "$1").replace(/^<(table|blockquote)/i, t + "<$1").replace(/^[\s]*(&nbsp;|\u00a0)/i, "$1").replace(/<\/(table|blockquote)>$/i, "</$1>" + t)
                },
                _fillEmptyElements: function(t) {
                    e(t).find("p").each(function() {
                        var t, n = e(this);
                        if (/^\s*$/g.test(n.text()) && !n.find("img,input").length) {
                            for (t = this; t.firstChild && 3 != t.firstChild.nodeType;) t = t.firstChild;
                            1 != t.nodeType || a.empty[a.name(t)] || (t.innerHTML = r.ui.editor.emptyElementContent)
                        }
                    })
                },
                _removeSystemElements: function(t) {
                    e(".k-paste-container", t).remove()
                },
                _resetOrderedLists: function(e) {
                    var t, n, i, r = e.getElementsByTagName("ol");
                    for (t = 0; r.length > t; t++) n = r[t], i = n.getAttribute("start"), n.setAttribute("start", 1), i ? n.setAttribute("start", i) : n.removeAttribute(i)
                },
                _preventScriptExecution: function(t) {
                    e(t).find("*").each(function() {
                        var e, t, n, i, r = this.attributes;
                        for (t = 0, n = r.length; n > t; t++) e = r[t], i = e.nodeName, e.specified && /^on/i.test(i) && (this.setAttribute("k-script-" + i, e.value), this.removeAttribute(i))
                    })
                },
                htmlToDom: function(t, n) {
                    var o = r.support.browser,
                        s = o.msie,
                        l = s && 9 > o.version,
                        c = "originalsrc",
                        d = "originalhref";
                    return t = i.toEditableHtml(t), l && (t = "<br/>" + t, t = t.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/, d + '="$1"'), t = t.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/, c + '="$1"')), n.innerHTML = t, l ? (a.remove(n.firstChild), e(n).find("k\\:script,script,link,img,a").each(function() {
                        var e = this;
                        e[d] && (e.setAttribute("href", e[d]), e.removeAttribute(d)), e[c] && (e.setAttribute("src", e[c]), e.removeAttribute(c))
                    })) : s && (a.normalize(n), i._resetOrderedLists(n)), i._preventScriptExecution(n), i._fillEmptyElements(n), i._removeSystemElements(n), e("table", n).addClass("k-table"), n
                },
                domToXhtml: function(i, o) {
                    function s(t) {
                        return e.grep(t, function(e) {
                            return "style" != e.name
                        })
                    }

                    function g(t) {
                        var n, i, r, o = e.trim,
                            s = o(t),
                            l = [];
                        for (f.lastIndex = 0;;) {
                            if (n = f.exec(s), !n) break;
                            i = o(n[1].toLowerCase()), r = o(n[2]), "font-size-adjust" != i && "font-stretch" != i && (i.indexOf("color") >= 0 ? r = a.toHex(r) : i.indexOf("font") >= 0 ? r = r.replace(c, "'") : /\burl\(/g.test(r) && (r = r.replace(c, "")), l.push({
                                property: i,
                                value: r
                            }))
                        }
                        return l
                    }

                    function v(e) {
                        var t, n = g(e);
                        for (t = 0; n.length > t; t++) C.push(n[t].property), C.push(":"), C.push(n[t].value), C.push(";")
                    }

                    function _(e) {
                        var t, n, i, r, s, l, c = [],
                            d = e.attributes;
                        for (n = 0, i = d.length; i > n; n++) t = d[n], r = t.nodeName, s = t.value, l = t.specified, "value" == r && "value" in e && e.value ? l = !0 : "type" == r && "text" == s ? l = !0 : "class" != r || s ? p.test(r) ? l = !1 : "complete" == r ? l = !1 : "altHtml" == r ? l = !1 : "start" == r && a.is(e, "ul") ? l = !1 : "start" == r && a.is(e, "ol") && "1" == s ? l = !1 : r.indexOf("_moz") >= 0 ? l = !1 : m.test(r) && (l = !!o.scripts) : l = !1, l && c.push(t);
                        return c
                    }

                    function b(n, i) {
                        var o, s, l, c, d, h, f, p;
                        if (i = i || _(n), a.is(n, "img") && (h = n.style.width, f = n.style.height, p = e(n), h && u.test(h) && (p.attr("width", parseInt(h, 10)), a.unstyle(n, {
                            width: t
                        })), f && u.test(f) && (p.attr("height", parseInt(f, 10)), a.unstyle(n, {
                            height: t
                        }))), i.length)
                            for (i.sort(function(e, t) {
                                return e.nodeName > t.nodeName ? 1 : t.nodeName > e.nodeName ? -1 : 0
                            }), o = 0, s = i.length; s > o; o++) l = i[o], c = l.nodeName, d = l.value, ("class" != c || "k-table" != d) && (c = c.replace(m, ""), C.push(" "), C.push(c), C.push('="'), "style" == c ? v(d || n.style.cssText) : C.push("src" == c || "href" == c ? r.htmlEncode(n.getAttribute(c, 2)) : a.fillAttrs[c] ? c : d), C.push('"'))
                    }

                    function w(e, t, n) {
                        for (var i = e.firstChild; i; i = i.nextSibling) k(i, t, n)
                    }

                    function y(e) {
                        return e.nodeValue.replace(/\ufeff/g, "")
                    }

                    function k(e, i, r) {
                        var s, l, c, d, u, h = e.nodeType;
                        if (1 == h) {
                            if (s = a.name(e), !s || a.insignificant(e)) return;
                            if (a.isInline(e) && 1 == e.childNodes.length && 3 == e.firstChild.nodeType && !y(e.firstChild)) return;
                            if (!o.scripts && ("script" == s || "k:script" == s)) return;
                            if (l = S[s], l && (t === l.semantic || o.semantic ^ l.semantic)) return l.start(e), w(e, !1, l.skipEncoding), l.end(e), t;
                            C.push("<"), C.push(s), b(e), a.empty[s] ? C.push(" />") : (C.push(">"), w(e, i || a.is(e, "pre")), C.push("</"), C.push(s), C.push(">"))
                        } else 3 == h ? (d = y(e), !i && n && (c = e.parentNode, u = e.previousSibling, u || (u = (a.isInline(c) ? c : e).previousSibling), (!u || "" === u.innerHTML || a.isBlock(u)) && (d = d.replace(/^[\r\n\v\f\t ]+/, "")), d = d.replace(/ +/, " ")), C.push(r ? d : a.encode(d, o))) : 4 == h ? (C.push("<![CDATA["), C.push(e.data), C.push("]]>")) : 8 == h && (e.data.indexOf("[CDATA[") < 0 ? (C.push("<!--"), C.push(e.data), C.push("-->")) : (C.push("<!"), C.push(e.data), C.push(">")))
                    }

                    function x(e) {
                        var t = e.childNodes.length,
                            n = t && 3 == e.firstChild.nodeType;
                        return n && (1 == t || 2 == t && a.insignificant(e.lastChild))
                    }
                    var C = [],
                        S = {
                            iframe: {
                                start: function(e) {
                                    C.push("<iframe"), b(e), C.push(">")
                                },
                                end: function() {
                                    C.push("</iframe>")
                                }
                            },
                            "k:script": {
                                start: function(e) {
                                    C.push("<script"), b(e), C.push(">")
                                },
                                end: function() {
                                    C.push("</script>")
                                },
                                skipEncoding: !0
                            },
                            span: {
                                semantic: !0,
                                start: function(t) {
                                    var n, i, r = t.style,
                                        o = _(t),
                                        c = s(o);
                                    c.length && (C.push("<span"), b(t, c), C.push(">")), "underline" == r.textDecoration && C.push("<u>"), n = [], r.color && n.push('color="' + a.toHex(r.color) + '"'), r.fontFamily && n.push('face="' + r.fontFamily + '"'), r.fontSize && (i = e.inArray(r.fontSize, l), n.push('size="' + i + '"')), n.length && C.push("<font " + n.join(" ") + ">")
                                },
                                end: function(e) {
                                    var t = e.style;
                                    (t.color || t.fontFamily || t.fontSize) && C.push("</font>"), "underline" == t.textDecoration && C.push("</u>"), s(_(e)).length && C.push("</span>")
                                }
                            },
                            strong: {
                                semantic: !0,
                                start: function() {
                                    C.push("<b>")
                                },
                                end: function() {
                                    C.push("</b>")
                                }
                            },
                            em: {
                                semantic: !0,
                                start: function() {
                                    C.push("<i>")
                                },
                                end: function() {
                                    C.push("</i>")
                                }
                            },
                            b: {
                                semantic: !1,
                                start: function() {
                                    C.push("<strong>")
                                },
                                end: function() {
                                    C.push("</strong>")
                                }
                            },
                            i: {
                                semantic: !1,
                                start: function() {
                                    C.push("<em>")
                                },
                                end: function() {
                                    C.push("</em>")
                                }
                            },
                            u: {
                                semantic: !1,
                                start: function() {
                                    C.push('<span style="text-decoration:underline;">')
                                },
                                end: function() {
                                    C.push("</span>")
                                }
                            },
                            font: {
                                semantic: !1,
                                start: function(e) {
                                    var t, n, i;
                                    C.push('<span style="'), t = e.getAttribute("color"), n = l[e.getAttribute("size")], i = e.getAttribute("face"), t && (C.push("color:"), C.push(a.toHex(t)), C.push(";")), i && (C.push("font-family:"), C.push(i), C.push(";")), n && (C.push("font-size:"), C.push(n), C.push(";")), C.push('">')
                                },
                                end: function() {
                                    C.push("</span>")
                                }
                            }
                        };
                    return S.script = S["k:script"], o = o || {}, t === o.semantic && (o.semantic = !0), x(i) ? a.encode(y(i.firstChild).replace(/[\r\n\v\f\t ]+/, " "), o) : (w(i), C = C.join(""), "" === C.replace(d, "").replace(h, "") ? "" : C)
                }
            }, s(o, {
                Serializer: i
            })
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/range.min", ["editor/serializer.min"], e)
    }(function() {
        ! function(e) {
            function t(e, t, n, i) {
                var r, o, a, s;
                if (e == t) return i - n;
                for (r = t; r && r.parentNode != e;) r = r.parentNode;
                if (r) return w(r) - n;
                for (r = e; r && r.parentNode != t;) r = r.parentNode;
                if (r) return i - w(r) - 1;
                for (o = b.commonAncestor(e, t), a = e; a && a.parentNode != o;) a = a.parentNode;
                for (a || (a = o), s = t; s && s.parentNode != o;) s = s.parentNode;
                return s || (s = o), a == s ? 0 : w(s) - w(a)
            }

            function n(e, n) {
                function i(e) {
                    try {
                        return t(e.startContainer, e.endContainer, e.startOffset, e.endOffset) < 0
                    } catch (n) {
                        return !0
                    }
                }
                i(e) && (n ? (e.commonAncestorContainer = e.endContainer = e.startContainer, e.endOffset = e.startOffset) : (e.commonAncestorContainer = e.startContainer = e.endContainer, e.startOffset = e.endOffset), e.collapsed = !0)
            }

            function i(e) {
                e.collapsed = e.startContainer == e.endContainer && e.startOffset == e.endOffset;
                for (var t = e.startContainer; t && t != e.endContainer && !b.isAncestorOf(t, e.endContainer);) t = t.parentNode;
                e.commonAncestorContainer = t
            }

            function r(e) {
                var t = e.duplicate(),
                    n = e.duplicate();
                return t.collapse(!0), n.collapse(!1), b.commonAncestor(e.parentElement(), t.parentElement(), n.parentElement())
            }

            function o(e, t, n) {
                var i, r = t[n ? "startContainer" : "endContainer"],
                    o = t[n ? "startOffset" : "endOffset"],
                    a = 0,
                    s = y(r),
                    l = s ? r : r.childNodes[o] || null,
                    c = s ? r.parentNode : r,
                    d = t.ownerDocument,
                    u = d.body.createTextRange();
                (3 == r.nodeType || 4 == r.nodeType) && (a = o), c || (c = d.body), "img" == c.nodeName.toLowerCase() ? (u.moveToElementText(c), u.collapse(!1), e.setEndPoint(n ? "StartToStart" : "EndToStart", u)) : (i = c.insertBefore(b.create(d, "a"), l), u.moveToElementText(i), b.remove(i), u[n ? "moveStart" : "moveEnd"]("character", a), u.collapse(!1), e.setEndPoint(n ? "StartToStart" : "EndToStart", u))
            }

            function a(e, t, n, i) {
                var r, o, a, s, l, c, d, u = b.create(t.ownerDocument, "a"),
                    h = e.duplicate(),
                    f = i ? "StartToStart" : "StartToEnd",
                    p = !1;
                u.innerHTML = "\ufeff", h.collapse(i), o = h.parentElement(), b.isAncestorOrSelf(n, o) || (o = n);
                do p ? o.insertBefore(u, u.previousSibling) : (o.appendChild(u), p = !0), h.moveToElementText(u); while ((r = h.compareEndPoints(f, e)) > 0 && u.previousSibling);
                a = u.nextSibling, -1 == r && y(a) ? (h.setEndPoint(i ? "EndToStart" : "EndToEnd", e), b.remove(u), c = [a, h.text.length]) : (s = !i && u.previousSibling, l = i && u.nextSibling, y(l) ? c = [l, 0] : y(s) ? c = [s, s.length] : (d = w(u), c = o.nextSibling && d == o.childNodes.length - 1 ? [o.nextSibling, 0] : [o, d]), b.remove(u)), t[i ? "setStart" : "setEnd"].apply(t, c)
            }
            var s, l, c, d, u, h, f, p = window.kendo,
                m = p.Class,
                g = e.extend,
                v = p.ui.editor,
                _ = p.support.browser,
                b = v.Dom,
                w = b.findNodeIndex,
                y = b.isDataNode,
                k = b.findClosestAncestor,
                x = b.getNodeLength,
                C = b.normalize,
                S = {
                    selectionFromWindow: function(e) {
                        return "getSelection" in e ? e.getSelection() : new l(e.document)
                    },
                    selectionFromRange: function(e) {
                        var t = f.documentFromRange(e);
                        return S.selectionFromDocument(t)
                    },
                    selectionFromDocument: function(e) {
                        return S.selectionFromWindow(b.windowFromDocument(e))
                    }
                },
                T = m.extend({
                    init: function(t) {
                        e.extend(this, {
                            ownerDocument: t,
                            startContainer: t,
                            endContainer: t,
                            commonAncestorContainer: t,
                            startOffset: 0,
                            endOffset: 0,
                            collapsed: !0
                        })
                    },
                    setStart: function(e, t) {
                        this.startContainer = e, this.startOffset = t, i(this), n(this, !0)
                    },
                    setEnd: function(e, t) {
                        this.endContainer = e, this.endOffset = t, i(this), n(this, !1)
                    },
                    setStartBefore: function(e) {
                        this.setStart(e.parentNode, w(e))
                    },
                    setStartAfter: function(e) {
                        this.setStart(e.parentNode, w(e) + 1)
                    },
                    setEndBefore: function(e) {
                        this.setEnd(e.parentNode, w(e))
                    },
                    setEndAfter: function(e) {
                        this.setEnd(e.parentNode, w(e) + 1)
                    },
                    selectNode: function(e) {
                        this.setStartBefore(e), this.setEndAfter(e)
                    },
                    selectNodeContents: function(e) {
                        this.setStart(e, 0), this.setEnd(e, e[1 === e.nodeType ? "childNodes" : "nodeValue"].length)
                    },
                    collapse: function(e) {
                        var t = this;
                        e ? t.setEnd(t.startContainer, t.startOffset) : t.setStart(t.endContainer, t.endOffset)
                    },
                    deleteContents: function() {
                        var e = this,
                            t = e.cloneRange();
                        e.startContainer != e.commonAncestorContainer && e.setStartAfter(k(e.commonAncestorContainer, e.startContainer)), e.collapse(!0),
                            function n(e) {
                                for (; e.next();) e.hasPartialSubtree() ? n(e.getSubtreeIterator()) : e.remove()
                            }(new s(t))
                    },
                    cloneContents: function() {
                        var e = f.documentFromRange(this);
                        return function t(n) {
                            for (var i, r = e.createDocumentFragment(); i = n.next();) i = i.cloneNode(!n.hasPartialSubtree()), n.hasPartialSubtree() && i.appendChild(t(n.getSubtreeIterator())), r.appendChild(i);
                            return r
                        }(new s(this))
                    },
                    extractContents: function() {
                        var e, t = this,
                            n = t.cloneRange();
                        return t.startContainer != t.commonAncestorContainer && t.setStartAfter(k(t.commonAncestorContainer, t.startContainer)), t.collapse(!0), e = f.documentFromRange(t),
                            function i(n) {
                                for (var r, o = e.createDocumentFragment(); r = n.next();) n.hasPartialSubtree() ? (r = r.cloneNode(!1), r.appendChild(i(n.getSubtreeIterator()))) : n.remove(t.originalRange), o.appendChild(r);
                                return o
                            }(new s(n))
                    },
                    insertNode: function(e) {
                        var t = this;
                        y(t.startContainer) ? (t.startOffset != t.startContainer.nodeValue.length && b.splitDataNode(t.startContainer, t.startOffset), b.insertAfter(e, t.startContainer)) : b.insertAt(t.startContainer, e, t.startOffset), t.setStart(t.startContainer, t.startOffset)
                    },
                    cloneRange: function() {
                        return e.extend(new T(this.ownerDocument), {
                            startContainer: this.startContainer,
                            endContainer: this.endContainer,
                            commonAncestorContainer: this.commonAncestorContainer,
                            startOffset: this.startOffset,
                            endOffset: this.endOffset,
                            collapsed: this.collapsed,
                            originalRange: this
                        })
                    },
                    toString: function() {
                        var e = this.startContainer.nodeName,
                            t = this.endContainer.nodeName;
                        return ("#text" == e ? this.startContainer.nodeValue : e) + "(" + this.startOffset + ") : " + ("#text" == t ? this.endContainer.nodeValue : t) + "(" + this.endOffset + ")"
                    }
                });
            T.fromNode = function(e) {
                return new T(e.ownerDocument)
            }, s = m.extend({
                init: function(t) {
                    if (e.extend(this, {
                        range: t,
                        _current: null,
                        _next: null,
                        _end: null
                    }), !t.collapsed) {
                        var n = t.commonAncestorContainer;
                        this._next = t.startContainer != n || y(t.startContainer) ? k(n, t.startContainer) : t.startContainer.childNodes[t.startOffset], this._end = t.endContainer != n || y(t.endContainer) ? k(n, t.endContainer).nextSibling : t.endContainer.childNodes[t.endOffset]
                    }
                },
                hasNext: function() {
                    return !!this._next
                },
                next: function() {
                    var e = this,
                        t = e._current = e._next;
                    return e._next = e._current && e._current.nextSibling != e._end ? e._current.nextSibling : null, y(e._current) && (e.range.endContainer == e._current && (t = t.cloneNode(!0), t.deleteData(e.range.endOffset, t.length - e.range.endOffset)), e.range.startContainer == e._current && (t = t.cloneNode(!0), t.deleteData(0, e.range.startOffset))), t
                },
                traverse: function(e) {
                    function t() {
                        return i._current = i._next, i._next = i._current && i._current.nextSibling != i._end ? i._current.nextSibling : null, i._current
                    }
                    for (var n, i = this; n = t();) i.hasPartialSubtree() ? i.getSubtreeIterator().traverse(e) : e(n);
                    return n
                },
                remove: function(e) {
                    var t, n, i, r, o, a = this,
                        s = a.range.startContainer == a._current,
                        l = a.range.endContainer == a._current;
                    y(a._current) && (s || l) ? (t = s ? a.range.startOffset : 0, n = l ? a.range.endOffset : a._current.length, i = n - t, e && (s || l) && (a._current == e.startContainer && e.startOffset >= t && (e.startOffset -= i), a._current == e.endContainer && e.endOffset >= n && (e.endOffset -= i)), a._current.deleteData(t, i)) : (r = a._current.parentNode, !e || a.range.startContainer != r && a.range.endContainer != r || (o = w(a._current), r == e.startContainer && e.startOffset >= o && (e.startOffset -= 1), r == e.endContainer && e.endOffset > o && (e.endOffset -= 1)), b.remove(a._current))
                },
                hasPartialSubtree: function() {
                    return !y(this._current) && (b.isAncestorOrSelf(this._current, this.range.startContainer) || b.isAncestorOrSelf(this._current, this.range.endContainer))
                },
                getSubtreeIterator: function() {
                    var e = this,
                        t = e.range.cloneRange();
                    return t.selectNodeContents(e._current), b.isAncestorOrSelf(e._current, e.range.startContainer) && t.setStart(e.range.startContainer, e.range.startOffset), b.isAncestorOrSelf(e._current, e.range.endContainer) && t.setEnd(e.range.endContainer, e.range.endOffset), new s(t)
                }
            }), l = m.extend({
                init: function(e) {
                    this.ownerDocument = e, this.rangeCount = 1
                },
                addRange: function(e) {
                    var t = this.ownerDocument.body.createTextRange();
                    o(t, e, !1), o(t, e, !0), t.select()
                },
                removeAllRanges: function() {
                    var e = this.ownerDocument.selection;
                    "None" != e.type && e.empty()
                },
                getRangeAt: function() {
                    var e, t, n, i, o, s, l, c, d = new T(this.ownerDocument),
                        u = this.ownerDocument.selection;
                    try {
                        if (e = u.createRange(), t = e.item ? e.item(0) : e.parentElement(), t.ownerDocument != this.ownerDocument) return d
                    } catch (h) {
                        return d
                    }
                    if ("Control" == u.type) d.selectNode(e.item(0));
                    else if (n = r(e), a(e, d, n, !0), a(e, d, n, !1), 9 == d.startContainer.nodeType && d.setStart(d.endContainer, d.startOffset), 9 == d.endContainer.nodeType && d.setEnd(d.startContainer, d.endOffset), 0 === e.compareEndPoints("StartToEnd", e) && d.collapse(!1), i = d.startContainer, o = d.endContainer, s = this.ownerDocument.body, !(d.collapsed || 0 !== d.startOffset || d.endOffset != x(d.endContainer) || i == o && y(i) && i.parentNode == s)) {
                        for (l = !1, c = !1; 0 === w(i) && i == i.parentNode.firstChild && i != s;) i = i.parentNode, l = !0;
                        for (; w(o) == x(o.parentNode) - 1 && o == o.parentNode.lastChild && o != s;) o = o.parentNode, c = !0;
                        i == s && o == s && l && c && (d.setStart(i, 0), d.setEnd(o, x(s)))
                    }
                    return d
                }
            }), c = m.extend({
                init: function(e) {
                    this.enumerate = function() {
                        function t(e) {
                            if (b.is(e, "img") || 3 == e.nodeType && (!b.isEmptyspace(e) || "\ufeff" == e.nodeValue)) n.push(e);
                            else
                                for (e = e.firstChild; e;) t(e), e = e.nextSibling
                        }
                        var n = [];
                        return new s(e).traverse(t), n
                    }
                }
            }), d = m.extend({
                init: function(e, t) {
                    var n = this;
                    n.range = e, n.rootNode = f.documentFromRange(e), n.body = t || n.getEditable(e), "body" != b.name(n.body) && (n.rootNode = n.body), n.html = n.body.innerHTML, n.startContainer = n.nodeToPath(e.startContainer), n.endContainer = n.nodeToPath(e.endContainer), n.startOffset = n.offset(e.startContainer, e.startOffset), n.endOffset = n.offset(e.endContainer, e.endOffset)
                },
                index: function(e) {
                    for (var t, n = 0, i = e.nodeType; e = e.previousSibling;) t = e.nodeType, (3 != t || i != t) && n++, i = t;
                    return n
                },
                getEditable: function(e) {
                    for (var t = e.commonAncestorContainer; t && (3 == t.nodeType || t.attributes && !t.attributes.contentEditable);) t = t.parentNode;
                    return t
                },
                restoreHtml: function() {
                    this.body.innerHTML = this.html
                },
                offset: function(e, t) {
                    if (3 == e.nodeType)
                        for (;
                            (e = e.previousSibling) && 3 == e.nodeType;) t += e.nodeValue.length;
                    return t
                },
                nodeToPath: function(e) {
                    for (var t = []; e != this.rootNode;) t.push(this.index(e)), e = e.parentNode;
                    return t
                },
                toRangePoint: function(e, t, n, i) {
                    for (var r = this.rootNode, o = n.length, a = i; o--;) r = r.childNodes[n[o]];
                    for (; r && 3 == r.nodeType && a > r.nodeValue.length;) a -= r.nodeValue.length, r = r.nextSibling;
                    r && a >= 0 && e[t ? "setStart" : "setEnd"](r, a)
                },
                toRange: function() {
                    var e = this,
                        t = e.range.cloneRange();
                    return e.toRangePoint(t, !0, e.startContainer, e.startOffset), e.toRangePoint(t, !1, e.endContainer, e.endOffset), t
                }
            }), u = m.extend({
                init: function() {
                    this.caret = null
                },
                addCaret: function(e) {
                    var t = this;
                    return t.caret = b.create(f.documentFromRange(e), "span", {
                        className: "k-marker"
                    }), e.insertNode(t.caret), e.selectNode(t.caret), t.caret
                },
                removeCaret: function(e) {
                    var t, n, i, r, o = this,
                        a = o.caret.previousSibling,
                        s = 0;
                    a && (s = y(a) ? a.nodeValue.length : w(a)), t = o.caret.parentNode, n = a ? w(a) : 0, b.remove(o.caret), C(t), i = t.childNodes[n], y(i) ? e.setStart(i, s) : i ? (r = b.lastTextNode(i), r ? e.setStart(r, r.nodeValue.length) : e[a ? "setStartAfter" : "setStartBefore"](i)) : (_.msie || t.innerHTML || (t.innerHTML = '<br _moz_dirty="" />'), e.selectNodeContents(t)), e.collapse(!0)
                },
                add: function(e, t) {
                    var n, i, r = this,
                        o = e.collapsed && !f.isExpandable(e),
                        a = f.documentFromRange(e);
                    return t && e.collapsed && (r.addCaret(e), e = f.expand(e)), n = e.cloneRange(), n.collapse(!1), r.end = b.create(a, "span", {
                        className: "k-marker"
                    }), n.insertNode(r.end), n = e.cloneRange(), n.collapse(!0), r.start = r.end.cloneNode(!0), n.insertNode(r.start), r._removeDeadMarkers(r.start, r.end), o && (i = a.createTextNode("\ufeff"), b.insertAfter(i.cloneNode(), r.start), b.insertBefore(i, r.end)), C(e.commonAncestorContainer), e.setStartBefore(r.start), e.setEndAfter(r.end), e
                },
                _removeDeadMarkers: function(e, t) {
                    e.previousSibling && "\ufeff" == e.previousSibling.nodeValue && b.remove(e.previousSibling), t.nextSibling && "\ufeff" == t.nextSibling.nodeValue && b.remove(t.nextSibling)
                },
                _normalizedIndex: function(e) {
                    for (var t = w(e), n = e; n.previousSibling;) 3 == n.nodeType && 3 == n.previousSibling.nodeType && t--, n = n.previousSibling;
                    return t
                },
                remove: function(e) {
                    var t, n, i, r, o, a, s, l, c, d, u, h = this,
                        f = h.start,
                        p = h.end;
                    for (C(e.commonAncestorContainer); !f.nextSibling && f.parentNode;) f = f.parentNode;
                    for (; !p.previousSibling && p.parentNode;) p = p.parentNode;
                    if (t = f.previousSibling && 3 == f.previousSibling.nodeType && f.nextSibling && 3 == f.nextSibling.nodeType, n = p.previousSibling && 3 == p.previousSibling.nodeType && p.nextSibling && 3 == p.nextSibling.nodeType, i = t && n, f = f.nextSibling, p = p.previousSibling, r = !1, o = !1, f == h.end && (o = !!h.start.previousSibling, f = p = h.start.previousSibling || h.end.nextSibling, r = !0), b.remove(h.start), b.remove(h.end), !f || !p) return e.selectNodeContents(e.commonAncestorContainer), void e.collapse(!0);
                    if (a = r ? y(f) ? f.nodeValue.length : f.childNodes.length : 0, s = y(p) ? p.nodeValue.length : p.childNodes.length, 3 == f.nodeType)
                        for (; f.previousSibling && 3 == f.previousSibling.nodeType;) f = f.previousSibling, a += f.nodeValue.length;
                    if (3 == p.nodeType)
                        for (; p.previousSibling && 3 == p.previousSibling.nodeType;) p = p.previousSibling, s += p.nodeValue.length;
                    l = f.parentNode, c = p.parentNode, d = this._normalizedIndex(f), u = this._normalizedIndex(p), C(l), 3 == f.nodeType && (f = l.childNodes[d]), C(c), 3 == p.nodeType && (p = c.childNodes[u]), r ? (3 == f.nodeType ? e.setStart(f, a) : e[o ? "setStartAfter" : "setStartBefore"](f), e.collapse(!0)) : (3 == f.nodeType ? e.setStart(f, a) : e.setStartBefore(f), 3 == p.nodeType ? e.setEnd(p, s) : e.setEndAfter(p)), h.caret && h.removeCaret(e)
                }
            }), h = /[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/, f = {
                nodes: function(e) {
                    var t = f.textNodes(e);
                    return t.length || (e.selectNodeContents(e.commonAncestorContainer), t = f.textNodes(e), t.length || (t = b.significantChildNodes(e.commonAncestorContainer))), t
                },
                textNodes: function(e) {
                    return new c(e).enumerate()
                },
                documentFromRange: function(e) {
                    var t = e.startContainer;
                    return 9 == t.nodeType ? t : t.ownerDocument
                },
                createRange: function(e) {
                    return _.msie && 9 > _.version ? new T(e) : e.createRange()
                },
                selectRange: function(e) {
                    var t, n = f.image(e);
                    n && (e.setStartAfter(n), e.setEndAfter(n)), t = S.selectionFromRange(e), t.removeAllRanges(), t.addRange(e)
                },
                stringify: function(e) {
                    return p.format("{0}:{1} - {2}:{3}", b.name(e.startContainer), e.startOffset, b.name(e.endContainer), e.endOffset)
                },
                split: function(e, t, n) {
                    function i(i) {
                        var r, o = e.cloneRange();
                        o.collapse(i), o[i ? "setStartBefore" : "setEndAfter"](t), r = o.extractContents(), n && (r = b.trim(r)), b[i ? "insertBefore" : "insertAfter"](r, t)
                    }
                    i(!0), i(!1)
                },
                mapAll: function(t, n) {
                    var i = [];
                    return new s(t).traverse(function(t) {
                        var r = n(t);
                        r && e.inArray(r, i) < 0 && i.push(r)
                    }), i
                },
                getAll: function(e, t) {
                    var n = t;
                    return "string" == typeof t && (t = function(e) {
                        return b.is(e, n)
                    }), f.mapAll(e, function(e) {
                        return t(e) ? e : void 0
                    })
                },
                getMarkers: function(e) {
                    return f.getAll(e, function(e) {
                        return "k-marker" == e.className
                    })
                },
                image: function(e) {
                    var t = f.getAll(e, "img");
                    return 1 == t.length ? t[0] : void 0
                },
                isStartOf: function(e, t) {
                    var n, i, r;
                    if (0 !== e.startOffset) return !1;
                    for (n = e.cloneRange(); 0 === n.startOffset && n.startContainer != t;) {
                        for (i = b.findNodeIndex(n.startContainer), r = n.startContainer.parentNode; i > 0 && r[i - 1] && b.insignificant(r[i - 1]);) i--;
                        n.setStart(r, i)
                    }
                    return 0 === n.startOffset && n.startContainer == t
                },
                isEndOf: function(e, t) {
                    function n(e) {
                        b.insignificant(e) || r.push(e)
                    }
                    var i, r, o = e.cloneRange();
                    return o.collapse(!1), i = o.startContainer, b.isDataNode(i) && o.startOffset == b.getNodeLength(i) && (o.setStart(i.parentNode, b.findNodeIndex(i) + 1), o.collapse(!0)), o.setEnd(t, b.getNodeLength(t)), r = [], new s(o).traverse(n), !r.length
                },
                wrapSelectedElements: function(e) {
                    function t(e, t) {
                        var n, i = b.getNodeLength(t);
                        if (e == i) return !0;
                        for (n = e; i > n; n++)
                            if (!b.insignificant(t.childNodes[n])) return !1;
                        return !0
                    }
                    for (var n = b.editableParent(e.startContainer), i = b.editableParent(e.endContainer); 0 === e.startOffset && e.startContainer != n;) e.setStart(e.startContainer.parentNode, b.findNodeIndex(e.startContainer));
                    for (; t(e.endOffset, e.endContainer) && e.endContainer != i;) e.setEnd(e.endContainer.parentNode, b.findNodeIndex(e.endContainer) + 1);
                    return e
                },
                expand: function(e) {
                    var t, n, i, r, o = e.cloneRange(),
                        a = o.startContainer.childNodes[0 === o.startOffset ? 0 : o.startOffset - 1],
                        s = o.endContainer.childNodes[o.endOffset];
                    return y(a) && y(s) ? (t = a.nodeValue, n = s.nodeValue, t && n ? (i = t.split("").reverse().join("").search(h), r = n.search(h), i && r ? (r = -1 == r ? n.length : r, i = -1 == i ? 0 : t.length - i, o.setStart(a, i), o.setEnd(s, r), o) : o) : o) : o
                },
                isExpandable: function(e) {
                    var t, n, i, r, o, a, s = e.startContainer,
                        l = f.documentFromRange(e);
                    return s == l || s == l.body ? !1 : (t = e.cloneRange(), (n = s.nodeValue) ? (i = n.substring(0, t.startOffset), r = n.substring(t.startOffset), o = 0, a = 0, i && (o = i.split("").reverse().join("").search(h)), r && (a = r.search(h)), o && a) : !1)
                }
            }, g(v, {
                SelectionUtils: S,
                W3CRange: T,
                RangeIterator: s,
                W3CSelection: l,
                RangeEnumerator: c,
                RestorePoint: d,
                Marker: u,
                RangeUtils: f
            })
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/system.min", ["editor/range.min"], e)
    }(function() {
        ! function(e) {
            function t(e, t) {
                var n = e.selectionRestorePoint = new d(e.getRange()),
                    i = new p(t, n);
                return i.editor = e, e.undoRedoStack.push(i), n
            }
            var n = window.kendo,
                i = n.Class,
                r = n.ui.editor,
                o = r.EditorUtils,
                a = o.registerTool,
                s = r.Dom,
                l = r.Tool,
                c = r.ToolTemplate,
                d = r.RestorePoint,
                u = r.Marker,
                h = e.extend,
                f = i.extend({
                    init: function(e) {
                        this.options = e, this.restorePoint = new d(e.range), this.marker = new u, this.formatter = e.formatter
                    },
                    getRange: function() {
                        return this.restorePoint.toRange()
                    },
                    lockRange: function(e) {
                        return this.marker.add(this.getRange(), e)
                    },
                    releaseRange: function(e) {
                        this.marker.remove(e), this.editor.selectRange(e)
                    },
                    undo: function() {
                        var e = this.restorePoint;
                        e.restoreHtml(), this.editor.selectRange(e.toRange())
                    },
                    redo: function() {
                        this.exec()
                    },
                    createDialog: function(t, i) {
                        var r = this.editor;
                        return e(t).appendTo(document.body).kendoWindow(h({}, r.options.dialogOptions, i)).closest(".k-window").toggleClass("k-rtl", n.support.isRtl(r.wrapper)).end()
                    },
                    exec: function() {
                        var e = this.lockRange(!0);
                        this.formatter.editor = this.editor, this.formatter.toggle(e), this.releaseRange(e)
                    }
                }),
                p = i.extend({
                    init: function(e, t) {
                        this.body = e.body, this.startRestorePoint = e, this.endRestorePoint = t
                    },
                    redo: function() {
                        this.body.innerHTML = this.endRestorePoint.html, this.editor.selectRange(this.endRestorePoint.toRange())
                    },
                    undo: function() {
                        this.body.innerHTML = this.startRestorePoint.html, this.editor.selectRange(this.startRestorePoint.toRange())
                    }
                }),
                m = f.extend({
                    init: function(e) {
                        f.fn.init.call(this, e), this.managesUndoRedo = !0
                    },
                    exec: function() {
                        var e, t = this.editor,
                            n = this.options,
                            i = n.range,
                            r = t.body,
                            o = new d(i, r),
                            a = n.html || n.value || "";
                        t.selectRange(i), t.clipboard.paste(a, n), n.postProcess && n.postProcess(t, t.getRange()), e = new p(o, new d(t.getRange(), r)), e.editor = t, t.undoRedoStack.push(e), t.focus()
                    }
                }),
                g = l.extend({
                    initialize: function(e, t) {
                        var n = t.editor,
                            i = this.options,
                            o = i.items ? i.items : n.options.insertHtml;
                        this._selectBox = new r.SelectBox(e, {
                            dataSource: o,
                            dataTextField: "text",
                            dataValueField: "value",
                            change: function() {
                                l.exec(n, "insertHtml", this.value())
                            },
                            title: n.options.messages.insertHtml,
                            highlightFirst: !1
                        })
                    },
                    command: function(e) {
                        return new m(e)
                    },
                    update: function(e) {
                        var t = e.data("kendoSelectBox") || e.find("select").data("kendoSelectBox");
                        t.close(), t.value(t.options.title)
                    }
                }),
                v = i.extend({
                    init: function(e) {
                        this.editor = e
                    },
                    keydown: function(n) {
                        var i, r = this,
                            o = r.editor,
                            a = o.keyboard,
                            s = a.isTypingKey(n),
                            l = h(e.Event(), n);
                        return r.editor.trigger("keydown", l), l.isDefaultPrevented() ? (n.preventDefault(), !0) : l.isDefaultPrevented() || !s || a.isTypingInProgress() ? !1 : (i = o.getRange(), r.startRestorePoint = new d(i), a.startTyping(function() {
                            r.endRestorePoint = t(o, r.startRestorePoint)
                        }), !0)
                    },
                    keyup: function(e) {
                        var t = this.editor.keyboard;
                        return this.editor.trigger("keyup", e), t.isTypingInProgress() ? (t.endTyping(), !0) : !1
                    }
                }),
                _ = i.extend({
                    init: function(e) {
                        this.editor = e
                    },
                    _addCaret: function(e) {
                        var t = s.create(this.editor.document, "a");
                        return s.insertAt(e, t, 0), t
                    },
                    _restoreCaret: function(e) {
                        var t = this.editor.createRange();
                        t.setStartAfter(e), t.collapse(!0), this.editor.selectRange(t), s.remove(e)
                    },
                    _handleDelete: function(e) {
                        var t, n, i = e.endContainer,
                            o = s.closestEditableOfType(i, s.blockElements);
                        return o && r.RangeUtils.isEndOf(e, o) ? (t = s.next(o), t && "p" == s.name(t) ? (n = this._addCaret(t), this._merge(o, t), this._restoreCaret(n), !0) : !1) : !1
                    },
                    _cleanBomBefore: function(e) {
                        for (var t = e.startOffset, n = e.startContainer, i = n.nodeValue, r = 0; t - r >= 0 && "\ufeff" == i[t - r - 1];) r++;
                        r > 0 && (n.deleteData(t - r, r), e.setStart(n, Math.max(0, t - r)), e.collapse(!0), this.editor.selectRange(e))
                    },
                    _handleBackspace: function(e) {
                        var t, n, i, o, a = e.startContainer,
                            l = s.closestEditableOfType(a, ["li"]),
                            c = s.closestEditableOfType(a, "p,h1,h2,h3,h4,h5,h6".split(","));
                        return s.isDataNode(a) && this._cleanBomBefore(e), c && c.previousSibling && r.RangeUtils.isStartOf(e, c) ? (t = c.previousSibling, n = this._addCaret(c), this._merge(t, c), this._restoreCaret(n), !0) : l && r.RangeUtils.isStartOf(e, l) ? (i = l.firstChild, i || (l.innerHTML = r.emptyElementContent, i = l.firstChild), o = new r.ListFormatter(s.name(l.parentNode), "p"), e.selectNodeContents(l), o.toggle(e), s.insignificant(i) ? e.setStartBefore(i) : e.setStart(i, 0), this.editor.selectRange(e), !0) : !1
                    },
                    _handleSelection: function(t) {
                        var n, i, o, a = t.commonAncestorContainer,
                            l = s.closest(a, "table"),
                            c = r.emptyElementContent;
                        return /t(able|body)/i.test(s.name(a)) && t.selectNode(l), n = new u, n.add(t, !1), t.setStartAfter(n.start), t.setEndBefore(n.end), i = t.startContainer, o = t.endContainer, t.deleteContents(), l && "" === e(l).text() && (t.selectNode(l), t.deleteContents()), a = t.commonAncestorContainer, "p" === s.name(a) && "" === a.innerHTML && (a.innerHTML = c, t.setStart(a, 0)), this._join(i, o), s.insertAfter(this.editor.document.createTextNode("\ufeff"), n.start), n.remove(t), i = t.startContainer, "tr" == s.name(i) && (i = i.childNodes[Math.max(0, t.startOffset - 1)], t.setStart(i, s.getNodeLength(i))), t.collapse(!0), this.editor.selectRange(t), !0
                    },
                    _root: function(e) {
                        for (; e && e.parentNode && "body" != s.name(e.parentNode);) e = e.parentNode;
                        return e
                    },
                    _join: function(e, t) {
                        e = this._root(e), t = this._root(t), e != t && s.is(t, "p") && this._merge(e, t)
                    },
                    _merge: function(e, t) {
                        for (s.removeTrailingBreak(e); t.firstChild;) 1 == e.nodeType ? e.appendChild(t.firstChild) : e.parentNode.appendChild(t.firstChild);
                        s.remove(t)
                    },
                    keydown: function(e) {
                        var i, r, o = this.editor.getRange(),
                            a = e.keyCode,
                            s = n.keys,
                            l = a === s.BACKSPACE,
                            c = a == s.DELETE;
                        !l && !c || o.collapsed ? l ? i = "_handleBackspace" : c && (i = "_handleDelete") : i = "_handleSelection", i && (r = new d(o), this[i](o) && (e.preventDefault(), t(this.editor, r)))
                    },
                    keyup: e.noop
                }),
                b = i.extend({
                    init: function(e) {
                        this.editor = e, this.systemCommandIsInProgress = !1
                    },
                    createUndoCommand: function() {
                        this.startRestorePoint = this.endRestorePoint = t(this.editor, this.startRestorePoint)
                    },
                    changed: function() {
                        return this.startRestorePoint ? this.startRestorePoint.html != this.editor.body.innerHTML : !1
                    },
                    keydown: function(e) {
                        var t = this,
                            n = t.editor,
                            i = n.keyboard;
                        return i.isModifierKey(e) ? (i.isTypingInProgress() && i.endTyping(!0), t.startRestorePoint = new d(n.getRange()), !0) : i.isSystem(e) ? (t.systemCommandIsInProgress = !0, t.changed() && (t.systemCommandIsInProgress = !1, t.createUndoCommand()), !0) : !1
                    },
                    keyup: function() {
                        var e = this;
                        return e.systemCommandIsInProgress && e.changed() ? (e.systemCommandIsInProgress = !1, e.createUndoCommand(), !0) : !1
                    }
                }),
                w = i.extend({
                    init: function(e) {
                        this.handlers = e, this.typingInProgress = !1
                    },
                    isCharacter: function(e) {
                        return e >= 48 && 90 >= e || e >= 96 && 111 >= e || e >= 186 && 192 >= e || e >= 219 && 222 >= e || 229 == e
                    },
                    toolFromShortcut: function(t, n) {
                        var i, r, o = String.fromCharCode(n.keyCode);
                        for (i in t)
                            if (r = e.extend({
                                ctrl: !1,
                                alt: !1,
                                shift: !1
                            }, t[i].options), (r.key == o || r.key == n.keyCode) && r.ctrl == n.ctrlKey && r.alt == n.altKey && r.shift == n.shiftKey) return i
                    },
                    isTypingKey: function(e) {
                        var t = e.keyCode;
                        return this.isCharacter(t) && !e.ctrlKey && !e.altKey || 32 == t || 13 == t || 8 == t || 46 == t && !e.shiftKey && !e.ctrlKey && !e.altKey
                    },
                    isModifierKey: function(e) {
                        var t = e.keyCode;
                        return 17 == t && !e.shiftKey && !e.altKey || 16 == t && !e.ctrlKey && !e.altKey || 18 == t && !e.ctrlKey && !e.shiftKey
                    },
                    isSystem: function(e) {
                        return 46 == e.keyCode && e.ctrlKey && !e.altKey && !e.shiftKey
                    },
                    startTyping: function(e) {
                        this.onEndTyping = e, this.typingInProgress = !0
                    },
                    stopTyping: function() {
                        this.typingInProgress && this.onEndTyping && this.onEndTyping(), this.typingInProgress = !1
                    },
                    endTyping: function(t) {
                        var n = this;
                        n.clearTimeout(), t ? n.stopTyping() : n.timeout = window.setTimeout(e.proxy(n.stopTyping, n), 1e3)
                    },
                    isTypingInProgress: function() {
                        return this.typingInProgress
                    },
                    clearTimeout: function() {
                        window.clearTimeout(this.timeout)
                    },
                    notify: function(e, t) {
                        var n, i = this.handlers;
                        for (n = 0; i.length > n && !i[n][t](e); n++);
                    },
                    keydown: function(e) {
                        this.notify(e, "keydown")
                    },
                    keyup: function(e) {
                        this.notify(e, "keyup")
                    }
                }),
                y = i.extend({
                    init: function(e) {
                        this.editor = e, this.cleaners = [new x, new C, new S, new T]
                    },
                    htmlToFragment: function(e) {
                        var t = this.editor,
                            n = t.document,
                            i = s.create(n, "div"),
                            r = n.createDocumentFragment();
                        for (i.innerHTML = e; i.firstChild;) r.appendChild(i.firstChild);
                        return r
                    },
                    isBlock: function(e) {
                        return /<(div|p|ul|ol|table|h[1-6])/i.test(e)
                    },
                    _startModification: function() {
                        var e, t, n = this.editor;
                        if (!this._inProgress) return this._inProgress = !0, e = n.getRange(), t = new d(e), s.persistScrollTop(n.document), {
                            range: e,
                            restorePoint: t
                        }
                    },
                    _endModification: function(e) {
                        t(this.editor, e.restorePoint), this.editor._selectionChange(), this._inProgress = !1
                    },
                    _contentModification: function(e, t) {
                        var n = this,
                            i = n.editor,
                            r = n._startModification();
                        r && (e.call(n, i, r.range), setTimeout(function() {
                            t.call(n, i, r.range), n._endModification(r)
                        }))
                    },
                    _removeBomNodes: function(e) {
                        var t, n = r.RangeUtils.textNodes(e);
                        for (t = 0; n.length > t; t++) n[t].nodeValue = s.stripBom(n[t].nodeValue)
                    },
                    _onBeforeCopy: function(e) {
                        var t = new u;
                        t.add(e), this._removeBomNodes(e), t.remove(e), this.editor.selectRange(e)
                    },
                    oncopy: function() {
                        this._onBeforeCopy(this.editor.getRange())
                    },
                    oncut: function() {
                        this._onBeforeCopy(this.editor.getRange()), this._contentModification(e.noop, e.noop)
                    },
                    _fileToDataURL: function(t) {
                        var n = e.Deferred(),
                            i = new FileReader;
                        return t instanceof window.File || !t.getAsFile || (t = t.getAsFile()), i.onload = e.proxy(n.resolve, n), i.readAsDataURL(t), n.promise()
                    },
                    _triggerPaste: function(e, t) {
                        var n = {
                            html: e || ""
                        };
                        n.html = n.html.replace(/\ufeff/g, ""), this.editor.trigger("paste", n), this.paste(n.html, t || {})
                    },
                    _handleImagePaste: function(t) {
                        var n, i, r, o, a;
                        if ("FileReader" in window && (n = t.clipboardData || t.originalEvent.clipboardData || window.clipboardData || {}, i = n.items || n.files, i && (r = e.grep(i, function(e) {
                            return /^image\//i.test(e.type)
                        }), o = e.grep(i, function(e) {
                            return /^text\/html/i.test(e.type)
                        }), !o.length && r.length && (a = this._startModification())))) return e.when.apply(e, e.map(r, this._fileToDataURL)).done(e.proxy(function() {
                            var t = Array.prototype.slice.call(arguments),
                                n = e.map(t, function(e) {
                                    return '<img src="' + e.target.result + '" />'
                                }).join("");
                            this._triggerPaste(n), this._endModification(a)
                        }, this)), !0
                    },
                    onpaste: function(t) {
                        return this._handleImagePaste(t) ? void t.preventDefault() : void this._contentModification(function(i, r) {
                            var o, a, l, c = s.create(i.document, "div", {
                                    className: "k-paste-container",
                                    innerHTML: "\ufeff"
                                }),
                                d = n.support.browser;
                            i.body.appendChild(c), d.msie && 11 > d.version ? (t.preventDefault(), o = i.createRange(), o.selectNodeContents(c), i.selectRange(o), a = i.document.body.createTextRange(), a.moveToElementText(c), e(i.body).unbind("paste"), a.execCommand("Paste"), e(i.body).bind("paste", e.proxy(this.onpaste, this))) : (l = i.createRange(), l.selectNodeContents(c), i.selectRange(l)), r.deleteContents()
                        }, function(t, n) {
                            var i, r = "";
                            t.selectRange(n), i = e(t.body).children(".k-paste-container"), i.each(function() {
                                var e = this.lastChild;
                                e && s.is(e, "br") && s.remove(e), r += this.innerHTML
                            }), i.remove(), this._triggerPaste(r, {
                                clean: !0
                            })
                        })
                    },
                    splittableParent: function(e, t) {
                        var n, i;
                        if (e) return s.closestEditableOfType(t, ["p", "ul", "ol"]) || t.parentNode;
                        if (n = t.parentNode, i = t.ownerDocument.body, s.isInline(n))
                            for (; n.parentNode != i && !s.isBlock(n.parentNode);) n = n.parentNode;
                        return n
                    },
                    paste: function(t, n) {
                        var i, o, a, l, c, d, f, p, m, g, v, _, b = this.editor;
                        for (n = h({
                            clean: !1,
                            split: !0
                        }, n), i = 0, o = this.cleaners.length; o > i; i++) this.cleaners[i].applicable(t) && (t = this.cleaners[i].clean(t));
                        if (n.clean && (t = t.replace(/(<br>(\s|&nbsp;)*)+(<\/?(div|p|li|col|t))/gi, "$3"), t = t.replace(/<(a|span)[^>]*><\/\1>/gi, "")), t = t.replace(/^<li/i, "<ul><li").replace(/li>$/g, "li></ul>"), a = this.isBlock(t), b.focus(), l = b.getRange(), l.deleteContents(), l.startContainer == b.document && l.selectNodeContents(b.body), c = new u, d = c.addCaret(l), f = this.splittableParent(a, d), p = !1, m = f != b.body && !s.is(f, "td"), n.split && m && (a || s.isInline(f)) && (l.selectNode(d), r.RangeUtils.split(l, f, !0), p = !0), g = this.htmlToFragment(t), g.firstChild && "k-paste-container" === g.firstChild.className) {
                            for (v = [], i = 0, o = g.childNodes.length; o > i; i++) v.push(g.childNodes[i].innerHTML);
                            g = this.htmlToFragment(v.join("<br />"))
                        }
                        if (e(g.childNodes).filter("table").addClass("k-table").end().find("table").addClass("k-table"), l.insertNode(g), f = this.splittableParent(a, d), p) {
                            for (; d.parentNode != f;) s.unwrap(d.parentNode);
                            s.unwrap(d.parentNode)
                        }
                        s.normalize(l.commonAncestorContainer), d.style.display = "inline", s.restoreScrollTop(b.document), s.scrollTo(d), c.removeCaret(l), _ = l.commonAncestorContainer.parentNode, l.collapsed && "tbody" == s.name(_) && (l.setStartAfter(e(_).closest("table")[0]), l.collapse(!0)), b.selectRange(l)
                    }
                }),
                k = i.extend({
                    clean: function(e) {
                        var t, n, i = this,
                            r = i.replacements;
                        for (t = 0, n = r.length; n > t; t += 2) e = e.replace(r[t], r[t + 1]);
                        return e
                    }
                }),
                x = k.extend({
                    init: function() {
                        this.replacements = [/<(\/?)script([^>]*)>/i, "<$1telerik:script$2>"]
                    },
                    applicable: function(e) {
                        return /<script[^>]*>/i.test(e)
                    }
                }),
                C = k.extend({
                    init: function() {
                        var e = " ";
                        this.replacements = [/<span\s+class="Apple-tab-span"[^>]*>\s*<\/span>/gi, e, /\t/gi, e, /&nbsp;&nbsp; &nbsp;/gi, e]
                    },
                    applicable: function(e) {
                        return /&nbsp;&nbsp; &nbsp;|class="?Apple-tab-span/i.test(e)
                    }
                }),
                S = k.extend({
                    init: function() {
                        this.replacements = [/<\?xml[^>]*>/gi, "", /<!--(.|\n)*?-->/g, "", /&quot;/g, "'", /(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(h[1-6]|hr|p|div|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|address|pre|form|blockquote|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g, "$1", /<br><br>/g, "<BR><BR>", /<br>(?!\n)/g, " ", /<table([^>]*)>(\s|&nbsp;)+<t/gi, "<table$1><t", /<tr[^>]*>(\s|&nbsp;)*<\/tr>/gi, "", /<tbody[^>]*>(\s|&nbsp;)*<\/tbody>/gi, "", /<table[^>]*>(\s|&nbsp;)*<\/table>/gi, "", /<BR><BR>/g, "<br>", /^\s*(&nbsp;)+/gi, "", /(&nbsp;|<br[^>]*>)+\s*$/gi, "", /mso-[^;"]*;?/gi, "", /<(\/?)b(\s[^>]*)?>/gi, "<$1strong$2>", /<(\/?)font(\s[^>]*)?>/gi, this.convertFontMatch, /<(\/?)i(\s[^>]*)?>/gi, "<$1em$2>", /<o:p>&nbsp;<\/o:p>/gi, "&nbsp;", /<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi, "", /<\/o>/g, "", /style=(["|'])\s*\1/g, "", /(<br[^>]*>)?\n/g, function(e, t) {
                            return t ? e : " "
                        }]
                    },
                    convertFontMatch: function(e, t, n) {
                        var i = /face=['"]([^'"]+)['"]/i,
                            r = i.exec(n),
                            o = n && r && r[1];
                        return t ? "</span>" : o ? '<span style="font-family:' + o + '">' : "<span>"
                    },
                    applicable: function(e) {
                        return /class="?Mso/i.test(e) || /style="[^"]*mso-/i.test(e) || /urn:schemas-microsoft-com:office/.test(e)
                    },
                    stripEmptyAnchors: function(e) {
                        return e.replace(/<a([^>]*)>\s*<\/a>/gi, function(e, t) {
                            return !t || t.indexOf("href") < 0 ? "" : e
                        })
                    },
                    listType: function(e) {
                        var t;
                        return /^(<span [^>]*texhtml[^>]*>)?<span [^>]*(Symbol|Wingdings)[^>]*>/i.test(e) && (t = !0), e = e.replace(/<\/?\w+[^>]*>/g, "").replace(/&nbsp;/g, " "), !t && /^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(e) || t && /^.\u00a0+/.test(e) ? "ul" : /^\s*\w+[\.\)]\u00a0{2,}/.test(e) ? "ol" : void 0
                    },
                    _convertToLi: function(e) {
                        var t;
                        return 1 == e.childNodes.length ? t = e.firstChild.innerHTML.replace(/^\w+[\.\)](&nbsp;)+ /, "") : (s.remove(e.firstChild), 3 == e.firstChild.nodeType && /^[ivx]+\.$/i.test(e.firstChild.nodeValue) && s.remove(e.firstChild), /^(&nbsp;|\s)+$/i.test(e.firstChild.innerHTML) && s.remove(e.firstChild), t = e.innerHTML), s.remove(e), s.create(document, "li", {
                            innerHTML: t
                        })
                    },
                    lists: function(t) {
                        var n, i, r, o, a, l, c, d, u, h = e(s.blockElements.join(","), t),
                            f = -1,
                            p = {
                                ul: {},
                                ol: {}
                            },
                            m = t;
                        for (r = 0; h.length > r; r++)
                            if (o = h[r], a = this.listType(o.innerHTML), i = s.name(o), "td" != i)
                                if (a && "p" == i) {
                                    if (l = parseFloat(o.style.marginLeft || 0), c = p[a][l], (l > f || !c) && (c = s.create(document, a), m == t ? s.insertBefore(c, o) : m.appendChild(c), p[a][l] = c), n != a)
                                        for (d in p)
                                            for (u in p[d]) e.contains(c, p[d][u]) && delete p[d][u];
                                    m = this._convertToLi(o), c.appendChild(m), f = l, n = a
                                } else o.innerHTML ? (p = {
                                    ul: {},
                                    ol: {}
                                }, m = t, f = -1) : s.remove(o)
                    },
                    removeAttributes: function(e) {
                        for (var t = e.attributes, n = t.length; n--;) "colspan" != s.name(t[n]) && e.removeAttributeNode(t[n])
                    },
                    createColGroup: function(t) {
                        var i = t.cells,
                            r = e(t).closest("table"),
                            o = r.children("colgroup");
                        2 > i.length || (o.length && (i = o.children(), o[0].parentNode.removeChild(o[0])), o = e(e.map(i, function(e) {
                            var t = e.width;
                            return t && 0 !== parseInt(t, 10) ? n.format('<col style="width:{0}px;"/>', t) : "<col />"
                        }).join("")), o.is("colgroup") || (o = e("<colgroup/>").append(o)), o.prependTo(r))
                    },
                    convertHeaders: function(t) {
                        var n, i = t.cells,
                            r = e.map(i, function(t) {
                                var n = e(t).children("p").children("strong")[0];
                                return n && "strong" == s.name(n) ? n : void 0
                            });
                        if (r.length == i.length) {
                            for (n = 0; r.length > n; n++) s.unwrap(r[n]);
                            for (e(t).closest("table").find("colgroup").after("<thead></thead>").end().find("thead").append(t), n = 0; i.length > n; n++) s.changeTag(i[n], "th")
                        }
                    },
                    removeParagraphs: function(t) {
                        var n, i, r, o, a;
                        for (n = 0; t.length > n; n++)
                            for (this.removeAttributes(t[n]), o = e(t[n]), a = o.children("p"), i = 0, r = a.length; r > i; i++) r - 1 > i && s.insertAfter(s.create(document, "br"), a[i]), s.unwrap(a[i])
                    },
                    removeDefaultColors: function(e) {
                        for (var t = 0; e.length > t; t++) /^\s*color:\s*[^;]*;?$/i.test(e[t].style.cssText) && s.unwrap(e[t])
                    },
                    tables: function(t) {
                        var n, i, r, o, a, s = e(t).find("table"),
                            l = this;
                        for (o = 0; s.length > o; o++) {
                            for (n = s[o].rows, r = i = n[0], a = 1; n.length > a; a++) n[a].cells.length > r.cells.length && (r = n[a]);
                            l.createColGroup(r), l.convertHeaders(i), l.removeAttributes(s[o]), l.removeParagraphs(s.eq(o).find("td,th")), l.removeDefaultColors(s.eq(o).find("span"))
                        }
                    },
                    headers: function(t) {
                        var n, i = e(t).find("p.MsoTitle");
                        for (n = 0; i.length > n; n++) s.changeTag(i[n], "h1")
                    },
                    clean: function(e) {
                        var t, n = this;
                        return e = k.fn.clean.call(n, e), e = n.stripEmptyAnchors(e), t = s.create(document, "div", {
                            innerHTML: e
                        }), n.headers(t), n.lists(t), n.tables(t), e = t.innerHTML.replace(/(<[^>]*)\s+class="?[^"\s>]*"?/gi, "$1")
                    }
                }),
                T = k.extend({
                    init: function() {
                        this.replacements = [/\s+class="Apple-style-span[^"]*"/gi, "", /<(div|p|h[1-6])\s+style="[^"]*"/gi, "<$1", /^<div>(.*)<\/div>$/, "$1"]
                    },
                    applicable: function(e) {
                        return /class="?Apple-style-span|style="[^"]*-webkit-nbsp-mode/i.test(e)
                    }
                }),
                D = f.extend({
                    init: function(e) {
                        f.fn.init.call(this, e), this.managesUndoRedo = !0
                    },
                    exec: function() {
                        var e = this.editor;
                        n.support.browser.msie ? e.document.execCommand("print", !1, null) : e.window.print && e.window.print()
                    }
                }),
                A = f.extend({
                    init: function(e) {
                        this.async = !0, f.fn.init.call(this, e)
                    },
                    exec: function() {
                        var e = this,
                            t = this.lockRange(!0);
                        this.editor.saveAsPDF().then(function() {
                            e.releaseRange(t)
                        })
                    }
                });
            h(r, {
                _finishUpdate: t,
                Command: f,
                GenericCommand: p,
                InsertHtmlCommand: m,
                InsertHtmlTool: g,
                TypingHandler: v,
                SystemHandler: b,
                BackspaceHandler: _,
                Keyboard: w,
                Clipboard: y,
                Cleaner: k,
                TabCleaner: C,
                MSWordFormatCleaner: S,
                WebkitFormatCleaner: T,
                PrintCommand: D,
                ExportPdfCommand: A
            }), a("insertHtml", new g({
                template: new c({
                    template: o.dropDownListTemplate,
                    title: "Insert HTML",
                    initialValue: "Insert HTML"
                })
            })), a("print", new l({
                command: D,
                template: new c({
                    template: o.buttonTemplate,
                    title: "Print"
                })
            })), a("pdf", new l({
                command: A,
                template: new c({
                    template: o.buttonTemplate,
                    title: "Export PDF"
                })
            }))
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/inlineformat.min", ["editor/system.min"], e)
    }(function() {
        ! function(e) {
            var t = window.kendo,
                n = t.Class,
                i = t.ui.editor,
                r = t.ui.Editor.fn.options.formats,
                o = i.EditorUtils,
                a = i.Tool,
                s = i.ToolTemplate,
                l = i.FormatTool,
                c = i.Dom,
                d = i.RangeUtils,
                u = e.extend,
                h = i.EditorUtils.registerTool,
                f = i.EditorUtils.registerFormat,
                p = "k-marker",
                m = n.extend({
                    init: function(e) {
                        this.format = e
                    },
                    numberOfSiblings: function(e) {
                        var t, n = 0,
                            i = 0,
                            r = 0,
                            o = e.parentNode;
                        for (t = o.firstChild; t; t = t.nextSibling) t != e && (t.className == p ? r++ : 3 == t.nodeType ? n++ : i++);
                        return r > 1 && o.firstChild.className == p && o.lastChild.className == p ? 0 : i + n
                    },
                    findSuitable: function(e, t) {
                        var n, i;
                        if (!t && this.numberOfSiblings(e) > 0) return null;
                        for (n = e.parentNode, i = this.format[0].tags; !c.ofType(n, i);) {
                            if (this.numberOfSiblings(n) > 0) return null;
                            n = n.parentNode
                        }
                        return n
                    },
                    findFormat: function(e) {
                        var t, n, i, r, o, a = this.format,
                            s = c.attrEquals;
                        for (t = 0, n = a.length; n > t; t++) {
                            if (i = e, r = a[t].tags, o = a[t].attr, i && c.ofType(i, r) && s(i, o)) return i;
                            for (; i;)
                                if (i = c.parentOfType(i, r), i && s(i, o)) return i
                        }
                        return null
                    },
                    isFormatted: function(e) {
                        var t, n;
                        for (t = 0, n = e.length; n > t; t++)
                            if (this.findFormat(e[t])) return !0;
                        return !1
                    }
                }),
                g = n.extend({
                    init: function(e, t) {
                        this.finder = new m(e), this.attributes = u({}, e[0].attr, t), this.tag = e[0].tags[0]
                    },
                    wrap: function(e) {
                        return c.wrap(e, c.create(e.ownerDocument, this.tag, this.attributes))
                    },
                    activate: function(e, t) {
                        this.finder.isFormatted(t) ? (this.split(e), this.remove(t)) : this.apply(t)
                    },
                    toggle: function(e) {
                        var t = d.textNodes(e);
                        t.length > 0 && this.activate(e, t)
                    },
                    apply: function(e) {
                        var t, n, i, r, o = [];
                        for (t = 0, n = e.length; n > t; t++) {
                            if (i = e[t], r = this.finder.findSuitable(i)) c.attr(r, this.attributes);
                            else {
                                for (; !c.isBlock(i.parentNode) && 1 == i.parentNode.childNodes.length;) i = i.parentNode;
                                r = this.wrap(i)
                            }
                            o.push(r)
                        }
                        this.consolidate(o)
                    },
                    remove: function(e) {
                        var t, n, i;
                        for (t = 0, n = e.length; n > t; t++) i = this.finder.findFormat(e[t]), i && (this.attributes && this.attributes.style ? (c.unstyle(i, this.attributes.style), i.style.cssText || i.attributes["class"] || c.unwrap(i)) : c.unwrap(i))
                    },
                    split: function(e) {
                        var t, n, i = d.textNodes(e),
                            r = i.length;
                        if (r > 0)
                            for (t = 0; r > t; t++) n = this.finder.findFormat(i[t]), n && d.split(e, n, !0)
                    },
                    consolidate: function(e) {
                        for (var t, n; e.length > 1;)
                            if (t = e.pop(), n = e[e.length - 1], t.previousSibling && t.previousSibling.className == p && n.appendChild(t.previousSibling), t.tagName == n.tagName && t.previousSibling == n && t.style.cssText == n.style.cssText) {
                                for (; t.firstChild;) n.appendChild(t.firstChild);
                                c.remove(t)
                            }
                    }
                }),
                v = m.extend({
                    init: function(e, t) {
                        this.format = e, this.greedyProperty = t, m.fn.init.call(this, e)
                    },
                    getInlineCssValue: function(t) {
                        var n, i, r, o, a, s, l, d, u, h, f, p, m = t.attributes,
                            g = e.trim;
                        if (m)
                            for (n = 0, i = m.length; i > n; n++)
                                if (r = m[n], o = r.nodeName, a = r.nodeValue, r.specified && "style" == o)
                                    for (s = g(a || t.style.cssText).split(";"), d = 0, u = s.length; u > d; d++)
                                        if (l = s[d], l.length) {
                                            if (h = l.split(":"), f = g(h[0].toLowerCase()), p = g(h[1]), f != this.greedyProperty) continue;
                                            return f.indexOf("color") >= 0 ? c.toHex(p) : p
                                        }
                    },
                    getFormatInner: function(t) {
                        var n, i, r, o = e(c.isDataNode(t) ? t.parentNode : t),
                            a = o.parentsUntil("[contentEditable]").addBack().toArray().reverse();
                        for (n = 0, i = a.length; i > n; n++)
                            if (r = "className" == this.greedyProperty ? a[n].className : this.getInlineCssValue(a[n])) return r;
                        return "inherit"
                    },
                    getFormat: function(e) {
                        var t, n, i = this.getFormatInner(e[0]);
                        for (t = 1, n = e.length; n > t; t++)
                            if (i != this.getFormatInner(e[t])) return "";
                        return i
                    },
                    isFormatted: function(e) {
                        return "" !== this.getFormat(e)
                    }
                }),
                _ = g.extend({
                    init: function(e, n, i) {
                        g.fn.init.call(this, e, n), this.values = n, this.finder = new v(e, i), i && (this.greedyProperty = t.toCamelCase(i))
                    },
                    activate: function(e, t) {
                        var n = this.greedyProperty,
                            i = "apply";
                        this.split(e), n && "inherit" == this.values.style[n] && (i = "remove"), this[i](t)
                    }
                }),
                b = l.extend({
                    init: function(e) {
                        l.fn.init.call(this, u(e, {
                            finder: new m(e.format),
                            formatter: function() {
                                return new g(e.format)
                            }
                        }))
                    }
                }),
                w = a.extend({
                    update: function(e, t) {
                        var n = e.data(this.type);
                        n.close(), n.value(this.finder.getFormat(t))
                    }
                }),
                y = w.extend({
                    init: function(e) {
                        a.fn.init.call(this, e), this.type = t.support.browser.msie || t.support.touch ? "kendoDropDownList" : "kendoComboBox", this.format = [{
                            tags: ["span"]
                        }], this.finder = new v(this.format, e.cssAttr)
                    },
                    command: function(e) {
                        var t = this.options,
                            n = this.format,
                            r = {};
                        return new i.FormatCommand(u(e, {
                            formatter: function() {
                                return r[t.domAttr] = e.value, new _(n, {
                                    style: r
                                }, t.cssAttr)
                            }
                        }))
                    },
                    initialize: function(e, t) {
                        var n, i = t.editor,
                            r = this.options,
                            o = r.name,
                            s = [];
                        r.defaultValue && (s = [{
                            text: i.options.messages[r.defaultValue[0].text],
                            value: r.defaultValue[0].value
                        }]), n = s.concat(r.items ? r.items : i.options[o] || []), e.attr({
                            title: t.title
                        }), e[this.type]({
                            dataTextField: "text",
                            dataValueField: "value",
                            dataSource: n,
                            change: function() {
                                a.exec(i, o, this.value())
                            },
                            highlightFirst: !1
                        }), e.closest(".k-widget").removeClass("k-" + o).find("*").addBack().attr("unselectable", "on"), e.data(this.type).value("inherit")
                    }
                }),
                k = a.extend({
                    init: function(e) {
                        a.fn.init.call(this, e), this.format = [{
                            tags: ["span"]
                        }], this.finder = new v(this.format, e.cssAttr)
                    },
                    options: {
                        palette: "websafe"
                    },
                    update: function() {
                        this._widget.close()
                    },
                    command: function(e) {
                        var t = this.options,
                            n = this.format,
                            r = {};
                        return new i.FormatCommand(u(e, {
                            formatter: function() {
                                return r[t.domAttr] = e.value, new _(n, {
                                    style: r
                                }, t.cssAttr)
                            }
                        }))
                    },
                    initialize: function(e, n) {
                        var i = n.editor,
                            r = this.name,
                            o = u({}, k.fn.options, this.options),
                            s = o.palette;
                        e = this._widget = new t.ui.ColorPicker(e, {
                            toolIcon: "k-" + o.name,
                            palette: s,
                            change: function() {
                                var t = e.value();
                                t && a.exec(i, r, t), i.focus()
                            },
                            activate: function(t) {
                                t.preventDefault(), e.trigger("change")
                            }
                        }), e.wrapper.attr({
                            title: n.title,
                            unselectable: "on"
                        }).find("*").attr("unselectable", "on")
                    }
                });
            u(i, {
                InlineFormatFinder: m,
                InlineFormatter: g,
                DelayedExecutionTool: w,
                GreedyInlineFormatFinder: v,
                GreedyInlineFormatter: _,
                InlineFormatTool: b,
                FontTool: y,
                ColorTool: k
            }), f("bold", [{
                tags: ["strong", "b"]
            }, {
                tags: ["span"],
                attr: {
                    style: {
                        fontWeight: "bold"
                    }
                }
            }]), h("bold", new b({
                key: "B",
                ctrl: !0,
                format: r.bold,
                template: new s({
                    template: o.buttonTemplate,
                    title: "Bold"
                })
            })), f("italic", [{
                tags: ["em", "i"]
            }, {
                tags: ["span"],
                attr: {
                    style: {
                        fontStyle: "italic"
                    }
                }
            }]), h("italic", new b({
                key: "I",
                ctrl: !0,
                format: r.italic,
                template: new s({
                    template: o.buttonTemplate,
                    title: "Italic"
                })
            })), f("underline", [{
                tags: ["span"],
                attr: {
                    style: {
                        textDecoration: "underline"
                    }
                }
            }, {
                tags: ["u"]
            }]), h("underline", new b({
                key: "U",
                ctrl: !0,
                format: r.underline,
                template: new s({
                    template: o.buttonTemplate,
                    title: "Underline"
                })
            })), f("strikethrough", [{
                tags: ["del", "strike"]
            }, {
                tags: ["span"],
                attr: {
                    style: {
                        textDecoration: "line-through"
                    }
                }
            }]), h("strikethrough", new b({
                format: r.strikethrough,
                template: new s({
                    template: o.buttonTemplate,
                    title: "Strikethrough"
                })
            })), f("superscript", [{
                tags: ["sup"]
            }]), h("superscript", new b({
                format: r.superscript,
                template: new s({
                    template: o.buttonTemplate,
                    title: "Superscript"
                })
            })), f("subscript", [{
                tags: ["sub"]
            }]), h("subscript", new b({
                format: r.subscript,
                template: new s({
                    template: o.buttonTemplate,
                    title: "Subscript"
                })
            })), h("foreColor", new k({
                cssAttr: "color",
                domAttr: "color",
                name: "foreColor",
                template: new s({
                    template: o.colorPickerTemplate,
                    title: "Color"
                })
            })), h("backColor", new k({
                cssAttr: "background-color",
                domAttr: "backgroundColor",
                name: "backColor",
                template: new s({
                    template: o.colorPickerTemplate,
                    title: "Background Color"
                })
            })), h("fontName", new y({
                cssAttr: "font-family",
                domAttr: "fontFamily",
                name: "fontName",
                defaultValue: [{
                    text: "fontNameInherit",
                    value: "inherit"
                }],
                template: new s({
                    template: o.comboBoxTemplate,
                    title: "Font Name"
                })
            })), h("fontSize", new y({
                cssAttr: "font-size",
                domAttr: "fontSize",
                name: "fontSize",
                defaultValue: [{
                    text: "fontSizeInherit",
                    value: "inherit"
                }],
                template: new s({
                    template: o.comboBoxTemplate,
                    title: "Font Size"
                })
            }))
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/formatblock.min", ["editor/inlineformat.min"], e)
    }(function() {
        ! function(e) {
            var t, n = window.kendo,
                i = n.Class,
                r = e.extend,
                o = n.ui.editor,
                a = n.ui.Editor.fn.options.formats,
                s = o.Dom,
                l = o.Command,
                c = o.ToolTemplate,
                d = o.FormatTool,
                u = o.EditorUtils,
                h = u.registerTool,
                f = u.registerFormat,
                p = o.RangeUtils,
                m = i.extend({
                    init: function(e) {
                        this.format = e
                    },
                    contains: function(e, t) {
                        var n, i, r;
                        for (n = 0, i = t.length; i > n; n++)
                            if (r = t[n], !r || !s.isAncestorOrSelf(e, r)) return !1;
                        return !0
                    },
                    findSuitable: function(t) {
                        var n, i, r, o, a = this.format,
                            l = [];
                        for (n = 0, i = t.length; i > n; n++) {
                            for (o = a.length - 1; o >= 0 && !(r = s.ofType(t[n], a[o].tags) ? t[n] : s.closestEditableOfType(t[n], a[o].tags)); o--);
                            if (!r || "true" === r.contentEditable) return [];
                            e.inArray(r, l) < 0 && l.push(r)
                        }
                        for (n = 0, i = l.length; i > n; n++)
                            if (this.contains(l[n], l)) return [l[n]];
                        return l
                    },
                    findFormat: function(e) {
                        var t, n, i, r, o, a = this.format,
                            l = s.editableParent(e);
                        for (t = 0, n = a.length; n > t; t++)
                            for (i = e, r = a[t].tags, o = a[t].attr; i && s.isAncestorOf(l, i);) {
                                if (s.ofType(i, r) && s.attrEquals(i, o)) return i;
                                i = i.parentNode
                            }
                        return null
                    },
                    getFormat: function(e) {
                        var t, n, i = this,
                            r = function(e) {
                                return i.findFormat(s.isDataNode(e) ? e.parentNode : e)
                            },
                            o = r(e[0]);
                        if (!o) return "";
                        for (t = 1, n = e.length; n > t; t++)
                            if (o != r(e[t])) return "";
                        return o.nodeName.toLowerCase()
                    },
                    isFormatted: function(e) {
                        for (var t = 0, n = e.length; n > t; t++)
                            if (!this.findFormat(e[t])) return !1;
                        return !0
                    }
                }),
                g = i.extend({
                    init: function(e, t) {
                        this.format = e, this.values = t, this.finder = new m(e)
                    },
                    wrap: function(e, t, n) {
                        var i, r, o, a, l, c = 1 == n.length ? s.blockParentOrBody(n[0]) : s.commonAncestor.apply(null, n);
                        for (s.isInline(c) && (c = s.blockParentOrBody(c)), i = s.significantChildNodes(c), r = s.findNodeIndex(i[0]), o = s.create(c.ownerDocument, e, t), a = 0; i.length > a; a++) l = i[a], s.isBlock(l) ? (s.attr(l, t), o.childNodes.length && (s.insertBefore(o, l), o = o.cloneNode(!1)), r = s.findNodeIndex(l) + 1) : o.appendChild(l);
                        o.firstChild && s.insertAt(c, o, r)
                    },
                    apply: function(t) {
                        function n(e) {
                            return r({}, e && e.attr, d)
                        }
                        var i, o, a, l, c, d = this.values,
                            h = s.filter("img", t),
                            f = u.formatByName("img", this.format),
                            p = n(f);
                        if (e.each(h, function() {
                            s.attr(this, p)
                        }), h.length != t.length)
                            if (o = s.filter("img", t, !0), a = this.finder.findSuitable(o), a.length)
                                for (l = 0, c = a.length; c > l; l++) i = u.formatByName(s.name(a[l]), this.format), s.attr(a[l], n(i));
                            else i = this.format[0], this.wrap(i.tags[0], n(i), o)
                    },
                    remove: function(e) {
                        var t, n, i, r, o;
                        for (t = 0, n = e.length; n > t; t++) i = this.finder.findFormat(e[t]), i && (o = s.name(i), "div" != o || i.getAttribute("class") ? (r = u.formatByName(o, this.format), r.attr.style && s.unstyle(i, r.attr.style), r.attr.className && s.removeClass(i, r.attr.className)) : s.unwrap(i))
                    },
                    toggle: function(e) {
                        var t = this,
                            n = p.nodes(e);
                        t.finder.isFormatted(n) ? t.remove(n) : t.apply(n)
                    }
                }),
                v = i.extend({
                    init: function(e, t) {
                        var n = this;
                        n.format = e, n.values = t, n.finder = new m(e)
                    },
                    apply: function(e) {
                        var t, n, i, r, a, l, c, d = this.format,
                            u = s.blockParents(e),
                            h = d[0].tags[0];
                        if (u.length)
                            for (t = 0, n = u.length; n > t; t++) c = s.name(u[t]), "li" == c ? (i = u[t].parentNode, r = new o.ListFormatter(i.nodeName.toLowerCase(), h), a = this.editor.createRange(), a.selectNode(u[t]), r.toggle(a)) : h && ("td" == c || u[t].attributes.contentEditable) ? new g(d, this.values).apply(u[t].childNodes) : (l = s.changeTag(u[t], h), s.attr(l, d[0].attr));
                        else new g(d, this.values).apply(e)
                    },
                    toggle: function(e) {
                        var t = p.textNodes(e);
                        t.length || (e.selectNodeContents(e.commonAncestorContainer), t = p.textNodes(e), t.length || (t = s.significantChildNodes(e.commonAncestorContainer))), this.apply(t)
                    }
                }),
                _ = l.extend({
                    init: function(e) {
                        e.formatter = e.formatter(), l.fn.init.call(this, e)
                    }
                }),
                b = d.extend({
                    init: function(e) {
                        d.fn.init.call(this, r(e, {
                            finder: new m(e.format),
                            formatter: function() {
                                return new g(e.format)
                            }
                        }))
                    }
                });
            r(o, {
                BlockFormatFinder: m,
                BlockFormatter: g,
                GreedyBlockFormatter: v,
                FormatCommand: _,
                BlockFormatTool: b
            }), t = ["ul", "ol", "li"], f("justifyLeft", [{
                tags: s.nonListBlockElements,
                attr: {
                    style: {
                        textAlign: "left"
                    }
                }
            }, {
                tags: ["img"],
                attr: {
                    style: {
                        "float": "left",
                        display: "",
                        marginLeft: "",
                        marginRight: ""
                    }
                }
            }, {
                tags: t,
                attr: {
                    style: {
                        textAlign: "left",
                        listStylePosition: ""
                    }
                }
            }]), h("justifyLeft", new b({
                format: a.justifyLeft,
                template: new c({
                    template: u.buttonTemplate,
                    title: "Justify Left"
                })
            })), f("justifyCenter", [{
                tags: s.nonListBlockElements,
                attr: {
                    style: {
                        textAlign: "center"
                    }
                }
            }, {
                tags: ["img"],
                attr: {
                    style: {
                        display: "block",
                        marginLeft: "auto",
                        marginRight: "auto",
                        "float": ""
                    }
                }
            }, {
                tags: t,
                attr: {
                    style: {
                        textAlign: "center",
                        listStylePosition: "inside"
                    }
                }
            }]), h("justifyCenter", new b({
                format: a.justifyCenter,
                template: new c({
                    template: u.buttonTemplate,
                    title: "Justify Center"
                })
            })), f("justifyRight", [{
                tags: s.nonListBlockElements,
                attr: {
                    style: {
                        textAlign: "right"
                    }
                }
            }, {
                tags: ["img"],
                attr: {
                    style: {
                        "float": "right",
                        display: "",
                        marginLeft: "",
                        marginRight: ""
                    }
                }
            }, {
                tags: t,
                attr: {
                    style: {
                        textAlign: "right",
                        listStylePosition: "inside"
                    }
                }
            }]), h("justifyRight", new b({
                format: a.justifyRight,
                template: new c({
                    template: u.buttonTemplate,
                    title: "Justify Right"
                })
            })), f("justifyFull", [{
                tags: s.nonListBlockElements,
                attr: {
                    style: {
                        textAlign: "justify"
                    }
                }
            }, {
                tags: ["img"],
                attr: {
                    style: {
                        display: "block",
                        marginLeft: "auto",
                        marginRight: "auto",
                        "float": ""
                    }
                }
            }, {
                tags: t,
                attr: {
                    style: {
                        textAlign: "justify",
                        listStylePosition: ""
                    }
                }
            }]), h("justifyFull", new b({
                format: a.justifyFull,
                template: new c({
                    template: u.buttonTemplate,
                    title: "Justify Full"
                })
            }))
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/linebreak.min", ["editor/formatblock.min"], e)
    }(function() {
        ! function(e) {
            var t = window.kendo,
                n = e.extend,
                i = t.ui.editor,
                r = i.Dom,
                o = i.Command,
                a = i.Tool,
                s = i.BlockFormatter,
                l = r.normalize,
                c = i.RangeUtils,
                d = i.EditorUtils.registerTool,
                u = o.extend({
                    init: function(e) {
                        this.options = e, o.fn.init.call(this, e)
                    },
                    _insertMarker: function(e, t) {
                        var n, i = r.create(e, "a");
                        return i.className = "k-marker", t.insertNode(i), i.parentNode || (n = t.commonAncestorContainer, n.innerHTML = "", n.appendChild(i)), l(i.parentNode), i
                    },
                    _moveFocus: function(e, t) {
                        if (r.isEmpty(t)) e.setStartBefore(t);
                        else {
                            e.selectNodeContents(t);
                            var n = c.textNodes(e)[0];
                            if (!n) {
                                for (; t.childNodes.length && !r.is(t.firstChild, "br");) t = t.firstChild;
                                n = t
                            }
                            r.isEmpty(n) ? e.setStartBefore(n) : (r.emptyNode(n) && (n.innerHTML = "\ufeff"), e.setStartBefore(n.firstChild || n))
                        }
                    },
                    shouldTrim: function(e) {
                        var t = "p,h1,h2,h3,h4,h5,h6".split(","),
                            n = r.parentOfType(e.startContainer, t),
                            i = r.parentOfType(e.endContainer, t);
                        return n && !i || !n && i
                    },
                    _blankAfter: function(e) {
                        for (; e && (r.isMarker(e) || "" === r.stripBom(e.nodeValue));) e = e.nextSibling;
                        return !e
                    },
                    exec: function() {
                        var e, t, n, o, a, d, u, h, f = this.getRange(),
                            p = c.documentFromRange(f),
                            m = i.emptyElementContent,
                            g = this.shouldTrim(f);
                        f.deleteContents(), a = this._insertMarker(p, f), d = r.closestEditableOfType(a, ["li"]), u = r.closestEditableOfType(a, "h1,h2,h3,h4,h5,h6".split(",")), d ? r.emptyNode(d) && (o = r.create(p, "p"), d.nextSibling && (h = f.cloneRange(), h.selectNode(d), c.split(h, d.parentNode)), r.insertAfter(o, d.parentNode), r.remove(1 == d.parentNode.childNodes.length ? d.parentNode : d), o.innerHTML = m, n = o) : u && this._blankAfter(a) && (o = r.create(p, "p"), r.insertAfter(o, u), o.innerHTML = m, r.remove(a), n = o), n || (d || u || new s([{
                            tags: ["p"]
                        }]).apply([a]), f.selectNode(a), e = r.parentOfType(a, [d ? "li" : u ? r.name(u) : "p"]), c.split(f, e, g), t = e.previousSibling, r.is(t, "li") && t.firstChild && !r.is(t.firstChild, "br") && (t = t.firstChild), n = e.nextSibling, this.clean(t), this.clean(n, {
                            links: !0
                        }), r.is(n, "li") && n.firstChild && !r.is(n.firstChild, "br") && (n = n.firstChild), r.remove(e), l(t)), l(n), this._moveFocus(f, n), f.collapse(!0), r.scrollTo(n), c.selectRange(f)
                    },
                    clean: function(t, n) {
                        var o, a = t;
                        if (t.firstChild && r.is(t.firstChild, "br") && r.remove(t.firstChild), r.isDataNode(t) && !t.nodeValue && (t = t.parentNode), t) {
                            for (o = !1; t.firstChild && 1 == t.firstChild.nodeType;) o = o || r.significantNodes(t.childNodes).length > 1, t = t.firstChild;
                            if (r.isEmpty(t) || !/^\s*$/.test(t.innerHTML) || o || (e(a).find(".k-br").remove(), t.innerHTML = i.emptyElementContent), n && n.links)
                                for (; t != a;) {
                                    if (r.is(t, "a") && r.emptyNode(t)) {
                                        r.unwrap(t);
                                        break
                                    }
                                    t = t.parentNode
                                }
                        }
                    }
                }),
                h = o.extend({
                    init: function(e) {
                        this.options = e, o.fn.init.call(this, e)
                    },
                    exec: function() {
                        var e, n = this.getRange(),
                            i = r.create(c.documentFromRange(n), "br"),
                            o = t.support.browser,
                            a = o.msie && 11 > o.version;
                        n.deleteContents(), n.insertNode(i), l(i.parentNode), a || i.nextSibling && !r.isWhitespace(i.nextSibling) || (e = i.cloneNode(!0), e.className = "k-br", r.insertAfter(e, i)), n.setStartAfter(i), n.collapse(!0), r.scrollTo(i.nextSibling || i), c.selectRange(n)
                    }
                });
            n(i, {
                ParagraphCommand: u,
                NewLineCommand: h
            }), d("insertLineBreak", new a({
                key: 13,
                shift: !0,
                command: h
            })), d("insertParagraph", new a({
                key: 13,
                command: u
            }))
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/lists.min", ["editor/linebreak.min"], e)
    }(function() {
        ! function(e) {
            var t = window.kendo,
                n = t.Class,
                i = e.extend,
                r = t.ui.editor,
                o = r.Dom,
                a = r.RangeUtils,
                s = r.EditorUtils,
                l = r.Command,
                c = r.ToolTemplate,
                d = r.FormatTool,
                u = r.BlockFormatFinder,
                h = a.textNodes,
                f = r.EditorUtils.registerTool,
                p = u.extend({
                    init: function(e) {
                        this.tag = e;
                        var t = this.tags = ["ul" == e ? "ol" : "ul", e];
                        u.fn.init.call(this, [{
                            tags: t
                        }])
                    },
                    isFormatted: function(e) {
                        var t, n, i = [];
                        for (n = 0; e.length > n; n++) t = this.findFormat(e[n]), t && o.name(t) == this.tag && i.push(t);
                        if (1 > i.length) return !1;
                        if (i.length != e.length) return !1;
                        for (n = 0; i.length > n && i[n].parentNode == t.parentNode; n++)
                            if (i[n] != t) return !1;
                        return !0
                    },
                    findSuitable: function(e) {
                        var t = this.findFormat(e[0]);
                        return t && o.name(t) == this.tag ? t : null
                    }
                }),
                m = n.extend({
                    init: function(e, t) {
                        var n = this;
                        n.finder = new p(e), n.tag = e, n.unwrapTag = t
                    },
                    isList: function(e) {
                        var t = o.name(e);
                        return "ul" == t || "ol" == t || "dl" == t
                    },
                    wrap: function(e, t) {
                        var n, i, r = o.create(e.ownerDocument, "li");
                        for (n = 0; t.length > n; n++)
                            if (i = t[n], o.is(i, "li")) e.appendChild(i);
                            else if (this.isList(i))
                                for (; i.firstChild;) e.appendChild(i.firstChild);
                            else if (o.is(i, "td")) {
                                for (; i.firstChild;) r.appendChild(i.firstChild);
                                e.appendChild(r), i.appendChild(e), e = e.cloneNode(!1), r = r.cloneNode(!1)
                            } else r.appendChild(i), o.isBlock(i) && (e.appendChild(r), o.unwrap(i), r = r.cloneNode(!1));
                        r.firstChild && e.appendChild(r)
                    },
                    containsAny: function(e, t) {
                        for (var n = 0; t.length > n; n++)
                            if (o.isAncestorOrSelf(e, t[n])) return !0;
                        return !1
                    },
                    suitable: function(e, t) {
                        if ("k-marker" == e.className) {
                            var n = e.nextSibling;
                            if (n && o.isBlock(n)) return !1;
                            if (n = e.previousSibling, n && o.isBlock(n)) return !1
                        }
                        return this.containsAny(e, t) || o.isInline(e) || 3 == e.nodeType
                    },
                    _parentLists: function(t) {
                        var n = o.closestEditable(t);
                        return e(t).parentsUntil(n, "ul,ol")
                    },
                    split: function(e) {
                        var t, n, i, r, s, l, c = h(e);
                        if (c.length)
                            for (t = o.parentOfType(c[0], ["li"]), n = o.parentOfType(c[c.length - 1], ["li"]), e.setStartBefore(t), e.setEndAfter(n), r = 0, s = c.length; s > r; r++) l = this.finder.findFormat(c[r]), l && (i = this._parentLists(l), i.length ? a.split(e, i.last()[0], !0) : a.split(e, l, !0))
                    },
                    merge: function(e, t) {
                        for (var n, i = t.previousSibling; i && ("k-marker" == i.className || 3 == i.nodeType && o.isWhitespace(i));) i = i.previousSibling;
                        if (i && o.name(i) == e) {
                            for (; t.firstChild;) i.appendChild(t.firstChild);
                            o.remove(t), t = i
                        }
                        for (n = t.nextSibling; n && ("k-marker" == n.className || 3 == n.nodeType && o.isWhitespace(n));) n = n.nextSibling;
                        if (n && o.name(n) == e) {
                            for (; t.lastChild;) n.insertBefore(t.lastChild, n.firstChild);
                            o.remove(t)
                        }
                    },
                    breakable: function(e) {
                        return e != e.ownerDocument.body && !/table|tbody|tr|td/.test(o.name(e)) && !e.attributes.contentEditable
                    },
                    applyOnSection: function(t, n) {
                        function i() {
                            u.push(this)
                        }
                        var r, a, s, l, c = this.tag,
                            d = o.closestSplittableParent(n),
                            u = [],
                            h = this.finder.findSuitable(n);
                        for (h || (h = new p("ul" == c ? "ol" : "ul").findSuitable(n)), /table|tbody/.test(o.name(d)) ? r = e.map(n, function(e) {
                            return o.parentOfType(e, ["td"])
                        }) : (r = o.significantChildNodes(d), e.grep(r, o.isBlock).length && (r = e.grep(r, e.proxy(function(e) {
                            return this.containsAny(e, n)
                        }, this))), r.length || (r = n)), a = 0; r.length > a; a++) s = r[a], l = (!h || !o.isAncestorOrSelf(h, s)) && this.suitable(s, n), l && (h && this.isList(s) ? (e.each(s.childNodes, i), o.remove(s)) : u.push(s));
                        u.length == r.length && this.breakable(d) && (u = [d]), h || (h = o.create(d.ownerDocument, c), o.insertBefore(h, u[0])), this.wrap(h, u), o.is(h, c) || o.changeTag(h, c), this.merge(c, h)
                    },
                    apply: function(e) {
                        var t, n, i, r = 0,
                            a = [];
                        do i = o.closestEditable(e[r], ["td", "body"]), t && i == t ? n.push(e[r]) : (t && a.push({
                            section: t,
                            nodes: n
                        }), n = [e[r]], t = i), r++; while (e.length > r);
                        for (a.push({
                            section: t,
                            nodes: n
                        }), r = 0; a.length > r; r++) this.applyOnSection(a[r].section, a[r].nodes)
                    },
                    unwrap: function(e) {
                        var t, n, i, r, a = e.ownerDocument.createDocumentFragment(),
                            s = this.unwrapTag;
                        for (n = e.firstChild; n; n = n.nextSibling) {
                            for (i = o.create(e.ownerDocument, s || "p"); n.firstChild;) r = n.firstChild, o.isBlock(r) ? (i.firstChild && (a.appendChild(i), i = o.create(e.ownerDocument, s || "p")), a.appendChild(r)) : i.appendChild(r);
                            i.firstChild && a.appendChild(i)
                        }
                        t = this._parentLists(e), t[0] ? (o.insertAfter(a, t.last()[0]), t.last().remove()) : o.insertAfter(a, e), o.remove(e)
                    },
                    remove: function(e) {
                        var t, n, i;
                        for (n = 0, i = e.length; i > n; n++) t = this.finder.findFormat(e[n]), t && this.unwrap(t)
                    },
                    toggle: function(e) {
                        var t, n = this,
                            i = h(e),
                            r = e.commonAncestorContainer;
                        i.length || (e.selectNodeContents(r), i = h(e), i.length || (t = r.ownerDocument.createTextNode(""), e.startContainer.appendChild(t), i = [t], e.selectNode(t.parentNode))), n.finder.isFormatted(i) ? (n.split(e), n.remove(i)) : n.apply(i)
                    }
                }),
                g = l.extend({
                    init: function(e) {
                        e.formatter = new m(e.tag), l.fn.init.call(this, e)
                    }
                }),
                v = d.extend({
                    init: function(e) {
                        this.options = e, d.fn.init.call(this, i(e, {
                            finder: new p(e.tag)
                        }))
                    },
                    command: function(e) {
                        return new g(i(e, {
                            tag: this.options.tag
                        }))
                    }
                });
            i(r, {
                ListFormatFinder: p,
                ListFormatter: m,
                ListCommand: g,
                ListTool: v
            }), f("insertUnorderedList", new v({
                tag: "ul",
                template: new c({
                    template: s.buttonTemplate,
                    title: "Insert unordered list"
                })
            })), f("insertOrderedList", new v({
                tag: "ol",
                template: new c({
                    template: s.buttonTemplate,
                    title: "Insert ordered list"
                })
            }))
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/link.min", ["editor/lists.min"], e)
    }(function() {
        ! function(e, t) {
            var n = window.kendo,
                i = n.Class,
                r = e.extend,
                o = e.proxy,
                a = n.ui.editor,
                s = a.Dom,
                l = a.RangeUtils,
                c = a.EditorUtils,
                d = a.Command,
                u = a.Tool,
                h = a.ToolTemplate,
                f = a.InlineFormatter,
                p = a.InlineFormatFinder,
                m = l.textNodes,
                g = a.EditorUtils.registerTool,
                v = i.extend({
                    findSuitable: function(e) {
                        return s.parentOfType(e, ["a"])
                    }
                }),
                _ = i.extend({
                    init: function() {
                        this.finder = new v
                    },
                    apply: function(e, t) {
                        var n, i, r, o, a, c, d, u = m(e);
                        if (t.innerHTML) {
                            for (i = l.documentFromRange(e), n = l.getMarkers(e), e.deleteContents(), o = s.create(i, "a", t), e.insertNode(o), a = o.parentNode, "a" == s.name(a) && s.insertAfter(o, a), s.emptyNode(a) && s.remove(a), c = o, d = 0; n.length > d; d++) s.insertAfter(n[d], c), c = n[d];
                            n.length && (s.insertBefore(i.createTextNode("\ufeff"), n[1]), s.insertAfter(i.createTextNode("\ufeff"), n[1]), e.setStartBefore(n[0]), e.setEndAfter(n[n.length - 1]))
                        } else r = new f([{
                            tags: ["a"]
                        }], t), r.finder = this.finder, r.apply(u)
                    }
                }),
                b = d.extend({
                    init: function(e) {
                        e.formatter = {
                            toggle: function(e) {
                                new f([{
                                    tags: ["a"]
                                }]).remove(m(e))
                            }
                        }, this.options = e, d.fn.init.call(this, e)
                    }
                }),
                w = d.extend({
                    init: function(e) {
                        this.options = e, d.fn.init.call(this, e), this.formatter = new _, e.url ? this.exec = function() {
                            this.formatter.apply(e.range, {
                                href: e.url,
                                innerHTML: e.text || e.url,
                                target: e.target
                            })
                        } : (this.attributes = null, this.async = !0)
                    },
                    _dialogTemplate: function() {
                        return n.template("<div class=\"k-editor-dialog k-popup-edit-form k-edit-form-container\"><div class='k-edit-label'><label for='k-editor-link-url'>#: messages.linkWebAddress #</label></div><div class='k-edit-field'><input type='text' class='k-input k-textbox' id='k-editor-link-url'></div><div class='k-edit-label k-editor-link-text-row'><label for='k-editor-link-text'>#: messages.linkText #</label></div><div class='k-edit-field k-editor-link-text-row'><input type='text' class='k-input k-textbox' id='k-editor-link-text'></div><div class='k-edit-label'><label for='k-editor-link-title'>#: messages.linkToolTip #</label></div><div class='k-edit-field'><input type='text' class='k-input k-textbox' id='k-editor-link-title'></div><div class='k-edit-label'></div><div class='k-edit-field'><input type='checkbox' class='k-checkbox' id='k-editor-link-target'><label for='k-editor-link-target' class='k-checkbox-label'>#: messages.linkOpenInNewWindow #</label></div><div class='k-edit-buttons k-state-default'><button class=\"k-dialog-insert k-button k-primary\">#: messages.dialogInsert #</button><button class=\"k-dialog-close k-button\">#: messages.dialogCancel #</button></div></div>")({
                            messages: this.editor.options.messages
                        })
                    },
                    exec: function() {
                        var t, n, i, r, a = this.editor.options.messages;
                        this._initialText = "", this._range = this.lockRange(!0), t = m(this._range), n = t.length ? this.formatter.finder.findSuitable(t[0]) : null, i = t.length && "img" == s.name(t[0]), r = this.createDialog(this._dialogTemplate(), {
                            title: a.createLink,
                            close: o(this._close, this),
                            visible: !1
                        }), n && (this._range.selectNodeContents(n), t = m(this._range)), this._initialText = this.linkText(t), r.find(".k-dialog-insert").click(o(this._apply, this)).end().find(".k-dialog-close").click(o(this._close, this)).end().find(".k-edit-field input").keydown(o(this._keydown, this)).end().find("#k-editor-link-url").val(this.linkUrl(n)).end().find("#k-editor-link-text").val(this._initialText).end().find("#k-editor-link-title").val(n ? n.title : "").end().find("#k-editor-link-target").attr("checked", n ? "_blank" == n.target : !1).end().find(".k-editor-link-text-row").toggle(!i), this._dialog = r.data("kendoWindow").center().open(), e("#k-editor-link-url", r).focus().select()
                    },
                    _keydown: function(e) {
                        var t = n.keys;
                        e.keyCode == t.ENTER ? this._apply(e) : e.keyCode == t.ESC && this._close(e)
                    },
                    _apply: function(t) {
                        var n, i, r, o = this._dialog.element,
                            a = e("#k-editor-link-url", o).val(),
                            l = e("#k-editor-link-text", o);
                        a && "http://" != a && (a.indexOf("@") > 0 && !/^(\w+:)|(\/\/)/i.test(a) && (a = "mailto:" + a), this.attributes = {
                            href: a
                        }, n = e("#k-editor-link-title", o).val(), n && (this.attributes.title = n), l.is(":visible") && (i = l.val(), i || this._initialText ? i && i !== this._initialText && (this.attributes.innerHTML = s.stripBom(i)) : this.attributes.innerHTML = a), r = e("#k-editor-link-target", o).is(":checked"), this.attributes.target = r ? "_blank" : null, this.formatter.apply(this._range, this.attributes)), this._close(t), this.change && this.change()
                    },
                    _close: function(e) {
                        e.preventDefault(), this._dialog.destroy(), s.windowFromDocument(l.documentFromRange(this._range)).focus(), this.releaseRange(this._range)
                    },
                    linkUrl: function(e) {
                        return e ? e.getAttribute("href", 2) : "http://"
                    },
                    linkText: function(e) {
                        var t, n = "";
                        for (t = 0; e.length > t; t++) n += e[t].nodeValue;
                        return s.stripBom(n || "")
                    },
                    redo: function() {
                        var e = this.lockRange(!0);
                        this.formatter.apply(e, this.attributes), this.releaseRange(e)
                    }
                }),
                y = u.extend({
                    init: function(t) {
                        this.options = t, this.finder = new p([{
                            tags: ["a"]
                        }]), u.fn.init.call(this, e.extend(t, {
                            command: b
                        }))
                    },
                    initialize: function(e, t) {
                        u.fn.initialize.call(this, e, t), e.addClass("k-state-disabled")
                    },
                    update: function(e, t) {
                        e.toggleClass("k-state-disabled", !this.finder.isFormatted(t)).removeClass("k-state-hover")
                    }
                });
            r(n.ui.editor, {
                LinkFormatFinder: v,
                LinkFormatter: _,
                UnlinkCommand: b,
                LinkCommand: w,
                UnlinkTool: y
            }), g("createLink", new u({
                key: "K",
                ctrl: !0,
                command: w,
                template: new h({
                    template: c.buttonTemplate,
                    title: "Create Link"
                })
            })), g("unlink", new y({
                key: "K",
                ctrl: !0,
                shift: !0,
                template: new h({
                    template: c.buttonTemplate,
                    title: "Remove Link"
                })
            }))
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/file.min", ["kendo.filebrowser.min", "editor/link.min"], e)
    }(function() {
        ! function(e, t) {
            var n = window.kendo,
                i = e.extend,
                r = n.ui.editor,
                o = r.EditorUtils,
                a = r.Dom,
                s = o.registerTool,
                l = r.ToolTemplate,
                c = r.RangeUtils,
                d = r.Command,
                u = r.LinkFormatter,
                h = c.textNodes,
                f = n.keys,
                p = "#k-editor-file-url",
                m = "#k-editor-file-title",
                g = d.extend({
                    init: function(e) {
                        var t = this;
                        d.fn.init.call(t, e), t.formatter = new u, t.async = !0, t.attributes = {}
                    },
                    insertFile: function(e, t) {
                        var n = this.attributes,
                            i = c.documentFromRange(t);
                        if (n.href && "http://" != n.href) {
                            if (!e) return e = a.create(i, "a", {
                                href: n.href
                            }), e.innerHTML = n.innerHTML, t.deleteContents(), t.insertNode(e), e.nextSibling || a.insertAfter(i.createTextNode("\ufeff"), e), t.setStartAfter(e), t.setEndAfter(e), c.selectRange(t), !0;
                            a.attr(e, n)
                        }
                        return !1
                    },
                    _dialogTemplate: function(e) {
                        return n.template('<div class="k-editor-dialog k-popup-edit-form k-edit-form-container"># if (showBrowser) { #<div class="k-filebrowser"></div># } #<div class=\'k-edit-label\'><label for="k-editor-file-url">#: messages.fileWebAddress #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-file-url"></div><div class=\'k-edit-label\'><label for="k-editor-file-title">#: messages.fileTitle #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-file-title"></div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #</button><button class="k-dialog-close k-button">#: messages.dialogCancel #</button></div></div>')({
                            messages: this.editor.options.messages,
                            showBrowser: e
                        })
                    },
                    redo: function() {
                        var e = this,
                            t = e.lockRange();
                        this.formatter.apply(t, this.attributes), e.releaseRange(t)
                    },
                    exec: function() {
                        function e(e) {
                            var t = s.element,
                                n = t.find(p).val().replace(/ /g, "%20"),
                                i = t.find(m).val();
                            l.attributes = {
                                href: n,
                                innerHTML: "" !== i ? i : n
                            }, g = l.insertFile(v, d), r(e), l.change && l.change()
                        }

                        function r(e) {
                            e.preventDefault(), s.destroy(), a.windowFromDocument(c.documentFromRange(d)).focus(), g || l.releaseRange(d)
                        }

                        function o(t) {
                            t.keyCode == f.ENTER ? e(t) : t.keyCode == f.ESC && r(t)
                        }
                        var s, l = this,
                            d = l.lockRange(),
                            u = h(d),
                            g = !1,
                            v = u.length ? this.formatter.finder.findSuitable(u[0]) : null,
                            _ = l.editor.options,
                            b = _.messages,
                            w = _.fileBrowser,
                            y = !!(n.ui.FileBrowser && w && w.transport && w.transport.read !== t),
                            k = {
                                title: b.insertFile,
                                visible: !1,
                                resizable: y
                            };
                        k.close = r, y && (k.width = 750), s = this.createDialog(l._dialogTemplate(y), k).toggleClass("k-filebrowser-dialog", y).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(r).end().find(".k-edit-field input").keydown(o).end().find(p).val(v ? v.getAttribute("href", 2) : "http://").end().find(m).val(v ? v.title : "").end().data("kendoWindow"), y && (l._fileBrowser = new n.ui.FileBrowser(s.element.find(".k-filebrowser"), i({}, w, {
                            change: function() {
                                s.element.find(p).val(this.value())
                            },
                            apply: e
                        }))), s.center().open(), s.element.find(p).focus().select()
                    }
                });
            n.ui.editor.FileCommand = g, s("insertFile", new r.Tool({
                command: g,
                template: new l({
                    template: o.buttonTemplate,
                    title: "Insert File"
                })
            }))
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/image.min", ["kendo.imagebrowser.min", "editor/link.min"], e)
    }(function() {
        ! function(e, t) {
            var n = window.kendo,
                i = e.extend,
                r = n.ui.editor,
                o = r.EditorUtils,
                a = r.Dom,
                s = o.registerTool,
                l = r.ToolTemplate,
                c = r.RangeUtils,
                d = r.Command,
                u = n.keys,
                h = "#k-editor-image-url",
                f = "#k-editor-image-title",
                p = "#k-editor-image-width",
                m = "#k-editor-image-height",
                g = d.extend({
                    init: function(e) {
                        var t = this;
                        d.fn.init.call(t, e), t.async = !0, t.attributes = {}
                    },
                    insertImage: function(e, t) {
                        var n, i = this.attributes,
                            r = c.documentFromRange(t);
                        if (i.src && "http://" != i.src) {
                            if (n = function() {
                                setTimeout(function() {
                                    i.width || e.removeAttribute("width"), i.height || e.removeAttribute("height"), e.removeAttribute("complete")
                                })
                            }, !e) return e = a.create(r, "img", i), e.onload = e.onerror = n, t.deleteContents(), t.insertNode(e), e.nextSibling || a.insertAfter(r.createTextNode("\ufeff"), e), n(), t.setStartAfter(e), t.setEndAfter(e), c.selectRange(t), !0;
                            e.onload = e.onerror = n, a.attr(e, i), n()
                        }
                        return !1
                    },
                    _dialogTemplate: function(e) {
                        return n.template('<div class="k-editor-dialog k-popup-edit-form k-edit-form-container"># if (showBrowser) { #<div class="k-filebrowser k-imagebrowser"></div># } #<div class=\'k-edit-label\'><label for="k-editor-image-url">#: messages.imageWebAddress #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-url"></div><div class=\'k-edit-label\'><label for="k-editor-image-title">#: messages.imageAltText #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-title"></div><div class=\'k-edit-label\'><label for="k-editor-image-width">#: messages.imageWidth #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-width"></div><div class=\'k-edit-label\'><label for="k-editor-image-height">#: messages.imageHeight #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-height"></div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #</button><button class="k-dialog-close k-button">#: messages.dialogCancel #</button></div></div>')({
                            messages: this.editor.options.messages,
                            showBrowser: e
                        })
                    },
                    redo: function() {
                        var e = this,
                            t = e.lockRange();
                        e.insertImage(c.image(t), t) || e.releaseRange(t)
                    },
                    exec: function() {
                        function e(e) {
                            var t = s.element,
                                n = parseInt(t.find(p).val(), 10),
                                i = parseInt(t.find(m).val(), 10);
                            l.attributes = {
                                src: t.find(h).val().replace(/ /g, "%20"),
                                alt: t.find(f).val()
                            }, l.attributes.width = null, l.attributes.height = null, !isNaN(n) && n > 0 && (l.attributes.width = n), !isNaN(i) && i > 0 && (l.attributes.height = i), g = l.insertImage(v, d), r(e), l.change && l.change()
                        }

                        function r(e) {
                            e.preventDefault(), s.destroy(), a.windowFromDocument(c.documentFromRange(d)).focus(), g || l.releaseRange(d)
                        }

                        function o(t) {
                            t.keyCode == u.ENTER ? e(t) : t.keyCode == u.ESC && r(t)
                        }
                        var s, l = this,
                            d = l.lockRange(),
                            g = !1,
                            v = c.image(d),
                            _ = v && v.getAttribute("width") || "",
                            b = v && v.getAttribute("height") || "",
                            w = l.editor.options,
                            y = w.messages,
                            k = w.imageBrowser,
                            x = !!(n.ui.ImageBrowser && k && k.transport && k.transport.read !== t),
                            C = {
                                title: y.insertImage,
                                visible: !1,
                                resizable: x
                            };
                        C.close = r, x && (C.width = 750), s = this.createDialog(l._dialogTemplate(x), C).toggleClass("k-filebrowser-dialog", x).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(r).end().find(".k-edit-field input").keydown(o).end().find(h).val(v ? v.getAttribute("src", 2) : "http://").end().find(f).val(v ? v.alt : "").end().find(p).val(_).end().find(m).val(b).end().data("kendoWindow"), x && (this._imageBrowser = new n.ui.ImageBrowser(s.element.find(".k-imagebrowser"), i({}, k, {
                            change: function() {
                                s.element.find(h).val(this.value())
                            },
                            apply: e
                        }))), s.center().open(), s.element.find(h).focus().select()
                    }
                });
            n.ui.editor.ImageCommand = g, s("insertImage", new r.Tool({
                command: g,
                template: new l({
                    template: o.buttonTemplate,
                    title: "Insert Image"
                })
            }))
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/components.min", ["editor/image.min"], e)
    }(function() {
        ! function(e, t) {
            var n = window.kendo,
                i = n.ui.DropDownList,
                r = n.ui.editor.Dom,
                o = i.extend({
                    init: function(t, r) {
                        var o = this;
                        i.fn.init.call(o, t, r), n.support.mobileOS.ios && (this._initSelectOverlay(), this.bind("dataBound", e.proxy(this._initSelectOverlay, this))), o.text(o.options.title), o.bind("open", function() {
                            if (o.options.autoSize) {
                                var e, t = o.list;
                                t.css({
                                    whiteSpace: "nowrap",
                                    width: "auto"
                                }), e = t.width(), e ? e += 20 : e = o._listWidth, t.css("width", e + n.support.scrollbar()), o._listWidth = e
                            }
                        })
                    },
                    options: {
                        name: "SelectBox",
                        index: -1
                    },
                    _initSelectOverlay: function() {
                        var t, i, r, o, a = this,
                            s = a.value(),
                            l = this.dataSource.view(),
                            c = "",
                            d = n.htmlEncode;
                        for (i = 0; l.length > i; i++) t = l[i], c += "<option value='" + d(t.value) + "'", t.value == s && (c += " selected"), c += ">" + d(t.text) + "</option>";
                        r = e("<select class='k-select-overlay'>" + c + "</select>"), o = e(this.element).closest(".k-widget"), o.next(".k-select-overlay").remove(), r.insertAfter(o), r.on("change", function() {
                            a.value(this.value), a.trigger("change")
                        })
                    },
                    value: function(e) {
                        var n = this,
                            r = i.fn.value.call(n, e);
                        return e === t ? r : (i.fn.value.call(n) || n.text(n.options.title), t)
                    },
                    decorate: function(t) {
                        var n, i, o, a, s = this,
                            l = s.dataSource,
                            c = l.data();
                        for (t && s.list.css("background-color", r.getEffectiveBackground(e(t))), n = 0; c.length > n; n++) i = c[n].tag || "span", o = c[n].className, a = r.inlineStyle(t, i, {
                            className: o
                        }), a = a.replace(/"/g, "'"), c[n].style = a + ";display:inline-block";
                        l.trigger("change")
                    }
                });
            n.ui.plugin(o), n.ui.editor.SelectBox = o
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/indent.min", ["editor/components.min"], e)
    }(function() {
        ! function(e, t) {
            function n(n, i) {
                var r = "rtl" == e(n).css("direction"),
                    o = r ? "Right" : "Left",
                    a = "td" != s.name(n) ? "margin" + o : "padding" + o;
                return i === t ? n.style[a] || 0 : (i > 0 ? n.style[a] = i + "px" : (n.style[a] = "", n.style.cssText || n.removeAttribute("style")), t)
            }
            var i = window.kendo,
                r = i.Class,
                o = e.extend,
                a = i.ui.editor,
                s = a.Dom,
                l = a.EditorUtils,
                c = l.registerTool,
                d = a.Command,
                u = a.Tool,
                h = a.ToolTemplate,
                f = a.RangeUtils,
                p = s.blockElements,
                m = a.BlockFormatFinder,
                g = a.BlockFormatter,
                v = r.extend({
                    init: function() {
                        this.finder = new m([{
                            tags: s.blockElements
                        }])
                    },
                    apply: function(t) {
                        var i, r, o, a, l, c, d, u, h, f, p = this.finder.findSuitable(t),
                            m = [];
                        if (p.length) {
                            for (i = 0, r = p.length; r > i; i++) s.is(p[i], "li") ? e(p[i]).index() ? e.inArray(p[i].parentNode, m) < 0 && m.push(p[i]) : m.push(p[i].parentNode) : m.push(p[i]);
                            for (; m.length;)
                                if (o = m.shift(), s.is(o, "li"))
                                    if (a = o.parentNode, l = e(o).prev("li"), c = l.find("ul,ol").last(), d = e(o).children("ul,ol")[0], d && l[0]) c[0] ? (c.append(o), c.append(e(d).children()), s.remove(d)) : (l.append(d), d.insertBefore(o, d.firstChild));
                                    else
                                        for (d = l.children("ul,ol")[0], d || (d = s.create(o.ownerDocument, s.name(a)), l.append(d)); o && o.parentNode == a;) d.appendChild(o), o = m.shift();
                                else
                                    for (u = parseInt(n(o), 10) + 30, n(o, u), h = 0; m.length > h; h++) e.contains(o, m[h]) && m.splice(h, 1)
                        } else f = new g([{
                            tags: ["p"]
                        }], {
                            style: {
                                marginLeft: 30
                            }
                        }), f.apply(t)
                    },
                    remove: function(t) {
                        var i, r, o, a, s, l, c, d, u = this.finder.findSuitable(t);
                        for (r = 0, o = u.length; o > r; r++) {
                            if (c = e(u[r]), c.is("li")) {
                                if (a = c.parent(), s = a.parent(), s.is("li,ul,ol") && !n(a[0])) {
                                    if (i && e.contains(i, s[0])) continue;
                                    l = c.nextAll("li"), l.length && e(a[0].cloneNode(!1)).appendTo(c).append(l), s.is("li") ? c.insertAfter(s) : c.appendTo(s), a.children("li").length || a.remove();
                                    continue
                                }
                                if (i == a[0]) continue;
                                i = a[0]
                            } else i = u[r];
                            d = parseInt(n(i), 10) - 30, n(i, d)
                        }
                    }
                }),
                _ = d.extend({
                    init: function(e) {
                        e.formatter = {
                            toggle: function(e) {
                                (new v).apply(f.nodes(e))
                            }
                        }, d.fn.init.call(this, e)
                    }
                }),
                b = d.extend({
                    init: function(e) {
                        e.formatter = {
                            toggle: function(e) {
                                (new v).remove(f.nodes(e))
                            }
                        }, d.fn.init.call(this, e)
                    }
                }),
                w = u.extend({
                    init: function(e) {
                        u.fn.init.call(this, e), this.finder = new m([{
                            tags: p
                        }])
                    },
                    initialize: function(e, t) {
                        u.fn.initialize.call(this, e, t), e.addClass("k-state-disabled")
                    },
                    update: function(i, r) {
                        var o, a, l, c, d = this.finder.findSuitable(r);
                        for (l = 0, c = d.length; c > l; l++)
                            if (o = n(d[l]), o || (a = e(d[l]).parents("ul,ol").length, o = s.is(d[l], "li") && (a > 1 || n(d[l].parentNode)) || s.ofType(d[l], ["ul", "ol"]) && a > 0), o) return i.removeClass("k-state-disabled"), t;
                        i.addClass("k-state-disabled").removeClass("k-state-hover")
                    }
                });
            o(a, {
                IndentFormatter: v,
                IndentCommand: _,
                OutdentCommand: b,
                OutdentTool: w
            }), c("indent", new u({
                command: _,
                template: new h({
                    template: l.buttonTemplate,
                    title: "Indent"
                })
            })), c("outdent", new w({
                command: b,
                template: new h({
                    template: l.buttonTemplate,
                    title: "Outdent"
                })
            }))
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/viewhtml.min", ["editor/indent.min"], e)
    }(function() {
        ! function(e, t) {
            var n = window.kendo,
                i = e.extend,
                r = n.ui.editor,
                o = r.EditorUtils,
                a = r.Command,
                s = r.Tool,
                l = r.ToolTemplate,
                c = a.extend({
                    init: function(e) {
                        var t = this;
                        t.options = e, a.fn.init.call(t, e), t.attributes = null, t.async = !0
                    },
                    exec: function() {
                        function t(e) {
                            o.value(s.find(d).val()), i(e), r.change && r.change(), o.trigger("change")
                        }

                        function i(e) {
                            e.preventDefault(), s.data("kendoWindow").destroy(), o.focus()
                        }
                        var r = this,
                            o = r.editor,
                            a = o.options.messages,
                            s = e(n.template(c.template)(a)).appendTo(document.body),
                            l = c.indent(o.value()),
                            d = ".k-editor-textarea";
                        this.createDialog(s, {
                            title: a.viewHtml,
                            close: i,
                            visible: !1
                        }).find(d).val(l).end().find(".k-dialog-update").click(t).end().find(".k-dialog-close").click(i).end().data("kendoWindow").center().open(), s.find(d).focus()
                    }
                });
            i(c, {
                template: "<div class='k-editor-dialog k-popup-edit-form k-edit-form-container k-viewhtml-dialog'><textarea class='k-editor-textarea k-input'></textarea><div class='k-edit-buttons k-state-default'><button class='k-dialog-update k-button k-primary'>#: dialogUpdate #</button><button class='k-dialog-close k-button'>#: dialogCancel #</button></div></div>",
                indent: function(e) {
                    return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi, "</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi, "<$1$2>\n<li").replace(/<br \/>/gi, "<br />\n").replace(/\n$/, "")
                }
            }), n.ui.editor.ViewHtmlCommand = c, r.EditorUtils.registerTool("viewHtml", new s({
                command: c,
                template: new l({
                    template: o.buttonTemplate,
                    title: "View HTML"
                })
            }))
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/formatting.min", ["editor/viewhtml.min"], e)
    }(function() {
        ! function(e) {
            function t(e) {
                var t, r, o = l.closestEditableOfType(e, ["li"]);
                o && (t = new i.ListFormatter(l.name(o.parentNode)), r = n.ui.editor.W3CRange.fromNode(e), r.selectNode(o), t.toggle(r))
            }
            var n = window.kendo,
                i = n.ui.editor,
                r = i.Tool,
                o = i.ToolTemplate,
                a = i.DelayedExecutionTool,
                s = i.Command,
                l = i.Dom,
                c = i.EditorUtils,
                d = i.RangeUtils,
                u = c.registerTool,
                h = a.extend({
                    init: function(e) {
                        var t = this;
                        r.fn.init.call(t, n.deepExtend({}, t.options, e)), t.type = "kendoSelectBox", t.finder = {
                            getFormat: function() {
                                return ""
                            }
                        }
                    },
                    options: {
                        items: [{
                            text: "Paragraph",
                            value: "p"
                        }, {
                            text: "Quotation",
                            value: "blockquote"
                        }, {
                            text: "Heading 1",
                            value: "h1"
                        }, {
                            text: "Heading 2",
                            value: "h2"
                        }, {
                            text: "Heading 3",
                            value: "h3"
                        }, {
                            text: "Heading 4",
                            value: "h4"
                        }, {
                            text: "Heading 5",
                            value: "h5"
                        }, {
                            text: "Heading 6",
                            value: "h6"
                        }],
                        width: 110
                    },
                    toFormattingItem: function(e) {
                        var t, n = e.value;
                        return n ? e.tag || e.className ? e : (t = n.indexOf("."), 0 === t ? e.className = n.substring(1) : -1 == t ? e.tag = n : (e.tag = n.substring(0, t), e.className = n.substring(t + 1)), e) : e
                    },
                    command: function(t) {
                        var n = t.value;
                        return n = this.toFormattingItem(n), new i.FormatCommand({
                            range: t.range,
                            formatter: function() {
                                var t, r = (n.tag || n.context || "span").split(","),
                                    o = [{
                                        tags: r,
                                        attr: {
                                            className: n.className || ""
                                        }
                                    }];
                                return t = e.inArray(r[0], l.inlineElements) >= 0 ? new i.GreedyInlineFormatter(o) : new i.GreedyBlockFormatter(o)
                            }
                        })
                    },
                    initialize: function(e, t) {
                        var i = t.editor,
                            o = this.options,
                            a = o.name,
                            s = this;
                        e.width(o.width), e.kendoSelectBox({
                            dataTextField: "text",
                            dataValueField: "value",
                            dataSource: o.items || i.options[a],
                            title: i.options.messages[a],
                            autoSize: !0,
                            change: function() {
                                var e = this.dataItem();
                                e && r.exec(i, a, e.toJSON())
                            },
                            dataBound: function() {
                                var e, t = this.dataSource.data();
                                for (e = 0; t.length > e; e++) t[e] = s.toFormattingItem(t[e])
                            },
                            highlightFirst: !1,
                            template: n.template('<span unselectable="on" style="display:block;#=(data.style||"")#">#:data.text#</span>')
                        }), e.addClass("k-decorated").closest(".k-widget").removeClass("k-" + a).find("*").addBack().attr("unselectable", "on")
                    },
                    getFormattingValue: function(t, n) {
                        var i, r, o, a, s, l, c;
                        for (i = 0; t.length > i; i++)
                            if (r = t[i], o = r.tag || r.context || "", a = r.className ? "." + r.className : "", s = o + a, l = e(n[0]).closest(s)[0]) {
                                if (1 == n.length) return r.value;
                                for (c = 1; n.length > c && e(n[c]).closest(s)[0]; c++)
                                    if (c == n.length - 1) return r.value
                            } return ""
                    },
                    update: function(t, n) {
                        var i, r, o, s, c, d = e(t).data(this.type);
                        if (d && (i = d.dataSource, r = i.data(), c = l.commonAncestor.apply(null, n), c == l.closestEditable(c) || this._ancestor != c)) {
                            for (this._ancestor = c, o = 0; r.length > o; o++) s = r[o].context, r[o].visible = !s || !!e(c).closest(s).length;
                            i.filter([{
                                field: "visible",
                                operator: "eq",
                                value: !0
                            }]), a.fn.update.call(this, t, n), d.value(this.getFormattingValue(i.view(), n)), d.wrapper.toggleClass("k-state-disabled", !i.view().length)
                        }
                    },
                    destroy: function() {
                        this._ancestor = null
                    }
                }),
                f = s.extend({
                    exec: function() {
                        var e, t, n = this.lockRange(!0);
                        for (this.tagsToClean = this.options.remove || "strong,em,span,sup,sub,del,b,i,u,font".split(","), d.wrapSelectedElements(n), e = d.mapAll(n, function(e) {
                            return e
                        }), t = e.length - 1; t >= 0; t--) this.clean(e[t]);
                        this.releaseRange(n)
                    },
                    clean: function(n) {
                        var r, o, a, s, c;
                        if (n && !l.isMarker(n)) {
                            if (r = l.name(n), "ul" == r || "ol" == r)
                                for (o = new i.ListFormatter(r), a = n.previousSibling, s = n.nextSibling, o.unwrap(n); a && a != s; a = a.nextSibling) this.clean(a);
                            else if ("blockquote" == r) l.changeTag(n, "p");
                            else if (1 != n.nodeType || l.insignificant(n)) t(n);
                            else {
                                for (c = n.childNodes.length - 1; c >= 0; c--) this.clean(n.childNodes[c]);
                                n.removeAttribute("style"), n.removeAttribute("class")
                            }
                            e.inArray(r, this.tagsToClean) > -1 && l.unwrap(n)
                        }
                    }
                });
            e.extend(i, {
                FormattingTool: h,
                CleanFormatCommand: f
            }), u("formatting", new h({
                template: new o({
                    template: c.dropDownListTemplate,
                    title: "Format"
                })
            })), u("cleanFormatting", new r({
                command: f,
                template: new o({
                    template: c.buttonTemplate,
                    title: "Clean formatting"
                })
            }))
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/toolbar.min", ["editor/formatting.min"], e)
    }(function() {
        ! function(e, t) {
            var n, i = window.kendo,
                r = i.ui,
                o = r.editor,
                a = r.Widget,
                s = e.extend,
                l = e.proxy,
                c = i.keys,
                d = ".kendoEditor",
                u = i.ui.editor.EditorUtils,
                h = i.ui.editor.ToolTemplate,
                f = i.ui.editor.Tool,
                p = "overflowAnchor",
                m = ".k-tool-group:visible a.k-tool:not(.k-state-disabled),.k-tool.k-overflow-anchor,.k-tool-group:visible .k-widget.k-colorpicker,.k-tool-group:visible .k-selectbox,.k-tool-group:visible .k-dropdown,.k-tool-group:visible .k-combobox .k-input",
                g = f.extend({
                    initialize: function(t, n) {
                        t.attr({
                            unselectable: "on"
                        });
                        var i = n.editor.toolbar;
                        t.on("click", e.proxy(function() {
                            this.overflowPopup.toggle()
                        }, i))
                    },
                    options: {
                        name: p
                    },
                    command: e.noop,
                    update: e.noop,
                    destroy: e.noop
                });
            u.registerTool(p, new g({
                key: "",
                ctrl: !0,
                template: new h({
                    template: u.overflowAnchorTemplate
                })
            })), n = a.extend({
                init: function(e, t) {
                    var n = this;
                    t = s({}, t, {
                        name: "EditorToolbar"
                    }), a.fn.init.call(n, e, t), t.popup && n._initPopup(), t.resizable && t.resizable.toolbar && (n._resizeHandler = i.onResize(function() {
                        n.resize()
                    }), n.element.addClass("k-toolbar-resizable"))
                },
                events: ["execute"],
                groups: {
                    basic: ["bold", "italic", "underline", "strikethrough"],
                    scripts: ["subscript", "superscript"],
                    alignment: ["justifyLeft", "justifyCenter", "justifyRight", "justifyFull"],
                    links: ["insertImage", "insertFile", "createLink", "unlink"],
                    lists: ["insertUnorderedList", "insertOrderedList", "indent", "outdent"],
                    tables: ["createTable", "addColumnLeft", "addColumnRight", "addRowAbove", "addRowBelow", "deleteRow", "deleteColumn"],
                    advanced: ["viewHtml", "cleanFormatting", "print", "pdf"],
                    fonts: ["fontName", "fontSize"],
                    colors: ["foreColor", "backColor"]
                },
                overflowFlaseTools: ["formatting", "fontName", "fontSize", "foreColor", "backColor", "insertHtml"],
                _initPopup: function() {
                    this.window = e(this.element).wrap("<div class='editorToolbarWindow k-header' />").parent().prepend("<button class='k-button k-button-bare k-editortoolbar-dragHandle'><span class='k-icon k-i-move' /></button>").kendoWindow({
                        title: !1,
                        resizable: !1,
                        draggable: {
                            dragHandle: ".k-editortoolbar-dragHandle"
                        },
                        animation: {
                            open: {
                                effects: "fade:in"
                            },
                            close: {
                                effects: "fade:out"
                            }
                        },
                        minHeight: 42,
                        visible: !1,
                        autoFocus: !1,
                        actions: [],
                        dragend: function() {
                            this._moved = !0
                        }
                    }).on("mousedown", function(t) {
                        e(t.target).is(".k-icon") || t.preventDefault()
                    }).data("kendoWindow")
                },
                _toggleOverflowStyles: function(e, t) {
                    e.find("li").toggleClass("k-item k-state-default", t).find(".k-tool:not(.k-state-disabled),.k-overflow-button").toggleClass("k-overflow-button k-button", t)
                },
                _initOverflowPopup: function(t) {
                    var n = this,
                        i = "<ul class='k-editor-overflow-popup k-overflow-container k-list-container'></ul>";
                    n.overflowPopup = e(i).appendTo("body").kendoPopup({
                        anchor: t,
                        origin: "bottom right",
                        position: "top right",
                        copyAnchorStyles: !1,
                        open: function(e) {
                            this.element.is(":empty") && e.preventDefault(), n._toggleOverflowStyles(this.element, !0)
                        },
                        activate: l(n.focusOverflowPopup, n)
                    }).data("kendoPopup")
                },
                items: function() {
                    var e, t, n = this.options.resizable && this.options.resizable.toolbar;
                    return t = this.element.children().find("> *, select"), n && (e = this.overflowPopup, t = t.add(e.element.children().find("> *"))), t
                },
                focused: function() {
                    return this.element.find(".k-state-focused").length > 0
                },
                toolById: function(e) {
                    var t, n = this.tools;
                    for (t in n)
                        if (t.toLowerCase() == e) return n[t]
                },
                toolGroupFor: function(t) {
                    var n, i = this.groups;
                    if (this.isCustomTool(t)) return "custom";
                    for (n in i)
                        if (e.inArray(t, i[n]) >= 0) return n
                },
                bindTo: function(t) {
                    var n = this,
                        i = n.window;
                    n._editor && n._editor.unbind("select", l(n.resize, n)), n._editor = t, n.options.resizable && n.options.resizable.toolbar && t.options.tools.push(p), n.tools = n.expandTools(t.options.tools), n.render(), n.element.find(".k-combobox .k-input").keydown(function(t) {
                        var n = e(this).closest(".k-combobox").data("kendoComboBox"),
                            i = t.keyCode;
                        i == c.RIGHT || i == c.LEFT ? n.close() : i == c.DOWN && (n.dropDown.isOpened() || (t.stopImmediatePropagation(), n.open()))
                    }), n._attachEvents(), n.items().each(function() {
                        var i, r = n._toolName(this),
                            o = "more" !== r ? n.tools[r] : n.tools.overflowAnchor,
                            a = o && o.options,
                            s = t.options.messages,
                            l = a && a.tooltip || s[r],
                            c = e(this);
                        o && o.initialize && (("fontSize" == r || "fontName" == r) && (i = s[r + "Inherit"], c.find("input").val(i).end().find("span.k-input").text(i).end()), o.initialize(c, {
                            title: n._appendShortcutSequence(l, o),
                            editor: n._editor
                        }), c.closest(".k-widget", n.element).addClass("k-editor-widget"), c.closest(".k-colorpicker", n.element).next(".k-colorpicker").addClass("k-editor-widget"))
                    }), t.bind("select", l(n.resize, n)), n.update(), i && i.wrapper.css({
                        top: "",
                        left: "",
                        width: ""
                    })
                },
                show: function() {
                    var e, t, n, i = this,
                        r = i.window,
                        o = i.options.editor;
                    r && (e = r.wrapper, t = o.element, e.is(":visible") && i.window.options.visible || (e[0].style.width || e.width(t.outerWidth() - parseInt(e.css("border-left-width"), 10) - parseInt(e.css("border-right-width"), 10)), r._moved || (n = t.offset(), e.css({
                        top: Math.max(0, parseInt(n.top, 10) - e.outerHeight() - parseInt(i.window.element.css("padding-bottom"), 10)),
                        left: Math.max(0, parseInt(n.left, 10))
                    })), r.open()))
                },
                hide: function() {
                    this.window && this.window.close()
                },
                focus: function() {
                    var e = "tabIndex",
                        t = this.element,
                        n = this._editor.element.attr(e);
                    t.attr(e, n || 0).focus().find(m).first().focus(), n || 0 === n || t.removeAttr(e)
                },
                focusOverflowPopup: function() {
                    var e = "tabIndex",
                        t = this.overflowPopup.element,
                        n = this._editor.element.attr(e);
                    t.closest(".k-animation-container").addClass("k-overflow-wrapper"), t.attr(e, n || 0).find(m).first().focus(), n || 0 === n || t.removeAttr(e)
                },
                _appendShortcutSequence: function(e, t) {
                    if (!t.key) return e;
                    var n = e + " (";
                    return t.ctrl && (n += "Ctrl + "), t.shift && (n += "Shift + "), t.alt && (n += "Alt + "), n += t.key + ")"
                },
                _nativeTools: ["insertLineBreak", "insertParagraph", "redo", "undo"],
                tools: {},
                isCustomTool: function(e) {
                    return !(e in i.ui.Editor.defaultTools)
                },
                expandTools: function(t) {
                    var n, r, a, l, c = this._nativeTools,
                        d = i.deepExtend({}, i.ui.Editor.defaultTools),
                        u = {};
                    for (r = 0; t.length > r; r++) n = t[r], l = n.name, e.isPlainObject(n) ? l && d[l] ? (u[l] = s({}, d[l]), s(u[l].options, n)) : (a = s({
                        cssClass: "k-i-custom",
                        type: "button",
                        title: ""
                    }, n), a.name || (a.name = "custom"), a.cssClass = "k-" + ("custom" == a.name ? "i-custom" : a.name), a.template || "button" != a.type || (a.template = o.EditorUtils.buttonTemplate, a.title = a.title || a.tooltip), u[l] = {
                        options: a
                    }) : d[n] && (u[n] = d[n]);
                    for (r = 0; c.length > r; r++) u[c[r]] || (u[c[r]] = d[c[r]]);
                    return u
                },
                render: function() {
                    function t(t) {
                        var n;
                        return t.getHtml ? n = t.getHtml() : (e.isFunction(t) || (t = i.template(t)), n = t(o)), e.trim(n)
                    }

                    function n() {
                        h.children().length && (k && (h.data("position", y), y++), h.appendTo(_))
                    }

                    function r(t) {
                        t !== p ? (h = e("<li class='k-tool-group' role='presentation' />"), h.data("overflow", -1 === e.inArray(t, x) ? !0 : !1)) : h = e("<li class='k-overflow-tools' />")
                    }
                    var o, a, s, c, d, u, h, f, m = this,
                        g = m.tools,
                        v = m._editor.element,
                        _ = m.element.empty(),
                        b = m._editor.options.tools,
                        w = i.support.browser,
                        y = 0,
                        k = m.options.resizable && m.options.resizable.toolbar,
                        x = this.overflowFlaseTools;
                    for (_.empty(), b.length && (c = b[0].name || b[0]), r(c, x), f = 0; b.length > f; f++) c = b[f].name || b[f], o = g[c] && g[c].options, !o && e.isPlainObject(c) && (o = c), a = o && o.template, "break" == c && (n(), e("<li class='k-row-break' />").appendTo(m.element), r(c, x)), a && (u = m.toolGroupFor(c), (d != u || c == p) && (n(), r(c, x), d = u), a = t(a), s = e(a).appendTo(h), "custom" == u && (n(), r(c, x)), o.exec && s.hasClass("k-tool") && s.click(l(o.exec, v[0])));
                    n(), e(m.element).children(":has(> .k-tool)").addClass("k-button-group"), m.options.popup && w.msie && 9 > w.version && m.window.wrapper.find("*").attr("unselectable", "on"), m.updateGroups(), k && m._initOverflowPopup(m.element.find(".k-overflow-anchor")), m.angular("compile", function() {
                        return {
                            elements: m.element
                        }
                    })
                },
                updateGroups: function() {
                    e(this.element).children().each(function() {
                        e(this).children().filter(function() {
                            return !e(this).hasClass("k-state-disabled")
                        }).removeClass("k-group-end").first().addClass("k-group-start").end().last().addClass("k-group-end").end()
                    })
                },
                decorateFrom: function(t) {
                    this.items().filter(".k-decorated").each(function() {
                        var n = e(this).data("kendoSelectBox");
                        n && n.decorate(t)
                    })
                },
                destroy: function() {
                    a.fn.destroy.call(this);
                    var e, t = this.tools;
                    for (e in t) t[e].destroy && t[e].destroy();
                    this.window && this.window.destroy(), this._resizeHandler && i.unbindResize(this._resizeHandler), this.overflowPopup && this.overflowPopup.destroy()
                },
                _attachEvents: function() {
                    var t = this,
                        n = "[role=button].k-tool",
                        i = n + ":not(.k-state-disabled)",
                        r = n + ".k-state-disabled",
                        o = t.overflowPopup ? t.overflowPopup.element : e([]);
                    t.element.add(o).off(d).on("mouseenter" + d, i, function() {
                        e(this).addClass("k-state-hover")
                    }).on("mouseleave" + d, i, function() {
                        e(this).removeClass("k-state-hover")
                    }).on("mousedown" + d, n, function(e) {
                        e.preventDefault()
                    }).on("keydown" + d, m, function(n) {
                        function i(e, t, n) {
                            var i = t.find(m),
                                r = i.index(a) + e;
                            return n && (r = Math.max(0, Math.min(i.length - 1, r))), i[r]
                        }
                        var r, o, a = this,
                            s = t.options.resizable && t.options.resizable.toolbar,
                            l = n.keyCode;
                        l == c.RIGHT || l == c.LEFT ? e(a).hasClass(".k-dropdown") || (r = i(l == c.RIGHT ? 1 : -1, t.element, !0)) : !s || l != c.UP && l != c.DOWN ? l == c.ESC ? (t.overflowPopup.visible() && t.overflowPopup.close(), r = t._editor) : l != c.TAB || n.ctrlKey || n.altKey || (o = s && e(a.parentElement).hasClass("k-overflow-tool-group") ? t.overflowPopup.element : t.element, n.shiftKey ? r = i(-1, o) : (r = i(1, o), r || (r = t._editor))) : r = i(l == c.DOWN ? 1 : -1, t.overflowPopup.element, !0), r && (n.preventDefault(), r.focus())
                    }).on("click" + d, i, function(n) {
                        var i = e(this);
                        n.preventDefault(), n.stopPropagation(), i.removeClass("k-state-hover"), i.is("[data-popup]") || t._editor.exec(t._toolName(this))
                    }).on("click" + d, r, function(e) {
                        e.preventDefault()
                    })
                },
                _toolName: function(t) {
                    var n, i;
                    if (t) return n = t.className, /k-tool\b/i.test(n) && (n = t.firstChild.className), i = e.grep(n.split(" "), function(e) {
                        return !/^k-(widget|tool|tool-icon|icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(e)
                    }), i[0] ? i[0].substring(i[0].lastIndexOf("-") + 1) : "custom"
                },
                refreshTools: function() {
                    var t = this,
                        n = t._editor,
                        r = n.getRange(),
                        o = i.ui.editor.RangeUtils.textNodes(r);
                    o.length || (o = [r.startContainer]), t.items().each(function() {
                        var n = t.tools[t._toolName(this)];
                        n && n.update && n.update(e(this), o)
                    }), this.update()
                },
                update: function() {
                    this.updateGroups()
                },
                _resize: function(e) {
                    var t = e.width,
                        n = this.options.resizable && this.options.resizable.toolbar,
                        i = this.overflowPopup;
                    this.refreshTools(), n && (i.visible() && i.close(!0), this._refreshWidths(), this._shrink(t), this._stretch(t), this._toggleOverflowStyles(this.element, !1), this._toggleOverflowStyles(this.overflowPopup.element, !0), this.element.children("li.k-overflow-tools").css("visibility", i.element.is(":empty") ? "hidden" : "visible"))
                },
                _refreshWidths: function() {
                    this.element.children("li").each(function(t, n) {
                        var i = e(n);
                        i.data("outerWidth", i.outerWidth(!0))
                    })
                },
                _shrink: function(e) {
                    var t, n, i;
                    if (e < this._groupsWidth())
                        for (n = this._visibleGroups().filter(":not(.k-overflow-tools)"), i = n.length - 1; i >= 0 && (t = n.eq(i), !(e > this._groupsWidth())); i--) this._hideGroup(t)
                },
                _stretch: function(e) {
                    var t, n, i;
                    if (e > this._groupsWidth())
                        for (n = this._hiddenGroups(), i = 0; n.length > i && (t = n.eq(i), !(e < this._groupsWidth()) && this._showGroup(t, e)); i++);
                },
                _hiddenGroups: function() {
                    var t = this.overflowPopup,
                        n = this.element.children("li.k-tool-group").filter(":hidden");
                    return n = n.add(t.element.children("li")), n.sort(function(t, n) {
                        return e(t).data("position") > e(n).data("position") ? 1 : -1
                    }), n
                },
                _visibleGroups: function() {
                    return this.element.children("li.k-tool-group, li.k-overflow-tools").filter(":visible")
                },
                _groupsWidth: function() {
                    var t = 0;
                    return this._visibleGroups().each(function() {
                        t += e(this).data("outerWidth")
                    }), Math.ceil(t)
                },
                _hideGroup: function(e) {
                    if (e.data("overflow")) {
                        var t = this.overflowPopup;
                        e.detach().prependTo(t.element).addClass("k-overflow-tool-group")
                    } else e.hide()
                },
                _showGroup: function(t, n) {
                    var i, r;
                    return t.length && n > this._groupsWidth() + t.data("outerWidth") ? (t.hasClass("k-overflow-tool-group") ? (i = t.data("position"), 0 === i ? t.detach().prependTo(this.element) : (r = this.element.children().filter(function(t, n) {
                        return e(n).data("position") === i - 1
                    }), t.detach().insertAfter(r)), t.removeClass("k-overflow-tool-group")) : t.show(), !0) : !1
                }
            }), e.extend(o, {
                Toolbar: n
            })
        }(window.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("editor/tables.min", ["editor/toolbar.min"], e)
    }(function() {
        ! function(e, t) {
            var n = window.kendo,
                i = e.extend,
                r = e.proxy,
                o = n.ui.editor,
                a = o.Dom,
                s = o.EditorUtils,
                l = o.RangeUtils,
                c = o.Command,
                d = ".kendoEditor",
                u = "k-state-active",
                h = "k-state-selected",
                f = o.Tool,
                p = o.ToolTemplate,
                m = o.InsertHtmlCommand,
                g = o.BlockFormatFinder,
                v = o.EditorUtils.registerTool,
                _ = "<td>" + o.emptyElementContent + "</td>",
                b = new g([{
                    tags: ["table"]
                }]),
                w = m.extend({
                    _tableHtml: function(e, t) {
                        return e = e || 1, t = t || 1, "<table class='k-table' data-last>" + Array(e + 1).join("<tr>" + Array(t + 1).join(_) + "</tr>") + "</table>"
                    },
                    postProcess: function(t, n) {
                        var i = e("table[data-last]", t.document).removeAttr("data-last");
                        n.setStart(i.find("td")[0], 0), n.collapse(!0), t.selectRange(n)
                    },
                    exec: function() {
                        var e = this.options;
                        e.html = this._tableHtml(e.rows, e.columns), e.postProcess = this.postProcess, m.fn.exec.call(this)
                    }
                }),
                y = f.extend({
                    initialize: function(t, n) {
                        f.fn.initialize.call(this, t, n);
                        var i = e(this.options.popupTemplate).appendTo("body").kendoPopup({
                            anchor: t,
                            copyAnchorStyles: !1,
                            open: r(this._open, this),
                            activate: r(this._activate, this),
                            close: r(this._close, this)
                        }).data("kendoPopup");
                        t.click(r(this._toggle, this)).keydown(r(this._keydown, this)), this._editor = n.editor, this._popup = i
                    },
                    popup: function() {
                        return this._popup
                    },
                    _activate: e.noop,
                    _open: function() {
                        this._popup.options.anchor.addClass(u)
                    },
                    _close: function() {
                        this._popup.options.anchor.removeClass(u)
                    },
                    _keydown: function(e) {
                        var t = n.keys,
                            i = e.keyCode;
                        i == t.DOWN && e.altKey ? this._popup.open() : i == t.ESC && this._popup.close()
                    },
                    _toggle: function(t) {
                        var n = e(t.target).closest(".k-tool");
                        n.hasClass("k-state-disabled") || this.popup().toggle()
                    },
                    update: function(e) {
                        var t = this.popup();
                        t.wrapper && "block" == t.wrapper.css("display") && t.close(), e.removeClass("k-state-hover")
                    },
                    destroy: function() {
                        this._popup.destroy()
                    }
                }),
                k = y.extend({
                    init: function(t) {
                        this.cols = 8, this.rows = 6, y.fn.init.call(this, e.extend(t, {
                            command: w,
                            popupTemplate: "<div class='k-ct-popup'>" + Array(this.cols * this.rows + 1).join("<span class='k-ct-cell k-state-disabled' />") + "<div class='k-status'></div></div>"
                        }))
                    },
                    _activate: function() {
                        function t(t) {
                            var n = e(window);
                            return {
                                row: Math.floor((t.clientY + n.scrollTop() - u.top) / r) + 1,
                                col: Math.floor((t.clientX + n.scrollLeft() - u.left) / i) + 1
                            }
                        }
                        var i, r, o = this,
                            a = o._popup.element,
                            s = a.find(".k-ct-cell"),
                            l = s.eq(0),
                            c = s.eq(s.length - 1),
                            u = n.getOffset(l),
                            h = n.getOffset(c),
                            f = o.cols,
                            p = o.rows;
                        a.find("*").addBack().attr("unselectable", "on"), h.left += c[0].offsetWidth, h.top += c[0].offsetHeight, i = (h.left - u.left) / f, r = (h.top - u.top) / p, a.on("mousemove" + d, function(e) {
                            o._setTableSize(t(e))
                        }).on("mouseleave" + d, function() {
                            o._setTableSize()
                        }).on("mouseup" + d, function(e) {
                            o._exec(t(e))
                        })
                    },
                    _valid: function(e) {
                        return e && e.row > 0 && e.col > 0 && this.rows >= e.row && this.cols >= e.col
                    },
                    _exec: function(e) {
                        this._valid(e) && (this._editor.exec("createTable", {
                            rows: e.row,
                            columns: e.col
                        }), this._popup.close())
                    },
                    _setTableSize: function(t) {
                        var i = this._popup.element,
                            r = i.find(".k-status"),
                            o = i.find(".k-ct-cell"),
                            a = this.cols,
                            s = this._editor.options.messages;
                        this._valid(t) ? (r.text(n.format(s.createTableHint, t.row, t.col)), o.each(function(n) {
                            e(this).toggleClass(h, t.col > n % a && t.row > n / a)
                        })) : (r.text(s.dialogCancel), o.removeClass(h))
                    },
                    _keydown: function(e) {
                        var t, i, r, o, a, s, l, c;
                        y.fn._keydown.call(this, e), this._popup.visible() && (t = n.keys, i = e.keyCode, r = this._popup.element.find(".k-ct-cell"), o = Math.max(r.filter(".k-state-selected").last().index(), 0), a = Math.floor(o / this.cols), s = o % this.cols, l = !1, i != t.DOWN || e.altKey ? i == t.UP ? (l = !0, a--) : i == t.RIGHT ? (l = !0, s++) : i == t.LEFT && (l = !0, s--) : (l = !0, a++), c = {
                            row: Math.max(1, Math.min(this.rows, a + 1)),
                            col: Math.max(1, Math.min(this.cols, s + 1))
                        }, i == t.ENTER ? this._exec(c) : this._setTableSize(c), l && (e.preventDefault(), e.stopImmediatePropagation()))
                    },
                    _open: function() {
                        var e = this._editor.options.messages;
                        y.fn._open.call(this), this.popup().element.find(".k-status").text(e.dialogCancel).end().find(".k-ct-cell").removeClass(h)
                    },
                    _close: function() {
                        y.fn._close.call(this), this.popup().element.off(d)
                    },
                    update: function(e, t) {
                        var n;
                        y.fn.update.call(this, e), n = b.isFormatted(t), e.toggleClass("k-state-disabled", n)
                    }
                }),
                x = c.extend({
                    exec: function() {
                        for (var e, t, n, i, r = this.lockRange(!0), s = r.endContainer;
                             "td" != a.name(s);) s = s.parentNode;
                        for (t = s.parentNode, e = t.children.length, n = t.cloneNode(!0), i = 0; t.cells.length > i; i++) n.cells[i].innerHTML = o.emptyElementContent;
                        "before" == this.options.position ? a.insertBefore(n, t) : a.insertAfter(n, t), this.releaseRange(r)
                    }
                }),
                C = c.extend({
                    exec: function() {
                        var e, t, n, i, r = this.lockRange(!0),
                            s = a.closest(r.endContainer, "td"),
                            l = a.closest(s, "table"),
                            c = l.rows,
                            d = this.options.position;
                        for (e = a.findNodeIndex(s, !0), t = 0; c.length > t; t++) n = c[t].cells[e], i = n.cloneNode(), i.innerHTML = o.emptyElementContent, "before" == d ? a.insertBefore(i, n) : a.insertAfter(i, n);
                        this.releaseRange(r)
                    }
                }),
                S = c.extend({
                    exec: function() {
                        var t, n, i, r = this.lockRange(),
                            o = l.mapAll(r, function(t) {
                                return e(t).closest("tr")[0]
                            }),
                            s = a.closest(o[0], "table");
                        if (o.length >= s.rows.length) t = a.next(s), (!t || a.insignificant(t)) && (t = a.prev(s)), a.remove(s);
                        else
                            for (n = 0; o.length > n; n++) i = o[n], a.removeTextSiblings(i), t = a.next(i) || a.prev(i), t = t.cells[0], a.remove(i);
                        t && (r.setStart(t, 0), r.collapse(!0), this.editor.selectRange(r))
                    }
                }),
                T = c.extend({
                    exec: function() {
                        var e, t, n = this.lockRange(),
                            i = a.closest(n.endContainer, "td"),
                            r = a.closest(i, "table"),
                            o = r.rows,
                            s = a.findNodeIndex(i, !0),
                            l = o[0].cells.length;
                        if (1 == l) e = a.next(r), (!e || a.insignificant(e)) && (e = a.prev(r)), a.remove(r);
                        else
                            for (a.removeTextSiblings(i), e = a.next(i) || a.prev(i), t = 0; o.length > t; t++) a.remove(o[t].cells[s]);
                        e && (n.setStart(e, 0), n.collapse(!0), this.editor.selectRange(n))
                    }
                }),
                D = f.extend({
                    command: function(e) {
                        return e = i(e, this.options), "delete" == e.action ? "row" == e.type ? new S(e) : new T(e) : "row" == e.type ? new x(e) : new C(e)
                    },
                    initialize: function(e, t) {
                        f.fn.initialize.call(this, e, t), e.addClass("k-state-disabled")
                    },
                    update: function(e, t) {
                        var n = !b.isFormatted(t);
                        e.toggleClass("k-state-disabled", n)
                    }
                });
            i(n.ui.editor, {
                PopupTool: y,
                TableCommand: w,
                InsertTableTool: k,
                TableModificationTool: D,
                InsertRowCommand: x,
                InsertColumnCommand: C,
                DeleteRowCommand: S,
                DeleteColumnCommand: T
            }), v("createTable", new k({
                template: new p({
                    template: s.buttonTemplate,
                    popup: !0,
                    title: "Create table"
                })
            })), v("addColumnLeft", new D({
                type: "column",
                position: "before",
                template: new p({
                    template: s.buttonTemplate,
                    title: "Add column on the left"
                })
            })), v("addColumnRight", new D({
                type: "column",
                template: new p({
                    template: s.buttonTemplate,
                    title: "Add column on the right"
                })
            })), v("addRowAbove", new D({
                type: "row",
                position: "before",
                template: new p({
                    template: s.buttonTemplate,
                    title: "Add row above"
                })
            })), v("addRowBelow", new D({
                type: "row",
                template: new p({
                    template: s.buttonTemplate,
                    title: "Add row below"
                })
            })), v("deleteRow", new D({
                type: "row",
                action: "delete",
                template: new p({
                    template: s.buttonTemplate,
                    title: "Delete row"
                })
            })), v("deleteColumn", new D({
                type: "column",
                action: "delete",
                template: new p({
                    template: s.buttonTemplate,
                    title: "Delete column"
                })
            }))
        }(window.kendo.jQuery)
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.editor.min", ["kendo.combobox.min", "kendo.dropdownlist.min", "kendo.resizable.min", "kendo.window.min", "kendo.colorpicker.min", "kendo.imagebrowser.min", "util/undoredostack.min", "editor/main.min", "editor/dom.min", "editor/serializer.min", "editor/range.min", "editor/system.min", "editor/inlineformat.min", "editor/formatblock.min", "editor/linebreak.min", "editor/lists.min", "editor/link.min", "editor/file.min", "editor/image.min", "editor/components.min", "editor/indent.min", "editor/viewhtml.min", "editor/formatting.min", "editor/toolbar.min", "editor/tables.min"], e)
    }(function() {}, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.maskedtextbox.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.caret,
                r = n.keys,
                o = n.ui,
                a = o.Widget,
                s = ".kendoMaskedTextBox",
                l = e.proxy,
                c = (n.support.propertyChangeEvent ? "propertychange" : "input") + s,
                d = "k-state-disabled",
                u = "disabled",
                h = "readonly",
                f = "change",
                p = a.extend({
                    init: function(t, r) {
                        var o, l, c = this;
                        a.fn.init.call(c, t, r), c._rules = e.extend({}, c.rules, c.options.rules), t = c.element, o = t[0], c.wrapper = t, c._tokenize(), c._form(), c.element.addClass("k-textbox").attr("autocomplete", "off").on("focus" + s, function() {
                            var e = o.value;
                            e ? c._togglePrompt(!0) : o.value = c._old = c._emptyMask, c._oldValue = e, c._timeoutId = setTimeout(function() {
                                i(t, 0, e ? c._maskLength : 0)
                            })
                        }).on("focusout" + s, function() {
                            var e = t.val();
                            clearTimeout(c._timeoutId), o.value = c._old = "", e !== c._emptyMask && (o.value = c._old = e), c._change(), c._togglePrompt()
                        }), l = t.is("[disabled]") || e(c.element).parents("fieldset").is(":disabled"), l ? c.enable(!1) : c.readonly(t.is("[readonly]")), c.value(c.options.value || t.val()), n.notify(c)
                    },
                    options: {
                        name: "MaskedTextBox",
                        clearPromptChar: !1,
                        unmaskOnPost: !1,
                        promptChar: "_",
                        culture: "",
                        rules: {},
                        value: "",
                        mask: ""
                    },
                    events: [f],
                    rules: {
                        0: /\d/,
                        9: /\d|\s/,
                        "#": /\d|\s|\+|\-/,
                        L: /[a-zA-Z]/,
                        "?": /[a-zA-Z]|\s/,
                        "&": /\S/,
                        C: /./,
                        A: /[a-zA-Z0-9]/,
                        a: /[a-zA-Z0-9]|\s/
                    },
                    setOptions: function(t) {
                        var n = this;
                        a.fn.setOptions.call(n, t), n._rules = e.extend({}, n.rules, n.options.rules), n._tokenize(), this._unbindInput(), this._bindInput(), n.value(n.element.val())
                    },
                    destroy: function() {
                        var e = this;
                        e.element.off(s), e._formElement && (e._formElement.off("reset", e._resetHandler), e._formElement.off("submit", e._submitHandler)), a.fn.destroy.call(e)
                    },
                    raw: function() {
                        var e = this._unmask(this.element.val(), 0);
                        return e.replace(RegExp(this.options.promptChar, "g"), "")
                    },
                    value: function(e) {
                        var i = this.element,
                            r = this._emptyMask;
                        return e === t ? this.element.val() : (null === e && (e = ""), r ? (e = this._unmask(e + ""), i.val(e ? r : ""), this._mask(0, this._maskLength, e), e = i.val(), this._oldValue = e, n._activeElement() !== i && (e === r ? i.val("") : this._togglePrompt()), t) : (i.val(e), t))
                    },
                    _togglePrompt: function(e) {
                        var t = this.element[0],
                            n = t.value;
                        this.options.clearPromptChar && (n = e ? this._oldValue : n.replace(RegExp(this.options.promptChar, "g"), " "), t.value = this._old = n)
                    },
                    readonly: function(e) {
                        this._editable({
                            readonly: e === t ? !0 : e,
                            disable: !1
                        })
                    },
                    enable: function(e) {
                        this._editable({
                            readonly: !1,
                            disable: !(e = e === t ? !0 : e)
                        })
                    },
                    _bindInput: function() {
                        var e = this;
                        e._maskLength && e.element.on("keydown" + s, l(e._keydown, e)).on("keypress" + s, l(e._keypress, e)).on("paste" + s, l(e._paste, e)).on(c, l(e._propertyChange, e))
                    },
                    _unbindInput: function() {
                        this.element.off("keydown" + s).off("keypress" + s).off("paste" + s).off(c)
                    },
                    _editable: function(e) {
                        var t = this,
                            n = t.element,
                            i = e.disable,
                            r = e.readonly;
                        t._unbindInput(), r || i ? n.attr(u, i).attr(h, r).toggleClass(d, i) : (n.removeAttr(u).removeAttr(h).removeClass(d), t._bindInput())
                    },
                    _change: function() {
                        var e = this,
                            t = e.value();
                        t !== e._oldValue && (e._oldValue = t, e.trigger(f), e.element.trigger(f))
                    },
                    _propertyChange: function() {
                        var e, t, r = this,
                            o = r.element[0],
                            a = o.value;
                        n._activeElement() === o && (a === r._old || r._pasting || (t = i(o)[0], e = r._unmask(a.substring(t), t), o.value = r._old = a.substring(0, t) + r._emptyMask.substring(t), r._mask(t, t, e), i(o, t)))
                    },
                    _paste: function(e) {
                        var t = this,
                            n = e.target,
                            r = i(n),
                            o = r[0],
                            a = r[1],
                            s = t._unmask(n.value.substring(a), a);
                        t._pasting = !0, setTimeout(function() {
                            var e = n.value,
                                r = e.substring(o, i(n)[0]);
                            n.value = t._old = e.substring(0, o) + t._emptyMask.substring(o), t._mask(o, o, r), o = i(n)[0], t._mask(o, o, s), i(n, o), t._pasting = !1
                        })
                    },
                    _form: function() {
                        var t = this,
                            n = t.element,
                            i = n.attr("form"),
                            r = i ? e("#" + i) : n.closest("form");
                        r[0] && (t._resetHandler = function() {
                            setTimeout(function() {
                                t.value(n[0].value)
                            })
                        }, t._submitHandler = function() {
                            t.element[0].value = t._old = t.raw()
                        }, t.options.unmaskOnPost && r.on("submit", t._submitHandler), t._formElement = r.on("reset", t._resetHandler))
                    },
                    _keydown: function(e) {
                        var n, o = e.keyCode,
                            a = this.element[0],
                            s = i(a),
                            l = s[0],
                            c = s[1],
                            d = o === r.BACKSPACE;
                        d || o === r.DELETE ? (l === c && (d ? l -= 1 : c += 1, n = this._find(l, d)), n !== t && n !== l ? (d && (n += 1), i(a, n)) : l > -1 && this._mask(l, c, "", d), e.preventDefault()) : o === r.ENTER && this._change()
                    },
                    _keypress: function(e) {
                        var t, n;
                        0 === e.which || e.metaKey || e.ctrlKey || e.keyCode === r.ENTER || (t = String.fromCharCode(e.which), n = i(this.element), this._mask(n[0], n[1], t), (e.keyCode === r.BACKSPACE || t) && e.preventDefault())
                    },
                    _find: function(e, t) {
                        var n = this.element.val() || this._emptyMask,
                            i = 1;
                        for (t === !0 && (i = -1); e > -1 || this._maskLength >= e;) {
                            if (n.charAt(e) !== this.tokens[e]) return e;
                            e += i
                        }
                        return -1
                    },
                    _mask: function(e, r, o, a) {
                        var s, l, c, d, u = this.element[0],
                            h = u.value || this._emptyMask,
                            f = this.options.promptChar,
                            p = 0;
                        for (e = this._find(e, a), e > r && (r = e), l = this._unmask(h.substring(r), r), o = this._unmask(o, e), s = o.length, o && (l = l.replace(RegExp("^_{0," + s + "}"), "")), o += l, h = h.split(""), c = o.charAt(p); this._maskLength > e;) h[e] = c || f, c = o.charAt(++p), d === t && p > s && (d = e), e = this._find(e + 1);
                        u.value = this._old = h.join(""), n._activeElement() === u && (d === t && (d = this._maskLength), i(u, d))
                    },
                    _unmask: function(t, n) {
                        var i, r, o, a, s, l, c, d;
                        if (!t) return "";
                        for (t = (t + "").split(""), o = 0, a = n || 0, s = this.options.promptChar, l = t.length, c = this.tokens.length, d = ""; c > a && (i = t[o], r = this.tokens[a], i === r || i === s ? (d += i === s ? s : "", o += 1, a += 1) : "string" != typeof r ? ((r.test && r.test(i) || e.isFunction(r) && r(i)) && (d += i, a += 1), o += 1) : a += 1, !(o >= l)););
                        return d
                    },
                    _tokenize: function() {
                        for (var e, t, i, r, o = [], a = 0, s = this.options.mask || "", l = s.split(""), c = l.length, d = 0, u = "", h = this.options.promptChar, f = n.getCulture(this.options.culture).numberFormat, p = this._rules; c > d; d++)
                            if (e = l[d], t = p[e]) o[a] = t, u += h, a += 1;
                            else
                                for ("." === e || "," === e ? e = f[e] : "$" === e ? e = f.currency.symbol : "\\" === e && (d += 1, e = l[d]), e = e.split(""), i = 0, r = e.length; r > i; i++) o[a] = e[i], u += e[i], a += 1;
                        this.tokens = o, this._emptyMask = u, this._maskLength = u.length
                    }
                });
            o.plugin(p)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.pivotgrid.min", ["kendo.dom.min", "kendo.data.min"], e)
    }(function() {
        return function(e, t) {
            function n(e) {
                var n = "string" == typeof e ? [{
                        name: e
                    }] : e,
                    i = "[object Array]" === _e.call(n) ? n : n !== t ? [n] : [];
                return we(i, function(e) {
                    return "string" == typeof e ? {
                        name: e
                    } : {
                        name: e.name,
                        type: e.type
                    }
                })
            }

            function i(e) {
                var n = "string" == typeof e ? [{
                        name: [e],
                        expand: !1
                    }] : e,
                    i = "[object Array]" === _e.call(n) ? n : n !== t ? [n] : [];
                return we(i, function(e) {
                    return "string" == typeof e ? {
                        name: [e],
                        expand: !1
                    } : {
                        name: "[object Array]" === _e.call(e.name) ? e.name.slice() : [e.name],
                        expand: e.expand
                    }
                })
            }

            function r(e) {
                return -1 !== e.indexOf(" ") && (e = '["' + e + '"]'), e
            }

            function o(e, t, n, i) {
                var r, a, s, l;
                if (n || (n = t), i || (i = 0), l = n.members[i], l && !l.measure) {
                    if (s = l.children, a = s.length, n === t ? e[fe.stringify([l.name])] = !!a : a && (e[fe.stringify(se(n, i))] = !0), a)
                        for (r = 0; a > r; r++) o(e, t, s[r], i);
                    o(e, t, n, i + 1)
                }
            }

            function a(t) {
                var n, i, r = {};
                t.length && o(r, t[0]), n = [];
                for (i in r) n.push({
                    name: e.parseJSON(i),
                    expand: r[i]
                });
                return n
            }

            function s(e, t) {
                var n, i, r, o, a = t.tuples || [],
                    s = a[0];
                if (s && s.members.length > e.length)
                    for (n = s.members, i = 0; n.length > i; i++)
                        if (!n[i].measure) {
                            for (r = !1, o = 0; e.length > o; o++)
                                if (0 === H(e[o]).indexOf(n[i].hierarchy)) {
                                    r = !0;
                                    break
                                } r || e.push({
                                name: [n[i].name],
                                expand: !1
                            })
                        }
            }

            function l(e) {
                var t, n = [],
                    i = e.members;
                for (t = 0; i.length > t; t++) i[t].measure || n.push({
                    name: [i[t].name],
                    expand: i[t].children.length > 0
                });
                return n
            }

            function c(e, t, n) {
                var r, o;
                return e = e || {}, s(t, e), n.length > 1 && t.push({
                    name: Se,
                    measure: !0,
                    children: i(n)
                }), r = {
                    members: t
                }, e.tuples && (o = x(e.tuples, r), o.tuple && (t = l(o.tuple))), t
            }

            function d(e) {
                var t = fe.getter(e.field, !0);
                return function(n, i) {
                    return e.aggregate(t(n.dataItem), i, n)
                }
            }

            function u(e) {
                return "number" == typeof e && !isNaN(e)
            }

            function h(e) {
                return e && e.getTime
            }

            function f(e) {
                return e[e.length] = {
                    value: "",
                    fmtValue: "",
                    ordinal: e.length
                }, e
            }

            function p(e, n, i) {
                return e.tuples.length < _(n.tuples, i) ? n : t
            }

            function m(e, t, n, i, r) {
                var o, a, s, l = e.length,
                    c = _(t, i),
                    d = i.length || 1;
                for (a = 0; n > a; a++)
                    for (o = 0; l > o; o++) s = v(e[o], t) * d, s += o % d, r[a * l + o].ordinal = a * c + s
            }

            function g(e, t, n, i, r) {
                var o, a, s, l = e.length,
                    c = i.length || 1;
                for (a = 0; l > a; a++)
                    for (s = v(e[a], t), s *= c, s += a % c, o = 0; n > o; o++) r[a * n + o].ordinal = s * n + o
            }

            function v(e, t) {
                return x(t, e).index
            }

            function _(e, t) {
                var n, i, r;
                if (!e.length) return 0;
                for (n = e.slice(), i = n.shift(), r = 1; i;) i.members ? [].push.apply(n, i.members) : i.children && (i.measure || (r += i.children.length), [].push.apply(n, i.children)), i = n.shift();
                return t.length && (r *= t.length), r
            }

            function b(e) {
                return e || (e = {
                    tuples: []
                }), e.tuples || (e.tuples = []), e
            }

            function w(e, t, n) {
                var i, r, o, a;
                if (!e) return 0;
                for (i = Math.max(n.length, 1), r = e.members.slice(0, t), o = i, a = r.shift(), i > 1 && (i += 1); a;) a.name === Se ? o += i : a.children ? [].push.apply(r, a.children) : (o++, [].push.apply(r, a.members)), a = r.shift();
                return o
            }

            function y(e, t, n) {
                var i, r, o, a, s, l;
                if (!t[0]) return {
                    parsedRoot: null,
                    tuples: e,
                    memberIndex: 0,
                    index: 0
                };
                if (i = x(e, t[0]), !i.tuple) return {
                    parsedRoot: null,
                    tuples: t,
                    memberIndex: 0,
                    index: 0
                };
                if (r = i.tuple.members, o = t[0].members, a = -1, r.length !== o.length) return {
                    parsedRoot: null,
                    tuples: t,
                    memberIndex: 0,
                    index: 0
                };
                for (s = 0, l = r.length; l > s; s++) !r[s].measure && o[s].children[0] && (-1 == a && o[s].children.length && (a = s), r[s].children = o[s].children);
                return n = Math.max(n.length, 1), {
                    parsedRoot: i.tuple,
                    index: i.index * n,
                    memberIndex: a,
                    tuples: e
                }
            }

            function k(e, t) {
                var n, i, r = !0;
                for (e = e.members, t = t.members, n = 0, i = e.length; i > n; n++) e[n].measure || t[n].measure || (r = r && H(e[n]) === H(t[n]));
                return r
            }

            function x(e, t) {
                var n, i, r, o, a, s, l, c = 0;
                for (n = 0, i = e.length; i > n; n++) {
                    if (r = e[n], k(r, t)) return {
                        tuple: r,
                        index: c
                    };
                    for (c++, a = 0, s = r.members.length; s > a; a++)
                        if (l = r.members[a], !l.measure && (o = x(l.children, t), c += o.index, o.tuple)) return {
                            tuple: o.tuple,
                            index: c
                        }
                }
                return {
                    index: c
                }
            }

            function C(e, t) {
                var n, i, r, o = "";
                for (i = 0, r = e.length; r > i; i++) n = e[i], o += n.name, t[o] || (t[o] = n)
            }

            function S(e, t) {
                var n, i, r, o, a = e.members,
                    s = "",
                    l = "";
                for (n = 0, i = a.length; i > n; n++) {
                    if (r = a[n], o) {
                        if (t[s + r.name]) {
                            s += r.name, o = t[s];
                            continue
                        }
                        return t[s + r.parentName] ? t[s + r.parentName] : t[l + r.parentName] ? t[l + r.parentName] : t[l]
                    }
                    if (s += r.name, o = t[r.parentName], !o && (o = t[s], !o)) return null;
                    o && (l += o.name)
                }
                return o
            }

            function T(e, t) {
                var n, i, r, o;
                if (0 === t.length) return -1;
                for (n = t[0], i = e.members, r = 0, o = i.length; o > r; r++)
                    if (i[r].name == n.name) return r
            }

            function D(n, i) {
                if (!(0 > i)) {
                    var r = {
                        name: Se,
                        measure: !0,
                        children: [e.extend({
                            members: [],
                            dataIndex: n.dataIndex
                        }, n.members[i])]
                    };
                    n.members.splice(i, 1, r), n.dataIndex = t
                }
            }

            function A(e, t) {
                var n, i, r, o, a, s;
                if (1 > e.length) return [];
                for (n = [], i = {}, r = T(e[0], t), o = 0; e.length > o; o++) a = e[o], a.dataIndex = o, D(a, r), s = S(a, i), s ? s.children.push(0 > r || !s.measure ? a : a.members[r].children[0]) : n.push(a), C(a.members, i);
                return n
            }

            function E(e, t) {
                var n, i, r, o, a, s, l, c, d;
                if (!e || !e.length) return t;
                for (n = [], i = I(e), r = i.length, o = Math.max(t.length / r, 1), a = 0; r > a; a++)
                    for (l = o * a, c = o * i[a], s = 0; o > s; s++) d = parseInt(c + s, 10), n[parseInt(l + s, 10)] = t[d] || {
                        value: "",
                        fmtValue: "",
                        ordinal: d
                    };
                return n
            }

            function F(e, t) {
                var n, i, r, o, a, s, l, c;
                if (!e || !e.length) return t;
                for (n = [], i = I(e), r = i.length, o = Math.max(t.length / r, 1), s = 0; o > s; s++)
                    for (l = r * s, a = 0; r > a; a++) c = i[a] + l, n[l + a] = t[c] || {
                        value: "",
                        fmtValue: "",
                        ordinal: c
                    };
                return n
            }

            function I(e) {
                var n, i, r, o, a, s, l;
                for (e = e.slice(), n = [], i = e.shift(); i;) {
                    for (i.dataIndex !== t && n.push(i.dataIndex), a = 0, r = 0, o = i.members.length; o > r; r++) l = i.members[r], s = l.children, l.measure ? [].splice.apply(e, [0, 0].concat(s)) : [].splice.apply(e, [a, 0].concat(s)), a += s.length;
                    i = e.shift()
                }
                return n
            }

            function M(e) {
                var t = e.split(".");
                return t.length > 2 ? t[0] + "." + t[1] : e
            }

            function R(e, t) {
                var n = e.length - 1,
                    i = e[n],
                    r = P(t, i);
                return r && r.dir ? i = "ORDER(" + i + ".Children," + r.field + ".CurrentMember.MEMBER_CAPTION," + r.dir + ")" : i += ".Children", e[n] = i, e
            }

            function P(e, t) {
                for (var n = 0, i = e.length; i > n; n++)
                    if (0 === t.indexOf(e[n].field)) return e[n];
                return null
            }

            function z(e) {
                var t, n = "CROSSJOIN({";
                return e.length > 2 ? (t = e.pop(), n += z(e)) : (n += e.shift(), t = e.pop()), n += "},{", n += t, n += "})"
            }

            function B(e, t) {
                var n = e.slice(0);
                return t.length > 1 && n.push("{" + L(t).join(",") + "}"), z(n)
            }

            function L(e) {
                for (var n, i = 0, r = e.length, o = []; r > i; i++) n = e[i], o.push(n.name !== t ? n.name : n);
                return o
            }

            function H(e) {
                return e = e.name || e, "[object Array]" === _e.call(e) && (e = e[e.length - 1]), e
            }

            function N(e) {
                for (var t = e.length, n = [], i = 0; t > i; i++) n.push(e[i].name[0]);
                return n
            }

            function O(e, t) {
                var n, i, r, o = 0,
                    a = e.length,
                    s = t.length;
                for (t = t.slice(0); a > o; o++)
                    for (n = e[o], r = 0; s > r; r++)
                        if (i = M(t[r]), -1 !== n.indexOf(i)) {
                            t[r] = n;
                            break
                        } return {
                    names: t,
                    expandedIdx: r,
                    uniquePath: t.slice(0, r + 1).join("")
                }
            }

            function V(e) {
                for (var t, n, i, r, o, a, s = [], l = [], c = [], d = 0, u = e.length; u > d; d++)
                    if (t = e[d], r = t.name, a = !1, "[object Array]" !== _e.call(r) && (t.name = r = [r]), r.length > 1) l.push(t);
                    else {
                        for (o = M(r[0]), n = 0, i = c.length; i > n; n++)
                            if (0 === c[n].name[0].indexOf(o)) {
                                a = !0;
                                break
                            } a || c.push(t), t.expand && s.push(t)
                    } return s = s.concat(l), {
                    root: c,
                    expanded: s
                }
            }

            function U(e, t, n) {
                var i, r, o, a, s, l, c, d, u = "";
                if (e = e || [], i = V(e), r = i.root, o = N(r), a = [], i = i.expanded, s = i.length, l = 0, d = [], o.length > 1 || t.length > 1) {
                    for (a.push(B(o, t)); s > l; l++) c = R(i[l].name, n), d = O(c, o).names, a.push(B(d, t));
                    u += a.join(",")
                } else {
                    for (; s > l; l++) c = R(i[l].name, n), d.push(c[0]);
                    u += o.concat(d).join(",")
                }
                return u
            }

            function W(e) {
                var t = "",
                    n = e.value,
                    i = e.field,
                    r = e.operator;
                return "in" == r ? (t += "{", t += n, t += "}") : (t += "Filter(", t += i + ".MEMBERS", t += fe.format(Y[r], i, n), t += ")"), t
            }

            function j(e, t) {
                var n, i, r = "",
                    o = e.filters,
                    a = o.length;
                for (i = a - 1; i >= 0; i--) n = "SELECT (", n += W(o[i]), n += ") ON 0", i == a - 1 ? (n += " FROM [" + t + "]", r = n) : r = n + " FROM ( " + r + " )";
                return r
            }

            function q(e, t, n) {
                var i, r, o = "";
                if (t) {
                    o += "<" + e + ">";
                    for (r in t) i = t[r], n && (r = r.replace(/([A-Z]+(?=$|[A-Z][a-z])|[A-Z]?[a-z]+)/g, "$1_").toUpperCase().replace(/_$/, "")), o += "<" + r + ">" + i + "</" + r + ">";
                    o += "</" + e + ">"
                } else o += "<" + e + "/>";
                return o
            }

            function G(e) {
                if (null == e) return [];
                var t = _e.call(e);
                return "[object Array]" !== t ? [e] : e
            }

            function $(e) {
                var t, n, i, r, o = {
                        tuples: []
                    },
                    a = G(fe.getter("Tuples.Tuple", !0)(e)),
                    s = fe.getter("Caption['#text']"),
                    l = fe.getter("UName['#text']"),
                    c = fe.getter("LName['#text']"),
                    d = fe.getter("LNum['#text']"),
                    u = fe.getter("CHILDREN_CARDINALITY['#text']", !0),
                    h = fe.getter("['@Hierarchy']"),
                    f = fe.getter("PARENT_UNIQUE_NAME['#text']", !0);
                for (t = 0; a.length > t; t++) {
                    for (n = [], i = G(a[t].Member), r = 0; i.length > r; r++) n.push({
                        children: [],
                        caption: s(i[r]),
                        name: l(i[r]),
                        levelName: c(i[r]),
                        levelNum: d(i[r]),
                        hasChildren: parseInt(u(i[r]), 10) > 0,
                        parentName: f(i[r]),
                        hierarchy: h(i[r])
                    });
                    o.tuples.push({
                        members: n
                    })
                }
                return o
            }
            var Y, K, Q, X, J, Z, ee, te, ne, ie, re, oe, ae, se, le, ce, de, ue, he, fe = window.kendo,
                pe = fe.ui,
                me = fe.Class,
                ge = pe.Widget,
                ve = fe.data.DataSource,
                _e = {}.toString,
                be = function(e) {
                    return e
                },
                we = e.map,
                ye = e.extend,
                ke = fe.isFunction,
                xe = "change",
                Ce = "error",
                Se = "Measures",
                Te = "progress",
                De = "stateReset",
                Ae = "auto",
                Ee = "<div/>",
                Fe = ".kendoPivotGrid",
                Ie = "__row_total__",
                Me = "dataBinding",
                Re = "dataBound",
                Pe = "expandMember",
                ze = "collapseMember",
                Be = "k-i-arrow-s",
                Le = "k-i-arrow-e",
                He = "<span>#: data.member.caption || data.member.name #</span>",
                Ne = '<span class="k-icon k-i-kpi-#=data.dataItem.value > 0 ? "open" : data.dataItem.value < 0 ? "denied" : "hold"#">#:data.dataItem.value#</span>',
                Oe = '<span class="k-icon k-i-kpi-#=data.dataItem.value > 0 ? "increase" : data.dataItem.value < 0 ? "decrease" : "equal"#">#:data.dataItem.value#</span>',
                Ve = '#= data.dataItem ? kendo.htmlEncode(data.dataItem.fmtValue || data.dataItem.value) || "&nbsp;" : "&nbsp;" #',
                Ue = '<table class="k-pivot-layout"><tr><td><div class="k-pivot-rowheaders"></div></td><td><div class="k-pivot-table k-state-default"></div></td></tr></table>',
                We = {
                    sum: function(e, t) {
                        var n = t.accumulator;
                        return u(n) ? u(e) && (n += e) : n = e, n
                    },
                    count: function(e, t) {
                        return (t.accumulator || 0) + 1
                    },
                    average: {
                        aggregate: function(e, n) {
                            var i = n.accumulator;
                            return n.count === t && (n.count = 0), u(i) ? u(e) && (i += e) : i = e, u(e) && n.count++, i
                        },
                        result: function(e) {
                            var t = e.accumulator;
                            return u(t) && (t /= e.count), t
                        }
                    },
                    max: function(e, t) {
                        var n = t.accumulator;
                        return u(n) || h(n) || (n = e), e > n && (u(e) || h(e)) && (n = e), n
                    },
                    min: function(e, t) {
                        var n = t.accumulator;
                        return u(n) || h(n) || (n = e), n > e && (u(e) || h(e)) && (n = e), n
                    }
                },
                je = me.extend({
                    init: function(e) {
                        this.options = ye({}, this.options, e), this.dimensions = this._normalizeDescriptors("field", this.options.dimensions), this.measures = this._normalizeDescriptors("name", this.options.measures)
                    },
                    _normalizeDescriptors: function(e, t) {
                        var n, i, r, o;
                        if (t = t || {}, n = {}, "[object Array]" === _e.call(t)) {
                            for (r = 0, o = t.length; o > r; r++) i = t[r], "string" == typeof i ? n[i] = {} : i[e] && (n[i[e]] = i);
                            t = n
                        }
                        return t
                    },
                    _rootTuples: function(e, n) {
                        var i, r, o, a, s = n.length || 1,
                            l = this.dimensions || [],
                            c = 0,
                            d = e.length,
                            u = [],
                            h = [];
                        if (d || n.length) {
                            for (c = 0; s > c; c++) {
                                for (i = {
                                    members: []
                                }, a = 0; d > a; a++) r = e[a], o = r.split("&"), i.members[i.members.length] = {
                                    children: [],
                                    caption: (l[r] || {}).caption || "All",
                                    name: r,
                                    levelName: r,
                                    levelNum: "0",
                                    hasChildren: !0,
                                    parentName: o.length > 1 ? o[0] : t,
                                    hierarchy: r
                                };
                                s > 1 && (i.members[i.members.length] = {
                                    children: [],
                                    caption: n[c].caption,
                                    name: n[c].descriptor.name,
                                    levelName: "MEASURES",
                                    levelNum: "0",
                                    hasChildren: !1,
                                    parentName: t,
                                    hierarchy: "MEASURES"
                                }), u[u.length] = i
                            }
                            h.push(Ie)
                        }
                        return {
                            keys: h,
                            tuples: u
                        }
                    },
                    _expandedTuples: function(e, n, i) {
                        var r, o, a, s, l, c, d, u, h, f, p, m = i.length || 1,
                            g = this.dimensions || [],
                            v = [],
                            _ = [];
                        for (a in e) {
                            for (s = e[a], d = this._findExpandedMember(n, s.uniquePath), l = v[d.index] || [], c = _[d.index] || [], u = d.member.names, r = 0; m > r; r++) {
                                for (o = {
                                    members: []
                                }, p = 0; u.length > p; p++) p === d.member.expandedIdx ? (o.members[o.members.length] = {
                                    children: [],
                                    caption: s.value,
                                    name: s.name,
                                    hasChildren: !1,
                                    levelNum: 1,
                                    levelName: s.parentName + s.name,
                                    parentName: s.parentName,
                                    hierarchy: s.parentName + s.name
                                }, 0 === r && c.push(se(o, p).join(""))) : (f = u[p], h = f.split("&"), o.members[o.members.length] = {
                                    children: [],
                                    caption: (g[f] || {}).caption || "All",
                                    name: f,
                                    levelName: f,
                                    levelNum: "0",
                                    hasChildren: !0,
                                    parentName: h.length > 1 ? h[0] : t,
                                    hierarchy: f
                                });
                                m > 1 && (o.members[o.members.length] = {
                                    children: [],
                                    caption: i[r].caption,
                                    name: i[r].descriptor.name,
                                    levelName: "MEASURES",
                                    levelNum: "0",
                                    hasChildren: !0,
                                    parentName: t,
                                    hierarchy: "MEASURES"
                                }), l[l.length] = o
                            }
                            v[d.index] = l, _[d.index] = c
                        }
                        return {
                            keys: _,
                            tuples: v
                        }
                    },
                    _findExpandedMember: function(e, t) {
                        for (var n = 0; e.length > n; n++)
                            if (e[n].uniquePath === t) return {
                                member: e[n],
                                index: n
                            }
                    },
                    _asTuples: function(e, t, n) {
                        var i, r;
                        return n = n || [], i = this._rootTuples(t.root, n), r = this._expandedTuples(e, t.expanded, n), {
                            keys: [].concat.apply(i.keys, r.keys),
                            tuples: [].concat.apply(i.tuples, r.tuples)
                        }
                    },
                    _measuresInfo: function(e, t) {
                        for (var n, i, r = 0, o = e && e.length, a = [], s = {}, l = {}, c = this.measures || {}; o > r; r++) i = e[r].descriptor.name, n = c[i] || {}, a.push(i), n.result && (s[i] = n.result), n.format && (l[i] = n.format);
                        return {
                            names: a,
                            formats: l,
                            resultFuncs: s,
                            rowAxis: t
                        }
                    },
                    _toDataArray: function(e, t, n, i) {
                        var r, o, a, s, l, c, d, u, h, f, p = [],
                            m = 1,
                            g = [],
                            v = n.length || 1,
                            _ = i.length || 1;
                        for (t.rowAxis ? (g = t.names, m = g.length) : f = t.names, a = 0; v > a; a++)
                            for (d = e[n[a] || Ie], c = 0; m > c; c++)
                                for (t.rowAxis && (f = [g[c]]), s = 0; _ > s; s++)
                                    for (h = i[s] || Ie, u = d.items[h], r = h === Ie ? d.aggregates : u ? u.aggregates : {}, l = 0; f.length > l; l++) o = f[l], this._addData(p, r[o], t.formats[o], t.resultFuncs[o]);
                        return p
                    },
                    _addData: function(e, t, n, i) {
                        var r, o = "";
                        t && (t = i ? i(t) : t.accumulator, o = n ? fe.format(n, t) : t), r = e.length, e[r] = {
                            ordinal: r,
                            value: t || "",
                            fmtValue: o
                        }
                    },
                    _matchDescriptors: function(e, n, i) {
                        for (var r, o, a, s, l = n.names, c = n.expandedIdx; c > 0;)
                            if (r = l[--c].split("&"), r.length > 1 && (o = r[0], a = r[1], s = i[o](e), s = s !== t && null !== s ? "" + s : s, s != a)) return !1;
                        return !0
                    },
                    _calculateAggregate: function(e, t, n) {
                        var i, r, o, a = {};
                        for (o = 0; e.length > o; o++) r = e[o].descriptor.name, i = n.aggregates[r] || {}, i.accumulator = e[o].aggregator(t, i), a[r] = i;
                        return a
                    },
                    _processColumns: function(e, n, i, r, o, a, s, l) {
                        for (var c, d, u, h, f, p, m, g, v = o.dataItem, _ = 0; n.length > _; _++) d = n[_], this._matchDescriptors(v, d, i) && (g = d.names.slice(0, d.expandedIdx).join(""), p = d.names[d.expandedIdx], c = i[p](v), c = c !== t && null !== c ? "" + c : c, m = p, p = p + "&" + c, f = g + p, u = r[f] || {
                            index: s.columnIndex,
                            parentName: m,
                            name: p,
                            uniquePath: g + m,
                            value: c
                        }, h = a.items[f] || {
                            aggregates: {}
                        }, a.items[f] = {
                            index: u.index,
                            aggregates: this._calculateAggregate(e, o, h)
                        }, l && (r[f] || s.columnIndex++, r[f] = u))
                    },
                    _measureAggregators: function(e) {
                        var t, n, i, r, o, a, s = e.measures || [],
                            l = this.measures || {},
                            c = [];
                        if (s.length) {
                            for (i = 0, r = s.length; r > i; i++)
                                if (t = s[i], n = l[t.name], o = null, n) {
                                    if (a = n.aggregate, "string" == typeof a) {
                                        if (o = We[a.toLowerCase()], !o) throw Error("There is no such aggregate function");
                                        n.aggregate = o.aggregate || o, n.result = o.result
                                    }
                                    c.push({
                                        descriptor: t,
                                        caption: n.caption,
                                        result: n.result,
                                        aggregator: d(n)
                                    })
                                }
                        } else c.push({
                            descriptor: {
                                name: "default"
                            },
                            caption: "default",
                            aggregator: function() {
                                return 1
                            }
                        });
                        return c
                    },
                    _buildGetters: function(e) {
                        var t, n, i, o = {};
                        for (i = 0; e.length > i; i++) n = e[i], t = n.split("&"), t.length > 1 ? o[t[0]] = fe.getter(t[0], !0) : o[n] = fe.getter(r(n), !0);
                        return o
                    },
                    _parseDescriptors: function(e) {
                        var t, n = V(e),
                            i = N(n.root),
                            r = n.expanded,
                            o = [];
                        for (t = 0; r.length > t; t++) o.push(O(r[t].name, i));
                        return {
                            root: i,
                            expanded: o
                        }
                    },
                    _filter: function(e, t) {
                        var n, i, r;
                        if (!t) return e;
                        for (i = 0, r = t.filters; r.length > i; i++) n = r[i], "in" === n.operator && (r[i] = this._normalizeFilter(n));
                        return new fe.data.Query(e).filter(t).data
                    },
                    _normalizeFilter: function(e) {
                        var t, n = e.value.split(","),
                            i = [];
                        if (!n.length) return n;
                        for (t = 0; n.length > t; t++) i.push({
                            field: e.field,
                            operator: "eq",
                            value: n[t]
                        });
                        return {
                            logic: "or",
                            filters: i
                        }
                    },
                    process: function(e, n) {
                        var r, o, a, s, l, c, d, u, h, f, p, m, g, v, _, b, w, y, k, x, C, S, T, D, A, E, F, I, M, R;
                        if (e = e || [], n = n || {}, e = this._filter(e, n.filter), r = n.measures || [], o = "rows" === n.measuresAxis, a = n.columns || [], s = n.rows || [], !a.length && s.length && (!r.length || r.length && o) && (a = s, s = [], o = !1), a.length || s.length || (o = !1), !a.length && r.length && (a = i(n.measures)), a = this._parseDescriptors(a), s = this._parseDescriptors(s), l = {}, c = {}, d = {}, h = {
                            columnIndex: 0
                        }, f = this._measureAggregators(n), p = this._buildGetters(a.root), m = this._buildGetters(s.root), g = !1, v = a.expanded, _ = s.expanded, y = 0 !== _.length, M = e.length, R = 0, a.root.length || s.root.length)
                            for (g = !0, R = 0; M > R; R++)
                                for (b = e[R], w = {
                                    dataItem: b,
                                    index: R
                                }, S = l[Ie] || {
                                    items: {},
                                    aggregates: {}
                                }, this._processColumns(f, v, p, c, w, S, h, !y), S.aggregates = this._calculateAggregate(f, w, S), l[Ie] = S, k = 0; _.length > k; k++) x = _[k], this._matchDescriptors(b, x, m) ? (D = x.names.slice(0, x.expandedIdx).join(""), C = x.names[x.expandedIdx], A = C, u = m[C](b), u = u !== t ? "" + u : u, C = C + "&" + u, T = D + C, d[T] = {
                                    uniquePath: D + A,
                                    parentName: A,
                                    name: C,
                                    value: u
                                }, E = l[T] || {
                                    items: {},
                                    aggregates: {}
                                }, this._processColumns(f, v, p, c, w, E, h, !0), E.aggregates = this._calculateAggregate(f, w, E), l[T] = E) : this._processColumns(f, v, p, c, w, {
                                    items: {},
                                    aggregates: {}
                                }, h, !0);
                        return g && M ? (!(f.length > 1) || n.columns && n.columns.length || (a = {
                            root: [],
                            expanded: []
                        }), F = this._asTuples(c, a, o ? [] : f), I = this._asTuples(d, s, o ? f : []), c = F.tuples, d = I.tuples, l = this._toDataArray(l, this._measuresInfo(f, o), I.keys, F.keys)) : l = c = d = [], {
                            axes: {
                                columns: {
                                    tuples: c
                                },
                                rows: {
                                    tuples: d
                                }
                            },
                            data: l
                        }
                    }
                }),
                qe = me.extend({
                    init: function(e, t) {
                        this.transport = t, this.options = t.options || {}, this.transport.discover || ke(e.discover) && (this.discover = e.discover)
                    },
                    read: function(e) {
                        return this.transport.read(e)
                    },
                    update: function(e) {
                        return this.transport.update(e)
                    },
                    create: function(e) {
                        return this.transport.create(e)
                    },
                    destroy: function(e) {
                        return this.transport.destroy(e)
                    },
                    discover: function(e) {
                        return this.transport.discover ? this.transport.discover(e) : (e.success({}), t)
                    },
                    catalog: function(n) {
                        var i, r = this.options || {};
                        return n === t ? (r.connection || {}).catalog : (i = r.connection || {}, i.catalog = n, this.options.connection = i, e.extend(this.transport.options, {
                            connection: i
                        }), t)
                    },
                    cube: function(e) {
                        var n, i = this.options || {};
                        return e === t ? (i.connection || {}).cube : (n = i.connection || {}, n.cube = e, this.options.connection = n, ye(!0, this.transport.options, {
                            connection: n
                        }), t)
                    }
                }),
                Ge = ve.extend({
                    init: function(t) {
                        var r, o = ((t || {}).schema || {}).cube,
                            a = "columns",
                            s = {
                                axes: be,
                                cubes: be,
                                catalogs: be,
                                measures: be,
                                dimensions: be,
                                hierarchies: be,
                                levels: be,
                                members: be
                            };
                        o && (s = e.extend(s, this._cubeSchema(o)), this.cubeBuilder = new je(o)), ve.fn.init.call(this, ye(!0, {}, {
                            schema: s
                        }, t)), this.transport = new qe(this.options.transport || {}, this.transport), this._columns = i(this.options.columns), this._rows = i(this.options.rows), r = this.options.measures || [], "[object Object]" === _e.call(r) && (a = r.axis || "columns", r = r.values || []), this._measures = n(r), this._measuresAxis = a, this._skipNormalize = 0, this._axes = {}
                    },
                    _cubeSchema: function(t) {
                        return {
                            dimensions: function() {
                                var e, n = [],
                                    i = t.dimensions;
                                for (e in i) n.push({
                                    name: e,
                                    caption: i[e].caption || e,
                                    uniqueName: e,
                                    defaultHierarchy: e,
                                    type: 1
                                });
                                return t.measures && n.push({
                                    name: Se,
                                    caption: Se,
                                    uniqueName: Se,
                                    type: 2
                                }), n
                            },
                            hierarchies: function() {
                                return []
                            },
                            measures: function() {
                                var e, n = [],
                                    i = t.measures;
                                for (e in i) n.push({
                                    name: e,
                                    caption: e,
                                    uniqueName: e,
                                    aggregator: e
                                });
                                return n
                            },
                            members: e.proxy(function(e, n) {
                                var i, o, a = n.levelUniqueName || n.memberUniqueName,
                                    s = fe.getter(this.options.schema.data, !0),
                                    l = s(this.options.data) || this._rawData || [],
                                    c = [],
                                    d = 0,
                                    u = {};
                                if (a && (a = a.split(".")[0]), !n.treeOp) return c.push({
                                    caption: t.dimensions[a].caption || a,
                                    childrenCardinality: "1",
                                    dimensionUniqueName: a,
                                    hierarchyUniqueName: a,
                                    levelUniqueName: a,
                                    name: a,
                                    uniqueName: a
                                }), c;
                                for (i = fe.getter(r(a), !0); l.length > d; d++) o = i(l[d]), !o && 0 !== o || u[o] || (u[o] = !0, c.push({
                                    caption: o,
                                    childrenCardinality: "0",
                                    dimensionUniqueName: a,
                                    hierarchyUniqueName: a,
                                    levelUniqueName: a,
                                    name: o,
                                    uniqueName: o
                                }));
                                return c
                            }, this)
                        }
                    },
                    options: {
                        serverSorting: !0,
                        serverPaging: !0,
                        serverFiltering: !0,
                        serverGrouping: !0,
                        serverAggregates: !0
                    },
                    catalog: function(e) {
                        return e === t ? this.transport.catalog() : (this.transport.catalog(e), this._mergeState({}), this._axes = {}, this.data([]), t)
                    },
                    cube: function(e) {
                        return e === t ? this.transport.cube() : (this.transport.cube(e), this._axes = {}, this._mergeState({}), this.data([]), t)
                    },
                    axes: function() {
                        return this._axes
                    },
                    columns: function(e) {
                        return e === t ? this._columns : (this._skipNormalize += 1, this._clearAxesData = !0, this._columns = i(e), this.query({
                            columns: e,
                            rows: this.rowsAxisDescriptors(),
                            measures: this.measures()
                        }), t)
                    },
                    rows: function(e) {
                        return e === t ? this._rows : (this._skipNormalize += 1, this._clearAxesData = !0, this._rows = i(e), this.query({
                            columns: this.columnsAxisDescriptors(),
                            rows: e,
                            measures: this.measures()
                        }), t)
                    },
                    measures: function(e) {
                        return e === t ? this._measures : (this._skipNormalize += 1, this._clearAxesData = !0, this.query({
                            columns: this.columnsAxisDescriptors(),
                            rows: this.rowsAxisDescriptors(),
                            measures: n(e)
                        }), t)
                    },
                    measuresAxis: function() {
                        return this._measuresAxis || "columns"
                    },
                    _expandPath: function(e, t) {
                        var n, r, o, a = "columns" === t ? "columns" : "rows",
                            s = "columns" === t ? "rows" : "columns",
                            l = i(e),
                            d = H(l[l.length - 1]);
                        for (this._lastExpanded = a, l = c(this.axes()[a], l, this.measures()), n = 0; l.length > n; n++)
                            if (r = H(l[n]), r === d) {
                                if (l[n].expand) return;
                                l[n].expand = !0
                            } else l[n].expand = !1;
                        o = {}, o[a] = l, o[s] = this._descriptorsForAxis(s), this._query(o)
                    },
                    _descriptorsForAxis: function(e) {
                        var t = this.axes(),
                            n = this[e]() || [];
                        return t && t[e] && t[e].tuples && t[e].tuples[0] && (n = a(t[e].tuples || [])), n
                    },
                    columnsAxisDescriptors: function() {
                        return this._descriptorsForAxis("columns")
                    },
                    rowsAxisDescriptors: function() {
                        return this._descriptorsForAxis("rows")
                    },
                    _process: function(e, t) {
                        this._view = e, t = t || {}, t.items = t.items || this._view, this.trigger(xe, t)
                    },
                    _query: function(e) {
                        var t = this;
                        return e || (this._skipNormalize += 1, this._clearAxesData = !0), t.query(ye({}, {
                            page: t.page(),
                            pageSize: t.pageSize(),
                            sort: t.sort(),
                            filter: t.filter(),
                            group: t.group(),
                            aggregate: t.aggregate(),
                            columns: this.columnsAxisDescriptors(),
                            rows: this.rowsAxisDescriptors(),
                            measures: this.measures()
                        }, e))
                    },
                    query: function(t) {
                        var n = this._mergeState(t);
                        return this._data.length && this.cubeBuilder ? (this._params(n), this._updateLocalData(this._pristineData), e.Deferred().resolve().promise()) : this.read(n)
                    },
                    _mergeState: function(e) {
                        return e = ve.fn._mergeState.call(this, e), e !== t && (this._measures = n(e.measures), e.columns ? e.columns = i(e.columns) : e.columns || (this._columns = []), e.rows ? e.rows = i(e.rows) : e.rows || (this._rows = [])), e
                    },
                    filter: function(e) {
                        return e === t ? this._filter : (this._skipNormalize += 1, this._clearAxesData = !0, this._query({
                            filter: e,
                            page: 1
                        }), t)
                    },
                    expandColumn: function(e) {
                        this._expandPath(e, "columns")
                    },
                    expandRow: function(e) {
                        this._expandPath(e, "rows")
                    },
                    success: function(e) {
                        var t;
                        this.cubeBuilder && (t = (this.reader.data(e) || []).slice(0)), ve.fn.success.call(this, e), t && (this._pristineData = t)
                    },
                    _processResult: function(e, t) {
                        var n, i, r, o, a, s, l, c, d, u, h;
                        return this.cubeBuilder && (n = this.cubeBuilder.process(e, this._requestData), e = n.data, t = n.axes), c = this.columns(), d = this.rows(), u = t.columns && t.columns.tuples, c.length || !d.length || !u || !this._rowMeasures().length && this.measures().length || (t = {
                            columns: {},
                            rows: t.columns
                        }), c.length || d.length || "rows" !== this.measuresAxis() || !u || (t = {
                            columns: {},
                            rows: t.columns
                        }), this._axes = {
                            columns: b(this._axes.columns),
                            rows: b(this._axes.rows)
                        }, t = {
                            columns: b(t.columns),
                            rows: b(t.rows)
                        }, i = this._normalizeTuples(t.columns.tuples, this._axes.columns.tuples, c, this._columnMeasures()), r = this._normalizeTuples(t.rows.tuples, this._axes.rows.tuples, d, this._rowMeasures()), this._skipNormalize -= 1, this.cubeBuilder || (e = this._normalizeData({
                            columnsLength: t.columns.tuples.length,
                            rowsLength: t.rows.tuples.length,
                            columnIndexes: i,
                            rowIndexes: r,
                            data: e
                        })), "rows" == this._lastExpanded ? (o = t.columns.tuples, s = this._columnMeasures(), a = p(t.columns, this._axes.columns, s), a && (l = "columns", t.columns = a, m(o, a.tuples, t.rows.tuples.length, s, e), this.cubeBuilder || (e = this._normalizeData({
                            columnsLength: _(t.columns.tuples, s),
                            rowsLength: t.rows.tuples.length,
                            data: e
                        })))) : "columns" == this._lastExpanded && (o = t.rows.tuples, s = this._rowMeasures(), a = p(t.rows, this._axes.rows, s), a && (l = "rows", t.rows = a, g(o, a.tuples, t.columns.tuples.length, s, e), this.cubeBuilder || (e = this._normalizeData({
                            columnsLength: _(t.rows.tuples, s),
                            rowsLength: t.columns.tuples.length,
                            data: e
                        })))), this._lastExpanded = null, h = this._mergeAxes(t, e, l), this._axes = h.axes, h.data
                    },
                    _readData: function(e) {
                        var t = this.reader.axes(e),
                            n = this.reader.data(e);
                        return this.cubeBuilder && (this._rawData = n), this._processResult(n, t)
                    },
                    _createTuple: function(e, t, n) {
                        var i, r, o, a, s, l, c, d, u = e.members,
                            h = u.length,
                            f = {
                                members: []
                            },
                            p = 0;
                        for (t && (h -= 1); h > p; p++) d = u[p], r = +d.levelNum, o = d.name, a = d.parentName, c = d.caption || o, s = d.hasChildren, l = d.hierarchy, i = d.levelName, n && (c = "All", 0 === r ? a = d.name : r -= 1, s = !0, o = l = i = a), f.members.push({
                            name: o,
                            children: [],
                            caption: c,
                            levelName: i,
                            levelNum: "" + r,
                            hasChildren: s,
                            hierarchy: l,
                            parentName: n ? "" : a
                        });
                        return t && f.members.push({
                            name: t.name,
                            children: []
                        }), f
                    },
                    _hasRoot: function(e, t, n) {
                        var i, r, o, a, s, l, c;
                        if (t.length) return x(t, e).tuple;
                        for (i = e.members, a = !0, l = 0, c = i.length; c > l; l++)
                            if (r = i[l], s = +r.levelNum || 0, o = n[l], !(0 === s || o && r.name === H(o))) {
                                a = !1;
                                break
                            } return a
                    },
                    _mergeAxes: function(e, t, n) {
                        var i, r, o, a, s, l = this._columnMeasures(),
                            c = this._rowMeasures(),
                            d = this.axes(),
                            u = _(d.rows.tuples, c),
                            h = e.rows.tuples.length,
                            f = _(d.columns.tuples, l),
                            p = e.columns.tuples.length;
                        return "columns" == n ? (p = f, r = e.columns.tuples) : (r = A(e.columns.tuples, l), t = F(r, t)), o = y(d.columns.tuples, r, l), "rows" == n ? (h = _(e.rows.tuples, c), r = e.rows.tuples) : (r = A(e.rows.tuples, c), t = E(r, t)), a = y(d.rows.tuples, r, c), d.columns.tuples = o.tuples, d.rows.tuples = a.tuples, f !== _(d.columns.tuples, l) ? (i = o.index + w(o.parsedRoot, o.memberIndex, l), s = f + p, t = this._mergeColumnData(t, i, h, p, s)) : u !== _(d.rows.tuples, c) && (i = a.index + w(a.parsedRoot, a.memberIndex, c), t = this._mergeRowData(t, i, h, p)), 0 === d.columns.tuples.length && 0 === d.rows.tuples.length && (t = []), {
                            axes: d,
                            data: t
                        }
                    },
                    _mergeColumnData: function(e, t, n, i, r) {
                        var o, a, s, l = this.data().toJSON(),
                            c = 0,
                            d = Math.max(this._columnMeasures().length, 1);
                        for (n = Math.max(n, 1), l.length > 0 && (c = d, r -= d), o = 0; n > o; o++) a = t + o * r, s = e.splice(0, i), s.splice(0, c), [].splice.apply(l, [a, 0].concat(s));
                        return l
                    },
                    _mergeRowData: function(e, t, n, i) {
                        var r, o, a, s = this.data().toJSON(),
                            l = Math.max(this._rowMeasures().length, 1);
                        for (i = Math.max(i, 1), s.length > 0 && (n -= l, e.splice(0, i * l)), r = 0; n > r; r++) a = e.splice(0, i), o = t * i + r * i, [].splice.apply(s, [o, 0].concat(a));
                        return s
                    },
                    _columnMeasures: function() {
                        var e = this.measures(),
                            t = [];
                        return "columns" === this.measuresAxis() && (0 === this.columns().length ? t = e : e.length > 1 && (t = e)), t
                    },
                    _rowMeasures: function() {
                        var e = this.measures(),
                            t = [];
                        return "rows" === this.measuresAxis() && (0 === this.rows().length ? t = e : e.length > 1 && (t = e)), t
                    },
                    _updateLocalData: function(e, t) {
                        this.cubeBuilder && (t && (this._requestData = t), e = this._processResult(e)), this._data = this._observe(e), this._ranges = [], this._addRange(this._data), this._total = this._data.length, this._pristineTotal = this._total, this._process(this._data)
                    },
                    data: function(e) {
                        var n = this;
                        return e === t ? n._data : (this._pristineData = e.slice(0), this._updateLocalData(e, {
                            columns: this.columns(),
                            rows: this.rows(),
                            measures: this.measures()
                        }), t)
                    },
                    _normalizeTuples: function(e, t, n, i) {
                        var r, o, a, s = i.length || 1,
                            l = 0,
                            c = [],
                            d = {},
                            u = 0;
                        if (e.length) {
                            if (0 >= this._skipNormalize && !this._hasRoot(e[0], t, n)) {
                                for (this._skipNormalize = 0; s > l; l++) c.push(this._createTuple(e[0], i[l], !0)), d[l] = l;
                                e.splice.apply(e, [0, e.length].concat(c).concat(e)), l = s
                            }
                            if (i.length)
                                for (a = r = e[l], o = r.members.length - 1; r;) {
                                    if (u >= s && (u = 0), r.members[o].name !== i[u].name && (e.splice(l, 0, this._createTuple(r, i[u])), d[l] = l), l += 1, u += 1, r = e[l], s > u && (!r || le(a, o - 1) !== le(r, o - 1))) {
                                        for (; s > u; u++) e.splice(l, 0, this._createTuple(a, i[u])), d[l] = l, l += 1;
                                        r = e[l]
                                    }
                                    a = r
                                }
                            return d
                        }
                    },
                    _addMissingDataItems: function(e, n) {
                        for (; n.rowIndexes[parseInt(e.length / n.columnsLength, 10)] !== t;)
                            for (var i = 0; n.columnsLength > i; i++) e = f(e);
                        for (; n.columnIndexes[e.length % n.columnsLength] !== t;) e = f(e);
                        return e
                    },
                    _normalizeOrdinals: function(e, t, n) {
                        var i = n.lastOrdinal;
                        if (!t) return f(e);
                        if (t.ordinal - i > 1)
                            for (i += 1; t.ordinal > i && n.length > e.length;) e = this._addMissingDataItems(f(e), n), i += 1;
                        return t.ordinal = e.length, e[e.length] = t, e
                    },
                    _normalizeData: function(e) {
                        var t, n, i, r = e.data,
                            o = 0,
                            a = [];
                        if (e.lastOrdinal = 0, e.columnIndexes = e.columnIndexes || {}, e.rowIndexes = e.rowIndexes || {}, e.columnsLength = e.columnsLength || 1, e.rowsLength = e.rowsLength || 1, e.length = e.columnsLength * e.rowsLength, i = e.length, r.length === i) return r;
                        for (; i > a.length;) t = r[o++], t && (n = t.ordinal), a = this._normalizeOrdinals(this._addMissingDataItems(a, e), t, e), e.lastOrdinal = n;
                        return a
                    },
                    discover: function(t, n) {
                        var i = this,
                            r = i.transport;
                        return e.Deferred(function(e) {
                            r.discover(ye({
                                success: function(t) {
                                    t = i.reader.parse(t), i._handleCustomErrors(t) || (n && (t = n(t)), e.resolve(t))
                                },
                                error: function(t, n, r) {
                                    e.reject(t), i.error(t, n, r)
                                }
                            }, t))
                        }).promise().done(function() {
                            i.trigger("schemaChange")
                        })
                    },
                    schemaMeasures: function() {
                        var e = this;
                        return e.discover({
                            data: {
                                command: "schemaMeasures",
                                restrictions: {
                                    catalogName: e.transport.catalog(),
                                    cubeName: e.transport.cube()
                                }
                            }
                        }, function(t) {
                            return e.reader.measures(t)
                        })
                    },
                    schemaKPIs: function() {
                        var e = this;
                        return e.discover({
                            data: {
                                command: "schemaKPIs",
                                restrictions: {
                                    catalogName: e.transport.catalog(),
                                    cubeName: e.transport.cube()
                                }
                            }
                        }, function(t) {
                            return e.reader.kpis(t)
                        })
                    },
                    schemaDimensions: function() {
                        var e = this;
                        return e.discover({
                            data: {
                                command: "schemaDimensions",
                                restrictions: {
                                    catalogName: e.transport.catalog(),
                                    cubeName: e.transport.cube()
                                }
                            }
                        }, function(t) {
                            return e.reader.dimensions(t)
                        })
                    },
                    schemaHierarchies: function(e) {
                        var t = this;
                        return t.discover({
                            data: {
                                command: "schemaHierarchies",
                                restrictions: {
                                    catalogName: t.transport.catalog(),
                                    cubeName: t.transport.cube(),
                                    dimensionUniqueName: e
                                }
                            }
                        }, function(e) {
                            return t.reader.hierarchies(e)
                        })
                    },
                    schemaLevels: function(e) {
                        var t = this;
                        return t.discover({
                            data: {
                                command: "schemaLevels",
                                restrictions: {
                                    catalogName: t.transport.catalog(),
                                    cubeName: t.transport.cube(),
                                    hierarchyUniqueName: e
                                }
                            }
                        }, function(e) {
                            return t.reader.levels(e)
                        })
                    },
                    schemaCubes: function() {
                        var e = this;
                        return e.discover({
                            data: {
                                command: "schemaCubes",
                                restrictions: {
                                    catalogName: e.transport.catalog()
                                }
                            }
                        }, function(t) {
                            return e.reader.cubes(t)
                        })
                    },
                    schemaCatalogs: function() {
                        var e = this;
                        return e.discover({
                            data: {
                                command: "schemaCatalogs"
                            }
                        }, function(t) {
                            return e.reader.catalogs(t)
                        })
                    },
                    schemaMembers: function(e) {
                        var t = this,
                            n = function(e) {
                                return function(n) {
                                    return t.reader.members(n, e)
                                }
                            }(e);
                        return t.discover({
                            data: {
                                command: "schemaMembers",
                                restrictions: ye({
                                    catalogName: t.transport.catalog(),
                                    cubeName: t.transport.cube()
                                }, e)
                            }
                        }, n)
                    },
                    _params: function(e) {
                        this._clearAxesData && (this._axes = {}, this._data = this._observe([]), this._clearAxesData = !1, this.trigger(De));
                        var t = ve.fn._params.call(this, e);
                        return t = ye({
                            measures: this.measures(),
                            measuresAxis: this.measuresAxis(),
                            columns: this.columns(),
                            rows: this.rows()
                        }, t), this.cubeBuilder && (this._requestData = t), t
                    }
                });
            Ge.create = function(e) {
                e = e && e.push ? {
                    data: e
                } : e;
                var t = e || {},
                    n = t.data;
                if (t.data = n, !(t instanceof Ge) && t instanceof fe.data.DataSource) throw Error("Incorrect DataSource type. Only PivotDataSource instances are supported");
                return t instanceof Ge ? t : new Ge(t)
            }, Y = {
                contains: ', InStr({0}.CurrentMember.MEMBER_CAPTION,"{1}") > 0',
                doesnotcontain: ', InStr({0}.CurrentMember.MEMBER_CAPTION,"{1}") = 0',
                startswith: ', Left({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"',
                endswith: ', Right({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"',
                eq: ', {0}.CurrentMember.MEMBER_CAPTION = "{1}"',
                neq: ', NOT {0}.CurrentMember.MEMBER_CAPTION = "{1}"'
            }, K = {
                schemaCubes: "MDSCHEMA_CUBES",
                schemaCatalogs: "DBSCHEMA_CATALOGS",
                schemaMeasures: "MDSCHEMA_MEASURES",
                schemaDimensions: "MDSCHEMA_DIMENSIONS",
                schemaHierarchies: "MDSCHEMA_HIERARCHIES",
                schemaLevels: "MDSCHEMA_LEVELS",
                schemaMembers: "MDSCHEMA_MEMBERS",
                schemaKPIs: "MDSCHEMA_KPIS"
            }, Q = {
                read: function(e) {
                    var t, n, i, r, o, a = '<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><Execute xmlns="urn:schemas-microsoft-com:xml-analysis"><Command><Statement>';
                    return a += "SELECT NON EMPTY {", t = e.columns || [], n = e.rows || [], i = e.measures || [], r = "rows" === e.measuresAxis, o = e.sort || [], !t.length && n.length && (!i.length || i.length && r) && (t = n, n = [], r = !1), t.length || n.length || (r = !1), t.length ? a += U(t, r ? [] : i, o) : i.length && !r && (a += L(i).join(",")), a += "} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS", (n.length || r && i.length > 1) && (a += ", NON EMPTY {", a += n.length ? U(n, r ? i : [], o) : L(i).join(","), a += "} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON ROWS"), e.filter ? (a += " FROM ", a += "(", a += j(e.filter, e.connection.cube), a += ")") : a += " FROM [" + e.connection.cube + "]", 1 == i.length && t.length && (a += " WHERE (" + L(i).join(",") + ")"), a += "</Statement></Command><Properties><PropertyList><Catalog>" + e.connection.catalog + "</Catalog><Format>Multidimensional</Format></PropertyList></Properties></Execute></Body></Envelope>", a.replace(/\&/g, "&amp;")
                },
                discover: function(t) {
                    t = t || {};
                    var n = '<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><Discover xmlns="urn:schemas-microsoft-com:xml-analysis">';
                    return n += "<RequestType>" + (K[t.command] || t.command) + "</RequestType>", n += "<Restrictions>" + q("RestrictionList", t.restrictions, !0) + "</Restrictions>", t.connection && t.connection.catalog && (t.properties = e.extend({}, {
                        Catalog: t.connection.catalog
                    }, t.properties)), n += "<Properties>" + q("PropertyList", t.properties) + "</Properties>", n += "</Discover></Body></Envelope>"
                }
            }, X = fe.data.RemoteTransport.extend({
                init: function(e) {
                    var t = e;
                    e = this.options = ye(!0, {}, this.options, e), fe.data.RemoteTransport.call(this, e), ke(t.discover) ? this.discover = t.discover : "string" == typeof t.discover ? this.options.discover = {
                        url: t.discover
                    } : t.discover || (this.options.discover = this.options.read)
                },
                setup: function(t, n) {
                    return t.data = t.data || {}, e.extend(!0, t.data, {
                        connection: this.options.connection
                    }), fe.data.RemoteTransport.fn.setup.call(this, t, n)
                },
                options: {
                    read: {
                        dataType: "text",
                        contentType: "text/xml",
                        type: "POST"
                    },
                    discover: {
                        dataType: "text",
                        contentType: "text/xml",
                        type: "POST"
                    },
                    parameterMap: function(e, t) {
                        return Q[t](e, t)
                    }
                },
                discover: function(t) {
                    return e.ajax(this.setup(t, "discover"))
                }
            }), J = {
                cubes: {
                    name: fe.getter("CUBE_NAME['#text']", !0),
                    caption: fe.getter("CUBE_CAPTION['#text']", !0),
                    description: fe.getter("DESCRIPTION['#text']", !0),
                    type: fe.getter("CUBE_TYPE['#text']", !0)
                },
                catalogs: {
                    name: fe.getter("CATALOG_NAME['#text']", !0),
                    description: fe.getter("DESCRIPTION['#text']", !0)
                },
                measures: {
                    name: fe.getter("MEASURE_NAME['#text']", !0),
                    caption: fe.getter("MEASURE_CAPTION['#text']", !0),
                    uniqueName: fe.getter("MEASURE_UNIQUE_NAME['#text']", !0),
                    description: fe.getter("DESCRIPTION['#text']", !0),
                    aggregator: fe.getter("MEASURE_AGGREGATOR['#text']", !0),
                    groupName: fe.getter("MEASUREGROUP_NAME['#text']", !0),
                    displayFolder: fe.getter("MEASURE_DISPLAY_FOLDER['#text']", !0),
                    defaultFormat: fe.getter("DEFAULT_FORMAT_STRING['#text']", !0)
                },
                kpis: {
                    name: fe.getter("KPI_NAME['#text']", !0),
                    caption: fe.getter("KPI_CAPTION['#text']", !0),
                    value: fe.getter("KPI_VALUE['#text']", !0),
                    goal: fe.getter("KPI_GOAL['#text']", !0),
                    status: fe.getter("KPI_STATUS['#text']", !0),
                    trend: fe.getter("KPI_TREND['#text']", !0),
                    statusGraphic: fe.getter("KPI_STATUS_GRAPHIC['#text']", !0),
                    trendGraphic: fe.getter("KPI_TREND_GRAPHIC['#text']", !0),
                    description: fe.getter("KPI_DESCRIPTION['#text']", !0),
                    groupName: fe.getter("MEASUREGROUP_NAME['#text']", !0)
                },
                dimensions: {
                    name: fe.getter("DIMENSION_NAME['#text']", !0),
                    caption: fe.getter("DIMENSION_CAPTION['#text']", !0),
                    description: fe.getter("DESCRIPTION['#text']", !0),
                    uniqueName: fe.getter("DIMENSION_UNIQUE_NAME['#text']", !0),
                    defaultHierarchy: fe.getter("DEFAULT_HIERARCHY['#text']", !0),
                    type: fe.getter("DIMENSION_TYPE['#text']", !0)
                },
                hierarchies: {
                    name: fe.getter("HIERARCHY_NAME['#text']", !0),
                    caption: fe.getter("HIERARCHY_CAPTION['#text']", !0),
                    description: fe.getter("DESCRIPTION['#text']", !0),
                    uniqueName: fe.getter("HIERARCHY_UNIQUE_NAME['#text']", !0),
                    dimensionUniqueName: fe.getter("DIMENSION_UNIQUE_NAME['#text']", !0),
                    displayFolder: fe.getter("HIERARCHY_DISPLAY_FOLDER['#text']", !0),
                    origin: fe.getter("HIERARCHY_ORIGIN['#text']", !0),
                    defaultMember: fe.getter("DEFAULT_MEMBER['#text']", !0)
                },
                levels: {
                    name: fe.getter("LEVEL_NAME['#text']", !0),
                    caption: fe.getter("LEVEL_CAPTION['#text']", !0),
                    description: fe.getter("DESCRIPTION['#text']", !0),
                    uniqueName: fe.getter("LEVEL_UNIQUE_NAME['#text']", !0),
                    dimensionUniqueName: fe.getter("DIMENSION_UNIQUE_NAME['#text']", !0),
                    displayFolder: fe.getter("LEVEL_DISPLAY_FOLDER['#text']", !0),
                    orderingProperty: fe.getter("LEVEL_ORDERING_PROPERTY['#text']", !0),
                    origin: fe.getter("LEVEL_ORIGIN['#text']", !0),
                    hierarchyUniqueName: fe.getter("HIERARCHY_UNIQUE_NAME['#text']", !0)
                },
                members: {
                    name: fe.getter("MEMBER_NAME['#text']", !0),
                    caption: fe.getter("MEMBER_CAPTION['#text']", !0),
                    uniqueName: fe.getter("MEMBER_UNIQUE_NAME['#text']", !0),
                    dimensionUniqueName: fe.getter("DIMENSION_UNIQUE_NAME['#text']", !0),
                    hierarchyUniqueName: fe.getter("HIERARCHY_UNIQUE_NAME['#text']", !0),
                    levelUniqueName: fe.getter("LEVEL_UNIQUE_NAME['#text']", !0),
                    childrenCardinality: fe.getter("CHILDREN_CARDINALITY['#text']", !0)
                }
            }, Z = ["axes", "catalogs", "cubes", "dimensions", "hierarchies", "levels", "measures"], ee = fe.data.XmlDataReader.extend({
                init: function(e) {
                    fe.data.XmlDataReader.call(this, e), this._extend(e)
                },
                _extend: function(e) {
                    for (var t, n, i = 0, r = Z.length; r > i; i++) t = Z[i], n = e[t], n && n !== be && (this[t] = n)
                },
                parse: function(e) {
                    var t = fe.data.XmlDataReader.fn.parse(e.replace(/<(\/?)(\w|-)+:/g, "<$1"));
                    return fe.getter("['Envelope']['Body']", !0)(t)
                },
                errors: function(e) {
                    var t = fe.getter("['Fault']", !0)(e);
                    return t ? [{
                        faultstring: fe.getter("faultstring['#text']", !0)(t),
                        faultcode: fe.getter("faultcode['#text']", !0)(t)
                    }] : null
                },
                axes: function(e) {
                    var t, n, i, r;
                    for (e = fe.getter('ExecuteResponse["return"].root', !0)(e), t = G(fe.getter("Axes.Axis", !0)(e)), i = {
                        columns: {},
                        rows: {}
                    }, r = 0; t.length > r; r++) n = t[r], "sliceraxis" !== n["@name"].toLowerCase() && (i.columns.tuples ? i.rows = $(n) : i.columns = $(n));
                    return i
                },
                data: function(e) {
                    var t, n, i, r, o, a;
                    for (e = fe.getter('ExecuteResponse["return"].root', !0)(e), t = G(fe.getter("CellData.Cell", !0)(e)), n = [], i = fe.getter("['@CellOrdinal']"), r = fe.getter("Value['#text']"), o = fe.getter("FmtValue['#text']"), a = 0; t.length > a; a++) n.push({
                        value: r(t[a]),
                        fmtValue: o(t[a]),
                        ordinal: parseInt(i(t[a]), 10)
                    });
                    return n
                },
                _mapSchema: function(e, t) {
                    var n, i, r, o, a;
                    for (e = fe.getter('DiscoverResponse["return"].root', !0)(e), n = G(fe.getter("row", !0)(e)), i = [], r = 0; n.length > r; r++) {
                        o = {};
                        for (a in t) o[a] = t[a](n[r]);
                        i.push(o)
                    }
                    return i
                },
                measures: function(e) {
                    return this._mapSchema(e, J.measures)
                },
                kpis: function(e) {
                    return this._mapSchema(e, J.kpis)
                },
                hierarchies: function(e) {
                    return this._mapSchema(e, J.hierarchies)
                },
                levels: function(e) {
                    return this._mapSchema(e, J.levels)
                },
                dimensions: function(e) {
                    return this._mapSchema(e, J.dimensions)
                },
                cubes: function(e) {
                    return this._mapSchema(e, J.cubes)
                },
                catalogs: function(e) {
                    return this._mapSchema(e, J.catalogs)
                },
                members: function(e) {
                    return this._mapSchema(e, J.members)
                }
            }), ye(!0, fe.data, {
                PivotDataSource: Ge,
                XmlaTransport: X,
                XmlaDataReader: ee,
                PivotCubeBuilder: je,
                transports: {
                    xmla: X
                },
                readers: {
                    xmla: ee
                }
            }), te = function(e, t) {
                if (!e) return null;
                for (var n = 0, i = e.length; i > n; n++)
                    if (e[n].field === t) return e[n];
                return null
            }, ne = function(e, t) {
                var n, i, r = [];
                for (n = 0, i = e.length; i > n; n++) e[n].field !== t && r.push(e[n]);
                return r
            }, fe.ui.PivotSettingTarget = ge.extend({
                init: function(t, n) {
                    var i = this;
                    ge.fn.init.call(i, t, n), i.element.addClass("k-pivot-setting"), i.dataSource = fe.data.PivotDataSource.create(n.dataSource), i._refreshHandler = e.proxy(i.refresh, i), i.dataSource.first(xe, i._refreshHandler), n.template || (i.options.template = "<div data-" + fe.ns + 'name="${data.name || data}">${data.name || data}' + (i.options.enabled ? '<a class="k-button k-button-icon k-button-bare"><span class="k-icon k-setting-delete"></span></a>' : "") + "</div>"), i.template = fe.template(i.options.template), i.emptyTemplate = fe.template(i.options.emptyTemplate), i._sortable(), i.element.on("click" + Fe, ".k-button,.k-item", function(t) {
                        var n = e(t.target),
                            r = n.closest("[" + fe.attr("name") + "]").attr(fe.attr("name"));
                        r && (n.hasClass("k-setting-delete") ? i.remove(r) : i.options.sortable && n[0] === t.currentTarget && i.sort({
                            field: r,
                            dir: n.find(".k-i-sort-asc")[0] ? "desc" : "asc"
                        }))
                    }), (n.filterable || n.sortable) && (i.fieldMenu = new pe.PivotFieldMenu(i.element, {
                        messages: i.options.messages.fieldMenu,
                        filter: ".k-setting-fieldmenu",
                        filterable: n.filterable,
                        sortable: n.sortable,
                        dataSource: i.dataSource
                    })), i.refresh()
                },
                options: {
                    name: "PivotSettingTarget",
                    template: null,
                    filterable: !1,
                    sortable: !1,
                    emptyTemplate: "<div class='k-empty'>${data}</div>",
                    setting: "columns",
                    enabled: !0,
                    messages: {
                        empty: "Drop Fields Here"
                    }
                },
                setDataSource: function(e) {
                    this.dataSource.unbind(xe, this._refreshHandler), this.dataSource = this.options.dataSource = e, this.fieldMenu && this.fieldMenu.setDataSource(e), e.first(xe, this._refreshHandler), this.refresh()
                },
                _sortable: function() {
                    var e = this;
                    e.options.enabled && (this.sortable = this.element.kendoSortable({
                        connectWith: this.options.connectWith,
                        filter: ">:not(.k-empty)",
                        hint: e.options.hint,
                        cursor: "move",
                        start: function(e) {
                            e.item.focus().blur()
                        },
                        change: function(t) {
                            var n = t.item.attr(fe.attr("name"));
                            "receive" == t.action ? e.add(n) : "remove" == t.action ? e.remove(n) : "sort" == t.action && e.move(n, t.newIndex)
                        }
                    }).data("kendoSortable"))
                },
                _indexOf: function(e, t) {
                    var n, i, r = -1;
                    for (n = 0, i = t.length; i > n; n++)
                        if (H(t[n]) === e) {
                            r = n;
                            break
                        } return r
                },
                _isKPI: function(e) {
                    return "kpi" === e.type || e.measure
                },
                validate: function(e) {
                    var t, n, i = 2 == e.type || "aggregator" in e || this._isKPI(e);
                    return i ? "measures" === this.options.setting : "measures" === this.options.setting ? i : (t = this.dataSource[this.options.setting](), n = e.defaultHierarchy || e.uniqueName, this._indexOf(n, t) > -1 ? !1 : (t = this.dataSource["columns" === this.options.setting ? "rows" : "columns"](), this._indexOf(n, t) > -1 ? !1 : !0))
                },
                add: function(t) {
                    var n, i, r = this.dataSource[this.options.setting]();
                    for (t = e.isArray(t) ? t.slice(0) : [t], n = 0, i = t.length; i > n; n++) - 1 !== this._indexOf(t[n], r) && (t.splice(n, 1), n -= 1, i -= 1);
                    t.length && (r = r.concat(t), this.dataSource[this.options.setting](r))
                },
                move: function(e, t) {
                    var n = this.dataSource[this.options.setting](),
                        i = this._indexOf(e, n);
                    i > -1 && (e = n.splice(i, 1)[0], n.splice(t, 0, e), this.dataSource[this.options.setting](n))
                },
                remove: function(e) {
                    var t = this.dataSource[this.options.setting](),
                        n = this._indexOf(e, t);
                    n > -1 && (t.splice(n, 1), this.dataSource[this.options.setting](t))
                },
                sort: function(e) {
                    var t = this.options.sortable,
                        n = t === !0 || t.allowUnsort,
                        i = n && "asc" === e.dir,
                        r = this.dataSource.sort() || [],
                        o = ne(r, e.field);
                    i && r.length !== o.length && (e = null), e && o.push(e), this.dataSource.sort(o)
                },
                refresh: function() {
                    var e, n = "",
                        i = this.dataSource[this.options.setting](),
                        r = i.length,
                        o = 0;
                    if (r)
                        for (; r > o; o++) e = i[o], e = e.name === t ? {
                            name: e
                        } : e, n += this.template(ye({
                            sortIcon: this._sortIcon(e.name)
                        }, e));
                    else n = this.emptyTemplate(this.options.messages.empty);
                    this.element.html(n)
                },
                destroy: function() {
                    ge.fn.destroy.call(this), this.dataSource.unbind(xe, this._refreshHandler), this.element.off(Fe), this.sortable && this.sortable.destroy(), this.fieldMenu && this.fieldMenu.destroy(), this.element = null, this._refreshHandler = null
                },
                _sortIcon: function(e) {
                    var t = this.dataSource.sort(),
                        n = te(t, H(e)),
                        i = "";
                    return n && (i = "k-i-sort-" + n.dir), i
                }
            }), ie = ge.extend({
                init: function(n, i) {
                    var r, o, a = this;
                    ge.fn.init.call(a, n, i), a._dataSource(), a._bindConfigurator(), a._wrapper(), a._createLayout(), a._columnBuilder = r = new ce, a._rowBuilder = o = new de, a._contentBuilder = new ue, a._templates(), a.columnsHeader.add(a.rowsHeader).on("click", "span.k-icon", function() {
                        var n, i, s, l, c = e(this),
                            d = r,
                            u = "expandColumn",
                            h = c.attr(fe.attr("path")),
                            f = {
                                axis: "columns",
                                path: e.parseJSON(h)
                            };
                        c.parent().is("td") && (d = o, u = "expandRow", f.axis = "rows"), i = c.hasClass(Be), s = d.metadata[h], l = s.expanded === t, n = i ? ze : Pe, f.childrenLoaded = s.maxChildren > s.children, a.trigger(n, f) || (d.metadata[h].expanded = !i, c.toggleClass(Be, !i).toggleClass(Le, i), !i && l ? a.dataSource[u](f.path) : a.refresh())
                    }), a._scrollable(), a.options.autoBind && a.dataSource.fetch(), fe.notify(a)
                },
                events: [Me, Re, Pe, ze],
                options: {
                    name: "PivotGrid",
                    autoBind: !0,
                    reorderable: !0,
                    filterable: !1,
                    sortable: !1,
                    height: null,
                    columnWidth: 100,
                    configurator: "",
                    columnHeaderTemplate: null,
                    rowHeaderTemplate: null,
                    dataCellTemplate: null,
                    kpiStatusTemplate: null,
                    kpiTrendTemplate: null,
                    messages: {
                        measureFields: "Drop Data Fields Here",
                        columnFields: "Drop Column Fields Here",
                        rowFields: "Drop Rows Fields Here"
                    }
                },
                _templates: function() {
                    var e = this.options.columnHeaderTemplate,
                        t = this.options.rowHeaderTemplate,
                        n = this.options.dataCellTemplate,
                        i = this.options.kpiStatusTemplate,
                        r = this.options.kpiTrendTemplate;
                    this._columnBuilder.template = fe.template(e || He, {
                        useWithBlock: !!e
                    }), this._contentBuilder.dataTemplate = fe.template(n || Ve, {
                        useWithBlock: !!n
                    }), this._contentBuilder.kpiStatusTemplate = fe.template(i || Ne, {
                        useWithBlock: !!i
                    }), this._contentBuilder.kpiTrendTemplate = fe.template(r || Oe, {
                        useWithBlock: !!r
                    }), this._rowBuilder.template = fe.template(t || He, {
                        useWithBlock: !!t
                    })
                },
                _bindConfigurator: function() {
                    var t = this.options.configurator;
                    t && e(t).kendoPivotConfigurator("setDataSource", this.dataSource)
                },
                cellInfoByElement: function(t) {
                    return t = e(t), this.cellInfo(t.index(), t.parent("tr").index())
                },
                cellInfo: function(e, t) {
                    var n, i = this._contentBuilder,
                        r = i.columnIndexes[e || 0],
                        o = i.rowIndexes[t || 0];
                    return r && o ? (n = o.index * i.rowLength + r.index, {
                        columnTuple: r.tuple,
                        rowTuple: o.tuple,
                        measure: r.measure || o.measure,
                        dataItem: this.dataSource.view()[n]
                    }) : null
                },
                setDataSource: function(e) {
                    this.options.dataSource = e, this._dataSource(), this.measuresTarget && this.measuresTarget.setDataSource(e), this.rowsTarget && this.rowsTarget.setDataSource(e), this.columnsTarget && this.columnsTarget.setDataSource(e), this._bindConfigurator(), this.options.autoBind && e.fetch()
                },
                setOptions: function(e) {
                    ge.fn.setOptions.call(this, e), this._templates()
                },
                destroy: function() {
                    ge.fn.destroy.call(this), clearTimeout(this._headerReflowTimeout)
                },
                _dataSource: function() {
                    var t = this,
                        n = t.options.dataSource;
                    n = e.isArray(n) ? {
                        data: n
                    } : n, t.dataSource && this._refreshHandler ? t.dataSource.unbind(xe, t._refreshHandler).unbind(De, t._stateResetHandler).unbind(Te, t._progressHandler).unbind(Ce, t._errorHandler) : (t._refreshHandler = e.proxy(t.refresh, t), t._progressHandler = e.proxy(t._requestStart, t), t._stateResetHandler = e.proxy(t._stateReset, t), t._errorHandler = e.proxy(t._error, t)), t.dataSource = fe.data.PivotDataSource.create(n).bind(xe, t._refreshHandler).bind(Te, t._progressHandler).bind(De, t._stateResetHandler).bind(Ce, t._errorHandler)
                },
                _error: function() {
                    this._progress(!1)
                },
                _requestStart: function() {
                    this._progress(!0)
                },
                _stateReset: function() {
                    this._columnBuilder.reset(), this._rowBuilder.reset()
                },
                _wrapper: function() {
                    var e = this.options.height;
                    this.wrapper = this.element.addClass("k-widget k-pivot"), e && this.wrapper.css("height", e)
                },
                _measureFields: function() {
                    this.measureFields = e(Ee).addClass("k-pivot-toolbar k-header k-settings-measures"), this.measuresTarget = this._createSettingTarget(this.measureFields, {
                        setting: "measures",
                        messages: {
                            empty: this.options.messages.measureFields
                        }
                    })
                },
                _createSettingTarget: function(t, n) {
                    var i = '<span tabindex="0" class="k-button" data-' + fe.ns + 'name="${data.name}">${data.name}',
                        r = n.sortable,
                        o = "";
                    return r && (o += "#if (data.sortIcon) {#", o += '<span class="k-icon ${data.sortIcon} k-setting-sort"></span>', o += "#}#"), (n.filterable || r) && (o += '<span class="k-icon k-i-arrowhead-s k-setting-fieldmenu"></span>'), this.options.reorderable && (o += '<span class="k-icon k-si-close k-setting-delete"></span>'), o && (i += '<span class="k-field-actions">' + o + "</span>"), i += "</span>", new fe.ui.PivotSettingTarget(t, e.extend({
                        template: i,
                        emptyTemplate: '<span class="k-empty">${data}</span>',
                        enabled: this.options.reorderable,
                        dataSource: this.dataSource
                    }, n))
                },
                _initSettingTargets: function() {
                    this.columnsTarget = this._createSettingTarget(this.columnFields, {
                        connectWith: this.rowFields,
                        setting: "columns",
                        filterable: this.options.filterable,
                        sortable: this.options.sortable,
                        messages: {
                            empty: this.options.messages.columnFields,
                            fieldMenu: this.options.messages.fieldMenu
                        }
                    }), this.rowsTarget = this._createSettingTarget(this.rowFields, {
                        connectWith: this.columnFields,
                        setting: "rows",
                        filterable: this.options.filterable,
                        sortable: this.options.sortable,
                        messages: {
                            empty: this.options.messages.rowFields,
                            fieldMenu: this.options.messages.fieldMenu
                        }
                    })
                },
                _createLayout: function() {
                    var t = this,
                        n = e(Ue),
                        i = n.find(".k-pivot-rowheaders"),
                        r = n.find(".k-pivot-table"),
                        o = e(Ee).addClass("k-grid k-widget");
                    t._measureFields(), t.columnFields = e(Ee).addClass("k-pivot-toolbar k-header k-settings-columns"), t.rowFields = e(Ee).addClass("k-pivot-toolbar k-header k-settings-rows"), t.columnsHeader = e('<div class="k-grid-header-wrap" />').wrap('<div class="k-grid-header" />'), t.columnsHeader.parent().css("padding-right", fe.support.scrollbar()), t.rowsHeader = e('<div class="k-grid k-widget k-alt"/>'), t.content = e('<div class="k-grid-content" />'), i.append(t.measureFields), i.append(t.rowFields), i.append(t.rowsHeader), o.append(t.columnsHeader.parent()), o.append(t.content), r.append(t.columnFields), r.append(o), t.wrapper.append(n), t.columnsHeaderTree = new fe.dom.Tree(t.columnsHeader[0]), t.rowsHeaderTree = new fe.dom.Tree(t.rowsHeader[0]), t.contentTree = new fe.dom.Tree(t.content[0]), t._initSettingTargets()
                },
                _progress: function(e) {
                    fe.ui.progress(this.wrapper, e)
                },
                _resize: function() {
                    this.content[0].firstChild && (this._setSectionsWidth(), this._setSectionsHeight(), this._setContentWidth(), this._setContentHeight(), this._columnHeaderReflow())
                },
                _columnHeaderReflow: function() {
                    var e = this.columnsHeader.children("table");
                    fe.support.browser.mozilla && (clearTimeout(this._headerReflowTimeout), e.css("table-layout", "auto"), this._headerReflowTimeout = setTimeout(function() {
                        e.css("table-layout", "")
                    }))
                },
                _setSectionsWidth: function() {
                    var e = this.rowsHeader,
                        t = e.parent(".k-pivot-rowheaders").width(Ae),
                        n = Math.max(this.measureFields.outerWidth(), this.rowFields.outerWidth());
                    n = Math.max(e.children("table").width(), n), t.width(n)
                },
                _setSectionsHeight: function() {
                    var e = this.measureFields.height(Ae).height(),
                        t = this.columnFields.height(Ae).height(),
                        n = this.rowFields.height(Ae).innerHeight(),
                        i = this.columnsHeader.height(Ae).innerHeight(),
                        r = n - this.rowFields.height(),
                        o = t > e ? t : e,
                        a = i > n ? i : n;
                    this.measureFields.height(o), this.columnFields.height(o), this.rowFields.height(a - r), this.columnsHeader.height(a)
                },
                _setContentWidth: function() {
                    var e = this.content.find("table"),
                        t = this.columnsHeader.children("table"),
                        n = e.children("colgroup").children().length,
                        i = n * this.options.columnWidth,
                        r = Math.ceil(i / this.content.width() * 100);
                    100 > r && (r = 100), e.add(t).css("width", r + "%"), this._resetColspan(t)
                },
                _setContentHeight: function() {
                    var e = this,
                        n = e.content,
                        i = e.rowsHeader,
                        r = e.wrapper.innerHeight(),
                        o = fe.support.scrollbar(),
                        a = n[0].offsetHeight === n[0].clientHeight,
                        s = e.options.height;
                    if (e.wrapper.is(":visible")) {
                        if (!r || !s) return a && (o = 0), n.height("auto"), i.height(n.height() - o), t;
                        r -= e.columnFields.outerHeight(), r -= e.columnsHeader.outerHeight(), 2 * o >= r && (r = 2 * o + 1, a || (r += o)), n.height(r), a && (o = 0), i.height(r - o)
                    }
                },
                _resetColspan: function(e) {
                    var n = this,
                        i = e.children("tbody").children(":first").children(":first");
                    n._colspan === t && (n._colspan = i.attr("colspan")), i.attr("colspan", 1), clearTimeout(n._layoutTimeout), n._layoutTimeout = setTimeout(function() {
                        i.attr("colspan", n._colspan), n._colspan = t
                    })
                },
                _axisMeasures: function(e) {
                    var t = [],
                        n = this.dataSource,
                        i = n.measures(),
                        r = i.length > 1 || i[0] && i[0].type;
                    return n.measuresAxis() === e && (0 === n[e]().length || r) && (t = i), t
                },
                items: function() {
                    return []
                },
                refresh: function() {
                    var e, t = this,
                        n = t.dataSource,
                        i = n.axes(),
                        r = (i.columns || {}).tuples || [],
                        o = (i.rows || {}).tuples || [],
                        a = t._columnBuilder,
                        s = t._rowBuilder,
                        l = {},
                        c = {};
                    t.trigger(Me, {
                        action: "rebind"
                    }) || (a.measures = t._axisMeasures("columns"), t.columnsHeaderTree.render(a.build(r)), t.rowsHeaderTree.render(s.build(o)), l = {
                        indexes: a._indexes,
                        measures: a.measures,
                        metadata: a.metadata
                    }, c = {
                        indexes: s._indexes,
                        measures: this._axisMeasures("rows"),
                        metadata: s.metadata
                    }, t.contentTree.render(t._contentBuilder.build(n.view(), l, c)), t._resize(), t.touchScroller ? t.touchScroller.contentResized() : (e = fe.touchScroller(t.content), e && e.movable && (t.touchScroller = e, e.movable.bind("change", function(e) {
                        t.columnsHeader.scrollLeft(-e.sender.x), t.rowsHeader.scrollTop(-e.sender.y)
                    }))), t._progress(!1), t.trigger(Re))
                },
                _scrollable: function() {
                    var t = this,
                        n = t.columnsHeader,
                        i = t.rowsHeader;
                    t.content.scroll(function() {
                        n.scrollLeft(this.scrollLeft), i.scrollTop(this.scrollTop)
                    }), i.bind("DOMMouseScroll" + Fe + " mousewheel" + Fe, e.proxy(t._wheelScroll, t))
                },
                _wheelScroll: function(t) {
                    var n, i;
                    t.ctrlKey || (n = fe.wheelDeltaY(t), i = this.content.scrollTop(), n && (t.preventDefault(), e(t.currentTarget).one("wheel" + Fe, !1), this.rowsHeader.scrollTop(i + -n), this.content.scrollTop(i + -n)))
                }
            }), re = fe.dom.element, oe = fe.dom.html, ae = function(e, t) {
                return {
                    maxChildren: 0,
                    children: 0,
                    maxMembers: 0,
                    members: 0,
                    measures: 1,
                    levelNum: e,
                    parentMember: 0 !== t
                }
            }, se = function(e, t) {
                for (var n = [], i = 0; t >= i; i++) n.push(e.members[i].name);
                return n
            }, le = function(e, t) {
                for (var n = "", i = 0; t >= i; i++) n += e.members[i].name;
                return n
            }, ce = me.extend({
                init: function() {
                    this.measures = 1, this.metadata = {}
                },
                build: function(e) {
                    var t = this._tbody(e),
                        n = this._colGroup();
                    return [re("table", null, [n, t])]
                },
                reset: function() {
                    this.metadata = {}
                },
                _colGroup: function() {
                    for (var e = this._rowLength(), t = [], n = 0; e > n; n++) t.push(re("col", null));
                    return re("colgroup", null, t)
                },
                _tbody: function(e) {
                    var t = e[0];
                    return this.map = {}, this.rows = [], this.rootTuple = t, this._indexes = [], t ? (this._buildRows(t, 0), this._normalize()) : this.rows.push(re("tr", null, [re("th", null, [oe("&nbsp;")])])), re("tbody", null, this.rows)
                },
                _normalize: function() {
                    for (var e, t, n, i, r, o = this.rows, a = o.length, s = 0; a > s; s++)
                        if (e = o[s], 1 !== e.rowSpan)
                            for (i = e.children, n = 0, t = i.length; t > n; n++) r = i[n], r.tupleAll && (r.attr.rowSpan = e.rowSpan)
                },
                _rowIndex: function(e) {
                    for (var t = this.rows, n = t.length, i = 0; n > i && t[i] !== e; i++);
                    return i
                },
                _rowLength: function() {
                    var e = this.rows[0] ? this.rows[0].children : [],
                        t = e.length,
                        n = 0,
                        i = 0;
                    if (t)
                        for (; t > i; i++) n += e[i].attr.colSpan || 1;
                    return n || (n = this.measures), n
                },
                _row: function(e, t, n) {
                    var i, r, o = this.rootTuple.members[t].name,
                        a = e.members[t].levelNum,
                        s = o + a,
                        l = this.map,
                        c = l[s];
                    return c ? (c.notFirst = !1, c.parentMember && c.parentMember === n || (c.parentMember = n, c.collapsed = 0, c.colSpan = 0)) : (c = re("tr", null, []), c.parentMember = n, c.collapsed = 0, c.colSpan = 0, c.rowSpan = 1, l[s] = c, i = l[o + (+a - 1)], i && (r = i.children, c.notFirst = r[1] && -1 === r[1].attr.className.indexOf("k-alt") ? !0 : i.notFirst), this.rows.splice(this._rowIndex(i) + 1, 0, c)), c
                },
                _measures: function(e, t, n) {
                    var i, r, o, a = this.map,
                        s = a.measureRow;
                    for (s || (s = re("tr", null, []), a.measureRow = s, this.rows.push(s)), r = 0, o = e.length; o > r; r++) i = e[r], s.children.push(this._cell(n || "", [this._content(i, t)], i));
                    return o
                },
                _content: function(e, t) {
                    return oe(this.template({
                        member: e,
                        tuple: t
                    }))
                },
                _cell: function(e, t, n) {
                    var i = re("th", {
                        className: "k-header" + e
                    }, t);
                    return i.value = n.caption || n.name, i
                },
                _buildRows: function(e, n, i) {
                    var r, o, a, s, l, c, d, u, h, f, p = e.members,
                        m = p[n],
                        g = p[n + 1],
                        v = [],
                        _ = 0,
                        b = 0,
                        w = 0;
                    if (m.measure) return this._measures(m.children, e), t;
                    if (u = fe.stringify(se(e, n)), r = this._row(e, n, i), a = m.children, s = a.length, h = this.metadata[u], h || (this.metadata[u] = h = ae(+m.levelNum, n), h.rootLevelNum = +this.rootTuple.members[n].levelNum), this._indexes.push({
                        path: u,
                        tuple: e
                    }), m.hasChildren && (h.expanded === !1 && (b = h.maxChildren, r.collapsed += b, h.children = 0, s = 0), d = {
                        className: "k-icon " + (s ? Be : Le)
                    }, d[fe.attr("path")] = u, v.push(re("span", d))), v.push(this._content(m, e)), l = this._cell(r.notFirst ? " k-first" : "", v, m), r.children.push(l), r.colSpan += 1, s) {
                        for (c = this._cell(" k-alt", [this._content(m, e)], m), r.children.push(c); s > _; _++) o = this._buildRows(a[_], n, m);
                        f = o.colSpan, b = o.collapsed, l.attr.colSpan = f, h.children = f, h.members = 1, r.colSpan += f, r.collapsed += b, r.rowSpan = o.rowSpan + 1, g && (g.measure ? f = this._measures(g.children, e, " k-alt") : (o = this._buildRows(e, n + 1), f = o.colSpan, r.collapsed += o.collapsed, w = o.collapsed), c.attr.colSpan = f, f -= 1, h.members += f, r.colSpan += f)
                    } else g && (g.measure ? f = this._measures(g.children, e) : (o = this._buildRows(e, n + 1), f = o.colSpan, r.collapsed += o.collapsed, w = o.collapsed), h.members = f, f > 1 && (l.attr.colSpan = f, r.colSpan += f - 1));
                    return h.members + w > h.maxMembers && (h.maxMembers = h.members + w), a = h.children + b, a > h.maxChildren && (h.maxChildren = a), (c || l).tupleAll = !0, r
                }
            }), de = me.extend({
                init: function() {
                    this.metadata = {}
                },
                build: function(e) {
                    var t = this._tbody(e),
                        n = this._colGroup();
                    return [re("table", null, [n, t])]
                },
                reset: function() {
                    this.metadata = {}
                },
                _rowLength: function() {
                    for (var e = this.rows[0].children, t = 0, n = 0, i = e[n]; i;) t += i.attr.colSpan || 1, i = e[++n];
                    return t
                },
                _colGroup: function() {
                    for (var e = this._rowLength(), t = [], n = 0; e > n; n++) t.push(re("col", null));
                    return re("colgroup", null, t)
                },
                _tbody: function(e) {
                    var t = e[0];
                    return this.rootTuple = t, this.rows = [], this.map = {}, this._indexes = [], t ? (this._buildRows(t, 0), this._normalize()) : this.rows.push(re("tr", null, [re("td", null, [oe("&nbsp;")])])), re("tbody", null, this.rows)
                },
                _normalize: function() {
                    for (var e, t, n, i, r = this.rows, o = r.length, a = 0, s = this.rootTuple.members, l = s[0].name, c = s.length, d = 0, u = this.map; o > a; a++)
                        for (e = r[a], d = 0; c > d; d++) n = this[s[d].name], t = e.colSpan["dim" + d], t && n > t.colSpan && (t.attr.colSpan = n - t.colSpan + 1);
                    e = u[l], i = u[l + "all"], e && (e.children[0].attr.className = "k-first"), i && (i.children[0].attr.className += " k-first")
                },
                _row: function(e) {
                    var t = re("tr", null, e);
                    return t.rowSpan = 1, t.colSpan = {}, this.rows.push(t), t
                },
                _content: function(e, t) {
                    return oe(this.template({
                        member: e,
                        tuple: t
                    }))
                },
                _cell: function(e, t, n) {
                    var i = re("td", {
                        className: e
                    }, t);
                    return i.value = n.caption || n.name, i
                },
                _buildRows: function(e, t) {
                    var n, i, r, o, a, s, l, c, d, u = this.map,
                        h = e.members,
                        f = h[t],
                        p = h[t + 1],
                        m = f.children,
                        g = m.length,
                        v = +f.levelNum,
                        _ = this.rootTuple.members[t].name,
                        b = se(e, t - 1).join(""),
                        w = +this.rootTuple.members[t].levelNum,
                        y = b + (w === v ? "" : f.parentName || ""),
                        k = u[y + "all"] || u[y],
                        x = v + 1,
                        C = [];
                    if (!k || k.hasChild ? k = this._row() : k.hasChild = !0, f.measure) {
                        for (l = k.allCell ? "k-grid-footer" : "", k.children.push(this._cell(l, [this._content(m[0], e)], m[0])), k.rowSpan = g, d = 1; g > d; d++) this._row([this._cell(l, [this._content(m[d], e)], m[d])]);
                        return k
                    }
                    if (u[b + f.name] = k, n = fe.stringify(se(e, t)), s = this.metadata[n], s || (this.metadata[n] = s = ae(v, t), s.rootLevelNum = w), this._indexes.push({
                        path: n,
                        tuple: e
                    }), f.hasChildren && (s.expanded === !1 && (g = 0, s.children = 0), c = {
                        className: "k-icon " + (g ? Be : Le)
                    }, c[fe.attr("path")] = n, C.push(re("span", c))), C.push(this._content(f, e)), l = k.allCell && !g ? "k-grid-footer" : "", i = this._cell(l, C, f), i.colSpan = x, k.children.push(i), k.colSpan["dim" + t] = i, (!this[_] || x > this[_]) && (this[_] = x), g) {
                        for (k.allCell = !1, k.hasChild = !1, d = 0; g > d; d++) o = this._buildRows(m[d], t), k !== o && (k.rowSpan += o.rowSpan);
                        k.rowSpan > 1 && (i.attr.rowSpan = k.rowSpan), s.children = k.rowSpan, r = this._cell("k-grid-footer", [this._content(f, e)], f), r.colSpan = x, a = this._row([r]), a.colSpan["dim" + t] = r, a.allCell = !0, u[b + f.name + "all"] = a, p && (o = this._buildRows(e, t + 1), r.attr.rowSpan = o.rowSpan), k.rowSpan += a.rowSpan, s.members = a.rowSpan
                    } else p && (k.hasChild = !1, this._buildRows(e, t + 1), (r || i).attr.rowSpan = k.rowSpan, s.members = k.rowSpan);
                    return s.children > s.maxChildren && (s.maxChildren = s.children), s.members > s.maxMembers && (s.maxMembers = s.members), k
                }
            }), ue = me.extend({
                init: function() {
                    this.columnAxis = {}, this.rowAxis = {}
                },
                build: function(e, n, i) {
                    var r, o, a = n.indexes[0],
                        s = n.metadata[a ? a.path : t];
                    return this.columnAxis = n, this.rowAxis = i, this.data = e, this.rowLength = s ? s.maxChildren + s.maxMembers : n.measures.length || 1, this.rowLength || (this.rowLength = 1), r = this._tbody(), o = this._colGroup(), [re("table", null, [o, r])]
                },
                _colGroup: function() {
                    var e = this.columnAxis.measures.length || 1,
                        t = [],
                        n = 0;
                    for (this.rows[0] && (e = this.rows[0].children.length); e > n; n++) t.push(re("col", null));
                    return re("colgroup", null, t)
                },
                _tbody: function() {
                    return this.rows = [], this.data[0] ? (this.columnIndexes = this._indexes(this.columnAxis, this.rowLength), this.rowIndexes = this._indexes(this.rowAxis, Math.ceil(this.data.length / this.rowLength)), this._buildRows()) : this.rows.push(re("tr", null, [re("td", null, [oe("&nbsp;")])])), re("tbody", null, this.rows)
                },
                _indexes: function(e, n) {
                    var i, r, o, a, s, l, c = [],
                        d = e.indexes,
                        u = e.metadata,
                        h = e.measures,
                        f = h.length || 1,
                        p = 0,
                        m = 0,
                        g = 0,
                        v = d.length;
                    if (!v) {
                        for (o = 0; f > o; o++) c[o] = {
                            index: o,
                            measure: h[o],
                            tuple: null
                        };
                        return c
                    }
                    for (; v > g; g++) {
                        if (i = d[g], r = u[i.path], s = r.children + r.members, l = 0, s && (s -= f), r.expanded === !1 && r.children !== r.maxChildren && (l = r.maxChildren), r.parentMember && r.levelNum === r.rootLevelNum && (s = -1), s > -1) {
                            for (o = 0; f > o; o++) a = s + o, r.children || (a += m), c[s + m + o] = {
                                children: s,
                                index: p,
                                measure: h[o],
                                tuple: i.tuple
                            }, p += 1;
                            for (; c[m] !== t;) m += 1
                        }
                        if (m === n) break;
                        p += l
                    }
                    return c
                },
                _buildRows: function() {
                    for (var e = this.rowIndexes, t = e.length, n = 0; t > n; n++) this.rows.push(this._buildRow(e[n]))
                },
                _buildRow: function(e) {
                    for (var t, n, i, r, o, a, s, l = e.index * this.rowLength, c = this.columnIndexes, d = c.length, u = [], h = 0; d > h; h++) t = c[h], o = {}, t.children && (o.className = "k-alt"), r = "", a = this.data[l + t.index], s = t.measure || e.measure, n = {
                        columnTuple: t.tuple,
                        rowTuple: e.tuple,
                        measure: s,
                        dataItem: a
                    }, "" !== a.value && s && s.type && ("status" === s.type ? r = this.kpiStatusTemplate(n) : "trend" === s.type && (r = this.kpiTrendTemplate(n))), r || (r = this.dataTemplate(n)), i = re("td", o, [oe(r)]), i.value = a.value, u.push(i);
                    return o = {}, e.children && (o.className = "k-grid-footer"), re("tr", o, u)
                }
            }), pe.plugin(ie), fe.PivotExcelExporter = fe.Class.extend({
                init: function(e) {
                    this.options = e, this.widget = e.widget, this.dataSource = this.widget.dataSource
                },
                _columns: function() {
                    var e, t = this.widget.columnsHeaderTree.children[0],
                        n = this.widget.rowsHeaderTree.children[0],
                        i = t.children[0].children.length,
                        r = n.children[0].children.length,
                        o = this.widget.options.columnWidth,
                        a = [];
                    if (r && this.dataSource.data()[0])
                        for (e = 0; r > e; e++) a.push({
                            autoWidth: !0
                        });
                    for (e = 0; i > e; e++) a.push({
                        autoWidth: !1,
                        width: o
                    });
                    return a
                },
                _cells: function(e, t, n) {
                    for (var i, r, o, a, s, l = [], c = 0, d = e.length; d > c; c++) {
                        for (r = [], o = e[c].children, i = o.length, a = 0; i > a; a++) s = o[a], r.push({
                            background: "#7a7a7a",
                            color: "#fff",
                            value: s.value,
                            colSpan: s.attr.colSpan || 1,
                            rowSpan: s.attr.rowSpan || 1
                        });
                        n && n(r, c), l.push({
                            cells: r,
                            type: t
                        })
                    }
                    return l
                },
                _rows: function() {
                    var e, t, n = this.widget.columnsHeaderTree.children[0],
                        i = this.widget.rowsHeaderTree.children[0],
                        r = n.children[0].children.length,
                        o = i.children[0].children.length,
                        a = n.children[1].children,
                        s = i.children[1].children,
                        l = this.widget.contentTree.children[0].children[1].children,
                        c = this._cells(a, "header");
                    return o && c[0].cells.splice(0, 0, {
                        background: "#7a7a7a",
                        color: "#fff",
                        value: "",
                        colSpan: o,
                        rowSpan: a.length
                    }), e = function(e, t) {
                        for (var n, i, o = 0, a = l[t].children; r > o; o++) n = a[o], i = +n.value, isNaN(i) && (i = n.value), e.push({
                            background: "#dfdfdf",
                            color: "#333",
                            value: i,
                            colSpan: 1,
                            rowSpan: 1
                        })
                    }, t = this._cells(s, "data", e), c.concat(t)
                },
                _freezePane: function() {
                    var e = this.widget.columnsHeaderTree.children[0],
                        t = this.widget.rowsHeaderTree.children[0],
                        n = t.children[0].children.length,
                        i = e.children[1].children;
                    return {
                        colSplit: n,
                        rowSplit: i.length
                    }
                },
                workbook: function() {
                    var t;
                    return this.dataSource.view()[0] ? (t = e.Deferred(), t.resolve()) : t = this.dataSource.fetch(), t.then(e.proxy(function() {
                        return {
                            sheets: [{
                                columns: this._columns(),
                                rows: this._rows(),
                                freezePane: this._freezePane(),
                                filter: null
                            }]
                        }
                    }, this))
                }
            }), he = {
                extend: function(t) {
                    t.events.push("excelExport"), t.options.excel = e.extend(t.options.excel, this.options), t.saveAsExcel = this.saveAsExcel
                },
                options: {
                    proxyURL: "",
                    filterable: !1,
                    fileName: "Export.xlsx"
                },
                saveAsExcel: function() {
                    var t = this.options.excel || {},
                        n = new fe.PivotExcelExporter({
                            widget: this
                        });
                    n.workbook().then(e.proxy(function(e) {
                        if (!this.trigger("excelExport", {
                            workbook: e
                        })) {
                            var n = new fe.ooxml.Workbook(e);
                            fe.saveAs({
                                dataURI: n.toDataURL(),
                                fileName: e.fileName || t.fileName,
                                proxyURL: t.proxyURL,
                                forceProxy: t.forceProxy
                            })
                        }
                    }, this))
                }
            }, fe.PivotExcelMixin = he, fe.ooxml && fe.ooxml.Workbook && he.extend(ie.prototype), fe.PDFMixin && (fe.PDFMixin.extend(ie.prototype), ie.fn._drawPDF = function() {
                return this._drawPDFShadow({
                    width: this.wrapper.width()
                }, {
                    avoidLinks: this.options.pdf.avoidLinks
                })
            })
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.treeview.draganddrop.min", ["kendo.data.min", "kendo.draganddrop.min"], e)
    }(function() {
        return function(e, t) {
            var n = window.kendo,
                i = n.ui,
                r = e.proxy,
                o = e.extend,
                a = "visibility",
                s = "k-state-hover",
                l = "input,a,textarea,.k-multiselect-wrap,select,button,a.k-button>.k-icon,button.k-button>.k-icon,span.k-icon.k-i-expand,span.k-icon.k-i-collapse";
            i.HierarchicalDragAndDrop = n.Class.extend({
                init: function(t, a) {
                    this.element = t, this.hovered = t, this.options = o({
                        dragstart: e.noop,
                        drag: e.noop,
                        drop: e.noop,
                        dragend: e.noop
                    }, a), this._draggable = new i.Draggable(t, {
                        ignore: l,
                        filter: a.filter,
                        autoScroll: a.autoScroll,
                        cursorOffset: {
                            left: 10,
                            top: n.support.mobileOS ? -40 / n.support.zoomLevel() : 10
                        },
                        hint: r(this._hint, this),
                        dragstart: r(this.dragstart, this),
                        dragcancel: r(this.dragcancel, this),
                        drag: r(this.drag, this),
                        dragend: r(this.dragend, this),
                        $angular: a.$angular
                    })
                },
                _hint: function(e) {
                    return "<div class='k-header k-drag-clue'><span class='k-icon k-drag-status' />" + this.options.hintText(e) + "</div>"
                },
                _removeTouchHover: function() {
                    n.support.touch && this.hovered && (this.hovered.find("." + s).removeClass(s), this.hovered = !1)
                },
                _hintStatus: function(n) {
                    var i = this._draggable.hint.find(".k-drag-status")[0];
                    return n ? (i.className = "k-icon k-drag-status " + n, t) : e.trim(i.className.replace(/k-(icon|drag-status)/g, ""))
                },
                dragstart: function(t) {
                    this.source = t.currentTarget.closest(this.options.itemSelector), this.options.dragstart(this.source) && t.preventDefault(), this.dropHint = this.options.reorderable ? e("<div class='k-drop-hint' />").css(a, "hidden").appendTo(this.element) : e()
                },
                drag: function(t) {
                    var i, r, o, l, c, d, u, h, f, p, m, g = this.options,
                        v = this.source,
                        _ = this.dropTarget = e(n.eventTarget(t)),
                        b = _.closest(g.allowedContainers);
                    b.length ? v[0] == _[0] || g.contains(v[0], _[0]) ? m = "k-denied" : (m = "k-insert-middle", f = g.itemFromTarget(_), i = f.item, i.length ? (this._removeTouchHover(), r = i.outerHeight(), l = f.content, g.reorderable ? (c = r / (l.length > 0 ? 4 : 2), o = n.getOffset(i).top, d = o + c > t.y.location, u = t.y.location > o + r - c, h = l.length && !d && !u) : (h = !0, d = !1, u = !1), this.hovered = h ? b : !1, this.dropHint.css(a, h ? "hidden" : "visible"), this._lastHover && this._lastHover[0] != l[0] && this._lastHover.removeClass(s), this._lastHover = l.toggleClass(s, h), h ? m = "k-add" : (p = i.position(), p.top += d ? 0 : r, this.dropHint.css(p)[d ? "prependTo" : "appendTo"](g.dropHintContainer(i)), d && f.first && (m = "k-insert-top"), u && f.last && (m = "k-insert-bottom"))) : _[0] != this.dropHint[0] && (this._lastHover && this._lastHover.removeClass(s), m = e.contains(this.element[0], b[0]) ? "k-denied" : "k-add")) : (m = "k-denied", this._removeTouchHover()), this.options.drag({
                        originalEvent: t.originalEvent,
                        source: v,
                        target: _,
                        pageY: t.y.location,
                        pageX: t.x.location,
                        status: m.substring(2),
                        setStatus: function(e) {
                            m = e
                        }
                    }), 0 !== m.indexOf("k-insert") && this.dropHint.css(a, "hidden"), this._hintStatus(m)
                },
                dragcancel: function() {
                    this.dropHint.remove()
                },
                dragend: function(e) {
                    var n, i, r, o = "over",
                        l = this.source,
                        c = this.dropHint,
                        d = this.dropTarget;
                    return "visible" == c.css(a) ? (o = this.options.dropPositionFrom(c), n = c.closest(this.options.itemSelector)) : d && (n = d.closest(this.options.itemSelector), n.length || (n = d.closest(this.options.allowedContainers))), i = {
                        originalEvent: e.originalEvent,
                        source: l[0],
                        destination: n[0],
                        valid: "k-denied" != this._hintStatus(),
                        setValid: function(e) {
                            this.valid = e
                        },
                        dropTarget: d[0],
                        position: o
                    }, r = this.options.drop(i), c.remove(), this._removeTouchHover(), this._lastHover && this._lastHover.removeClass(s), !i.valid || r ? (this._draggable.dropped = i.valid, t) : (this._draggable.dropped = !0, this.options.dragend({
                        originalEvent: e.originalEvent,
                        source: l,
                        destination: n,
                        position: o
                    }), t)
                },
                destroy: function() {
                    this._lastHover = this.hovered = null, this._draggable.destroy()
                }
            })
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.treeview.min", ["kendo.data.min", "kendo.treeview.draganddrop.min"], e)
    }(function() {
        return function(e, t) {
            function n(e) {
                return function(t) {
                    var n = t.children(".k-animation-container");
                    return n.length || (n = t), n.children(e)
                }
            }

            function i(e) {
                return f.template(e, {
                    useWithBlock: !1
                })
            }

            function r(e) {
                return e.find("> div .k-checkbox-wrapper [type=checkbox]")
            }

            function o(e) {
                return function(t, n) {
                    n = n.closest(W);
                    var i, r = n.parent();
                    return r.parent().is("li") && (i = r.parent()), this._dataSourceMove(t, r, i, function(t, i) {
                        return this._insert(t.data(), i, n.index() + e)
                    })
                }
            }

            function a(t, n) {
                for (var i; t && "ul" != t.nodeName.toLowerCase();) i = t, t = t.nextSibling, 3 == i.nodeType && (i.nodeValue = e.trim(i.nodeValue)), h.test(i.className) ? n.insertBefore(i, n.firstChild) : n.appendChild(i)
            }

            function s(t) {
                var n = t.children("div"),
                    i = t.children("ul"),
                    r = n.children(".k-icon"),
                    o = t.children(":checkbox"),
                    s = n.children(".k-in");
                t.hasClass("k-treeview") || (n.length || (n = e("<div />").prependTo(t)), !r.length && i.length ? r = e("<span class='k-icon' />").prependTo(n) : i.length && i.children().length || (r.remove(), i.remove()), o.length && e("<span class='k-checkbox-wrapper' />").appendTo(n).append(o), s.length || (s = t.children("a").eq(0).addClass("k-in k-link"), s.length || (s = e("<span class='k-in' />")), s.appendTo(n), n.length && a(n[0].nextSibling, s[0])))
            }
            var l, c, d, u, h, f = window.kendo,
                p = f.ui,
                m = f.data,
                g = e.extend,
                v = f.template,
                _ = e.isArray,
                b = p.Widget,
                w = m.HierarchicalDataSource,
                y = e.proxy,
                k = f.keys,
                x = ".kendoTreeView",
                C = "select",
                S = "check",
                T = "navigate",
                D = "expand",
                A = "change",
                E = "error",
                F = "checked",
                I = "indeterminate",
                M = "collapse",
                R = "dragstart",
                P = "drag",
                z = "drop",
                B = "dragend",
                L = "dataBound",
                H = "click",
                N = "undefined",
                O = "k-state-hover",
                V = "k-treeview",
                U = ":visible",
                W = ".k-item",
                j = "string",
                q = "aria-selected",
                G = "aria-disabled",
                $ = {
                    text: "dataTextField",
                    url: "dataUrlField",
                    spriteCssClass: "dataSpriteCssClassField",
                    imageUrl: "dataImageUrlField"
                },
                Y = function(e) {
                    return "object" == typeof HTMLElement ? e instanceof HTMLElement : e && "object" == typeof e && 1 === e.nodeType && typeof e.nodeName === j
                };
            c = n(".k-group"), d = n(".k-group,.k-content"), u = function(e) {
                return e.children("div").children(".k-icon")
            }, h = /k-sprite/, l = f.ui.DataBoundWidget.extend({
                init: function(e, t) {
                    var n, i = this,
                        r = !1,
                        o = t && !!t.dataSource;
                    _(t) && (t = {
                        dataSource: t
                    }), t && typeof t.loadOnDemand == N && _(t.dataSource) && (t.loadOnDemand = !1), b.prototype.init.call(i, e, t), e = i.element, t = i.options, n = e.is("ul") && e || e.hasClass(V) && e.children("ul"), r = !o && n.length, r && (t.dataSource.list = n), i._animation(), i._accessors(), i._templates(), e.hasClass(V) ? (i.wrapper = e, i.root = e.children("ul").eq(0)) : (i._wrapper(), n && (i.root = e, i._group(i.wrapper))), i._tabindex(), i.root.attr("role", "tree"), i._dataSource(r), i._attachEvents(), i._dragging(), r ? i._syncHtmlAndDataSource() : t.autoBind && (i._progress(!0), i.dataSource.fetch()), t.checkboxes && t.checkboxes.checkChildren && i.updateIndeterminate(), i.element[0].id && (i._ariaId = f.format("{0}_tv_active", i.element[0].id)), f.notify(i)
                },
                _attachEvents: function() {
                    var t = this,
                        n = ".k-in:not(.k-state-selected,.k-state-disabled)",
                        i = "mouseenter";
                    t.wrapper.on(i + x, ".k-in.k-state-selected", function(e) {
                        e.preventDefault()
                    }).on(i + x, n, function() {
                        e(this).addClass(O)
                    }).on("mouseleave" + x, n, function() {
                        e(this).removeClass(O)
                    }).on(H + x, n, y(t._click, t)).on("dblclick" + x, ".k-in:not(.k-state-disabled)", y(t._toggleButtonClick, t)).on(H + x, ".k-plus,.k-minus", y(t._toggleButtonClick, t)).on("keydown" + x, y(t._keydown, t)).on("focus" + x, y(t._focus, t)).on("blur" + x, y(t._blur, t)).on("mousedown" + x, ".k-in,.k-checkbox-wrapper :checkbox,.k-plus,.k-minus", y(t._mousedown, t)).on("change" + x, ".k-checkbox-wrapper :checkbox", y(t._checkboxChange, t)).on("click" + x, ".k-checkbox-wrapper :checkbox", y(t._checkboxClick, t)).on("click" + x, ".k-request-retry", y(t._retryRequest, t)).on("click" + x, function(n) {
                        e(n.target).is(":kendoFocusable") || t.focus()
                    })
                },
                _checkboxClick: function(t) {
                    var n = e(t.target);
                    n.data(I) && (n.data(I, !1).prop(I, !1).prop(F, !0), this._checkboxChange(t))
                },
                _syncHtmlAndDataSource: function(e, t) {
                    e = e || this.root, t = t || this.dataSource;
                    var n, i, o, a, s, l = t.view(),
                        c = f.attr("uid"),
                        d = f.attr("expanded"),
                        u = this.options.checkboxes,
                        h = e.children("li");
                    for (n = 0; h.length > n; n++) o = l[n], a = o.uid, i = h.eq(n), i.attr("role", "treeitem").attr(c, a), o.expanded = "true" === i.attr(d), u && (s = r(i), o.checked = s.prop(F), s.attr("id", "_" + a), s.next(".k-checkbox-label").attr("for", "_" + a)), this._syncHtmlAndDataSource(i.children("ul"), o.children)
                },
                _animation: function() {
                    var e = this.options,
                        t = e.animation;
                    t === !1 ? t = {
                        expand: {
                            effects: {}
                        },
                        collapse: {
                            hide: !0,
                            effects: {}
                        }
                    } : t.collapse && "effects" in t.collapse || (t.collapse = g({
                        reverse: !0
                    }, t.expand)), g(t.collapse, {
                        hide: !0
                    }), e.animation = t
                },
                _dragging: function() {
                    var t, n = this.options.dragAndDrop,
                        i = this.dragging;
                    n && !i ? (t = this, this.dragging = new p.HierarchicalDragAndDrop(this.element, {
                        reorderable: !0,
                        $angular: this.options.$angular,
                        autoScroll: this.options.autoScroll,
                        filter: "div:not(.k-state-disabled) .k-in",
                        allowedContainers: ".k-treeview",
                        itemSelector: ".k-treeview .k-item",
                        hintText: y(this._hintText, this),
                        contains: function(t, n) {
                            return e.contains(t, n)
                        },
                        dropHintContainer: function(e) {
                            return e
                        },
                        itemFromTarget: function(e) {
                            var t = e.closest(".k-top,.k-mid,.k-bot");
                            return {
                                item: t,
                                content: e.closest(".k-in"),
                                first: t.hasClass("k-top"),
                                last: t.hasClass("k-bot")
                            }
                        },
                        dropPositionFrom: function(e) {
                            return e.prevAll(".k-in").length > 0 ? "after" : "before"
                        },
                        dragstart: function(e) {
                            return t.trigger(R, {
                                sourceNode: e[0]
                            })
                        },
                        drag: function(e) {
                            t.trigger(P, {
                                originalEvent: e.originalEvent,
                                sourceNode: e.source[0],
                                dropTarget: e.target[0],
                                pageY: e.pageY,
                                pageX: e.pageX,
                                statusClass: e.status,
                                setStatusClass: e.setStatus
                            })
                        },
                        drop: function(e) {
                            return t.trigger(z, {
                                originalEvent: e.originalEvent,
                                sourceNode: e.source,
                                destinationNode: e.destination,
                                valid: e.valid,
                                setValid: function(t) {
                                    this.valid = t, e.setValid(t)
                                },
                                dropTarget: e.dropTarget,
                                dropPosition: e.position
                            })
                        },
                        dragend: function(e) {
                            function n(n) {
                                t.updateIndeterminate(), t.trigger(B, {
                                    originalEvent: e.originalEvent,
                                    sourceNode: n && n[0],
                                    destinationNode: r[0],
                                    dropPosition: o
                                })
                            }
                            var i = e.source,
                                r = e.destination,
                                o = e.position;
                            "over" == o ? t.append(i, r, n) : ("before" == o ? i = t.insertBefore(i, r) : "after" == o && (i = t.insertAfter(i, r)), n(i))
                        }
                    })) : !n && i && (i.destroy(), this.dragging = null)
                },
                _hintText: function(e) {
                    return this.templates.dragClue({
                        item: this.dataItem(e),
                        treeview: this.options
                    })
                },
                _templates: function() {
                    var e = this,
                        t = e.options,
                        n = y(e._fieldAccessor, e);
                    t.template && typeof t.template == j ? t.template = v(t.template) : t.template || (t.template = i("# var text = " + n("text") + "(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #")), e._checkboxes(), e.templates = {
                        wrapperCssClass: function(e, t) {
                            var n = "k-item",
                                i = t.index;
                            return e.firstLevel && 0 === i && (n += " k-first"), i == e.length - 1 && (n += " k-last"), n
                        },
                        cssClass: function(e, t) {
                            var n = "",
                                i = t.index,
                                r = e.length - 1;
                            return e.firstLevel && 0 === i && (n += "k-top "), n += 0 === i && i != r ? "k-top" : i == r ? "k-bot" : "k-mid"
                        },
                        textClass: function(e, t) {
                            var n = "k-in";
                            return t && (n += " k-link"), e.enabled === !1 && (n += " k-state-disabled"), e.selected === !0 && (n += " k-state-selected"), n
                        },
                        toggleButtonClass: function(e) {
                            var t = "k-icon";
                            return t += e.expanded !== !0 ? " k-plus" : " k-minus", e.enabled === !1 && (t += "-disabled"), t
                        },
                        groupAttributes: function(e) {
                            var t = "";
                            return e.firstLevel || (t = "role='group'"), t + (e.expanded !== !0 ? " style='display:none'" : "")
                        },
                        groupCssClass: function(e) {
                            var t = "k-group";
                            return e.firstLevel && (t += " k-treeview-lines"), t
                        },
                        dragClue: i("#= data.treeview.template(data) #"),
                        group: i("<ul class='#= data.r.groupCssClass(data.group) #'#= data.r.groupAttributes(data.group) #>#= data.renderItems(data) #</ul>"),
                        itemContent: i("# var imageUrl = " + n("imageUrl") + "(data.item); ## var spriteCssClass = " + n("spriteCssClass") + "(data.item); ## if (imageUrl) { #<img class='k-image' alt='' src='#= imageUrl #'># } ## if (spriteCssClass) { #<span class='k-sprite #= spriteCssClass #' /># } ##= data.treeview.template(data) #"),
                        itemElement: i("# var item = data.item, r = data.r; ## var url = " + n("url") + "(item); #<div class='#= r.cssClass(data.group, item) #'># if (item.hasChildren) { #<span class='#= r.toggleButtonClass(item) #' role='presentation' /># } ## if (data.treeview.checkboxes) { #<span class='k-checkbox-wrapper' role='presentation'>#= data.treeview.checkboxes.template(data) #</span># } ## var tag = url ? 'a' : 'span'; ## var textAttr = url ? ' href=\\'' + url + '\\'' : ''; #<#=tag# class='#= r.textClass(item, !!url) #'#= textAttr #>#= r.itemContent(data) #</#=tag#></div>"),
                        item: i("# var item = data.item, r = data.r; #<li role='treeitem' class='#= r.wrapperCssClass(data.group, item) #' " + f.attr("uid") + "='#= item.uid #' aria-selected='#= item.selected ? \"true\" : \"false \" #' #=item.enabled === false ? \"aria-disabled='true'\" : ''## if (item.expanded) { #data-expanded='true' aria-expanded='true'# } #>#= r.itemElement(data) #</li>"),
                        loading: i("<div class='k-icon k-loading' /> #: data.messages.loading #"),
                        retry: i("#: data.messages.requestFailed # <button class='k-button k-request-retry'>#: data.messages.retry #</button>")
                    }
                },
                items: function() {
                    return this.element.find(".k-item > div:first-child")
                },
                setDataSource: function(t) {
                    var n = this.options;
                    n.dataSource = t, this._dataSource(), n.checkboxes && n.checkboxes.checkChildren && this.dataSource.one("change", e.proxy(this.updateIndeterminate, this, null)), this.options.autoBind && this.dataSource.fetch()
                },
                _bindDataSource: function() {
                    this._refreshHandler = y(this.refresh, this), this._errorHandler = y(this._error, this), this.dataSource.bind(A, this._refreshHandler), this.dataSource.bind(E, this._errorHandler)
                },
                _unbindDataSource: function() {
                    var e = this.dataSource;
                    e && (e.unbind(A, this._refreshHandler), e.unbind(E, this._errorHandler))
                },
                _dataSource: function(e) {
                    function t(e) {
                        for (var n = 0; e.length > n; n++) e[n]._initChildren(), e[n].children.fetch(), t(e[n].children.view())
                    }
                    var n = this,
                        i = n.options,
                        r = i.dataSource;
                    r = _(r) ? {
                        data: r
                    } : r, n._unbindDataSource(), r.fields || (r.fields = [{
                        field: "text"
                    }, {
                        field: "url"
                    }, {
                        field: "spriteCssClass"
                    }, {
                        field: "imageUrl"
                    }]), n.dataSource = r = w.create(r), e && (r.fetch(), t(r.view())), n._bindDataSource()
                },
                events: [R, P, z, B, L, D, M, C, A, T, S],
                options: {
                    name: "TreeView",
                    dataSource: {},
                    animation: {
                        expand: {
                            effects: "expand:vertical",
                            duration: 200
                        },
                        collapse: {
                            duration: 100
                        }
                    },
                    messages: {
                        loading: "Loading...",
                        requestFailed: "Request failed.",
                        retry: "Retry"
                    },
                    dragAndDrop: !1,
                    checkboxes: !1,
                    autoBind: !0,
                    autoScroll: !1,
                    loadOnDemand: !0,
                    template: "",
                    dataTextField: null
                },
                _accessors: function() {
                    var e, t, n, i = this,
                        r = i.options,
                        o = i.element;
                    for (e in $) t = r[$[e]], n = o.attr(f.attr(e + "-field")), !t && n && (t = n), t || (t = e), _(t) || (t = [t]),
                        r[$[e]] = t
                },
                _fieldAccessor: function(t) {
                    var n = this.options[$[t]],
                        i = n.length,
                        r = "(function(item) {";
                    return 0 === i ? r += "return item['" + t + "'];" : (r += "var levels = [" + e.map(n, function(e) {
                        return "function(d){ return " + f.expr(e) + "}"
                    }).join(",") + "];", r += "return levels[Math.min(item.level(), " + i + "-1)](item)"), r += "})"
                },
                setOptions: function(e) {
                    b.fn.setOptions.call(this, e), this._animation(), this._dragging(), this._templates()
                },
                _trigger: function(e, t) {
                    return this.trigger(e, {
                        node: t.closest(W)[0]
                    })
                },
                _setChecked: function(t, n) {
                    if (t && e.isFunction(t.view))
                        for (var i = 0, r = t.view(); r.length > i; i++) r[i][F] = n, r[i].children && this._setChecked(r[i].children, n)
                },
                _setIndeterminate: function(e) {
                    var t, n, i, o = c(e),
                        a = !0;
                    if (o.length && (t = r(o.children()), n = t.length)) {
                        if (n > 1) {
                            for (i = 1; n > i; i++)
                                if (t[i].checked != t[i - 1].checked || t[i].indeterminate || t[i - 1].indeterminate) {
                                    a = !1;
                                    break
                                }
                        } else a = !t[0].indeterminate;
                        return r(e).data(I, !a).prop(I, !a).prop(F, a && t[0].checked)
                    }
                },
                updateIndeterminate: function(e) {
                    var t, n, i;
                    if (e = e || this.wrapper, t = c(e).children(), t.length) {
                        for (n = 0; t.length > n; n++) this.updateIndeterminate(t.eq(n));
                        i = this._setIndeterminate(e), i && i.prop(F) && (this.dataItem(e).checked = !0)
                    }
                },
                _bubbleIndeterminate: function(e) {
                    if (e.length) {
                        var t, n = this.parent(e);
                        n.length && (this._setIndeterminate(n), t = n.children("div").find(".k-checkbox-wrapper :checkbox"), t.prop(I) === !1 ? this.dataItem(n).set(F, t.prop(F)) : delete this.dataItem(n).checked, this._bubbleIndeterminate(n))
                    }
                },
                _checkboxChange: function(t) {
                    var n = e(t.target),
                        i = n.prop(F),
                        r = n.closest(W),
                        o = this.dataItem(r);
                    o.checked != i && (o.set(F, i), this._trigger(S, r))
                },
                _toggleButtonClick: function(t) {
                    this.toggle(e(t.target).closest(W))
                },
                _mousedown: function(t) {
                    var n = e(t.currentTarget).closest(W);
                    this._clickTarget = n, this.current(n)
                },
                _focusable: function(e) {
                    return e && e.length && e.is(":visible") && !e.find(".k-in:first").hasClass("k-state-disabled")
                },
                _focus: function() {
                    var t = this.select(),
                        n = this._clickTarget;
                    f.support.touch || (n && n.length && (t = n), this._focusable(t) || (t = this.current()), this._focusable(t) || (t = this._nextVisible(e())), this.current(t))
                },
                focus: function() {
                    var e, t = this.wrapper,
                        n = t[0],
                        i = [],
                        r = [],
                        o = document.documentElement;
                    do n = n.parentNode, n.scrollHeight > n.clientHeight && (i.push(n), r.push(n.scrollTop)); while (n != o);
                    for (t.focus(), e = 0; i.length > e; e++) i[e].scrollTop = r[e]
                },
                _blur: function() {
                    this.current().find(".k-in:first").removeClass("k-state-focused")
                },
                _enabled: function(e) {
                    return !e.children("div").children(".k-in").hasClass("k-state-disabled")
                },
                parent: function(t) {
                    var n, i, r = /\bk-treeview\b/,
                        o = /\bk-item\b/;
                    typeof t == j && (t = this.element.find(t)), Y(t) || (t = t[0]), i = o.test(t.className);
                    do t = t.parentNode, o.test(t.className) && (i ? n = t : i = !0); while (!r.test(t.className) && !n);
                    return e(n)
                },
                _nextVisible: function(e) {
                    function t(e) {
                        for (; e.length && !e.next().length;) e = i.parent(e);
                        return e.next().length ? e.next() : e
                    }
                    var n, i = this,
                        r = i._expanded(e);
                    return e.length && e.is(":visible") ? r ? (n = c(e).children().first(), n.length || (n = t(e))) : n = t(e) : n = i.root.children().eq(0), i._enabled(n) || (n = i._nextVisible(n)), n
                },
                _previousVisible: function(e) {
                    var t, n, i = this;
                    if (!e.length || e.prev().length)
                        for (n = e.length ? e.prev() : i.root.children().last(); i._expanded(n) && (t = c(n).children().last(), t.length);) n = t;
                    else n = i.parent(e) || e;
                    return i._enabled(n) || (n = i._previousVisible(n)), n
                },
                _keydown: function(n) {
                    var i, r = this,
                        o = n.keyCode,
                        a = r.current(),
                        s = r._expanded(a),
                        l = a.find(".k-checkbox-wrapper:first :checkbox"),
                        c = f.support.isRtl(r.element);
                    n.target == n.currentTarget && (!c && o == k.RIGHT || c && o == k.LEFT ? s ? i = r._nextVisible(a) : r.expand(a) : !c && o == k.LEFT || c && o == k.RIGHT ? s ? r.collapse(a) : (i = r.parent(a), r._enabled(i) || (i = t)) : o == k.DOWN ? i = r._nextVisible(a) : o == k.UP ? i = r._previousVisible(a) : o == k.HOME ? i = r._nextVisible(e()) : o == k.END ? i = r._previousVisible(e()) : o == k.ENTER ? a.find(".k-in:first").hasClass("k-state-selected") || r._trigger(C, a) || r.select(a) : o == k.SPACEBAR && l.length && (l.prop(F, !l.prop(F)).data(I, !1).prop(I, !1), r._checkboxChange({
                        target: l
                    }), i = a), i && (n.preventDefault(), a[0] != i[0] && (r._trigger(T, i), r.current(i))))
                },
                _click: function(t) {
                    var n, i = this,
                        r = e(t.currentTarget),
                        o = d(r.closest(W)),
                        a = r.attr("href");
                    n = a ? "#" == a || a.indexOf("#" + this.element.id + "-") >= 0 : o.length && !o.children().length, n && t.preventDefault(), r.hasClass(".k-state-selected") || i._trigger(C, r) || i.select(r)
                },
                _wrapper: function() {
                    var e, t, n = this,
                        i = n.element,
                        r = "k-widget k-treeview";
                    i.is("ul") ? (e = i.wrap("<div />").parent(), t = i) : (e = i, t = e.children("ul").eq(0)), n.wrapper = e.addClass(r), n.root = t
                },
                _group: function(e) {
                    var t = this,
                        n = e.hasClass(V),
                        i = {
                            firstLevel: n,
                            expanded: n || t._expanded(e)
                        },
                        r = e.children("ul");
                    r.addClass(t.templates.groupCssClass(i)).css("display", i.expanded ? "" : "none"), t._nodes(r, i)
                },
                _nodes: function(t, n) {
                    var i, r = this,
                        o = t.children("li");
                    n = g({
                        length: o.length
                    }, n), o.each(function(t, o) {
                        o = e(o), i = {
                            index: t,
                            expanded: r._expanded(o)
                        }, s(o), r._updateNodeClasses(o, n, i), r._group(o)
                    })
                },
                _checkboxes: function() {
                    var e, t = this.options,
                        n = t.checkboxes;
                    n && (e = "<input type='checkbox' tabindex='-1' #= (item.enabled === false) ? 'disabled' : '' # #= item.checked ? 'checked' : '' #", n.name && (e += " name='" + n.name + "'"), e += " id='_#= item.uid #' class='k-checkbox' /><label for='_#= item.uid #' class='k-checkbox-label'></label>", n = g({
                        template: e
                    }, t.checkboxes), typeof n.template == j && (n.template = v(n.template)), t.checkboxes = n)
                },
                _updateNodeClasses: function(e, t, n) {
                    var i, r, o = e.children("div"),
                        a = e.children("ul"),
                        s = this.templates;
                    e.hasClass("k-treeview") || (n = n || {}, n.expanded = typeof n.expanded != N ? n.expanded : this._expanded(e), n.index = typeof n.index != N ? n.index : e.index(), n.enabled = typeof n.enabled != N ? n.enabled : !o.children(".k-in").hasClass("k-state-disabled"), t = t || {}, t.firstLevel = typeof t.firstLevel != N ? t.firstLevel : e.parent().parent().hasClass(V), t.length = typeof t.length != N ? t.length : e.parent().children().length, e.removeClass("k-first k-last").addClass(s.wrapperCssClass(t, n)), o.removeClass("k-top k-mid k-bot").addClass(s.cssClass(t, n)), i = o.children(".k-in"), r = i[0] && "a" == i[0].nodeName.toLowerCase(), i.removeClass("k-in k-link k-state-default k-state-disabled").addClass(s.textClass(n, r)), (a.length || "true" == e.attr("data-hasChildren")) && (o.children(".k-icon").removeClass("k-plus k-minus k-plus-disabled k-minus-disabled").addClass(s.toggleButtonClass(n)), a.addClass("k-group")))
                },
                _processNodes: function(t, n) {
                    var i = this;
                    i.element.find(t).each(function(t, r) {
                        n.call(i, t, e(r).closest(W))
                    })
                },
                dataItem: function(t) {
                    var n = e(t).closest(W).attr(f.attr("uid")),
                        i = this.dataSource;
                    return i && i.getByUid(n)
                },
                _insertNode: function(t, n, i, r, o) {
                    var a, l, d, u, h = this,
                        f = c(i),
                        p = f.children().length + 1,
                        m = {
                            firstLevel: i.hasClass(V),
                            expanded: !o,
                            length: p
                        },
                        g = "",
                        v = function(e, t) {
                            e.appendTo(t)
                        };
                    for (d = 0; t.length > d; d++) u = t[d], u.index = n + d, g += h._renderItem({
                        group: m,
                        item: u
                    });
                    if (l = e(g), l.length) {
                        for (h.angular("compile", function() {
                            return {
                                elements: l.get(),
                                data: t.map(function(e) {
                                    return {
                                        dataItem: e
                                    }
                                })
                            }
                        }), f.length || (f = e(h._renderGroup({
                            group: m
                        })).appendTo(i)), r(l, f), i.hasClass("k-item") && (s(i), h._updateNodeClasses(i)), h._updateNodeClasses(l.prev().first()), h._updateNodeClasses(l.next().last()), d = 0; t.length > d; d++) u = t[d], u.hasChildren && (a = u.children.data(), a.length && h._insertNode(a, u.index, l.eq(d), v, !h._expanded(l.eq(d))));
                        return l
                    }
                },
                _updateNodes: function(t, n) {
                    function i(e, t) {
                        e.find(".k-checkbox-wrapper :checkbox").prop(F, t).data(I, !1).prop(I, !1)
                    }
                    var r, o, a, s, l, c, u, h = this,
                        f = {
                            treeview: h.options,
                            item: s
                        },
                        m = "expanded" != n && "checked" != n;
                    if ("selected" == n) s = t[0], o = h.findByUid(s.uid).find(".k-in:first").removeClass("k-state-hover").toggleClass("k-state-selected", s[n]).end(), s[n] && h.current(o), o.attr(q, !!s[n]);
                    else {
                        for (u = e.map(t, function(e) {
                            return h.findByUid(e.uid).children("div")
                        }), m && h.angular("cleanup", function() {
                            return {
                                elements: u
                            }
                        }), r = 0; t.length > r; r++) f.item = s = t[r], a = u[r], o = a.parent(), m && a.children(".k-in").html(h.templates.itemContent(f)), n == F ? (l = s[n], i(a, l), h.options.checkboxes.checkChildren && (i(o.children(".k-group"), l), h._setChecked(s.children, l), h._bubbleIndeterminate(o))) : "expanded" == n ? h._toggle(o, s, s[n]) : "enabled" == n && (o.find(".k-checkbox-wrapper :checkbox").prop("disabled", !s[n]), c = !d(o).is(U), o.removeAttr(G), s[n] || (s.selected && s.set("selected", !1), s.expanded && s.set("expanded", !1), c = !0, o.attr(q, !1).attr(G, !0)), h._updateNodeClasses(o, {}, {
                            enabled: s[n],
                            expanded: !c
                        })), a.length && this.trigger("itemChange", {
                            item: a,
                            data: s,
                            ns: p
                        });
                        m && h.angular("compile", function() {
                            return {
                                elements: u,
                                data: e.map(t, function(e) {
                                    return [{
                                        dataItem: e
                                    }]
                                })
                            }
                        })
                    }
                },
                _appendItems: function(e, t, n) {
                    var i = c(n),
                        r = i.children(),
                        o = !this._expanded(n);
                    typeof e == N && (e = r.length), this._insertNode(t, e, n, function(t, n) {
                        e >= r.length ? t.appendTo(n) : t.insertBefore(r.eq(e))
                    }, o), this._expanded(n) && (this._updateNodeClasses(n), c(n).css("display", "block"))
                },
                _refreshChildren: function(e, t, n) {
                    var i, r, o, a = this.options,
                        l = a.loadOnDemand,
                        d = a.checkboxes && a.checkboxes.checkChildren;
                    if (c(e).empty(), t.length)
                        for (this._appendItems(n, t, e), r = c(e).children(), l && d && this._bubbleIndeterminate(r.last()), i = 0; r.length > i; i++) o = r.eq(i), this.trigger("itemChange", {
                            item: o.children("div"),
                            data: this.dataItem(o),
                            ns: p
                        });
                    else s(e)
                },
                _refreshRoot: function(t) {
                    var n, i, r, o = this._renderGroup({
                        items: t,
                        group: {
                            firstLevel: !0,
                            expanded: !0
                        }
                    });
                    for (this.root.length ? (this._angularItems("cleanup"), n = e(o), this.root.attr("class", n.attr("class")).html(n.html())) : this.root = this.wrapper.html(o).children("ul"), this.root.attr("role", "tree"), i = this.root.children(".k-item"), r = 0; t.length > r; r++) this.trigger("itemChange", {
                        item: i.eq(r),
                        data: t[r],
                        ns: p
                    });
                    this._angularItems("compile")
                },
                refresh: function(e) {
                    var n, i, r = e.node,
                        o = e.action,
                        a = e.items,
                        s = this.wrapper,
                        l = this.options,
                        c = l.loadOnDemand,
                        d = l.checkboxes && l.checkboxes.checkChildren;
                    if (e.field) {
                        if (!a[0] || !a[0].level) return;
                        return this._updateNodes(a, e.field)
                    }
                    if (r && (s = this.findByUid(r.uid), this._progress(s, !1)), d && "remove" != o) {
                        for (i = !1, n = 0; a.length > n; n++)
                            if ("checked" in a[n]) {
                                i = !0;
                                break
                            } if (!i && r && r.checked)
                            for (n = 0; a.length > n; n++) a[n].checked = !0
                    }
                    if ("add" == o ? this._appendItems(e.index, a, s) : "remove" == o ? this._remove(this.findByUid(a[0].uid), !1) : "itemchange" == o ? this._updateNodes(a) : "itemloaded" == o ? this._refreshChildren(s, a, e.index) : this._refreshRoot(a), "remove" != o)
                        for (n = 0; a.length > n; n++)(!c || a[n].expanded) && a[n].load();
                    this.trigger(L, {
                        node: r ? s : t
                    })
                },
                _error: function(e) {
                    var t = e.node && this.findByUid(e.node.uid),
                        n = this.templates.retry({
                            messages: this.options.messages
                        });
                    t ? (this._progress(t, !1), this._expanded(t, !1), u(t).addClass("k-i-refresh"), e.node.loaded(!1)) : (this._progress(!1), this.element.html(n))
                },
                _retryRequest: function(e) {
                    e.preventDefault(), this.dataSource.fetch()
                },
                expand: function(e) {
                    this._processNodes(e, function(e, t) {
                        this.toggle(t, !0)
                    })
                },
                collapse: function(e) {
                    this._processNodes(e, function(e, t) {
                        this.toggle(t, !1)
                    })
                },
                enable: function(e, t) {
                    t = 2 == arguments.length ? !!t : !0, this._processNodes(e, function(e, n) {
                        this.dataItem(n).set("enabled", t)
                    })
                },
                current: function(n) {
                    var i = this,
                        r = i._current,
                        o = i.element,
                        a = i._ariaId;
                    return arguments.length > 0 && n && n.length ? (r && (r[0].id === a && r.removeAttr("id"), r.find(".k-in:first").removeClass("k-state-focused")), r = i._current = e(n, o).closest(W), r.find(".k-in:first").addClass("k-state-focused"), a = r[0].id || a, a && (i.wrapper.removeAttr("aria-activedescendant"), r.attr("id", a), i.wrapper.attr("aria-activedescendant", a)), t) : (r || (r = i._nextVisible(e())), r)
                },
                select: function(n) {
                    var i = this,
                        r = i.element;
                    return arguments.length ? (n = e(n, r).closest(W), r.find(".k-state-selected").each(function() {
                        var t = i.dataItem(this);
                        t ? (t.set("selected", !1), delete t.selected) : e(this).removeClass("k-state-selected")
                    }), n.length && (i.dataItem(n).set("selected", !0), i._clickTarget = n), i.trigger(A), t) : r.find(".k-state-selected").closest(W)
                },
                _toggle: function(e, t, n) {
                    var i, r = this.options,
                        o = d(e),
                        a = n ? "expand" : "collapse";
                    o.data("animating") || this._trigger(a, e) || (this._expanded(e, n), i = t && t.loaded(), n && !i ? (r.loadOnDemand && this._progress(e, !0), o.remove(), t.load()) : (this._updateNodeClasses(e, {}, {
                        expanded: n
                    }), n || o.css("height", o.height()).css("height"), o.kendoStop(!0, !0).kendoAnimate(g({
                        reset: !0
                    }, r.animation[a], {
                        complete: function() {
                            n && o.css("height", "")
                        }
                    }))))
                },
                toggle: function(t, n) {
                    t = e(t), u(t).is(".k-minus,.k-plus,.k-minus-disabled,.k-plus-disabled") && (1 == arguments.length && (n = !this._expanded(t)), this._expanded(t, n))
                },
                destroy: function() {
                    var e = this;
                    b.fn.destroy.call(e), e.wrapper.off(x), e._unbindDataSource(), e.dragging && e.dragging.destroy(), f.destroy(e.element), e.root = e.wrapper = e.element = null
                },
                _expanded: function(e, n) {
                    var i = f.attr("expanded"),
                        r = this.dataItem(e),
                        o = n;
                    return 1 == arguments.length ? "true" === e.attr(i) || r && r.expanded : (d(e).data("animating") || (r && (r.set("expanded", o), o = r.expanded), o ? (e.attr(i, "true"), e.attr("aria-expanded", "true")) : (e.removeAttr(i), e.attr("aria-expanded", "false"))), t)
                },
                _progress: function(e, t) {
                    var n = this.element,
                        i = this.templates.loading({
                            messages: this.options.messages
                        });
                    1 == arguments.length ? (t = e, t ? n.html(i) : n.empty()) : u(e).toggleClass("k-loading", t).removeClass("k-i-refresh")
                },
                text: function(e, n) {
                    var i = this.dataItem(e),
                        r = this.options[$.text],
                        o = i.level(),
                        a = r.length,
                        s = r[Math.min(o, a - 1)];
                    return n ? (i.set(s, n), t) : i[s]
                },
                _objectOrSelf: function(t) {
                    return e(t).closest("[data-role=treeview]").data("kendoTreeView") || this
                },
                _dataSourceMove: function(t, n, i, r) {
                    var o, a = this._objectOrSelf(i || n),
                        s = a.dataSource,
                        l = e.Deferred().resolve().promise();
                    return i && i[0] != a.element[0] && (o = a.dataItem(i), o.loaded() || (a._progress(i, !0), l = o.load()), i != this.root && (s = o.children, s && s instanceof w || (o._initChildren(), o.loaded(!0), s = o.children))), t = this._toObservableData(t), r.call(a, s, t, l)
                },
                _toObservableData: function(t) {
                    var n, i, r = t;
                    return (t instanceof window.jQuery || Y(t)) && (n = this._objectOrSelf(t).dataSource, i = e(t).attr(f.attr("uid")), r = n.getByUid(i), r && (r = n.remove(r))), r
                },
                _insert: function(e, t, n) {
                    t instanceof f.data.ObservableArray ? t = t.toJSON() : _(t) || (t = [t]);
                    var i = e.parent();
                    return i && i._initChildren && (i.hasChildren = !0, i._initChildren()), e.splice.apply(e, [n, 0].concat(t)), this.findByUid(e[n].uid)
                },
                insertAfter: o(1),
                insertBefore: o(0),
                append: function(t, n, i) {
                    var r = this.root;
                    return n && (r = c(n)), this._dataSourceMove(t, r, n, function(t, r, o) {
                        function a() {
                            n && l._expanded(n, !0);
                            var e = t.data(),
                                i = Math.max(e.length, 0);
                            return l._insert(e, r, i)
                        }
                        var s, l = this;
                        return o.then(function() {
                            s = a(), (i = i || e.noop)(s)
                        }), s || null
                    })
                },
                _remove: function(t, n) {
                    var i, r, o, a = this;
                    return t = e(t, a.element), this.angular("cleanup", function() {
                        return {
                            elements: t.get()
                        }
                    }), i = t.parent().parent(), r = t.prev(), o = t.next(), t[n ? "detach" : "remove"](), i.hasClass("k-item") && (s(i), a._updateNodeClasses(i)), a._updateNodeClasses(r), a._updateNodeClasses(o), t
                },
                remove: function(e) {
                    var t = this.dataItem(e);
                    t && this.dataSource.remove(t)
                },
                detach: function(e) {
                    return this._remove(e, !0)
                },
                findByText: function(t) {
                    return e(this.element).find(".k-in").filter(function(n, i) {
                        return e(i).text() == t
                    }).closest(W)
                },
                findByUid: function(t) {
                    var n, i, r = this.element.find(".k-item"),
                        o = f.attr("uid");
                    for (i = 0; r.length > i; i++)
                        if (r[i].getAttribute(o) == t) {
                            n = r[i];
                            break
                        } return e(n)
                },
                expandPath: function(t, n) {
                    function i() {
                        a.shift(), a.length ? r(a[0]).then(i) : s.call(o)
                    }

                    function r(t) {
                        var n = e.Deferred(),
                            i = o.dataSource.get(t);
                        return i ? i.loaded() ? (i.set("expanded", !0), n.resolve()) : (o._progress(o.findByUid(i.uid), !0), i.load().then(function() {
                            i.set("expanded", !0), n.resolve()
                        })) : n.resolve(), n.promise()
                    }
                    var o = this,
                        a = t.slice(0),
                        s = n || e.noop;
                    r(a[0]).then(i)
                },
                _parentIds: function(e) {
                    for (var t = e && e.parentNode(), n = []; t && t.parentNode;) n.unshift(t.id), t = t.parentNode();
                    return n
                },
                expandTo: function(e) {
                    e instanceof f.data.Node || (e = this.dataSource.get(e));
                    var t = this._parentIds(e);
                    this.expandPath(t)
                },
                _renderItem: function(e) {
                    return e.group || (e.group = {}), e.treeview = this.options, e.r = this.templates, this.templates.item(e)
                },
                _renderGroup: function(e) {
                    var t = this;
                    return e.renderItems = function(e) {
                        var n = "",
                            i = 0,
                            r = e.items,
                            o = r ? r.length : 0,
                            a = e.group;
                        for (a.length = o; o > i; i++) e.group = a, e.item = r[i], e.item.index = i, n += t._renderItem(e);
                        return n
                    }, e.r = t.templates, t.templates.group(e)
                }
            }), p.plugin(l)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.pivot.fieldmenu.min", ["kendo.pivotgrid.min", "kendo.menu.min", "kendo.window.min", "kendo.treeview.min", "kendo.dropdownlist.min"], e)
    }(function() {
        return function(e, t) {
            function n(e, t) {
                var n, i, r = [];
                for (n = 0, i = e.length; i > n; n++) e[n].field !== t && r.push(e[n]);
                return r
            }

            function i(e, t, n) {
                var i, r, o, a;
                if (!e) return [];
                for (e = e.filters, i = 0, r = [], o = e.length; o > i; i++) a = e[i].operator, (n || "in" === a) && a !== n || e[i].field !== t || r.push(e[i]);
                return r
            }

            function r(t, n, r) {
                var o, a = 0,
                    s = r.length;
                if (t = i(t, n, "in")[0])
                    for (o = t.value.split(","); s > a; a++) r[a].checked = e.inArray(r[a].uniqueName, o) >= 0;
                else
                    for (; s > a; a++) r[a].checked = !0
            }

            function o(e, t) {
                var n, i = e.length;
                for (n = 0; i > n; n++) e[n].checked && 0 !== e[n].level() && t.push(e[n].uniqueName), e[n].hasChildren && o(e[n].children.view(), t)
            }
            var a = window.kendo,
                s = a.ui,
                l = "kendoContextMenu",
                c = e.proxy,
                d = ".kendoPivotFieldMenu",
                u = s.Widget,
                h = u.extend({
                    init: function(e, t) {
                        u.fn.init.call(this, e, t), this._dataSource(), this._layout(), a.notify(this)
                    },
                    events: [],
                    options: {
                        name: "PivotFieldMenu",
                        filter: null,
                        filterable: !0,
                        sortable: !0,
                        messages: {
                            info: "Show items with value that:",
                            sortAscending: "Sort Ascending",
                            sortDescending: "Sort Descending",
                            filterFields: "Fields Filter",
                            filter: "Filter",
                            include: "Include Fields...",
                            title: "Fields to include",
                            clear: "Clear",
                            ok: "OK",
                            cancel: "Cancel",
                            operators: {
                                contains: "Contains",
                                doesnotcontain: "Does not contain",
                                startswith: "Starts with",
                                endswith: "Ends with",
                                eq: "Is equal to",
                                neq: "Is not equal to"
                            }
                        }
                    },
                    _layout: function() {
                        var t = this.options;
                        this.wrapper = e(a.template(p)({
                            ns: a.ns,
                            filterable: t.filterable,
                            sortable: t.sortable,
                            messages: t.messages
                        })), this.menu = this.wrapper[l]({
                            filter: t.filter,
                            target: this.element,
                            orientation: "vertical",
                            showOn: "click",
                            closeOnClick: !1,
                            open: c(this._menuOpen, this),
                            select: c(this._select, this),
                            copyAnchorStyles: !1
                        }).data(l), this._createWindow(), t.filterable && this._initFilterForm()
                    },
                    _initFilterForm: function() {
                        var e = this.menu.element.find(".k-filter-item"),
                            t = c(this._filter, this);
                        this._filterOperator = new a.ui.DropDownList(e.find("select")), this._filterValue = e.find(".k-textbox"), e.on("submit" + d, t).on("click" + d, ".k-button-filter", t).on("click" + d, ".k-button-clear", c(this._reset, this))
                    },
                    _setFilterForm: function(e) {
                        var t = this._filterOperator,
                            n = "",
                            i = "";
                        e && (n = e.operator, i = e.value), t.value(n), t.value() || t.select(0), this._filterValue.val(i)
                    },
                    _clearFilters: function(e) {
                        var t, n, r = this.dataSource.filter() || {},
                            o = 0;
                        for (r.filters = r.filters || [], t = i(r, e), n = t.length; n > o; o++) r.filters.splice(r.filters.indexOf(t[o]), 1);
                        return r
                    },
                    _convert: function(t) {
                        var n = this.dataSource.options.schema,
                            i = ((n.model || {}).fields || {})[this.currentMember];
                        return i && ("number" === i.type ? t = parseFloat(t) : "boolean" === i.type && (t = !!e.parseJSON(t))), t
                    },
                    _filter: function(e) {
                        var n, i, r = this,
                            o = r._convert(r._filterValue.val());
                        return e.preventDefault(), "" === o ? (r.menu.close(), t) : (n = {
                            field: r.currentMember,
                            operator: r._filterOperator.value(),
                            value: o
                        }, i = r._clearFilters(r.currentMember), i.filters.push(n), r.dataSource.filter(i), r.menu.close(), t)
                    },
                    _reset: function(e) {
                        var t = this,
                            n = t._clearFilters(t.currentMember);
                        e.preventDefault(), n.filters[0] || (n = {}), t.dataSource.filter(n), t._setFilterForm(null), t.menu.close()
                    },
                    _sort: function(e) {
                        var t = this.currentMember,
                            i = this.dataSource.sort() || [];
                        i = n(i, t), i.push({
                            field: t,
                            dir: e
                        }), this.dataSource.sort(i), this.menu.close()
                    },
                    setDataSource: function(e) {
                        this.options.dataSource = e, this._dataSource()
                    },
                    _dataSource: function() {
                        this.dataSource = a.data.PivotDataSource.create(this.options.dataSource)
                    },
                    _createWindow: function() {
                        var t = this.options.messages;
                        this.includeWindow = e(a.template(m)({
                            messages: t
                        })).on("click" + d, ".k-button-ok", c(this._applyIncludes, this)).on("click" + d, ".k-button-cancel", c(this._closeWindow, this)), this.includeWindow = new s.Window(this.includeWindow, {
                            title: t.title,
                            visible: !1,
                            resizable: !1,
                            open: c(this._windowOpen, this)
                        })
                    },
                    _applyIncludes: function(e) {
                        var t, n = [],
                            r = this.treeView.dataSource.view(),
                            a = r[0].checked,
                            s = this.dataSource.filter(),
                            l = i(s, this.currentMember, "in")[0];
                        o(r, n), l && (a ? (s.filters.splice(s.filters.indexOf(l), 1), s.filters.length || (s = {})) : l.value = n.join(","), t = s), n.length && (t || a || (t = {
                            field: this.currentMember,
                            operator: "in",
                            value: n.join(",")
                        }, s && (s.filters.push(t), t = s))), t && this.dataSource.filter(t), this._closeWindow(e)
                    },
                    _closeWindow: function(e) {
                        e.preventDefault(), this.includeWindow.close()
                    },
                    _treeViewDataSource: function() {
                        var e = this;
                        return a.data.HierarchicalDataSource.create({
                            schema: {
                                model: {
                                    id: "uniqueName",
                                    hasChildren: function(e) {
                                        return parseInt(e.childrenCardinality, 10) > 0
                                    }
                                }
                            },
                            transport: {
                                read: function(t) {
                                    var n = {},
                                        i = e.treeView.dataSource.get(t.data.uniqueName),
                                        o = t.data.uniqueName;
                                    o ? (n.memberUniqueName = i.uniqueName.replace(/\&/g, "&amp;"), n.treeOp = 1) : n.levelUniqueName = e.currentMember + ".[(ALL)]", e.dataSource.schemaMembers(n).done(function(n) {
                                        r(e.dataSource.filter(), e.currentMember, n), t.success(n)
                                    }).fail(t.error)
                                }
                            }
                        })
                    },
                    _createTreeView: function(e) {
                        var t = this;
                        t.treeView = new s.TreeView(e, {
                            autoBind: !1,
                            dataSource: t._treeViewDataSource(),
                            dataTextField: "caption",
                            template: "#: data.item.caption || data.item.name #",
                            checkboxes: {
                                checkChildren: !0
                            },
                            dataBound: function() {
                                s.progress(t.includeWindow.element, !1)
                            }
                        })
                    },
                    _menuOpen: function(t) {
                        if (t.event) {
                            var n = a.attr("name");
                            this.currentMember = e(t.event.target).closest("[" + n + "]").attr(n), this.options.filterable && this._setFilterForm(i(this.dataSource.filter(), this.currentMember)[0])
                        }
                    },
                    _select: function(t) {
                        var n = e(t.item);
                        e(".k-pivot-filter-window").not(this.includeWindow.element).kendoWindow("close"), n.hasClass("k-include-item") ? this.includeWindow.center().open() : n.hasClass("k-sort-asc") ? this._sort("asc") : n.hasClass("k-sort-desc") && this._sort("desc")
                    },
                    _windowOpen: function() {
                        this.treeView || this._createTreeView(this.includeWindow.element.find(".k-treeview")), s.progress(this.includeWindow.element, !0), this.treeView.dataSource.read()
                    },
                    destroy: function() {
                        u.fn.destroy.call(this), this.menu && (this.menu.destroy(), this.menu = null), this.treeView && (this.treeView.destroy(), this.treeView = null), this.includeWindow && (this.includeWindow.destroy(), this.includeWindow = null), this.wrapper = null, this.element = null
                    }
                }),
                f = '<div class="k-filterable k-content" tabindex="-1" data-role="fieldmenu"><form class="k-filter-menu"><div><div class="k-filter-help-text">#=messages.info#</div><select>#for(var op in messages.operators){#<option value="#=op#">#=messages.operators[op]#</option>#}#</select><input class="k-textbox" type="text" /><div><a class="k-button k-primary k-button-filter" href="\\#">#=messages.filter#</a><a class="k-button k-button-clear" href="\\#">#=messages.clear#</a></div></div></form></div>',
                p = '<ul class="k-pivot-fieldmenu"># if (sortable) {#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-icon k-i-sort-asc"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-icon k-i-sort-desc"></span>${messages.sortDescending}</span></li># if (filterable) {#<li class="k-separator"></li># } ## } ## if (filterable) {#<li class="k-item k-include-item"><span class="k-link"><span class="k-icon k-filter"></span>${messages.include}</span></li><li class="k-separator"></li><li class="k-item k-filter-item"><span class="k-link"><span class="k-icon k-filter"></span>${messages.filterFields}</span><ul><li>' + f + "</li></ul></li># } #</ul>",
                m = '<div class="k-popup-edit-form k-pivot-filter-window"><div class="k-edit-form-container"><div class="k-treeview"></div><div class="k-edit-buttons k-state-default"><a class="k-button k-primary k-button-ok" href="\\#">${messages.ok}</a><a class="k-button k-button-cancel" href="\\#">${messages.cancel}</a></div></div>';
            s.plugin(h)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.filtercell.min", ["kendo.autocomplete.min", "kendo.datepicker.min", "kendo.numerictextbox.min", "kendo.combobox.min", "kendo.dropdownlist.min"], e)
    }(function() {
        return function(e, t) {
            function n(t) {
                var n = "string" == typeof t ? t : t.operator;
                return e.inArray(n, v) > -1
            }

            function i(t, n) {
                var r, o, a = [];
                if (e.isPlainObject(t))
                    if (t.hasOwnProperty("filters")) a = t.filters;
                    else if (t.field == n) return t;
                for (e.isArray(t) && (a = t), r = 0; a.length > r; r++)
                    if (o = i(a[r], n)) return o
            }

            function r(t, n) {
                t.filters && (t.filters = e.grep(t.filters, function(e) {
                    return r(e, n), e.filters ? e.filters.length : e.field != n
                }))
            }

            function o(e, t) {
                var n = a.getter(t, !0);
                return function(t) {
                    for (var i, r, o = e(t), a = [], s = 0, l = {}; o.length > s;) i = o[s++], r = n(i), l.hasOwnProperty(r) || (a.push(i), l[r] = !0);
                    return a
                }
            }
            var a = window.kendo,
                s = a.ui,
                l = a.data.DataSource,
                c = s.Widget,
                d = "change",
                u = "boolean",
                h = "enums",
                f = "string",
                p = "Is equal to",
                m = "Is not equal to",
                g = e.proxy,
                v = ["isnull", "isnotnull", "isempty", "isnotempty"],
                _ = c.extend({
                    init: function(i, r) {
                        var o, s, l, p, m, v, _, b, w, y, k, x;
                        if (i = e(i).addClass("k-filtercell"), o = this.wrapper = e("<span/>").appendTo(i), s = this, m = r, b = s.operators = r.operators || {}, w = s.input = e("<input/>").attr(a.attr("bind"), "value: value").appendTo(o), c.fn.init.call(s, i[0], r), r = s.options, l = s.dataSource = r.dataSource, s.model = l.reader.model, _ = r.type = f, y = a.getter("reader.model.fields", !0)(l) || {}, k = y[r.field], k && k.type && (_ = r.type = k.type), r.values && (r.type = _ = h), b = b[_] || r.operators[_], !m.operator)
                            for (v in b) {
                                r.operator = v;
                                break
                            }
                        s._parse = function(e) {
                            return null != e ? e + "" : e
                        }, s.model && s.model.fields && (x = s.model.fields[r.field], x && x.parse && (s._parse = g(x.parse, x))), s.defaultOperator = r.operator, s.viewModel = p = a.observable({
                            operator: r.operator,
                            value: null,
                            operatorVisible: function() {
                                var e = this.get("value");
                                return null !== e && e !== t && "undefined" != e || n(this.get("operator")) && !s._clearInProgress
                            }
                        }), p.bind(d, g(s.updateDsFilter, s)), _ == f && s.initSuggestDataSource(r), null !== r.inputWidth && w.width(r.inputWidth), s._setInputType(r, _), _ != u && r.showOperators !== !1 ? s._createOperatorDropDown(b) : o.addClass("k-operator-hidden"), s._createClearIcon(), a.bind(this.wrapper, p), _ == f && (r.template || s.setAutoCompleteSource()), _ == h && s.setComboBoxSource(s.options.values), s._refreshUI(), s._refreshHandler = g(s._refreshUI, s), s.dataSource.bind(d, s._refreshHandler)
                    },
                    _setInputType: function(t, n) {
                        var i, r, o, s, l, c = this,
                            d = c.input;
                        "function" == typeof t.template ? (t.template.call(c.viewModel, {
                            element: c.input,
                            dataSource: c.suggestDataSource
                        }), c._angularItems("compile")) : n == f ? d.attr(a.attr("role"), "autocomplete").attr(a.attr("text-field"), t.dataTextField || t.field).attr(a.attr("filter"), t.suggestionOperator).attr(a.attr("delay"), t.delay).attr(a.attr("min-length"), t.minLength).attr(a.attr("value-primitive"), !0) : "date" == n ? d.attr(a.attr("role"), "datepicker") : n == u ? (d.remove(), i = e("<input type='radio'/>"), r = c.wrapper, o = a.guid(), s = e("<label/>").text(t.messages.isTrue).append(i), i.attr(a.attr("bind"), "checked:value").attr("name", o).val("true"), l = s.clone().text(t.messages.isFalse), i.clone().val("false").appendTo(l), r.append([s, l])) : "number" == n ? d.attr(a.attr("role"), "numerictextbox") : n == h && d.attr(a.attr("role"), "combobox").attr(a.attr("text-field"), "text").attr(a.attr("suggest"), !0).attr(a.attr("filter"), "contains").attr(a.attr("value-field"), "value").attr(a.attr("value-primitive"), !0)
                    },
                    _createOperatorDropDown: function(t) {
                        var n, i, r = [];
                        for (n in t) r.push({
                            text: t[n],
                            value: n
                        });
                        i = e('<input class="k-dropdown-operator" ' + a.attr("bind") + '="value: operator"/>').appendTo(this.wrapper), this.operatorDropDown = i.kendoDropDownList({
                            dataSource: r,
                            dataTextField: "text",
                            dataValueField: "value",
                            open: function() {
                                this.popup.element.width(150)
                            },
                            valuePrimitive: !0
                        }).data("kendoDropDownList"), this.operatorDropDown.wrapper.find(".k-i-arrow-s").removeClass("k-i-arrow-s").addClass("k-filter")
                    },
                    initSuggestDataSource: function(e) {
                        var n = e.suggestDataSource;
                        n instanceof l || (!e.customDataSource && n && (n.group = t), n = this.suggestDataSource = l.create(n)), e.customDataSource || (n._pageSize = t, n.reader.data = o(n.reader.data, this.options.field)), this.suggestDataSource = n
                    },
                    setAutoCompleteSource: function() {
                        var e = this.input.data("kendoAutoComplete");
                        e && e.setDataSource(this.suggestDataSource)
                    },
                    setComboBoxSource: function(e) {
                        var t = l.create({
                                data: e
                            }),
                            n = this.input.data("kendoComboBox");
                        n && n.setDataSource(t)
                    },
                    _refreshUI: function() {
                        var t = this,
                            n = i(t.dataSource.filter(), this.options.field) || {},
                            r = t.viewModel;
                        t.manuallyUpdatingVM = !0, n = e.extend(!0, {}, n), t.options.type == u && r.value !== n.value && t.wrapper.find(":radio").prop("checked", !1), n.operator && r.set("operator", n.operator), r.set("value", n.value), t.manuallyUpdatingVM = !1
                    },
                    updateDsFilter: function(i) {
                        var r, o, a, s = this,
                            l = s.viewModel;
                        s.manuallyUpdatingVM || "operator" == i.field && l.value === t && !n(l) || (r = e.extend({}, s.viewModel.toJSON(), {
                            field: s.options.field
                        }), o = {
                            logic: "and",
                            filters: []
                        }, (r.value !== t && null !== r.value || n(r) && !this._clearInProgress) && o.filters.push(r), a = s._merge(o), s.dataSource.filter(a.filters.length ? a : {}))
                    },
                    _merge: function(t) {
                        var i, o, a, s = this,
                            l = t.logic || "and",
                            c = t.filters,
                            d = s.dataSource.filter() || {
                                filters: [],
                                logic: "and"
                            };
                        for (r(d, s.options.field), o = 0, a = c.length; a > o; o++) i = c[o], i.value = s._parse(i.value);
                        return c = e.grep(c, function(e) {
                            return "" !== e.value && null !== e.value || n(e)
                        }), c.length && (d.filters.length ? (t.filters = c, "and" !== d.logic && (d.filters = [{
                            logic: d.logic,
                            filters: d.filters
                        }], d.logic = "and"), d.filters.push(c.length > 1 ? t : c[0])) : (d.filters = c, d.logic = l)), d
                    },
                    _createClearIcon: function() {
                        var t = this;
                        e("<button type='button' class='k-button k-button-icon' title = " + t.options.messages.clear + "/>").attr(a.attr("bind"), "visible:operatorVisible").html("<span class='k-icon k-i-close'/>").click(g(t.clearFilter, t)).appendTo(t.wrapper)
                    },
                    clearFilter: function() {
                        this._clearInProgress = !0, n(this.viewModel.operator) && this.viewModel.set("operator", this.defaultOperator), this.viewModel.set("value", null), this._clearInProgress = !1
                    },
                    _angularItems: function(e) {
                        var t = this.wrapper.closest("th").get(),
                            n = this.options.column;
                        this.angular(e, function() {
                            return {
                                elements: t,
                                data: [{
                                    column: n
                                }]
                            }
                        })
                    },
                    destroy: function() {
                        var e = this;
                        e.filterModel = null, e.operatorDropDown = null, e._angularItems("cleanup"), e._refreshHandler && (e.dataSource.bind(d, e._refreshHandler), e._refreshHandler = null), a.unbind(e.element), c.fn.destroy.call(e), a.destroy(e.element)
                    },
                    events: [d],
                    options: {
                        name: "FilterCell",
                        delay: 200,
                        minLength: 1,
                        inputWidth: null,
                        values: t,
                        customDataSource: !1,
                        field: "",
                        dataTextField: "",
                        type: "string",
                        suggestDataSource: null,
                        suggestionOperator: "startswith",
                        operator: "eq",
                        showOperators: !0,
                        template: null,
                        messages: {
                            isTrue: "is true",
                            isFalse: "is false",
                            filter: "Filter",
                            clear: "Clear",
                            operator: "Operator"
                        },
                        operators: {
                            string: {
                                eq: p,
                                neq: m,
                                startswith: "Starts with",
                                contains: "Contains",
                                doesnotcontain: "Does not contain",
                                endswith: "Ends with",
                                isnull: "Is null",
                                isnotnull: "Is not null",
                                isempty: "Is empty",
                                isnotempty: "Is not empty"
                            },
                            number: {
                                eq: p,
                                neq: m,
                                gte: "Is greater than or equal to",
                                gt: "Is greater than",
                                lte: "Is less than or equal to",
                                lt: "Is less than",
                                isnull: "Is null",
                                isnotnull: "Is not null"
                            },
                            date: {
                                eq: p,
                                neq: m,
                                gte: "Is after or equal to",
                                gt: "Is after",
                                lte: "Is before or equal to",
                                lt: "Is before",
                                isnull: "Is null",
                                isnotnull: "Is not null"
                            },
                            enums: {
                                eq: p,
                                neq: m,
                                isnull: "Is null",
                                isnotnull: "Is not null"
                            }
                        }
                    }
                });
            s.plugin(_)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
    function(e, define) {
        define("kendo.panelbar.min", ["kendo.core.min"], e)
    }(function() {
        return function(e, t) {
            function n(t) {
                t = e(t), t.children(v).children(".k-icon").remove(), t.filter(":has(.k-panel),:has(.k-content)").children(".k-link:not(:has([class*=k-i-arrow]))").each(function() {
                    var t = e(this),
                        n = t.parent();
                    t.append("<span class='k-icon " + (n.hasClass(M) ? "k-i-arrow-n k-panelbar-collapse" : "k-i-arrow-s k-panelbar-expand") + "'/>")
                })
            }

            function i(t) {
                t = e(t), t.filter(".k-first:not(:first-child)").removeClass(x), t.filter(".k-last:not(:last-child)").removeClass(m), t.filter(":first-child").addClass(x), t.filter(":last-child").addClass(m)
            }
            var r = window.kendo,
                o = r.ui,
                a = r.keys,
                s = e.extend,
                l = e.each,
                c = r.template,
                d = o.Widget,
                u = /^(ul|a|div)$/i,
                h = ".kendoPanelBar",
                f = "img",
                p = "href",
                m = "k-last",
                g = "k-link",
                v = "." + g,
                _ = "error",
                b = ".k-item",
                w = ".k-group",
                y = w + ":visible",
                k = "k-image",
                x = "k-first",
                C = "expand",
                S = "select",
                T = "k-content",
                D = "activate",
                A = "collapse",
                E = "mouseenter",
                F = "mouseleave",
                I = "contentLoad",
                M = "k-state-active",
                R = "> .k-panel",
                P = "> .k-content",
                z = "k-state-focused",
                B = "k-state-disabled",
                L = "k-state-selected",
                H = "." + L,
                N = "k-state-highlight",
                O = b + ":not(.k-state-disabled)",
                V = "> " + O + " > " + v + ", .k-panel > " + O + " > " + v,
                U = b + ".k-state-disabled > .k-link",
                W = "> li > " + H + ", .k-panel > li > " + H,
                j = "k-state-default",
                q = "aria-disabled",
                G = "aria-expanded",
                $ = "aria-hidden",
                Y = "aria-selected",
                K = ":visible",
                Q = ":empty",
                X = "single",
                J = {
                    content: c("<div role='region' class='k-content'#= contentAttributes(data) #>#= content(item) #</div>"),
                    group: c("<ul role='group' aria-hidden='true' class='#= groupCssClass(group) #'#= groupAttributes(group) #>#= renderItems(data) #</ul>"),
                    itemWrapper: c("<#= tag(item) # class='#= textClass(item, group) #' #= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) ##= arrow(data) #</#= tag(item) #>"),
                    item: c("<li role='menuitem' #=aria(item)#class='#= wrapperCssClass(group, item) #'>#= itemWrapper(data) ## if (item.items) { ##= subGroup({ items: item.items, panelBar: panelBar, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } #</li>"),
                    image: c("<img class='k-image' alt='' src='#= imageUrl #' />"),
                    arrow: c("<span class='#= arrowClass(item) #'></span>"),
                    sprite: c("<span class='k-sprite #= spriteCssClass #'></span>"),
                    empty: c("")
                },
                Z = {
                    aria: function(e) {
                        var t = "";
                        return (e.items || e.content || e.contentUrl) && (t += G + "='" + (e.expanded ? "true" : "false") + "' "), e.enabled === !1 && (t += q + "='true'"), t
                    },
                    wrapperCssClass: function(e, t) {
                        var n = "k-item",
                            i = t.index;
                        return n += t.enabled === !1 ? " " + B : t.expanded === !0 ? " " + M : " k-state-default", 0 === i && (n += " k-first"), i == e.length - 1 && (n += " k-last"), t.cssClass && (n += " " + t.cssClass), n
                    },
                    textClass: function(e, t) {
                        var n = g;
                        return t.firstLevel && (n += " k-header"), n
                    },
                    textAttributes: function(e) {
                        return e.url ? " href='" + e.url + "'" : ""
                    },
                    arrowClass: function(e) {
                        var t = "k-icon";
                        return t += e.expanded ? " k-i-arrow-n k-panelbar-collapse" : " k-i-arrow-s k-panelbar-expand"
                    },
                    text: function(e) {
                        return e.encoded === !1 ? e.text : r.htmlEncode(e.text)
                    },
                    tag: function(e) {
                        return e.url || e.contentUrl ? "a" : "span"
                    },
                    groupAttributes: function(e) {
                        return e.expanded !== !0 ? " style='display:none'" : ""
                    },
                    groupCssClass: function() {
                        return "k-group k-panel"
                    },
                    contentAttributes: function(e) {
                        return e.item.expanded !== !0 ? " style='display:none'" : ""
                    },
                    content: function(e) {
                        return e.content ? e.content : e.contentUrl ? "" : "&nbsp;"
                    },
                    contentUrl: function(e) {
                        return e.contentUrl ? 'href="' + e.contentUrl + '"' : ""
                    }
                },
                ee = d.extend({
                    init: function(t, n) {
                        var i, o = this;
                        d.fn.init.call(o, t, n), t = o.wrapper = o.element.addClass("k-widget k-reset k-header k-panelbar"), n = o.options, t[0].id && (o._itemId = t[0].id + "_pb_active"), o._tabindex(), o._initData(n), o._updateClasses(), o._animations(n), t.on("click" + h, V, function(t) {
                            o._click(e(t.currentTarget)) && t.preventDefault()
                        }).on(E + h + " " + F + h, V, o._toggleHover).on("click" + h, U, !1).on("keydown" + h, e.proxy(o._keydown, o)).on("focus" + h, function() {
                            var e = o.select();
                            o._current(e[0] ? e : o._first())
                        }).on("blur" + h, function() {
                            o._current(null)
                        }).attr("role", "menu"), i = t.find("li." + M + " > ." + T), i[0] && o.expand(i.parent(), !1), n.dataSource && o._angularCompile(), r.notify(o)
                    },
                    events: [C, A, S, D, _, I],
                    options: {
                        name: "PanelBar",
                        animation: {
                            expand: {
                                effects: "expand:vertical",
                                duration: 200
                            },
                            collapse: {
                                duration: 200
                            }
                        },
                        expandMode: "multiple"
                    },
                    _angularCompile: function() {
                        var e = this;
                        e.angular("compile", function() {
                            return {
                                elements: e.element.children("li"),
                                data: [{
                                    dataItem: e.options.$angular
                                }]
                            }
                        })
                    },
                    _angularCleanup: function() {
                        var e = this;
                        e.angular("cleanup", function() {
                            return {
                                elements: e.element.children("li")
                            }
                        })
                    },
                    destroy: function() {
                        d.fn.destroy.call(this), this.element.off(h), this._angularCleanup(), r.destroy(this.element)
                    },
                    _initData: function(e) {
                        var t = this;
                        e.dataSource && (t.element.empty(), t.append(e.dataSource, t.element))
                    },
                    setOptions: function(e) {
                        var t = this.options.animation;
                        this._animations(e), e.animation = s(!0, t, e.animation), "dataSource" in e && this._initData(e), d.fn.setOptions.call(this, e)
                    },
                    expand: function(n, i) {
                        var r = this,
                            o = {};
                        return n = this.element.find(n), r._animating && n.find("ul").is(":visible") ? (r.one("complete", function() {
                            setTimeout(function() {
                                r.expand(n)
                            })
                        }), t) : (r._animating = !0, i = i !== !1, n.each(function(t, a) {
                            a = e(a);
                            var s = a.find(R).add(a.find(P));
                            if (!a.hasClass(B) && s.length > 0) {
                                if (r.options.expandMode == X && r._collapseAllExpanded(a)) return r;
                                n.find("." + N).removeClass(N), a.addClass(N), i || (o = r.options.animation, r.options.animation = {
                                    expand: {
                                        effects: {}
                                    },
                                    collapse: {
                                        hide: !0,
                                        effects: {}
                                    }
                                }), r._triggerEvent(C, a) || r._toggleItem(a, !1), i || (r.options.animation = o)
                            }
                        }), r)
                    },
                    collapse: function(t, n) {
                        var i = this,
                            r = {};
                        return i._animating = !0, n = n !== !1, t = i.element.find(t), t.each(function(t, o) {
                            o = e(o);
                            var a = o.find(R).add(o.find(P));
                            !o.hasClass(B) && a.is(K) && (o.removeClass(N), n || (r = i.options.animation, i.options.animation = {
                                expand: {
                                    effects: {}
                                },
                                collapse: {
                                    hide: !0,
                                    effects: {}
                                }
                            }), i._triggerEvent(A, o) || i._toggleItem(o, !0), n || (i.options.animation = r))
                        }), i
                    },
                    _toggleDisabled: function(e, t) {
                        e = this.element.find(e), e.toggleClass(j, t).toggleClass(B, !t).attr(q, !t)
                    },
                    select: function(n) {
                        var i = this;
                        return n === t ? i.element.find(W).parent() : (n = i.element.find(n), n.length ? n.each(function() {
                            var n = e(this),
                                r = n.children(v);
                            return n.hasClass(B) ? i : (i._triggerEvent(S, n) || i._updateSelected(r), t)
                        }) : this._updateSelected(n), i)
                    },
                    clearSelection: function() {
                        this.select(e())
                    },
                    enable: function(e, t) {
                        return this._toggleDisabled(e, t !== !1), this
                    },
                    disable: function(e) {
                        return this._toggleDisabled(e, !1), this
                    },
                    append: function(e, t) {
                        t = this.element.find(t);
                        var r = this._insert(e, t, t.length ? t.find(R) : null);
                        return l(r.items, function() {
                            r.group.append(this), i(this)
                        }), n(t), i(r.group.find(".k-first, .k-last")), r.group.height("auto"), this
                    },
                    insertBefore: function(e, t) {
                        t = this.element.find(t);
                        var n = this._insert(e, t, t.parent());
                        return l(n.items, function() {
                            t.before(this), i(this)
                        }), i(t), n.group.height("auto"), this
                    },
                    insertAfter: function(e, t) {
                        t = this.element.find(t);
                        var n = this._insert(e, t, t.parent());
                        return l(n.items, function() {
                            t.after(this), i(this)
                        }), i(t), n.group.height("auto"), this
                    },
                    remove: function(e) {
                        e = this.element.find(e);
                        var t = this,
                            r = e.parentsUntil(t.element, b),
                            o = e.parent("ul");
                        return e.remove(), !o || o.hasClass("k-panelbar") || o.children(b).length || o.remove(), r.length && (r = r.eq(0), n(r), i(r)), t
                    },
                    reload: function(t) {
                        var n = this;
                        t = n.element.find(t), t.each(function() {
                            var t = e(this);
                            n._ajaxRequest(t, t.children("." + T), !t.is(K))
                        })
                    },
                    _first: function() {
                        return this.element.children(O).first()
                    },
                    _last: function() {
                        var e = this.element.children(O).last(),
                            t = e.children(y);
                        return t[0] ? t.children(O).last() : e
                    },
                    _current: function(n) {
                        var i = this,
                            r = i._focused,
                            o = i._itemId;
                        return n === t ? r : (i.element.removeAttr("aria-activedescendant"), r && r.length && (r[0].id === o && r.removeAttr("id"), r.children(v).removeClass(z)), e(n).length && (o = n[0].id || o, n.attr("id", o).children(v).addClass(z), i.element.attr("aria-activedescendant", o)), i._focused = n, t)
                    },
                    _keydown: function(e) {
                        var t = this,
                            n = e.keyCode,
                            i = t._current();
                        e.target == e.currentTarget && (n == a.DOWN || n == a.RIGHT ? (t._current(t._nextItem(i)), e.preventDefault()) : n == a.UP || n == a.LEFT ? (t._current(t._prevItem(i)), e.preventDefault()) : n == a.ENTER || n == a.SPACEBAR ? (t._click(i.children(v)), e.preventDefault()) : n == a.HOME ? (t._current(t._first()), e.preventDefault()) : n == a.END && (t._current(t._last()), e.preventDefault()))
                    },
                    _nextItem: function(e) {
                        if (!e) return this._first();
                        var t = e.children(y),
                            n = e.nextAll(":visible").first();
                        return t[0] && (n = t.children("." + x)), n[0] || (n = e.parent(y).parent(b).next()), n[0] || (n = this._first()), n.hasClass(B) && (n = this._nextItem(n)), n
                    },
                    _prevItem: function(e) {
                        if (!e) return this._last();
                        var t, n = e.prevAll(":visible").first();
                        if (n[0])
                            for (t = n; t[0];) t = t.children(y).children("." + m), t[0] && (n = t);
                        else n = e.parent(y).parent(b), n[0] || (n = this._last());
                        return n.hasClass(B) && (n = this._prevItem(n)), n
                    },
                    _insert: function(t, n, i) {
                        var o, a, l = this,
                            c = e.isPlainObject(t),
                            d = n && n[0];
                        return d || (i = l.element), a = {
                            firstLevel: i.hasClass("k-panelbar"),
                            expanded: i.parent().hasClass(M),
                            length: i.children().length
                        }, d && !i.length && (i = e(ee.renderGroup({
                            group: a
                        })).appendTo(n)), t instanceof r.Observable && (t = t.toJSON()), c || e.isArray(t) ? (o = e.map(c ? [t] : t, function(t, n) {
                            return e("string" == typeof t ? t : ee.renderItem({
                                group: a,
                                item: s(t, {
                                    index: n
                                })
                            }))
                        }), d && n.attr(G, !1)) : (o = "string" == typeof t && "<" != t.charAt(0) ? l.element.find(t) : e(t), l._updateItemsClasses(o)), {
                            items: o,
                            group: i
                        }
                    },
                    _toggleHover: function(t) {
                        var n = e(t.currentTarget);
                        n.parents("li." + B).length || n.toggleClass("k-state-hover", t.type == E)
                    },
                    _updateClasses: function() {
                        var t, r, o = this;
                        t = o.element.find("li > ul").not(function() {
                            return e(this).parentsUntil(".k-panelbar", "div").length
                        }).addClass("k-group k-panel").attr("role", "group"), t.parent().attr(G, !1).not("." + M).children("ul").attr($, !0).hide(), r = o.element.add(t).children(), o._updateItemsClasses(r), n(r), i(r)
                    },
                    _updateItemsClasses: function(e) {
                        for (var t = e.length, n = 0; t > n; n++) this._updateItemClasses(e[n], n)
                    },
                    _updateItemClasses: function(t, n) {
                        var i, o, a = this._selected,
                            s = this.options.contentUrls,
                            l = s && s[n],
                            c = this.element[0];
                        t = e(t).addClass("k-item").attr("role", "menuitem"), r.support.browser.msie && t.css("list-style-position", "inside").css("list-style-position", ""), t.children(f).addClass(k), o = t.children("a").addClass(g), o[0] && (o.attr("href", l), o.children(f).addClass(k)), t.filter(":not([disabled]):not([class*=k-state])").addClass("k-state-default"), t.filter("li[disabled]").addClass("k-state-disabled").attr(q, !0).removeAttr("disabled"), t.children("div").addClass(T).attr("role", "region").attr($, !0).hide().parent().attr(G, !1), o = t.children(H), o[0] && (a && a.removeAttr(Y).children(H).removeClass(L), o.addClass(L), this._selected = t.attr(Y, !0)), t.children(v)[0] || (i = "<span class='" + g + "'/>", s && s[n] && t[0].parentNode == c && (i = '<a class="k-link k-header" href="' + s[n] + '"/>'), t.contents().filter(function() {
                            return !(this.nodeName.match(u) || 3 == this.nodeType && !e.trim(this.nodeValue))
                        }).wrapAll(i)), t.parent(".k-panelbar")[0] && t.children(v).addClass("k-header")
                    },
                    _click: function(e) {
                        var t, n, i, r, o, a, s, l = this,
                            c = l.element;
                        if (!e.parents("li." + B).length && e.closest(".k-widget")[0] == c[0]) {
                            if (o = e.closest(v), a = o.closest(b), l._updateSelected(o), n = a.find(R).add(a.find(P)), i = o.attr(p), r = i && ("#" == i.charAt(i.length - 1) || -1 != i.indexOf("#" + l.element[0].id + "-")), t = !(!r && !n.length), n.data("animating")) return t;
                            if (l._triggerEvent(S, a) && (t = !0), t !== !1) return l.options.expandMode == X && l._collapseAllExpanded(a) ? t : (n.length && (s = n.is(K), l._triggerEvent(s ? A : C, a) || (t = l._toggleItem(a, s))), t)
                        }
                    },
                    _toggleItem: function(e, n) {
                        var i, r, o = this,
                            a = e.find(R),
                            s = e.find(v),
                            l = s.attr(p);
                        return a.length ? (this._toggleGroup(a, n), i = !0) : (r = e.children("." + T), r.length && (i = !0, r.is(Q) && l !== t ? o._ajaxRequest(e, r, n) : o._toggleGroup(r, n))), i
                    },
                    _toggleGroup: function(e, n) {
                        var i = this,
                            r = i.options.animation,
                            o = r.expand,
                            a = s({}, r.collapse),
                            l = a && "effects" in a;
                        return e.is(K) != n ? (i._animating = !1, t) : (e.parent().attr(G, !n).attr($, n).toggleClass(M, !n).find("> .k-link > .k-icon").toggleClass("k-i-arrow-n", !n).toggleClass("k-panelbar-collapse", !n).toggleClass("k-i-arrow-s", n).toggleClass("k-panelbar-expand", n), n ? (o = s(l ? a : s({
                            reverse: !0
                        }, o), {
                            hide: !0
                        }), o.complete = function() {
                            i._animationCallback()
                        }) : o = s({
                            complete: function(e) {
                                i._triggerEvent(D, e.closest(b)), i._animationCallback()
                            }
                        }, o), e.kendoStop(!0, !0).kendoAnimate(o), t)
                    },
                    _animationCallback: function() {
                        var e = this;
                        e.trigger("complete"), e._animating = !1
                    },
                    _collapseAllExpanded: function(t) {
                        var n, i = this,
                            r = !1,
                            o = t.find(R).add(t.find(P));
                        return o.is(K) && (r = !0), o.is(K) || 0 === o.length || (n = t.siblings(), n.find(R).add(n.find(P)).filter(function() {
                            return e(this).is(K)
                        }).each(function(t, n) {
                            n = e(n), r = i._triggerEvent(A, n.closest(b)), r || i._toggleGroup(n, !0)
                        })), r
                    },
                    _ajaxRequest: function(t, n, i) {
                        var r = this,
                            o = t.find(".k-panelbar-collapse, .k-panelbar-expand"),
                            a = t.find(v),
                            s = setTimeout(function() {
                                o.addClass("k-loading")
                            }, 100),
                            l = {},
                            c = a.attr(p);
                        e.ajax({
                            type: "GET",
                            cache: !1,
                            url: c,
                            dataType: "html",
                            data: l,
                            error: function(e, t) {
                                o.removeClass("k-loading"), r.trigger(_, {
                                    xhr: e,
                                    status: t
                                }) && this.complete()
                            },
                            complete: function() {
                                clearTimeout(s), o.removeClass("k-loading")
                            },
                            success: function(e) {
                                function o() {
                                    return {
                                        elements: n.get()
                                    }
                                }
                                try {
                                    r.angular("cleanup", o), n.html(e), r.angular("compile", o)
                                } catch (a) {
                                    var s = window.console;
                                    s && s.error && s.error(a.name + ": " + a.message + " in " + c), this.error(this.xhr, "error")
                                }
                                r._toggleGroup(n, i), r.trigger(I, {
                                    item: t[0],
                                    contentElement: n[0]
                                })
                            }
                        })
                    },
                    _triggerEvent: function(e, t) {
                        var n = this;
                        return n.trigger(e, {
                            item: t[0]
                        })
                    },
                    _updateSelected: function(e) {
                        var t = this,
                            n = t.element,
                            i = e.parent(b),
                            r = t._selected;
                        r && r.removeAttr(Y), t._selected = i.attr(Y, !0), n.find(W).removeClass(L), n.find("> ." + N + ", .k-panel > ." + N).removeClass(N), e.addClass(L), e.parentsUntil(n, b).filter(":has(.k-header)").addClass(N), t._current(i[0] ? i : null)
                    },
                    _animations: function(e) {
                        e && "animation" in e && !e.animation && (e.animation = {
                            expand: {
                                effects: {}
                            },
                            collapse: {
                                hide: !0,
                                effects: {}
                            }
                        })
                    }
                });
            s(ee, {
                renderItem: function(e) {
                    e = s({
                        panelBar: {},
                        group: {}
                    }, e);
                    var t = J.empty,
                        n = e.item;
                    return J.item(s(e, {
                        image: n.imageUrl ? J.image : t,
                        sprite: n.spriteCssClass ? J.sprite : t,
                        itemWrapper: J.itemWrapper,
                        renderContent: ee.renderContent,
                        arrow: n.items || n.content || n.contentUrl ? J.arrow : t,
                        subGroup: ee.renderGroup
                    }, Z))
                },
                renderGroup: function(e) {
                    return J.group(s({
                        renderItems: function(e) {
                            for (var t = "", n = 0, i = e.items, r = i ? i.length : 0, o = s({
                                length: r
                            }, e.group); r > n; n++) t += ee.renderItem(s(e, {
                                group: o,
                                item: s({
                                    index: n
                                }, i[n])
                            }));
                            return t
                        }
                    }, e, Z))
                },
                renderContent: function(e) {
                    return J.content(s(e, Z))
                }
            }), r.ui.plugin(ee)
        }(window.kendo.jQuery), window.kendo
    }, "function" == typeof define && define.amd ? define : function(e, t, n) {
        (n || t)()
    }),
function(e, define) {
    define("kendo.responsivepanel.min", ["kendo.core.min"], e)
}(function() {
    return function(e, t) {
        var n = e.proxy,
            i = ".kendoResponsivePanel",
            r = "open",
            o = "close",
            a = "click" + i + " touchstart" + i,
            s = kendo.ui.Widget,
            l = s.extend({
                init: function(t, r) {
                    s.fn.init.call(this, t, r), this._guid = "_" + kendo.guid(), this._toggleHandler = n(this._toggleButtonClick, this), this._closeHandler = n(this._close, this), e(document.documentElement).on(a, this.options.toggleButton, this._toggleHandler), this._registerBreakpoint(), this.element.addClass("k-rpanel k-rpanel-" + this.options.orientation + " " + this._guid), this._resizeHandler = n(this.resize, this, !0), e(window).on("resize" + i, this._resizeHandler)
                },
                _mediaQuery: "@media (max-width: #= breakpoint-1 #px) {.#= guid #.k-rpanel-animate.k-rpanel-left,.#= guid #.k-rpanel-animate.k-rpanel-right {-webkit-transition: -webkit-transform .2s ease-out;-ms-transition: -ms-transform .2s ease-out;transition: transform .2s ease-out;} .#= guid #.k-rpanel-top {overflow: hidden;}.#= guid #.k-rpanel-animate.k-rpanel-top {-webkit-transition: max-height .2s linear;-ms-transition: max-height .2s linear;transition: max-height .2s linear;}} @media (min-width: #= breakpoint #px) {#= toggleButton # { display: none; } .#= guid #.k-rpanel-left { float: left; } .#= guid #.k-rpanel-right { float: right; } .#= guid #.k-rpanel-left, .#= guid #.k-rpanel-right {position: relative;-webkit-transform: translateX(0);-ms-transform: translateX(0);transform: translateX(0);-webkit-transform: translateX(0) translateZ(0);-ms-transform: translateX(0) translateZ(0);transform: translateX(0) translateZ(0);} .#= guid #.k-rpanel-top { max-height: none; }}",
                _registerBreakpoint: function() {
                    var e = this.options;
                    this._registerStyle(kendo.template(this._mediaQuery)({
                        breakpoint: e.breakpoint,
                        toggleButton: e.toggleButton,
                        guid: this._guid
                    }))
                },
                _registerStyle: function(t) {
                    var n = e("head,body")[0],
                        i = document.createElement("style");
                    n.appendChild(i), i.styleSheet ? i.styleSheet.cssText = t : i.appendChild(document.createTextNode(t))
                },
                options: {
                    name: "ResponsivePanel",
                    orientation: "left",
                    toggleButton: ".k-rpanel-toggle",
                    breakpoint: 640,
                    autoClose: !0
                },
                events: [r, o],
                _resize: function() {
                    this.element.removeClass("k-rpanel-animate k-rpanel-expanded"), e(document.documentElement).off(a, this._closeHandler)
                },
                _toggleButtonClick: function(e) {
                    e.preventDefault(), this.element.hasClass("k-rpanel-expanded") ? this.close() : this.open()
                },
                open: function() {
                    this.trigger(r) || (this.element.addClass("k-rpanel-animate k-rpanel-expanded"), this.options.autoClose && e(document.documentElement).on(a, this._closeHandler))
                },
                close: function() {
                    this.trigger(o) || (this.element.addClass("k-rpanel-animate").removeClass("k-rpanel-expanded"), e(document.documentElement).off(a, this._closeHandler))
                },
                _close: function(t) {
                    var n = t.isDefaultPrevented(),
                        i = e(t.target).closest(this.options.toggleButton + ",.k-rpanel");
                    i.length || n || this.close()
                },
                destroy: function() {
                    s.fn.destroy.call(this), e(window).off("resize" + i, this._resizeHandler), e(document.documentElement).off(a, this._closeHandler)
                }
            });
        kendo.ui.plugin(l)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.tabstrip.min", ["kendo.data.min"], e)
}(function() {
    return function(e, t) {
        function n(t) {
            t.children(g).addClass(S), t.children("a").addClass(w).children(g).addClass(S), t.filter(":not([disabled]):not([class*=k-state-disabled])").addClass(z), t.filter("li[disabled]").addClass(P).removeAttr("disabled"), t.filter(":not([class*=k-state])").children("a").filter(":focus").parent().addClass(B + " " + N), t.attr("role", "tab"), t.filter("." + B).attr("aria-selected", !0), t.each(function() {
                var t = e(this);
                t.children("." + w).length || t.contents().filter(function() {
                    return !(this.nodeName.match(p) || 3 == this.nodeType && !d(this.nodeValue))
                }).wrapAll("<span class='" + w + "'/>")
            })
        }

        function i(e) {
            var t = e.children(".k-item");
            t.filter(".k-first:not(:first-child)").removeClass(T), t.filter(".k-last:not(:last-child)").removeClass(y), t.filter(":first-child").addClass(T), t.filter(":last-child").addClass(y)
        }

        function r(e, t) {
            return "<span class='k-button k-button-icon k-button-bare k-tabstrip-" + e + "' unselectable='on'><span class='k-icon " + t + "'></span></span>"
        }
        var o = window.kendo,
            a = o.ui,
            s = o.keys,
            l = e.map,
            c = e.each,
            d = e.trim,
            u = e.extend,
            h = o.template,
            f = a.Widget,
            p = /^(a|div)$/i,
            m = ".kendoTabStrip",
            g = "img",
            v = "href",
            _ = "prev",
            b = "show",
            w = "k-link",
            y = "k-last",
            k = "click",
            x = "error",
            C = ":empty",
            S = "k-image",
            T = "k-first",
            D = "select",
            A = "activate",
            E = "k-content",
            F = "contentUrl",
            I = "mouseenter",
            M = "mouseleave",
            R = "contentLoad",
            P = "k-state-disabled",
            z = "k-state-default",
            B = "k-state-active",
            L = "k-state-focused",
            H = "k-state-hover",
            N = "k-tab-on-top",
            O = ".k-item:not(." + P + ")",
            V = ".k-tabstrip-items > " + O + ":not(." + B + ")",
            U = {
                content: h("<div class='k-content'#= contentAttributes(data) # role='tabpanel'>#= content(item) #</div>"),
                itemWrapper: h("<#= tag(item) # class='k-link'#= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) #</#= tag(item) #>"),
                item: h("<li class='#= wrapperCssClass(group, item) #' role='tab' #=item.active ? \"aria-selected='true'\" : ''#>#= itemWrapper(data) #</li>"),
                image: h("<img class='k-image' alt='' src='#= imageUrl #' />"),
                sprite: h("<span class='k-sprite #= spriteCssClass #'></span>"),
                empty: h("")
            },
            W = {
                wrapperCssClass: function(e, t) {
                    var n = "k-item",
                        i = t.index;
                    return n += t.enabled === !1 ? " k-state-disabled" : " k-state-default", 0 === i && (n += " k-first"), i == e.length - 1 && (n += " k-last"), n
                },
                textAttributes: function(e) {
                    return e.url ? " href='" + e.url + "'" : ""
                },
                text: function(e) {
                    return e.encoded === !1 ? e.text : o.htmlEncode(e.text)
                },
                tag: function(e) {
                    return e.url ? "a" : "span"
                },
                contentAttributes: function(e) {
                    return e.active !== !0 ? " style='display:none' aria-hidden='true' aria-expanded='false'" : ""
                },
                content: function(e) {
                    return e.content ? e.content : e.contentUrl ? "" : "&nbsp;"
                },
                contentUrl: function(e) {
                    return e.contentUrl ? o.attr("content-url") + '="' + e.contentUrl + '"' : ""
                }
            },
            j = f.extend({
                init: function(t, n) {
                    var i, r, a, s = this;
                    f.fn.init.call(s, t, n), s._animations(s.options), n = s.options, s._wrapper(), s._isRtl = o.support.isRtl(s.wrapper), s._tabindex(), s._updateClasses(), s._dataSource(), n.dataSource && s.dataSource.fetch(), s._tabPosition(), s._scrollable(), s.options.contentUrls && s.wrapper.find(".k-tabstrip-items > .k-item").each(function(t, n) {
                        e(n).find(">." + w).data(F, s.options.contentUrls[t])
                    }), s.wrapper.on(I + m + " " + M + m, V, s._toggleHover).on("focus" + m, e.proxy(s._active, s)).on("blur" + m, function() {
                        s._current(null)
                    }), s._keyDownProxy = e.proxy(s._keydown, s), n.navigatable && s.wrapper.on("keydown" + m, s._keyDownProxy), s.options.value && (i = s.options.value), s.wrapper.children(".k-tabstrip-items").on(k + m, ".k-state-disabled .k-link", !1).on(k + m, " > " + O, function(t) {
                        var n, i = s.wrapper[0];
                        if (i !== document.activeElement)
                            if (n = o.support.browser.msie) try {
                                i.setActive()
                            } catch (r) {
                                i.focus()
                            } else i.focus();
                        s._click(e(t.currentTarget)) && t.preventDefault()
                    }), r = s.tabGroup.children("li." + B), a = s.contentHolder(r.index()), r[0] && a.length > 0 && 0 === a[0].childNodes.length && s.activateTab(r.eq(0)), s.element.attr("role", "tablist"), s.element[0].id && (s._ariaId = s.element[0].id + "_ts_active"), s.value(i), o.notify(s)
                },
                _active: function() {
                    var e = this.tabGroup.children().filter("." + B);
                    e = e[0] ? e : this._endItem("first"), e[0] && this._current(e)
                },
                _endItem: function(e) {
                    return this.tabGroup.children(O)[e]()
                },
                _item: function(e, t) {
                    var n;
                    return n = t === _ ? "last" : "first", e ? (e = e[t](), e[0] || (e = this._endItem(n)), e.hasClass(P) && (e = this._item(e, t)), e) : this._endItem(n)
                },
                _current: function(e) {
                    var n = this,
                        i = n._focused,
                        r = n._ariaId;
                    return e === t ? i : (i && (i[0].id === r && i.removeAttr("id"), i.removeClass(L)), e && (e.hasClass(B) || e.addClass(L), n.element.removeAttr("aria-activedescendant"), r = e[0].id || r, r && (e.attr("id", r), n.element.attr("aria-activedescendant", r))), n._focused = e, t)
                },
                _keydown: function(e) {
                    var n, i = this,
                        r = e.keyCode,
                        o = i._current(),
                        a = i._isRtl;
                    if (e.target == e.currentTarget) {
                        if (r == s.DOWN || r == s.RIGHT) n = a ? _ : "next";
                        else if (r == s.UP || r == s.LEFT) n = a ? "next" : _;
                        else if (r == s.ENTER || r == s.SPACEBAR) i._click(o), e.preventDefault();
                        else {
                            if (r == s.HOME) return i._click(i._endItem("first")), e.preventDefault(), t;
                            if (r == s.END) return i._click(i._endItem("last")), e.preventDefault(), t
                        }
                        n && (i._click(i._item(o, n)), e.preventDefault())
                    }
                },
                _dataSource: function() {
                    var t = this;
                    t.dataSource && t._refreshHandler ? t.dataSource.unbind("change", t._refreshHandler) : t._refreshHandler = e.proxy(t.refresh, t), t.dataSource = o.data.DataSource.create(t.options.dataSource).bind("change", t._refreshHandler)
                },
                setDataSource: function(e) {
                    var t = this;
                    t.options.dataSource = e, t._dataSource(), t.dataSource.fetch()
                },
                _animations: function(e) {
                    e && "animation" in e && !e.animation && (e.animation = {
                        open: {
                            effects: {}
                        },
                        close: {
                            effects: {}
                        }
                    })
                },
                refresh: function(e) {
                    var t, n, i, r, a = this,
                        s = a.options,
                        l = o.getter(s.dataTextField),
                        c = o.getter(s.dataContentField),
                        d = o.getter(s.dataContentUrlField),
                        u = o.getter(s.dataImageUrlField),
                        h = o.getter(s.dataUrlField),
                        f = o.getter(s.dataSpriteCssClass),
                        p = [],
                        m = a.dataSource.view();
                    for (e = e || {}, i = e.action, i && (m = e.items), t = 0, r = m.length; r > t; t++) n = {
                        text: l(m[t])
                    }, s.dataContentField && (n.content = c(m[t])), s.dataContentUrlField && (n.contentUrl = d(m[t])), s.dataUrlField && (n.url = h(m[t])), s.dataImageUrlField && (n.imageUrl = u(m[t])), s.dataSpriteCssClass && (n.spriteCssClass = f(m[t])), p[t] = n;
                    if ("add" == e.action) e.index < a.tabGroup.children().length ? a.insertBefore(p, a.tabGroup.children().eq(e.index)) : a.append(p);
                    else if ("remove" == e.action)
                        for (t = 0; m.length > t; t++) a.remove(e.index);
                    else "itemchange" == e.action ? (t = a.dataSource.view().indexOf(m[0]), e.field === s.dataTextField && a.tabGroup.children().eq(t).find(".k-link").text(m[0].get(e.field))) : (a.trigger("dataBinding"), a.remove("li"), a.append(p), a.trigger("dataBound"))
                },
                value: function(n) {
                    var i = this;
                    return n === t ? i.select().text() : (n != i.value() && i.tabGroup.children().each(function() {
                        e.trim(e(this).text()) == n && i.select(this)
                    }), t)
                },
                items: function() {
                    return this.tabGroup[0].children
                },
                setOptions: function(e) {
                    var t = this,
                        n = t.options.animation;
                    t._animations(e), e.animation = u(!0, n, e.animation), e.navigatable ? t.wrapper.on("keydown" + m, t._keyDownProxy) : t.wrapper.off("keydown" + m, t._keyDownProxy), f.fn.setOptions.call(t, e)
                },
                events: [D, A, b, x, R, "change", "dataBinding", "dataBound"],
                options: {
                    name: "TabStrip",
                    dataTextField: "",
                    dataContentField: "",
                    dataImageUrlField: "",
                    dataUrlField: "",
                    dataSpriteCssClass: "",
                    dataContentUrlField: "",
                    tabPosition: "top",
                    animation: {
                        open: {
                            effects: "expand:vertical fadeIn",
                            duration: 200
                        },
                        close: {
                            duration: 200
                        }
                    },
                    collapsible: !1,
                    navigatable: !0,
                    contentUrls: !1,
                    scrollable: {
                        distance: 200
                    }
                },
                destroy: function() {
                    var e = this,
                        t = e.scrollWrap;
                    f.fn.destroy.call(e), e._refreshHandler && e.dataSource.unbind("change", e._refreshHandler), e.wrapper.off(m), e.wrapper.children(".k-tabstrip-items").off(m), e._scrollableModeActive && (e._scrollPrevButton.off().remove(), e._scrollNextButton.off().remove()), o.destroy(e.wrapper), t.children(".k-tabstrip").unwrap()
                },
                select: function(t) {
                    var n = this;
                    return 0 === arguments.length ? n.tabGroup.children("li." + B) : (isNaN(t) || (t = n.tabGroup.children().get(t)), t = n.tabGroup.find(t), e(t).each(function(t, i) {
                        i = e(i), i.hasClass(B) || n.trigger(D, {
                            item: i[0],
                            contentElement: n.contentHolder(i.index())[0]
                        }) || n.activateTab(i)
                    }), n)
                },
                enable: function(e, t) {
                    return this._toggleDisabled(e, t !== !1), this
                },
                disable: function(e) {
                    return this._toggleDisabled(e, !1), this
                },
                reload: function(t) {
                    t = this.tabGroup.find(t);
                    var n = this;
                    return t.each(function() {
                        var t = e(this),
                            i = t.find("." + w).data(F),
                            r = n.contentHolder(t.index());
                        i && n.ajaxRequest(t, r, null, i)
                    }), n
                },
                append: function(e) {
                    var t = this,
                        n = t._create(e);
                    return c(n.tabs, function(e) {
                        var i = n.contents[e];
                        t.tabGroup.append(this), "bottom" == t.options.tabPosition ? t.tabGroup.before(i) : t._scrollableModeActive ? t._scrollPrevButton.before(i) : t.wrapper.append(i), t.angular("compile", function() {
                            return {
                                elements: [i]
                            }
                        })
                    }), i(t.tabGroup), t._updateContentElements(), t.resize(!0), t
                },
                insertBefore: function(t, n) {
                    n = this.tabGroup.find(n);
                    var r = this,
                        o = r._create(t),
                        a = e(r.contentElement(n.index()));
                    return c(o.tabs, function(e) {
                        var t = o.contents[e];
                        n.before(this), a.before(t), r.angular("compile", function() {
                            return {
                                elements: [t]
                            }
                        })
                    }), i(r.tabGroup), r._updateContentElements(), r.resize(!0), r
                },
                insertAfter: function(t, n) {
                    n = this.tabGroup.find(n);
                    var r = this,
                        o = r._create(t),
                        a = e(r.contentElement(n.index()));
                    return c(o.tabs, function(e) {
                        var t = o.contents[e];
                        n.after(this), a.after(t), r.angular("compile", function() {
                            return {
                                elements: [t]
                            }
                        })
                    }), i(r.tabGroup), r._updateContentElements(), r.resize(!0), r
                },
                remove: function(t) {
                    var n, i = this,
                        r = typeof t;
                    return "string" === r ? t = i.tabGroup.find(t) : "number" === r && (t = i.tabGroup.children().eq(t)), n = t.map(function() {
                        var t = i.contentElement(e(this).index());
                        return o.destroy(t), t
                    }), t.remove(), n.remove(), i._updateContentElements(), i.resize(!0), i
                },
                _create: function(i) {
                    var r, o, a, s = e.isPlainObject(i),
                        c = this;
                    return s || e.isArray(i) ? (i = e.isArray(i) ? i : [i], r = l(i, function(t, n) {
                        return e(j.renderItem({
                            group: c.tabGroup,
                            item: u(t, {
                                index: n
                            })
                        }))
                    }), o = l(i, function(n, i) {
                        return "string" == typeof n.content || n.contentUrl ? e(j.renderContent({
                            item: u(n, {
                                index: i
                            })
                        })) : t
                    })) : (r = "string" == typeof i && "<" != i[0] ? c.element.find(i) : e(i), o = e(), r.each(function() {
                        if (a = e("<div class='" + E + "'/>"), /k-tabstrip-items/.test(this.parentNode.className)) {
                            var t = parseInt(this.getAttribute("aria-controls").replace(/^.*-/, ""), 10) - 1;
                            a = e(c.contentElement(t))
                        }
                        o = o.add(a)
                    }), n(r)), {
                        tabs: r,
                        contents: o
                    }
                },
                _toggleDisabled: function(t, n) {
                    t = this.tabGroup.find(t), t.each(function() {
                        e(this).toggleClass(z, n).toggleClass(P, !n)
                    })
                },
                _updateClasses: function() {
                    var r, o, a, s = this;
                    s.wrapper.addClass("k-widget k-header k-tabstrip"), s.tabGroup = s.wrapper.children("ul").addClass("k-tabstrip-items k-reset"), s.tabGroup[0] || (s.tabGroup = e("<ul class='k-tabstrip-items k-reset'/>").appendTo(s.wrapper)), r = s.tabGroup.find("li").addClass("k-item"), r.length && (o = r.filter("." + B).index(), a = o >= 0 ? o : t, s.tabGroup.contents().filter(function() {
                        return 3 == this.nodeType && !d(this.nodeValue)
                    }).remove()), o >= 0 && r.eq(o).addClass(N), s.contentElements = s.wrapper.children("div"), s.contentElements.addClass(E).eq(a).addClass(B).css({
                        display: "block"
                    }), r.length && (n(r), i(s.tabGroup), s._updateContentElements())
                },
                _updateContentElements: function() {
                    var t = this,
                        n = t.options.contentUrls || [],
                        i = t.tabGroup.find(".k-item"),
                        r = (t.element.attr("id") || o.guid()) + "-",
                        a = t.wrapper.children("div");
                    a.length && i.length > a.length ? (a.each(function(e) {
                        var t = parseInt(this.id.replace(r, ""), 10),
                            n = i.filter("[aria-controls=" + r + t + "]"),
                            o = r + (e + 1);
                        n.data("aria", o), this.setAttribute("id", o)
                    }), i.each(function() {
                        var t = e(this);
                        this.setAttribute("aria-controls", t.data("aria")), t.removeData("aria")
                    })) : i.each(function(i) {
                        var o = a.eq(i),
                            s = r + (i + 1);
                        this.setAttribute("aria-controls", s), !o.length && n[i] ? e("<div class='" + E + "'/>").appendTo(t.wrapper).attr("id", s) : (o.attr("id", s), e(this).children(".k-loading")[0] || n[i] || e("<span class='k-loading k-complete'/>").prependTo(this)), o.attr("role", "tabpanel"), o.filter(":not(." + B + ")").attr("aria-hidden", !0).attr("aria-expanded", !1), o.filter("." + B).attr("aria-expanded", !0)
                    }), t.contentElements = t.contentAnimators = t.wrapper.children("div"), t.tabsHeight = t.tabGroup.outerHeight() + parseInt(t.wrapper.css("border-top-width"), 10) + parseInt(t.wrapper.css("border-bottom-width"), 10), o.kineticScrollNeeded && o.mobile.ui.Scroller && (o.touchScroller(t.contentElements), t.contentElements = t.contentElements.children(".km-scroll-container"))
                },
                _wrapper: function() {
                    var e = this;
                    e.wrapper = e.element.is("ul") ? e.element.wrapAll("<div />").parent() : e.element, e.scrollWrap = e.wrapper.parent(".k-tabstrip-wrapper"), e.scrollWrap[0] || (e.scrollWrap = e.wrapper.wrapAll("<div class='k-tabstrip-wrapper' />").parent())
                },
                _tabPosition: function() {
                    var e = this,
                        t = e.options.tabPosition;
                    e.wrapper.addClass("k-floatwrap k-tabstrip-" + t), "bottom" == t && e.tabGroup.appendTo(e.wrapper), e.resize(!0)
                },
                _setContentElementsDimensions: function() {
                    var e, t, n, i, r, o, a = this,
                        s = a.options.tabPosition;
                    ("left" == s || "right" == s) && (e = a.wrapper.children(".k-content"), t = e.filter(":visible"), n = "margin-" + s, i = a.tabGroup, r = i.outerWidth(), o = Math.ceil(i.height()) - parseInt(t.css("padding-top"), 10) - parseInt(t.css("padding-bottom"), 10) - parseInt(t.css("border-top-width"), 10) - parseInt(t.css("border-bottom-width"), 10), setTimeout(function() {
                        e.css(n, r).css("min-height", o)
                    }))
                },
                _resize: function() {
                    this._setContentElementsDimensions(), this._scrollable()
                },
                _sizeScrollWrap: function(e) {
                    var t, n;
                    e.is(":visible") && (t = this.options.tabPosition, n = Math.floor(e.outerHeight(!0)) + ("left" === t || "right" === t ? 2 : this.tabsHeight), this.scrollWrap.css("height", n).css("height"))
                },
                _toggleHover: function(t) {
                    e(t.currentTarget).toggleClass(H, t.type == I)
                },
                _click: function(e) {
                    var t, n, i = this,
                        r = e.find("." + w),
                        o = r.attr(v),
                        a = i.options.collapsible,
                        s = i.contentHolder(e.index());
                    if (e.closest(".k-widget")[0] == i.wrapper[0]) {
                        if (e.is("." + P + (a ? "" : ",." + B))) return !0;
                        if (n = r.data(F) || o && ("#" == o.charAt(o.length - 1) || -1 != o.indexOf("#" + i.element[0].id + "-")), t = !o || n, i.tabGroup.children("[data-animating]").length) return t;
                        if (i.trigger(D, {
                            item: e[0],
                            contentElement: s[0]
                        })) return !0;
                        if (t !== !1) return a && e.is("." + B) ? (i.deactivateTab(e), !0) : (i.activateTab(e) && (t = !0), t)
                    }
                },
                _scrollable: function() {
                    var e, t, n, i, a = this,
                        s = a.options;
                    a._scrollableAllowed() && (a.wrapper.addClass("k-tabstrip-scrollable"), e = a.wrapper[0].offsetWidth, t = a.tabGroup[0].scrollWidth, t > e && !a._scrollableModeActive ? (a._nowScrollingTabs = !1, a._isRtl = o.support.isRtl(a.element), a.wrapper.append(r("prev", "k-i-arrow-w") + r("next", "k-i-arrow-e")), n = a._scrollPrevButton = a.wrapper.children(".k-tabstrip-prev"), i = a._scrollNextButton = a.wrapper.children(".k-tabstrip-next"), a.tabGroup.css({
                        marginLeft: n.outerWidth() + 9,
                        marginRight: i.outerWidth() + 12
                    }), n.on("mousedown" + m, function() {
                        a._nowScrollingTabs = !0, a._scrollTabsByDelta(s.scrollable.distance * (a._isRtl ? 1 : -1))
                    }), i.on("mousedown" + m, function() {
                        a._nowScrollingTabs = !0, a._scrollTabsByDelta(s.scrollable.distance * (a._isRtl ? -1 : 1))
                    }), n.add(i).on("mouseup" + m, function() {
                        a._nowScrollingTabs = !1
                    }), a._scrollableModeActive = !0, a._toggleScrollButtons()) : a._scrollableModeActive && e >= t ? (a._scrollableModeActive = !1, a.wrapper.removeClass("k-tabstrip-scrollable"), a._scrollPrevButton.off().remove(), a._scrollNextButton.off().remove(), a.tabGroup.css({
                        marginLeft: "",
                        marginRight: ""
                    })) : a._scrollableModeActive ? a._toggleScrollButtons() : a.wrapper.removeClass("k-tabstrip-scrollable"))
                },
                _scrollableAllowed: function() {
                    var e = this.options;
                    return e.scrollable && !isNaN(e.scrollable.distance) && ("top" == e.tabPosition || "bottom" == e.tabPosition)
                },
                _scrollTabsToItem: function(e) {
                    var t, n = this,
                        i = n.tabGroup,
                        r = i.scrollLeft(),
                        o = e.outerWidth(),
                        a = n._isRtl ? e.position().left : e.position().left - i.children().first().position().left,
                        s = i[0].offsetWidth,
                        l = Math.ceil(parseFloat(i.css("padding-left")));
                    n._isRtl ? 0 > a ? t = r + a - (s - r) - l : a + o > s && (t = r + a - o + 2 * l) : a + o > r + s ? t = a + o - s + 2 * l : r > a && (t = a - l), i.finish().animate({
                        scrollLeft: t
                    }, "fast", "linear", function() {
                        n._toggleScrollButtons()
                    })
                },
                _scrollTabsByDelta: function(e) {
                    var t = this,
                        n = t.tabGroup,
                        i = n.scrollLeft();
                    n.finish().animate({
                        scrollLeft: i + e
                    }, "fast", "linear", function() {
                        t._nowScrollingTabs ? t._scrollTabsByDelta(e) : t._toggleScrollButtons()
                    })
                },
                _toggleScrollButtons: function() {
                    var e = this,
                        t = e.tabGroup,
                        n = t.scrollLeft();
                    e._scrollPrevButton.toggle(e._isRtl ? t[0].scrollWidth - t[0].offsetWidth - 1 > n : 0 !== n), e._scrollNextButton.toggle(e._isRtl ? 0 !== n : t[0].scrollWidth - t[0].offsetWidth - 1 > n);
                },
                deactivateTab: function(e) {
                    var t = this,
                        n = t.options.animation,
                        i = n.open,
                        r = u({}, n.close),
                        a = r && "effects" in r;
                    e = t.tabGroup.find(e), r = u(a ? r : u({
                        reverse: !0
                    }, i), {
                        hide: !0
                    }), o.size(i.effects) ? (e.kendoAddClass(z, {
                        duration: i.duration
                    }), e.kendoRemoveClass(B, {
                        duration: i.duration
                    })) : (e.addClass(z), e.removeClass(B)), e.removeAttr("aria-selected"), t.contentAnimators.filter("." + B).kendoStop(!0, !0).kendoAnimate(r).removeClass(B).attr("aria-hidden", !0)
                },
                activateTab: function(e) {
                    var t, n, i, r, a, s, l, c, d, h, f, p, m, g, v;
                    if (!this.tabGroup.children("[data-animating]").length) return e = this.tabGroup.find(e), t = this, n = t.options.animation, i = n.open, r = u({}, n.close), a = r && "effects" in r, s = e.parent().children(), l = s.filter("." + B), c = s.index(e), r = u(a ? r : u({
                        reverse: !0
                    }, i), {
                        hide: !0
                    }), o.size(i.effects) ? (l.kendoRemoveClass(B, {
                        duration: r.duration
                    }), e.kendoRemoveClass(H, {
                        duration: r.duration
                    })) : (l.removeClass(B), e.removeClass(H)), d = t.contentAnimators, t.inRequest && (t.xhr.abort(), t.inRequest = !1), 0 === d.length ? (t.tabGroup.find("." + N).removeClass(N), e.addClass(N).css("z-index"), e.addClass(B), t._current(e), t.trigger("change"), t._scrollableModeActive && t._scrollTabsToItem(e), !1) : (h = d.filter("." + B), f = t.contentHolder(c), p = f.closest(".k-content"), t.tabsHeight = t.tabGroup.outerHeight() + parseInt(t.wrapper.css("border-top-width"), 10) + parseInt(t.wrapper.css("border-bottom-width"), 10), t._sizeScrollWrap(h), 0 === f.length ? (h.removeClass(B).attr("aria-hidden", !0).kendoStop(!0, !0).kendoAnimate(r), !1) : (e.attr("data-animating", !0), m = (e.children("." + w).data(F) || !1) && f.is(C), g = function() {
                        t.tabGroup.find("." + N).removeClass(N), e.addClass(N).css("z-index"), o.size(i.effects) ? (l.kendoAddClass(z, {
                            duration: i.duration
                        }), e.kendoAddClass(B, {
                            duration: i.duration
                        })) : (l.addClass(z), e.addClass(B)), l.removeAttr("aria-selected"), e.attr("aria-selected", !0), t._current(e), t._sizeScrollWrap(p), p.addClass(B).removeAttr("aria-hidden").kendoStop(!0, !0).attr("aria-expanded", !0).kendoAnimate(u({
                            init: function() {
                                t.trigger(b, {
                                    item: e[0],
                                    contentElement: f[0]
                                }), o.resize(f)
                            }
                        }, i, {
                            complete: function() {
                                e.removeAttr("data-animating"), t.trigger(A, {
                                    item: e[0],
                                    contentElement: f[0]
                                }), o.resize(f), t.scrollWrap.css("height", "").css("height")
                            }
                        }))
                    }, v = function() {
                        m ? (e.removeAttr("data-animating"), t.ajaxRequest(e, f, function() {
                            e.attr("data-animating", !0), g(), t.trigger("change")
                        })) : (g(), t.trigger("change")), t._scrollableModeActive && t._scrollTabsToItem(e)
                    }, h.removeClass(B), h.attr("aria-hidden", !0), h.attr("aria-expanded", !1), h.length ? h.kendoStop(!0, !0).kendoAnimate(u({
                        complete: v
                    }, r)) : v(), !0))
                },
                contentElement: function(e) {
                    var n, i, r, a;
                    if (isNaN(e - 0)) return t;
                    if (n = this.contentElements && this.contentElements[0] && !o.kineticScrollNeeded ? this.contentElements : this.contentAnimators, e = n && 0 > e ? n.length + e : e, i = RegExp("-" + (e + 1) + "$"), n)
                        for (r = 0, a = n.length; a > r; r++)
                            if (i.test(n.eq(r).closest(".k-content")[0].id)) return n[r];
                    return t
                },
                contentHolder: function(t) {
                    var n = e(this.contentElement(t)),
                        i = n.children(".km-scroll-container");
                    return o.support.touch && i[0] ? i : n
                },
                ajaxRequest: function(t, n, i, r) {
                    var a, s, l, c, d, u, h, f, p;
                    t = this.tabGroup.find(t), a = this, s = e.ajaxSettings.xhr, l = t.find("." + w), c = {}, d = t.width() / 2, u = !1, h = t.find(".k-loading").removeClass("k-complete"), h[0] || (h = e("<span class='k-loading'/>").prependTo(t)), f = 2 * d - h.width(), p = function() {
                        h.animate({
                            marginLeft: (parseInt(h.css("marginLeft"), 10) || 0) < d ? f : 0
                        }, 500, p)
                    }, o.support.browser.msie && 10 > o.support.browser.version && setTimeout(p, 40), r = r || l.data(F) || l.attr(v), a.inRequest = !0, a.xhr = e.ajax({
                        type: "GET",
                        cache: !1,
                        url: r,
                        dataType: "html",
                        data: c,
                        xhr: function() {
                            var t = this,
                                n = s(),
                                i = t.progressUpload ? "progressUpload" : t.progress ? "progress" : !1;
                            return n && e.each([n, n.upload], function() {
                                this.addEventListener && this.addEventListener("progress", function(e) {
                                    i && t[i](e)
                                }, !1)
                            }), t.noProgress = !(window.XMLHttpRequest && "upload" in new XMLHttpRequest), n
                        },
                        progress: function(e) {
                            if (e.lengthComputable) {
                                var t = parseInt(e.loaded / e.total * 100, 10) + "%";
                                h.stop(!0).addClass("k-progress").css({
                                    width: t,
                                    marginLeft: 0
                                })
                            }
                        },
                        error: function(e, t) {
                            a.trigger("error", {
                                xhr: e,
                                status: t
                            }) && this.complete()
                        },
                        stopProgress: function() {
                            clearInterval(u), h.stop(!0).addClass("k-progress")[0].style.cssText = ""
                        },
                        complete: function(e) {
                            a.inRequest = !1, this.noProgress ? setTimeout(this.stopProgress, 500) : this.stopProgress(), "abort" == e.statusText && h.remove()
                        },
                        success: function(e) {
                            var s, l, c;
                            h.addClass("k-complete");
                            try {
                                s = this, l = 10, s.noProgress && (h.width(l + "%"), u = setInterval(function() {
                                    s.progress({
                                        lengthComputable: !0,
                                        loaded: Math.min(l, 100),
                                        total: 100
                                    }), l += 10
                                }, 40)), a.angular("cleanup", function() {
                                    return {
                                        elements: n.get()
                                    }
                                }), o.destroy(n), n.html(e)
                            } catch (d) {
                                c = window.console, c && c.error && c.error(d.name + ": " + d.message + " in " + r), this.error(this.xhr, "error")
                            }
                            i && i.call(a, n), a.angular("compile", function() {
                                return {
                                    elements: n.get()
                                }
                            }), a.trigger(R, {
                                item: t[0],
                                contentElement: n[0]
                            })
                        }
                    })
                }
            });
        u(j, {
            renderItem: function(e) {
                e = u({
                    tabStrip: {},
                    group: {}
                }, e);
                var t = U.empty,
                    n = e.item;
                return U.item(u(e, {
                    image: n.imageUrl ? U.image : t,
                    sprite: n.spriteCssClass ? U.sprite : t,
                    itemWrapper: U.itemWrapper
                }, W))
            },
            renderContent: function(e) {
                return U.content(u(e, W))
            }
        }), o.ui.plugin(j)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.timepicker.min", ["kendo.popup.min"], e)
}(function() {
    return function(e, t) {
        function n(e, t, n) {
            var i, r = e.getTimezoneOffset();
            e.setTime(e.getTime() + t), n || (i = e.getTimezoneOffset() - r, e.setTime(e.getTime() + i * R))
        }

        function i() {
            var e = new $,
                t = new $(e.getFullYear(), e.getMonth(), e.getDate(), 0, 0, 0),
                n = new $(e.getFullYear(), e.getMonth(), e.getDate(), 12, 0, 0);
            return -1 * (t.getTimezoneOffset() - n.getTimezoneOffset())
        }

        function r(e) {
            return 60 * e.getHours() * R + e.getMinutes() * R + 1e3 * e.getSeconds() + e.getMilliseconds()
        }

        function o(e, t, n) {
            var i, o = r(t),
                a = r(n);
            return e && o != a ? (i = r(e), o > i && (i += P), o > a && (a += P), i >= o && a >= i) : !0
        }

        function a(e) {
            var t = e.parseFormats;
            e.format = p(e.format || d.getCulture(e.culture).calendars.standard.patterns.t), t = j(t) ? t : [t], t.splice(0, 0, e.format), e.parseFormats = t
        }

        function s(e) {
            e.preventDefault()
        }
        var l, c, d = window.kendo,
            u = d.keys,
            h = d.parseDate,
            f = d._activeElement,
            p = d._extractFormat,
            m = d.support,
            g = m.browser,
            v = d.ui,
            _ = v.Widget,
            b = "open",
            w = "close",
            y = "change",
            k = ".kendoTimePicker",
            x = "click" + k,
            C = "k-state-default",
            S = "disabled",
            T = "readonly",
            D = "li",
            A = "<span/>",
            E = "k-state-focused",
            F = "k-state-hover",
            I = "mouseenter" + k + " mouseleave" + k,
            M = "mousedown" + k,
            R = 6e4,
            P = 864e5,
            z = "k-state-selected",
            B = "k-state-disabled",
            L = "aria-selected",
            H = "aria-expanded",
            N = "aria-hidden",
            O = "aria-disabled",
            V = "aria-readonly",
            U = "aria-activedescendant",
            W = "id",
            j = e.isArray,
            q = e.extend,
            G = e.proxy,
            $ = Date,
            Y = new $;
        Y = new $(Y.getFullYear(), Y.getMonth(), Y.getDate(), 0, 0, 0), l = function(t) {
            var n = this,
                i = t.id;
            n.options = t, n._dates = [], n.ul = e('<ul tabindex="-1" role="listbox" aria-hidden="true" unselectable="on" class="k-list k-reset"/>').css({
                overflow: m.kineticScrollNeeded ? "" : "auto"
            }).on(x, D, G(n._click, n)).on("mouseenter" + k, D, function() {
                e(this).addClass(F)
            }).on("mouseleave" + k, D, function() {
                e(this).removeClass(F)
            }), n.list = e("<div class='k-list-container k-list-scroller' unselectable='on'/>").append(n.ul).on(M, s), i && (n._timeViewID = i + "_timeview", n._optionID = i + "_option_selected", n.ul.attr(W, n._timeViewID)), n._popup(), n._heightHandler = G(n._height, n), n.template = d.template('<li tabindex="-1" role="option" class="k-item" unselectable="on">#=data#</li>', {
                useWithBlock: !1
            })
        }, l.prototype = {
            current: function(n) {
                var i = this,
                    r = i.options.active;
                return n === t ? i._current : (i._current && i._current.removeClass(z).removeAttr(L).removeAttr(W), n && (n = e(n).addClass(z).attr(W, i._optionID).attr(L, !0), i.scroll(n[0])), i._current = n, r && r(n), t)
            },
            close: function() {
                this.popup.close()
            },
            destroy: function() {
                var e = this;
                e.ul.off(k), e.list.off(k), e.popup.destroy()
            },
            open: function() {
                var e = this;
                e.ul[0].firstChild || e.bind(), e.popup.open(), e._current && e.scroll(e._current[0])
            },
            dataBind: function(e) {
                for (var t, n = this, i = n.options, r = i.format, a = d.toString, s = n.template, l = e.length, c = 0, u = ""; l > c; c++) t = e[c], o(t, i.min, i.max) && (u += s(a(t, r, i.culture)));
                n._html(u)
            },
            refresh: function() {
                var e, t, o, a = this,
                    s = a.options,
                    l = s.format,
                    c = i(),
                    u = 0 > c,
                    h = s.min,
                    f = s.max,
                    p = r(h),
                    m = r(f),
                    g = s.interval * R,
                    v = d.toString,
                    _ = a.template,
                    b = new $(+h),
                    w = b.getDate(),
                    y = 0,
                    k = "";
                for (o = u ? (P + c * R) / g : P / g, p != m && (p > m && (m += P), o = (m - p) / g + 1), t = parseInt(o, 10); o > y; y++) y && n(b, g, u), m && t == y && (e = r(b), w < b.getDate() && (e += P), e > m && (b = new $(+f))), a._dates.push(r(b)), k += _(v(b, l, s.culture));
                a._html(k)
            },
            bind: function() {
                var e = this,
                    t = e.options.dates;
                t && t[0] ? e.dataBind(t) : e.refresh()
            },
            _html: function(e) {
                var t = this;
                t.ul[0].innerHTML = e, t.popup.unbind(b, t._heightHandler), t.popup.one(b, t._heightHandler), t.current(null), t.select(t._value)
            },
            scroll: function(e) {
                if (e) {
                    var t = this.list[0],
                        n = e.offsetTop,
                        i = e.offsetHeight,
                        r = t.scrollTop,
                        o = t.clientHeight,
                        a = n + i;
                    r > n ? r = n : a > r + o && (r = a - o), t.scrollTop = r
                }
            },
            select: function(t) {
                var n, i = this,
                    r = i.options,
                    o = i._current;
                t instanceof Date && (t = d.toString(t, r.format, r.culture)), "string" == typeof t && (o && o.text() === t ? t = o : (t = e.grep(i.ul[0].childNodes, function(e) {
                    return (e.textContent || e.innerText) == t
                }), t = t[0] ? t : null)), n = i._distinctSelection(t), i.current(n)
            },
            _distinctSelection: function(t) {
                var n, i, o = this;
                return t && t.length > 1 && (n = r(o._value), i = e.inArray(n, o._dates), t = o.ul.children()[i]), t
            },
            setOptions: function(e) {
                var t = this.options;
                e.min = h(e.min), e.max = h(e.max), this.options = q(t, e, {
                    active: t.active,
                    change: t.change,
                    close: t.close,
                    open: t.open
                }), this.bind()
            },
            toggle: function() {
                var e = this;
                e.popup.visible() ? e.close() : e.open()
            },
            value: function(e) {
                var t = this;
                t._value = e, t.ul[0].firstChild && t.select(e)
            },
            _click: function(t) {
                var n = this,
                    i = e(t.currentTarget),
                    r = i.text(),
                    o = n.options.dates;
                o && o.length > 0 && (r = o[i.index()]), t.isDefaultPrevented() || (n.select(i), n.options.change(r, !0), n.close())
            },
            _height: function() {
                var e = this,
                    t = e.list,
                    n = t.parent(".k-animation-container"),
                    i = e.options.height;
                e.ul[0].children.length && t.add(n).show().height(e.ul[0].scrollHeight > i ? i : "auto").hide()
            },
            _parse: function(e) {
                var t = this,
                    n = t.options,
                    i = t._value || Y;
                return e instanceof $ ? e : (e = h(e, n.parseFormats, n.culture), e && (e = new $(i.getFullYear(), i.getMonth(), i.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds())), e)
            },
            _adjustListWidth: function() {
                var e, t, n = this.list,
                    i = n[0].style.width,
                    r = this.options.anchor;
                (n.data("width") || !i) && (e = window.getComputedStyle ? window.getComputedStyle(r[0], null) : 0, t = e ? parseFloat(e.width) : r.outerWidth(), e && (g.mozilla || g.msie) && (t += parseFloat(e.paddingLeft) + parseFloat(e.paddingRight) + parseFloat(e.borderLeftWidth) + parseFloat(e.borderRightWidth)), i = t - (n.outerWidth() - n.width()), n.css({
                    fontFamily: r.css("font-family"),
                    width: i
                }).data("width", i))
            },
            _popup: function() {
                var e = this,
                    t = e.list,
                    n = e.options,
                    i = n.anchor;
                e.popup = new v.Popup(t, q(n.popup, {
                    anchor: i,
                    open: n.open,
                    close: n.close,
                    animation: n.animation,
                    isRtl: m.isRtl(n.anchor)
                }))
            },
            move: function(e) {
                var n = this,
                    i = e.keyCode,
                    r = n.ul[0],
                    o = n._current,
                    a = i === u.DOWN;
                if (i === u.UP || a) {
                    if (e.altKey) return n.toggle(a), t;
                    o = a ? o ? o[0].nextSibling : r.firstChild : o ? o[0].previousSibling : r.lastChild, o && n.select(o), n.options.change(n._current.text()), e.preventDefault()
                } else(i === u.ENTER || i === u.TAB || i === u.ESC) && (e.preventDefault(), o && n.options.change(o.text(), !0), n.close())
            }
        }, l.getMilliseconds = r, d.TimeView = l, c = _.extend({
            init: function(t, n) {
                var i, r, o, s = this;
                _.fn.init.call(s, t, n), t = s.element, n = s.options, n.min = h(t.attr("min")) || h(n.min), n.max = h(t.attr("max")) || h(n.max), a(n), s._initialOptions = q({}, n), s._wrapper(), s.timeView = r = new l(q({}, n, {
                    id: t.attr(W),
                    anchor: s.wrapper,
                    format: n.format,
                    change: function(e, n) {
                        n ? s._change(e) : t.val(e)
                    },
                    open: function(e) {
                        s.timeView._adjustListWidth(), s.trigger(b) ? e.preventDefault() : (t.attr(H, !0), i.attr(N, !1))
                    },
                    close: function(e) {
                        s.trigger(w) ? e.preventDefault() : (t.attr(H, !1), i.attr(N, !0))
                    },
                    active: function(e) {
                        t.removeAttr(U), e && t.attr(U, r._optionID)
                    }
                })), i = r.ul, s._icon(), s._reset();
                try {
                    t[0].setAttribute("type", "text")
                } catch (c) {
                    t[0].type = "text"
                }
                t.addClass("k-input").attr({
                    role: "combobox",
                    "aria-expanded": !1,
                    "aria-owns": r._timeViewID
                }), o = t.is("[disabled]") || e(s.element).parents("fieldset").is(":disabled"), o ? s.enable(!1) : s.readonly(t.is("[readonly]")), s._old = s._update(n.value || s.element.val()), s._oldText = t.val(), d.notify(s)
            },
            options: {
                name: "TimePicker",
                min: Y,
                max: Y,
                format: "",
                dates: [],
                parseFormats: [],
                value: null,
                interval: 30,
                height: 200,
                animation: {}
            },
            events: [b, w, y],
            setOptions: function(e) {
                var t = this,
                    n = t._value;
                _.fn.setOptions.call(t, e), e = t.options, a(e), t.timeView.setOptions(e), n && t.element.val(d.toString(n, e.format, e.culture))
            },
            dataBind: function(e) {
                j(e) && this.timeView.dataBind(e)
            },
            _editable: function(e) {
                var t = this,
                    n = e.disable,
                    i = e.readonly,
                    r = t._arrow.off(k),
                    o = t.element.off(k),
                    a = t._inputWrapper.off(k);
                i || n ? (a.addClass(n ? B : C).removeClass(n ? C : B), o.attr(S, n).attr(T, i).attr(O, n).attr(V, i)) : (a.addClass(C).removeClass(B).on(I, t._toggleHover), o.removeAttr(S).removeAttr(T).attr(O, !1).attr(V, !1).on("keydown" + k, G(t._keydown, t)).on("focusout" + k, G(t._blur, t)).on("focus" + k, function() {
                    t._inputWrapper.addClass(E)
                }), r.on(x, G(t._click, t)).on(M, s))
            },
            readonly: function(e) {
                this._editable({
                    readonly: e === t ? !0 : e,
                    disable: !1
                })
            },
            enable: function(e) {
                this._editable({
                    readonly: !1,
                    disable: !(e = e === t ? !0 : e)
                })
            },
            destroy: function() {
                var e = this;
                _.fn.destroy.call(e), e.timeView.destroy(), e.element.off(k), e._arrow.off(k), e._inputWrapper.off(k), e._form && e._form.off("reset", e._resetHandler)
            },
            close: function() {
                this.timeView.close()
            },
            open: function() {
                this.timeView.open()
            },
            min: function(e) {
                return this._option("min", e)
            },
            max: function(e) {
                return this._option("max", e)
            },
            value: function(e) {
                var n = this;
                return e === t ? n._value : (n._old = n._update(e), null === n._old && n.element.val(""), n._oldText = n.element.val(), t)
            },
            _blur: function() {
                var e = this,
                    t = e.element.val();
                e.close(), t !== e._oldText && e._change(t), e._inputWrapper.removeClass(E)
            },
            _click: function() {
                var e = this,
                    t = e.element;
                e.timeView.toggle(), m.touch || t[0] === f() || t.focus()
            },
            _change: function(e) {
                var t = this;
                e = t._update(e), +t._old != +e && (t._old = e, t._oldText = t.element.val(), t._typing || t.element.trigger(y), t.trigger(y)), t._typing = !1
            },
            _icon: function() {
                var t, n = this,
                    i = n.element;
                t = i.next("span.k-select"), t[0] || (t = e('<span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-clock">select</span></span>').insertAfter(i)), n._arrow = t.attr({
                    role: "button",
                    "aria-controls": n.timeView._timeViewID
                })
            },
            _keydown: function(e) {
                var t = this,
                    n = e.keyCode,
                    i = t.timeView,
                    r = t.element.val();
                i.popup.visible() || e.altKey ? i.move(e) : n === u.ENTER && r !== t._oldText ? t._change(r) : t._typing = !0
            },
            _option: function(e, n) {
                var i = this,
                    r = i.options;
                return n === t ? r[e] : (n = i.timeView._parse(n), n && (n = new $(+n), r[e] = n, i.timeView.options[e] = n, i.timeView.bind()), t)
            },
            _toggleHover: function(t) {
                e(t.currentTarget).toggleClass(F, "mouseenter" === t.type)
            },
            _update: function(e) {
                var t = this,
                    n = t.options,
                    i = t.timeView,
                    r = i._parse(e);
                return o(r, n.min, n.max) || (r = null), t._value = r, t.element.val(r ? d.toString(r, n.format, n.culture) : e), i.value(r), r
            },
            _wrapper: function() {
                var t, n = this,
                    i = n.element;
                t = i.parents(".k-timepicker"), t[0] || (t = i.wrap(A).parent().addClass("k-picker-wrap k-state-default"), t = t.wrap(A).parent()), t[0].style.cssText = i[0].style.cssText, n.wrapper = t.addClass("k-widget k-timepicker k-header").addClass(i[0].className), i.css({
                    width: "100%",
                    height: i[0].style.height
                }), n._inputWrapper = e(t[0].firstChild)
            },
            _reset: function() {
                var t = this,
                    n = t.element,
                    i = n.attr("form"),
                    r = i ? e("#" + i) : n.closest("form");
                r[0] && (t._resetHandler = function() {
                    t.value(n[0].defaultValue), t.max(t._initialOptions.max), t.min(t._initialOptions.min)
                }, t._form = r.on("reset", t._resetHandler))
            }
        }), v.plugin(c)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.toolbar.min", ["kendo.core.min", "kendo.userevents.min", "kendo.popup.min"], e)
}(function() {
    return function(e, t) {
        function n() {
            var e, t = this.options.anchor,
                n = t.outerWidth();
            x.wrap(this.element).addClass("k-split-wrapper"), e = "border-box" !== this.element.css("box-sizing") ? n - (this.element.outerWidth() - this.element.width()) : n, this.element.css({
                fontFamily: t.css("font-family"),
                "min-width": e
            })
        }

        function i(e) {
            e.target.is(".k-toggle-button") || e.target.toggleClass(H, "press" == e.type)
        }

        function r(t) {
            return t = e(t), t.hasClass("km-actionsheet") ? t.closest(".km-popup-wrapper") : t.addClass("km-widget km-actionsheet").wrap('<div class="km-actionsheet-wrapper km-actionsheet-tablet km-widget km-popup"></div>').parent().wrap('<div class="km-popup-wrapper k-popup"></div>').parent()
        }

        function o(e) {
            e.preventDefault()
        }

        function a(t, n) {
            var i = "next" === n ? e.fn.next : e.fn.prev,
                r = "next" === n ? e.fn.first : e.fn.last,
                o = i.call(t);
            return o.is(":kendoFocusable") || !o.length ? o : o.find(":kendoFocusable").length ? r.call(o.find(":kendoFocusable")) : a(o, n)
        }
        var s, l, c, d, u, h, f, p, m, g, v, _, b, w, y, k, x = window.kendo,
            C = x.Class,
            S = x.ui.Widget,
            T = e.proxy,
            D = x.isFunction,
            A = x.keys,
            E = "k-toolbar",
            F = "k-button",
            I = "k-overflow-button",
            M = "k-toggle-button",
            R = "k-button-group",
            P = "k-split-button",
            z = "k-separator",
            B = "k-popup",
            L = "k-toolbar-resizable",
            H = "k-state-active",
            N = "k-state-disabled",
            O = "k-state-hidden",
            V = "k-group-start",
            U = "k-group-end",
            W = "k-primary",
            j = "k-icon",
            q = "k-i-",
            G = "k-button-icon",
            $ = "k-button-icontext",
            Y = "k-list-container k-split-container",
            K = "k-split-button-arrow",
            Q = "k-overflow-anchor",
            X = "k-overflow-container",
            J = "k-toolbar-first-visible",
            Z = "k-toolbar-last-visible",
            ee = "click",
            te = "toggle",
            ne = "open",
            ie = "close",
            re = "overflowOpen",
            oe = "overflowClose",
            ae = "never",
            se = "auto",
            le = "always",
            ce = "k-overflow-hidden",
            de = x.attr("uid");
        x.toolbar = {}, s = {
            overflowAnchor: '<div tabindex="0" class="k-overflow-anchor"></div>',
            overflowContainer: '<ul class="k-overflow-container k-list-container"></ul>'
        }, x.toolbar.registerComponent = function(e, t, n) {
            s[e] = {
                toolbar: t,
                overflow: n
            }
        }, l = x.Class.extend({
            addOverflowAttr: function() {
                this.element.attr(x.attr("overflow"), this.options.overflow || se)
            },
            addUidAttr: function() {
                this.element.attr(de, this.options.uid)
            },
            addIdAttr: function() {
                this.options.id && this.element.attr("id", this.options.id)
            },
            addOverflowIdAttr: function() {
                this.options.id && this.element.attr("id", this.options.id + "_overflow")
            },
            attributes: function() {
                this.options.attributes && this.element.attr(this.options.attributes)
            },
            show: function() {
                this.element.removeClass(O).show(), this.options.hidden = !1
            },
            hide: function() {
                this.element.addClass(O).hide(), this.options.hidden = !0
            },
            remove: function() {
                this.element.remove()
            },
            enable: function(e) {
                e === t && (e = !0), this.element.toggleClass(N, !e), this.options.enable = e
            },
            twin: function() {
                var e = this.element.attr(de);
                return this.overflow ? this.toolbar.element.find("[" + de + "='" + e + "']").data(this.options.type) : this.toolbar.options.resizable ? this.toolbar.popup.element.find("[" + de + "='" + e + "']").data(this.options.type) : t
            }
        }), x.toolbar.Item = l, c = l.extend({
            init: function(n, i) {
                var r = e(n.useButtonTag ? '<button tabindex="0"></button>' : '<a href tabindex="0"></a>');
                this.element = r, this.options = n, this.toolbar = i, this.attributes(), n.primary && r.addClass(W), n.togglable && (r.addClass(M), this.toggle(n.selected)), n.url === t || n.useButtonTag || (r.attr("href", n.url), n.mobile && r.attr(x.attr("role"), "button")), n.group && (r.attr(x.attr("group"), n.group), this.group = this.toolbar.addToGroup(this, n.group)), !n.togglable && n.click && D(n.click) && (this.clickHandler = n.click), n.togglable && n.toggle && D(n.toggle) && (this.toggleHandler = n.toggle)
            },
            toggle: function(e, t) {
                e = !!e, this.group && e ? this.group.select(this) : this.group || this.select(e), t && this.twin() && this.twin().toggle(e)
            },
            getParentGroup: function() {
                return this.options.isChild ? this.element.closest("." + R).data("buttonGroup") : t
            },
            _addGraphics: function() {
                var t, n, i, r = this.element,
                    o = this.options.icon,
                    a = this.options.spriteCssClass,
                    s = this.options.imageUrl;
                (a || s || o) && (t = !0, r.contents().not("span.k-sprite,span." + j + ",img.k-image").each(function(n, i) {
                    (1 == i.nodeType || 3 == i.nodeType && e.trim(i.nodeValue).length > 0) && (t = !1)
                }), r.addClass(t ? G : $)), o ? (n = r.children("span." + j).first(), n[0] || (n = e('<span class="' + j + '"></span>').prependTo(r)), n.addClass(q + o)) : a ? (n = r.children("span.k-sprite").first(), n[0] || (n = e('<span class="k-sprite"></span>').prependTo(r)), n.addClass(a)) : s && (i = r.children("img.k-image").first(), i[0] || (i = e('<img alt="icon" class="k-image" />').prependTo(r)), i.attr("src", s))
            }
        }), x.toolbar.Button = c, d = c.extend({
            init: function(e, t) {
                c.fn.init.call(this, e, t);
                var n = this.element;
                n.addClass(F), this.addIdAttr(), e.align && n.addClass("k-align-" + e.align), "overflow" != e.showText && e.text && n.html(e.mobile ? '<span class="km-text">' + e.text + "</span>" : e.text), e.hasIcon = "overflow" != e.showIcon && (e.icon || e.spriteCssClass || e.imageUrl), e.hasIcon && this._addGraphics(), this.addUidAttr(), this.addOverflowAttr(), this.enable(e.enable), e.hidden && this.hide(), this.element.data({
                    type: "button",
                    button: this
                })
            },
            select: function(e) {
                e === t && (e = !1), this.element.toggleClass(H, e), this.options.selected = e
            }
        }), x.toolbar.ToolBarButton = d, u = c.extend({
            init: function(e, t) {
                this.overflow = !0, c.fn.init.call(this, e, t);
                var n = this.element;
                "toolbar" != e.showText && e.text && n.html(e.mobile ? '<span class="km-text">' + e.text + "</span>" : '<span class="k-text">' + e.text + "</span>"), e.hasIcon = "toolbar" != e.showIcon && (e.icon || e.spriteCssClass || e.imageUrl), e.hasIcon && this._addGraphics(), e.isChild || this._wrap(), this.addOverflowIdAttr(), this.attributes(), this.addUidAttr(), this.addOverflowAttr(), this.enable(e.enable), n.addClass(I + " " + F), e.hidden && this.hide(), this.element.data({
                    type: "button",
                    button: this
                })
            },
            _wrap: function() {
                this.element = this.element.wrap("<li></li>").parent()
            },
            overflowHidden: function() {
                this.element.addClass(ce)
            },
            select: function(e) {
                e === t && (e = !1), this.options.isChild ? this.element.toggleClass(H, e) : this.element.find(".k-button").toggleClass(H, e), this.options.selected = e
            }
        }), x.toolbar.OverflowButton = u, x.toolbar.registerComponent("button", d, u), h = l.extend({
            createButtons: function(t) {
                var n, i, r = this.options,
                    o = r.buttons || [];
                for (i = 0; o.length > i; i++) o[i].uid || (o[i].uid = x.guid()), n = new t(e.extend({
                    mobile: r.mobile,
                    isChild: !0,
                    type: "button"
                }, o[i]), this.toolbar), n.element.appendTo(this.element)
            },
            refresh: function() {
                this.element.children().filter(":not('." + O + "'):first").addClass(V), this.element.children().filter(":not('." + O + "'):last").addClass(U)
            }
        }), x.toolbar.ButtonGroup = h, f = h.extend({
            init: function(t, n) {
                var i = this.element = e("<div></div>");
                this.options = t, this.toolbar = n, this.addIdAttr(), t.align && i.addClass("k-align-" + t.align), this.createButtons(d), this.attributes(), this.addUidAttr(), this.addOverflowAttr(), this.refresh(), i.addClass(R), this.element.data({
                    type: "buttonGroup",
                    buttonGroup: this
                })
            }
        }), x.toolbar.ToolBarButtonGroup = f, p = h.extend({
            init: function(t, n) {
                var i = this.element = e("<li></li>");
                this.options = t, this.toolbar = n, this.overflow = !0, this.addOverflowIdAttr(), this.createButtons(u), this.attributes(), this.addUidAttr(), this.addOverflowAttr(), this.refresh(), i.addClass((t.mobile ? "" : R) + " k-overflow-group"), this.element.data({
                    type: "buttonGroup",
                    buttonGroup: this
                })
            },
            overflowHidden: function() {
                this.element.addClass(ce)
            }
        }), x.toolbar.OverflowButtonGroup = p, x.toolbar.registerComponent("buttonGroup", f, p), m = l.extend({
            init: function(t, n) {
                var i = this.element = e('<div class="' + P + '" tabindex="0"></div>');
                this.options = t, this.toolbar = n, this.mainButton = new d(t, n), this.arrowButton = e('<a class="' + F + " " + K + '"><span class="' + (t.mobile ? "km-icon km-arrowdown" : "k-icon k-i-arrow-s") + '"></span></a>'), this.popupElement = e('<ul class="' + Y + '"></ul>'), this.mainButton.element.removeAttr("href tabindex").appendTo(i), this.arrowButton.appendTo(i), this.popupElement.appendTo(i), t.align && i.addClass("k-align-" + t.align), t.id || (t.id = t.uid), i.attr("id", t.id + "_wrapper"), this.addOverflowAttr(), this.addUidAttr(), this.createMenuButtons(), this.createPopup(), this._navigatable(), this.mainButton.main = !0, i.data({
                    type: "splitButton",
                    splitButton: this,
                    kendoPopup: this.popup
                })
            },
            _navigatable: function() {
                var t = this;
                t.popupElement.on("keydown", "." + F, function(n) {
                    var i = e(n.target).parent();
                    n.preventDefault(), n.keyCode === A.ESC || n.keyCode === A.TAB || n.altKey && n.keyCode === A.UP ? (t.toggle(), t.focus()) : n.keyCode === A.DOWN ? a(i, "next").focus() : n.keyCode === A.UP ? a(i, "prev").focus() : (n.keyCode === A.SPACEBAR || n.keyCode === A.ENTER) && t.toolbar.userEvents.trigger("tap", {
                        target: e(n.target)
                    })
                })
            },
            createMenuButtons: function() {
                var t, n, i = this.options,
                    r = i.menuButtons;
                for (n = 0; r.length > n; n++) t = new d(e.extend({
                    mobile: i.mobile,
                    type: "button",
                    click: i.click
                }, r[n]), this.toolbar), t.element.wrap("<li></li>").parent().appendTo(this.popupElement)
            },
            createPopup: function() {
                var t = this.options,
                    i = this.element;
                this.popupElement.attr("id", t.id + "_optionlist").attr(de, t.rootUid), t.mobile && (this.popupElement = r(this.popupElement)), this.popup = this.popupElement.kendoPopup({
                    appendTo: t.mobile ? e(t.mobile).children(".km-pane") : null,
                    anchor: i,
                    isRtl: this.toolbar._isRtl,
                    copyAnchorStyles: !1,
                    animation: t.animation,
                    open: n,
                    activate: function() {
                        this.element.find(":kendoFocusable").first().focus()
                    },
                    close: function() {
                        i.focus()
                    }
                }).data("kendoPopup"), this.popup.element.on(ee, "a.k-button", o)
            },
            remove: function() {
                this.popup.element.off(ee, "a.k-button"), this.popup.destroy(), this.element.remove()
            },
            toggle: function() {
                this.popup.toggle()
            },
            enable: function(e) {
                e === t && (e = !0), this.mainButton.enable(e), this.options.enable = e
            },
            focus: function() {
                this.element.focus()
            }
        }), x.toolbar.ToolBarSplitButton = m, g = l.extend({
            init: function(t, n) {
                var i, r, o = this.element = e('<li class="' + P + '"></li>'),
                    a = t.menuButtons;
                for (this.options = t, this.toolbar = n, this.overflow = !0, this.mainButton = new u(e.extend({
                    isChild: !0
                }, t)), this.mainButton.element.appendTo(o), r = 0; a.length > r; r++) i = new u(e.extend({
                    mobile: t.mobile,
                    isChild: !0
                }, a[r]), this.toolbar), i.element.appendTo(o);
                this.addUidAttr(), this.addOverflowAttr(), this.mainButton.main = !0, o.data({
                    type: "splitButton",
                    splitButton: this
                })
            },
            overflowHidden: function() {
                this.element.addClass(ce)
            }
        }), x.toolbar.OverflowSplitButton = g, x.toolbar.registerComponent("splitButton", m, g), v = l.extend({
            init: function(t, n) {
                var i = this.element = e("<div>&nbsp;</div>");
                this.element = i, this.options = t, this.toolbar = n, this.attributes(), this.addIdAttr(), this.addUidAttr(), this.addOverflowAttr(), i.addClass(z), i.data({
                    type: "separator",
                    separator: this
                })
            }
        }), _ = l.extend({
            init: function(t, n) {
                var i = this.element = e("<li>&nbsp;</li>");
                this.element = i, this.options = t, this.toolbar = n, this.overflow = !0, this.attributes(), this.addUidAttr(), this.addOverflowIdAttr(), i.addClass(z), i.data({
                    type: "separator",
                    separator: this
                })
            },
            overflowHidden: function() {
                this.element.addClass(ce)
            }
        }), x.toolbar.registerComponent("separator", v, _), b = l.extend({
            init: function(t, n, i) {
                var r = D(t) ? t(n) : t;
                r = r instanceof jQuery ? r.wrap("<div></div>").parent() : e("<div></div>").html(r), this.element = r, this.options = n, this.options.type = "template", this.toolbar = i, this.attributes(), this.addUidAttr(), this.addIdAttr(), this.addOverflowAttr(), r.data({
                    type: "template",
                    template: this
                })
            }
        }), x.toolbar.TemplateItem = b, w = l.extend({
            init: function(t, n, i) {
                var r = e(D(t) ? t(n) : t);
                r = r instanceof jQuery ? r.wrap("<li></li>").parent() : e("<li></li>").html(r), this.element = r, this.options = n, this.options.type = "template", this.toolbar = i, this.overflow = !0, this.attributes(), this.addUidAttr(), this.addOverflowIdAttr(), this.addOverflowAttr(), r.data({
                    type: "template",
                    template: this
                })
            },
            overflowHidden: function() {
                this.element.addClass(ce)
            }
        }), x.toolbar.OverflowTemplateItem = w, y = C.extend({
            init: function(e) {
                this.name = e, this.buttons = []
            },
            add: function(e) {
                this.buttons[this.buttons.length] = e
            },
            remove: function(t) {
                var n = e.inArray(t, this.buttons);
                this.buttons.splice(n, 1)
            },
            select: function(e) {
                var t, n;
                for (n = 0; this.buttons.length > n; n++) t = this.buttons[n], t.select(!1);
                e.select(!0), e.twin() && e.twin().select(!0)
            }
        }), k = S.extend({
            init: function(t, n) {
                var r, a = this;
                if (S.fn.init.call(a, t, n), n = a.options, t = a.wrapper = a.element, t.addClass(E + " k-widget"), this.uid = x.guid(), this._isRtl = x.support.isRtl(t), this._groups = {}, t.attr(de, this.uid), a.isMobile = "boolean" == typeof n.mobile ? n.mobile : a.element.closest(".km-root")[0], a.animation = a.isMobile ? {
                    open: {
                        effects: "fade"
                    }
                } : {}, a.isMobile && (t.addClass("km-widget"), j = "km-icon", q = "km-", F = "km-button", R = "km-buttongroup km-widget", H = "km-state-active", N = "km-state-disabled"), n.resizable ? (a._renderOverflow(), t.addClass(L), a.overflowUserEvents = new x.UserEvents(a.element, {
                    threshold: 5,
                    allowSelection: !0,
                    filter: "." + Q,
                    tap: T(a._toggleOverflow, a)
                }), a._resizeHandler = x.onResize(function() {
                    a.resize()
                })) : a.popup = {
                    element: e([])
                }, n.items && n.items.length)
                    for (r = 0; n.items.length > r; r++) a.add(n.items[r]);
                a.userEvents = new x.UserEvents(document, {
                    threshold: 5,
                    allowSelection: !0,
                    filter: "[" + de + "=" + this.uid + "] a." + F + ", [" + de + "=" + this.uid + "] ." + I,
                    tap: T(a._buttonClick, a),
                    press: i,
                    release: i
                }), a.element.on(ee, "a.k-button", o), a._navigatable(), n.resizable && a.popup.element.on(ee, NaN, o), n.resizable && this._toggleOverflowAnchor(), x.notify(a)
            },
            events: [ee, te, ne, ie, re, oe],
            options: {
                name: "ToolBar",
                items: [],
                resizable: !0,
                mobile: null
            },
            addToGroup: function(e, t) {
                var n;
                return n = this._groups[t] ? this._groups[t] : this._groups[t] = new y, n.add(e), n
            },
            destroy: function() {
                var t = this;
                t.element.find("." + P).each(function(t, n) {
                    e(n).data("kendoPopup").destroy()
                }), t.element.off(ee, "a.k-button"), t.userEvents.destroy(), t.options.resizable && (x.unbindResize(t._resizeHandler), t.overflowUserEvents.destroy(), t.popup.element.off(ee, "a.k-button"), t.popup.destroy()), S.fn.destroy.call(t)
            },
            add: function(t) {
                var n, i, r, o = s[t.type],
                    a = t.template,
                    l = this,
                    c = l.isMobile ? "" : "k-item k-state-default",
                    d = t.overflowTemplate;
                if (e.extend(t, {
                    uid: x.guid(),
                    animation: l.animation,
                    mobile: l.isMobile,
                    rootUid: l.uid
                }), t.menuButtons)
                    for (r = 0; t.menuButtons.length > r; r++) e.extend(t.menuButtons[r], {
                        uid: x.guid()
                    });
                a && !d ? t.overflow = ae : t.overflow || (t.overflow = se), t.overflow !== ae && l.options.resizable && (d ? i = new w(d, t, l) : o && (i = new o.overflow(t, l), i.element.addClass(c)), i && (t.overflow === se && i.overflowHidden(), i.element.appendTo(l.popup.container), l.angular("compile", function() {
                    return {
                        elements: i.element.get()
                    }
                }))), t.overflow !== le && (a ? n = new b(a, t, l) : o && (n = new o.toolbar(t, l)), n && (l.options.resizable ? (n.element.appendTo(l.element).css("visibility", "hidden"), l._shrink(l.element.innerWidth()), n.element.css("visibility", "visible")) : n.element.appendTo(l.element), l.angular("compile", function() {
                    return {
                        elements: n.element.get()
                    }
                })))
            },
            _getItem: function(t) {
                var n, i, r, o, a = this.options.resizable;
                return n = this.element.find(t), n.length || (n = e(".k-split-container[data-uid=" + this.uid + "]").find(t)), o = n.length ? n.data("type") : "", i = n.data(o), i ? (i.main && (n = n.parent("." + P), o = "splitButton", i = n.data(o)), a && (r = i.twin())) : a && (n = this.popup.element.find(t), o = n.length ? n.data("type") : "", r = n.data(o), r && r.main && (n = n.parent("." + P), o = "splitButton", r = n.data(o))), {
                    type: o,
                    toolbar: i,
                    overflow: r
                }
            },
            remove: function(e) {
                var t = this._getItem(e);
                t.toolbar && t.toolbar.remove(), t.overflow && t.overflow.remove(), this.resize(!0)
            },
            hide: function(e) {
                var t = this._getItem(e);
                t.toolbar && ("button" === t.toolbar.options.type && t.toolbar.options.isChild ? (t.toolbar.hide(), t.toolbar.getParentGroup().refresh()) : t.toolbar.options.hidden || t.toolbar.hide()), t.overflow && ("button" === t.overflow.options.type && t.overflow.options.isChild ? (t.overflow.hide(), t.overflow.getParentGroup().refresh()) : t.toolbar.options.hidden || t.overflow.hide()), this.resize(!0)
            },
            show: function(e) {
                var t = this._getItem(e);
                t.toolbar && ("button" === t.toolbar.options.type && t.toolbar.options.isChild ? (t.toolbar.show(), t.toolbar.getParentGroup().refresh()) : t.toolbar.options.hidden && t.toolbar.show()), t.overflow && ("button" === t.overflow.options.type && t.overflow.options.isChild ? (t.toolbar.show(), t.overflow.getParentGroup().refresh()) : t.overflow.options.hidden && t.overflow.show()), this.resize(!0)
            },
            enable: function(e, n) {
                var i = this._getItem(e);
                t === n && (n = !0), i.toolbar && i.toolbar.enable(n), i.overflow && i.overflow.enable(n)
            },
            getSelectedFromGroup: function(e) {
                return this.element.find("." + M + "[data-group='" + e + "']").filter("." + H)
            },
            toggle: function(n, i) {
                var r = e(n),
                    o = r.data("button");
                o.options.togglable && (i === t && (i = !0), o.toggle(i, !0))
            },
            _renderOverflow: function() {
                var t = this,
                    n = s.overflowContainer,
                    i = t._isRtl,
                    o = i ? "left" : "right";
                t.overflowAnchor = e(s.overflowAnchor).addClass(F), t.element.append(t.overflowAnchor), t.isMobile ? (t.overflowAnchor.append('<span class="km-icon km-more"></span>'), n = r(n)) : t.overflowAnchor.append('<span class="k-icon k-i-arrow-s"></span>'), t.popup = new x.ui.Popup(n, {
                    origin: "bottom " + o,
                    position: "top " + o,
                    anchor: t.overflowAnchor,
                    isRtl: i,
                    animation: t.animation,
                    appendTo: t.isMobile ? e(t.isMobile).children(".km-pane") : null,
                    copyAnchorStyles: !1,
                    open: function(n) {
                        var r = x.wrap(t.popup.element).addClass("k-overflow-wrapper");
                        t.isMobile ? t.popup.container.css("max-height", parseFloat(e(".km-content:visible").innerHeight()) - 15 + "px") : r.css("margin-left", (i ? -1 : 1) * ((r.outerWidth() - r.width()) / 2 + 1)),
                        t.trigger(re) && n.preventDefault()
                    },
                    activate: function() {
                        this.element.find(":kendoFocusable").first().focus()
                    },
                    close: function(e) {
                        t.trigger(oe) && e.preventDefault(), this.element.focus()
                    }
                }), t.popup.element.on("keydown", "." + F, function(n) {
                    var i, r = e(n.target),
                        o = r.parent(),
                        s = o.is("." + R) || o.is("." + P);
                    n.preventDefault(), n.keyCode === A.ESC || n.keyCode === A.TAB || n.altKey && n.keyCode === A.UP ? (t._toggleOverflow(), t.overflowAnchor.focus()) : n.keyCode === A.DOWN ? (i = !s || s && r.is(":last-child") ? o : r, a(i, "next").focus()) : n.keyCode === A.UP ? (i = !s || s && r.is(":first-child") ? o : r, a(i, "prev").focus()) : (n.keyCode === A.SPACEBAR || n.keyCode === A.ENTER) && t.userEvents.trigger("tap", {
                        target: e(n.target)
                    })
                }), t.popup.container = t.isMobile ? t.popup.element.find("." + X) : t.popup.element, t.popup.container.attr(de, this.uid)
            },
            _toggleOverflowAnchor: function() {
                var e = !1;
                e = this.options.mobile ? this.popup.element.find("." + X).children(":not(." + ce + ", ." + B + ")").length > 0 : this.popup.element.children(":not(." + ce + ", ." + B + ")").length > 0, this.overflowAnchor.css(e ? {
                    visibility: "visible",
                    width: ""
                } : {
                    visibility: "hidden",
                    width: "1px"
                })
            },
            _buttonClick: function(n) {
                var i, r, o, a, s, l, c, d = this,
                    u = n.target.closest("." + K).length;
                return n.preventDefault(), u ? (d._toggle(n), t) : (r = e(n.target).closest("." + F, d.element), r.hasClass(Q) || (o = r.data("button"), !o && d.popup && (r = e(n.target).closest("." + I, d.popup.container), o = r.parent("li").data("button")), o && o.options.enable && (o.options.togglable ? (s = D(o.toggleHandler) ? o.toggleHandler : null, o.toggle(!o.options.selected, !0), l = {
                    target: r,
                    group: o.options.group,
                    checked: o.options.selected,
                    id: o.options.id
                }, s && s.call(d, l), d.trigger(te, l)) : (s = D(o.clickHandler) ? o.clickHandler : null, l = {
                    sender: d,
                    target: r,
                    id: o.options.id
                }, s && s.call(d, l), d.trigger(ee, l)), o.options.url && (o.options.attributes && o.options.attributes.target && (c = o.options.attributes.target), window.open(o.options.url, c || "_self")), r.hasClass(I) && d.popup.close(), a = r.closest(".k-split-container"), a[0] && (i = a.data("kendoPopup"), (i ? i : a.parents(".km-popup-wrapper").data("kendoPopup")).close()))), t)
            },
            _navigatable: function() {
                var t = this;
                t.element.attr("tabindex", 0).focus(function() {
                    var t = e(this).find(":kendoFocusable:first");
                    t.is("." + Q) && (t = a(t, "next")), t[0].focus()
                }).on("keydown", T(t._keydown, t))
            },
            _keydown: function(n) {
                var i, r, o, a, s, l = e(n.target),
                    c = n.keyCode,
                    d = this.element.children(":not(.k-separator):visible");
                return c === A.TAB && (i = l.parentsUntil(this.element).last(), r = !1, o = !1, i.length || (i = l), i.is("." + Q) && (n.shiftKey && n.preventDefault(), d.last().is(":kendoFocusable") ? d.last().focus() : d.last().find(":kendoFocusable").last().focus()), n.shiftKey || d.index(i) !== d.length - 1 || (r = i.is("." + R) ? l.is(":last-child") : !0), n.shiftKey && 1 === d.index(i) && (o = i.is("." + R) ? l.is(":first-child") : !0), r && this.overflowAnchor && "hidden" !== this.overflowAnchor.css("visibility") && (n.preventDefault(), this.overflowAnchor.focus()), o && (n.preventDefault(), this.wrapper.prev(":kendoFocusable").focus())), n.altKey && c === A.DOWN ? (a = e(document.activeElement).data("splitButton"), s = e(document.activeElement).is("." + Q), a ? a.toggle() : s && this._toggleOverflow(), t) : c !== A.SPACEBAR && c !== A.ENTER || l.is("input, checkbox") ? t : (n.preventDefault(), l.is("." + P) && (l = l.children().first()), this.userEvents.trigger("tap", {
                    target: l
                }), t)
            },
            _toggle: function(t) {
                var n, i = e(t.target).closest("." + P).data("splitButton");
                t.preventDefault(), i.options.enable && (n = i.popup.element.is(":visible") ? this.trigger(ie, {
                    target: i.element
                }) : this.trigger(ne, {
                    target: i.element
                }), n || i.toggle())
            },
            _toggleOverflow: function() {
                this.popup.toggle()
            },
            _resize: function(e) {
                var t = e.width;
                this.options.resizable && (this.popup.close(), this._shrink(t), this._stretch(t), this._markVisibles(), this._toggleOverflowAnchor())
            },
            _childrenWidth: function() {
                var t = 0;
                return this.element.children(":visible:not('." + O + "')").each(function() {
                    t += e(this).outerWidth(!0)
                }), Math.ceil(t)
            },
            _shrink: function(e) {
                var t, n, i;
                if (e < this._childrenWidth())
                    for (n = this.element.children(":visible:not([data-overflow='never'], ." + Q + ")"), i = n.length - 1; i >= 0 && (t = n.eq(i), !(e > this._childrenWidth())); i--) this._hideItem(t)
            },
            _stretch: function(e) {
                var t, n, i;
                if (e > this._childrenWidth())
                    for (n = this.element.children(":hidden:not('." + O + "')"), i = 0; n.length > i && (t = n.eq(i), !(e < this._childrenWidth()) && this._showItem(t, e)); i++);
            },
            _hideItem: function(e) {
                e.hide(), this.popup && this.popup.container.find(">li[data-uid='" + e.data("uid") + "']").removeClass(ce)
            },
            _showItem: function(e, t) {
                return e.length && t > this._childrenWidth() + e.outerWidth(!0) ? (e.show(), this.popup && this.popup.container.find(">li[data-uid='" + e.data("uid") + "']").addClass(ce), !0) : !1
            },
            _markVisibles: function() {
                var e = this.popup.container.children(),
                    t = this.element.children(":not(.k-overflow-anchor)"),
                    n = e.filter(":not(.k-overflow-hidden)"),
                    i = t.filter(":visible");
                e.add(t).removeClass(J + " " + Z), n.first().add(i.first()).addClass(J), n.last().add(i.last()).addClass(Z)
            }
        }), x.ui.plugin(k)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.datetimepicker.min", ["kendo.datepicker.min", "kendo.timepicker.min"], e)
}(function() {
    return function(e, t) {
        function n(e) {
            var t = new Date(2100, 0, 1);
            return t.setMinutes(-e), t
        }

        function i(e) {
            e.preventDefault()
        }

        function r(t) {
            var n, i = o.getCulture(t.culture).calendars.standard.patterns,
                r = !t.parseFormats.length;
            t.format = c(t.format || i.g), t.timeFormat = n = c(t.timeFormat || i.t), o.DateView.normalize(t), r && t.parseFormats.unshift("yyyy-MM-ddTHH:mm:ss"), -1 === e.inArray(n, t.parseFormats) && t.parseFormats.splice(1, 0, n)
        }
        var o = window.kendo,
            a = o.TimeView,
            s = o.parseDate,
            l = o._activeElement,
            c = o._extractFormat,
            d = o.calendar,
            u = d.isInRange,
            h = d.restrictValue,
            f = d.isEqualDatePart,
            p = a.getMilliseconds,
            m = o.ui,
            g = m.Widget,
            v = "open",
            _ = "close",
            b = "change",
            w = ".kendoDateTimePicker",
            y = "click" + w,
            k = "disabled",
            x = "readonly",
            C = "k-state-default",
            S = "k-state-focused",
            T = "k-state-hover",
            D = "k-state-disabled",
            A = "mouseenter" + w + " mouseleave" + w,
            E = "mousedown" + w,
            F = "month",
            I = "<span/>",
            M = "aria-activedescendant",
            R = "aria-expanded",
            P = "aria-hidden",
            z = "aria-owns",
            B = "aria-disabled",
            L = "aria-readonly",
            H = Date,
            N = new H(1800, 0, 1),
            O = new H(2099, 11, 31),
            V = {
                view: "date"
            },
            U = {
                view: "time"
            },
            W = e.extend,
            j = g.extend({
                init: function(t, n) {
                    var i, a = this;
                    g.fn.init.call(a, t, n), t = a.element, n = a.options, n.disableDates = o.calendar.disabled(n.disableDates), n.min = s(t.attr("min")) || s(n.min), n.max = s(t.attr("max")) || s(n.max), r(n), a._initialOptions = W({}, n), a._wrapper(), a._views(), a._icons(), a._reset(), a._template();
                    try {
                        t[0].setAttribute("type", "text")
                    } catch (l) {
                        t[0].type = "text"
                    }
                    t.addClass("k-input").attr({
                        role: "combobox",
                        "aria-expanded": !1
                    }), a._midnight = a._calculateMidnight(n.min, n.max), i = t.is("[disabled]") || e(a.element).parents("fieldset").is(":disabled"), i ? a.enable(!1) : a.readonly(t.is("[readonly]")), a._old = a._update(n.value || a.element.val()), a._oldText = t.val(), o.notify(a)
                },
                options: {
                    name: "DateTimePicker",
                    value: null,
                    format: "",
                    timeFormat: "",
                    culture: "",
                    parseFormats: [],
                    dates: [],
                    min: new H(N),
                    max: new H(O),
                    interval: 30,
                    height: 200,
                    footer: "",
                    start: F,
                    depth: F,
                    animation: {},
                    month: {},
                    ARIATemplate: 'Current focused date is #=kendo.toString(data.current, "d")#'
                },
                events: [v, _, b],
                setOptions: function(e) {
                    var t, n, i, a = this,
                        l = a._value;
                    g.fn.setOptions.call(a, e), e = a.options, e.min = t = s(e.min), e.max = n = s(e.max), r(e), a._midnight = a._calculateMidnight(e.min, e.max), i = e.value || a._value || a.dateView._current, t && !f(t, i) && (t = new H(N)), n && !f(n, i) && (n = new H(O)), a.dateView.setOptions(e), a.timeView.setOptions(W({}, e, {
                        format: e.timeFormat,
                        min: t,
                        max: n
                    })), l && (a.element.val(o.toString(l, e.format, e.culture)), a._updateARIA(l))
                },
                _editable: function(t) {
                    var n = this,
                        r = n.element.off(w),
                        a = n._dateIcon.off(w),
                        s = n._timeIcon.off(w),
                        c = n._inputWrapper.off(w),
                        d = t.readonly,
                        u = t.disable;
                    d || u ? (c.addClass(u ? D : C).removeClass(u ? C : D), r.attr(k, u).attr(x, d).attr(B, u).attr(L, d)) : (c.addClass(C).removeClass(D).on(A, n._toggleHover), r.removeAttr(k).removeAttr(x).attr(B, !1).attr(L, !1).on("keydown" + w, e.proxy(n._keydown, n)).on("focus" + w, function() {
                        n._inputWrapper.addClass(S)
                    }).on("focusout" + w, function() {
                        n._inputWrapper.removeClass(S), r.val() !== n._oldText && n._change(r.val()), n.close("date"), n.close("time")
                    }), a.on(E, i).on(y, function() {
                        n.toggle("date"), o.support.touch || r[0] === l() || r.focus()
                    }), s.on(E, i).on(y, function() {
                        n.toggle("time"), o.support.touch || r[0] === l() || r.focus()
                    }))
                },
                readonly: function(e) {
                    this._editable({
                        readonly: e === t ? !0 : e,
                        disable: !1
                    })
                },
                enable: function(e) {
                    this._editable({
                        readonly: !1,
                        disable: !(e = e === t ? !0 : e)
                    })
                },
                destroy: function() {
                    var e = this;
                    g.fn.destroy.call(e), e.dateView.destroy(), e.timeView.destroy(), e.element.off(w), e._dateIcon.off(w), e._timeIcon.off(w), e._inputWrapper.off(w), e._form && e._form.off("reset", e._resetHandler)
                },
                close: function(e) {
                    "time" !== e && (e = "date"), this[e + "View"].close()
                },
                open: function(e) {
                    "time" !== e && (e = "date"), this[e + "View"].open()
                },
                min: function(e) {
                    return this._option("min", e)
                },
                max: function(e) {
                    return this._option("max", e)
                },
                toggle: function(e) {
                    var t = "timeView";
                    "time" !== e ? e = "date" : t = "dateView", this[e + "View"].toggle(), this[t].close()
                },
                value: function(e) {
                    var n = this;
                    return e === t ? n._value : (n._old = n._update(e), null === n._old && n.element.val(""), n._oldText = n.element.val(), t)
                },
                _change: function(e) {
                    var t, n, i, r = this,
                        o = r.element.val();
                    e = r._update(e), t = +r._old != +e, n = t && !r._typing, i = o !== r.element.val(), (n || i) && r.element.trigger(b), t && (r._old = e, r._oldText = r.element.val(), r.trigger(b)), r._typing = !1
                },
                _option: function(e, i) {
                    var r, o, a = this,
                        l = a.options,
                        c = a.timeView,
                        d = c.options,
                        u = a._value || a._old;
                    if (i === t) return l[e];
                    if (i = s(i, l.parseFormats, l.culture)) {
                        if (l.min.getTime() === l.max.getTime() && (d.dates = []), l[e] = new H(i.getTime()), a.dateView[e](i), a._midnight = a._calculateMidnight(l.min, l.max), u && (r = f(l.min, u), o = f(l.max, u)), r || o) {
                            if (d[e] = i, r && !o && (d.max = n(l.interval)), o) {
                                if (a._midnight) return c.dataBind([O]), t;
                                r || (d.min = N)
                            }
                        } else d.max = O, d.min = N;
                        c.bind()
                    }
                },
                _toggleHover: function(t) {
                    e(t.currentTarget).toggleClass(T, "mouseenter" === t.type)
                },
                _update: function(t) {
                    var i, r, a, l, c, d = this,
                        p = d.options,
                        m = p.min,
                        g = p.max,
                        v = p.dates,
                        _ = d.timeView,
                        w = d._value,
                        y = s(t, p.parseFormats, p.culture),
                        k = null === y && null === w || y instanceof Date && w instanceof Date;
                    return p.disableDates && p.disableDates(y) && (y = null, d._old || (t = null)), +y === +w && k ? (c = o.toString(y, p.format, p.culture), c !== t && (d.element.val(null === y ? t : c), t instanceof String && d.element.trigger(b)), y) : (null !== y && f(y, m) ? y = h(y, m, g) : u(y, m, g) || (y = null), d._value = y, _.value(y), d.dateView.value(y), y && (a = d._old, r = _.options, v[0] && (v = e.grep(v, function(e) {
                        return f(y, e)
                    }), v[0] && (_.dataBind(v), l = !0)), l || (f(y, m) && (r.min = m, r.max = n(p.interval), i = !0), f(y, g) && (d._midnight ? (_.dataBind([O]), l = !0) : (r.max = g, i || (r.min = N), i = !0))), !l && (!a && i || a && !f(a, y)) && (i || (r.max = O, r.min = N), _.bind())), d.element.val(y ? o.toString(y, p.format, p.culture) : t), d._updateARIA(y), y)
                },
                _keydown: function(e) {
                    var t = this,
                        n = t.dateView,
                        i = t.timeView,
                        r = t.element.val(),
                        a = n.popup.visible();
                    e.altKey && e.keyCode === o.keys.DOWN ? t.toggle(a ? "time" : "date") : a ? (n.move(e), t._updateARIA(n._current)) : i.popup.visible() ? i.move(e) : e.keyCode === o.keys.ENTER && r !== t._oldText ? t._change(r) : t._typing = !0
                },
                _views: function() {
                    var e, t, n, i, r, l, c = this,
                        d = c.element,
                        h = c.options,
                        f = d.attr("id");
                    c.dateView = e = new o.DateView(W({}, h, {
                        id: f,
                        anchor: c.wrapper,
                        change: function() {
                            var t, n, i = e.calendar.value(),
                                r = +i,
                                a = +h.min,
                                s = +h.max;
                            (r === a || r === s) && (t = r === a ? a : s, t = new H(c._value || t), t.setFullYear(i.getFullYear(), i.getMonth(), i.getDate()), u(t, a, s) && (i = t)), c._value && (n = o.date.setHours(new Date(i), c._value), u(n, a, s) && (i = n)), c._change(i), c.close("date")
                        },
                        close: function(e) {
                            c.trigger(_, V) ? e.preventDefault() : (d.attr(R, !1), n.attr(P, !0), t.popup.visible() || d.removeAttr(z))
                        },
                        open: function(t) {
                            c.trigger(v, V) ? t.preventDefault() : (d.val() !== c._oldText && (l = s(d.val(), h.parseFormats, h.culture), c.dateView[l ? "current" : "value"](l)), n.attr(P, !1), d.attr(R, !0).attr(z, e._dateViewID), c._updateARIA(l))
                        }
                    })), n = e.div, r = h.min.getTime(), c.timeView = t = new a({
                        id: f,
                        value: h.value,
                        anchor: c.wrapper,
                        animation: h.animation,
                        format: h.timeFormat,
                        culture: h.culture,
                        height: h.height,
                        interval: h.interval,
                        min: new H(N),
                        max: new H(O),
                        dates: r === h.max.getTime() ? [new Date(r)] : [],
                        parseFormats: h.parseFormats,
                        change: function(n, i) {
                            n = t._parse(n), h.min > n ? (n = new H(+h.min), t.options.min = n) : n > h.max && (n = new H(+h.max), t.options.max = n), i ? (c._timeSelected = !0, c._change(n)) : (d.val(o.toString(n, h.format, h.culture)), e.value(n), c._updateARIA(n))
                        },
                        close: function(t) {
                            c.trigger(_, U) ? t.preventDefault() : (i.attr(P, !0), d.attr(R, !1), e.popup.visible() || d.removeAttr(z))
                        },
                        open: function(e) {
                            t._adjustListWidth(), c.trigger(v, U) ? e.preventDefault() : (d.val() !== c._oldText && (l = s(d.val(), h.parseFormats, h.culture), c.timeView.value(l)), i.attr(P, !1), d.attr(R, !0).attr(z, t._timeViewID), t.options.active(t.current()))
                        },
                        active: function(e) {
                            d.removeAttr(M), e && d.attr(M, t._optionID)
                        }
                    }), i = t.ul
                },
                _icons: function() {
                    var t, n = this,
                        i = n.element;
                    t = i.next("span.k-select"), t[0] || (t = e('<span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-calendar">select</span><span unselectable="on" class="k-icon k-i-clock">select</span></span>').insertAfter(i)), t = t.children(), n._dateIcon = t.eq(0).attr({
                        role: "button",
                        "aria-controls": n.dateView._dateViewID
                    }), n._timeIcon = t.eq(1).attr({
                        role: "button",
                        "aria-controls": n.timeView._timeViewID
                    })
                },
                _wrapper: function() {
                    var t, n = this,
                        i = n.element;
                    t = i.parents(".k-datetimepicker"), t[0] || (t = i.wrap(I).parent().addClass("k-picker-wrap k-state-default"), t = t.wrap(I).parent()), t[0].style.cssText = i[0].style.cssText, i.css({
                        width: "100%",
                        height: i[0].style.height
                    }), n.wrapper = t.addClass("k-widget k-datetimepicker k-header").addClass(i[0].className), n._inputWrapper = e(t[0].firstChild)
                },
                _reset: function() {
                    var t = this,
                        n = t.element,
                        i = n.attr("form"),
                        r = i ? e("#" + i) : n.closest("form");
                    r[0] && (t._resetHandler = function() {
                        t.value(n[0].defaultValue), t.max(t._initialOptions.max), t.min(t._initialOptions.min)
                    }, t._form = r.on("reset", t._resetHandler))
                },
                _template: function() {
                    this._ariaTemplate = o.template(this.options.ARIATemplate)
                },
                _calculateMidnight: function(e, t) {
                    return p(e) + p(t) === 0
                },
                _updateARIA: function(e) {
                    var t, n = this,
                        i = n.dateView.calendar;
                    n.element.removeAttr(M), i && (t = i._cell, t.attr("aria-label", n._ariaTemplate({
                        current: e || i.current()
                    })), n.element.attr(M, t.attr("id")))
                }
            });
        m.plugin(j)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.splitter.min", ["kendo.resizable.min"], e)
}(function() {
    return function(e, t) {
        function n(e) {
            return v.test(e)
        }

        function i(e) {
            return g.test(e) || /^\d+$/.test(e)
        }

        function r(e) {
            return !n(e) && !i(e)
        }

        function o(e, t) {
            var i = parseInt(e, 10);
            return n(e) && (i = Math.floor(i * t / 100)), i
        }

        function a(e, n) {
            return function(i, r) {
                var o, a = this.element.find(i).data(E);
                return 1 == arguments.length ? a[e] : (a[e] = r, n && (o = this.element.data("kendo" + this.options.name), o.resize(!0)), t)
            }
        }

        function s(e) {
            var t = this,
                n = e.orientation;
            t.owner = e, t._element = e.element, t.orientation = n, f(t, n === S ? c : l), t._resizable = new d.ui.Resizable(e.element, {
                orientation: n,
                handle: ".k-splitbar-draggable-" + n + "[data-marker=" + e._marker + "]",
                hint: p(t._createHint, t),
                start: p(t._start, t),
                max: p(t._max, t),
                min: p(t._min, t),
                invalidClass: "k-restricted-size-" + n,
                resizeend: p(t._stop, t)
            })
        }
        var l, c, d = window.kendo,
            u = d.ui,
            h = d.keys,
            f = e.extend,
            p = e.proxy,
            m = u.Widget,
            g = /^\d+(\.\d+)?px$/i,
            v = /^\d+(\.\d+)?%$/i,
            _ = ".kendoSplitter",
            b = "expand",
            w = "collapse",
            y = "contentLoad",
            k = "error",
            x = "resize",
            C = "layoutChange",
            S = "horizontal",
            T = "vertical",
            D = "mouseenter",
            A = "click",
            E = "pane",
            F = "mouseleave",
            I = "k-state-focused",
            M = "k-" + E,
            R = "." + M,
            P = m.extend({
                init: function(e, t) {
                    var n, i = this;
                    m.fn.init.call(i, e, t), i.wrapper = i.element, n = i.options.orientation.toLowerCase() != T, i.orientation = n ? S : T, i._dimension = n ? "width" : "height", i._keys = {
                        decrease: n ? h.LEFT : h.UP,
                        increase: n ? h.RIGHT : h.DOWN
                    }, i._resizeStep = 10, i._marker = d.guid().substring(0, 8), i._initPanes(), i.resizing = new s(i), i.element.triggerHandler("init" + _)
                },
                events: [b, w, y, k, x, C],
                _addOverlays: function() {
                    this._panes().append("<div class='k-splitter-overlay k-overlay' />")
                },
                _removeOverlays: function() {
                    this._panes().children(".k-splitter-overlay").remove()
                },
                _attachEvents: function() {
                    var t = this,
                        n = t.options.orientation;
                    t.element.children(".k-splitbar-draggable-" + n).on("keydown" + _, p(t._keydown, t)).on("mousedown" + _, function(e) {
                        e.currentTarget.focus()
                    }).on("focus" + _, function(t) {
                        e(t.currentTarget).addClass(I)
                    }).on("blur" + _, function(n) {
                        e(n.currentTarget).removeClass(I), t.resizing && t.resizing.end()
                    }).on(D + _, function() {
                        e(this).addClass("k-splitbar-" + t.orientation + "-hover")
                    }).on(F + _, function() {
                        e(this).removeClass("k-splitbar-" + t.orientation + "-hover")
                    }).on("mousedown" + _, p(t._addOverlays, t)).end().children(".k-splitbar").on("dblclick" + _, p(t._togglePane, t)).children(".k-collapse-next, .k-collapse-prev").on(A + _, t._arrowClick(w)).end().children(".k-expand-next, .k-expand-prev").on(A + _, t._arrowClick(b)).end().end(), e(window).on("resize" + _ + t._marker, p(t.resize, t, !1)), e(document).on("mouseup" + _ + t._marker, p(t._removeOverlays, t))
                },
                _detachEvents: function() {
                    var t = this;
                    t.element.children(".k-splitbar-draggable-" + t.orientation).off(_).end().children(".k-splitbar").off("dblclick" + _).children(".k-collapse-next, .k-collapse-prev, .k-expand-next, .k-expand-prev").off(_), e(window).off(_ + t._marker), e(document).off(_ + t._marker)
                },
                options: {
                    name: "Splitter",
                    orientation: S,
                    panes: []
                },
                destroy: function() {
                    m.fn.destroy.call(this), this._detachEvents(), this.resizing && this.resizing.destroy(), d.destroy(this.element), this.wrapper = this.element = null
                },
                _keydown: function(t) {
                    var n, i = this,
                        r = t.keyCode,
                        o = i.resizing,
                        a = e(t.currentTarget),
                        s = i._keys,
                        l = r === s.increase,
                        c = r === s.decrease;
                    l || c ? (t.ctrlKey ? (n = a[c ? "next" : "prev"](), o && o.isResizing() && o.end(), n[i._dimension]() ? i._triggerAction(w, a[c ? "prev" : "next"]()) : i._triggerAction(b, n)) : o && o.move((c ? -1 : 1) * i._resizeStep, a), t.preventDefault()) : r === h.ENTER && o && (o.end(), t.preventDefault())
                },
                _initPanes: function() {
                    var e = this.options.panes || [],
                        t = this;
                    this.element.addClass("k-widget").addClass("k-splitter").children().each(function(n, i) {
                        "script" != i.nodeName.toLowerCase() && t._initPane(i, e[n])
                    }), this.resize()
                },
                _initPane: function(t, n) {
                    t = e(t).attr("role", "group").addClass(M), t.data(E, n ? n : {}).toggleClass("k-scrollable", n ? n.scrollable !== !1 : !0), this.ajaxRequest(t)
                },
                ajaxRequest: function(e, t, n) {
                    var i, r = this;
                    e = r.element.find(e), i = e.data(E), t = t || i.contentUrl, t && (e.append("<span class='k-icon k-loading k-pane-loading' />"), d.isLocalUrl(t) ? jQuery.ajax({
                        url: t,
                        data: n || {},
                        type: "GET",
                        dataType: "html",
                        success: function(t) {
                            r.angular("cleanup", function() {
                                return {
                                    elements: e.get()
                                }
                            }), e.html(t), r.angular("compile", function() {
                                return {
                                    elements: e.get()
                                }
                            }), r.trigger(y, {
                                pane: e[0]
                            })
                        },
                        error: function(t, n) {
                            r.trigger(k, {
                                pane: e[0],
                                status: n,
                                xhr: t
                            })
                        }
                    }) : e.removeClass("k-scrollable").html("<iframe src='" + t + "' frameborder='0' class='k-content-frame'>This page requires frames in order to show content</iframe>"))
                },
                _triggerAction: function(e, t) {
                    this.trigger(e, {
                        pane: t[0]
                    }) || this[e](t[0])
                },
                _togglePane: function(t) {
                    var n, i = this,
                        r = e(t.target);
                    r.closest(".k-splitter")[0] == i.element[0] && (n = r.children(".k-icon:not(.k-resize-handle)"), 1 === n.length && (n.is(".k-collapse-prev") ? i._triggerAction(w, r.prev()) : n.is(".k-collapse-next") ? i._triggerAction(w, r.next()) : n.is(".k-expand-prev") ? i._triggerAction(b, r.prev()) : n.is(".k-expand-next") && i._triggerAction(b, r.next())))
                },
                _arrowClick: function(t) {
                    var n = this;
                    return function(i) {
                        var r, o = e(i.target);
                        o.closest(".k-splitter")[0] == n.element[0] && (r = o.is(".k-" + t + "-prev") ? o.parent().prev() : o.parent().next(), n._triggerAction(t, r))
                    }
                },
                _updateSplitBar: function(e, t, n) {
                    var i = function(e, t) {
                            return t ? "<div class='k-icon " + e + "' />" : ""
                        },
                        r = this.orientation,
                        o = t.resizable !== !1 && n.resizable !== !1,
                        a = t.collapsible,
                        s = t.collapsed,
                        l = n.collapsible,
                        c = n.collapsed;
                    e.addClass("k-splitbar k-state-default k-splitbar-" + r).attr("role", "separator").attr("aria-expanded", !(s || c)).removeClass("k-splitbar-" + r + "-hover").toggleClass("k-splitbar-draggable-" + r, o && !s && !c).toggleClass("k-splitbar-static-" + r, !o && !a && !l).html(i("k-collapse-prev", a && !s && !c) + i("k-expand-prev", a && s && !c) + i("k-resize-handle", o) + i("k-collapse-next", l && !c && !s) + i("k-expand-next", l && c && !s)), o || a || l || e.removeAttr("tabindex")
                },
                _updateSplitBars: function() {
                    var t = this;
                    this.element.children(".k-splitbar").each(function() {
                        var n = e(this),
                            i = n.prevAll(R).first().data(E),
                            r = n.nextAll(R).first().data(E);
                        r && t._updateSplitBar(n, i, r)
                    })
                },
                _removeSplitBars: function() {
                    this.element.children(".k-splitbar").remove()
                },
                _panes: function() {
                    return this.element ? this.element.children(R) : e()
                },
                _resize: function() {
                    var n, i, a, s, l, c, u, h, f, p, m = this,
                        g = m.element,
                        v = g.children(R),
                        _ = m.orientation == S,
                        b = g.children(".k-splitbar"),
                        w = b.length,
                        y = _ ? "width" : "height",
                        k = g[y]();
                    m.wrapper.addClass("k-splitter-resizing"), 0 === w ? (w = v.length - 1, v.slice(0, w).after("<div tabindex='0' class='k-splitbar' data-marker='" + m._marker + "' />"), m._updateSplitBars(), b = g.children(".k-splitbar")) : m._updateSplitBars(), b.each(function() {
                        k -= this[_ ? "offsetWidth" : "offsetHeight"]
                    }), n = 0, i = 0, a = e(), v.css({
                        position: "absolute",
                        top: 0
                    })[y](function() {
                        var s, l = e(this),
                            c = l.data(E) || {};
                        if (l.removeClass("k-state-collapsed"), c.collapsed) s = c.collapsedSize ? o(c.collapsedSize, k) : 0, l.css("overflow", "hidden").addClass("k-state-collapsed");
                        else {
                            if (r(c.size)) return a = a.add(this), t;
                            s = o(c.size, k)
                        }
                        return i++, n += s, s
                    }), k -= n, s = a.length, l = Math.floor(k / s), a.slice(0, s - 1).css(y, l).end().eq(s - 1).css(y, k - (s - 1) * l), c = 0, u = _ ? "height" : "width", h = _ ? "left" : "top", f = _ ? "offsetWidth" : "offsetHeight", 0 === s && (p = v.filter(function() {
                        return !(e(this).data(E) || {}).collapsed
                    }).last(), p[y](k + p[0][f])), g.children().css(u, g[u]()).each(function(e, t) {
                        "script" != t.tagName.toLowerCase() && (t.style[h] = Math.floor(c) + "px", c += t[f])
                    }), m._detachEvents(), m._attachEvents(), m.wrapper.removeClass("k-splitter-resizing"), d.resize(v), m.trigger(C)
                },
                toggle: function(e, n) {
                    var i, r = this;
                    e = r.element.find(e), i = e.data(E), (n || i.collapsible) && (1 == arguments.length && (n = i.collapsed === t ? !1 : i.collapsed), i.collapsed = !n, i.collapsed ? e.css("overflow", "hidden") : e.css("overflow", ""), r.resize(!0))
                },
                collapse: function(e) {
                    this.toggle(e, !1)
                },
                expand: function(e) {
                    this.toggle(e, !0)
                },
                _addPane: function(e, t, n) {
                    var i = this;
                    return n.length && (i.options.panes.splice(t, 0, e), i._initPane(n, e), i._removeSplitBars(), i.resize(!0)), n
                },
                append: function(t) {
                    t = t || {};
                    var n = this,
                        i = e("<div />").appendTo(n.element);
                    return n._addPane(t, n.options.panes.length, i)
                },
                insertBefore: function(t, n) {
                    n = e(n), t = t || {};
                    var i = this,
                        r = i.wrapper.children(".k-pane").index(n),
                        o = e("<div />").insertBefore(e(n));
                    return i._addPane(t, r, o)
                },
                insertAfter: function(t, n) {
                    n = e(n), t = t || {};
                    var i = this,
                        r = i.wrapper.children(".k-pane").index(n),
                        o = e("<div />").insertAfter(e(n));
                    return i._addPane(t, r + 1, o)
                },
                remove: function(t) {
                    t = e(t);
                    var n = this;
                    return t.length && (d.destroy(t), t.each(function(t, i) {
                        n.options.panes.splice(n.wrapper.children(".k-pane").index(i), 1), e(i).remove()
                    }), n._removeSplitBars(), n.options.panes.length && n.resize(!0)), n
                },
                size: a("size", !0),
                min: a("min"),
                max: a("max")
            });
        u.plugin(P), l = {
            sizingProperty: "height",
            sizingDomProperty: "offsetHeight",
            alternateSizingProperty: "width",
            positioningProperty: "top",
            mousePositioningProperty: "pageY"
        }, c = {
            sizingProperty: "width",
            sizingDomProperty: "offsetWidth",
            alternateSizingProperty: "height",
            positioningProperty: "left",
            mousePositioningProperty: "pageX"
        }, s.prototype = {
            press: function(e) {
                this._resizable.press(e)
            },
            move: function(e, t) {
                this.pressed || (this.press(t), this.pressed = !0), this._resizable.target || this._resizable.press(t), this._resizable.move(e)
            },
            end: function() {
                this._resizable.end(), this.pressed = !1
            },
            destroy: function() {
                this._resizable.destroy(), this._resizable = this._element = this.owner = null
            },
            isResizing: function() {
                return this._resizable.resizing
            },
            _createHint: function(t) {
                var n = this;
                return e("<div class='k-ghost-splitbar k-ghost-splitbar-" + n.orientation + " k-state-default' />").css(n.alternateSizingProperty, t[n.alternateSizingProperty]())
            },
            _start: function(t) {
                var n = this,
                    r = e(t.currentTarget),
                    o = r.prev(),
                    a = r.next(),
                    s = o.data(E),
                    l = a.data(E),
                    c = parseInt(o[0].style[n.positioningProperty], 10),
                    d = parseInt(a[0].style[n.positioningProperty], 10) + a[0][n.sizingDomProperty] - r[0][n.sizingDomProperty],
                    u = parseInt(n._element.css(n.sizingProperty), 10),
                    h = function(e) {
                        var t = parseInt(e, 10);
                        return (i(e) ? t : u * t / 100) || 0
                    },
                    f = h(s.min),
                    p = h(s.max) || d - c,
                    m = h(l.min),
                    g = h(l.max) || d - c;
                n.previousPane = o, n.nextPane = a, n._maxPosition = Math.min(d - m, c + p), n._minPosition = Math.max(c + f, d - g)
            },
            _max: function() {
                return this._maxPosition
            },
            _min: function() {
                return this._minPosition
            },
            _stop: function(t) {
                var n, i, o, a, s, l, c, u, h = this,
                    f = e(t.currentTarget),
                    p = h.owner;
                return p._panes().children(".k-splitter-overlay").remove(), t.keyCode !== d.keys.ESC && (n = t.position, i = f.prev(), o = f.next(), a = i.data(E), s = o.data(E), l = n - parseInt(i[0].style[h.positioningProperty], 10), c = parseInt(o[0].style[h.positioningProperty], 10) + o[0][h.sizingDomProperty] - n - f[0][h.sizingDomProperty], u = h._element.children(R).filter(function() {
                    return r(e(this).data(E).size)
                }).length, (!r(a.size) || u > 1) && (r(a.size) && u--, a.size = l + "px"), (!r(s.size) || u > 1) && (s.size = c + "px"), p.resize(!0)), !1
            }
        }
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.virtuallist.min", ["kendo.data.min"], e)
}(function() {
    return function(e, t) {
        function n(e) {
            return e[e.length - 1]
        }

        function i(e) {
            return e instanceof Array ? e : [e]
        }

        function r(e) {
            return "string" == typeof e || "number" == typeof e || "boolean" == typeof e
        }

        function o(e, t, n) {
            return Math.ceil(e * t / n)
        }

        function a(e, t, n) {
            var i = document.createElement(n || "div");
            return t && (i.className = t), e.appendChild(i), i
        }

        function s() {
            var t, n = e('<div class="k-popup"><ul class="k-list"><li class="k-item"><li></ul></div>');
            return n.css({
                position: "absolute",
                left: "-200000px",
                visibility: "hidden"
            }), n.appendTo(document.body), t = parseFloat(v.getComputedStyles(n.find(".k-item")[0], ["line-height"])["line-height"]), n.remove(), t
        }

        function l(e, t, n) {
            return {
                down: e * n,
                up: e * (t - 1 - n)
            }
        }

        function c(e, t) {
            var n = (e.listScreens - 1 - e.threshold) * t,
                i = e.threshold * t;
            return function(e, t, r) {
                return t > r ? n > t - e.top : 0 === e.top || t - e.top > i
            }
        }

        function d(e, t) {
            return function(n) {
                return t(e.scrollTop, n)
            }
        }

        function u(e) {
            return function(t, n) {
                return e(t.items, t.index, n), t
            }
        }

        function h(e, t) {
            v.support.browser.msie && 10 > v.support.browser.version ? e.style.top = t + "px" : (e.style.webkitTransform = "translateY(" + t + "px)", e.style.transform = "translateY(" + t + "px)")
        }

        function f(t, n) {
            return function(i, r) {
                for (var o = 0, a = i.length; a > o; o++) t(i[o], r[o], n), r[o].item && this.trigger(L, {
                    item: e(i[o]),
                    data: r[o].item,
                    ns: v.ui
                })
            }
        }

        function p(e, t) {
            var n;
            return t > 0 ? (n = e.splice(0, t), e.push.apply(e, n)) : (n = e.splice(t, -t), e.unshift.apply(e, n)), n
        }

        function m(n, i, r) {
            var o = r.template;
            n = e(n), i.item || (o = r.placeholderTemplate), this.angular("cleanup", function() {
                return {
                    elements: [n]
                }
            }), n.attr("data-uid", i.item ? i.item.uid : "").attr("data-offset-index", i.index).html(o(i.item || {})), n.toggleClass(M, i.current), n.toggleClass(I, i.selected), n.toggleClass("k-first", i.newGroup), n.toggleClass("k-loading-item", !i.item), 0 !== i.index && i.newGroup && e("<div class=" + F + "></div>").appendTo(n).html(r.groupTemplate(i.group)), i.top !== t && h(n[0], i.top), this.angular("compile", function() {
                return {
                    elements: [n],
                    data: [{
                        dataItem: i.item,
                        group: i.group,
                        newGroup: i.newGroup
                    }]
                }
            })
        }

        function g(e, t) {
            var n, i, r, o, a = t.length,
                s = e.length,
                l = [],
                c = [];
            if (s)
                for (r = 0; s > r; r++) {
                    for (n = e[r], i = !1, o = 0; a > o; o++)
                        if (n === t[o]) {
                            i = !0, l.push({
                                index: r,
                                item: n
                            });
                            break
                        } i || c.push(n)
                }
            return {
                changed: l,
                unchanged: c
            }
        }
        var v = window.kendo,
            _ = v.ui,
            b = _.Widget,
            w = _.DataBoundWidget,
            y = e.proxy,
            k = "k-virtual-wrap",
            x = "k-virtual-list",
            C = "k-virtual-content",
            S = "k-list",
            T = "k-group-header",
            D = "k-virtual-item",
            A = "k-item",
            E = "k-height-container",
            F = "k-group",
            I = "k-state-selected",
            M = "k-state-focused",
            R = "k-state-hover",
            P = "change",
            z = "click",
            B = "listBound",
            L = "itemChange",
            H = "activate",
            N = "deactivate",
            O = ".VirtualList",
            V = w.extend({
                init: function(t, n) {
                    var r = this;
                    r.bound(!1), r._fetching = !1, b.fn.init.call(r, t, n), r.options.itemHeight || (r.options.itemHeight = s()), n = r.options, r.element.addClass(S + " " + x).attr("role", "listbox"), r.content = r.element.wrap("<div unselectable='on' class='" + C + "'></div>").parent(), r.wrapper = r.content.wrap("<div class='" + k + "'></div>").parent(), r.header = r.content.before("<div class='" + T + "'></div>").prev(), r.element.on("mouseenter" + O, "li:not(.k-loading-item)", function() {
                        e(this).addClass(R)
                    }).on("mouseleave" + O, "li", function() {
                        e(this).removeClass(R)
                    }), r._values = i(r.options.value), r._selectedDataItems = [], r._selectedIndexes = [], r._rangesList = {}, r._activeDeferred = null, r._promisesList = [], r._optionID = v.guid(), r.setDataSource(n.dataSource), r.content.on("scroll" + O, v.throttle(function() {
                        r._renderItems(), r._triggerListBound()
                    }, n.delay)), r._selectable()
                },
                options: {
                    name: "VirtualList",
                    autoBind: !0,
                    delay: 100,
                    height: null,
                    listScreens: 4,
                    threshold: .5,
                    itemHeight: null,
                    oppositeBuffer: 1,
                    type: "flat",
                    selectable: !1,
                    value: [],
                    dataValueField: null,
                    template: "#:data#",
                    placeholderTemplate: "loading...",
                    groupTemplate: "#:data#",
                    fixedGroupTemplate: "fixed header template",
                    valueMapper: null
                },
                events: [P, z, B, L, H, N],
                setOptions: function(e) {
                    b.fn.setOptions.call(this, e), this._selectProxy && this.options.selectable === !1 ? this.element.off(z, "." + D, this._selectProxy) : !this._selectProxy && this.options.selectable && this._selectable(), this.refresh()
                },
                items: function() {
                    return e(this._items)
                },
                destroy: function() {
                    this.wrapper.off(O), this.dataSource.unbind(P, this._refreshHandler), b.fn.destroy.call(this)
                },
                setDataSource: function(t) {
                    var n, i = this,
                        r = t || {};
                    r = e.isArray(r) ? {
                        data: r
                    } : r, r = v.data.DataSource.create(r), i.dataSource ? (i.dataSource.unbind(P, i._refreshHandler), i._clean(), i.bound(!1), i._deferValueSet = !0, n = i.value(), i.value([]), i.mute(function() {
                        i.value(n)
                    })) : i._refreshHandler = e.proxy(i.refresh, i), i.dataSource = r.bind(P, i._refreshHandler), i.setDSFilter(r.filter()), 0 !== r.view().length ? i.refresh() : i.options.autoBind && r.fetch()
                },
                skip: function() {
                    return this.dataSource.currentRangeStart()
                },
                _triggerListBound: function() {
                    var e = this,
                        t = e.skip();
                    e.bound() && !e._selectingValue && e._skip !== t && (e._skip = t, e.trigger(B))
                },
                _getValues: function(t) {
                    var n = this._valueGetter;
                    return e.map(t, function(e) {
                        return n(e)
                    })
                },
                refresh: function(e) {
                    var t, n = this,
                        i = e && e.action,
                        r = "itemchange" === i,
                        o = this.isFiltered();
                    n._mute || (n._deferValueSet = !1, n._fetching ? (n._renderItems && n._renderItems(!0), n._triggerListBound()) : (o && n.focus(0), n._createList(), i || !n._values.length || o || n.options.skipUpdateOnBind ? (n.bound(!0), n._triggerListBound()) : (n._selectingValue = !0, n.value(n._values, !0).done(function() {
                        n.bound(!0), n._selectingValue = !1, n._triggerListBound()
                    }))), (r || "remove" === i) && (t = g(n._selectedDataItems, e.items), t.changed.length && (r ? n.trigger("selectedItemChange", {
                        items: t.changed
                    }) : n.value(n._getValues(t.unchanged)))), n._fetching = !1)
                },
                removeAt: function(e) {
                    return this._selectedIndexes.splice(e, 1), this._values.splice(e, 1), {
                        position: e,
                        dataItem: this._selectedDataItems.splice(e, 1)[0]
                    }
                },
                setValue: function(e) {
                    this._values = i(e)
                },
                value: function(n, r) {
                    var o = this;
                    return n === t ? o._values.slice() : (null === n && (n = []), n = i(n), "multiple" === o.options.selectable && o.select().length && n.length && o.select(-1), o._valueDeferred && "resolved" !== o._valueDeferred.state() || (o._valueDeferred = e.Deferred()), n.length || o.select(-1), o._values = n, (o.bound() && !o._mute && !o._deferValueSet || r) && o._prefetchByValue(n), o._valueDeferred)
                },
                _prefetchByValue: function(e) {
                    var n, o, a, s = this,
                        l = s._dataView,
                        c = s._valueGetter,
                        d = !1,
                        u = [];
                    for (o = 0; e.length > o; o++)
                        for (a = 0; l.length > a; a++) n = l[a].item, n && (d = r(n) ? e[o] === n : e[o] === c(n), d && u.push(l[a].index));
                    if (u.length === e.length) return s._values = [], s.select(u), t;
                    if ("function" != typeof s.options.valueMapper) throw Error("valueMapper is not provided");
                    s.options.valueMapper({
                        value: "multiple" === this.options.selectable ? e : e[0],
                        success: function(e) {
                            s._values = [], s._selectedIndexes = [], s._selectedDataItems = [], e = i(e), e.length || (e = [-1]), s.select(e)
                        }
                    })
                },
                deferredRange: function(t) {
                    var n = this.dataSource,
                        i = this.itemCount,
                        r = this._rangesList,
                        o = e.Deferred(),
                        a = [],
                        s = Math.floor(t / i) * i,
                        l = Math.ceil(t / i) * i,
                        c = l === s ? [l] : [s, l];
                    return e.each(c, function(t, o) {
                        var s, l = o + i,
                            c = r[o];
                        c && c.end === l ? s = c.deferred : (s = e.Deferred(), r[o] = {
                            end: l,
                            deferred: s
                        }, n._multiplePrefetch(o, i, function() {
                            s.resolve()
                        })), a.push(s)
                    }), e.when.apply(e, a).then(function() {
                        o.resolve()
                    }), o
                },
                prefetch: function(t) {
                    var n = this,
                        i = this.itemCount,
                        r = !n._promisesList.length;
                    return n._activeDeferred || (n._activeDeferred = e.Deferred(), n._promisesList = []), e.each(t, function(e, t) {
                        var r = Math.floor(t / i) * i;
                        n._promisesList.push(n.deferredRange(r))
                    }), r && e.when.apply(e, n._promisesList).done(function() {
                        n._activeDeferred.resolve(), n._activeDeferred = null, n._promisesList = []
                    }), n._activeDeferred
                },
                _findDataItem: function(e) {
                    var t, n, i = this.dataSource.view();
                    if ("group" === this.options.type)
                        for (n = 0; i.length > n; n++) {
                            if (t = i[n].items, !(e >= t.length)) return t[e];
                            e -= t.length
                        }
                    return i[e]
                },
                selectedDataItems: function() {
                    return this._selectedDataItems.slice()
                },
                scrollTo: function(e) {
                    this.content.scrollTop(e)
                },
                scrollToIndex: function(e) {
                    this.scrollTo(e * this.options.itemHeight)
                },
                focus: function(i) {
                    var r, o, a, s, l, c, d = this.options.itemHeight,
                        u = this._optionID,
                        h = !0;
                    if (i === t) return s = this.element.find("." + M), s.length ? s : null;
                    if ("function" == typeof i)
                        for (a = this.dataSource.flatView(), l = 0; a.length > l; l++)
                            if (i(a[l])) {
                                i = l;
                                break
                            } return i instanceof Array && (i = n(i)), isNaN(i) ? (r = e(i), o = parseInt(e(r).attr("data-offset-index"), 10)) : (o = i, r = this._getElementByIndex(o)), -1 === o ? (this.element.find("." + M).removeClass(M), this._focusedIndex = t, t) : (r.length ? (r.hasClass(M) && (h = !1), this._focusedIndex !== t && (s = this._getElementByIndex(this._focusedIndex), s.removeClass(M).removeAttr("id"), h && this.trigger(N)), this._focusedIndex = o, r.addClass(M).attr("id", u), c = this._getElementLocation(o), "top" === c ? this.scrollTo(o * d) : "bottom" === c ? this.scrollTo(o * d + d - this.screenHeight) : "outScreen" === c && this.scrollTo(o * d), h && this.trigger(H)) : (this._focusedIndex = o, this.items().removeClass(M), this.scrollToIndex(o)), t)
                },
                focusIndex: function() {
                    return this._focusedIndex
                },
                focusFirst: function() {
                    this.scrollTo(0), this.focus(0)
                },
                focusLast: function() {
                    var e = this.dataSource.total();
                    this.scrollTo(this.heightContainer.offsetHeight), this.focus(e)
                },
                focusPrev: function() {
                    var e, t = this._focusedIndex;
                    return !isNaN(t) && t > 0 ? (t -= 1, this.focus(t), e = this.focus(), e && e.hasClass("k-loading-item") && (t += 1, this.focus(t)), t) : (t = this.dataSource.total() - 1, this.focus(t), t)
                },
                focusNext: function() {
                    var e, t = this._focusedIndex,
                        n = this.dataSource.total() - 1;
                    return !isNaN(t) && n > t ? (t += 1, this.focus(t), e = this.focus(), e && e.hasClass("k-loading-item") && (t -= 1, this.focus(t)), t) : (t = 0, this.focus(t), t)
                },
                _triggerChange: function(e, t) {
                    e = e || [], t = t || [], (e.length || t.length) && this.trigger(P, {
                        removed: e,
                        added: t
                    })
                },
                select: function(e) {
                    var i, r, o, a, s, l = this,
                        c = "multiple" !== l.options.selectable,
                        d = !!l._activeDeferred,
                        u = this.isFiltered(),
                        h = [];
                    return e === t ? l._selectedIndexes.slice() : (i = l._getIndecies(e), r = c && !u && n(i) === n(this._selectedIndexes), h = l._deselectCurrentValues(i), h.length || !i.length || r ? (l._triggerChange(h), l._valueDeferred && l._valueDeferred.resolve(), t) : (1 === i.length && -1 === i[0] && (i = []), a = l._deselect(i), h = a.removed, i = a.indices, c && (l._activeDeferred = null, d = !1, i.length && (i = [n(i)])), s = function() {
                        var e = l._select(i);
                        l.focus(i), l._triggerChange(h, e), l._valueDeferred && l._valueDeferred.resolve()
                    }, o = l.prefetch(i), d || (o ? o.done(s) : s()), t))
                },
                bound: function(e) {
                    return e === t ? this._listCreated : (this._listCreated = e, t)
                },
                mute: function(e) {
                    this._mute = !0, y(e(), this), this._mute = !1
                },
                setDSFilter: function(t) {
                    this._lastDSFilter = e.extend({}, t)
                },
                isFiltered: function() {
                    return this._lastDSFilter || this.setDSFilter(this.dataSource.filter()), !v.data.Query.compareFilters(this.dataSource.filter(), this._lastDSFilter)
                },
                skipUpdate: e.noop,
                _getElementByIndex: function(t) {
                    return this.items().filter(function(n, i) {
                        return t === parseInt(e(i).attr("data-offset-index"), 10)
                    })
                },
                _clean: function() {
                    this.result = t, this._lastScrollTop = t, this._skip = t, e(this.heightContainer).remove(), this.heightContainer = t, this.element.empty()
                },
                _height: function() {
                    var e = !!this.dataSource.view().length,
                        t = this.options.height,
                        n = this.options.itemHeight,
                        i = this.dataSource.total();
                    return e ? t / n > i && (t = i * n) : t = 0, t
                },
                _screenHeight: function() {
                    var e = this._height(),
                        t = this.content;
                    t.height(e), this.screenHeight = e
                },
                _getElementLocation: function(e) {
                    var t, n = this.content.scrollTop(),
                        i = this.screenHeight,
                        r = this.options.itemHeight,
                        o = e * r,
                        a = o + r,
                        s = n + i;
                    return t = o === n - r || a > n && n > o ? "top" : o === s || s > o && a > s ? "bottom" : o >= n && n + (i - r) >= o ? "inScreen" : "outScreen"
                },
                _templates: function() {
                    var e, t = {
                        template: this.options.template,
                        placeholderTemplate: this.options.placeholderTemplate,
                        groupTemplate: this.options.groupTemplate,
                        fixedGroupTemplate: this.options.fixedGroupTemplate
                    };
                    for (e in t) "function" != typeof t[e] && (t[e] = v.template(t[e]));
                    this.templates = t
                },
                _generateItems: function(e, t) {
                    for (var n, i = [], r = this.options.itemHeight + "px"; t-- > 0;) n = document.createElement("li"), n.tabIndex = -1, n.className = D + " " + A, n.setAttribute("role", "option"), n.style.height = r, n.style.minHeight = r, e.appendChild(n), i.push(n);
                    return i
                },
                _saveInitialRanges: function() {
                    var t, n = this.dataSource._ranges,
                        i = e.Deferred();
                    for (i.resolve(), this._rangesList = {}, t = 0; n.length > t; t++) this._rangesList[n[t].start] = {
                        end: n[t].end,
                        deferred: i
                    }
                },
                _createList: function() {
                    var t = this,
                        n = t.content.get(0),
                        i = t.options,
                        r = t.dataSource;
                    t.bound() && t._clean(), t._saveInitialRanges(), t._screenHeight(), t._buildValueGetter(), t.itemCount = o(t.screenHeight, i.listScreens, i.itemHeight), t.itemCount > r.total() && (t.itemCount = r.total()), t._templates(), t._items = t._generateItems(t.element[0], t.itemCount), t._setHeight(i.itemHeight * r.total()), t.options.type = (r.group() || []).length ? "group" : "flat", "flat" === t.options.type ? t.header.hide() : t.header.show(), t.getter = t._getter(function() {
                        t._renderItems(!0)
                    }), t._onScroll = function(e, n) {
                        var i = t._listItems(t.getter);
                        return t._fixedHeader(e, i(e, n))
                    }, t._renderItems = t._whenChanged(d(n, t._onScroll), u(t._reorderList(t._items, e.proxy(m, t)))), t._renderItems(), t._calculateGroupPadding(t.screenHeight)
                },
                _setHeight: function(e) {
                    var t, n, i = this.heightContainer;
                    if (i ? t = i.offsetHeight : i = this.heightContainer = a(this.content[0], E), e !== t)
                        for (i.innerHTML = ""; e > 0;) n = Math.min(e, 25e4), a(i).style.height = n + "px", e -= n
                },
                _getter: function() {
                    var e = null,
                        t = this.dataSource,
                        n = t.skip(),
                        i = this.options.type,
                        r = this.itemCount,
                        o = {};
                    return t.pageSize() < r && this.mute(function() {
                        t.pageSize(r)
                    }),
                        function(a, s) {
                            var l, c, d, u, h, f, p, m, g = this;
                            if (t.inRange(s, r)) {
                                if (n !== s && this.mute(function() {
                                    t.range(s, r), n = s
                                }), "group" === i) {
                                    if (!o[s])
                                        for (c = o[s] = [], d = t.view(), u = 0, h = d.length; h > u; u++)
                                            for (f = d[u], p = 0, m = f.items.length; m > p; p++) c.push({
                                                item: f.items[p],
                                                group: f.value
                                            });
                                    l = o[s][a - s]
                                } else l = t.view()[a - s];
                                return l
                            }
                            return e !== s && (e = s, n = s, g._getterDeferred && g._getterDeferred.reject(), g._getterDeferred = g.deferredRange(s), g._getterDeferred.then(function() {
                                var e = g._indexConstraint(g.content[0].scrollTop);
                                g._getterDeferred = null, e >= s && s + r >= e && (g._fetching = !0, t.range(s, r))
                            })), null
                        }
                },
                _fixedHeader: function(e, t) {
                    var n, i = this.currentVisibleGroup,
                        r = this.options.itemHeight,
                        o = Math.floor((e - t.top) / r),
                        a = t.items[o];
                    return a && a.item && (n = a.group, n !== i && (this.header[0].innerHTML = n || "", this.currentVisibleGroup = n)), t
                },
                _itemMapper: function(e, t, n) {
                    var i, o = this.options.type,
                        a = this.options.itemHeight,
                        s = this._focusedIndex,
                        l = !1,
                        c = !1,
                        d = !1,
                        u = null,
                        h = !1,
                        f = this._valueGetter;
                    if ("group" === o && (e && (d = 0 === t || this._currentGroup && this._currentGroup !== e.group, this._currentGroup = e.group), u = e ? e.group : null, e = e ? e.item : null), !this.isFiltered() && n.length && e)
                        for (i = 0; n.length > i; i++)
                            if (h = r(e) ? n[i] === e : n[i] === f(e)) {
                                n.splice(i, 1), l = !0;
                                break
                            } return s === t && (c = !0), {
                        item: e ? e : null,
                        group: u,
                        newGroup: d,
                        selected: l,
                        current: c,
                        index: t,
                        top: t * a
                    }
                },
                _range: function(e) {
                    var t, n, i, r = this.itemCount,
                        o = this._values.slice(),
                        a = [];
                    for (this._view = {}, this._currentGroup = null, n = e, i = e + r; i > n; n++) t = this._itemMapper(this.getter(n, e), n, o), a.push(t), this._view[t.index] = t;
                    return this._dataView = a, a
                },
                _getDataItemsCollection: function(e, t) {
                    var n = this._range(this._listIndex(e, t));
                    return {
                        index: n.length ? n[0].index : 0,
                        top: n.length ? n[0].top : 0,
                        items: n
                    }
                },
                _listItems: function() {
                    var t = this.screenHeight,
                        n = this.options,
                        i = c(n, t);
                    return e.proxy(function(e, t) {
                        var n = this.result,
                            r = this._lastScrollTop;
                        return !t && n && i(n, e, r) || (n = this._getDataItemsCollection(e, r)), this._lastScrollTop = e, this.result = n, n
                    }, this)
                },
                _whenChanged: function(e, t) {
                    var n;
                    return function(i) {
                        var r = e(i);
                        r !== n && (n = r, t(r, i))
                    }
                },
                _reorderList: function(t, n) {
                    var i = this,
                        r = t.length,
                        o = -(1 / 0);
                    return n = e.proxy(f(n, this.templates), this),
                        function(e, a, s) {
                            var l, c, d = a - o;
                            s || Math.abs(d) >= r ? (l = t, c = e) : (l = p(t, d), c = d > 0 ? e.slice(-d) : e.slice(0, -d)), n(l, c, i.bound()), o = a
                        }
                },
                _bufferSizes: function() {
                    var e = this.options;
                    return l(this.screenHeight, e.listScreens, e.oppositeBuffer)
                },
                _indexConstraint: function(e) {
                    var t = this.itemCount,
                        n = this.options.itemHeight,
                        i = this.dataSource.total();
                    return Math.min(Math.max(i - t, 0), Math.max(0, Math.floor(e / n)))
                },
                _listIndex: function(e, t) {
                    var n, i = this._bufferSizes();
                    return n = e - (e > t ? i.down : i.up), this._indexConstraint(n)
                },
                _selectable: function() {
                    this.options.selectable && (this._selectProxy = e.proxy(this, "_clickHandler"), this.element.on(z + O, "." + D, this._selectProxy))
                },
                _getIndecies: function(e) {
                    var t, n, i = [];
                    if ("function" == typeof e)
                        for (t = this.dataSource.flatView(), n = 0; t.length > n; n++)
                            if (e(t[n])) {
                                i.push(n);
                                break
                            } return "number" == typeof e && i.push(e), e instanceof jQuery && (e = parseInt(e.attr("data-offset-index"), 10), isNaN(e) || i.push(e)), e instanceof Array && (i = e), i
                },
                _deselect: function(n) {
                    var i, r, o, a, s, l = [],
                        c = this._selectedIndexes,
                        d = 0,
                        u = this.options.selectable,
                        h = 0;
                    if (n = n.slice(), u !== !0 && n.length) {
                        if ("multiple" === u)
                            for (s = 0; n.length > s; s++)
                                if (d = e.inArray(n[s], c), i = c[d], i !== t) {
                                    if (o = this._getElementByIndex(i), !o.hasClass("k-state-selected")) continue;
                                    o.removeClass(I), this._values.splice(d, 1), this._selectedIndexes.splice(d, 1), r = this._selectedDataItems.splice(d, 1)[0], n.splice(s, 1), l.push({
                                        index: i,
                                        position: d + h,
                                        dataItem: r
                                    }), h++, s--
                                }
                    } else {
                        for (a = 0; c.length > a; a++) c[a] !== t && (this._getElementByIndex(c[a]).removeClass(I), l.push({
                            index: c[a],
                            position: a,
                            dataItem: this._selectedDataItems[a]
                        }));
                        this._values = [], this._selectedDataItems = [], this._selectedIndexes = []
                    }
                    return {
                        indices: n,
                        removed: l
                    }
                },
                _deselectCurrentValues: function(t) {
                    var n, i, r, o, a = this.element[0].children,
                        s = this._values,
                        l = [],
                        c = 0;
                    if ("multiple" !== this.options.selectable || !this.isFiltered()) return [];
                    for (; t.length > c; c++) {
                        for (r = -1, i = t[c], n = this._valueGetter(this._view[i].item), o = 0; s.length > o; o++)
                            if (n == s[o]) {
                                r = o;
                                break
                            } r > -1 && (l.push(this.removeAt(r)), e(a[i]).removeClass("k-state-selected"))
                    }
                    return l
                },
                _select: function(t) {
                    var n, i, o = this,
                        a = "multiple" !== this.options.selectable,
                        s = this.dataSource,
                        l = this.itemCount,
                        c = this._valueGetter,
                        d = [];
                    return a && (o._selectedIndexes = [], o._selectedDataItems = [], o._values = []), i = s.skip(), e.each(t, function(e, t) {
                        var a = l > t ? 1 : Math.floor(t / l) + 1,
                            u = (a - 1) * l;
                        o.mute(function() {
                            s.range(u, l), n = o._findDataItem([t - u]), o._selectedIndexes.push(t), o._selectedDataItems.push(n), o._values.push(r(n) ? n : c(n)), d.push({
                                index: t,
                                dataItem: n
                            }), o._getElementByIndex(t).addClass(I), s.range(i, l)
                        })
                    }), d
                },
                _clickHandler: function(t) {
                    var n = e(t.currentTarget);
                    !t.isDefaultPrevented() && n.attr("data-uid") && this.trigger(z, {
                        item: n
                    })
                },
                _buildValueGetter: function() {
                    this._valueGetter = v.getter(this.options.dataValueField)
                },
                _calculateGroupPadding: function(e) {
                    var t = this.items().first(),
                        n = this.header,
                        i = 0;
                    n[0] && "none" !== n[0].style.display && ("auto" !== e && (i = v.support.scrollbar()), i += parseFloat(t.css("border-right-width"), 10) + parseFloat(t.children(".k-group").css("right"), 10), n.css("padding-right", i))
                }
            });
        v.ui.VirtualList = V, v.ui.plugin(V)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.scheduler.view.min", ["kendo.core.min"], e)
}(function() {
    return function(e) {
        function t(e, t) {
            function n(e, r) {
                var o, a;
                if (r = r[t])
                    for (o = i[e] = i[e] || [], a = 0; r.length > a; a++) o.push(r[a]), n(e + 1, r[a])
            }
            var i = [];
            return n(0, e), i
        }

        function n() {
            return F.support.cssBorderSpacing ? "" : 'cellspacing="0"'
        }

        function i(t, i) {
            return t.length ? "<table " + n() + ' class="' + e.trim("k-scheduler-table " + (i || "")) + '"><tr>' + t.join("</tr><tr>") + "</tr></table>" : ""
        }

        function r(e, t) {
            return e.length ? "<div style='position:relative'>" + i(e, t) + "</div>" : ""
        }

        function o(t, n, r) {
            var o, a = [];
            if (r > 0)
                for (o = 0; t > o; o++) a.push("<th>&nbsp;</th>");
            return n && a.push('<th class="k-scheduler-times-all-day">' + n.text + "</th>"), 1 > r ? e() : e('<div class="k-scheduler-times">' + i(a) + "</div>")
        }

        function a(t, n, o) {
            var a, s, l, c, d, u, h, f, p, m, g = [];
            for (s = 0; t.length > s; s++) {
                for (l = t[s], c = [], d = n / l.length, a = 0; l.length > a; a++) u = l[a], c.push('<th colspan="' + (u.colspan || d) + '" class="' + (u.className || "") + '">' + u.text + "</th>");
                g.push(c.join(""))
            }
            if (h = [], o) {
                for (f = t[t.length - 1], p = [], m = o.cellContent, a = 0; f.length > a; a++) p.push('<td class="' + (f[a].className || "") + '">' + (m ? m(a) : "&nbsp;") + "</th>");
                h.push(p.join(""))
            }
            return e('<div class="k-scheduler-header k-state-default"><div class="k-scheduler-header-wrap">' + i(g) + r(h, "k-scheduler-header-all-day") + "</div></div>")
        }

        function s(t, n) {
            var r, o, a, s, l, c = Array(n).join().split(","),
                d = [];
            for (o = 0; t.length > o; o++)
                for (a = t[o], s = n / a.length, r = 0; a.length > r; r++) l = a[r].className || "", a[r].allDay && (l = "k-scheduler-times-all-day"), c[s * r] += '<th class="' + l + '" rowspan="' + s + '">' + a[r].text + "</th>";
            for (r = 0; n > r; r++) d.push(c[r]);
            return 1 > n ? e() : e('<div class="k-scheduler-times">' + i(d) + "</div>")
        }

        function l() {
            return e('<div class="k-scheduler-content"><table ' + n() + ' class="k-scheduler-table"/></div>')
        }

        function c() {
            return D = D ? D : F.support.scrollbar()
        }

        function d(e, t, n) {
            var i, r, o, a, s;
            for (i = e.length - 1; i >= 0; i--) r = u(e[i]), o = r.start, s = r.end, a = t >= o && s >= t, (a || o >= t && n >= s || o >= t && n >= o) && (t > o && (t = o), s > n && (n = s));
            return h(e, t, n)
        }

        function u(e) {
            return {
                start: e.start,
                end: e.end
            }
        }

        function h(e, t, n) {
            var i, r, o = [];
            for (i = 0; e.length > i; i++) r = u(e[i]), (t > r.start && r.end > t || r.start >= t && n >= r.end) && o.push(e[i]);
            return o
        }

        function f(e) {
            return m(e)
        }

        function p(e) {
            return m(e)
        }

        function m(e) {
            var t, n, i, r, o, a, s, l = [];
            for (t = 0; e.length > t; t++) {
                for (n = e[t], i = u(n), r = null, o = 0, a = l.length; a > o; o++)
                    if (s = i.start > l[o].end, l[o].start > i.start || s) {
                        r = l[o], i.end > r.end && (r.end = i.end);
                        break
                    } r || (r = {
                    start: i.start,
                    end: i.end,
                    events: []
                }, l.push(r)), r.events.push(n)
            }
            return l
        }

        function g(e, t, n, i) {
            var r, o, a, s, l = t[0];
            if (l) {
                for (r = [], o = l.dataSource.view(), a = 0; o.length > a; a++) s = {
                    text: i({
                        text: F.htmlEncode(F.getter(l.dataTextField)(o[a])),
                        color: F.getter(l.dataColorField)(o[a]),
                        field: l.field,
                        title: l.title,
                        name: l.name,
                        value: F.getter(l.dataValueField)(o[a])
                    }),
                    className: "k-slot-cell"
                }, s[e] = g(e, t.slice(1), n, i), r.push(s);
                return r
            }
            return n
        }

        function v(t) {
            return function(n) {
                if (e.isArray(n) || n instanceof F.data.ObservableArray) {
                    for (var i = 0; n.length > i; i++)
                        if (n[i] == t) return !0;
                    return !1
                }
                return n == t
            }
        }

        function _(e) {
            e.className = e.className.replace(E, "") + " k-state-selected"
        }
        var b, w, y, k, x, C, S, T, D, A, E, F = window.kendo,
            I = F.ui,
            M = I.Widget,
            R = F.keys,
            P = ".kendoSchedulerView",
            z = Math,
            B = '<div class="k-marquee k-scheduler-marquee"><div class="k-marquee-color"></div><div class="k-marquee-text"><div class="k-label-top"></div><div class="k-label-bottom"></div></div></div>';
        F.ui.scheduler = {}, b = F.Class.extend({
            init: function(e, t) {
                this._index = e, this._timeSlotCollections = [], this._daySlotCollections = [], this._isRtl = t
            },
            addTimeSlotCollection: function(e, t) {
                return this._addCollection(e, t, this._timeSlotCollections)
            },
            addDaySlotCollection: function(e, t) {
                return this._addCollection(e, t, this._daySlotCollections)
            },
            _addCollection: function(e, t, n) {
                var i = new x(e, t, this._index, n.length);
                return n.push(i), i
            },
            timeSlotCollectionCount: function() {
                return this._timeSlotCollections.length
            },
            daySlotCollectionCount: function() {
                return this._daySlotCollections.length
            },
            daySlotByPosition: function(e, t) {
                return this._slotByPosition(e, t, this._daySlotCollections)
            },
            timeSlotByPosition: function(e, t) {
                return this._slotByPosition(e, t, this._timeSlotCollections)
            },
            _slotByPosition: function(e, t, n) {
                var i, r, o, a, s, l, c, d, u;
                for (i = 0; n.length > i; i++)
                    for (r = n[i], o = 0; o < r.count(); o++)
                        if (a = r.at(o), s = a.offsetWidth, l = a.offsetHeight, c = a.offsetLeft + s, d = a.offsetTop + l, u = r.at(o + 1), u && (u.offsetLeft != a.offsetLeft ? c = this._isRtl ? a.offsetLeft + (a.offsetLeft - u.offsetLeft) : u.offsetLeft : d = u.offsetTop), e >= a.offsetLeft && c > e && t >= a.offsetTop && d > t) return a
            },
            refresh: function() {
                var e;
                for (e = 0; this._daySlotCollections.length > e; e++) this._daySlotCollections[e].refresh();
                for (e = 0; this._timeSlotCollections.length > e; e++) this._timeSlotCollections[e].refresh()
            },
            timeSlotRanges: function(e, t) {
                var n, i = this._timeSlotCollections,
                    r = this._startSlot(e, i);
                return !r.inRange && e >= r.slot.end && (r = null), n = r, t > e && (n = this._endSlot(t, i)), n && !n.inRange && n.slot.start >= t && (n = null), null === r && null === n ? [] : (null === r && (r = {
                    inRange: !0,
                    slot: i[n.slot.collectionIndex].first()
                }), null === n && (n = {
                    inRange: !0,
                    slot: i[r.slot.collectionIndex].last()
                }), this._continuousRange(y, i, r, n))
            },
            daySlotRanges: function(e, t, n) {
                var i, r = this._daySlotCollections,
                    o = this._startSlot(e, r, n);
                if (!o.inRange && e >= o.slot.end && (o = null), i = o, t > e && (i = this._endSlot(t, r, n)), i && !i.inRange && i.slot.start >= t && (i = null), null === o && null === i) return [];
                if (null === o)
                    do e += F.date.MS_PER_DAY, o = this._startSlot(e, r, n); while (!o.inRange && e >= o.slot.end);
                if (null === i)
                    do t -= F.date.MS_PER_DAY, i = this._endSlot(t, r, n); while (!i.inRange && i.slot.start >= t);
                return this._continuousRange(k, r, o, i)
            },
            _continuousRange: function(e, t, n, i) {
                var r, o, a, s, l, c, d = n.slot,
                    u = i.slot,
                    h = d.collectionIndex,
                    f = u.collectionIndex,
                    p = [];
                for (r = h; f >= r; r++) o = t[r], a = o.first(), s = o.last(), l = !1, c = !1, r == h && (c = !n.inRange), r == f && (l = !i.inRange), d.start > a.start && (a = d), s.start > u.start && (s = u), f > h && (r == h ? l = !0 : r == f ? c = !0 : l = c = !0), p.push(new e({
                    start: a,
                    end: s,
                    collection: o,
                    head: l,
                    tail: c
                }));
                return p
            },
            slotRanges: function(e, t) {
                var n = e._startTime || F.date.toUtcTime(e.start),
                    i = e._endTime || F.date.toUtcTime(e.end);
                return void 0 === t && (t = e.isMultiDay()), t ? this.daySlotRanges(n, i, e.isAllDay) : this.timeSlotRanges(n, i)
            },
            ranges: function(e, t, n, i) {
                return "number" != typeof e && (e = F.date.toUtcTime(e)), "number" != typeof t && (t = F.date.toUtcTime(t)), n ? this.daySlotRanges(e, t, i) : this.timeSlotRanges(e, t)
            },
            _startCollection: function(e, t) {
                var n, i;
                for (n = 0; t.length > n; n++)
                    if (i = t[n], i.startInRange(e)) return i;
                return null
            },
            _endCollection: function(e, t, n) {
                var i, r;
                for (i = 0; t.length > i; i++)
                    if (r = t[i], r.endInRange(e, n)) return r;
                return null
            },
            _getCollections: function(e) {
                return e ? this._daySlotCollections : this._timeSlotCollections
            },
            continuousSlot: function(e, t) {
                var n = t ? -1 : 1,
                    i = this._getCollections(e.isDaySlot),
                    r = i[e.collectionIndex + n];
                return r ? r[t ? "last" : "first"]() : void 0
            },
            firstSlot: function() {
                var e = this._getCollections(this.daySlotCollectionCount());
                return e[0].first()
            },
            lastSlot: function() {
                var e = this._getCollections(this.daySlotCollectionCount());
                return e[e.length - 1].last()
            },
            upSlot: function(e, t) {
                var n = this,
                    i = function(e, i, r) {
                        var o = 0 === r;
                        return !t && !e && o && n.daySlotCollectionCount() ? n._daySlotCollections[0].at(i) : void 0
                    };
                return this.timeSlotCollectionCount() || (t = !0), this._verticalSlot(e, -1, i)
            },
            downSlot: function(e, t) {
                var n = this,
                    i = function(e, i, r) {
                        return !t && e && n.timeSlotCollectionCount() ? n._timeSlotCollections[r].at(0) : void 0
                    };
                return this.timeSlotCollectionCount() || (t = !0), this._verticalSlot(e, 1, i)
            },
            leftSlot: function(e) {
                return this._horizontalSlot(e, -1)
            },
            rightSlot: function(e) {
                return this._horizontalSlot(e, 1)
            },
            _horizontalSlot: function(e, t) {
                var n, i = e.index,
                    r = e.isDaySlot,
                    o = e.collectionIndex,
                    a = this._getCollections(r);
                return r ? i += t : o += t, n = a[o], n ? n.at(i) : void 0
            },
            _verticalSlot: function(e, t, n) {
                var i, r = e.index,
                    o = e.isDaySlot,
                    a = e.collectionIndex,
                    s = this._getCollections(o);
                return (e = n(o, a, r)) ? e : (o ? a += t : r += t, i = s[a], i ? i.at(r) : void 0)
            },
            _collection: function(e, t) {
                var n = t ? this._daySlotCollections : this._timeSlotCollections;
                return n[e]
            },
            _startSlot: function(e, t, n) {
                var i, r = this._startCollection(e, t),
                    o = !0;
                return r || (r = t[0], o = !1), i = r.slotByStartDate(e, n), i || (i = r.first(), o = !1), {
                    slot: i,
                    inRange: o
                }
            },
            _endSlot: function(e, t, n) {
                var i, r = this._endCollection(e, t, n),
                    o = !0;
                return r || (r = t[t.length - 1], o = !1), i = r.slotByEndDate(e, n), i || (i = r.last(), o = !1), {
                    slot: i,
                    inRange: o
                }
            },
            getSlotCollection: function(e, t) {
                return this[t ? "getDaySlotCollection" : "getTimeSlotCollection"](e)
            },
            getTimeSlotCollection: function(e) {
                return this._timeSlotCollections[e]
            },
            getDaySlotCollection: function(e) {
                return this._daySlotCollections[e]
            }
        }), w = F.Class.extend({
            init: function(t) {
                e.extend(this, t)
            },
            innerHeight: function() {
                var e, t = this.collection,
                    n = this.start.index,
                    i = this.end.index,
                    r = 0;
                for (e = n; i >= e; e++) r += t.at(e).offsetHeight;
                return r
            },
            events: function() {
                return this.collection.events()
            },
            addEvent: function(e) {
                this.events().push(e)
            },
            startSlot: function() {
                return this.start.offsetLeft > this.end.offsetLeft ? this.end : this.start
            },
            endSlot: function() {
                return this.start.offsetLeft > this.end.offsetLeft ? this.start : this.end
            }
        }), y = w.extend({
            innerHeight: function() {
                var e, t = this.collection,
                    n = this.start.index,
                    i = this.end.index,
                    r = 0;
                for (e = n; i >= e; e++) r += t.at(e).offsetHeight;
                return r
            },
            outerRect: function(e, t, n) {
                return this._rect("offset", e, t, n)
            },
            _rect: function(e, t, n, i) {
                var r, o, a, s, l, c, d, u, h = this.start,
                    f = this.end,
                    p = F.support.isRtl(h.element);
                return "number" != typeof t && (t = F.date.toUtcTime(t)), "number" != typeof n && (n = F.date.toUtcTime(n)), i ? (r = h.offsetTop, o = f.offsetTop + f[e + "Height"], p ? (a = f.offsetLeft, s = h.offsetLeft + h[e + "Width"]) : (a = h.offsetLeft, s = f.offsetLeft + f[e + "Width"])) : (l = t - h.start, 0 > l && (l = 0), c = h.end - h.start, r = h.offsetTop + h[e + "Height"] * l / c, d = f.end - n, 0 > d && (d = 0), u = f.end - f.start, o = f.offsetTop + f[e + "Height"] - f[e + "Height"] * d / u, p ? (a = Math.round(f.offsetLeft + f[e + "Width"] * d / u), s = Math.round(h.offsetLeft + h[e + "Width"] - h[e + "Width"] * l / c)) : (a = Math.round(h.offsetLeft + h[e + "Width"] * l / c), s = Math.round(f.offsetLeft + f[e + "Width"] - f[e + "Width"] * d / u))), {
                    top: r,
                    bottom: o,
                    left: 0 === a ? a : a + 1,
                    right: s
                }
            },
            innerRect: function(e, t, n) {
                return this._rect("client", e, t, n)
            }
        }), k = w.extend({
            innerWidth: function() {
                var e, t = this.collection,
                    n = this.start.index,
                    i = this.end.index,
                    r = 0,
                    o = n !== i ? "offsetWidth" : "clientWidth";
                for (e = n; i >= e; e++) r += t.at(e)[o];
                return r
            }
        }), x = F.Class.extend({
            init: function(e, t, n, i) {
                this._slots = [], this._events = [], this._start = F.date.toUtcTime(e), this._end = F.date.toUtcTime(t), this._groupIndex = n, this._collectionIndex = i
            },
            refresh: function() {
                for (var e = 0; this._slots.length > e; e++) this._slots[e].refresh()
            },
            startInRange: function(e) {
                return e >= this._start && this._end > e
            },
            endInRange: function(e, t) {
                var n = t ? this._end > e : this._end >= e;
                return e >= this._start && n
            },
            slotByStartDate: function(e) {
                var t, n, i = e;
                for ("number" != typeof i && (i = F.date.toUtcTime(e)), t = 0; this._slots.length > t; t++)
                    if (n = this._slots[t], n.startInRange(i)) return n;
                return null
            },
            slotByEndDate: function(e, t) {
                var n, i, r = e;
                if ("number" != typeof r && (r = F.date.toUtcTime(e)), t) return this.slotByStartDate(e, !1);
                for (n = 0; this._slots.length > n; n++)
                    if (i = this._slots[n], i.endInRange(r)) return i;
                return null
            },
            count: function() {
                return this._slots.length
            },
            events: function() {
                return this._events
            },
            addTimeSlot: function(e, t, n, i) {
                var r = new S(e, t, n, this._groupIndex, this._collectionIndex, this._slots.length, i);
                this._slots.push(r)
            },
            addDaySlot: function(e, t, n, i) {
                var r = new T(e, t, n, this._groupIndex, this._collectionIndex, this._slots.length, i);
                this._slots.push(r)
            },
            first: function() {
                return this._slots[0]
            },
            last: function() {
                return this._slots[this._slots.length - 1]
            },
            at: function(e) {
                return this._slots[e]
            }
        }), C = F.Class.extend({
            init: function(e, t, n, i, r, o) {
                this.element = e, this.clientWidth = e.clientWidth, this.clientHeight = e.clientHeight, this.offsetWidth = e.offsetWidth, this.offsetHeight = e.offsetHeight, this.offsetTop = e.offsetTop, this.offsetLeft = e.offsetLeft, this.start = t, this.end = n, this.element = e, this.groupIndex = i, this.collectionIndex = r, this.index = o, this.isDaySlot = !1
            },
            startDate: function() {
                return F.timezone.toLocalDate(this.start)
            },
            endDate: function() {
                return F.timezone.toLocalDate(this.end)
            },
            startInRange: function(e) {
                return e >= this.start && this.end > e
            },
            endInRange: function(e) {
                return e > this.start && this.end >= e
            },
            startOffset: function() {
                return this.start
            },
            endOffset: function() {
                return this.end
            }
        }), S = C.extend({
            init: function(e, t, n, i, r, o, a) {
                C.fn.init.apply(this, arguments), this.isHorizontal = a ? !0 : !1
            },
            refresh: function() {
                var e = this.element;
                this.clientWidth = e.clientWidth, this.clientHeight = e.clientHeight, this.offsetWidth = e.offsetWidth, this.offsetHeight = e.offsetHeight, this.offsetTop = e.offsetTop, this.offsetLeft = e.offsetLeft
            },
            offsetX: function(e, t) {
                return e ? this.offsetLeft + t : this.offsetLeft + t
            },
            startInRange: function(e) {
                return e >= this.start && this.end > e
            },
            endInRange: function(e) {
                return e > this.start && this.end >= e
            },
            startOffset: function(t, n, i) {
                var r, o, a, s, l;
                if (i) return this.start;
                if (r = e(this.element).offset(), o = this.end - this.start, this.isHorizontal) {
                    if (l = F.support.isRtl(this.element), a = t - r.left, s = Math.floor(o * (a / this.offsetWidth)), l) return this.start + o - s
                } else a = n - r.top, s = Math.floor(o * (a / this.offsetHeight));
                return this.start + s
            },
            endOffset: function(t, n, i) {
                var r, o, a, s, l;
                if (i) return this.end;
                if (r = e(this.element).offset(), o = this.end - this.start, this.isHorizontal) {
                    if (l = F.support.isRtl(this.element), a = t - r.left, s = Math.floor(o * (a / this.offsetWidth)), l) return this.start + o - s
                } else a = n - r.top, s = Math.floor(o * (a / this.offsetHeight));
                return this.start + s
            }
        }), T = C.extend({
            init: function(e, t, n, i, r, o, a) {
                C.fn.init.apply(this, arguments), this.eventCount = a, this.isDaySlot = !0, this.element.children.length ? (this.firstChildHeight = this.element.children[0].offsetHeight + 3, this.firstChildTop = this.element.children[0].offsetTop) : (this.firstChildHeight = 3, this.firstChildTop = 0)
            },
            refresh: function() {
                this.clientHeight = this.element.clientHeight, this.offsetTop = this.element.offsetTop
            },
            startDate: function() {
                var e = new Date(this.start);
                return F.timezone.apply(e, "Etc/UTC")
            },
            endDate: function() {
                var e = new Date(this.end);
                return F.timezone.apply(e, "Etc/UTC")
            },
            startInRange: function(e) {
                return e >= this.start && this.end > e
            },
            endInRange: function(e) {
                return e > this.start && this.end >= e
            }
        }), F.ui.SchedulerView = M.extend({
            init: function(t, n) {
                M.fn.init.call(this, t, n), this._normalizeOptions(), this._scrollbar = c(), this._isRtl = F.support.isRtl(t), this._resizeHint = e(), this._moveHint = e(), this._cellId = F.guid(), this._resourcesForGroups(), this._selectedSlots = []
            },
            _normalizeOptions: function() {
                var e = this.options;
                e.startTime && e.startTime.setMilliseconds(0), e.endTime && e.endTime.setMilliseconds(0), e.workDayStart && e.workDayStart.setMilliseconds(0), e.workDayEnd && e.workDayEnd.setMilliseconds(0)
            },
            _isMobile: function() {
                var e = this.options;
                return e.mobile === !0 && F.support.mobileOS || "phone" === e.mobile || "tablet" === e.mobile
            },
            _isMobilePhoneView: function() {
                var e = this.options;
                return e.mobile === !0 && F.support.mobileOS && !F.support.mobileOS.tablet || "phone" === e.mobile
            },
            _addResourceView: function() {
                var e = new b(this.groups.length, this._isRtl);
                return this.groups.push(e), e
            },
            dateForTitle: function() {
                return F.format(this.options.selectedDateFormat, this.startDate(), this.endDate())
            },
            shortDateForTitle: function() {
                return F.format(this.options.selectedShortDateFormat, this.startDate(), this.endDate())
            },
            _changeGroup: function(e, t) {
                var n = t ? "prevGroupSlot" : "nextGroupSlot",
                    i = this[n](e.start, e.groupIndex, e.isAllDay);
                return i && (e.groupIndex += t ? -1 : 1), i
            },
            _changeGroupContinuously: function() {
                return null
            },
            _changeViewPeriod: function() {
                return !1
            },
            _horizontalSlots: function(e, t, n, i) {
                var r, o, a = i ? "leftSlot" : "rightSlot",
                    s = t[0].start,
                    l = t[t.length - 1].end,
                    c = this.groups[e.groupIndex];
                return n || (r = this._normalizeHorizontalSelection(e, t, i), r && (s = l = r)), s = c[a](s), l = c[a](l), n || this._isVerticallyGrouped() || s && l || (s = l = this._changeGroup(e, i)), s && l || (o = this._continuousSlot(e, t, i), o = this._changeGroupContinuously(e, o, n, i), o && (s = l = o)), {
                    startSlot: s,
                    endSlot: l
                }
            },
            _verticalSlots: function(e, t, n, i) {
                var r, o, a = t[0].start,
                    s = t[t.length - 1].end,
                    l = this.groups[e.groupIndex];
                return n || (r = this._normalizeVerticalSelection(e, t, i), r && (a = s = r)), o = i ? "upSlot" : "downSlot", a = l[o](a, n), s = l[o](s, n), n || !this._isVerticallyGrouped() || a && s || (a = s = this._changeGroup(e, i)), {
                    startSlot: a,
                    endSlot: s
                }
            },
            _normalizeHorizontalSelection: function() {
                return null
            },
            _normalizeVerticalSelection: function(e, t, n) {
                var i;
                return i = n ? t[0].start : t[t.length - 1].end
            },
            _continuousSlot: function() {
                return null
            },
            constrainSelection: function(e) {
                var t, n = this.groups[0];
                this.inRange(e) ? n.daySlotCollectionCount() || (e.isAllDay = !1) : (t = n.firstSlot(), e.isAllDay = t.isDaySlot, e.start = t.startDate(), e.end = t.endDate()), this.groups[e.groupIndex] || (e.groupIndex = 0)
            },
            move: function(e, t, n) {
                var i, r, o, a, s, l, c = !1,
                    d = this.groups[e.groupIndex];
                if (d.timeSlotCollectionCount() || (e.isAllDay = !0), i = d.ranges(e.start, e.end, e.isAllDay, !1), t === R.DOWN || t === R.UP) {
                    if (c = !0, a = t === R.UP, this._updateDirection(e, i, n, a, !0), s = this._verticalSlots(e, i, n, a), !s.startSlot && !n && this._changeViewPeriod(e, a, !0)) return c
                } else if ((t === R.LEFT || t === R.RIGHT) && (c = !0, a = t === R.LEFT, this._updateDirection(e, i, n, a, !1), s = this._horizontalSlots(e, i, n, a), !s.startSlot && !n && this._changeViewPeriod(e, a, !1))) return c;
                return c && (r = s.startSlot, o = s.endSlot, n ? (l = e.backward, l && r ? e.start = r.startDate() : !l && o && (e.end = o.endDate())) : r && o && (e.isAllDay = r.isDaySlot, e.start = r.startDate(), e.end = o.endDate()), e.events = []), c
            },
            moveToEventInGroup: function(t, n, i, r) {
                for (var o, a, s = t._continuousEvents || [], l = r ? -1 : 1, c = s.length, d = r ? c - 1 : 0; c > d && d > -1;) {
                    if (a = s[d], (!r && a.start.startDate() >= n.startDate() || r && a.start.startDate() <= n.startDate()) && (i.length && (a = s[d + l]), a && -1 === e.inArray(a.uid, i))) {
                        o = !!a;
                        break
                    }
                    d += l
                }
                return a
            },
            moveToEvent: function(e, t) {
                for (var n, i = e.groupIndex, r = this.groups[i], o = r.ranges(e.start, e.end, e.isAllDay, !1)[0].start, a = this.groups.length, s = t ? -1 : 1, l = e.events; a > i && i > -1 && (n = this.moveToEventInGroup(r, o, l, t), i += s, r = this.groups[i], r && !n);) l = [], o = t ? r.lastSlot() : r.firstSlot(!0);
                return n && (e.events = [n.uid], e.start = n.start.startDate(), e.end = n.end.endDate(), e.isAllDay = n.start.isDaySlot, e.groupIndex = n.start.groupIndex), !!n
            },
            current: function(e) {
                return void 0 === e ? this._current : (this._current = e, void(this.content.has(e) && this._scrollTo(e, this.content[0])))
            },
            select: function(e) {
                this.clearSelection(), this._selectEvents(e) || this._selectSlots(e)
            },
            _selectSlots: function(e) {
                var t, n, i, r, o, a, s, l = e.isAllDay,
                    c = this.groups[e.groupIndex];
                for (c.timeSlotCollectionCount() || (l = !0), this._selectedSlots = [], t = c.ranges(e.start, e.end, l, !1), r = 0; t.length > r; r++)
                    for (o = t[r], a = o.collection, s = o.start.index; o.end.index >= s; s++) i = a.at(s), n = i.element, n.setAttribute("aria-selected", !0), _(n), this._selectedSlots.push({
                        start: i.startDate(),
                        end: i.endDate(),
                        element: n
                    });
                e.backward && (n = t[0].start.element), this.current(n)
            },
            _selectEvents: function(t) {
                var n, i, r = !1,
                    o = t.events,
                    a = this.groups[t.groupIndex]._continuousEvents || [],
                    s = a.length;
                if (!o[0] || !a[0]) return r;
                for (i = e(), t.events = [], n = 0; s > n; n++) e.inArray(a[n].uid, o) > -1 && (i = i.add(a[n].element), t.events.push(a[n].uid));
                return i[0] && (i.addClass("k-state-selected").attr("aria-selected", !0), this.current(i.last()[0]), this._selectedSlots = [], r = !0), r
            },
            inRange: function(e) {
                var t = this.startDate(),
                    n = F.date.addDays(this.endDate(), 1),
                    i = e.start,
                    r = e.end;
                return i >= t && n > i && r > t && n >= r
            },
            _resourceValue: function(e, t) {
                return e.valuePrimitive && (t = F.getter(e.dataValueField)(t)), t
            },
            _resourceBySlot: function(e) {
                var t, n, i, r, o, a = this.groupedResources,
                    s = {};
                if (a.length)
                    for (t = e.groupIndex, n = a.length - 1; n >= 0; n--) i = a[n], r = this._resourceValue(i, i.dataSource.view()[t % i.dataSource.total()]), i.multiple && (r = [r]), o = F.setter(i.field), o(s, r), t = Math.floor(t / i.dataSource.total());
                return s
            },
            _createResizeHint: function(t, n, i, r) {
                return e(B).css({
                    left: t,
                    top: n,
                    width: i,
                    height: r
                })
            },
            _removeResizeHint: function() {
                this._resizeHint.remove(), this._resizeHint = e()
            },
            _removeMoveHint: function() {
                this._moveHint.remove(), this._moveHint = e()
            },
            _scrollTo: function(e, t) {
                var n = e.offsetTop,
                    i = e.offsetHeight,
                    r = t.scrollTop,
                    o = t.clientHeight,
                    a = n + i,
                    s = 0;
                s = r > n ? n : a > r + o ? o >= i ? a - o : n : r, t.scrollTop = s
            },
            _shouldInverseResourceColor: function(e) {
                var t = new A(e.color).isDark(),
                    n = this.element.css("color"),
                    i = new A(n).isDark();
                return t == i
            },
            _eventTmpl: function(t, n) {
                var i, r = this.options,
                    o = e.extend({}, F.Template, r.templateSettings),
                    a = o.paramName,
                    s = "",
                    l = typeof t,
                    c = {
                        storage: {},
                        count: 0
                    };
                return "function" === l ? (c.storage["tmpl" + c.count] = t, s += "#=this.tmpl" + c.count + "(" + a + ")#", c.count++) : "string" === l && (s += t), i = F.template(F.format(n, s), o), c.count > 0 && (i = e.proxy(i, c.storage)), i
            },
            eventResources: function(e) {
                var t, n, i, r, o, a, s, l, c, d, u = [],
                    h = this.options;
                if (!h.resources) return u;
                for (t = 0; h.resources.length > t; t++)
                    if (n = h.resources[t], i = n.field, r = F.getter(i)(e), null != r)
                        for (n.multiple || (r = [r]), o = n.dataSource.view(), a = 0; r.length > a; a++) {
                            for (s = null, l = r[a], n.valuePrimitive || (l = F.getter(n.dataValueField)(l)), c = 0; o.length > c; c++)
                                if (o[c].get(n.dataValueField) == l) {
                                    s = o[c];
                                    break
                                } null !== s && (d = F.getter(n.dataColorField)(s), u.push({
                                field: n.field,
                                title: n.title,
                                name: n.name,
                                text: F.getter(n.dataTextField)(s),
                                value: l,
                                color: d
                            }))
                        }
                return u
            },
            createLayout: function(i) {
                var r, o, a, s, l, c = -1;
                for (i.rows || (i.rows = []), r = 0; i.rows.length > r; r++)
                    if (i.rows[r].allDay) {
                        c = r;
                        break
                    } o = i.rows[c], c >= 0 && i.rows.splice(c, 1), a = this.columnLevels = t(i, "columns"), s = this.rowLevels = t(i, "rows"), this.table = e("<table " + n() + ' class="k-scheduler-layout k-scheduler-' + this.name + 'view"/>'), l = s[s.length - 1].length, this.table.append(this._topSection(a, o, l)), this.table.append(this._bottomSection(a, s, l)),
                    this.element.append(this.table), this._scroller()
            },
            refreshLayout: function() {
                var t, n, i, r, o, a, s = this,
                    l = s.element.find(">.k-scheduler-toolbar"),
                    c = s.element.innerHeight(),
                    d = this._scrollbar,
                    u = 0,
                    h = this._isRtl ? "left" : "right";
                for (t = 0; l.length > t; t++) c -= l.eq(t).outerHeight();
                s.datesHeader && (u = s.datesHeader.outerHeight()), s.timesHeader && s.timesHeader.outerHeight() > u && (u = s.timesHeader.outerHeight()), s.datesHeader && s.timesHeader && (n = s.datesHeader.find("table:first tr"), s.timesHeader.find("tr").height(function(t) {
                    e(this).height(n.eq(t).height())
                })), u && (c -= u), s.footer && (c -= s.footer.outerHeight()), i = function(e) {
                    var t, n;
                    return e[0].style.height ? !0 : (t = e.height(), e.height("auto"), n = e.height(), t != n ? (e.height(""), !0) : (e.height(""), !1))
                }, r = s.content[0], o = F.support.kineticScrollNeeded ? 0 : d, i(s.element) && (s.content.height(c > 2 * d ? c : 2 * d + 1), s.times.height(r.clientHeight), a = s.times.find("table"), a.length && a.height(s.content.find("table")[0].clientHeight)), r.offsetWidth - r.clientWidth > 0 ? (s.table.addClass("k-scrollbar-v"), s.datesHeader.css("padding-" + h, o - parseInt(s.datesHeader.children().css("border-" + h + "-width"), 10))) : s.datesHeader.css("padding-" + h, ""), r.offsetHeight - r.clientHeight > 0 || r.clientHeight > s.content.children(".k-scheduler-table").height() ? s.table.addClass("k-scrollbar-h") : s.table.removeClass("k-scrollbar-h")
            },
            _topSection: function(t, n, i) {
                this.timesHeader = o(t.length, n, i);
                var r = t[t.length - 1].length;
                return this.datesHeader = a(t, r, n), e("<tr>").append(this.timesHeader.add(this.datesHeader).wrap("<td>").parent())
            },
            _bottomSection: function(t, n, i) {
                return this.times = s(n, i), this.content = l(t[t.length - 1], n[n.length - 1]), e("<tr>").append(this.times.add(this.content).wrap("<td>").parent())
            },
            _scroller: function() {
                var t, n = this;
                this.content.bind("scroll" + P, function() {
                    n.datesHeader.find(">.k-scheduler-header-wrap").scrollLeft(this.scrollLeft), n.times.scrollTop(this.scrollTop)
                }), t = F.touchScroller(this.content, {
                    avoidScrolling: function(t) {
                        return e(t.event.target).closest(".k-event.k-event-active").length > 0
                    }
                }), t && t.movable && (this._touchScroller = t, this.content = t.scrollElement, t.movable.bind("change", function(e) {
                    n.datesHeader.find(">.k-scheduler-header-wrap").scrollLeft(-e.sender.x), n.times.scrollTop(-e.sender.y)
                }))
            },
            _resourcesForGroups: function() {
                var e, t, n, i, r = [],
                    o = this.options.group,
                    a = this.options.resources;
                if (o = o && o.resources ? o.resources : [], a && o.length)
                    for (e = 0, t = a.length; t > e; e++)
                        for (n = 0, i = o.length; i > n; n++) a[e].name === o[n] && r.push(a[e]);
                this.groupedResources = r
            },
            _createColumnsLayout: function(e, t, n) {
                return g("columns", e, t, n)
            },
            _groupOrientation: function() {
                var e = this.options.group;
                return e && e.resources ? e.orientation : "horizontal"
            },
            _isVerticallyGrouped: function() {
                return this.groupedResources.length && "vertical" === this._groupOrientation()
            },
            _createRowsLayout: function(e, t, n) {
                return g("rows", e, t, n)
            },
            selectionByElement: function() {
                return null
            },
            clearSelection: function() {
                this.content.find(".k-state-selected").removeAttr("id").attr("aria-selected", !1).removeClass("k-state-selected")
            },
            destroy: function() {
                var e = this;
                M.fn.destroy.call(this), e.table && (F.destroy(e.table), e.table.remove()), e.groups = null, e.table = null, e.content = null, e.times = null, e.datesHeader = null, e.timesHeader = null, e.footer = null, e._resizeHint = null, e._moveHint = null
            },
            calendarInfo: function() {
                return F.getCulture().calendars.standard
            },
            prevGroupSlot: function(e, t, n) {
                var i, r = this.groups[t],
                    o = r.ranges(e, e, n, !1)[0].start;
                if (!(0 >= t)) return this._isVerticallyGrouped() ? r.timeSlotCollectionCount() ? (i = r._collection(n ? o.index : o.collectionIndex, !1), i.last()) : (i = r._collection(r.daySlotCollectionCount() - 1, !0), i.at(o.index)) : r.timeSlotCollectionCount() ? (i = r._collection(n ? 0 : r.timeSlotCollectionCount() - 1, n), n ? i.last() : i.at(o.index)) : (i = r._collection(o.collectionIndex, !0), i.last())
            },
            nextGroupSlot: function(e, t, n) {
                var i, r, o = this.groups[t],
                    a = o.ranges(e, e, n, !1)[0].start;
                if (!(t >= this.groups.length - 1)) return this._isVerticallyGrouped() ? o.timeSlotCollectionCount() ? (r = o.daySlotCollectionCount(), i = o._collection(r ? 0 : a.collectionIndex, r), n ? i.first() : i.at(a.collectionIndex)) : (i = o._collection(0, !0), i.at(a.index)) : o.timeSlotCollectionCount() ? (i = o._collection(0, n), n ? i.first() : i.at(a.index)) : (i = o._collection(a.collectionIndex, !0), i.first())
            },
            _eventOptionsForMove: function() {
                return {}
            },
            _updateEventForResize: function() {},
            _updateEventForSelection: function(e) {
                return e
            }
        }), A = function(e) {
            var t, n, i, r, o, a = this,
                s = A.formats;
            if (1 === arguments.length)
                for (e = a.resolveColor(e), r = 0; s.length > r; r++) t = s[r].re, n = s[r].process, i = t.exec(e), i && (o = n(i), a.r = o[0], a.g = o[1], a.b = o[2]);
            else a.r = arguments[0], a.g = arguments[1], a.b = arguments[2];
            a.r = a.normalizeByte(a.r), a.g = a.normalizeByte(a.g), a.b = a.normalizeByte(a.b)
        }, A.prototype = {
            resolveColor: function(e) {
                return e = e || "#000", "#" == e.charAt(0) && (e = e.substr(1, 6)), e = e.replace(/ /g, ""), e = e.toLowerCase(), e = A.namedColors[e] || e
            },
            normalizeByte: function(e) {
                return 0 > e || isNaN(e) ? 0 : e > 255 ? 255 : e
            },
            percBrightness: function() {
                var e = this;
                return z.sqrt(.241 * e.r * e.r + .691 * e.g * e.g + .068 * e.b * e.b)
            },
            isDark: function() {
                var e = this,
                    t = e.percBrightness();
                return 180 > t
            }
        }, A.formats = [{
            re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
            process: function(e) {
                return [parseInt(e[1], 10), parseInt(e[2], 10), parseInt(e[3], 10)]
            }
        }, {
            re: /^(\w{2})(\w{2})(\w{2})$/,
            process: function(e) {
                return [parseInt(e[1], 16), parseInt(e[2], 16), parseInt(e[3], 16)]
            }
        }, {
            re: /^(\w{1})(\w{1})(\w{1})$/,
            process: function(e) {
                return [parseInt(e[1] + e[1], 16), parseInt(e[2] + e[2], 16), parseInt(e[3] + e[3], 16)]
            }
        }], A.namedColors = {
            aqua: "00ffff",
            azure: "f0ffff",
            beige: "f5f5dc",
            black: "000000",
            blue: "0000ff",
            brown: "a52a2a",
            coral: "ff7f50",
            cyan: "00ffff",
            darkblue: "00008b",
            darkcyan: "008b8b",
            darkgray: "a9a9a9",
            darkgreen: "006400",
            darkorange: "ff8c00",
            darkred: "8b0000",
            dimgray: "696969",
            fuchsia: "ff00ff",
            gold: "ffd700",
            goldenrod: "daa520",
            gray: "808080",
            green: "008000",
            greenyellow: "adff2f",
            indigo: "4b0082",
            ivory: "fffff0",
            khaki: "f0e68c",
            lightblue: "add8e6",
            lightgrey: "d3d3d3",
            lightgreen: "90ee90",
            lightpink: "ffb6c1",
            lightyellow: "ffffe0",
            lime: "00ff00",
            limegreen: "32cd32",
            linen: "faf0e6",
            magenta: "ff00ff",
            maroon: "800000",
            mediumblue: "0000cd",
            navy: "000080",
            olive: "808000",
            orange: "ffa500",
            orangered: "ff4500",
            orchid: "da70d6",
            pink: "ffc0cb",
            plum: "dda0dd",
            purple: "800080",
            red: "ff0000",
            royalblue: "4169e1",
            salmon: "fa8072",
            silver: "c0c0c0",
            skyblue: "87ceeb",
            slateblue: "6a5acd",
            slategray: "708090",
            snow: "fffafa",
            steelblue: "4682b4",
            tan: "d2b48c",
            teal: "008080",
            tomato: "ff6347",
            turquoise: "40e0d0",
            violet: "ee82ee",
            wheat: "f5deb3",
            white: "ffffff",
            whitesmoke: "f5f5f5",
            yellow: "ffff00",
            yellowgreen: "9acd32"
        }, E = /\s*k-state-selected/, e.extend(I.SchedulerView, {
            createColumns: f,
            createRows: p,
            rangeIndex: u,
            collidingEvents: d,
            groupEqFilter: v
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.scheduler.dayview.min", ["kendo.scheduler.view.min"], e)
}(function() {
    return function(e, t) {
        function n(e) {
            var t = new Date(1980, 1, 1, 0, 0, 0);
            return c(t, g(e)), t
        }

        function i(e, t, n) {
            return e >= t && n >= e
        }

        function r(e, t, n, i) {
            return i = i ? n >= e : n > e, e > t && i
        }

        function o(e, t, n, i) {
            var r, o = e._continuousEvents,
                a = o[o.length - 1],
                l = f(t.start.startDate()).getTime();
            if (i && a && f(a.start.startDate()).getTime() == l) {
                for (r = o.length - 1; r > -1 && !(o[r].isAllDay || f(o[r].start.startDate()).getTime() < l); r--);
                o.splice(r + 1, 0, {
                    element: n,
                    isAllDay: !0,
                    uid: n.attr(s.attr("uid")),
                    start: t.start,
                    end: t.end
                })
            } else o.push({
                element: n,
                isAllDay: i,
                uid: n.attr(s.attr("uid")),
                start: t.start,
                end: t.end
            })
        }

        function a(e) {
            var t = [],
                n = e.workWeekStart;
            for (t.push(n); e.workWeekEnd != n;) n > 6 ? n -= 7 : n++, t.push(n);
            return t
        }
        var s = window.kendo,
            l = s.ui,
            c = s.date.setTime,
            d = l.SchedulerView,
            u = e.extend,
            h = e.proxy,
            f = s.date.getDate,
            p = s.date.MS_PER_MINUTE,
            m = s.date.MS_PER_DAY,
            g = s.date.getMilliseconds,
            v = ".kendoMultiDayView",
            _ = s.template('<div title="(#=kendo.format("{0:t} - {1:t}", start, end)#): #=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template k-event-time">#:kendo.format("{0:t} - {1:t}", start, end)#</div><div class="k-event-template">${title}</div></div>'),
            b = s.template('<div title="(#=kendo.format("{0:t}", start)#): #=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template">${title}</div></div>'),
            w = s.template("<span class='k-link k-nav-day'>#=kendo.toString(date, 'ddd M/dd')#</span>"),
            y = '<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color#; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#" #} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-w"></span>#}## if(data.isException()) {#<span class="k-icon k-i-exception"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-refresh"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete"><span class="k-icon k-si-close"></span></a>#}## if(data.head || data.middle) {#<span class="k-icon k-i-arrow-e"></span>#}#</span>#if(resizable && !singleDay && !data.tail && !data.middle){#<span class="k-resize-handle k-resize-w"></span>#}##if(resizable && !singleDay && !data.head && !data.middle){#<span class="k-resize-handle k-resize-e"></span>#}#</div>',
            k = '<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#" #if (resources[0]) { #style="background-color:#=resources[0].color #; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#"#} else {#class="k-event"#}#><span class="k-event-actions"># if(data.isException()) {#<span class="k-icon k-i-exception"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-refresh"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete"><span class="k-icon k-si-close"></span></a>#}#</span><span class="k-event-top-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-n"></span># } #</span><span class="k-event-bottom-actions"># if(data.head || data.middle) {#<span class="k-icon k-i-arrow-s"></span># } #</span># if(resizable && !data.tail && !data.middle) {#<span class="k-resize-handle k-resize-n"></span># } ## if(resizable && !data.head && !data.middle) {#<span class="k-resize-handle k-resize-s"></span># } #</div>',
            x = d.extend({
                init: function(e, t) {
                    var n = this;
                    d.fn.init.call(n, e, t), n.title = n.options.title || n.options.name, n._workDays = a(n.options), n._templates(), n._editable(), n.calculateDateRange(), n._groups(), n._currentTime()
                },
                _currentTimeMarkerUpdater: function() {
                    var t, n, i, r, o, a, l, c, d, u, h = new Date,
                        f = this.options;
                    for (f.currentTimeMarker.useLocalTimezone === !1 && (t = f.dataSource.options.schema.timezone, f.dataSource && t && (n = s.timezone.offset(h, t), h = s.timezone.convert(h, h.getTimezoneOffset(), n))), this.times.find(".k-current-time").remove(), i = f.group && "horizontal" != f.group.orientation ? this.groups.length : 1, r = 0; i > r; r++) {
                        if (o = this.groups[r], a = s.date.toUtcTime(h), l = o.timeSlotRanges(a, a + 1), 0 === l.length) return;
                        c = l[0].collection, d = c.slotByStartDate(h), d && (u = e("<div class='k-current-time'></div>"), u.appendTo(this.times).css({
                            top: Math.round(l[0].innerRect(h, new Date(h.getTime() + 1), !1).top),
                            height: "1px",
                            right: "1px",
                            left: 0
                        }))
                    }
                },
                _currentTime: function() {
                    var e, n = this,
                        i = n.options.currentTimeMarker;
                    i !== !1 && i.updateInterval !== t && (e = i.updateInterval, n._currentTimeMarkerUpdater(), n._currentTimeUpdateTimer = setInterval(h(this._currentTimeMarkerUpdater, n), e))
                },
                _updateResizeHint: function(e, t, n, i) {
                    var r, o, a, l, c, u, h, f, p, m, g = e.isMultiDay(),
                        v = this.groups[t],
                        _ = v.ranges(n, i, g, e.isAllDay);
                    for (this._removeResizeHint(), r = 0; _.length > r; r++) o = _[r], a = o.startSlot(), l = a.offsetWidth, c = a.clientHeight, u = a.offsetTop, g ? l = o.innerWidth() : (h = o.outerRect(n, i, this.options.snap), u = h.top, c = h.bottom - h.top), f = d.fn._createResizeHint.call(this, a.offsetLeft, u, l, c), this._resizeHint = this._resizeHint.add(f);
                    p = "t", m = this.content, g && (p = "M/dd", m = this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day) > div"), m.length || (m = this.content)), this._resizeHint.appendTo(m), this._resizeHint.find(".k-label-top,.k-label-bottom").text(""), this._resizeHint.first().addClass("k-first").find(".k-label-top").text(s.toString(s.timezone.toLocalDate(n), p)), this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(s.toString(s.timezone.toLocalDate(i), p))
                },
                _updateMoveHint: function(e, t, n) {
                    var i, r, o, a, l, c, d, u = e.isMultiDay(),
                        h = this.groups[t],
                        f = s.date.toUtcTime(e.start) + n,
                        p = f + e.duration(),
                        m = h.ranges(f, p, u, e.isAllDay);
                    for (f = s.timezone.toLocalDate(f), p = s.timezone.toLocalDate(p), this._removeMoveHint(), !u && (0 === g(p) || g(p) < g(this.startTime())) && m.length > 1 && m.pop(), i = 0; m.length > i; i++) r = m[i], o = r.start, a = this._createEventElement(e.clone({
                        start: f,
                        end: p
                    }), !u), a.addClass("k-event-drag-hint"), l = {
                        left: o.offsetLeft + 2,
                        top: o.offsetTop
                    }, this._isRtl && (l.left = .1 * o.clientWidth + o.offsetLeft + 2), u ? l.width = r.innerWidth() - 4 : (c = r.outerRect(f, p, this.options.snap), l.top = c.top, l.height = c.bottom - c.top, l.width = .9 * o.clientWidth - 4), a.css(l), this._moveHint = this._moveHint.add(a);
                    d = this.content, u && (d = this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day) > div"), d.length || (d = this.content)), this._moveHint.appendTo(d)
                },
                _slotByPosition: function(e, t) {
                    var n, i, r, o;
                    for (this._isVerticallyGrouped() ? (i = this.content.offset(), t += this.content[0].scrollTop, e += this.content[0].scrollLeft) : i = this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day)").find(">div").offset(), i && (e -= i.left, t -= i.top), e = Math.ceil(e), t = Math.ceil(t), o = 0; this.groups.length > o; o++)
                        if (r = this.groups[o], n = r.daySlotByPosition(e, t)) return n;
                    for (i && (e += i.left, t += i.top), i = this.content.offset(), e -= i.left, t -= i.top, this._isVerticallyGrouped() || (t += this.content[0].scrollTop, e += this.content[0].scrollLeft), e = Math.ceil(e), t = Math.ceil(t), o = 0; this.groups.length > o; o++)
                        if (r = this.groups[o], n = r.timeSlotByPosition(e, t)) return n;
                    return null
                },
                _groupCount: function() {
                    var e = this.groupedResources;
                    return e.length ? "vertical" === this._groupOrientation() ? this._rowCountForLevel(e.length - 1) : this._columnCountForLevel(e.length) / this._columnOffsetForResource(e.length) : 1
                },
                _columnCountInResourceView: function() {
                    var e = this.groupedResources;
                    return !e.length || this._isVerticallyGrouped() ? this._columnCountForLevel(0) : this._columnOffsetForResource(e.length)
                },
                _timeSlotGroups: function(e, t) {
                    var n, i, r, o, a, s, l, c, d, u, h, f, p, m, v, _, b = this._timeSlotInterval(),
                        w = this.content.find("tr:not(.k-scheduler-header-all-day)");
                    for (w.attr("role", "row"), n = w.length, this._isVerticallyGrouped() && (n = Math.floor(n / e)), i = 0; e > i; i++)
                        for (r = 0, this._isVerticallyGrouped() && (r = i), o = r * n, s = 0, this._isVerticallyGrouped() || (s = i);
                             (r + 1) * n > o;) {
                            for (l = w[o].children, c = this.groups[i], o % n === 0 && (a = g(new Date(+this.startTime()))), d = s * t;
                                 (s + 1) * t > d; d++) u = l[d], h = d % t, f = c.getTimeSlotCollection(h), p = this._dates[h], m = Date.UTC(p.getFullYear(), p.getMonth(), p.getDate()), v = m + a, _ = v + b, u.setAttribute("role", "gridcell"), u.setAttribute("aria-selected", !1), f.addTimeSlot(u, v, _);
                            a += b, o++
                        }
                },
                _daySlotGroups: function(e, t) {
                    var n, i, r, o, a, l, c, d, u, h, f, p;
                    for (n = this.element.find(this._isVerticallyGrouped() ? ".k-scheduler-header-all-day" : ".k-scheduler-header-all-day tr"), n.attr("role", "row"), i = 0; e > i; i++)
                        for (r = 0, this._isVerticallyGrouped() && (r = i), o = this.groups[i], a = o.getDaySlotCollection(0), l = n[r].children, c = 0, this._isVerticallyGrouped() || (c = i), d = 0, u = c * t;
                             (c + 1) * t > u; u++) h = l[u], u % t === 0 && (d = 0), f = this._dates[d], p = Date.UTC(f.getFullYear(), f.getMonth(), f.getDate()), d++, h.setAttribute("role", "gridcell"), h.setAttribute("aria-selected", !1), a.addDaySlot(h, p, p + s.date.MS_PER_DAY)
                },
                _groups: function() {
                    var e, t, n, i = this._groupCount(),
                        r = this._columnCountInResourceView();
                    for (this.groups = [], e = 0; i > e; e++) {
                        for (t = this._addResourceView(e), n = 0; r > n; n++) t.addTimeSlotCollection(this._dates[n], s.date.addDays(this._dates[n], 1));
                        this.options.allDaySlot && t.addDaySlotCollection(this._dates[0], s.date.addDays(this._dates[this._dates.length - 1], 1))
                    }
                    this._timeSlotGroups(i, r), this.options.allDaySlot && this._daySlotGroups(i, r)
                },
                options: {
                    name: "MultiDayView",
                    selectedDateFormat: "{0:D}",
                    selectedShortDateFormat: "{0:d}",
                    allDaySlot: !0,
                    showWorkHours: !1,
                    title: "",
                    startTime: s.date.today(),
                    endTime: s.date.today(),
                    minorTickCount: 2,
                    majorTick: 60,
                    majorTimeHeaderTemplate: "#=kendo.toString(date, 't')#",
                    minorTimeHeaderTemplate: "&nbsp;",
                    groupHeaderTemplate: "#=text#",
                    slotTemplate: "&nbsp;",
                    allDaySlotTemplate: "&nbsp;",
                    eventTemplate: _,
                    allDayEventTemplate: b,
                    dateHeaderTemplate: w,
                    editable: !0,
                    workDayStart: new Date(1980, 1, 1, 8, 0, 0),
                    workDayEnd: new Date(1980, 1, 1, 17, 0, 0),
                    workWeekStart: 1,
                    workWeekEnd: 5,
                    footer: {
                        command: "workDay"
                    },
                    messages: {
                        allDay: "all day",
                        showFullDay: "Show full day",
                        showWorkDay: "Show business hours"
                    },
                    currentTimeMarker: {
                        updateInterval: 1e4,
                        useLocalTimezone: !0
                    }
                },
                events: ["remove", "add", "edit"],
                _templates: function() {
                    var e = this.options,
                        t = u({}, s.Template, e.templateSettings);
                    this.eventTemplate = this._eventTmpl(e.eventTemplate, k), this.allDayEventTemplate = this._eventTmpl(e.allDayEventTemplate, y), this.majorTimeHeaderTemplate = s.template(e.majorTimeHeaderTemplate, t), this.minorTimeHeaderTemplate = s.template(e.minorTimeHeaderTemplate, t), this.dateHeaderTemplate = s.template(e.dateHeaderTemplate, t), this.slotTemplate = s.template(e.slotTemplate, t), this.allDaySlotTemplate = s.template(e.allDaySlotTemplate, t), this.groupHeaderTemplate = s.template(e.groupHeaderTemplate, t)
                },
                _editable: function() {
                    this.options.editable && (this._isMobile() ? this._touchEditable() : this._mouseEditable())
                },
                _mouseEditable: function() {
                    var t = this;
                    t.element.on("click" + v, ".k-event a:has(.k-si-close)", function(n) {
                        t.trigger("remove", {
                            uid: e(this).closest(".k-event").attr(s.attr("uid"))
                        }), n.preventDefault()
                    }), t.options.editable.create !== !1 && t.element.on("dblclick" + v, ".k-scheduler-content td", function(n) {
                        var i, r;
                        e(this).parent().hasClass("k-scheduler-header-all-day") || (i = t._slotByPosition(n.pageX, n.pageY), i && (r = t._resourceBySlot(i), t.trigger("add", {
                            eventInfo: u({
                                start: i.startDate(),
                                end: i.endDate()
                            }, r)
                        })), n.preventDefault())
                    }).on("dblclick" + v, ".k-scheduler-header-all-day td", function(e) {
                        var n, i = t._slotByPosition(e.pageX, e.pageY);
                        i && (n = t._resourceBySlot(i), t.trigger("add", {
                            eventInfo: u({}, {
                                isAllDay: !0,
                                start: s.date.getDate(i.startDate()),
                                end: s.date.getDate(i.startDate())
                            }, n)
                        })), e.preventDefault()
                    }), t.options.editable.update !== !1 && t.element.on("dblclick" + v, ".k-event", function(n) {
                        t.trigger("edit", {
                            uid: e(this).closest(".k-event").attr(s.attr("uid"))
                        }), n.preventDefault()
                    })
                },
                _touchEditable: function() {
                    var n = this,
                        i = 0;
                    s.support.mobileOS.android && (i = 5), n.options.editable.create !== !1 && (n._addUserEvents = new s.UserEvents(n.element, {
                        threshold: i,
                        filter: ".k-scheduler-content td",
                        tap: function(i) {
                            var r, o, a, s;
                            e(i.target).parent().hasClass("k-scheduler-header-all-day") || (r = i.x.location !== t ? i.x.location : i.x, o = i.y.location !== t ? i.y.location : i.y, a = n._slotByPosition(r, o), a && (s = n._resourceBySlot(a), n.trigger("add", {
                                eventInfo: u({
                                    start: a.startDate(),
                                    end: a.endDate()
                                }, s)
                            })), i.preventDefault())
                        }
                    }), n._allDayUserEvents = new s.UserEvents(n.element, {
                        threshold: i,
                        filter: ".k-scheduler-header-all-day td",
                        tap: function(e) {
                            var i, r = e.x.location !== t ? e.x.location : e.x,
                                o = e.y.location !== t ? e.y.location : e.y,
                                a = n._slotByPosition(r, o);
                            a && (i = n._resourceBySlot(a), n.trigger("add", {
                                eventInfo: u({}, {
                                    isAllDay: !0,
                                    start: s.date.getDate(a.startDate()),
                                    end: s.date.getDate(a.startDate())
                                }, i)
                            })), e.preventDefault()
                        }
                    })), n.options.editable.update !== !1 && (n._editUserEvents = new s.UserEvents(n.element, {
                        threshold: i,
                        filter: ".k-event",
                        tap: function(t) {
                            var i = e(t.target).closest(".k-event");
                            i.hasClass("k-event-active") || n.trigger("edit", {
                                uid: i.attr(s.attr("uid"))
                            }), t.preventDefault()
                        }
                    }))
                },
                _layout: function(e) {
                    var t, n, i, r = [],
                        o = [],
                        a = this.options,
                        l = this;
                    for (t = 0; e.length > t; t++) n = {}, n.text = l.dateHeaderTemplate({
                        date: e[t]
                    }), s.date.isToday(e[t]) && (n.className = "k-today"), r.push(n);
                    return i = this.groupedResources, a.allDaySlot && o.push({
                        text: a.messages.allDay,
                        allDay: !0,
                        cellContent: function(t) {
                            var n = t;
                            return t = i.length && "vertical" !== l._groupOrientation() ? t % e.length : t, l.allDaySlotTemplate({
                                date: e[t],
                                resources: function() {
                                    return l._resourceBySlot({
                                        groupIndex: n
                                    })
                                }
                            })
                        }
                    }), this._forTimeRange(this.startTime(), this.endTime(), function(e, t, n, i) {
                        var r = t ? l.majorTimeHeaderTemplate : l.minorTimeHeaderTemplate,
                            a = {
                                text: r({
                                    date: e
                                }),
                                className: i ? "k-slot-cell" : ""
                            };
                        o.push(a)
                    }), i.length && ("vertical" === this._groupOrientation() ? o = this._createRowsLayout(i, o, this.groupHeaderTemplate) : r = this._createColumnsLayout(i, r, this.groupHeaderTemplate)), {
                        columns: r,
                        rows: o
                    }
                },
                _footer: function() {
                    var t, n, i, r = this.options;
                    r.footer !== !1 && (t = '<div class="k-header k-scheduler-footer">', n = r.footer.command, n && "workDay" === n ? (t += '<ul class="k-reset k-header">', t += '<li class="k-state-default k-scheduler-fullday"><a href="#" class="k-link"><span class="k-icon k-i-clock"></span>', t += (r.showWorkHours ? r.messages.showFullDay : r.messages.showWorkDay) + "</a></li>", t += "</ul>") : t += "&nbsp;", t += "</div>", this.footer = e(t).appendTo(this.element), i = this, this.footer.on("click" + v, ".k-scheduler-fullday", function(e) {
                        e.preventDefault(), i.trigger("navigate", {
                            view: i.name || r.name,
                            date: i.startDate(),
                            isWorkDay: !r.showWorkHours
                        })
                    }))
                },
                _forTimeRange: function(e, t, i, r) {
                    var o, a, s, l, d, u, h, f, v, _, b, w, y, k, x, C;
                    for (e = n(e), t = n(t), o = this, a = g(e), s = g(t), l = o.options.minorTickCount, d = o.options.majorTick * p, u = d / l || 1, h = new Date(+e), f = h.getDate(), _ = 0, w = "", b = m / u, a != s && (a > s && (s += m), b = (s - a) / u), b = Math.round(b); b > _; _++) y = _ % (d / u), k = 0 === y, x = l - 1 > y, C = y === l - 1, w += i(h, k, x, C), c(h, u, !1);
                    return s && (v = g(h), f < h.getDate() && (v += m), v > s && (h = new Date(+t))), r && (w += r(h)), w
                },
                _content: function(e) {
                    var t, n, i, r = this,
                        o = r.options,
                        a = r.startTime(),
                        l = this.endTime(),
                        c = 1,
                        d = 1,
                        u = e.length,
                        h = "",
                        f = this.groupedResources,
                        p = this.slotTemplate,
                        m = this.allDaySlotTemplate,
                        g = !1;
                    for (f.length && (g = "vertical" === r._groupOrientation(), g ? (d = this._rowCountForLevel(this.rowLevels.length - 2), o.allDaySlot && (t = function(t) {
                        var n, i, o = '<tr class="k-scheduler-header-all-day">',
                            a = function() {
                                return r._resourceBySlot({
                                    groupIndex: t
                                })
                            };
                        for (n = 0, i = e.length; i > n; n++) o += "<td>" + m({
                            date: e[n],
                            resources: a
                        }) + "</td>";
                        return o + "</tr>"
                    })) : c = this._columnCountForLevel(this.columnLevels.length - 2)), h += "<tbody>", n = function(t, n) {
                        var o, a, l, d, h = "",
                            f = "",
                            m = 0;
                        for (h = "<tr" + (n ? ' class="k-middle-row"' : "") + ">", d = function(e) {
                            return function() {
                                return r._resourceBySlot({
                                    groupIndex: e
                                })
                            }
                        }; c > m; m++)
                            for (o = 0, a = u; a > o; o++) f = "", s.date.isToday(e[o]) && (f += "k-today"), (s.date.getMilliseconds(t) < s.date.getMilliseconds(r.options.workDayStart) || s.date.getMilliseconds(t) >= s.date.getMilliseconds(r.options.workDayEnd) || !r._isWorkDay(e[o])) && (f += " k-nonwork-hour"), h += "<td" + ("" !== f ? ' class="' + f + '"' : "") + ">", l = s.date.getDate(e[o]), s.date.setTime(l, s.date.getMilliseconds(t)), h += p({
                                date: l,
                                resources: d(g ? i : m)
                            }), h += "</td>";
                        return h += "</tr>"
                    }, i = 0; d > i; i++) h += t ? t(i) : "", h += this._forTimeRange(a, l, n);
                    h += "</tbody>", this.content.find("table").append(h)
                },
                _isWorkDay: function(e) {
                    var t, n = e.getDay(),
                        i = this._workDays;
                    for (t = 0; i.length > t; t++)
                        if (i[t] === n) return !0;
                    return !1
                },
                _render: function(t) {
                    var n, i = this;
                    t = t || [], this._dates = t, this._startDate = t[0], this._endDate = t[t.length - 1 || 0], this.createLayout(this._layout(t)), this._content(t), this._footer(), this.refreshLayout(), n = this.element.find(".k-scheduler-header-all-day td"), n.length && (this._allDayHeaderHeight = n.first()[0].clientHeight), i.datesHeader.on("click" + v, ".k-nav-day", function(t) {
                        var n = e(t.currentTarget).closest("th"),
                            r = n.offset(),
                            o = i._slotByPosition(r.left, r.top + n.outerHeight());
                        i.trigger("navigate", {
                            view: "day",
                            date: o.startDate()
                        })
                    })
                },
                startTime: function() {
                    var e = this.options;
                    return e.showWorkHours ? e.workDayStart : e.startTime
                },
                endTime: function() {
                    var e = this.options;
                    return e.showWorkHours ? e.workDayEnd : e.endTime
                },
                startDate: function() {
                    return this._startDate
                },
                endDate: function() {
                    return this._endDate
                },
                _end: function(e) {
                    var t = g(this.endTime()) || m;
                    return e && (t = 0), new Date(this._endDate.getTime() + t)
                },
                nextDate: function() {
                    return s.date.nextDay(this.endDate())
                },
                previousDate: function() {
                    return s.date.previousDay(this.startDate())
                },
                calculateDateRange: function() {
                    this._render([this.options.date])
                },
                destroy: function() {
                    var e = this;
                    e._currentTimeUpdateTimer && clearInterval(e._currentTimeUpdateTimer), e.datesHeader && e.datesHeader.off(v), e.element && e.element.off(v), e.footer && e.footer.remove(), d.fn.destroy.call(this), this._isMobile() && e.options.editable && (e.options.editable.create !== !1 && (e._addUserEvents.destroy(), e._allDayUserEvents.destroy()), e.options.editable.update !== !1 && e._editUserEvents.destroy())
                },
                inRange: function(e) {
                    var t = d.fn.inRange.call(this, e),
                        n = g(this.startTime()),
                        i = g(this.endTime()) || s.date.MS_PER_DAY,
                        r = g(e.start),
                        o = g(e.end) || s.date.MS_PER_DAY;
                    return t && r >= n && i >= o
                },
                selectionByElement: function(e) {
                    var t = e.offset();
                    return this._slotByPosition(t.left, t.top)
                },
                _timeSlotInterval: function() {
                    var e = this.options;
                    return e.majorTick / e.minorTickCount * p
                },
                _timeSlotIndex: function(e) {
                    var t = this.options,
                        n = g(e),
                        i = g(this.startTime()),
                        r = t.majorTick / t.minorTickCount * p;
                    return (n - i) / r
                },
                _slotIndex: function(e, t) {
                    return t ? this._dateSlotIndex(e) : this._timeSlotIndex(e)
                },
                _dateSlotIndex: function(e, t) {
                    var n, r, o, a, l = this._dates || [],
                        c = 1;
                    for (n = 0, r = l.length; r > n; n++)
                        if (o = s.date.getDate(l[n]), a = new Date(s.date.getDate(l[n]).getTime() + m - (t ? 0 : 1)), i(e, o, a)) return n * c;
                    return -1
                },
                _positionAllDayEvent: function(t, n) {
                    var i, r, o, a, s, l, c, u = n.innerWidth(),
                        h = n.start.index,
                        f = n.end.index,
                        p = d.collidingEvents(n.events(), h, f),
                        m = this._headerColumnCount || 0,
                        g = 2,
                        v = h !== f ? 5 : 4,
                        _ = this._allDayHeaderHeight,
                        b = n.startSlot();
                    for (t.css({
                        left: b.offsetLeft + g,
                        width: u - v
                    }), n.addEvent({
                        slotIndex: h,
                        start: h,
                        end: f,
                        element: t
                    }), p.push({
                        slotIndex: h,
                        start: h,
                        end: f,
                        element: t
                    }), i = d.createRows(p), i.length && i.length > m && (this._headerColumnCount = i.length), r = n.start.offsetTop, o = 0, a = i.length; a > o; o++)
                        for (s = i[o].events, l = 0, c = s.length; c > l; l++) e(s[l].element).css({
                            top: r + o * _
                        })
                },
                _arrangeColumns: function(e, t, n, i) {
                    var r, o, a, s, l, c, u, h, f, p, m, g = i.start;
                    for (e = {
                        element: e,
                        slotIndex: g.index,
                        start: t,
                        end: t + n
                    }, o = g.clientWidth, a = .1 * o, l = i.events(), c = d.collidingEvents(l, e.start, e.end), i.addEvent(e), c.push(e), r = d.createColumns(c), u = (o - a) / r.length, h = 0, f = r.length; f > h; h++)
                        for (s = r[h].events, p = 0, m = s.length; m > p; p++) s[p].element[0].style.width = u - 4 + "px", s[p].element[0].style.left = (this._isRtl ? a : 0) + g.offsetLeft + h * u + 2 + "px"
                },
                _positionEvent: function(e, t, n) {
                    var i = e._startTime || e.start,
                        r = e._endTime || e.end,
                        o = n.innerRect(i, r, !1),
                        a = o.bottom - o.top - 2;
                    0 > a && (a = 0), t.css({
                        top: o.top,
                        height: a
                    }), this._arrangeColumns(t, o.top, t[0].clientHeight, n)
                },
                _createEventElement: function(t, n, r, o) {
                    var a, l, c, d, h, p, v = n ? this.eventTemplate : this.allDayEventTemplate,
                        _ = this.options,
                        b = _.editable,
                        w = this._isMobile(),
                        y = b && b.destroy !== !1 && !w,
                        k = b && b.resize !== !1,
                        x = f(this.startDate()),
                        C = f(this.endDate()),
                        S = g(this.startTime()),
                        T = g(this.endTime()),
                        D = t._time("start"),
                        A = t._time("end");
                    return S >= T && (T = g(new Date(this.endTime().getTime() + m - 1))), n || t.isAllDay || (C = new Date(C.getTime() + m)), l = t.start, c = t.end, t.isAllDay && (c = f(t.end)), !i(f(l), x, C) && !i(c, x, C) || n && S > D && A > T ? a = !0 : f(l) < x || n && S > D ? o = !0 : (c > C && !n || n && A > T) && (r = !0), d = this.eventResources(t), t._startTime && D !== s.date.getMilliseconds(t.start) && (l = new Date(D), l = s.timezone.apply(l, "Etc/UTC")), t._endTime && A !== s.date.getMilliseconds(t.end) && (c = new Date(A), c = s.timezone.apply(c, "Etc/UTC")), h = u({}, {
                        ns: s.ns,
                        resizable: k,
                        showDelete: y,
                        middle: a,
                        head: r,
                        tail: o,
                        singleDay: 1 == this._dates.length,
                        resources: d,
                        inverseColor: d && d[0] ? this._shouldInverseResourceColor(d[0]) : !1
                    }, t, {
                        start: l,
                        end: c
                    }), p = e(v(h)), this.angular("compile", function() {
                        return {
                            elements: p,
                            data: [{
                                dataItem: h
                            }]
                        }
                    }), p
                },
                _isInTimeSlot: function(e) {
                    var t, n = this.startTime(),
                        i = this.endTime(),
                        o = e._startTime || e.start,
                        a = e._endTime || e.end;
                    return g(i) === g(s.date.getDate(i)) && (i = s.date.getDate(i), c(i, m - 1)), e._date("end") > e._date("start") && (a = +e._date("end") + (m - 1)), a -= e._date("end"), o -= e._date("start"), i = g(i), n = g(n), n === o && o === a ? !0 : (t = o !== i, r(o, n, i, t) || r(a, n, i, t) || r(n, o, a) || r(i, o, a))
                },
                _isInDateSlot: function(e) {
                    var t = this.groups[0],
                        n = t.firstSlot().start,
                        r = t.lastSlot().end - 1,
                        o = s.date.toUtcTime(e.start),
                        a = s.date.toUtcTime(e.end);
                    return (i(o, n, r) || i(a, n, r) || i(n, o, a) || i(r, o, a)) && (!i(a, n, n) || i(a, o, o) || e.isAllDay)
                },
                _updateAllDayHeaderHeight: function(e) {
                    var t, n;
                    if (this._height !== e && (this._height = e, t = this.element.find(".k-scheduler-header-all-day td"), t.length))
                        for (t.parent().add(this.element.find(".k-scheduler-times-all-day").parent()).height(e), n = 0; this.groups.length > n; n++) this.groups[n].refresh()
                },
                _renderEvents: function(e, t) {
                    var n, i, r, a, s, l, c, d, u, h, f, p, g, v, _, b = this.datesHeader.find(".k-scheduler-header-wrap > div");
                    for (i = 0, r = e.length; r > i; i++)
                        if (n = e[i], this._isInDateSlot(n))
                            if (a = n.isAllDay || n.end.getTime() - n.start.getTime() >= m, s = a && !this._isVerticallyGrouped() ? b : this.content, a) this.options.allDaySlot && (d = this.groups[t], d._continuousEvents || (d._continuousEvents = []), c = d.slotRanges(n), c.length && (l = this._createEventElement(n, !a), this._positionAllDayEvent(l, c[0]), o(d, c[0], l, !0), l.appendTo(s)));
                            else if (this._isInTimeSlot(n))
                                for (d = this.groups[t], d._continuousEvents || (d._continuousEvents = []), c = d.slotRanges(n), u = c.length, h = 0; u > h; h++) f = c[h], p = n.start, g = n.end, u > 1 && (0 === h ? g = f.end.endDate() : h == u - 1 ? p = f.start.startDate() : (p = f.start.startDate(), g = f.end.endDate())), v = n.clone({
                                    start: p,
                                    end: g,
                                    _startTime: n._startTime,
                                    _endTime: n.endTime
                                }), this._isInTimeSlot(v) && (_ = f.head, l = this._createEventElement(n, !a, _, f.tail), l.appendTo(s), this._positionEvent(v, l, f), o(d, f, l, !1))
                },
                render: function(t) {
                    var n, r, o, a;
                    for (this._headerColumnCount = 0, this._groups(), this.element.find(".k-event").remove(), t = new s.data.Query(t).sort([{
                        field: "start",
                        dir: "asc"
                    }, {
                        field: "end",
                        dir: "desc"
                    }]).toArray(), n = [], this._eventsByResource(t, this.groupedResources, n), r = e.map(this._dates, function(t) {
                        return Math.max.apply(null, e.map(n, function(n) {
                            return e.grep(n, function(e) {
                                return e.isMultiDay() && i(t, f(e.start), f(e.end))
                            }).length
                        }))
                    }), o = Math.max.apply(null, r), this._updateAllDayHeaderHeight((o + 1) * this._allDayHeaderHeight), a = 0; n.length > a; a++) this._renderEvents(n[a], a);
                    this.refreshLayout(), this.trigger("activate")
                },
                _eventsByResource: function(e, t, n) {
                    var i, r, o, a, l = t[0];
                    if (l)
                        for (i = l.dataSource.view(), r = 0; i.length > r; r++) o = this._resourceValue(l, i[r]), a = new s.data.Query(e).filter({
                            field: l.field,
                            operator: d.groupEqFilter(o)
                        }).toArray(), t.length > 1 ? this._eventsByResource(a, t.slice(1), n) : n.push(a);
                    else n.push(e)
                },
                _columnOffsetForResource: function(e) {
                    return this._columnCountForLevel(e) / this._columnCountForLevel(e - 1)
                },
                _columnCountForLevel: function(e) {
                    var t = this.columnLevels[e];
                    return t ? t.length : 0
                },
                _rowCountForLevel: function(e) {
                    var t = this.rowLevels[e];
                    return t ? t.length : 0
                },
                clearSelection: function() {
                    this.content.add(this.datesHeader).find(".k-state-selected").removeAttr("id").attr("aria-selected", !1).removeClass("k-state-selected")
                },
                _updateDirection: function(e, t, n, i, r) {
                    var o = e.isAllDay,
                        a = t[0].start,
                        s = t[t.length - 1].end;
                    n && (r ? o || a.index !== s.index || a.collectionIndex !== s.collectionIndex || (e.backward = i) : (o && a.index === s.index || !o && a.collectionIndex === s.collectionIndex) && (e.backward = i))
                },
                _changeViewPeriod: function(e, n, i) {
                    var r, o, a, s;
                    return i ? t : (r = n ? this.previousDate() : this.nextDate(), o = e.start, a = e.end, e.start = new Date(r), e.end = new Date(r), s = e.isAllDay ? m : g(a), c(e.start, g(o)), c(e.end, s), this._isVerticallyGrouped() || (e.groupIndex = n ? this.groups.length - 1 : 0), e.events = [], !0)
                }
            });
        u(!0, l, {
            MultiDayView: x,
            DayView: x.extend({
                options: {
                    name: "DayView",
                    title: "Day"
                },
                name: "day"
            }),
            WeekView: x.extend({
                options: {
                    name: "WeekView",
                    title: "Week",
                    selectedDateFormat: "{0:D} - {1:D}",
                    selectedShortDateFormat: "{0:d} - {1:d}"
                },
                name: "week",
                calculateDateRange: function() {
                    var e, t, n = this.options.date,
                        i = s.date.dayOfWeek(n, this.calendarInfo().firstDay, -1),
                        r = [];
                    for (e = 0, t = 7; t > e; e++) r.push(i), i = s.date.nextDay(i);
                    this._render(r)
                }
            }),
            WorkWeekView: x.extend({
                options: {
                    name: "WorkWeekView",
                    title: "Work Week",
                    selectedDateFormat: "{0:D} - {1:D}",
                    selectedShortDateFormat: "{0:d} - {1:d}"
                },
                name: "workWeek",
                nextDate: function() {
                    return s.date.dayOfWeek(s.date.nextDay(this.startDate()), this.calendarInfo().firstDay, 1)
                },
                previousDate: function() {
                    var e = s.date.dayOfWeek(this.startDate(), this.calendarInfo().firstDay, -1);
                    return s.date.previousDay(e)
                },
                calculateDateRange: function() {
                    for (var e = this.options.date, t = s.date.dayOfWeek, n = t(e, this.calendarInfo().firstDay, -1), i = t(n, this.options.workWeekStart, 1), r = t(i, this.options.workWeekEnd, 1), o = []; r >= i;) o.push(i), i = s.date.nextDay(i);
                    this._render(o)
                }
            })
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.scheduler.agendaview.min", ["kendo.scheduler.view.min"], e)
}(function() {
    return function(e) {
        function t(e) {
            var t, n, i = 0;
            for (t = 0, n = e.length; n > t; t++) i += e[t].items.length;
            return i
        }

        function n(e, t) {
            return e.valuePrimitive && (t = o.getter(e.dataValueField)(t)), t
        }

        function i(e) {
            for (var t, n = 0, i = e.length, o = []; i > n; n++) t = e[n], t.groups ? (t = r(t.groups), o = o.concat(t)) : o = o.concat(r(t.items));
            return o
        }

        function r(e) {
            for (var t = [].concat(e), n = t.shift(), i = [], r = [].push; n;) n.groups ? r.apply(t, n.groups) : n.items ? r.apply(t, n.items) : r.call(i, n), n = t.shift();
            return i
        }
        var o = window.kendo,
            a = o.ui,
            s = ".kendoAgendaView",
            l = '<div class="k-task" title="#:title.replace(/"/g,"\'")#" data-#=kendo.ns#uid="#=uid#"># if (resources[0]) {#<span class="k-scheduler-mark" style="background-color:#=resources[0].color#"></span># } ## if (data.isException()) { #<span class="k-icon k-i-exception"></span># } else if (data.isRecurring()) {#<span class="k-icon k-i-refresh"></span># } #{0}#if (showDelete) {#<a href="\\#" class="k-link k-event-delete"><span class="k-icon k-si-close"></span></a>#}#</div>';
        a.AgendaView = a.SchedulerView.extend({
            init: function(t, n) {
                a.SchedulerView.fn.init.call(this, t, n), n = this.options, n.editable && (n.editable = e.extend({
                    "delete": !0
                }, n.editable, {
                    create: !1,
                    update: !1
                })), this.title = n.title, this._eventTemplate = this._eventTmpl(n.eventTemplate, l), this._dateTemplate = o.template(n.eventDateTemplate), this._groupTemplate = o.template(n.eventGroupTemplate), this._timeTemplate = o.template(n.eventTimeTemplate), this.element.on("mouseenter" + s, ".k-scheduler-agenda .k-scheduler-content tr", "_mouseenter").on("mouseleave" + s, ".k-scheduler-agenda .k-scheduler-content tr", "_mouseleave").on("click" + s, ".k-scheduler-agenda .k-scheduler-content .k-link:has(.k-si-close)", "_remove"), this._renderLayout(n.date)
            },
            name: "agenda",
            _mouseenter: function(t) {
                e(t.currentTarget).addClass("k-state-hover")
            },
            _mouseleave: function(t) {
                e(t.currentTarget).removeClass("k-state-hover")
            },
            _remove: function(t) {
                t.preventDefault(), this.trigger("remove", {
                    uid: e(t.currentTarget).closest(".k-task").attr(o.attr("uid"))
                })
            },
            nextDate: function() {
                return o.date.nextDay(this.startDate())
            },
            startDate: function() {
                return this._startDate
            },
            endDate: function() {
                return this._endDate
            },
            previousDate: function() {
                return o.date.previousDay(this.startDate())
            },
            _renderLayout: function(e) {
                this._startDate = e, this._endDate = o.date.addDays(e, 7), this.createLayout(this._layout()), this.table.addClass("k-scheduler-agenda")
            },
            _layout: function() {
                var e, t, n, i = [{
                    text: this.options.messages.time,
                    className: "k-scheduler-timecolumn"
                }, {
                    text: this.options.messages.event
                }];
                if (this._isMobilePhoneView() || i.splice(0, 0, {
                    text: this.options.messages.date,
                    className: "k-scheduler-datecolumn"
                }), e = this.groupedResources, e.length) {
                    for (t = [], n = 0; e.length > n; n++) t.push({
                        text: "",
                        className: "k-scheduler-groupcolumn"
                    });
                    i = t.concat(i)
                }
                return {
                    columns: i
                }
            },
            _tasks: function(e) {
                var t, n, i, r, a, s, l, c = [];
                for (t = 0; e.length > t; t++)
                    if (n = e[t], i = n.start, r = n.end, a = Math.ceil((r - o.date.getDate(i)) / o.date.MS_PER_DAY), s = n.clone(), s.startDate = o.date.getDate(i), s.startDate >= this.startDate() && c.push(s), a > 1)
                        for (s.end = o.date.nextDay(i), s.head = !0, l = 1; a > l; l++) i = s.end, s = n.clone(), s.start = i, s.startDate = o.date.getDate(i), s.end = o.date.nextDay(i), l == a - 1 ? (s.end = new Date(s.start.getFullYear(), s.start.getMonth(), s.start.getDate(), r.getHours(), r.getMinutes(), r.getSeconds(), r.getMilliseconds()), s.tail = !0) : (s.isAllDay = !0, s.middle = !0), (o.date.getDate(s.end) <= this.endDate() && s.start >= this.startDate() || o.date.getDate(s.start).getTime() == this.endDate().getTime()) && c.push(s);
                return new o.data.Query(c).sort([{
                    field: "start",
                    dir: "asc"
                }, {
                    field: "end",
                    dir: "asc"
                }]).groupBy({
                    field: "startDate"
                }).toArray()
            },
            _renderTaskGroups: function(e, t) {
                var n, i, r, a, s, l, c, d, u, h = [],
                    f = this.options.editable,
                    p = f && f.destroy !== !1 && !this._isMobile(),
                    m = this._isMobilePhoneView();
                for (n = 0; e.length > n; n++)
                    for (i = e[n].value, r = e[n].items, a = o.date.isToday(i), s = 0; r.length > s; s++) {
                        if (l = r[s], c = [], d = m ? [] : c, 0 === n && 0 === s && t.length)
                            for (u = 0; t.length > u; u++) d.push(o.format('<td class="k-scheduler-groupcolumn{2}" rowspan="{0}">{1}</td>', t[u].rowSpan, this._groupTemplate({
                                value: t[u].text
                            }), t[u].className));
                        0 === s && (m ? (d.push(o.format('<td class="k-scheduler-datecolumn" colspan="2">{0}</td>', this._dateTemplate({
                            date: i
                        }))), h.push('<tr role="row" aria-selected="false"' + (a ? ' class="k-today">' : ">") + d.join("") + "</tr>")) : c.push(o.format('<td class="k-scheduler-datecolumn{3}{2}" rowspan="{0}">{1}</td>', r.length, this._dateTemplate({
                            date: i
                        }), n != e.length - 1 || t.length ? "" : " k-last", t.length ? "" : " k-first"))), l.format = l.head ? "{0:t}" : l.tail ? "{1:t}" : "{0:t}-{1:t}", l.resources = this.eventResources(l), c.push(o.format('<td class="k-scheduler-timecolumn"><div>{0}{1}{2}</div></td><td>{3}</td>', l.tail || l.middle ? '<span class="k-icon k-i-arrow-w"></span>' : "", this._timeTemplate(l.clone({
                            start: l._startTime || l.start,
                            end: l.endTime || l.end
                        })), l.head || l.middle ? '<span class="k-icon k-i-arrow-e"></span>' : "", this._eventTemplate(l.clone({
                            showDelete: p
                        })))), h.push('<tr role="row" aria-selected="false"' + (a ? ' class="k-today">' : ">") + c.join("") + "</tr>")
                    }
                return h.join("")
            },
            render: function(e) {
                var t, n, r = this.content.find("table").empty(),
                    o = [];
                e.length > 0 && (t = this.groupedResources, t.length ? (o = this._createGroupConfiguration(e, t, null), this._renderGroups(o, r, [])) : (o = this._tasks(e), r.append(this._renderTaskGroups(o, [])))), n = this._eventsList = i(o), this._angularItems(r, n), this.refreshLayout(), this.trigger("activate")
            },
            _angularItems: function(e, t) {
                this.angular("compile", function() {
                    var n = [],
                        i = t.map(function(t) {
                            return n.push({
                                dataItem: t
                            }), e.find(".k-task[" + o.attr("uid") + "=" + t.uid + "]")
                        });
                    return {
                        elements: i,
                        data: n
                    }
                })
            },
            _renderGroups: function(e, t, n) {
                var i, r, o;
                for (i = 0, r = e.length; r > i; i++) o = n.splice(0), o.push(e[i]), e[i].groups ? this._renderGroups(e[i].groups, t, o) : t.append(this._renderTaskGroups(e[i].items, o))
            },
            _createGroupConfiguration: function(e, i, r) {
                var s, l, c, d, u, h, f, p = i[0],
                    m = [],
                    g = p.dataSource.view(),
                    v = this._isMobilePhoneView();
                for (s = 0; g.length > s; s++) l = n(p, g[s]), c = new o.data.Query(e).filter({
                    field: p.field,
                    operator: a.SchedulerView.groupEqFilter(l)
                }).toArray(), c.length && (d = this._tasks(c), u = r ? "" : " k-first", s === g.length - 1 && (!r || r.className.indexOf("k-last") > -1) && (u += " k-last"), h = {
                    text: o.getter(p.dataTextField)(g[s]),
                    value: l,
                    rowSpan: 0,
                    className: u
                }, i.length > 1 ? (h.groups = this._createGroupConfiguration(c, i.slice(1), h), r && (r.rowSpan += h.rowSpan)) : (h.items = d, f = t(h.items), v && (f += h.items.length), h.rowSpan = f, r && (r.rowSpan += f)), m.push(h));
                return m
            },
            selectionByElement: function(t) {
                var n, i, r;
                return t = e(t), !t.hasClass("k-scheduler-datecolumn") && this._eventsList.length ? (t.is(".k-task") && (t = t.closest("td")), this._isMobile() ? (r = t.parent(), n = r.parent().children().filter(function() {
                    return e(this).children(":not(.k-scheduler-datecolumn)").length
                }).index(r)) : n = t.parent().index(), i = this._eventsList[n], {
                    index: n,
                    start: i.start,
                    end: i.end,
                    isAllDay: i.isAllDay,
                    uid: i.uid
                }) : void 0
            },
            select: function(e) {
                this.clearSelection();
                var t = this.table.find(".k-task").eq(e.index).closest("tr").addClass("k-state-selected").attr("aria-selected", !0)[0];
                this.current(t)
            },
            move: function(e, t) {
                var n, i = !1,
                    r = e.index;
                return t == o.keys.UP ? (r--, i = !0) : t == o.keys.DOWN && (r++, i = !0), i && (n = this._eventsList[r], n && (e.start = n.start, e.end = n.end, e.isAllDay = n.isAllDay, e.events = [n.uid], e.index = r)), i
            },
            moveToEvent: function() {
                return !1
            },
            constrainSelection: function(e) {
                var t = this._eventsList[0];
                t && (e.start = t.start, e.end = t.end, e.isAllDay = t.isAllDay, e.events = [t.uid], e.index = 0)
            },
            isInRange: function() {
                return !0
            },
            destroy: function() {
                this.element && this.element.off(s), a.SchedulerView.fn.destroy.call(this)
            },
            options: {
                title: "Agenda",
                name: "agenda",
                editable: !0,
                selectedDateFormat: "{0:D}-{1:D}",
                selectedShortDateFormat: "{0:d} - {1:d}",
                eventTemplate: "#:title#",
                eventTimeTemplate: "#if(data.isAllDay) {##=this.options.messages.allDay##} else { ##=kendo.format(format, start, end)## } #",
                eventDateTemplate: '<span class="k-scheduler-agendaday">#=kendo.toString(date, "dd")#</span><span class="k-scheduler-agendaweek">#=kendo.toString(date,"dddd")#</span><span class="k-scheduler-agendadate">#=kendo.toString(date, "y")#</span>',
                eventGroupTemplate: '<strong class="k-scheduler-adgendagroup">#=value#</strong>',
                messages: {
                    event: "Event",
                    date: "Date",
                    time: "Time",
                    allDay: "all day"
                }
            }
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.scheduler.monthview.min", ["kendo.scheduler.view.min"], e)
}(function() {
    return function(e) {
        function t(e, t) {
            return e.slice(t).concat(e.slice(0, t))
        }

        function n(e, t) {
            for (var n = t.firstDay, i = new Date(e.getFullYear(), e.getMonth(), 0, e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()); i.getDay() != n;) r.date.setTime(i, -1 * d);
            return i
        }

        function i(e, t, n) {
            var i, r = t,
                o = n;
            return i = e, i >= r && o >= i
        }
        var r = window.kendo,
            o = r.ui,
            a = o.SchedulerView,
            s = ".kendoMonthView",
            l = e.extend,
            c = r.date.getDate,
            d = r.date.MS_PER_DAY,
            u = 6,
            h = 7,
            f = r.template('<span class="k-link k-nav-day">#:kendo.toString(date, "dd")#</span>'),
            p = '<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color #; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#"#} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-w"></span>#}## if(data.isException()) {#<span class="k-icon k-i-exception"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-refresh"></span>#}#</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete"><span class="k-icon k-si-close"></span></a>#}## if(data.head || data.middle) {#<span class="k-icon k-i-arrow-e"></span>#}#</span># if(resizable && !data.tail && !data.middle) {#<span class="k-resize-handle k-resize-w"></span>#}## if(resizable && !data.head && !data.middle) {#<span class="k-resize-handle k-resize-e"></span>#}#</div>',
            m = r.template('<div title="#=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template">#:title#</div></div>'),
            g = r.template('<div style="width:#=width#px;left:#=left#px;top:#=top#px" class="k-more-events k-button"><span>...</span></div>');
        o.MonthView = a.extend({
            init: function(e, t) {
                var n = this;
                a.fn.init.call(n, e, t), n.title = n.options.title, n._templates(), n._editable(), n._renderLayout(n.options.date), n._groups()
            },
            name: "month",
            _updateDirection: function(e, t, n, i, r) {
                var o, a, s, l, c;
                n && (o = t[0].start, a = t[t.length - 1].end, s = o.index === a.index, l = o.collectionIndex === a.collectionIndex, c = r ? s && l || l : s && l, c && (e.backward = i))
            },
            _changeViewPeriod: function(e, t, n) {
                var i = n ? 7 : 1;
                return t && (i *= -1), e.start = r.date.addDays(e.start, i), e.end = r.date.addDays(e.end, i), (!n || n && this._isVerticallyGrouped()) && (e.groupIndex = t ? this.groups.length - 1 : 0), e.events = [], !0
            },
            _continuousSlot: function(e, t, n) {
                var i = e.backward ? 0 : t.length - 1,
                    r = this.groups[e.groupIndex];
                return r.continuousSlot(t[i].start, n)
            },
            _changeGroupContinuously: function(e, t, n, i) {
                var r, o, a, s;
                return n || (r = e.groupIndex, o = this.groups.length - 1, a = this._isVerticallyGrouped(), s = this.groups[r], !t && a ? (t = s[i ? "lastSlot" : "firstSlot"](), r += i ? -1 : 1) : t && !a && (r = i ? o : 0), (0 > r || r > o) && (r = i ? o : 0, t = null), e.groupIndex = r), t
            },
            _normalizeHorizontalSelection: function(e, t, n) {
                var i;
                return i = n ? t[0].start : t[t.length - 1].end
            },
            _normalizeVerticalSelection: function(e, t) {
                var n;
                return n = e.backward ? t[0].start : t[t.length - 1].end
            },
            _templates: function() {
                var e = this.options,
                    t = l({}, r.Template, e.templateSettings);
                this.eventTemplate = this._eventTmpl(e.eventTemplate, p), this.dayTemplate = r.template(e.dayTemplate, t), this.groupHeaderTemplate = r.template(e.groupHeaderTemplate, t)
            },
            dateForTitle: function() {
                return r.format(this.options.selectedDateFormat, this._firstDayOfMonth, this._lastDayOfMonth)
            },
            shortDateForTitle: function() {
                return r.format(this.options.selectedShortDateFormat, this._firstDayOfMonth, this._lastDayOfMonth)
            },
            nextDate: function() {
                return r.date.nextDay(this._lastDayOfMonth)
            },
            previousDate: function() {
                return r.date.previousDay(this._firstDayOfMonth)
            },
            startDate: function() {
                return this._startDate
            },
            endDate: function() {
                return this._endDate
            },
            _renderLayout: function(t) {
                var i = this;
                this._firstDayOfMonth = r.date.firstDayOfMonth(t), this._lastDayOfMonth = r.date.lastDayOfMonth(t), this._startDate = n(t, this.calendarInfo()), this.createLayout(this._layout()), this._content(), this.refreshLayout(), this.content.on("click" + s, ".k-nav-day,.k-more-events", function(t) {
                    var n = e(t.currentTarget).offset(),
                        r = i._slotByPosition(n.left, n.top);
                    t.preventDefault(), i.trigger("navigate", {
                        view: "day",
                        date: r.startDate()
                    })
                })
            },
            _editable: function() {
                this.options.editable && !this._isMobilePhoneView() && (this._isMobile() ? this._touchEditable() : this._mouseEditable())
            },
            _mouseEditable: function() {
                var t = this;
                t.element.on("click" + s, ".k-scheduler-monthview .k-event a:has(.k-si-close)", function(n) {
                    t.trigger("remove", {
                        uid: e(this).closest(".k-event").attr(r.attr("uid"))
                    }), n.preventDefault()
                }), t.options.editable.create !== !1 && t.element.on("dblclick" + s, ".k-scheduler-monthview .k-scheduler-content td", function(n) {
                    var i, r = e(n.currentTarget).offset(),
                        o = t._slotByPosition(r.left, r.top);
                    o && (i = t._resourceBySlot(o), t.trigger("add", {
                        eventInfo: l({
                            isAllDay: !0,
                            start: o.startDate(),
                            end: o.startDate()
                        }, i)
                    })), n.preventDefault()
                }), t.options.editable.update !== !1 && t.element.on("dblclick" + s, ".k-scheduler-monthview .k-event", function(n) {
                    t.trigger("edit", {
                        uid: e(this).closest(".k-event").attr(r.attr("uid"))
                    }), n.preventDefault()
                })
            },
            _touchEditable: function() {
                var t = this,
                    n = 0;
                r.support.mobileOS.android && (n = 5), t.options.editable.create !== !1 && (t._addUserEvents = new r.UserEvents(t.element, {
                    threshold: n,
                    filter: ".k-scheduler-monthview .k-scheduler-content td",
                    tap: function(n) {
                        var i, r = e(n.target).offset(),
                            o = t._slotByPosition(r.left, r.top);
                        o && (i = t._resourceBySlot(o), t.trigger("add", {
                            eventInfo: l({
                                isAllDay: !0,
                                start: o.startDate(),
                                end: o.startDate()
                            }, i)
                        })), n.preventDefault()
                    }
                })), t.options.editable.update !== !1 && (t._editUserEvents = new r.UserEvents(t.element, {
                    threshold: n,
                    filter: ".k-scheduler-monthview .k-event",
                    tap: function(n) {
                        0 === e(n.event.target).closest("a:has(.k-si-close)").length && (t.trigger("edit", {
                            uid: e(n.target).closest(".k-event").attr(r.attr("uid"))
                        }), n.preventDefault())
                    }
                }))
            },
            selectionByElement: function(t) {
                var n = e(t).offset();
                return this._slotByPosition(n.left, n.top)
            },
            _columnCountForLevel: function(e) {
                var t = this.columnLevels[e];
                return t ? t.length : 0
            },
            _rowCountForLevel: function(e) {
                var t = this.rowLevels[e];
                return t ? t.length : 0
            },
            _content: function() {
                var e, t = "<tbody>",
                    n = 1,
                    i = this.groupedResources;
                for (i.length && this._isVerticallyGrouped() && (n = this._rowCountForLevel(i.length - 1)), e = 0; n > e; e++) t += this._createCalendar(e);
                t += "</tbody>", this.content.find("table").html(t)
            },
            _createCalendar: function(e) {
                var t, n, i, o, a = this.startDate(),
                    s = h * u,
                    l = h,
                    c = [a],
                    d = "",
                    f = 1,
                    p = this._isVerticallyGrouped(),
                    m = this.groupedResources;
                for (m.length && (p || (f = this._columnCountForLevel(m.length - 1))), this._slotIndices = {}, t = 0, n = s / l; n > t; t++) {
                    for (d += "<tr>", c.push(a), i = t * l, o = 0; f > o; o++) d += this._createRow(a, i, l, p ? e : o);
                    a = r.date.addDays(a, l), d += "</tr>"
                }
                return this._weekStartDates = c, this._endDate = r.date.previousDay(a), d
            },
            _createRow: function(e, t, n, i) {
                var o, a = this,
                    s = a._firstDayOfMonth,
                    l = a._lastDayOfMonth,
                    d = a.dayTemplate,
                    u = "",
                    h = "",
                    f = function() {
                        return a._resourceBySlot({
                            groupIndex: i
                        })
                    };
                for (o = 0; n > o; o++) u = "", r.date.isToday(e) && (u += "k-today"), r.date.isInDateRange(e, s, l) || (u += " k-other-month"), h += "<td ", "" !== u && (h += 'class="' + u + '"'), h += ">", h += d({
                    date: e,
                    resources: f
                }), h += "</td>", a._slotIndices[c(e).getTime()] = t + o, e = r.date.nextDay(e);
                return h
            },
            _layout: function() {
                var q = this.options, n, i, r, o = this.calendarInfo(),
                    a = this._isMobile() ? o.days.namesShort : q.showDayAbbreviations ? o.days.namesAbbr : o.days.names,
                    s = t(a, o.firstDay),
                    l = e.map(s, function(e) {
                        return {
                            text: e
                        }
                    }),
                    c = this.groupedResources;
                if (c.length)
                    if (this._isVerticallyGrouped()) {
                        for (i = [], r = 0; 6 > r; r++) i.push({
                            text: "<div>&nbsp;</div>",
                            className: "k-hidden k-slot-cell"
                        });
                        n = this._createRowsLayout(c, i, this.groupHeaderTemplate)
                    } else l = this._createColumnsLayout(c, l, this.groupHeaderTemplate);
                return {
                    columns: l,
                    rows: n
                }
            },
            _createEventElement: function(t) {
                var n, i = this.options,
                    o = i.editable,
                    a = this._isMobile();
                return t.showDelete = o && o.destroy !== !1 && !a, t.resizable = o && o.resize !== !1 && !a, t.ns = r.ns, t.resources = this.eventResources(t), t.inverseColor = t.resources && t.resources[0] ? this._shouldInverseResourceColor(t.resources[0]) : !1, n = e(this.eventTemplate(t)), this.angular("compile", function() {
                    return {
                        elements: n,
                        data: [{
                            dataItem: t
                        }]
                    }
                }), n
            },
            _isInDateSlot: function(e) {
                var t = this.groups[0],
                    n = t.firstSlot().start,
                    o = t.lastSlot().end - 1,
                    a = r.date.toUtcTime(e.start),
                    s = r.date.toUtcTime(e.end);
                return (i(a, n, o) || i(s, n, o) || i(n, a, s) || i(o, a, s)) && (!i(s, n, n) || i(s, a, a) || e.isAllDay)
            },
            _slotIndex: function(e) {
                return this._slotIndices[c(e).getTime()]
            },
            _positionMobileEvent: function(t, n, i) {
                var o, s, l, c, d, u, h, f = t.start;
                t.start.offsetLeft > t.end.offsetLeft && (f = t.end), o = t.start.index, s = o, l = 3, c = a.collidingEvents(t.events(), o, s), c.push({
                    element: n,
                    start: o,
                    end: s
                }), d = a.createRows(c), u = t.collection.at(o), h = u.container, h || (h = e(r.format('<div class="k-events-container" style="top:{0};left:{1};width:{2}"/>', f.offsetTop + f.firstChildTop + f.firstChildHeight - 3 + "px", f.offsetLeft + "px", f.offsetWidth + "px")), u.container = h, this.content[0].appendChild(h[0])), l >= d.length && (t.addEvent({
                    element: n,
                    start: o,
                    end: s,
                    groupIndex: f.groupIndex
                }), i._continuousEvents.push({
                    element: n,
                    uid: n.attr(r.attr("uid")),
                    start: t.start,
                    end: t.end
                }), h[0].appendChild(n[0]))
            },
            _positionEvent: function(t, n, i) {
                var o, s, l, c, d, u, h, f, p, m, v, _, b, w, y, k = this.options.eventHeight,
                    x = t.start;
                for (t.start.offsetLeft > t.end.offsetLeft && (x = t.end), o = t.start.index, s = t.end.index, l = x.eventCount, c = a.collidingEvents(t.events(), o, s), d = o !== s ? 5 : 4, c.push({
                    element: n,
                    start: o,
                    end: s
                }), u = a.createRows(c), h = 0, f = Math.min(u.length, l); f > h; h++)
                    for (p = u[h].events, m = x.offsetTop + x.firstChildHeight + h * k + 3 * h + "px", v = 0, _ = p.length; _ > v; v++) p[v].element[0].style.top = m;
                if (u.length > l)
                    for (b = o; s >= b; b++) {
                        if (w = t.collection, y = w.at(b), y.more) return;
                        y.more = e(g({
                            ns: r.ns,
                            start: b,
                            end: b,
                            width: y.clientWidth - 2,
                            left: y.offsetLeft + 2,
                            top: y.offsetTop + y.firstChildHeight + l * k + 3 * l
                        })), this.content[0].appendChild(y.more[0])
                    } else t.addEvent({
                    element: n,
                    start: o,
                    end: s,
                    groupIndex: x.groupIndex
                }), n[0].style.width = t.innerWidth() - d + "px", n[0].style.left = x.offsetLeft + 2 + "px", n[0].style.height = k + "px", i._continuousEvents.push({
                    element: n,
                    uid: n.attr(r.attr("uid")),
                    start: t.start,
                    end: t.end
                }), n.appendTo(this.content)
            },
            _slotByPosition: function(e, t) {
                var n, i, r = this.content.offset();
                for (e -= r.left, t -= r.top, t += this.content[0].scrollTop, e += this.content[0].scrollLeft, e = Math.ceil(e), t = Math.ceil(t), n = 0; this.groups.length > n; n++)
                    if (i = this.groups[n].daySlotByPosition(e, t)) return i;
                return null
            },
            _createResizeHint: function(e) {
                var t = e.startSlot().offsetLeft,
                    n = e.start.offsetTop,
                    i = e.innerWidth(),
                    r = e.start.clientHeight - 2,
                    o = a.fn._createResizeHint.call(this, t, n, i, r);
                o.appendTo(this.content), this._resizeHint = this._resizeHint.add(o)
            },
            _updateResizeHint: function(e, t, n, i) {
                var o, a, s;
                for (this._removeResizeHint(), o = this.groups[t], a = o.ranges(n, i, !0, e.isAllDay), s = 0; a.length > s; s++) this._createResizeHint(a[s]);
                this._resizeHint.find(".k-label-top,.k-label-bottom").text(""), this._resizeHint.first().addClass("k-first").find(".k-label-top").text(r.toString(r.timezone.toLocalDate(n), "M/dd")), this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(r.toString(r.timezone.toLocalDate(i), "M/dd"))
            },
            _updateMoveHint: function(e, t, n) {
                var i, o, a, s, l, c = r.date.toUtcTime(e.start) + n,
                    d = c + e.duration(),
                    u = this.groups[t],
                    h = u.ranges(c, d, !0, e.isAllDay);
                for (this._removeMoveHint(), i = 0; h.length > i; i++) o = h[i], a = o.startSlot(), s = o.endSlot(), l = this._createEventElement(e.clone({
                    head: o.head,
                    tail: o.tail
                })), l.css({
                    left: a.offsetLeft + 2,
                    top: a.offsetTop + a.firstChildHeight,
                    height: this.options.eventHeight,
                    width: o.innerWidth() - (a.index !== s.index ? 5 : 4)
                }), l.addClass("k-event-drag-hint"), l.appendTo(this.content), this._moveHint = this._moveHint.add(l)
            },
            _groups: function() {
                var e, t, n, i, o, a, s, l, c, d, f, p, m, g, v, _, b, w, y, k = this._groupCount(),
                    x = h,
                    C = u;
                for (this.groups = [], e = 0; k > e; e++) this._addResourceView(e);
                for (t = this.content[0].getElementsByTagName("tr"), n = this.startDate(), i = 0; k > i; i++)
                    for (o = 0, a = 0, this._isVerticallyGrouped() && (a = i), s = a * C;
                         (a + 1) * C > s; s++)
                        for (l = this.groups[i], c = l.addDaySlotCollection(r.date.addDays(n, o), r.date.addDays(this.startDate(), o + x)), d = t[s], f = d.children, p = 0, d.setAttribute("role", "row"), this._isVerticallyGrouped() || (p = i), m = p * x;
                             (p + 1) * x > m; m++) g = f[m], v = g.clientHeight, _ = g.children.length ? g.children[0].offsetHeight + 3 : 0, b = r.date.addDays(n, o), w = r.date.MS_PER_DAY, n.getHours() !== b.getHours() && (w += (n.getHours() - b.getHours()) * r.date.MS_PER_HOUR), b = r.date.toUtcTime(b), w += b, o++, y = Math.floor((v - _ - this.options.moreButtonHeight) / (this.options.eventHeight + 3)), g.setAttribute("role", "gridcell"), g.setAttribute("aria-selected", !1), c.addDaySlot(g, b, w, y)
            },
            render: function(e) {
                this.content.children(".k-event,.k-more-events,.k-events-container").remove(), this._groups(), e = new r.data.Query(e).sort([{
                    field: "start",
                    dir: "asc"
                }, {
                    field: "end",
                    dir: "desc"
                }]).toArray();
                var t = this.groupedResources;
                t.length ? this._renderGroups(e, t, 0, 1) : this._renderEvents(e, 0), this.refreshLayout(), this.trigger("activate")
            },
            _renderEvents: function(e, t) {
                var n, i, r, o, a, s, l, c, d, u, h, f = this._isMobilePhoneView();
                for (i = 0, r = e.length; r > i; i++)
                    if (n = e[i], this._isInDateSlot(n))
                        for (o = this.groups[t], o._continuousEvents || (o._continuousEvents = []), a = o.slotRanges(n, !0), s = a.length, l = 0; s > l; l++) c = a[l], d = n.start, u = n.end, s > 1 && (0 === l ? u = c.end.endDate() : l == s - 1 ? d = c.start.startDate() : (d = c.start.startDate(), u = c.end.endDate())), h = n.clone({
                            start: d,
                            end: u,
                            head: c.head,
                            tail: c.tail
                        }), f ? this._positionMobileEvent(c, this._createEventElement(h), o) : this._positionEvent(c, this._createEventElement(h), o)
            },
            _renderGroups: function(e, t, n, i) {
                var o, s, l, c, d = t[0];
                if (d)
                    for (o = d.dataSource.view(), s = 0; o.length > s; s++) l = this._resourceValue(d, o[s]), c = new r.data.Query(e).filter({
                        field: d.field,
                        operator: a.groupEqFilter(l)
                    }).toArray(), t.length > 1 ? n = this._renderGroups(c, t.slice(1), n++, i + 1) : this._renderEvents(c, n++);
                return n
            },
            _groupCount: function() {
                var e = this.groupedResources;
                return e.length ? this._isVerticallyGrouped() ? this._rowCountForLevel(e.length - 1) : this._columnCountForLevel(e.length) / this._columnOffsetForResource(e.length) : 1
            },
            _columnOffsetForResource: function(e) {
                return this._columnCountForLevel(e) / this._columnCountForLevel(e - 1)
            },
            destroy: function() {
                this.table && this.table.removeClass("k-scheduler-monthview"), this.content && this.content.off(s), this.element && this.element.off(s), a.fn.destroy.call(this), this._isMobile() && !this._isMobilePhoneView() && this.options.editable && (this.options.editable.create !== !1 && this._addUserEvents.destroy(), this.options.editable.update !== !1 && this._editUserEvents.destroy())
            },
            events: ["remove", "add", "edit", "navigate"],
            options: {
                title: "Month",
                name: "month",
                eventHeight: 25,
                moreButtonHeight: 13,
                editable: !0,
                selectedDateFormat: "{0:y}",
                selectedShortDateFormat: "{0:y}",
                groupHeaderTemplate: "#=text#",
                dayTemplate: f,
                eventTemplate: m
            }
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.scheduler.recurrence.min", ["kendo.dropdownlist.min", "kendo.datepicker.min", "kendo.numerictextbox.min"], e)
}(function() {
    return function(e, t) {
        function n(e, t) {
            var n;
            return 0 !== e && t > e ? n = t - e : (n = e % t, n && (n = t - n)), n
        }

        function i(e) {
            var t = e.getMonth(),
                n = g(e) ? te[t] : ne[t];
            return n + e.getDate()
        }

        function r(e, n) {
            var i, r;
            return e = new Date(e.getFullYear(), e.getMonth(), e.getDate()), J(e, 0), i = e.getFullYear(), n !== t ? (X(e, n, -1), e.setDate(e.getDate() + 4)) : e.setDate(e.getDate() + (4 - (e.getDay() || 7))), J(e, 0), r = Math.floor((e.getTime() - new Date(i, 0, 1, -6)) / 864e5), 1 + Math.floor(r / 7)
        }

        function o(e, t) {
            var n = Z(e).getDay(),
                i = 7 - (n + 7 - (t || 7)) || 7;
            return 0 > i && (i += 7), Math.ceil((e.getDate() - i) / 7) + 1
        }

        function a(e, t) {
            return e + (t > e ? 7 : 0)
        }

        function s(e, t, n) {
            var i, r, s, l, c, d = t.offset;
            return d ? (i = new Date(e.getFullYear(), e.getMonth() + 1, 0), r = o(i, n), s = a(t.day, n), l = s < a(new Date(e.getFullYear(), e.getMonth(), 1).getDay(), n), c = s > a(i.getDay(), n), 0 > d ? d = r + (d + 1 - (c ? 1 : 0)) : l && (d += 1), r -= c ? 1 : 0, (l ? 1 : 0) > d || d > r ? null : d) : o(e, n)
        }

        function l(e, t) {
            return o(new Date(e.getFullYear(), e.getMonth() + 1, 0), t)
        }

        function c(e, t, n) {
            return o(e, n) === s(e, t, n)
        }

        function d(e, t, n) {
            for (var i, r, l, c, d = a(t.getDay(), n), u = e.length, h = [], f = 0; u > f; f++)
                if (r = e[f], c = o(t, n), i = s(t, r, n), null !== i)
                    if (i > c) h.push(r);
                    else if (c === i)
                        if (l = a(r.day, n), l > d) h.push(r);
                        else if (d === l) return null;
            return h
        }

        function u(e, t, n) {
            for (var i, r = 0, o = e.length, a = []; o > r; r++) {
                if (i = e[r], n && (i = n(i)), t === i) return null;
                i > t && a.push(i)
            }
            return a
        }

        function h(e, t) {
            for (var n, i = 0, r = e.length; r > i; i++) {
                if (n = parseInt(e[i], 10), isNaN(n) || t.start > n || n > t.end || 0 === n && 0 > t.start) return null;
                e[i] = n
            }
            return e.sort(v)
        }

        function f(e) {
            for (var n, i, r, o = 0, a = e.length; a > o; o++) {
                if (n = e[o], i = n.length, r = n.substring(i - 2).toUpperCase(), r = oe[r], r === t) return null;
                e[o] = {
                    offset: parseInt(n.substring(0, i - 2), 10) || 0,
                    day: r
                }
            }
            return e
        }

        function p(e) {
            for (var t, n, i = 0, r = e.length, o = []; r > i; i++) t = e[i], "string" == typeof t ? n = t : (n = "" + re[t.day], t.offset && (n = t.offset + n)), o.push(n);
            return "" + o
        }

        function m(e) {
            var t = e.getMonth();
            return 1 === t ? 1 === new Date(e.getFullYear(), 1, 29).getMonth() ? 29 : 28 : ie[t]
        }

        function g(e) {
            return e = e.getFullYear(), e % 4 === 0 && e % 100 !== 0 || e % 400 === 0
        }

        function v(e, t) {
            return e - t
        }

        function _(e, t) {
            var n, i, r = 0,
                o = [];
            if (e)
                for (e = e.split(";"), n = e.length; n > r; r++) i = T(e[r], t), i && o.push(i);
            return o
        }

        function b(t, n, i) {
            for (var r = e.isArray(t) ? t : _(t, i), o = n.getTime() - n.getMilliseconds(), a = 0, s = r.length; s > a; a++)
                if (r[a].getTime() === o) return !0;
            return !1
        }

        function w(e, t) {
            var n, i, r = 0,
                o = [].concat(e);
            for (n = o.length; n > r; r++) i = o[r], i = W.timezone.convert(i, t || i.getTimezoneOffset(), "Etc/UTC"), o[r] = W.toString(i, ce);
            return o.join(";") + ";"
        }

        function y(e, t) {
            var n = new Date(e);
            switch (t.freq) {
                case "yearly":
                    n.setFullYear(n.getFullYear(), 0, 1);
                    break;
                case "monthly":
                    n.setFullYear(n.getFullYear(), n.getMonth(), 1);
                    break;
                case "weekly":
                    X(n, t.weekStart, -1)
            }
            return t.hours && n.setHours(0), t.minutes && n.setMinutes(0), t.seconds && n.setSeconds(0), n
        }

        function k(e, t) {
            var n = new Date(e);
            switch (t.freq) {
                case "yearly":
                    n.setFullYear(n.getFullYear(), 11, 31);
                    break;
                case "monthly":
                    n.setFullYear(n.getFullYear(), n.getMonth() + 1, 0);
                    break;
                case "weekly":
                    X(n, t.weekStart, -1), n.setDate(n.getDate() + 6)
            }
            return t.hours && n.setHours(23), t.minutes && n.setMinutes(59), t.seconds && n.setSeconds(59), n
        }

        function x(e, t, n) {
            var i, r, o, a, s = e.length,
                l = [];
            for (o = 0, a = n.length; a > o; o++) i = n[o], 0 > i ? i = s + i : i -= 1, r = e[i], r && r.start >= t && l.push(r);
            return l
        }

        function C(e, t, n) {
            var i, r, o = [];
            for (r = 0; e.length > r; r++) i = e[r], b(t, i.start, n) || o.push(i);
            return o
        }

        function S(e, n, i, r) {
            var o, a, s, l, c, d, u, h, f, p, m, g, v, S, T, D, E, F, I, M, R, P, z, B = A(e.recurrenceRule, r),
                L = [];
            if (!B) return [e];
            for (M = B.positions, R = M ? 0 : 1, p = B.start, m = B.end, (p || m) && (e = e.clone({
                start: p ? new Date(p.value[0]) : t,
                end: m ? new Date(m.value[0]) : t
            })), E = e.start, D = E.getTime(), T = ee(E), S = _(e.recurrenceException, r), !S[0] && B.exdates && (S = B.exdates.value, e.set("recurrenceException", w(S, r))), h = n = new Date(n), i = new Date(i), v = B.freq, I = ve[v], F = B.count, B.until && i > B.until && (i = new Date(B.until)), g = "yearly" === v || "monthly" === v || "weekly" === v, D > n || F || B.interval > 1 || g ? n = new Date(D) : (l = n.getHours(), c = n.getMinutes(), d = n.getSeconds(), B.hours || (l = E.getHours()), B.minutes || (c = E.getMinutes()), B.seconds || (d = E.getSeconds()), n.setHours(l, c, d, E.getMilliseconds())), B._startPeriod = new Date(n), M && (n = y(n, B), i = k(i, B), z = ee(i) - ee(n), 0 > z && (l = n.getHours(), i.setHours(l, n.getMinutes(), n.getSeconds(), n.getMilliseconds()), K.adjustDST(i, l)), B._startPeriod = new Date(n), B._endPeriod = k(n, B)), u = e.duration(), B._startTime = o = K.toInvariantTime(n), I.setup && I.setup(B, E, n), I.limit(n, i, B); i >= n;)
                if (s = new Date(n), Q(s, u), f = n >= h || s > h, (f && !b(S, n, r) || M) && (o = K.toUtcTime(K.getDate(n)) + ee(B._startTime), a = o + u, D !== n.getTime() || T !== ee(B._startTime) ? L.push(e.toOccurrence({
                    start: new Date(n),
                    end: s,
                    _startTime: o,
                    _endTime: a
                })) : (e._startTime = o, e._endTime = a, L.push(e))), M) {
                    if (I.next(n, B), I.limit(n, i, B), n > B._endPeriod && (P = x(L.slice(R), E, M), P = C(P, S, r), L = L.slice(0, R).concat(P), B._endPeriod = k(n, B), R = L.length), F && F === R) break
                } else {
                    if (F && F === R) break;
                    R += 1, I.next(n, B), I.limit(n, i, B)
                } return L
        }

        function T(e, t) {
            return e = W.parseDate(e, ae), e && t && (e = j.convert(e, e.getTimezoneOffset(), t)), e
        }

        function D(e, n) {
            var i, r, o, a, s, l, c, d, u = e.split(";");
            for (c = 0, d = u.length; d > c; c++)
                if (i = u[c].split(":"), r = i[0], o = i[1], -1 !== r.indexOf("TZID") && (a = r.substring(r.indexOf("TZID")).split("=")[1]), o)
                    for (o = o.split(","), s = 0, l = o.length; l > s; s++) o[s] = T(o[s], a || n);
            return o ? {
                value: o,
                tzid: a
            } : t
        }

        function A(n, i) {
            var r, o, a, s, l, c, d, u, p, m = {},
                g = 0,
                v = !1,
                _ = function(e, t) {
                    var n = e.day,
                        i = t.day;
                    return u > n && (n += 7), u > i && (i += 7), n - i
                };
            if (!n) return null;
            for (c = n.split("\n"), c[1] || -1 === n.indexOf("DTSTART") && -1 === n.indexOf("DTEND") && -1 === n.indexOf("EXDATE") || (c = n.split(" ")), g = 0, a = c.length; a > g; g++) l = e.trim(c[g]), -1 !== l.indexOf("DTSTART") ? m.start = D(l, i) : -1 !== l.indexOf("DTEND") ? m.end = D(l, i) : -1 !== l.indexOf("EXDATE") ? m.exdates = D(l, i) : -1 !== l.indexOf("RRULE") ? s = l.substring(6) : e.trim(l) && (s = l);
            for (s = s.split(";"), g = 0, a = s.length; a > g; g++) switch (d = s[g], r = d.split("="), o = e.trim(r[1]).split(","), e.trim(r[0]).toUpperCase()) {
                case "FREQ":
                    m.freq = o[0].toLowerCase();
                    break;
                case "UNTIL":
                    m.until = T(o[0], i);
                    break;
                case "COUNT":
                    m.count = parseInt(o[0], 10);
                    break;
                case "INTERVAL":
                    m.interval = parseInt(o[0], 10);
                    break;
                case "BYSECOND":
                    m.seconds = h(o, {
                        start: 0,
                        end: 60
                    }), v = !0;
                    break;
                case "BYMINUTE":
                    m.minutes = h(o, {
                        start: 0,
                        end: 59
                    }), v = !0;
                    break;
                case "BYHOUR":
                    m.hours = h(o, {
                        start: 0,
                        end: 23
                    }), v = !0;
                    break;
                case "BYMONTHDAY":
                    m.monthDays = h(o, {
                        start: -31,
                        end: 31
                    }), v = !0;
                    break;
                case "BYYEARDAY":
                    m.yearDays = h(o, {
                        start: -366,
                        end: 366
                    }), v = !0;
                    break;
                case "BYMONTH":
                    m.months = h(o, {
                        start: 1,
                        end: 12
                    }), v = !0;
                    break;
                case "BYDAY":
                    m.weekDays = p = f(o), v = !0;
                    break;
                case "BYWEEKNO":
                    m.weeks = h(o, {
                        start: -53,
                        end: 53
                    }), v = !0;
                    break;
                case "BYSETPOS":
                    m.positions = h(o, {
                        start: -366,
                        end: 366
                    });
                    break;
                case "WKST":
                    m.weekStart = u = oe[o[0]]
            }
            return m.freq === t || m.count !== t && m.until ? null : (m.interval || (m.interval = 1), u === t && (m.weekStart = u = W.culture().calendar.firstDay), p && (m.weekDays = p.sort(_)), m.positions && !v && (m.positions = null), m._hasRuleValue = v, m)
        }

        function E(e, t) {
            for (var n, i = e.value, r = e.tzid || "", o = i.length, a = 0; o > a; a++) n = i[a], n = j.convert(n, r || t || n.getTimezoneOffset(), "Etc/UTC"), i[a] = W.toString(n, "yyyyMMddTHHmmssZ");
            return r && (r = ";TZID=" + r), r + ":" + i.join(",") + " "
        }

        function F(e, n) {
            var i = e.weekStart,
                r = "FREQ=" + e.freq.toUpperCase(),
                o = e.exdates || "",
                a = e.start || "",
                s = e.end || "",
                l = e.until;
            return e.interval > 1 && (r += ";INTERVAL=" + e.interval), e.count && (r += ";COUNT=" + e.count), l && (l = j.convert(l, n || l.getTimezoneOffset(), "Etc/UTC"), r += ";UNTIL=" + W.toString(l, "yyyyMMddTHHmmssZ")), e.months && (r += ";BYMONTH=" + e.months), e.weeks && (r += ";BYWEEKNO=" + e.weeks), e.yearDays && (r += ";BYYEARDAY=" + e.yearDays), e.monthDays && (r += ";BYMONTHDAY=" + e.monthDays), e.weekDays && (r += ";BYDAY=" + p(e.weekDays)), e.hours && (r += ";BYHOUR=" + e.hours), e.minutes && (r += ";BYMINUTE=" + e.minutes), e.seconds && (r += ";BYSECOND=" + e.seconds), e.positions && (r += ";BYSETPOS=" + e.positions), i !== t && (r += ";WKST=" + re[i]), a && (a = "DTSTART" + E(a, n)), s && (s = "DTEND" + E(s, n)), o && (o = "EXDATE" + E(o, n)), (a || s || o) && (r = a + s + o + "RRULE:" + r), r
        }
        var I, M, R, P, z, B, L, H, N, O, V, U, W = window.kendo,
            j = W.timezone,
            q = W.Class,
            G = W.ui,
            $ = G.Widget,
            Y = G.DropDownList,
            K = W.date,
            Q = K.setTime,
            X = K.setDayOfWeek,
            J = K.adjustDST,
            Z = K.firstDayOfMonth,
            ee = K.getMilliseconds,
            te = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366],
            ne = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365],
            ie = [31, 28, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31],
            re = {
                0: "SU",
                1: "MO",
                2: "TU",
                3: "WE",
                4: "TH",
                5: "FR",
                6: "SA"
            },
            oe = {
                SU: 0,
                MO: 1,
                TU: 2,
                WE: 3,
                TH: 4,
                FR: 5,
                SA: 6
            },
            ae = ["yyyy-MM-ddTHH:mm:ss.fffzzz", "yyyy-MM-ddTHH:mm:sszzz", "yyyy-MM-ddTHH:mm:ss", "yyyy-MM-ddTHH:mm", "yyyy-MM-ddTHH", "yyyy-MM-dd", "yyyyMMddTHHmmssfffzzz", "yyyyMMddTHHmmsszzz", "yyyyMMddTHHmmss", "yyyyMMddTHHmm", "yyyyMMddTHH", "yyyyMMdd"],
            se = ["months", "weeks", "yearDays", "monthDays", "weekDays", "hours", "minutes", "seconds"],
            le = se.length,
            ce = "yyyyMMddTHHmmssZ",
            de = {
                months: function(e, t, n) {
                    var i = n.months,
                        r = u(i, e.getMonth() + 1),
                        o = !1;
                    return null !== r && (r.length ? e.setMonth(r[0] - 1, 1) : e.setFullYear(e.getFullYear() + 1, i[0] - 1, 1), o = !0), o
                },
                monthDays: function(e, t, n) {
                    for (var i, r, o, a = !1, s = e.getHours(), l = function(e) {
                        return 0 > e && (e = i + e), e
                    }; t >= e;) {
                        if (r = e.getMonth(), i = m(e), o = u(n.monthDays, e.getDate(), l), null === o) return a;
                        if (a = !0, o.length) {
                            if (e.setMonth(r, o.sort(v)[0]), J(e, s), r === e.getMonth()) break
                        } else e.setMonth(r + 1, 1)
                    }
                    return a
                },
                yearDays: function(e, t, n) {
                    for (var r, o, a = !1, s = e.getHours(), l = function(e) {
                        return 0 > e && (e = r + e), e
                    }; t > e;) {
                        if (r = g(e) ? 366 : 365, o = u(n.yearDays, i(e), l),
                        null === o) return a;
                        if (a = !0, r = e.getFullYear(), o.length) {
                            e.setFullYear(r, 0, o.sort(v)[0]), J(e, s);
                            break
                        }
                        e.setFullYear(r + 1, 0, 1)
                    }
                    return a
                },
                weeks: function(e, t, n) {
                    for (var i, o, a, s = n.weekStart, l = !1, c = e.getHours(), d = function(e) {
                        return 0 > e && (e = 53 + e), e
                    }; t > e;) {
                        if (o = u(n.weeks, r(e, s), d), null === o) return l;
                        if (l = !0, i = e.getFullYear(), o.length) {
                            a = 7 * o.sort(v)[0] - 1, e.setFullYear(i, 0, a), X(e, s, -1), J(e, c);
                            break
                        }
                        e.setFullYear(i + 1, 0, 1)
                    }
                    return l
                },
                weekDays: function(e, t, n) {
                    var i, r, a = n.weekDays,
                        s = n.weekStart,
                        u = d(a, e, s),
                        h = e.getHours();
                    if (null === u) return !1;
                    if (i = u[0], i || (i = a[0], X(e, s)), r = i.day, i.offset)
                        for (; t >= e && !c(e, i, s);) o(e, s) === l(e, s) ? (e.setMonth(e.getMonth() + 1, 1), J(e, h)) : (e.setDate(e.getDate() + 7), J(e, h), X(e, s, -1));
                    return e.getDay() !== r && X(e, r), !0
                },
                hours: function(e, t, n) {
                    var i = n.hours,
                        r = n._startTime,
                        o = r.getHours(),
                        a = u(i, o),
                        s = !1;
                    return null !== a && (s = !0, e.setHours(o), J(e, o), a.length ? (a = a[0], e.setHours(a)) : (a = e.getHours(), e.setDate(e.getDate() + 1), J(e, a), a = i[0], e.setHours(a), J(e, a)), n.minutes && e.setMinutes(0), r.setHours(a, e.getMinutes())), s
                },
                minutes: function(e, t, n) {
                    var i = n.minutes,
                        r = e.getMinutes(),
                        o = u(i, r),
                        a = n._startTime.getHours(),
                        s = !1;
                    return null !== o && (s = !0, o.length ? o = o[0] : (a += 1, o = i[0]), n.seconds && e.setSeconds(0), e.setHours(a, o), a %= 24, J(e, a), n._startTime.setHours(a, o, e.getSeconds())), s
                },
                seconds: function(e, t, n) {
                    var i = n.seconds,
                        r = n._startTime.getHours(),
                        o = u(i, e.getSeconds()),
                        a = e.getMinutes(),
                        s = !1;
                    return null !== o && (s = !0, o.length ? e.setSeconds(o[0]) : (a += 1, e.setMinutes(a, i[0]), a > 59 && (a %= 60, r = (r + 1) % 24)), n._startTime.setHours(r, a, e.getSeconds())), s
                }
            },
            ue = q.extend({
                next: function(e, t) {
                    var n, i, r = t._startTime,
                        o = r.getDate();
                    if (t.seconds) i = e.getSeconds() + 1, e.setSeconds(i), r.setSeconds(i), r.setDate(o);
                    else {
                        if (!t.minutes) return !1;
                        n = e.getMinutes() + 1, e.setMinutes(n), r.setMinutes(n), r.setDate(o)
                    }
                    return !0
                },
                normalize: function(e) {
                    var t = e.rule;
                    4 === e.idx && t.hours && (t._startTime.setHours(0), this._hour(e.date, t))
                },
                limit: function(e, n, i) {
                    for (var r, o, a, s, l, c = i.interval; n >= e;) {
                        for (a = o = t, l = e.getDate(), s = 0; le > s; s++) {
                            if (r = se[s], i[r]) {
                                if (a = de[r](e, n, i), o !== t && a) break;
                                o = a
                            }
                            a && this.normalize({
                                date: e,
                                rule: i,
                                day: l,
                                idx: s
                            })
                        }
                        if ((1 === c || !this.interval(i, e)) && s === le) break
                    }
                },
                interval: function(e, t) {
                    var i, o, a = new Date(e._startPeriod),
                        s = new Date(t),
                        l = t.getHours(),
                        c = e.weekStart,
                        d = e.interval,
                        u = e.freq,
                        h = !1,
                        f = 0,
                        p = 0,
                        m = 1;
                    return "hourly" === u ? (i = s.getTimezoneOffset() - a.getTimezoneOffset(), o = e._startTime.getHours(), s = s.getTime(), l !== o && (s += (o - l) * K.MS_PER_HOUR), s -= a, i && (s -= i * K.MS_PER_MINUTE), i = Math.floor(s / K.MS_PER_HOUR), f = n(i, d), 0 !== f && (this._hour(t, e, f), h = !0)) : "daily" === u ? (K.setTime(s, -a, !0), i = Math.ceil(s / K.MS_PER_DAY), f = n(i, d), 0 !== f && (this._date(t, e, f), h = !0)) : "weekly" === u ? (i = 52 * (t.getFullYear() - a.getFullYear()), f = r(t, c) - r(a, c) + i, f = n(f, d), 0 !== f && (K.setDayOfWeek(t, e.weekStart, -1), t.setDate(t.getDate() + 7 * f), J(t, l), h = !0)) : "monthly" === u ? (i = t.getFullYear() - a.getFullYear(), i = t.getMonth() - a.getMonth() + 12 * i, f = n(i, d), 0 !== f && (m = e._hasRuleValue ? 1 : t.getDate(), t.setFullYear(t.getFullYear(), t.getMonth() + f, m), J(t, l), h = !0)) : "yearly" === u && (i = t.getFullYear() - a.getFullYear(), f = n(i, d), e.months || (p = t.getMonth()), e.yearDays || e.monthDays || e.weekDays || (m = t.getDate()), 0 !== f && (t.setFullYear(t.getFullYear() + f, p, m), J(t, l), h = !0)), h
                },
                _hour: function(e, t, n) {
                    var i = t._startTime,
                        r = i.getHours();
                    n && (r += n), e.setHours(r), r %= 24, i.setHours(r), J(e, r)
                },
                _date: function(e, t, n) {
                    var i = e.getHours();
                    e.setDate(e.getDate() + n), J(e, i) || this._hour(e, t)
                }
            }),
            he = ue.extend({
                next: function(e, t) {
                    ue.fn.next(e, t) || this._hour(e, t, 1)
                },
                normalize: function(e) {
                    var t = e.rule;
                    4 === e.idx && (t._startTime.setHours(0), this._hour(e.date, t))
                }
            }),
            fe = ue.extend({
                next: function(e, t) {
                    ue.fn.next(e, t) || this[t.hours ? "_hour" : "_date"](e, t, 1)
                }
            }),
            pe = fe.extend({
                setup: function(e, t) {
                    e.weekDays || (e.weekDays = [{
                        day: t.getDay(),
                        offset: 0
                    }])
                }
            }),
            me = ue.extend({
                next: function(e, t) {
                    var n, i;
                    if (!ue.fn.next(e, t))
                        if (t.hours) this._hour(e, t, 1);
                        else if (t.monthDays || t.weekDays || t.yearDays || t.weeks) this._date(e, t, 1);
                        else {
                            for (n = e.getDate(), i = e.getHours(), e.setMonth(e.getMonth() + 1), J(e, i); e.getDate() !== n;) e.setDate(n), J(e, i);
                            this._hour(e, t)
                        }
                },
                normalize: function(e) {
                    var t = e.rule,
                        n = e.date,
                        i = n.getHours();
                    0 !== e.idx || t.monthDays || t.weekDays ? ue.fn.normalize(e) : (n.setDate(e.day), J(n, i))
                },
                setup: function(e, t, n) {
                    e.monthDays || e.weekDays || n.setDate(t.getDate())
                }
            }),
            ge = me.extend({
                next: function(e, t) {
                    var n, i = e.getHours();
                    if (!ue.fn.next(e, t))
                        if (t.hours) this._hour(e, t, 1);
                        else if (t.monthDays || t.weekDays || t.yearDays || t.weeks) this._date(e, t, 1);
                        else if (t.months) {
                            for (n = e.getDate(), e.setMonth(e.getMonth() + 1), J(e, i); e.getDate() !== n;) e.setDate(n), J(e, i);
                            this._hour(e, t)
                        } else e.setFullYear(e.getFullYear() + 1), J(e, i), this._hour(e, t)
                },
                setup: function() {}
            }),
            ve = {
                hourly: new he,
                daily: new fe,
                weekly: new pe,
                monthly: new me,
                yearly: new ge
            },
            _e = "click";
        W.recurrence = {
            rule: {
                parse: A,
                serialize: F
            },
            expand: S,
            dayInYear: i,
            weekInYear: r,
            weekInMonth: o,
            numberOfWeeks: l,
            isException: b,
            toExceptionString: w
        }, I = function(e) {
            for (var t = W.culture().calendar.days.namesShort, n = t.length, i = "", r = 0, o = []; n > r; r++) o.push(r);
            for (t = t.slice(e).concat(t.slice(0, e)), o = o.slice(e).concat(o.slice(0, e)), r = 0; n > r; r++) i += '<label class="k-check"><input class="k-recur-weekday-checkbox" type="checkbox" value="' + o[r] + '" /> ' + t[r] + "</label>";
            return i
        }, M = W.template('# if (frequency !== "never") { #<div class="k-edit-label"><label>#:messages.repeatEvery#</label></div><div class="k-edit-field"><input class="k-recur-interval"/>#:messages.interval#</div># } ## if (frequency === "weekly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field">#=weekDayCheckBoxes(firstWeekDay)#</div># } else if (frequency === "monthly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field"><ul class="k-reset"><li><label><input class="k-recur-month-radio" type="radio" name="month" value="monthday" />#:messages.day#</label><input class="k-recur-monthday" /></li><li><input class="k-recur-month-radio" type="radio" name="month" value="weekday" /><input class="k-recur-weekday-offset" /><input class="k-recur-weekday" /></li></ul></div># } else if (frequency === "yearly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field"><ul class="k-reset"><li><input class="k-recur-year-radio" type="radio" name="year" value="monthday" /><input class="k-recur-month" /><input class="k-recur-monthday" /></li><li><input class="k-recur-year-radio" type="radio" name="year" value="weekday" /><input class="k-recur-weekday-offset" /><input class="k-recur-weekday" />#:messages.of#<input class="k-recur-month" /></li></ul></div># } ## if (frequency !== "never") { #<div class="k-edit-label"><label>#:end.label#</label></div><div class="k-edit-field"><ul class="k-reset"><li><label><input class="k-recur-end-never" type="radio" name="end" value="never" />#:end.never#</label></li><li><label><input class="k-recur-end-count" type="radio" name="end" value="count" />#:end.after#</label><input class="k-recur-count" />#:end.occurrence#</li><li><label><input class="k-recur-end-until" type="radio" name="end" value="until" />#:end.on#</label><input class="k-recur-until" /></li></ul></div># } #'), R = [{
            day: 0,
            offset: 0
        }, {
            day: 1,
            offset: 0
        }, {
            day: 2,
            offset: 0
        }, {
            day: 3,
            offset: 0
        }, {
            day: 4,
            offset: 0
        }, {
            day: 5,
            offset: 0
        }, {
            day: 6,
            offset: 0
        }], P = [{
            day: 1,
            offset: 0
        }, {
            day: 2,
            offset: 0
        }, {
            day: 3,
            offset: 0
        }, {
            day: 4,
            offset: 0
        }, {
            day: 5,
            offset: 0
        }], z = [{
            day: 0,
            offset: 0
        }, {
            day: 6,
            offset: 0
        }], B = $.extend({
            init: function(e, t) {
                var n, i = this,
                    r = t && t.frequencies;
                $.fn.init.call(i, e, t), i.wrapper = i.element, t = i.options, t.start = n = t.start || K.today(), r && (t.frequencies = r), "string" == typeof n && (t.start = W.parseDate(n, "yyyyMMddTHHmmss")), null === t.firstWeekDay && (t.firstWeekDay = W.culture().calendar.firstDay), i._namespace = "." + t.name
            },
            options: {
                value: "",
                start: "",
                timezone: "",
                spinners: !0,
                firstWeekDay: null,
                frequencies: ["never", "daily", "weekly", "monthly", "yearly"],
                mobile: !1,
                messages: {
                    frequencies: {
                        never: "Never",
                        hourly: "Hourly",
                        daily: "Daily",
                        weekly: "Weekly",
                        monthly: "Monthly",
                        yearly: "Yearly"
                    },
                    hourly: {
                        repeatEvery: "Repeat every: ",
                        interval: " hour(s)"
                    },
                    daily: {
                        repeatEvery: "Repeat every: ",
                        interval: " day(s)"
                    },
                    weekly: {
                        interval: " week(s)",
                        repeatEvery: "Repeat every: ",
                        repeatOn: "Repeat on: "
                    },
                    monthly: {
                        repeatEvery: "Repeat every: ",
                        repeatOn: "Repeat on: ",
                        interval: " month(s)",
                        day: "Day "
                    },
                    yearly: {
                        repeatEvery: "Repeat every: ",
                        repeatOn: "Repeat on: ",
                        interval: " year(s)",
                        of: " of "
                    },
                    end: {
                        label: "End:",
                        mobileLabel: "Ends",
                        never: "Never",
                        after: "After ",
                        occurrence: " occurrence(s)",
                        on: "On "
                    },
                    offsetPositions: {
                        first: "first",
                        second: "second",
                        third: "third",
                        fourth: "fourth",
                        last: "last"
                    },
                    weekdays: {
                        day: "day",
                        weekday: "weekday",
                        weekend: "weekend day"
                    }
                }
            },
            events: ["change"],
            _initInterval: function() {
                var e = this,
                    t = e._value;
                e._container.find(".k-recur-interval").kendoNumericTextBox({
                    spinners: e.options.spinners,
                    value: t.interval || 1,
                    decimals: 0,
                    format: "#",
                    min: 1,
                    change: function() {
                        t.interval = this.value(), e._trigger()
                    }
                })
            },
            _weekDayRule: function(e) {
                var t = this,
                    n = (t._weekDay.element || t._weekDay).val(),
                    i = +(t._weekDayOffset.element || t._weekDayOffset).val(),
                    r = null,
                    o = null;
                e || ("day" === n ? (r = R, o = i) : "weekday" === n ? (r = P, o = i) : "weekend" === n ? (r = z, o = i) : r = [{
                    offset: i,
                    day: +n
                }]), t._value.weekDays = r, t._value.positions = o
            },
            _weekDayView: function() {
                var e, t, n, i, r = this,
                    o = r._value.weekDays,
                    a = r._value.positions,
                    s = r._weekDayOffset;
                o && (n = o.length, a && (7 === n ? (t = "day", e = a) : 5 === n ? (t = "weekday", e = a) : 2 === n && (t = "weekend", e = a)), t || (o = o[0], t = o.day, e = o.offset || ""), i = s.value ? "value" : "val", s[i](e), r._weekDay[i](t))
            },
            _initWeekDay: function() {
                var t, n = this,
                    i = n.options.messages.weekdays,
                    r = n.options.messages.offsetPositions,
                    o = n._container.find(".k-recur-weekday"),
                    a = function() {
                        n._weekDayRule(), n._trigger()
                    };
                o[0] && (n._weekDayOffset = new Y(n._container.find(".k-recur-weekday-offset"), {
                    change: a,
                    dataTextField: "text",
                    dataValueField: "value",
                    dataSource: [{
                        text: r.first,
                        value: "1"
                    }, {
                        text: r.second,
                        value: "2"
                    }, {
                        text: r.third,
                        value: "3"
                    }, {
                        text: r.fourth,
                        value: "4"
                    }, {
                        text: r.last,
                        value: "-1"
                    }]
                }), t = [{
                    text: i.day,
                    value: "day"
                }, {
                    text: i.weekday,
                    value: "weekday"
                }, {
                    text: i.weekend,
                    value: "weekend"
                }], n._weekDay = new Y(o, {
                    value: n.options.start.getDay(),
                    change: a,
                    dataTextField: "text",
                    dataValueField: "value",
                    dataSource: t.concat(e.map(W.culture().calendar.days.names, function(e, t) {
                        return {
                            text: e,
                            value: t
                        }
                    }))
                }), n._weekDayView())
            },
            _initWeekDays: function() {
                var t, n, i, r, o, a = this,
                    s = a._value,
                    l = a._container.find(".k-recur-weekday-checkbox");
                if (l[0] && (l.on(_e + a._namespace, function() {
                    s.weekDays = e.map(l.filter(":checked"), function(e) {
                        return {
                            day: +e.value,
                            offset: 0
                        }
                    }), a.options.mobile || a._trigger()
                }), s.weekDays))
                    for (i = 0, r = l.length, o = s.weekDays.length; r > i; i++)
                        for (n = l[i], t = 0; o > t; t++) n.value == s.weekDays[t].day && (n.checked = !0)
            },
            _initMonthDay: function() {
                var e = this,
                    t = e._value,
                    n = e._container.find(".k-recur-monthday");
                n[0] && (e._monthDay = new W.ui.NumericTextBox(n, {
                    spinners: e.options.spinners,
                    min: 1,
                    max: 31,
                    decimals: 0,
                    format: "#",
                    value: t.monthDays ? t.monthDays[0] : e.options.start.getDate(),
                    change: function() {
                        var n = this.value();
                        t.monthDays = n ? [n] : n, e._trigger()
                    }
                }))
            },
            _initCount: function() {
                var e = this,
                    t = e._container.find(".k-recur-count"),
                    n = e._value;
                e._count = t.kendoNumericTextBox({
                    spinners: e.options.spinners,
                    value: n.count || 1,
                    decimals: 0,
                    format: "#",
                    min: 1,
                    change: function() {
                        n.count = this.value(), e._trigger()
                    }
                }).data("kendoNumericTextBox")
            },
            _initUntil: function() {
                var e = this,
                    t = e._container.find(".k-recur-until"),
                    n = e.options.start,
                    i = e._value,
                    r = i.until;
                e._until = t.kendoDatePicker({
                    min: r && n > r ? r : n,
                    value: r || new Date(n.getFullYear(), n.getMonth(), n.getDate(), 23, 59, 59),
                    change: function() {
                        var t = this.value();
                        i.until = new Date(t.getFullYear(), t.getMonth(), t.getDate(), 23, 59, 59), e._trigger()
                    }
                }).data("kendoDatePicker")
            },
            _trigger: function() {
                this.options.mobile || this.trigger("change")
            }
        }), L = B.extend({
            init: function(e, t) {
                var n = this;
                B.fn.init.call(n, e, t), n._initFrequency(), n._initContainer(), n.value(n.options.value)
            },
            options: {
                name: "RecurrenceEditor"
            },
            events: ["change"],
            destroy: function() {
                var e = this;
                e._frequency.destroy(), e._container.find("input[type=radio],input[type=checkbox]").off(_e + e._namespace), W.destroy(e._container), B.fn.destroy.call(e)
            },
            value: function(e) {
                var n, i = this,
                    r = i.options.timezone;
                return e === t ? i._value.freq ? F(i._value, r) : "" : (i._value = A(e, r) || {}, n = i._value.freq, n ? i._frequency.value(n) : i._frequency.select(0), i._initView(i._frequency.value()), t)
            },
            _initContainer: function() {
                var t = this.element,
                    n = e('<div class="k-recur-view" />'),
                    i = t.parent(".k-edit-field");
                i[0] ? n.insertAfter(i) : t.append(n), this._container = n
            },
            _initFrequency: function() {
                var t, n = this,
                    i = n.options,
                    r = i.frequencies,
                    o = i.messages.frequencies,
                    a = e("<input />");
                r = e.map(r, function(e) {
                    return {
                        text: o[e],
                        value: e
                    }
                }), t = r[0], t && "never" === t.value && (t.value = ""), n.element.append(a), n._frequency = new Y(a, {
                    dataTextField: "text",
                    dataValueField: "value",
                    dataSource: r,
                    change: function() {
                        n._value = {}, n._initView(n._frequency.value()), n.trigger("change")
                    }
                })
            },
            _initView: function(e) {
                var n = this,
                    i = n._value,
                    r = n.options,
                    o = {
                        frequency: e || "never",
                        weekDayCheckBoxes: I,
                        firstWeekDay: r.firstWeekDay,
                        messages: r.messages[e],
                        end: r.messages.end
                    };
                return W.destroy(n._container), n._container.html(M(o)), e ? (i.freq = e, "weekly" !== e || i.weekDays || (i.weekDays = [{
                    day: r.start.getDay(),
                    offset: 0
                }]), n._initInterval(), n._initWeekDays(), n._initMonthDay(), n._initWeekDay(), n._initMonth(), n._initCount(), n._initUntil(), n._period(), n._end(), t) : (n._value = {}, t)
            },
            _initMonth: function() {
                var t, n = this,
                    i = n._value,
                    r = i.months || [n.options.start.getMonth() + 1],
                    o = n._container.find(".k-recur-month");
                o[0] && (t = {
                    change: function() {
                        i.months = [+this.value()], n.trigger("change")
                    },
                    dataTextField: "text",
                    dataValueField: "value",
                    dataSource: e.map(W.culture().calendar.months.names, function(e, t) {
                        return {
                            text: e,
                            value: t + 1
                        }
                    })
                }, n._month1 = new Y(o[0], t), n._month2 = new Y(o[1], t), r && (r = r[0], n._month1.value(r), n._month2.value(r)))
            },
            _end: function() {
                var e, t = this,
                    n = t._value,
                    i = t._container,
                    r = t._namespace,
                    o = function(e) {
                        t._toggleEnd(e.currentTarget.value), t.trigger("change")
                    };
                t._buttonNever = i.find(".k-recur-end-never").on(_e + r, o), t._buttonCount = i.find(".k-recur-end-count").on(_e + r, o), t._buttonUntil = i.find(".k-recur-end-until").on(_e + r, o), n.count ? e = "count" : n.until && (e = "until"), t._toggleEnd(e)
            },
            _period: function() {
                var e = this,
                    t = e._value,
                    n = "monthly" === t.freq,
                    i = n ? e._toggleMonthDay : e._toggleYear,
                    r = ".k-recur-" + (n ? "month" : "year") + "-radio",
                    o = e._container.find(r);
                (n || "yearly" === t.freq) && (o.on(_e + e._namespace, function(t) {
                    i.call(e, t.currentTarget.value), e.trigger("change")
                }), e._buttonMonthDay = o.eq(0), e._buttonWeekDay = o.eq(1), i.call(e, t.weekDays ? "weekday" : "monthday"))
            },
            _toggleEnd: function(e) {
                var t, n, i, r, o = this;
                "count" === e ? (o._buttonCount.prop("checked", !0), i = !0, r = !1, t = o._count.value(), n = null) : "until" === e ? (o._buttonUntil.prop("checked", !0), i = !1, r = !0, t = null, n = o._until.value()) : (o._buttonNever.prop("checked", !0), i = r = !1, t = n = null), o._count.enable(i), o._until.enable(r), o._value.count = t, o._value.until = n
            },
            _toggleMonthDay: function(e) {
                var t, n = this,
                    i = !1,
                    r = !0,
                    o = !1;
                "monthday" === e ? (n._buttonMonthDay.prop("checked", !0), t = [n._monthDay.value()], i = !0, r = !1, o = !0) : (n._buttonWeekDay.prop("checked", !0), t = null), n._weekDay.enable(r), n._weekDayOffset.enable(r), n._monthDay.enable(i), n._value.monthDays = t, n._weekDayRule(o)
            },
            _toggleYear: function(e) {
                var t, n = this,
                    i = !1,
                    r = !0;
                "monthday" === e ? (i = !0, r = !1, t = n._month1.value()) : t = n._month2.value(), n._month1.enable(i), n._month2.enable(r), n._value.months = [t], n._toggleMonthDay(e)
            }
        }), G.plugin(L), H = W.template('<div class="k-edit-label"><label>#:headerTitle#</label></div><div class="k-edit-field k-recur-pattern k-scheduler-toolbar"></div><div class="k-recur-view"></div>'), N = W.template('# if (frequency !== "never") { #<div class="k-edit-label"><label>#:messages.repeatEvery#</label></div><div class="k-edit-field"><input class="k-recur-interval" pattern="\\\\d*"/>#:messages.interval#</div># } ## if (frequency === "weekly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field">#=weekDayCheckBoxes(firstWeekDay)#</div># } else if (frequency === "monthly") { #<div class="k-edit-label"><label>#:messages.repeatBy#</label></div><div class="k-edit-field k-scheduler-toolbar k-repeat-rule"></div><div class="k-monthday-view" style="display:none"><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><input class="k-recur-monthday" pattern="\\\\d*"/></div></div><div class="k-weekday-view" style="display:none"><div class="k-edit-label"><label>#:messages.every#</label></div><div class="k-edit-field"><select class="k-recur-weekday-offset"></select></div><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><select class="k-recur-weekday"></select></div></div># } else if (frequency === "yearly") { #<div class="k-edit-label"><label>#:messages.repeatBy#</label></div><div class="k-edit-field k-scheduler-toolbar k-repeat-rule"></div><div class="k-monthday-view" style="display:none"><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><input class="k-recur-monthday" pattern="\\\\d*"/></div></div><div class="k-weekday-view" style="display:none"><div class="k-edit-label"><label>#:messages.every#</label></div><div class="k-edit-field"><select class="k-recur-weekday-offset"></select></div><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><select class="k-recur-weekday"></select></div></div><div class="k-edit-label"><label>#:messages.month#</label></div><div class="k-edit-field"><select class="k-recur-month"></select></div># } #'), O = W.template('# if (endPattern === "count") { #<div class="k-edit-label"><label>#:messages.after#</label></div><div class="k-edit-field"><input class="k-recur-count" pattern="\\\\d*" /></div># } else if (endPattern === "until") { #<div class="k-edit-label"><label>#:messages.on#</label></div><div class="k-edit-field"><input type="date" class="k-recur-until" /></div># } #'), V = W.template('<ul class="k-reset k-header k-scheduler-navigation">#for (var i = 0, length = dataSource.length; i < length; i++) {#<li class="k-state-default #= value === dataSource[i].value ? "k-state-selected" : "" #"><a role="button" href="\\#" class="k-link" data-#=ns#value="#=dataSource[i].value#">#:dataSource[i].text#</a></li>#}#</ul>'), U = B.extend({
            init: function(e, t) {
                var n = this;
                B.fn.init.call(n, e, t), t = n.options, n._optionTemplate = W.template('<option value="#:value#">#:text#</option>'), n.value(t.value), n._pane = t.pane, n._initRepeatButton(), n._initRepeatEnd(), n._defaultValue = n._value
            },
            options: {
                name: "MobileRecurrenceEditor",
                animations: {
                    left: "slide",
                    right: "slide:right"
                },
                mobile: !0,
                messages: {
                    cancel: "Cancel",
                    update: "Save",
                    endTitle: "Repeat ends",
                    repeatTitle: "Repeat pattern",
                    headerTitle: "Repeat event",
                    end: {
                        patterns: {
                            never: "Never",
                            after: "After...",
                            on: "On..."
                        },
                        never: "Never",
                        after: "End repeat after",
                        on: "End repeat on"
                    },
                    daily: {
                        interval: ""
                    },
                    hourly: {
                        interval: ""
                    },
                    weekly: {
                        interval: ""
                    },
                    monthly: {
                        interval: "",
                        repeatBy: "Repeat by: ",
                        dayOfMonth: "Day of the month",
                        dayOfWeek: "Day of the week",
                        repeatEvery: "Repeat every",
                        every: "Every",
                        day: "Day "
                    },
                    yearly: {
                        interval: "",
                        repeatBy: "Repeat by: ",
                        dayOfMonth: "Day of the month",
                        dayOfWeek: "Day of the week",
                        repeatEvery: "Repeat every: ",
                        every: "Every",
                        month: "Month",
                        day: "Day"
                    }
                }
            },
            events: ["change"],
            value: function(e) {
                var n = this,
                    i = n.options.timezone;
                return e === t ? n._value.freq ? F(n._value, i) : "" : (n._value = A(e, i) || {}, t)
            },
            destroy: function() {
                this._destroyView(), W.destroy(this._endFields), this._repeatButton.off(_e + this._namespace), B.fn.destroy.call(this)
            },
            _initRepeatButton: function() {
                var t = this,
                    n = t.options.messages.frequencies[this._value.freq || "never"];
                t._repeatButton = e('<a href="#" class="k-button k-scheduler-recur">' + n + "</a>").on(_e + t._namespace, function(e) {
                    e.preventDefault(), t._createView("repeat"), t._pane.navigate("recurrence", t.options.animations.left)
                }), t.element.append(t._repeatButton)
            },
            _initRepeatEnd: function() {
                var t = this,
                    n = e('<div class="k-edit-label"><label>' + t.options.messages.end.mobileLabel + "</label></div>").insertAfter(t.element.parent(".k-edit-field")),
                    i = e('<div class="k-edit-field"><a href="#" class="k-button k-scheduler-recur-end"></a></div>').on(_e + t._namespace, function(e) {
                        e.preventDefault(), t._value.freq && (t._createView("end"), t._pane.navigate("recurrence", t.options.animations.left))
                    }).insertAfter(n);
                t._endFields = n.add(i).toggleClass("k-state-disabled", !t._value.freq), t._endButton = i.find(".k-scheduler-recur-end").text(t._endText())
            },
            _endText: function() {
                var e = this._value,
                    t = this.options.messages.end,
                    n = t.never;
                return e.count ? n = W.format("{0} {1}", t.after, e.count) : e.until && (n = W.format("{0} {1:d}", t.on, e.until)), n
            },
            _initFrequency: function() {
                var t = this,
                    n = t.options.messages.frequencies,
                    i = V({
                        dataSource: e.map(this.options.frequencies, function(e) {
                            return {
                                text: n[e],
                                value: "never" !== e ? e : ""
                            }
                        }),
                        value: t._value.freq || "",
                        ns: W.ns
                    });
                t._view.element.find(".k-recur-pattern").append(i).on(_e + t._namespace, ".k-scheduler-navigation li", function(n) {
                    var i = e(this);
                    n.preventDefault(), i.addClass("k-state-selected").siblings().removeClass("k-state-selected"), t._value = {
                        freq: i.children("a").attr(W.attr("value"))
                    }, t._initRepeatView()
                })
            },
            _initEndNavigation: function() {
                var t, n = this,
                    i = n.options.messages.end.patterns,
                    r = n._value,
                    o = "";
                r.count ? o = "count" : r.until && (o = "until"), t = V({
                    dataSource: [{
                        text: i.never,
                        value: ""
                    }, {
                        text: i.after,
                        value: "count"
                    }, {
                        text: i.on,
                        value: "until"
                    }],
                    value: o,
                    ns: W.ns
                }), n._view.element.find(".k-recur-pattern").append(t).on(_e + n._namespace, ".k-scheduler-navigation li", function(t) {
                    var i = e(this),
                        o = null,
                        a = null;
                    t.preventDefault(), i.addClass("k-state-selected").siblings().removeClass("k-state-selected"), n._initEndView(i.children("a").attr(W.attr("value"))), n._count ? (o = n._count.value(), a = null) : n._until && (o = null, a = n._until.val ? W.parseDate(n._until.val(), "yyyy-MM-dd") : n._until.value()), r.count = o, r.until = a
                })
            },
            _createView: function(t) {
                var n = this,
                    i = n.options,
                    r = i.messages,
                    o = r["repeat" === t ? "repeatTitle" : "endTitle"],
                    a = '<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list" id="recurrence"><div data-role="header" class="k-header"><a href="#" class="k-button k-scheduler-cancel">' + r.cancel + "</a>" + r.headerTitle + '<a href="#" class="k-button k-scheduler-update">' + r.update + "</a></div>",
                    s = n._pane.view().id;
                n._view = n._pane.append(a + H({
                    headerTitle: o
                })), n._view.element.on(_e + n._namespace, "a.k-scheduler-cancel, a.k-scheduler-update", function(t) {
                    t.preventDefault(), t.stopPropagation(), e(this).hasClass("k-scheduler-update") ? (n.trigger("change"), n._defaultValue = e.extend({}, n._value)) : n._value = n._defaultValue;
                    var i = n._value.freq;
                    n._endButton.text(n._endText()), n._endFields.toggleClass("k-state-disabled", !i), n._repeatButton.text(r.frequencies[i || "never"]), n._pane.one("viewShow", function() {
                        n._destroyView()
                    }), n._pane.navigate(s, n.options.animations.right)
                }), n._container = n._view.element.find(".k-recur-view"), "repeat" === t ? (n._initFrequency(), n._initRepeatView()) : (n._initEndNavigation(), n._initEndView())
            },
            _destroyView: function() {
                this._view && (this._view.destroy(), this._view.element.remove()), this._view = null
            },
            _initRepeatView: function() {
                var e = this,
                    n = e._value.freq || "never",
                    i = {
                        frequency: n,
                        weekDayCheckBoxes: I,
                        firstWeekDay: e.options.firstWeekDay,
                        messages: e.options.messages[n]
                    },
                    r = N(i),
                    o = e._container,
                    a = e._value;
                return W.destroy(o), o.html(r), r ? ("weekly" !== n || a.weekDays || (a.weekDays = [{
                    day: e.options.start.getDay(),
                    offset: 0
                }]), e._initInterval(), e._initMonthDay(), e._initWeekDays(), e._initWeekDay(), e._initMonth(), e._period(), t) : (e._value = {}, t)
            },
            _initEndView: function(e) {
                var n, i = this,
                    r = i._value;
                e === t && (r.count ? e = "count" : r.until && (e = "until")), n = {
                    endPattern: e,
                    messages: i.options.messages.end
                }, W.destroy(i._container), i._container.html(O(n)), i._initCount(), i._initUntil()
            },
            _initWeekDay: function() {
                var t, n = this,
                    i = n.options.messages.weekdays,
                    r = n.options.messages.offsetPositions,
                    o = n._container.find(".k-recur-weekday"),
                    a = function() {
                        n._weekDayRule(), n.trigger("change")
                    };
                o[0] && (n._weekDayOffset = n._container.find(".k-recur-weekday-offset").html(n._options([{
                    text: r.first,
                    value: "1"
                }, {
                    text: r.second,
                    value: "2"
                }, {
                    text: r.third,
                    value: "3"
                }, {
                    text: r.fourth,
                    value: "4"
                }, {
                    text: r.last,
                    value: "-1"
                }])).change(a), t = [{
                    text: i.day,
                    value: "day"
                }, {
                    text: i.weekday,
                    value: "weekday"
                }, {
                    text: i.weekend,
                    value: "weekend"
                }], t = t.concat(e.map(W.culture().calendar.days.names, function(e, t) {
                    return {
                        text: e,
                        value: t
                    }
                })), n._weekDay = o.html(n._options(t)).change(a).val(n.options.start.getDay()), n._weekDayView())
            },
            _initMonth: function() {
                var t, n = this,
                    i = n._value,
                    r = n.options.start,
                    o = i.months || [r.getMonth() + 1],
                    a = n._container.find(".k-recur-month"),
                    s = W.culture().calendar.months.names;
                a[0] && (t = e.map(s, function(e, t) {
                    return {
                        text: e,
                        value: t + 1
                    }
                }), a.html(n._options(t)).change(function() {
                    i.months = [+this.value]
                }), n._monthSelect = a, o && a.val(o[0]))
            },
            _period: function() {
                var t, n, i, r = this,
                    o = r._value,
                    a = r._container,
                    s = r.options.messages[o.freq],
                    l = a.find(".k-repeat-rule"),
                    c = a.find(".k-weekday-view"),
                    d = a.find(".k-monthday-view");
                l[0] && (t = o.weekDays ? "weekday" : "monthday", n = V({
                    value: t,
                    dataSource: [{
                        text: s.dayOfMonth,
                        value: "monthday"
                    }, {
                        text: s.dayOfWeek,
                        value: "weekday"
                    }],
                    ns: W.ns
                }), i = function(e) {
                    var t = r._weekDay.val(),
                        n = r._weekDayOffset.val(),
                        i = r._monthDay.value(),
                        a = r._monthSelect ? r._monthSelect.val() : null;
                    "monthday" === e ? (o.weekDays = null, o.monthDays = i ? [i] : i, o.months = a ? [+a] : a, c.hide(), d.show()) : (o.monthDays = null, o.months = a ? [+a] : a, o.weekDays = [{
                        offset: +n,
                        day: +t
                    }], c.show(), d.hide())
                }, l.append(n).on(_e + r._namespace, ".k-scheduler-navigation li", function(t) {
                    var n, r = e(this).addClass("k-state-selected");
                    t.preventDefault(), r.siblings().removeClass("k-state-selected"), n = r.children("a").attr(W.attr("value")), i(n)
                }), i(t))
            },
            _initUntil: function() {
                var e = this,
                    t = e._container.find(".k-recur-until"),
                    n = e.options.start,
                    i = e._value,
                    r = i.until,
                    o = r && n > r ? r : n;
                e._until = W.support.input.date ? t.attr("min", W.toString(o, "yyyy-MM-dd")).val(W.toString(r || n, "yyyy-MM-dd")).on("change", function() {
                    i.until = W.parseDate(this.value, "yyyy-MM-dd")
                }) : t.kendoDatePicker({
                    min: o,
                    value: r || n,
                    change: function() {
                        i.until = this.value()
                    }
                }).data("kendoDatePicker")
            },
            _options: function(e, t) {
                var n = 0,
                    i = "",
                    r = e.length,
                    o = this._optionTemplate;
                for (t && (i += o({
                    value: "",
                    text: t
                })); r > n; n++) i += o(e[n]);
                return i
            }
        }), G.plugin(U)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.scheduler.timelineview.min", ["kendo.scheduler.view.min"], e)
}(function() {
    return function(e, t) {
        function n(e) {
            var t = new Date(1980, 1, 1, 0, 0, 0);
            return c(t, p(e)), t
        }

        function i(e) {
            var t = [],
                n = e.workWeekStart;
            for (t.push(n); e.workWeekEnd != n;) n > 6 ? n -= 7 : n++, t.push(n);
            return t
        }

        function r(e) {
            var t, n = 0;
            if (e.columns) {
                for (t = 0; e.columns.length > t; t++) n += r(e.columns[t]);
                return e.colspan = n, n
            }
            return e.colspan = 1, 1
        }

        function o(e, t, n) {
            var i, r, o, s;
            for (i = e.length - 1; i >= 0; i--) r = e[i].rectLeft, s = e[i].rectRight, o = t >= r && s >= t, (o || r >= t && n >= s || r >= t && n >= r) && (t > r && (t = r), s > n && (n = s));
            return a(e, t, n)
        }

        function a(e, t, n) {
            var i, r, o = [];
            for (i = 0; e.length > i; i++) r = {
                rectLeft: e[i].rectLeft,
                rectRight: e[i].rectRight
            }, (t > r.rectLeft && r.rectRight > t || r.rectLeft >= t && n >= r.rectRight) && o.push(e[i]);
            return o
        }
        var s = window.kendo,
            l = s.ui,
            c = s.date.setTime,
            d = l.SchedulerView,
            u = e.extend,
            h = e.proxy,
            f = s.date.getDate,
            p = s.date.getMilliseconds,
            m = s.date.MS_PER_DAY,
            g = s.date.MS_PER_MINUTE,
            v = ".kendoTimelineView",
            _ = s.template('<div><div class="k-event-template k-event-time">#:kendo.format("{0:t} - {1:t}", start, end)#</div><div class="k-event-template">${title}</div></div>'),
            b = s.template("<span class='k-link k-nav-day'>#=kendo.format('{0:m}', date)#</span>"),
            w = '<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color#; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#" #} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail) {#<span class="k-icon k-i-arrow-w"></span>#}## if(data.isException()) {#<span class="k-icon k-i-exception"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-refresh"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete"><span class="k-icon k-si-close"></span></a>#}## if(data.head) {#<span class="k-icon k-i-arrow-e"></span>#}#</span>#if(resizable && !data.tail){#<span class="k-resize-handle k-resize-w"></span>#}##if(resizable && !data.head){#<span class="k-resize-handle k-resize-e"></span>#}#</div>',
            y = d.extend({
                init: function(e, t) {
                    var n = this;
                    d.fn.init.call(n, e, t), n.title = n.options.title || n.options.name, n._workDays = i(n.options), n._templates(), n._editable(), n.calculateDateRange(), n._groups(), n._currentTime()
                },
                name: "timeline",
                _currentTimeMarkerUpdater: function() {
                    var t, n, i, r, o, a, l, c, d, u, h, f, p = new Date,
                        m = this.options;
                    if (this.datesHeader.find(".k-current-time").remove(), this._isInDateSlot({
                        start: p,
                        end: p
                    }))
                        for (m.currentTimeMarker.useLocalTimezone === !1 && (t = m.dataSource.options.schema.timezone, m.dataSource && t && (n = s.timezone.offset(p, t), p = s.timezone.convert(p, p.getTimezoneOffset(), n))), i = m.group && "vertical" != m.group.orientation ? this.groups.length : 1, r = 0; i > r; r++) {
                            if (o = this.groups[r], !o) return;
                            if (a = s.date.toUtcTime(p), l = o.timeSlotRanges(a, a + 1), 0 === l.length) return;
                            c = l[0].collection, d = c.slotByStartDate(p), d && (u = e("<div class='k-current-time'></div>"), h = this.datesHeader, f = Math.round(l[0].innerRect(p, new Date(p.getTime() + 1), !1).left), u.appendTo(h.find(".k-scheduler-header-wrap")).css({
                                left: this._adjustLeftPosition(f),
                                width: "1px",
                                bottom: "1px",
                                top: 0
                            }))
                        }
                },
                _adjustLeftPosition: function(e) {
                    return this._isRtl && (e -= this.content[0].scrollWidth - this.content[0].offsetWidth), e
                },
                _currentTime: function() {
                    var e, n = this,
                        i = n.options.currentTimeMarker;
                    i !== !1 && i.updateInterval !== t && (e = i.updateInterval, n._currentTimeMarkerUpdater(), n._currentTimeUpdateTimer = setInterval(h(this._currentTimeMarkerUpdater, n), e))
                },
                _editable: function() {
                    this.options.editable && (this._isMobile() ? this._touchEditable() : this._mouseEditable())
                },
                _mouseEditable: function() {
                    var t = this;
                    t.element.on("click" + v, ".k-event a:has(.k-si-close)", function(n) {
                        t.trigger("remove", {
                            uid: e(this).closest(".k-event").attr(s.attr("uid"))
                        }), n.preventDefault()
                    }), t.options.editable.create !== !1 && t.element.on("dblclick" + v, ".k-scheduler-content td", function(e) {
                        var n, i = t._slotByPosition(e.pageX, e.pageY);
                        i && (n = t._resourceBySlot(i), t.trigger("add", {
                            eventInfo: u({
                                start: i.startDate(),
                                end: i.endDate()
                            }, n)
                        })), e.preventDefault()
                    }), t.options.editable.update !== !1 && t.element.on("dblclick" + v, ".k-event", function(n) {
                        t.trigger("edit", {
                            uid: e(this).closest(".k-event").attr(s.attr("uid"))
                        }), n.preventDefault()
                    })
                },
                _touchEditable: function() {
                    var n = this,
                        i = 0;
                    s.support.mobileOS.android && (i = 5), n.options.editable.create !== !1 && (n._addUserEvents = new s.UserEvents(n.element, {
                        threshold: i,
                        filter: ".k-scheduler-content td",
                        tap: function(e) {
                            var i, r = e.x.location !== t ? e.x.location : e.x,
                                o = e.y.location !== t ? e.y.location : e.y,
                                a = n._slotByPosition(r, o);
                            a && (i = n._resourceBySlot(a), n.trigger("add", {
                                eventInfo: u({
                                    start: a.startDate(),
                                    end: a.endDate()
                                }, i)
                            })), e.preventDefault()
                        }
                    })), n.options.editable.update !== !1 && (n._editUserEvents = new s.UserEvents(n.element, {
                        threshold: i,
                        filter: ".k-event",
                        tap: function(t) {
                            var i = e(t.target).closest(".k-event");
                            i.hasClass("k-event-active") || n.trigger("edit", {
                                uid: i.attr(s.attr("uid"))
                            }), t.preventDefault()
                        }
                    }))
                },
                _slotByPosition: function(e, t) {
                    var n, i, r, o, a = this.content,
                        l = a.offset();
                    for (e -= l.left, t -= l.top, this._isRtl ? (o = s.support.browser, o.mozilla ? (e += a[0].scrollWidth - a[0].offsetWidth, e += a[0].scrollLeft) : o.msie ? (e -= a.scrollLeft(), e += a[0].scrollWidth - a[0].offsetWidth) : o.webkit && (e += a[0].scrollLeft)) : e += a[0].scrollLeft, t += a[0].scrollTop, e = Math.ceil(e), t = Math.ceil(t), r = 0; this.groups.length > r; r++)
                        if (i = this.groups[r], n = i.timeSlotByPosition(e, t)) return n;
                    return null
                },
                options: {
                    name: "TimelineView",
                    title: "Timeline",
                    selectedDateFormat: "{0:D}",
                    selectedShortDateFormat: "{0:d}",
                    date: s.date.today(),
                    startTime: s.date.today(),
                    endTime: s.date.today(),
                    showWorkHours: !1,
                    minorTickCount: 2,
                    editable: !0,
                    workDayStart: new Date(1980, 1, 1, 8, 0, 0),
                    workDayEnd: new Date(1980, 1, 1, 17, 0, 0),
                    workWeekStart: 1,
                    workWeekEnd: 5,
                    majorTick: 60,
                    eventHeight: 25,
                    eventMinWidth: 0,
                    columnWidth: 100,
                    groupHeaderTemplate: "#=text#",
                    majorTimeHeaderTemplate: "#=kendo.toString(date, 't')#",
                    slotTemplate: "&nbsp;",
                    eventTemplate: _,
                    dateHeaderTemplate: b,
                    footer: {
                        command: "workDay"
                    },
                    currentTimeMarker: {
                        updateInterval: 1e4,
                        useLocalTimezone: !0
                    },
                    messages: {
                        defaultRowText: "All events",
                        showFullDay: "Show full day",
                        showWorkDay: "Show business hours"
                    }
                },
                events: ["remove", "add", "edit"],
                _templates: function() {
                    var e = this.options,
                        t = u({}, s.Template, e.templateSettings);
                    this.eventTemplate = this._eventTmpl(e.eventTemplate, w), this.majorTimeHeaderTemplate = s.template(e.majorTimeHeaderTemplate, t), this.dateHeaderTemplate = s.template(e.dateHeaderTemplate, t), this.slotTemplate = s.template(e.slotTemplate, t), this.groupHeaderTemplate = s.template(e.groupHeaderTemplate, t)
                },
                _render: function(t) {
                    var n = this;
                    t = t || [], n._dates = t, n._startDate = t[0], n._endDate = t[t.length - 1 || 0], n._calculateSlotRanges(), n.createLayout(n._layout(t)), n._content(t), n._footer(), n._setContentWidth(), n.refreshLayout(), n.datesHeader.on("click" + v, ".k-nav-day", function(t) {
                        var i = e(t.currentTarget).closest("th"),
                            r = n._slotByPosition(i.offset().left, n.content.offset().top);
                        n.trigger("navigate", {
                            view: "timeline",
                            date: r.startDate()
                        })
                    }), n.timesHeader.find("table tr:last").hide(), n.datesHeader.find("table tr:last").hide()
                },
                _setContentWidth: function() {
                    var e = this.content,
                        t = e.width(),
                        n = this.content.find("table"),
                        i = n.find("tr:first").children().length,
                        r = 100,
                        o = i * this.options.columnWidth;
                    o > t && (r = Math.ceil(o / t * 100)), n.add(this.datesHeader.find("table")).css("width", r + "%")
                },
                _calculateSlotRanges: function() {
                    var e, t, n, i, r = this._dates,
                        o = this.startTime(),
                        a = this.endTime();
                    for (p(a) === p(s.date.getDate(a)) && (a = s.date.getDate(a), c(a, m - 1)), a = p(a), o = p(o), e = [], t = 0; r.length > t; t++) n = f(r[t]), c(n, o), i = f(r[t]), c(i, a), e.push({
                        start: s.date.toUtcTime(n),
                        end: s.date.toUtcTime(i)
                    });
                    this._slotRanges = e
                },
                _forTimeRange: function(e, t, i, r) {
                    var o, a, s, l, d, u, h, f, v, _, b, w, y, k, x, C, S, T;
                    for (e = n(e), t = n(t), o = this, a = p(e), s = p(t), l = o.options.minorTickCount, d = o.options.majorTick * g, u = d / l || 1, h = new Date(+e), f = h.getDate(), _ = 0, w = "", b = m / u, a != s && (a > s && (s += m), b = (s - a) / u), b = Math.round(b); b > _; _++) y = _ % (d / u), k = 0 === y, x = l - 1 > y, C = y === l - 1, S = l, b % l !== 0 && (T = l > b - (_ + 1), k && T && (S = b % l)), w += i(h, k, x, C, S), c(h, u, !1);
                    return s && (v = p(h), f < h.getDate() && (v += m), v > s && (h = new Date(+t))), r && (w += r(h)), w
                },
                _layout: function(e) {
                    var t, n, i, o = [],
                        a = [],
                        s = this,
                        l = [{
                            text: s.options.messages.defaultRowText
                        }],
                        c = [];
                    for (t = 0; s.options.minorTickCount > t; t++) c.push({
                        text: "",
                        className: ""
                    });
                    for (this._forTimeRange(s.startTime(), s.endTime(), function(e, t, n, i, a) {
                        var l, d = s.majorTimeHeaderTemplate;
                        t && (l = {
                            text: d({
                                date: e
                            }),
                            className: i ? "k-slot-cell" : "",
                            columns: c.slice(0, a)
                        }, r(l), o.push(l))
                    }), n = 0; e.length > n; n++) a.push({
                        text: s.dateHeaderTemplate({
                            date: e[n]
                        }),
                        className: "k-slot-cell",
                        columns: o.slice(0)
                    });
                    return i = this.groupedResources, i.length && ("vertical" === this._groupOrientation() ? l = s._createRowsLayout(i, null, this.groupHeaderTemplate) : a = s._createColumnsLayout(i, a, this.groupHeaderTemplate)), {
                        columns: a,
                        rows: l
                    }
                },
                _footer: function() {
                    var t, n, i, r = this.options;
                    r.footer !== !1 && (t = '<div class="k-header k-scheduler-footer">', n = r.footer.command, n && "workDay" === n ? (t += '<ul class="k-reset k-header">', t += '<li class="k-state-default k-scheduler-fullday"><a href="#" class="k-link"><span class="k-icon k-i-clock"></span>', t += (r.showWorkHours ? r.messages.showFullDay : r.messages.showWorkDay) + "</a></li>", t += "</ul>") : t += "&nbsp;", t += "</div>", this.footer = e(t).appendTo(this.element), i = this, this.footer.on("click" + v, ".k-scheduler-fullday", function(e) {
                        e.preventDefault(), i.trigger("navigate", {
                            view: i.name || r.name,
                            date: i.startDate(),
                            isWorkDay: !r.showWorkHours
                        })
                    }))
                },
                _columnCountForLevel: function(e) {
                    var t = this.columnLevels[e];
                    return t ? t.length : 0
                },
                _rowCountForLevel: function(e) {
                    var t = this.rowLevels[e];
                    return t ? t.length : 0
                },
                _isWorkDay: function(e) {
                    var t, n = e.getDay(),
                        i = this._workDays;
                    for (t = 0; i.length > t; t++)
                        if (i[t] === n) return !0;
                    return !1
                },
                _content: function(e) {
                    var t, n, i, r, o, a = this,
                        l = a.options,
                        c = a.startTime(),
                        d = this.endTime(),
                        u = 1,
                        h = 1,
                        f = e.length,
                        p = "",
                        m = this.groupedResources,
                        g = this.slotTemplate,
                        v = !1;
                    for (m.length && (v = "vertical" === a._groupOrientation(), v ? h = a._groupCount() : u = a._groupCount()), p += "<tbody>", t = function(t) {
                        var o, c = "",
                            d = "",
                            u = function(e) {
                                return function() {
                                    return a._resourceBySlot({
                                        groupIndex: e
                                    })
                                }
                            };
                        return s.date.isToday(e[r]) && (d += "k-today"), (s.date.getMilliseconds(t) < s.date.getMilliseconds(l.workDayStart) || s.date.getMilliseconds(t) >= s.date.getMilliseconds(l.workDayEnd) || !a._isWorkDay(e[r])) && (d += " k-nonwork-hour"), c += "<td" + ("" !== d ? ' class="' + d + '"' : "") + ">", o = s.date.getDate(e[r]), s.date.setTime(o, s.date.getMilliseconds(t)), c += g({
                            date: o,
                            resources: u(v ? n : i)
                        }), c += "</td>"
                    }, n = 0; h > n; n++) {
                        for (p += "<tr>", i = 0; u > i; i++)
                            for (r = 0, o = f; o > r; r++) p += this._forTimeRange(c, d, t);
                        p += "</tr>"
                    }
                    p += "</tbody>", this.content.find("table").append(p)
                },
                _groups: function() {
                    var e, t, n, i, r = this._groupCount(),
                        o = this._dates,
                        a = o.length;
                    for (this.groups = [], e = 0; r > e; e++) t = this._addResourceView(e), n = o[0], i = o[o.length - 1 || 0], t.addTimeSlotCollection(n, s.date.addDays(i, 1));
                    this._timeSlotGroups(r, a)
                },
                _isVerticallyGrouped: function() {
                    return this.groupedResources.length && "vertical" === this._groupOrientation()
                },
                _isHorizontallyGrouped: function() {
                    return this.groupedResources.length && "horizontal" === this._groupOrientation()
                },
                _timeSlotGroups: function(e, t) {
                    var n, i, r, o, a, s, l, c, d, u, h, f, m, g, v, _, b, w, y = this._timeSlotInterval(),
                        k = this._isVerticallyGrouped(),
                        x = this.content.find("tr"),
                        C = x.length;
                    for (x.attr("role", "row"), k && (C = Math.floor(C / e)), n = 0; e > n; n++)
                        for (i = 0, r = this.groups[n], k && (i = n), a = i * C, s = 0, k || (s = n), l = x[a].children, c = l.length / (k ? 1 : e), d = c / t, u = 0; t > u; u++)
                            for (h = u * d + c * s, o = p(new Date(+this.startTime())), f = 0; d > f; f++) m = l[f + h], g = r.getTimeSlotCollection(0), v = this._dates[u], _ = Date.UTC(v.getFullYear(), v.getMonth(), v.getDate()), b = _ + o, w = b + y, m.setAttribute("role", "gridcell"), m.setAttribute("aria-selected", !1), g.addTimeSlot(m, b, w, !0), o += y
                },
                startDate: function() {
                    return this._startDate
                },
                endDate: function() {
                    return this._endDate
                },
                startTime: function() {
                    var e = this.options;
                    return e.showWorkHours ? e.workDayStart : e.startTime
                },
                endTime: function() {
                    var e = this.options;
                    return e.showWorkHours ? e.workDayEnd : e.endTime
                },
                _timeSlotInterval: function() {
                    var e = this.options;
                    return e.majorTick / e.minorTickCount * g
                },
                nextDate: function() {
                    return s.date.nextDay(this.endDate())
                },
                previousDate: function() {
                    return s.date.previousDay(this.startDate())
                },
                calculateDateRange: function() {
                    this._render([this.options.date])
                },
                render: function(e) {
                    var t, n, i, r, o;
                    for (this._headerColumnCount = 0, this._groups(), this.element.find(".k-event").remove(), e = new s.data.Query(e).sort([{
                        field: "start",
                        dir: "asc"
                    }, {
                        field: "end",
                        dir: "desc"
                    }]).toArray(), t = [], this._eventsByResource(e, this.groupedResources, t), n = [], i = 0, r = 0; t.length > r; r++) o = {
                        groupIndex: r,
                        maxRowCount: 0,
                        events: {}
                    }, n.push(o), this._renderEvents(t[r], r, o), o.maxRowCount > i && (i = o.maxRowCount);
                    this._setRowsHeight(n, t.length, i), this._positionEvents(n, t.length), this.trigger("activate")
                },
                _positionEvents: function(e, t) {
                    var n, i, r, o;
                    for (n = 0; t > n; n++) {
                        i = e[n].events;
                        for (r in i) o = i[r], this._positionEvent(o)
                    }
                },
                _setRowsHeight: function(t, n, i) {
                    var r, o, a, s, l, c = this.options.eventHeight + 2,
                        d = this._getBottomRowOffset();
                    for (n = this._isVerticallyGrouped() ? n : 1, r = 0; n > r; r++) o = this._isVerticallyGrouped() ? t[r].maxRowCount : i, o = o ? o : 1, a = (c + 2) * o + d, s = e(this.times.find("tr")[r]), l = e(this.content.find("tr")[r]), s.height(a), l.height(a);
                    this._setContentWidth(), this.refreshLayout(), this._refreshSlots()
                },
                _getBottomRowOffset: function() {
                    var e, t, n = .5 * this.options.eventHeight,
                        i = this._isMobile();
                    return i ? (e = 30, t = 60) : (e = 15, t = 30), n > t ? n = t : e > n && (n = e), n
                },
                _positionEvent: function(e) {
                    var t, n, i, r = this.options.eventHeight + 2,
                        o = e.slotRange.innerRect(e.start, e.end, !1),
                        a = this._adjustLeftPosition(o.left),
                        s = o.right - o.left - 2;
                    0 > s && (s = 0), this.options.eventMinWidth > s && (t = e.slotRange.collection, n = t._slots[t._slots.length - 1], i = n.offsetLeft + n.offsetWidth, s = this.options.eventMinWidth, a + s > i && (s = i - o.left - 2)), e.element.css({
                        top: e.slotRange.start.offsetTop + e.rowIndex * (r + 2) + "px",
                        left: a,
                        width: s
                    })
                },
                _refreshSlots: function() {
                    for (var e = 0; this.groups.length > e; e++) this.groups[e].refresh()
                },
                _eventsByResource: function(e, t, n) {
                    var i, r, o, a, l = t[0];
                    if (l)
                        for (i = l.dataSource.view(), r = 0; i.length > r; r++) o = this._resourceValue(l, i[r]), a = new s.data.Query(e).filter({
                            field: l.field,
                            operator: d.groupEqFilter(o)
                        }).toArray(), t.length > 1 ? this._eventsByResource(a, t.slice(1), n) : n.push(a);
                    else n.push(e)
                },
                _isInDateSlot: function(e) {
                    var t = e.start,
                        n = e.end,
                        i = f(this._startDate),
                        r = s.date.addDays(f(this._endDate), 1);
                    return r > t && n >= i ? !0 : !1
                },
                _isInTimeSlot: function(e) {
                    var t, n = e._startTime || s.date.toUtcTime(e.start),
                        i = e._endTime || s.date.toUtcTime(e.end),
                        r = this._slotRanges;
                    for (n === i && (i += 1), t = 0; r.length > t; t++)
                        if (r[t].end > n && i > r[t].start) return !0;
                    return !1
                },
                _adjustEvent: function(e) {
                    var t, n = e.start,
                        i = e.end,
                        r = e._time("start"),
                        o = e._time("end"),
                        a = p(this.startTime()),
                        l = p(this.endTime()),
                        d = null,
                        u = null,
                        h = !1,
                        g = !1;
                    return e.isAllDay ? (d = f(n), a > r && (c(d, a), g = !0), u = f(i), l === p(f(this.endTime())) ? u = s.date.addDays(u, 1) : (c(u, l), h = !0)) : (l = 0 === l ? m : l, a > r ? (d = f(n), c(d, a), g = !0) : r > l && (d = f(n), d = s.date.addDays(d, 1), c(d, a), g = !0), o > l ? (u = f(i), c(u, l), h = !0) : a > o && (u = f(i), u = s.date.addDays(u, -1), c(u, l), h = !0)), t = e.clone({
                        start: d ? d : n,
                        end: u ? u : i,
                        _startTime: d ? s.date.toUtcTime(d) : e._startTime,
                        _endTime: u ? s.date.toUtcTime(u) : e._endTime,
                        isAllDay: !1
                    }), {
                        occurrence: t,
                        head: h,
                        tail: g
                    }
                },
                _renderEvents: function(e, t, n) {
                    var i, r, o, a, s, l, c, d, u, h, f;
                    for (r = 0, o = e.length; o > r; r++) i = e[r], this._isInDateSlot(i) && (a = i.isAllDay || i.end.getTime() - i.start.getTime() >= m, s = this.content, (a || this._isInTimeSlot(i)) && (l = this._adjustEvent(i), c = this.groups[t], c._continuousEvents || (c._continuousEvents = []), d = c.slotRanges(l.occurrence, !1), u = d[0], this._isInTimeSlot(l.occurrence) && (h = this._createEventElement(l.occurrence, i, u.head || l.head, u.tail || l.tail), h.appendTo(s).css({
                        top: 0,
                        height: this.options.eventHeight
                    }), f = {
                        start: l.occurrence._startTime || l.occurrence.start,
                        end: l.occurrence._endTime || l.occurrence.end,
                        element: h,
                        uid: i.uid,
                        slotRange: u,
                        rowIndex: 0,
                        offsetTop: 0
                    }, n.events[i.uid] = f, this.addContinuousEvent(c, u, h, i.isAllDay), this._arrangeRows(f, u, n))))
                },
                addContinuousEvent: function(e, t, n, i) {
                    var r = e._continuousEvents;
                    r.push({
                        element: n,
                        isAllDay: i,
                        uid: n.attr(s.attr("uid")),
                        start: t.start,
                        end: t.end
                    })
                },
                _createEventElement: function(t, n, i, r) {
                    var o, a, l = this.eventTemplate,
                        c = this.options.editable,
                        d = this._isMobile(),
                        h = c && c.destroy !== !1 && !d,
                        f = c && c.resize !== !1,
                        p = n._time("start"),
                        m = n._time("end"),
                        g = n.start,
                        v = n.end,
                        _ = this.eventResources(n);
                    return n._startTime && p !== s.date.getMilliseconds(n.start) && (g = new Date(p), g = s.timezone.apply(g, "Etc/UTC")), n._endTime && m !== s.date.getMilliseconds(n.end) && (v = new Date(m), v = s.timezone.apply(v, "Etc/UTC")), o = u({}, {
                        ns: s.ns,
                        resizable: f,
                        showDelete: h,
                        head: i,
                        tail: r,
                        singleDay: 1 == this._dates.length,
                        resources: _,
                        inverseColor: _ && _[0] ? this._shouldInverseResourceColor(_[0]) : !1
                    }, n, {
                        start: g,
                        end: v
                    }), a = e(l(o)), this.angular("compile", function() {
                        return {
                            elements: a,
                            data: [{
                                dataItem: o
                            }]
                        }
                    }), a
                },
                _arrangeRows: function(e, t, n) {
                    var i, r, a, s, l, c, u = t.start.index,
                        h = t.end.index,
                        f = e.slotRange.innerRect(e.start, e.end, !1),
                        p = f.right + this.options.eventMinWidth,
                        m = o(t.events(), f.left, p);
                    for (t.addEvent({
                        slotIndex: u,
                        start: u,
                        end: h,
                        rectLeft: f.left,
                        rectRight: p,
                        element: e.element,
                        uid: e.uid
                    }), m.push({
                        start: u,
                        end: h,
                        uid: e.uid
                    }), i = d.createRows(m), i.length > n.maxRowCount && (n.maxRowCount = i.length), r = 0, a = i.length; a > r; r++)
                        for (s = i[r].events, l = 0, c = s.length; c > l; l++) n.events[s[l].uid].rowIndex = r
                },
                _groupCount: function() {
                    var e = this.groupedResources;
                    return e.length ? "vertical" === this._groupOrientation() ? this._rowCountForLevel(e.length - 1) : this._columnCountForLevel(e.length - 1) : 1
                },
                _updateEventForSelection: function(e) {
                    var t = this._adjustEvent(e.clone());
                    return t.occurrence
                },
                _eventOptionsForMove: function(e) {
                    return e.isAllDay ? {
                        isAllDay: !1
                    } : {}
                },
                _updateEventForResize: function(e) {
                    e.isAllDay && e.set("isAllDay", !1)
                },
                _updateMoveHint: function(e, t, n) {
                    var i, r, o, a, s, l, c, d, u, h, f, p = this.groups[t],
                        m = e.clone({
                            start: e.start,
                            end: e.end
                        }),
                        g = m.duration();
                    for (m.start = new Date(m.start.getTime() + n), m.end = new Date(+m.start + g), i = this._adjustEvent(m), r = p.slotRanges(i.occurrence, !1), this._removeMoveHint(), o = 0; r.length > o; o++) a = r[o], s = a.start, l = this._createEventElement(i.occurrence, i.occurrence, !1, !1), l.addClass("k-event-drag-hint"), c = a.innerRect(i.occurrence.start, i.occurrence.end, this.options.snap), d = c.right - c.left - 2, 0 > d && (d = 0), u = this._adjustLeftPosition(c.left), h = {
                        left: u,
                        top: s.offsetTop,
                        height: s.offsetHeight - 2,
                        width: d
                    }, l.css(h), this._moveHint = this._moveHint.add(l);
                    f = this.content, this._moveHint.appendTo(f)
                },
                _updateResizeHint: function(e, t, n, i) {
                    var r, o, a, l, c, u, h, f, p, m, g = this.groups[t],
                        v = g.ranges(n, i, !1, !1);
                    for (this._removeResizeHint(), r = 0; v.length > r; r++) o = v[r], a = o.startSlot(), l = o.innerRect(n, i, !1), l.top = a.offsetTop, c = l.right - l.left, u = a.offsetHeight, h = this._adjustLeftPosition(l.left), f = d.fn._createResizeHint.call(this, h, l.top, c, u), this._resizeHint = this._resizeHint.add(f);
                    p = "t", m = this.content, this._resizeHint.appendTo(m), this._resizeHint.find(".k-label-top,.k-label-bottom").text(""), this._resizeHint.first().addClass("k-first").find(".k-label-top").text(s.toString(s.timezone.toLocalDate(n), p)), this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(s.toString(s.timezone.toLocalDate(i), p))
                },
                selectionByElement: function(e) {
                    var t = e.offset();
                    return this._slotByPosition(t.left, t.top)
                },
                _updateDirection: function(e, t, n, i, r) {
                    var o = t[0].start,
                        a = t[t.length - 1].end;
                    n && !r && o.index === a.index && o.collectionIndex === a.collectionIndex && (e.backward = i)
                },
                _changeGroup: function(e, t) {
                    var n = t ? "prevGroupSlot" : "nextGroupSlot",
                        i = this[n](e.start, e.groupIndex, !1);
                    return i && (e.groupIndex += t ? -1 : 1), i
                },
                prevGroupSlot: function(e, t, n) {
                    var i, r = this.groups[t],
                        o = r.ranges(e, e, n, !1)[0].start;
                    if (!(0 >= t)) return this._isVerticallyGrouped() ? o : (i = r._collection(0, n), i.last())
                },
                nextGroupSlot: function(e, t, n) {
                    var i, r = this.groups[t],
                        o = r.ranges(e, e, n, !1)[0].start;
                    if (!(t >= this.groups.length - 1)) return this._isVerticallyGrouped() ? o : (i = r._collection(0, n), i.first())
                },
                _verticalSlots: function(e, t, n, i) {
                    var r = i ? "leftSlot" : "rightSlot",
                        o = t[0].start,
                        a = t[t.length - 1].end,
                        s = this.groups[e.groupIndex];
                    return o = s[r](o), a = s[r](a), n || !this._isVerticallyGrouped() || o && a || (o = a = this._changeGroup(e, i)), {
                        startSlot: o,
                        endSlot: a
                    }
                },
                _horizontalSlots: function(e, t, n, i) {
                    var r = i ? "upSlot" : "downSlot",
                        o = t[0].start,
                        a = t[t.length - 1].end,
                        s = this.groups[e.groupIndex];
                    return o = s[r](o), a = s[r](a), n || !this._isHorizontallyGrouped() || o && a || (o = a = this._changeGroup(e, i)), {
                        startSlot: o,
                        endSlot: a
                    }
                },
                _changeViewPeriod: function(e, t) {
                    var n, i = t ? this.previousDate() : this.nextDate(),
                        r = e.start,
                        o = e.end;
                    return e.start = new Date(i), e.end = new Date(i), this._isHorizontallyGrouped() && (e.groupIndex = t ? this.groups.length - 1 : 0), n = o - r, t ? (o = p(this.endTime()), o = 0 === o ? m : o, c(e.start, o - n), c(e.end, o)) : (r = p(this.startTime()), c(e.start, r), c(e.end, r + n)), e.events = [], !0
                },
                move: function(e, t, n) {
                    var i, r, o, a, l, c = !1,
                        d = this.groups[e.groupIndex],
                        u = s.keys,
                        h = d.ranges(e.start, e.end, !1, !1);
                    if (t === u.DOWN || t === u.UP) c = !0, o = t === u.UP, this._updateDirection(e, h, n, o, !0), a = this._verticalSlots(e, h, n, o);
                    else if ((t === u.LEFT || t === u.RIGHT) && (c = !0, o = t === u.LEFT, this._updateDirection(e, h, n, o, !1), a = this._horizontalSlots(e, h, n, o), (!a.startSlot || !a.endSlot) && !n && this._changeViewPeriod(e, o, !1))) return c;
                    return c && (i = a.startSlot, r = a.endSlot, n ? (l = e.backward, l && i ? e.start = i.startDate() : !l && r && (e.end = r.endDate())) : i && r && (e.start = i.startDate(), e.end = r.endDate()), e.events = []), c
                },
                destroy: function() {
                    var e = this;
                    e.element && e.element.off(v), e.footer && e.footer.remove(), e._currentTimeUpdateTimer && clearInterval(e._currentTimeUpdateTimer), d.fn.destroy.call(this), this._isMobile() && e.options.editable && (e.options.editable.create !== !1 && e._addUserEvents.destroy(), e.options.editable.update !== !1 && e._editUserEvents.destroy())
                }
            });
        u(!0, l, {
            TimelineView: y,
            TimelineWeekView: y.extend({
                options: {
                    name: "TimelineWeekView",
                    title: "Timeline Week",
                    selectedDateFormat: "{0:D} - {1:D}",
                    selectedShortDateFormat: "{0:d} - {1:d}",
                    majorTick: 120
                },
                name: "timelineWeek",
                calculateDateRange: function() {
                    var e, t, n = this.options.date,
                        i = s.date.dayOfWeek(n, this.calendarInfo().firstDay, -1),
                        r = [];
                    for (e = 0, t = 7; t > e; e++) r.push(i), i = s.date.nextDay(i);
                    this._render(r)
                }
            }),
            TimelineWorkWeekView: y.extend({
                options: {
                    name: "TimelineWorkWeekView",
                    title: "Timeline Work Week",
                    selectedDateFormat: "{0:D} - {1:D}",
                    selectedShortDateFormat: "{0:d} - {1:d}",
                    majorTick: 120
                },
                name: "timelineWorkWeek",
                nextDate: function() {
                    return s.date.dayOfWeek(s.date.nextDay(this.endDate()), this.options.workWeekStart, 1)
                },
                previousDate: function() {
                    return s.date.previousDay(this.startDate())
                },
                calculateDateRange: function() {
                    for (var e = this.options.date, t = s.date.dayOfWeek(e, this.options.workWeekStart, -1), n = s.date.dayOfWeek(t, this.options.workWeekEnd, 1), i = []; n >= t;) i.push(t), t = s.date.nextDay(t);
                    this._render(i)
                }
            }),
            TimelineMonthView: y.extend({
                options: {
                    name: "TimelineMonthView",
                    title: "Timeline Month",
                    selectedDateFormat: "{0:D} - {1:D}",
                    selectedShortDateFormat: "{0:d} - {1:d}",
                    workDayStart: new Date(1980, 1, 1, 0, 0, 0),
                    workDayEnd: new Date(1980, 1, 1, 23, 59, 59),
                    footer: !1,
                    majorTick: 1440,
                    minorTickCount: 1
                },
                name: "timelineMonth",
                calculateDateRange: function() {
                    var e, t, n = this.options.date,
                        i = s.date.firstDayOfMonth(n),
                        r = s.date.lastDayOfMonth(n),
                        o = [];
                    for (e = 0, t = r.getDate(); t > e; e++) o.push(i), i = s.date.nextDay(i);
                    this._render(o)
                }
            })
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.scheduler.min", ["kendo.dropdownlist.min", "kendo.editable.min", "kendo.multiselect.min", "kendo.window.min", "kendo.datetimepicker.min", "kendo.scheduler.recurrence.min", "kendo.scheduler.view.min", "kendo.scheduler.dayview.min", "kendo.scheduler.agendaview.min", "kendo.scheduler.monthview.min", "kendo.scheduler.timelineview.min", "kendo.mobile.actionsheet.min", "kendo.mobile.pane.min", "kendo.pdf.min"], e)
}(function() {
    return function(e, t) {
        function n(e, t) {
            return t = t || "", e.startTimezone && (t = e.startTimezone, e.endTimezone && (t += " | " + e.endTimezone)), t
        }

        function i(e, t) {
            var n = t.timezone;
            n && (e[I.attr("timezone")] = n)
        }

        function r(e, t) {
            var n, i = t.model.fields[t.field].validation;
            i && (n = i.dateCompare, n && G(n) && n.message && (e[I.attr("dateCompare-msg")] = n.message))
        }

        function o(e, t) {
            return function(n) {
                return n = e(n), s(n, "apply", t), n || []
            }
        }

        function a(e, t) {
            return function(n) {
                return n && ("[object Array]" === K.call(n) || n instanceof I.data.ObservableArray || (n = [n])), s(n, "remove", t, !0), n = e(n), n || []
            }
        }

        function s(e, t, n, i) {
            var r, o, a;
            for (e = e || [], o = 0, a = e.length; a > o; o++) r = e[o], i ? r.startTimezone || r.endTimezone ? n ? (r.start = I.timezone.convert(r.start, r.startTimezone || r.endTimezone, n), r.end = I.timezone.convert(r.end, r.endTimezone || r.startTimezone, n), r.start = I.timezone[t](r.start, n), r.end = I.timezone[t](r.end, n)) : (r.start = I.timezone[t](r.start, r.startTimezone || r.endTimezone), r.end = I.timezone[t](r.end, r.endTimezone || r.startTimezone)) : n && (r.start = I.timezone[t](r.start, n), r.end = I.timezone[t](r.end, n)) : r.startTimezone || r.endTimezone ? (r.start = I.timezone[t](r.start, r.startTimezone || r.endTimezone), r.end = I.timezone[t](r.end, r.endTimezone || r.startTimezone), n && (r.start = I.timezone.convert(r.start, r.startTimezone || r.endTimezone, n), r.end = I.timezone.convert(r.end, r.endTimezone || r.startTimezone, n))) : n && (r.start = I.timezone[t](r.start, n), r.end = I.timezone[t](r.end, n)), i && delete r.uid;
            return e
        }

        function l(e, t) {
            for (var n, i = e.length, r = 0; i > r; r++)
                if (n = e[r], n.uid === t) return n
        }

        function c(e, t, n) {
            return e = n ? I.timezone.convert(e, t, n) : I.timezone.remove(e, t)
        }

        function d(e) {
            var t, n, i, r, o, a, s, l, d, u, h, f;
            return e.filter("[name=end]").length && (t = e.closest(".k-scheduler-edit-form"), n = t.find("[name=start]:visible"), i = t.find("[name=end]:visible"), i[0] && n[0] && (a = I.widgetInstance(n, I.ui), s = I.widgetInstance(i, I.ui), l = t.data("kendoEditable"), d = l ? l.options.model : null, a && s ? (r = a.value(), o = s.value()) : (r = I.parseDate(n.val()), o = I.parseDate(i.val())), r && o)) ? (d && (u = n.attr(I.attr("timezone")), h = d.startTimezone, f = d.endTimezone, h = h || f, f = f || h, h && (r = c(r, h, u), o = c(o, f, u))), o >= r) : !0
        }

        function u(e, t, n, i) {
            for (var r = e.length, o = [], a = 0; r > a; a++) o = o.concat(e[a].expand(t, n, i));
            return o
        }

        function h(e) {
            return delete e.name, delete e.prefix, delete e.remove, delete e.edit, delete e.add, delete e.navigate, e
        }

        function f(t, n) {
            var i, r, o = (t.fields || t)[n],
                a = ["url", "email", "number", "date", "boolean"],
                s = o ? o.validation : {},
                l = I.attr("type"),
                c = e.inArray,
                d = {};
            for (i in s) r = s[i], c(i, a) >= 0 ? d[l] = i : I.isFunction(r) || (d[i] = G(r) ? r.value || i : r), d[I.attr(i + "-msg")] = r.message;
            return d
        }

        function p(t, n) {
            var i = f(n, t.field);
            return function(n) {
                e(I.format('<select data-{0}bind="value:{1}">', I.ns, t.field)).appendTo(n).attr(i).kendoDropDownList({
                    dataTextField: t.dataTextField,
                    dataValueField: t.dataValueField,
                    dataSource: t.dataSource,
                    valuePrimitive: t.valuePrimitive,
                    optionLabel: "None",
                    template: I.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#', t.dataColorField, t.dataTextField)
                })
            }
        }

        function m(t) {
            var n = f(t.model, t.field);
            return function(t) {
                e('<textarea name="description" class="k-textbox"/>').attr(n).appendTo(t)
            }
        }

        function g(t, n) {
            var i = f(n, t.field);
            return function(n) {
                e(I.format('<select data-{0}bind="value:{1}">', I.ns, t.field)).appendTo(n).attr(i).kendoMultiSelect({
                    dataTextField: t.dataTextField,
                    dataValueField: t.dataValueField,
                    dataSource: t.dataSource,
                    valuePrimitive: t.valuePrimitive,
                    itemTemplate: I.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#', t.dataColorField, t.dataTextField),
                    tagTemplate: I.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#', t.dataColorField, t.dataTextField)
                })
            }
        }

        function v(t, n) {
            var i = f(n, t.field);
            return function(n) {
                var r, o, a = "",
                    s = t.dataSource.view();
                for (r = 0, o = s.length; o > r; r++) a += I.format('<option value="{0}">{1}</option>', I.getter(t.dataValueField)(s[r]), I.getter(t.dataTextField)(s[r]));
                e(I.format('<select data-{0}bind="value:{1}" multiple="multiple" data-{0}value-primitive="{3}">{2}</select>', I.ns, t.field, a, t.valuePrimitive)).appendTo(n).attr(i)
            }
        }

        function _(e, t) {
            var n, i = e.end.getTime() - e.start.getTime(),
                r = new Date(e.start.getTime());
            return I.date.setTime(r, t), n = new Date(r.getTime()), I.date.setTime(n, i, !0), {
                start: r,
                end: n
            }
        }
        var b, w, y, k, x, C, S, T, D, A, E, F, I = window.kendo,
            M = I.date,
            R = I.support.input,
            P = M.MS_PER_DAY,
            z = M.getDate,
            B = I.date.getMilliseconds,
            L = I.recurrence,
            H = I.keys,
            N = I.ui,
            O = N.Widget,
            V = N.DataBoundWidget,
            U = "string",
            W = N.Popup,
            j = N.Calendar,
            q = I.data.DataSource,
            G = e.isPlainObject,
            $ = e.extend,
            Y = e.proxy,
            K = Object.prototype.toString,
            Q = e.isArray,
            X = ".kendoScheduler",
            J = "click",
            Z = "change",
            ee = "cancel",
            te = "remove",
            ne = "save",
            ie = "add",
            re = "edit",
            oe = /(?:value:start|value:end)(?:,|$)/,
            ae = z(new Date),
            se = "recurrenceException",
            le = "Are you sure you want to delete this event?",
            ce = "Do you want to delete only this event occurrence or the whole series?",
            de = "Do you want to edit only this event occurrence or the whole series?",
            ue = "Are you sure you want to delete this event occurrence?",
            he = "Are you sure you want to delete the whole series?",
            fe = '<a class="k-button #=className#" #=attr# href="\\#">#=text#</a>',
            pe = I.template('<li class="k-current-view" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>'),
            me = I.template('<div class="k-floatwrap k-header k-scheduler-toolbar"># if (pdf) { #<ul class="k-reset k-scheduler-tools"><li><a role="button" href="\\#" class="k-button k-pdf"><span class="k-icon k-i-pdf"></span>${messages.pdf}</a></li></ul># } #<ul class="k-reset k-scheduler-navigation"><li class="k-state-default k-header k-nav-today"><a role="button" href="\\#" class="k-link">${messages.today}</a></li><li class="k-state-default k-header k-nav-prev"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-arrow-w"></span></a></li><li class="k-state-default k-header k-nav-next"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-arrow-e"></span></a></li><li class="k-state-default k-nav-current"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-calendar"></span><span class="k-sm-date-format" data-#=ns#bind="text: formattedShortDate"></span><span class="k-lg-date-format" data-#=ns#bind="text: formattedDate"></span></a></li></ul>#if(viewsCount === 1){#<a role="button" data-#=ns#name="#=view#" href="\\#" class="k-link k-scheduler-refresh"><span class="k-icon k-i-refresh"></span></a>#}else{#<ul class="k-reset k-header k-scheduler-views">#for(var view in views){#<li class="k-state-default k-view-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>#}#</ul>#}#</div>'),
            ge = I.template('<div class="k-floatwrap k-header k-scheduler-toolbar"><ul class="k-reset k-header k-scheduler-navigation"><li class="k-state-default k-nav-today"><a role="button" href="\\#" class="k-link">${messages.today}</a></li></ul>#if(viewsCount === 1){#<a role="button" data-#=ns#name="#=view#" href="\\#" class="k-link k-scheduler-refresh"><span class="k-icon k-i-refresh"></span></a>#}else{#<ul class="k-reset k-header k-scheduler-views">#for(var view in views){#<li class="k-state-default k-view-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>#}#</ul>#}#</div><div class="k-floatwrap k-header k-scheduler-toolbar"><ul class="k-reset k-header k-scheduler-navigation"><li class="k-state-default k-nav-prev"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-arrow-w"></span></a></li><li class="k-state-default k-nav-current"><span class="k-sm-date-format" data-#=ns#bind="text: formattedShortDate"></span><span class="k-lg-date-format" data-#=ns#bind="text: formattedDate"></span></li><li class="k-state-default k-nav-next"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-arrow-e"></span></a></li></ul></div>'),
            ve = function(t, n) {
                var o = {
                        name: n.field
                    },
                    a = R.date ? "" : I.attr("role") + '="datepicker" ',
                    s = I.attr("role") + '="datetimepicker" ',
                    l = n.model.isAllDay,
                    c = I.attr("validate") + "='" + !l + "'",
                    d = I.attr("validate") + "='" + l + "'";
                i(o, n), r(o, n), e('<input type="datetime-local" required ' + I.attr("type") + '="date" ' + s + I.attr("bind") + '="value:' + n.field + ',invisible:isAllDay" ' + c + "/>").attr(o).appendTo(t), e('<input type="date" required ' + I.attr("type") + '="date" ' + a + I.attr("bind") + '="value:' + n.field + ',visible:isAllDay" ' + d + "/>").attr(o).appendTo(t), e("<span " + I.attr("for") + '="' + n.field + '" class="k-invalid-msg"/>').hide().appendTo(t)
            },
            _e = function(t, n) {
                var o = {
                        name: n.field
                    },
                    a = n.model.isAllDay,
                    s = I.attr("validate") + "='" + !a + "' ",
                    l = I.attr("validate") + "='" + a + "' ";
                i(o, n), r(o, n), e('<input type="text" required ' + I.attr("type") + '="date" ' + I.attr("role") + '="datetimepicker" ' + I.attr("bind") + '="value:' + n.field + ',invisible:isAllDay" ' + s + "/>").attr(o).appendTo(t), e('<input type="text" required ' + I.attr("type") + '="date" ' + I.attr("role") + '="datepicker" ' + I.attr("bind") + '="value:' + n.field + ',visible:isAllDay" ' + l + "/>").attr(o).appendTo(t), e("<span " + I.attr("bind") + '="text: ' + n.field + 'Timezone"></span>').appendTo(t), "end" === n.field && e("<span " + I.attr("bind") + '="text: startTimezone, invisible: endTimezone"></span>').appendTo(t), e("<span " + I.attr("for") + '="' + n.field + '" class="k-invalid-msg"/>').hide().appendTo(t)
            },
            be = function(t, n) {
                e("<div " + I.attr("bind") + '="value:' + n.field + '" />').attr({
                    name: n.field
                }).appendTo(t).kendoRecurrenceEditor({
                    start: n.model.start,
                    timezone: n.timezone,
                    messages: n.messages
                })
            },
            we = function(t, n) {
                e("<div " + I.attr("bind") + '="value:' + n.field + '" />').attr({
                    name: n.field
                }).appendTo(t).kendoMobileRecurrenceEditor({
                    start: n.model.start,
                    timezone: n.timezone,
                    messages: n.messages,
                    pane: n.pane,
                    value: n.model[n.field]
                })
            },
            ye = function(t, i) {
                var r = n(i.model, i.messages.noTimezone);
                e('<a href="#" class="k-button k-timezone-button" data-bind="invisible:isAllDay">' + r + "</a>").click(i.click).appendTo(t)
            },
            ke = function(t, n) {
                e('<a href="#" class="k-button" data-bind="invisible:isAllDay">' + n.messages.timezoneEditorButton + "</a>").click(n.click).appendTo(t)
            },
            xe = function(t, n) {
                e("<div " + I.attr("bind") + '="value:' + n.field + '" />').attr({
                    name: n.field
                }).toggle(n.visible).appendTo(t).kendoMobileTimezoneEditor({
                    optionLabel: n.noTimezone
                })
            },
            Ce = function(t, n) {
                e("<div " + I.attr("bind") + '="value:' + n.field + '" />').attr({
                    name: n.field
                }).toggle(n.visible).appendTo(t).kendoTimezoneEditor({
                    optionLabel: n.noTimezone
                })
            },
            Se = I.Class.extend({
                init: function(t, n) {
                    var i = t.timezone;
                    this.reader = n, n.model && (this.model = n.model), this.timezone = i, this.data = o(e.proxy(this.data, this), i), this.serialize = a(e.proxy(this.serialize, this), i)
                },
                errors: function(e) {
                    return this.reader.errors(e)
                },
                parse: function(e) {
                    return this.reader.parse(e)
                },
                data: function(e) {
                    return this.reader.data(e)
                },
                total: function(e) {
                    return this.reader.total(e)
                },
                groups: function(e) {
                    return this.reader.groups(e)
                },
                aggregates: function(e) {
                    return this.reader.aggregates(e)
                },
                serialize: function(e) {
                    return this.reader.serialize(e)
                }
            }),
            Te = I.data.Model.define({
                init: function(e) {
                    var t = this;
                    I.data.Model.fn.init.call(t, e), t._defaultId = t.defaults[t.idField]
                },
                _time: function(e) {
                    var t = this[e],
                        n = "_" + e + "Time";
                    return this[n] ? this[n] - I.date.toUtcTime(I.date.getDate(t)) : B(t)
                },
                _date: function(e) {
                    var t = "_" + e + "Time";
                    return this[t] ? this[t] - this._time(e) : I.date.getDate(this[e])
                },
                clone: function(t, n) {
                    var i = this.uid,
                        r = new this.constructor(e.extend({}, this.toJSON(), t));
                    return n || (r.uid = i), r
                },
                duration: function() {
                    var e = this.end,
                        t = this.start,
                        n = (e.getTimezoneOffset() - t.getTimezoneOffset()) * I.date.MS_PER_MINUTE;
                    return e - t - n
                },
                expand: function(e, t, n) {
                    return L ? L.expand(this, e, t, n) : [this]
                },
                update: function(e) {
                    for (var t in e) this.set(t, e[t]);
                    this._startTime && this.set("_startTime", I.date.toUtcTime(this.start)), this._endTime && this.set("_endTime", I.date.toUtcTime(this.end))
                },
                isMultiDay: function() {
                    return this.isAllDay || this.duration() >= I.date.MS_PER_DAY
                },
                isException: function() {
                    return !this.isNew() && this.recurrenceId
                },
                isOccurrence: function() {
                    return this.isNew() && this.recurrenceId
                },
                isRecurring: function() {
                    return !(!this.recurrenceRule && !this.recurrenceId)
                },
                isRecurrenceHead: function() {
                    return !(!this.id || !this.recurrenceRule)
                },
                toOccurrence: function(t) {
                    return t = e.extend(t, {
                        recurrenceException: null,
                        recurrenceRule: null,
                        recurrenceId: this.id || this.recurrenceId
                    }), t[this.idField] = this.defaults[this.idField], this.clone(t, !0)
                },
                toJSON: function() {
                    var e = I.data.Model.fn.toJSON.call(this);
                    return e.uid = this.uid, delete e._startTime, delete e._endTime, e
                },
                shouldSerialize: function(e) {
                    return I.data.Model.fn.shouldSerialize.call(this, e) && "_defaultId" !== e
                },
                set: function(e, t) {
                    var n, i, r, o = this.isAllDay || !1;
                    I.data.Model.fn.set.call(this, e, t), "isAllDay" == e && t != o && (n = I.date.getDate(this.start), i = new Date(this.end), r = I.date.getMilliseconds(i), 0 === r && t && (r = P), this.set("start", n), t === !0 ? (I.date.setTime(i, -r), n > i && (i = n)) : I.date.setTime(i, P - r), this.set("end", i))
                },
                id: "id",
                fields: {
                    id: {
                        type: "number"
                    },
                    title: {
                        defaultValue: "",
                        type: "string"
                    },
                    start: {
                        type: "date",
                        validation: {
                            required: !0
                        }
                    },
                    startTimezone: {
                        type: "string"
                    },
                    end: {
                        type: "date",
                        validation: {
                            required: !0,
                            dateCompare: {
                                value: d
                            }
                        }
                    },
                    endTimezone: {
                        type: "string"
                    },
                    recurrenceRule: {
                        defaultValue: "",
                        type: "string"
                    },
                    recurrenceException: {
                        defaultValue: "",
                        type: "string"
                    },
                    isAllDay: {
                        type: "boolean",
                        defaultValue: !1
                    },
                    description: {
                        type: "string"
                    }
                }
            }),
            De = q.extend({
                init: function(e) {
                    q.fn.init.call(this, $(!0, {}, {
                        schema: {
                            modelBase: Te,
                            model: Te
                        }
                    }, e)), this.reader = new Se(this.options.schema, this.reader)
                },
                expand: function(e, t) {
                    var n = this.view(),
                        i = {};
                    return e && t && (t = new Date(t.getTime() + P - 1), i = {
                        logic: "or",
                        filters: [{
                            logic: "and",
                            filters: [{
                                field: "start",
                                operator: "gte",
                                value: e
                            }, {
                                field: "end",
                                operator: "gte",
                                value: e
                            }, {
                                field: "start",
                                operator: "lte",
                                value: t
                            }]
                        }, {
                            logic: "and",
                            filters: [{
                                field: "start",
                                operator: "lte",
                                value: new Date(e.getTime() + P - 1)
                            }, {
                                field: "end",
                                operator: "gte",
                                value: e
                            }]
                        }]
                    }, n = new I.data.Query(u(n, e, t, this.reader.timezone)).filter(i).toArray()), n
                },
                cancelChanges: function(e) {
                    e && e.isOccurrence() && this._removeExceptionDate(e), q.fn.cancelChanges.call(this, e)
                },
                insert: function(e, t) {
                    if (t) {
                        if (!(t instanceof Te)) {
                            var n = t;
                            t = this._createNewModel(), t.accept(n)
                        }
                        return (!this._pushCreated && t.isRecurrenceHead() || t.recurrenceId) && (t = t.recurrenceId ? t : t.toOccurrence(), this._addExceptionDate(t)), q.fn.insert.call(this, e, t)
                    }
                },
                pushCreate: function(e) {
                    this._pushCreated = !0, q.fn.pushCreate.call(this, e), this._pushCreated = !1
                },
                remove: function(e) {
                    return e.isRecurrenceHead() ? this._removeExceptions(e) : e.isRecurring() && this._addExceptionDate(e), q.fn.remove.call(this, e)
                },
                _removeExceptions: function(e) {
                    for (var t = this.data().slice(0), n = t.shift(), i = e.id; n;) n.recurrenceId === i && q.fn.remove.call(this, n), n = t.shift();
                    e.set(se, "")
                },
                _removeExceptionDate: function(e) {
                    var t, n;
                    e.recurrenceId && (t = this.get(e.recurrenceId), t && (n = e.start, t.set(se, t.recurrenceException.replace(L.toExceptionString(n, this.reader.timezone), ""))));
                },
                _addExceptionDate: function(e) {
                    var t = e.start,
                        n = this.reader.timezone,
                        i = this.get(e.recurrenceId),
                        r = i.recurrenceException || "";
                    L.isException(r, t, n) || i.set(se, r + L.toExceptionString(t, n))
                }
            });
        De.create = function(e) {
            (Q(e) || e instanceof I.data.ObservableArray) && (e = {
                data: e
            });
            var t = e || {},
                n = t.data;
            if (t.data = n, !(t instanceof De) && t instanceof I.data.DataSource) throw Error("Incorrect DataSource type. Only SchedulerDataSource instances are supported");
            return t instanceof De ? t : new De(t)
        }, $(!0, I.data, {
            SchedulerDataSource: De,
            SchedulerDataReader: Se,
            SchedulerEvent: Te
        }), b = {
            update: {
                text: "Save",
                className: "k-primary k-scheduler-update"
            },
            canceledit: {
                text: "Cancel",
                className: "k-scheduler-cancel"
            },
            destroy: {
                text: "Delete",
                imageClass: "k-delete",
                className: "k-primary k-scheduler-delete",
                iconClass: "k-icon"
            }
        }, w = {
            mobile: {
                dateRange: ve,
                timezonePopUp: ye,
                timezone: xe,
                recurrence: we,
                description: m,
                multipleResources: v,
                resources: p
            },
            desktop: {
                dateRange: _e,
                timezonePopUp: ke,
                timezone: Ce,
                recurrence: be,
                description: m,
                multipleResources: g,
                resources: p
            }
        }, y = I.Observable.extend({
            init: function(e, t) {
                I.Observable.fn.init.call(this), this.element = e, this.options = $(!0, {}, this.options, t), this.createButton = this.options.createButton, this.toggleDateValidationHandler = Y(this._toggleDateValidation, this)
            },
            _toggleDateValidation: function(t) {
                if ("isAllDay" == t.field) {
                    var n, i, r, o = this.container,
                        a = this.editable.options.model.isAllDay,
                        s = I.attr("bind");
                    o.find("[" + s + "*=end],[" + s + "*=start]").each(function() {
                        n = e(this), oe.test(n.attr(s)) && (i = n.is("[" + I.attr("role") + "=datetimepicker],[type*=datetime]"), r = a !== i, n.attr(I.attr("validate"), r))
                    })
                }
            },
            fields: function(e, t) {
                var n, i, r = this,
                    o = r.options.messages,
                    a = r.options.timezone,
                    s = function(e) {
                        e.preventDefault(), r._initTimezoneEditor(t, this)
                    },
                    l = [{
                        field: "title",
                        title: o.editor.title
                    }, {
                        field: "start",
                        title: o.editor.start,
                        editor: e.dateRange,
                        timezone: a
                    }, {
                        field: "end",
                        title: o.editor.end,
                        editor: e.dateRange,
                        timezone: a
                    }, {
                        field: "isAllDay",
                        title: o.editor.allDayEvent
                    }];
                I.timezone.windows_zones && (l.push({
                    field: "timezone",
                    title: o.editor.timezone,
                    editor: e.timezonePopUp,
                    click: s,
                    messages: o.editor,
                    model: t
                }), l.push({
                    field: "startTimezone",
                    title: o.editor.startTimezone,
                    editor: e.timezone,
                    noTimezone: o.editor.noTimezone
                }), l.push({
                    field: "endTimezone",
                    title: o.editor.endTimezone,
                    editor: e.timezone,
                    noTimezone: o.editor.noTimezone
                })), t.recurrenceId || l.push({
                    field: "recurrenceRule",
                    title: o.editor.repeat,
                    editor: e.recurrence,
                    timezone: a,
                    messages: o.recurrenceEditor,
                    pane: this.pane
                }), "description" in t && l.push({
                    field: "description",
                    title: o.editor.description,
                    editor: e.description({
                        model: t,
                        field: "description"
                    })
                });
                for (n = 0; this.options.resources.length > n; n++) i = this.options.resources[n], l.push({
                    field: i.field,
                    title: i.title,
                    editor: i.multiple ? e.multipleResources(i, t) : e.resources(i, t)
                });
                return l
            },
            end: function() {
                return this.editable.end()
            },
            _buildEditTemplate: function(e, t, n) {
                var i, r, o, a, s = this.options.messages,
                    l = $({}, I.Template, this.options.templateSettings),
                    c = l.paramName,
                    d = this.options.editable.template,
                    u = "";
                if (d) typeof d === U && (d = window.unescape(d)), u += I.template(d, l)(e);
                else
                    for (i = 0, r = t.length; r > i; i++) o = t[i], "startTimezone" === o.field && (u += '<div class="k-popup-edit-form k-scheduler-edit-form k-scheduler-timezones" style="display:none">', u += '<div class="k-edit-form-container">', u += '<div class="k-edit-label"></div>', u += '<div class="k-edit-field"><label class="k-check"><input class="k-timezone-toggle" type="checkbox" />' + s.editor.separateTimezones + "</label></div>"), u += '<div class="k-edit-label"><label for="' + o.field + '">' + (o.title || o.field || "") + "</label></div>", !e.editable || e.editable(o.field) ? (n.push(o), u += "<div " + I.attr("container-for") + '="' + o.field + '" class="k-edit-field"></div>') : (a = "#:", o.field ? (o = I.expr(o.field, c), a += o + "==null?'':" + o) : a += "''", a += "#", a = I.template(a, l), u += '<div class="k-edit-field">' + a(e) + "</div>"), "endTimezone" === o.field && (u += this._createEndTimezoneButton());
                return u
            },
            _createEndTimezoneButton: function() {
                return "</div></div>"
            },
            _revertTimezones: function(e) {
                e.set("startTimezone", this._startTimezone), e.set("endTimezone", this._endTimezone), delete this._startTimezone, delete this._endTimezone
            }
        }), k = y.extend({
            init: function() {
                y.fn.init.apply(this, arguments), this.pane = I.mobile.ui.Pane.wrap(this.element), this.pane.element.parent().css("height", this.options.height), this.view = this.pane.view(), this._actionSheetButtonTemplate = I.template('<li><a #=attr# class="k-button #=className#" href="\\#">#:text#</a></li>'), this._actionSheetPopupOptions = e(document.documentElement).hasClass("km-root") ? {
                    modal: !1
                } : {
                    align: "bottom center",
                    position: "bottom center",
                    effect: "slideIn:up"
                }
            },
            options: {
                animations: {
                    left: "slide",
                    right: "slide:right"
                }
            },
            destroy: function() {
                this.close(), this.unbind(), this.pane.destroy()
            },
            _initTimezoneEditor: function(t) {
                var i, r = this,
                    o = r.pane,
                    a = r.options.messages,
                    s = r.timezoneView,
                    l = r.container.find(".k-scheduler-timezones"),
                    c = l.find(".k-timezone-toggle"),
                    d = l.find(".k-edit-label:last").add(l.find(".k-edit-field:last")),
                    u = function(e) {
                        if ("startTimezone" === e.field) {
                            var n = t.startTimezone;
                            c.prop("disabled", !n), n || (d.hide(), t.set("endTimezone", ""), c.prop("checked", !1))
                        }
                    };
                r._startTimezone = t.startTimezone || "", r._endTimezone = t.endTimezone || "", s || (i = '<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list"><div data-role="header" class="k-header"><a href="#" class="k-button k-scheduler-cancel">' + a.cancel + "</a>" + a.editor.timezoneTitle + '<a href="#" class="k-button k-scheduler-update">' + a.save + "</a></div></div>", this.timezoneView = s = o.append(i), s.contentElement().append(l.show()), s.element.on(J + X, ".k-scheduler-cancel, .k-scheduler-update", function(i) {
                    var s, l;
                    i.preventDefault(), i.stopPropagation(), e(this).hasClass("k-scheduler-cancel") && r._revertTimezones(t), t.unbind("change", u), s = o.element.find("#edit").data("kendoMobileView"), l = n(t, a.editor.noTimezone), s.contentElement().find(".k-timezone-button").text(l), o.navigate(s, r.options.animations.right)
                }), c.click(function() {
                    d.toggle(c.prop("checked")), t.set("endTimezone", "")
                }), t.bind("change", u)), c.prop("checked", t.endTimezone).prop("disabled", !t.startTimezone), t.endTimezone ? d.show() : d.hide(), o.navigate(s, r.options.animations.left)
            },
            _createActionSheetButton: function(e) {
                return e.template = this._actionSheetButtonTemplate, this.createButton(e)
            },
            showDialog: function(t) {
                var n, i, r = "",
                    o = '<ul><li class="km-actionsheet-title">' + t.title + "</li>",
                    a = this.element.find(".k-event[" + I.attr("uid") + "='" + t.model.uid + "']");
                for (this.container && (a = this.container.find(".k-scheduler-delete"), a[0] && (r = "phone")), n = 0; t.buttons.length > n; n++) o += this._createActionSheetButton(t.buttons[n]);
                o += "</ul>", i = e(o).appendTo(this.pane.view().element).kendoMobileActionSheet({
                    type: r,
                    cancel: this.options.messages.cancel,
                    cancelTemplate: '<li class="km-actionsheet-cancel"><a class="k-button" href="\\#">#:cancel#</a></li>',
                    close: function() {
                        this.destroy()
                    },
                    command: function(n) {
                        var r = i.element.find("li:not(.km-actionsheet-cancel) > .k-button").index(e(n.currentTarget));
                        r > -1 && (i.close(), t.buttons[r].click())
                    },
                    popup: this._actionSheetPopupOptions
                }).data("kendoMobileActionSheet"), i.open(a)
            },
            editEvent: function(t) {
                var n, i, r, o, a, s = this.pane,
                    l = "",
                    c = this.options.messages,
                    d = c.save,
                    u = c.destroy,
                    h = c.cancel,
                    f = c.editor.editorTitle;
                return l += '<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list" id="edit" ' + I.attr("uid") + '="' + t.uid + '"><div data-role="header" class="k-header"><a href="#" class="k-button k-scheduler-cancel">' + h + "</a>" + f + '<a href="#" class="k-button k-scheduler-update">' + d + "</a></div>", n = this.fields(w.mobile, t), i = this, r = [], l += this._buildEditTemplate(t, n, r), !t.isNew() && this.options.editable && this.options.editable.destroy !== !1 && (l += '<div class="k-edit-buttons"><a href="#" class="k-scheduler-delete k-button">' + u + "</a></div>"), l += "</div>", o = s.append(l), a = this.container = o.element, this.editable = a.kendoEditable({
                    fields: r,
                    model: t,
                    clearContainer: !1,
                    target: i.options.target,
                    validateOnBlur: !0
                }).data("kendoEditable"), a.find("input[type=checkbox],input[type=radio]").parent(".k-edit-field").addClass("k-check").prev(".k-edit-label").addClass("k-check").click(function() {
                    e(this).next().children("input").click()
                }), this.trigger("edit", {
                    container: a,
                    model: t
                }) ? this.trigger("cancel", {
                    container: a,
                    model: t
                }) : (a.on(J + X, "a.k-scheduler-edit, a.k-scheduler-cancel, a.k-scheduler-update, a.k-scheduler-delete", function(n) {
                    var r, o;
                    n.preventDefault(), n.stopPropagation(), r = e(this), r.hasClass("k-scheduler-edit") ? s.navigate("#edit", i.options.animations.right) : (o = "cancel", r.hasClass("k-scheduler-update") ? o = "save" : r.hasClass("k-scheduler-delete") && (o = "remove"), i.trigger(o, {
                        container: a,
                        model: t
                    }))
                }), s.navigate(o, i.options.animations.left), t.bind("change", i.toggleDateValidationHandler)), this.editable
            },
            _views: function() {
                return this.pane.element.find(I.roleSelector("view")).not(this.view.element)
            },
            close: function() {
                var e, t, n, i;
                if (this.container) {
                    for (this.pane.navigate("", this.options.animations.right), e = this._views(), n = 0, i = e.length; i > n; n++) t = e.eq(n).data("kendoMobileView"), t && t.purge();
                    e.remove(), this.container = null, this.editable && (this.editable.options.model.unbind("change", this.toggleDateValidationHandler), this.editable.destroy(), this.editable = null), this.timezoneView = null
                }
            }
        }), x = y.extend({
            destroy: function() {
                this.close(), this.unbind()
            },
            editEvent: function(t) {
                var n, i, r, o = this,
                    a = o.options.editable,
                    s = "<div " + I.attr("uid") + '="' + t.uid + '" class="k-popup-edit-form k-scheduler-edit-form"><div class="k-edit-form-container">',
                    l = o.options.messages,
                    c = l.save,
                    d = l.cancel,
                    u = l.destroy,
                    h = this.fields(w.desktop, t),
                    f = [];
                return s += this._buildEditTemplate(t, h, f), i = G(a) ? a.window : {}, s += '<div class="k-edit-buttons k-state-default">', s += this.createButton({
                    name: "update",
                    text: c,
                    attr: n
                }) + this.createButton({
                    name: "canceledit",
                    text: d,
                    attr: n
                }), t.isNew() || a.destroy === !1 || (s += this.createButton({
                    name: "delete",
                    text: u,
                    attr: n
                })), s += "</div></div></div>", r = this.container = e(s).appendTo(o.element).eq(0).kendoWindow($({
                    modal: !0,
                    resizable: !1,
                    draggable: !0,
                    title: l.editor.editorTitle,
                    visible: !1,
                    close: function(e) {
                        e.userTriggered && o.trigger(ee, {
                            container: r,
                            model: t
                        }) && e.preventDefault()
                    }
                }, i)), o.editable = r.kendoEditable({
                    fields: f,
                    model: t,
                    clearContainer: !1,
                    validateOnBlur: !0,
                    target: o.options.target
                }).data("kendoEditable"), o.trigger(re, {
                    container: r,
                    model: t
                }) ? o.trigger(ee, {
                    container: r,
                    model: t
                }) : (r.data("kendoWindow").center().open(), r.on(J + X, "a.k-scheduler-cancel", function(e) {
                    e.preventDefault(), e.stopPropagation(), o.trigger(ee, {
                        container: r,
                        model: t
                    })
                }), r.on(J + X, "a.k-scheduler-update", function(e) {
                    e.preventDefault(), e.stopPropagation(), o.trigger("save", {
                        container: r,
                        model: t
                    })
                }), r.on(J + X, "a.k-scheduler-delete", function(e) {
                    e.preventDefault(), e.stopPropagation(), o.trigger(te, {
                        container: r,
                        model: t
                    })
                }), I.cycleForm(r), t.bind("change", o.toggleDateValidationHandler)), o.editable
            },
            close: function() {
                var e = this,
                    t = function() {
                        e.editable && (e.editable.options.model.unbind("change", e.toggleDateValidationHandler), e.editable.destroy(), e.editable = null, e.container = null), e.popup && (e.popup.destroy(), e.popup = null)
                    };
                e.editable ? (e._timezonePopup && e._timezonePopup.data("kendoWindow") && (e._timezonePopup.data("kendoWindow").destroy(), e._timezonePopup = null), e.container.is(":visible") ? e.container.data("kendoWindow").bind("deactivate", t).close() : t()) : t()
            },
            _createEndTimezoneButton: function() {
                var e = this.options.messages,
                    t = "";
                return t += '<div class="k-edit-buttons k-state-default">', t += this.createButton({
                    name: "savetimezone",
                    text: e.save
                }) + this.createButton({
                    name: "canceltimezone",
                    text: e.cancel
                }), t += "</div></div></div>"
            },
            showDialog: function(t) {
                var n, i, r, o = I.format("<div class='k-popup-edit-form'><div class='k-edit-form-container'><p class='k-popup-message'>{0}</p>", t.text);
                for (o += '<div class="k-edit-buttons k-state-default">', n = 0; t.buttons.length > n; n++) o += this.createButton(t.buttons[n]);
                o += "</div></div></div>", i = this.element, this.popup && this.popup.destroy(), r = this.popup = e(o).appendTo(i).eq(0).on("click", ".k-button", function(n) {
                    n.preventDefault(), r.close();
                    var i = e(n.currentTarget).index();
                    t.buttons[i].click()
                }).kendoWindow({
                    modal: !0,
                    resizable: !1,
                    draggable: !1,
                    title: t.title,
                    visible: !1,
                    close: function() {
                        this.destroy(), i.focus()
                    }
                }).getKendoWindow(), r.center().open()
            },
            _initTimezoneEditor: function(e, t) {
                var n, i = this,
                    r = i.container.find(".k-scheduler-timezones"),
                    o = r.find(".k-timezone-toggle"),
                    a = r.find(".k-edit-label:last").add(r.find(".k-edit-field:last")),
                    s = r.find(".k-scheduler-savetimezone"),
                    l = r.find(".k-scheduler-canceltimezone"),
                    c = i._timezonePopup,
                    d = function(t) {
                        if ("startTimezone" === t.field) {
                            var n = e.startTimezone;
                            o.prop("disabled", !n), n || (a.hide(), e.set("endTimezone", ""), o.prop("checked", !1))
                        }
                    };
                i._startTimezone = e.startTimezone, i._endTimezone = e.endTimezone, c || (i._timezonePopup = c = r.kendoWindow({
                    modal: !0,
                    resizable: !1,
                    draggable: !0,
                    title: i.options.messages.editor.timezoneEditorTitle,
                    visible: !1,
                    close: function(n) {
                        e.unbind("change", d), n.userTriggered && i._revertTimezones(e), t && t.focus()
                    }
                }), o.click(function() {
                    a.toggle(o.prop("checked")), e.set("endTimezone", "")
                }), s.click(function(e) {
                    e.preventDefault(), n.close()
                }), l.click(function(t) {
                    t.preventDefault(), i._revertTimezones(e), n.close()
                }), e.bind("change", d)), o.prop("checked", e.endTimezone).prop("disabled", !e.startTimezone), e.endTimezone ? a.show() : a.hide(), n = c.data("kendoWindow"), n.center().open()
            }
        }), C = V.extend({
            init: function(t, n) {
                var i = this;
                O.fn.init.call(i, t, n), i.options.views && i.options.views.length || (i.options.views = ["day", "week"]), i.resources = [], i._initModel(), i._wrapper(), i._views(), i._toolbar(), i._dataSource(), i._resources(), i._resizeHandler = function() {
                    i.resize()
                }, i.wrapper.on("mousedown" + X + " selectstart" + X, function(t) {
                    e(t.target).is(":kendoFocusable") || t.preventDefault()
                }), i.options.editable && i.options.editable.resize !== !1 && i._resizable(), i._movable(), i._bindResize(), i.options.messages && i.options.messages.recurrence && (L.options = i.options.messages.recurrence), i._selectable(), i._ariaId = I.guid(), i._createEditor()
            },
            _bindResize: function() {
                e(window).on("resize" + X, this._resizeHandler)
            },
            _unbindResize: function() {
                e(window).off("resize" + X, this._resizeHandler)
            },
            dataItems: function() {
                var n, i, r, o, a, s = this,
                    l = s.items(),
                    c = s._data,
                    d = e.map(l, function(t) {
                        return e(t).attr("data-uid")
                    }),
                    u = {},
                    h = d.length;
                for (n = 0; h > n; n++) u[d[n]] = null;
                for (r = c.length, n = 0; r > n; n++) o = c[n], u[o.uid] !== t && (u[o.uid] = o);
                a = [];
                for (i in u) a.push(u[i]);
                return a
            },
            _isMobile: function() {
                var e = this.options;
                return e.mobile === !0 && I.support.mobileOS || "phone" === e.mobile || "tablet" === e.mobile
            },
            _isMobilePhoneView: function() {
                var e = this.options;
                return e.mobile === !0 && I.support.mobileOS && !I.support.mobileOS.tablet || "phone" === e.mobile
            },
            _groupsByResource: function(e, t, n, i, r) {
                var o, a, s, l, c, d, u;
                if (n || (n = []), o = e[0]) {
                    for (s = o.dataSource.view(), l = 0, c = 0; s.length > c; c++) d = I.getter(o.dataValueField)(s[c]), u = t + l + c, a = this._groupsByResource(e.slice(1), u, n, d, o.field), a[o.field] = d, l = a.groupIndex, r && i && (a[r] = i), 1 === e.length && (a.groupIndex = t + c, n.push(a));
                    return a
                }
                return {}
            },
            data: function() {
                return this._data
            },
            select: function(n) {
                var i, r, o, a, s, l, c, d, u, h, f = this,
                    p = f.view(),
                    m = f._selection,
                    g = p.groups;
                if (n === t) return o = p._selectedSlots, m ? (m && m.events && (r = f._selectedEvents()), {
                    start: m.start,
                    end: m.end,
                    events: r,
                    slots: o,
                    resources: p._resourceBySlot(m)
                }) : [];
                if (!n) return f._selection = null, f._old = null, p.clearSelection(), t;
                if (e.isArray(n) && (n = {
                    events: n.splice(0)
                }), n.resources) {
                    s = [], l = [], p.groupedResources && f._groupsByResource(p.groupedResources, 0, l);
                    for (a in n.resources) s.push({
                        field: a,
                        operator: "eq",
                        value: n.resources[a]
                    });
                    i = new I.data.Query(l).filter(s).toArray()
                }
                return n.events && n.events.length ? (f._selectEvents(n.events, i), f._select(), t) : (g && n.start && n.end && (c = z(p._startDate), d = I.date.addDays(z(p._endDate), 1), d > n.start && n.end >= c && (u = i && i.length ? g[i[0].groupIndex] : g[0], h = u.ranges(n.start, n.end, n.isAllDay, !1), h.length && (f._selection = {
                    start: I.timezone.toLocalDate(h[0].start.start),
                    end: I.timezone.toLocalDate(h[h.length - 1].end.end),
                    groupIndex: h[0].start.groupIndex,
                    index: h[0].start.index,
                    isAllDay: h[0].start.isDaySlot,
                    events: []
                }, f._select()))), t)
            },
            _selectEvents: function(e, t) {
                var n, i, r, o, a, s, l, c, d = this,
                    u = d.view(),
                    h = u.groups,
                    f = e.length,
                    p = t && t.length;
                for (n = 0; f > n; n++)
                    if (h && p) {
                        for (i = h[t[0].groupIndex], r = [], o = i.timeSlotCollectionCount(), a = i.daySlotCollectionCount(), s = 0; o > s; s++) r = r.concat(i.getTimeSlotCollection(s).events());
                        for (l = 0; a > l; l++) r = r.concat(i.getDaySlotCollection(l).events());
                        r = new I.data.Query(r).filter({
                            field: "element[0].getAttribute('data-uid')",
                            operator: "eq",
                            value: e[n]
                        }).toArray(), r[0] && d._createSelection(r[0].element)
                    } else c = u.element.find(I.format(".k-event[data-uid={0}], .k-task[data-uid={0}]", e[n])), c.length && d._createSelection(c[0])
            },
            _selectable: function() {
                var t, n = this,
                    i = n.wrapper,
                    r = I.support.mobileOS ? "touchend" : "mousedown";
                n.options.selectable && (n._tabindex(), i.on(r + X, ".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event", function(e) {
                    var t = e.which,
                        r = e.button,
                        o = I.support.browser,
                        a = t && 3 === t || r && 2 == r;
                    I.support.mobileOS && e.isDefaultPrevented() || (a || n._createSelection(e.currentTarget), i.focus(), o.msie && 9 > o.version && setTimeout(function() {
                        i.focus()
                    }))
                }), t = e.proxy(n._mouseMove, n), i.on("mousedown" + X, ".k-scheduler-header-all-day td, .k-scheduler-content td", function(e) {
                    var n = e.which,
                        r = e.button,
                        o = n && 3 === n || r && 2 == r;
                    o || i.on("mousemove" + X, ".k-scheduler-header-all-day td, .k-scheduler-content td", t)
                }), i.on("mouseup" + X + " mouseleave" + X, function() {
                    i.off("mousemove" + X, ".k-scheduler-header-all-day td, .k-scheduler-content td", t)
                }), i.on("focus" + X, function() {
                    n._selection || n._createSelection(n.wrapper.find(".k-scheduler-content").find("td:first")), n._select()
                }), i.on("focusout" + X, function() {
                    n.view().clearSelection(), n._ctrlKey = n._shiftKey = !1
                }), i.on("keydown" + X, Y(n._keydown, n)), i.on("keyup" + X, function(e) {
                    n._ctrlKey = e.ctrlKey, n._shiftKey = e.shiftKey
                }))
            },
            _select: function() {
                var t, n, i, r, o, a = this,
                    s = a.view(),
                    l = a.wrapper,
                    c = s.current(),
                    d = a._selection;
                if (c && (c.removeAttribute("id"), c.removeAttribute("aria-label"), l.removeAttr("aria-activedescendant")), s.select(d), c = s.current(), c && a._old !== c) {
                    if (t = e(c).data("uid"), a._old && t && t === e(a._old).data("uid")) return;
                    i = d, r = a._selectedEvents(), o = s._selectedSlots, r[0] ? (i = r[0] || d, n = I.format(a.options.messages.ariaEventLabel, i.title, i.start, i.start)) : n = I.format(a.options.messages.ariaSlotLabel, i.start, i.end), c.setAttribute("id", a._ariaId), c.setAttribute("aria-label", n), l.attr("aria-activedescendant", a._ariaId), a._old = c, a.trigger("change", {
                        start: d.start,
                        end: d.end,
                        events: r,
                        slots: o,
                        resources: s._resourceBySlot(d)
                    })
                }
            },
            _selectedEvents: function() {
                for (var e, t = this._selection.events, n = t.length, i = 0, r = []; n > i; i++) e = this.occurrenceByUid(t[i]), e && r.push(e);
                return r
            },
            _mouseMove: function(t) {
                var n = this;
                clearTimeout(n._moveTimer), n._moveTimer = setTimeout(function() {
                    var i, r, o, a = n.view(),
                        s = n._selection;
                    s && (i = a.selectionByElement(e(t.currentTarget)), i && s.groupIndex === i.groupIndex && (r = i.startDate(), o = i.endDate(), r >= s.end ? s.backward = !1 : s.start >= o && (s.backward = !0), s.backward ? s.start = r : s.end = o, n._select()))
                }, 5)
            },
            _viewByIndex: function(e) {
                var t, n = this.views;
                for (t in n) {
                    if (!e) return t;
                    e--
                }
            },
            _keydown: function(t) {
                var n = this,
                    i = t.keyCode,
                    r = n.view(),
                    o = r.options.editable,
                    a = n._selection,
                    s = t.shiftKey;
                n._ctrlKey = t.ctrlKey, n._shiftKey = t.shiftKey, i === H.TAB ? r.moveToEvent(a, s) && (n._select(), t.preventDefault()) : o && i === H.ENTER ? a.events.length ? o.update !== !1 && n.editEvent(a.events[0]) : o.create !== !1 && (a.isAllDay && (a = e.extend({}, a, {
                    end: I.date.addDays(a.end, -1)
                })), n.addEvent($({}, a, r._resourceBySlot(a)))) : i === H.DELETE && o !== !1 && o.destroy !== !1 ? n.removeEvent(a.events[0]) : i >= 49 && 57 >= i ? n.view(n._viewByIndex(i - 49)) : r.move(a, i, s) && (r.inRange(a) ? n._select() : n.date(a.start), t.preventDefault()), n._adjustSelectedDate()
            },
            _createSelection: function(t) {
                var n, i, r;
                this._selection && (this._ctrlKey || this._shiftKey) || (this._selection = {
                    events: [],
                    groupIndex: 0
                }), t = e(t), r = this._selection, t.is(".k-event") && (n = t.attr(I.attr("uid"))), i = this.view().selectionByElement(t), i && (r.groupIndex = i.groupIndex || 0), n && (i = l(this._data, n)), i && i.uid && (n = [i.uid]), this._updateSelection(i, n), this._adjustSelectedDate()
            },
            _updateSelection: function(e, t) {
                var n, i, r = this._selection;
                e && r && (n = this.view(), e.uid && (e = n._updateEventForSelection(e)), this._shiftKey && r.start && r.end ? (i = r.end > e.end, r.end = e.endDate ? e.endDate() : e.end, i && n._timeSlotInterval && I.date.setTime(r.end, -n._timeSlotInterval())) : (r.start = e.startDate ? e.startDate() : e.start, r.end = e.endDate ? e.endDate() : e.end), r.isAllDay = "isDaySlot" in e ? e.isDaySlot : e.isAllDay, r.index = e.index, r.events = this._ctrlKey ? r.events.concat(t || []) : t || [])
            },
            options: {
                name: "Scheduler",
                date: ae,
                editable: !0,
                autoBind: !0,
                snap: !0,
                mobile: !1,
                timezone: "",
                allDaySlot: !0,
                min: new Date(1900, 0, 1),
                max: new Date(2099, 11, 31),
                toolbar: null,
                messages: {
                    today: "Today",
                    pdf: "Export to PDF",
                    save: "Save",
                    cancel: "Cancel",
                    destroy: "Delete",
                    deleteWindowTitle: "Delete event",
                    ariaSlotLabel: "Selected from {0:t} to {1:t}",
                    ariaEventLabel: "{0} on {1:D} at {2:t}",
                    views: {
                        day: "Day",
                        week: "Week",
                        workWeek: "Work Week",
                        agenda: "Agenda",
                        month: "Month",
                        timeline: "Timeline",
                        timelineWeek: "Timeline Week",
                        timelineWorkWeek: "Timeline Work Week",
                        timelineMonth: "Timeline Month"
                    },
                    recurrenceMessages: {
                        deleteWindowTitle: "Delete Recurring Item",
                        deleteWindowOccurrence: "Delete current occurrence",
                        deleteWindowSeries: "Delete the series",
                        editWindowTitle: "Edit Recurring Item",
                        editWindowOccurrence: "Edit current occurrence",
                        editWindowSeries: "Edit the series"
                    },
                    editable: {
                        confirmation: le
                    },
                    editor: {
                        title: "Title",
                        start: "Start",
                        end: "End",
                        allDayEvent: "All day event",
                        description: "Description",
                        repeat: "Repeat",
                        timezone: " ",
                        startTimezone: "Start timezone",
                        endTimezone: "End timezone",
                        separateTimezones: "Use separate start and end time zones",
                        timezoneEditorTitle: "Timezones",
                        timezoneEditorButton: "Time zone",
                        timezoneTitle: "Time zones",
                        noTimezone: "No timezone",
                        editorTitle: "Event"
                    }
                },
                height: null,
                width: null,
                resources: [],
                group: {
                    resources: [],
                    direction: "horizontal"
                },
                views: [],
                selectable: !1
            },
            events: [te, re, ee, ne, "add", "dataBinding", "dataBound", "moveStart", "move", "moveEnd", "resizeStart", "resize", "resizeEnd", "navigate", "change"],
            destroy: function() {
                var t, n = this;
                O.fn.destroy.call(n), n.dataSource && (n.dataSource.unbind(Z, n._refreshHandler), n.dataSource.unbind("progress", n._progressHandler), n.dataSource.unbind("error", n._errorHandler)), n.calendar && (n.calendar.destroy(), n.popup.destroy()), n.view() && n.view().destroy(), n._editor && n._editor.destroy(), this._moveDraggable && this._moveDraggable.destroy(), this._resizeDraggable && this._resizeDraggable.destroy(), t = n.element.add(n.wrapper).add(n.toolbar).add(n.popup), t.off(X), clearTimeout(n._moveTimer), n._model = null, n.toolbar = null, n.element = null, e(window).off("resize" + X, n._resizeHandler), I.destroy(n.wrapper)
            },
            setDataSource: function(e) {
                this.options.dataSource = e, this._dataSource(), this.options.autoBind && e.fetch()
            },
            items: function() {
                return this.wrapper.find(".k-scheduler-content").children(".k-event, .k-task")
            },
            _movable: function() {
                var n, i, r, o, a, s, l, c = this,
                    d = 0,
                    u = c._isMobile(),
                    h = c.options.editable && c.options.editable.move !== !1,
                    f = c.options.editable && c.options.editable.resize !== !1;
                (h || f && u) && (u && I.support.mobileOS.android && (d = 5), c._moveDraggable = new I.ui.Draggable(c.element, {
                    distance: d,
                    filter: ".k-event",
                    ignore: ".k-resize-handle",
                    holdToDrag: u
                }), h && c._moveDraggable.bind("dragstart", function(e) {
                    var o = c.view(),
                        d = e.currentTarget;
                    return o.options.editable && o.options.editable.move !== !1 ? u && !d.hasClass("k-event-active") ? (c.element.find(".k-event-active").removeClass("k-event-active"), e.preventDefault(), t) : (a = c.occurrenceByUid(d.attr(I.attr("uid"))), s = a.clone(), s.update(o._eventOptionsForMove(s)), n = o._slotByPosition(e.x.startLocation, e.y.startLocation), r = n.startOffset(e.x.startLocation, e.y.startLocation, c.options.snap), i = n, l = n, (!n || c.trigger("moveStart", {
                        event: a
                    })) && e.preventDefault(), t) : (e.preventDefault(), t)
                }).bind("drag", function(e) {
                    var t, l, d = c.view(),
                        u = d._slotByPosition(e.x.location, e.y.location);
                    u && (o = u.startOffset(e.x.location, e.y.location, c.options.snap), u.isDaySlot !== n.isDaySlot ? (n = d._slotByPosition(e.x.location, e.y.location), r = n.startOffset(e.x.location, e.y.location, c.options.snap), t = o - r, s.isAllDay = u.isDaySlot, s.start = I.timezone.toLocalDate(r), s.end = I.timezone.toLocalDate(o), d._updateMoveHint(s, u.groupIndex, t), l = {
                        start: s.start,
                        end: s.end
                    }) : (t = o - r, d._updateMoveHint(s, u.groupIndex, t), l = _(s, t)), c.trigger("move", {
                        event: a,
                        slot: {
                            element: u.element,
                            start: u.startDate(),
                            end: u.endDate(),
                            isDaySlot: u.isDaySlot
                        },
                        resources: d._resourceBySlot(u),
                        start: l.start,
                        end: l.end
                    }) ? d._updateMoveHint(s, u.groupIndex, t) : i = u)
                }).bind("dragend", function(t) {
                    var d, u, h, f, p, m, g, v, b;
                    c.view()._removeMoveHint(), d = o - r, u = _(s, d), h = u.start, f = u.end, p = c.view()._resourceBySlot(i), m = c.view()._resourceBySlot(n), g = c.trigger("moveEnd", {
                        event: a,
                        slot: {
                            element: i.element,
                            start: i.startDate(),
                            end: i.endDate()
                        },
                        start: h,
                        end: f,
                        resources: p
                    }), g || a.start.getTime() === h.getTime() && a.end.getTime() === f.getTime() && l.isDaySlot === i.isDaySlot && I.stringify(p) === I.stringify(m) || (v = c.view()._eventOptionsForMove(a), b = l.isDaySlot !== i.isDaySlot ? i.isDaySlot ? e.extend({
                        start: i.startDate(),
                        end: i.startDate(),
                        isAllDay: i.isDaySlot
                    }, v, p) : e.extend({
                        isAllDay: i.isDaySlot,
                        start: h,
                        end: f
                    }, v, p) : e.extend({
                        isAllDay: a.isAllDay,
                        start: h,
                        end: f
                    }, v, p), c._updateEvent(null, a, b)), t.currentTarget.removeClass("k-event-active"), this.cancelHold()
                }).bind("dragcancel", function() {
                    c.view()._removeMoveHint(), this.cancelHold()
                }), u && (c._moveDraggable.bind("hold", function(e) {
                    c.element.find(".k-scheduler-monthview").length && e.preventDefault(), c.element.find(".k-event-active").removeClass("k-event-active"), e.currentTarget.addClass("k-event-active")
                }), I.support.mobileOS.android || c._moveDraggable.userEvents.bind("press", function(e) {
                    e.preventDefault()
                })))
            },
            _resizable: function() {
                function t(e) {
                    var t, n = {
                        "k-resize-e": "east",
                        "k-resize-w": "west",
                        "k-resize-n": "north",
                        "k-resize-s": "south"
                    };
                    for (t in n)
                        if (e.hasClass(t)) return n[t]
                }
                var n, i, r, o, a, s = this,
                    l = 0;
                s._isMobile() && I.support.mobileOS.android && (l = 5), s._resizeDraggable = new I.ui.Draggable(s.element, {
                    distance: l,
                    filter: ".k-resize-handle",
                    dragstart: function(t) {
                        var l = e(t.currentTarget),
                            c = l.closest(".k-event"),
                            d = c.attr(I.attr("uid")),
                            u = s.view();
                        r = s.occurrenceByUid(d), o = r.clone(), u._updateEventForResize(o), a = u._slotByPosition(t.x.startLocation, t.y.startLocation), s.trigger("resizeStart", {
                            event: r
                        }) && t.preventDefault(), n = I.date.toUtcTime(o.start), i = I.date.toUtcTime(o.end)
                    },
                    drag: function(l) {
                        var c, d, u, h, f, p;
                        a && (c = e(l.currentTarget), d = t(c), u = s.view(), h = u._slotByPosition(l.x.location, l.y.location), h && a.groupIndex == h.groupIndex && (a = h, f = n, p = i, "south" == d ? !a.isDaySlot && a.end - I.date.toUtcTime(o.start) >= u._timeSlotInterval() && (i = o.isAllDay ? a.startOffset(l.x.location, l.y.location, s.options.snap) : a.endOffset(l.x.location, l.y.location, s.options.snap)) : "north" == d ? !a.isDaySlot && I.date.toUtcTime(o.end) - a.start >= u._timeSlotInterval() && (n = a.startOffset(l.x.location, l.y.location, s.options.snap)) : "east" == d ? a.isDaySlot && I.date.toUtcTime(I.date.getDate(a.endDate())) >= I.date.toUtcTime(I.date.getDate(o.start)) ? i = o.isAllDay ? a.startOffset(l.x.location, l.y.location, s.options.snap) : a.endOffset(l.x.location, l.y.location, s.options.snap) : !a.isDaySlot && a.end - I.date.toUtcTime(o.start) >= u._timeSlotInterval() && (i = a.endOffset(l.x.location, l.y.location, s.options.snap)) : "west" == d && (a.isDaySlot && I.date.toUtcTime(I.date.getDate(o.end)) >= I.date.toUtcTime(I.date.getDate(a.startDate())) ? n = a.startOffset(l.x.location, l.y.location, s.options.snap) : !a.isDaySlot && I.date.toUtcTime(o.end) - a.start >= u._timeSlotInterval() && (n = a.startOffset(l.x.location, l.y.location, s.options.snap))), s.trigger("resize", {
                            event: r,
                            slot: {
                                element: a.element,
                                start: a.startDate(),
                                end: a.endDate()
                            },
                            start: I.timezone.toLocalDate(n),
                            end: I.timezone.toLocalDate(i),
                            resources: u._resourceBySlot(a)
                        }) ? (n = f, i = p) : u._updateResizeHint(o, a.groupIndex, n, i)))
                    },
                    dragend: function(l) {
                        var c, d = e(l.currentTarget),
                            u = new Date(o.start.getTime()),
                            h = new Date(o.end.getTime()),
                            f = t(d);
                        s.view()._removeResizeHint(), "south" == f ? h = I.timezone.toLocalDate(i) : "north" == f ? u = I.timezone.toLocalDate(n) : "east" == f ? h = a.isDaySlot ? I.date.getDate(I.timezone.toLocalDate(i)) : I.timezone.toLocalDate(i) : "west" == f && (a.isDaySlot ? (u = new Date(I.timezone.toLocalDate(n)), u.setHours(0), u.setMinutes(0)) : u = I.timezone.toLocalDate(n)), c = s.trigger("resizeEnd", {
                            event: r,
                            slot: {
                                element: a.element,
                                start: a.startDate(),
                                end: a.endDate()
                            },
                            start: u,
                            end: h,
                            resources: s.view()._resourceBySlot(a)
                        }), !c && h.getTime() >= u.getTime() && (o.start.getTime() != u.getTime() || o.end.getTime() != h.getTime()) && (s.view()._updateEventForResize(r), s._updateEvent(f, r, {
                            start: u,
                            end: h
                        })), a = null, r = null
                    },
                    dragcancel: function() {
                        s.view()._removeResizeHint(), a = null, r = null
                    }
                })
            },
            _updateEvent: function(e, t, n) {
                var i, r = this,
                    o = function(e, t) {
                        try {
                            r._preventRefresh = !0, e.update(n), r._convertDates(e)
                        } finally {
                            r._preventRefresh = !1
                        }
                        r.trigger(ne, {
                            event: e
                        }) || (t && t(), r._updateSelection(e), r.dataSource.sync())
                    },
                    a = function(e) {
                        return e.recurrenceRule ? r.dataSource.getByUid(e.uid) : r.dataSource.get(e.recurrenceId)
                    },
                    s = function() {
                        var i, s, l = a(t);
                        ("south" == e || "north" == e) && (n.start && (i = I.date.getDate(l.start), I.date.setTime(i, B(n.start)), n.start = i), n.end && (s = I.date.getDate(l.end), I.date.setTime(s, B(n.end)), n.end = s)), r.dataSource._removeExceptions(l), o(l)
                    },
                    l = function() {
                        var e = a(t),
                            n = function() {
                                r._convertDates(e)
                            },
                            i = e.toOccurrence({
                                start: t.start,
                                end: t.end
                            });
                        o(r.dataSource.add(i), n)
                    };
                t.recurrenceRule || t.isOccurrence() ? (i = r.options.messages.recurrenceMessages, r._showRecurringDialog(t, l, s, {
                    title: i.editWindowTitle,
                    text: i.editRecurring ? i.editRecurring : de,
                    occurrenceText: i.editWindowOccurrence,
                    seriesText: i.editWindowSeries
                })) : o(r.dataSource.getByUid(t.uid))
            },
            _modelForContainer: function(t) {
                return t = e(t).closest("[" + I.attr("uid") + "]"), this.dataSource.getByUid(t.attr(I.attr("uid")))
            },
            showDialog: function(e) {
                this._editor.showDialog(e)
            },
            focus: function() {
                this.wrapper.focus()
            },
            _confirmation: function(e, t) {
                var n, i, r, o, a, s = this.options.editable;
                s === !0 || s.confirmation !== !1 ? (n = this.options.messages, i = n.deleteWindowTitle, r = typeof s.confirmation === U ? s.confirmation : n.editable.confirmation, this._isEditorOpened() && t.isRecurring() && (o = this.options.messages.recurrenceMessages, i = o.deleteWindowTitle, r = t.isException() ? o.deleteRecurringConfirmation ? o.deleteRecurringConfirmation : ue : o.deleteSeriesConfirmation ? o.deleteSeriesConfirmation : he), a = [{
                    name: "destroy",
                    text: n.destroy,
                    click: function() {
                        e()
                    }
                }], this._isMobile() && I.mobile.ui.Pane || a.push({
                    name: "canceledit",
                    text: n.cancel,
                    click: function() {
                        e(!0)
                    }
                }), this._unbindResize(), this.showDialog({
                    model: t,
                    text: r,
                    title: i,
                    buttons: a
                }), this._bindResize()) : e()
            },
            addEvent: function(e) {
                var t, n, i = this._editor.editable,
                    r = this.dataSource;
                e = e || {}, n = this.trigger("add", {
                    event: e
                }), !n && (i && i.end() || !i) && (this.cancelEvent(), e && e.toJSON && (e = e.toJSON()), t = r.add(e), t && (this.cancelEvent(), this._editEvent(t)))
            },
            saveEvent: function() {
                var e, t, n, i = this._editor;
                i && (e = i.editable, t = i.container, n = this._modelForContainer(t), t && e && e.end() && !this.trigger(ne, {
                    container: t,
                    event: n
                }) && (n.isRecurrenceHead() && this.dataSource._removeExceptions(n), n.dirty || n.isOccurrence() || this._convertDates(n, "remove"), this.dataSource.sync()))
            },
            cancelEvent: function() {
                var e, t = this._editor,
                    n = t.container;
                n && (e = this._modelForContainer(n), e && e.isOccurrence() && (this._convertDates(e, "remove"), this._convertDates(this.dataSource.get(e.recurrenceId), "remove")), this.dataSource.cancelChanges(e), t.close())
            },
            editEvent: function(e) {
                var t = "string" == typeof e ? this.occurrenceByUid(e) : e;
                t && (this.cancelEvent(), t.isRecurring() ? this._editRecurringDialog(t) : this._editEvent(t))
            },
            _editEvent: function(e) {
                this._unbindResize(), this._createPopupEditor(e), this._bindResize()
            },
            _editRecurringDialog: function(e) {
                var t = this,
                    n = function() {
                        e.isException() ? t._editEvent(e) : t.addEvent(e)
                    },
                    i = function() {
                        e.recurrenceId && (e = t.dataSource.get(e.recurrenceId)), t._editEvent(e)
                    },
                    r = t.options.messages.recurrenceMessages;
                t._showRecurringDialog(e, n, i, {
                    title: r.editWindowTitle,
                    text: r.editRecurring ? r.editRecurring : de,
                    occurrenceText: r.editWindowOccurrence,
                    seriesText: r.editWindowSeries
                })
            },
            _showRecurringDialog: function(e, t, n, i) {
                var r = this,
                    o = r.options.editable,
                    a = G(o) ? o.editRecurringMode : "dialog";
                "series" === a ? n() : "occurrence" === a ? t() : (this._unbindResize(), r.showDialog({
                    model: e,
                    title: i.title,
                    text: i.text,
                    buttons: [{
                        text: i.occurrenceText,
                        click: t
                    }, {
                        text: i.seriesText,
                        click: n
                    }]
                }), this._bindResize())
            },
            _createButton: function(e) {
                var t = e.template || fe,
                    n = typeof e === U ? e : e.name || e.text,
                    i = {
                        className: "k-scheduler-" + (n || "").replace(/\s/g, ""),
                        text: n,
                        attr: ""
                    };
                if (!(n || G(e) && e.template)) throw Error("Custom commands should have name specified");
                return G(e) ? (e.className && (e.className += " " + i.className), "edit" === n && G(e.text) && (e = $(!0, {}, e), e.text = e.text.edit), i = $(!0, i, b[n], e)) : i = $(!0, i, b[n]), I.template(t)(i)
            },
            _convertDates: function(e, t) {
                var n = this.dataSource.reader.timezone,
                    i = e.startTimezone,
                    r = e.endTimezone,
                    o = e.start,
                    a = e.start;
                t = t || "apply", i = i || r, r = r || i, i && (n ? "apply" === t ? (o = I.timezone.convert(e.start, n, i), a = I.timezone.convert(e.end, n, r)) : (o = I.timezone.convert(e.start, i, n), a = I.timezone.convert(e.end, r, n)) : (o = I.timezone[t](e.start, i), a = I.timezone[t](e.end, r)), e._set("start", o), e._set("end", a))
            },
            _createEditor: function() {
                var e, n = this;
                e = n._editor = this._isMobile() && I.mobile.ui.Pane ? new k(this.wrapper, $({}, this.options, {
                    target: this,
                    timezone: n.dataSource.reader.timezone,
                    resources: n.resources,
                    createButton: Y(this._createButton, this)
                })) : new x(this.wrapper, $({}, this.options, {
                    target: this,
                    createButton: Y(this._createButton, this),
                    timezone: n.dataSource.reader.timezone,
                    resources: n.resources
                })), e.bind("cancel", function(e) {
                    return n.trigger("cancel", {
                        container: e.container,
                        event: e.model
                    }) ? (e.preventDefault(), t) : (n.cancelEvent(), n.focus(), t)
                }), e.bind("edit", function(e) {
                    n.trigger(re, {
                        container: e.container,
                        event: e.model
                    }) && e.preventDefault()
                }), e.bind("save", function() {
                    n.saveEvent()
                }), e.bind("remove", function(e) {
                    n.removeEvent(e.model)
                })
            },
            _createPopupEditor: function(e) {
                var t = this._editor;
                (!e.isNew() || e.isOccurrence()) && (e.isOccurrence() && this._convertDates(e.recurrenceId ? this.dataSource.get(e.recurrenceId) : e), this._convertDates(e)), this.editable = t.editEvent(e)
            },
            removeEvent: function(e) {
                var t = this,
                    n = "string" == typeof e ? t.occurrenceByUid(e) : e;
                n && (n.isRecurring() ? t._deleteRecurringDialog(n) : t._confirmation(function(e) {
                    e || t._removeEvent(n)
                }, n))
            },
            occurrenceByUid: function(e) {
                var t = this.dataSource.getByUid(e);
                return t || (t = l(this._data, e)), t
            },
            occurrencesInRange: function(e, t) {
                return new I.data.Query(this._data).filter({
                    logic: "or",
                    filters: [{
                        logic: "and",
                        filters: [{
                            field: "start",
                            operator: "gte",
                            value: e
                        }, {
                            field: "end",
                            operator: "gte",
                            value: e
                        }, {
                            field: "start",
                            operator: "lt",
                            value: t
                        }]
                    }, {
                        logic: "and",
                        filters: [{
                            field: "start",
                            operator: "lte",
                            value: e
                        }, {
                            field: "end",
                            operator: "gt",
                            value: e
                        }]
                    }]
                }).toArray()
            },
            _removeEvent: function(e) {
                this.trigger(te, {
                    event: e
                }) || this.dataSource.remove(e) && this.dataSource.sync()
            },
            _deleteRecurringDialog: function(e) {
                var t, n, i, r, o, a = this,
                    s = e,
                    l = a.options.editable,
                    c = G(l) ? l.editRecurringMode : "dialog",
                    d = function() {
                        var e = s.recurrenceId ? s : s.toOccurrence(),
                            t = a.dataSource.get(e.recurrenceId);
                        a._convertDates(t), a._removeEvent(e)
                    },
                    u = function() {
                        s.recurrenceId && (s = a.dataSource.get(s.recurrenceId)), a._removeEvent(s)
                    };
                ("dialog" != c || a._isEditorOpened()) && (t = function() {
                    a._confirmation(function(e) {
                        e || d()
                    }, s)
                }, n = function() {
                    a._confirmation(function(e) {
                        e || u()
                    }, s)
                }), i = n || u, r = t || d, a._isEditorOpened() ? e.isException() ? r() : i() : (o = a.options.messages.recurrenceMessages, a._showRecurringDialog(e, r, i, {
                    title: o.deleteWindowTitle,
                    text: o.deleteRecurring ? o.deleteRecurring : ce,
                    occurrenceText: o.deleteWindowOccurrence,
                    seriesText: o.deleteWindowSeries
                }))
            },
            _isEditorOpened: function() {
                return !!this._editor.container
            },
            _unbindView: function(e) {
                var t = this;
                t.angular("cleanup", function() {
                    return {
                        elements: t.items()
                    }
                }), e.destroy()
            },
            _bindView: function(e) {
                var t = this;
                t.options.editable && (t._viewRemoveHandler && e.unbind(te, t._viewRemoveHandler), t._viewRemoveHandler = function(e) {
                    t.removeEvent(e.uid)
                }, e.bind(te, t._viewRemoveHandler), t._viewAddHandler && e.unbind(ie, t._viewAddHandler), t._viewAddHandler = function(e) {
                    t.addEvent(e.eventInfo)
                }, e.bind(ie, this._viewAddHandler), t._viewEditHandler && e.unbind(re, t._viewEditHandler), t._viewEditHandler = function(e) {
                    t.editEvent(e.uid)
                }, e.bind(re, this._viewEditHandler)), t._viewNavigateHandler && e.unbind("navigate", t._viewNavigateHandler), t._viewNavigateHandler = function(e) {
                    var n, i;
                    e.view && (n = "isWorkDay" in e, i = n ? "changeWorkDay" : "changeView", t.trigger("navigate", {
                        view: e.view,
                        isWorkDay: e.isWorkDay,
                        action: i,
                        date: e.date
                    }) || (n && (t._workDayMode = e.isWorkDay), t._selectView(e.view), t.date(e.date)))
                }, e.bind("navigate", t._viewNavigateHandler), t._viewActivateHandler && e.unbind("activate", t._viewActivateHandler), t._viewActivateHandler = function() {
                    var e = this;
                    t._selection && (e.constrainSelection(t._selection), t._select(), t._adjustSelectedDate())
                }, e.bind("activate", t._viewActivateHandler)
            },
            _selectView: function(e) {
                var t, n, i, r = this;
                e && r.views[e] && (r._selectedView && r._unbindView(r._selectedView), r._selectedView = r._renderView(e), r._selectedViewName = e, r._viewsCount > 1 && (t = pe({
                    views: r.views,
                    view: e,
                    ns: I.ns
                }), n = r.toolbar.find(".k-scheduler-views li:first-child"), n.is(".k-current-view") ? n.replaceWith(t) : r.toolbar.find(".k-scheduler-views").prepend(t), i = r.toolbar.find(".k-scheduler-views li").removeClass("k-state-selected"), i.end().find(".k-view-" + e.replace(/\./g, "\\.").toLowerCase()).addClass("k-state-selected")))
            },
            view: function(e) {
                var n = this;
                return e ? (n._selectView(e), n.rebind(), t) : n._selectedView
            },
            viewName: function() {
                return this.view().name
            },
            _renderView: function(e) {
                var t = this._initializeView(e);
                return this._bindView(t), this._model.set("formattedDate", t.dateForTitle()), this._model.set("formattedShortDate", t.shortDateForTitle()), t
            },
            resize: function(e) {
                var t = this.getSize(),
                    n = this._size,
                    i = this.view();
                i && i.groups && (e || !n || t.width !== n.width || t.height !== n.height) && (this.refresh({
                    action: "resize"
                }), this._size = t)
            },
            _adjustSelectedDate: function() {
                var e = this._model.selectedDate,
                    t = this._selection,
                    n = t.start;
                n && !I.date.isInDateRange(e, z(n), z(t.end)) && e.setFullYear(n.getFullYear(), n.getMonth(), n.getDate())
            },
            _initializeView: function(e) {
                var t, n, i = this.views[e];
                if (i) {
                    if (t = G(i), n = i.type, typeof n === U && (n = I.getter(i.type)(window)), !n) throw Error("There is no such view");
                    i = new n(this.wrapper, h($(!0, {}, this.options, t ? i : {}, {
                        resources: this.resources,
                        date: this.date(),
                        showWorkHours: this._workDayMode
                    })))
                }
                return i
            },
            _views: function() {
                var e, t, n, i, r, o, a, s, l, c = this.options.views;
                for (this.views = {}, this._viewsCount = 0, a = 0, s = c.length; s > a; a++) l = !1, e = c[a], i = G(e), i ? (o = r = e.type ? e.type : e, typeof o !== U && (r = e.name || e.title, l = !0)) : o = r = e, t = S[r], t && !l && (e.type = t.type, t.title = this.options.messages.views[r], "day" === t.type ? t.messages = {
                    allDay: this.options.messages.allDay
                } : "agenda" === t.type && (t.messages = {
                    event: this.options.messages.event,
                    date: this.options.messages.date,
                    time: this.options.messages.time
                })), e = $({
                    title: r
                }, t, i ? e : {}), r && (this.views[r] = e, this._viewsCount++, (!n || e.selected) && (n = r));
                n && (this._selectedViewName = n)
            },
            rebind: function() {
                this.dataSource.fetch()
            },
            _dataSource: function() {
                var e = this,
                    t = e.options,
                    n = t.dataSource;
                n = Q(n) ? {
                    data: n
                } : n, !t.timezone || n instanceof De ? n instanceof De && (t.timezone = n.options.schema ? n.options.schema.timezone : "") : n = $(!0, n, {
                    schema: {
                        timezone: t.timezone
                    }
                }), e.dataSource && e._refreshHandler ? e.dataSource.unbind(Z, e._refreshHandler).unbind("progress", e._progressHandler).unbind("error", e._errorHandler) : (e._refreshHandler = Y(e.refresh, e), e._progressHandler = Y(e._requestStart, e), e._errorHandler = Y(e._error, e)), e.dataSource = I.data.SchedulerDataSource.create(n).bind(Z, e._refreshHandler).bind("progress", e._progressHandler).bind("error", e._errorHandler), e.options.dataSource = e.dataSource
            },
            _error: function() {
                this._progress(!1)
            },
            _requestStart: function() {
                this._progress(!0)
            },
            _progress: function(e) {
                var t = this.element.find(".k-scheduler-content");
                I.ui.progress(t, e)
            },
            _resources: function() {
                var t, n, i, r, o, a = this,
                    s = a.options.resources;
                for (t = 0; s.length > t; t++) {
                    if (n = s[t], i = n.field, r = n.dataSource, !i || !r) throw Error('The "field" and "dataSource" options of the scheduler resource are mandatory.');
                    a.resources.push({
                        field: i,
                        name: n.name || i,
                        title: n.title || i,
                        dataTextField: n.dataTextField || "text",
                        dataValueField: n.dataValueField || "value",
                        dataColorField: n.dataColorField || "color",
                        valuePrimitive: null != n.valuePrimitive ? n.valuePrimitive : !0,
                        multiple: n.multiple || !1,
                        dataSource: I.data.DataSource.create(r)
                    })
                }
                o = e.map(a.resources, function(e) {
                    return e.dataSource.fetch()
                }), e.when.apply(null, o).then(function() {
                    a.options.autoBind ? a.view(a._selectedViewName) : a._selectView(a._selectedViewName)
                })
            },
            _initModel: function() {
                var e = this;
                e._model = I.observable({
                    selectedDate: new Date(this.options.date),
                    formattedDate: "",
                    formattedShortDate: ""
                }), e._model.bind("change", function(t) {
                    "selectedDate" === t.field && e.view(e._selectedViewName)
                })
            },
            _wrapper: function() {
                var e = this,
                    t = e.options,
                    n = t.height,
                    i = t.width;
                e.wrapper = e.element.addClass("k-widget k-scheduler k-floatwrap").attr("role", "grid").attr("aria-multiselectable", !0), e._isMobile() && e.wrapper.addClass("k-scheduler-mobile"), e._isMobilePhoneView() && e.wrapper.addClass("k-scheduler-phone"), n && e.wrapper.height(n), i && e.wrapper.width(i)
            },
            date: function(e) {
                return null != e && z(e) >= z(this.options.min) && z(e) <= z(this.options.max) && this._model.set("selectedDate", e), z(this._model.get("selectedDate"))
            },
            _toolbar: function() {
                var n, i, r = this,
                    o = r.options,
                    a = [];
                o.toolbar && (a = e.isArray(o.toolbar) ? o.toolbar : [o.toolbar]), n = this._isMobilePhoneView() ? ge : me, i = e(n({
                    messages: o.messages,
                    pdf: e.grep(a, function(e) {
                        return "pdf" == e || "pdf" == e.name
                    }).length > 0,
                    ns: I.ns,
                    views: r.views,
                    viewsCount: r._viewsCount
                })), r.wrapper.append(i), r.toolbar = i, I.bind(r.toolbar, r._model), i.on(J + X, ".k-pdf", function(e) {
                    e.preventDefault(), r.saveAsPDF()
                }), i.on(J + X, ".k-scheduler-navigation li", function(n) {
                    var i = e(this),
                        o = new Date(r.date()),
                        a = "";
                    if (n.preventDefault(), i.hasClass("k-nav-today")) a = "today", o = new Date;
                    else if (i.hasClass("k-nav-next")) a = "next", o = r.view().nextDate();
                    else if (i.hasClass("k-nav-prev")) a = "previous", o = r.view().previousDate();
                    else if (i.hasClass("k-nav-current") && !r._isMobilePhoneView()) return r._showCalendar(), t;
                    r.trigger("navigate", {
                        view: r._selectedViewName,
                        action: a,
                        date: o
                    }) || r.date(o)
                }), i.on(J + X, ".k-scheduler-views li, .k-scheduler-refresh", function(t) {
                    t.preventDefault();
                    var n = e(this).attr(I.attr("name"));
                    r.trigger("navigate", {
                        view: n,
                        action: "changeView",
                        date: r.date()
                    }) || (r.view(n), r.element.find(".k-state-expanded").removeClass("k-state-expanded"))
                }), i.on(J + X, ".k-scheduler-views li.k-current-view", function() {
                    r.element.find(".k-scheduler-views").toggleClass("k-state-expanded")
                }), i.find("li").hover(function() {
                    e(this).addClass("k-state-hover")
                }, function() {
                    e(this).removeClass("k-state-hover")
                })
            },
            _showCalendar: function() {
                var t = this,
                    n = t.toolbar.find(".k-nav-current"),
                    i = e('<div class="k-calendar-container"><div class="k-scheduler-calendar"/></div>');
                t.popup || (t.popup = new W(i, {
                    anchor: n,
                    activate: function() {
                        t.calendar || (t.calendar = new j(this.element.find(".k-scheduler-calendar"), {
                            change: function() {
                                var e = this.value();
                                t.trigger("navigate", {
                                    view: t._selectedViewName,
                                    action: "changeDate",
                                    date: e
                                }) || (t.date(e), t.popup.close())
                            },
                            min: t.options.min,
                            max: t.options.max
                        })), t.calendar.value(t.date())
                    },
                    copyAnchorStyles: !1
                })), t.popup.open()
            },
            refresh: function(e) {
                var t = this,
                    n = this.view();
                this._progress(!1), this.angular("cleanup", function() {
                    return {
                        elements: t.items()
                    }
                }), e = e || {}, n && (e && "itemchange" === e.action && (this._editor.editable || this._preventRefresh) || this.trigger("dataBinding", {
                    action: e.action || "rebind",
                    index: e.index,
                    items: e.items
                }) || (e && "resize" === e.action || !this._editor || this._editor.close(), this._data = this.dataSource.expand(n.startDate(), n.endDate()), n.render(this._data), this.trigger("dataBound")))
            },
            slotByPosition: function(e, t) {
                var n, i = this.view();
                return i._slotByPosition ? (n = i._slotByPosition(e, t), n ? {
                    startDate: n.startDate(),
                    endDate: n.endDate(),
                    groupIndex: n.groupIndex,
                    element: n.element,
                    isDaySlot: n.isDaySlot
                } : null) : null
            },
            slotByElement: function(t) {
                var n = e(t).offset();
                return this.slotByPosition(n.left, n.top)
            },
            resourcesBySlot: function(e) {
                return this.view()._resourceBySlot(e)
            }
        }), S = {
            day: {
                type: "kendo.ui.DayView"
            },
            week: {
                type: "kendo.ui.WeekView"
            },
            workWeek: {
                type: "kendo.ui.WorkWeekView"
            },
            agenda: {
                type: "kendo.ui.AgendaView"
            },
            month: {
                type: "kendo.ui.MonthView"
            },
            timeline: {
                type: "kendo.ui.TimelineView"
            },
            timelineWeek: {
                type: "kendo.ui.TimelineWeekView"
            },
            timelineWorkWeek: {
                type: "kendo.ui.TimelineWorkWeekView"
            },
            timelineMonth: {
                type: "kendo.ui.TimelineMonthView"
            }
        }, N.plugin(C), I.PDFMixin && (I.PDFMixin.extend(C.prototype), T = "k-scheduler-pdf-export", C.fn._drawPDF = function(t) {
            var n, i, r, o = this.wrapper,
                a = o[0].style.cssText;
            return o.css({
                width: o.width(),
                height: o.height()
            }), o.addClass(T), n = this, i = new e.Deferred, r = o.find(".k-scheduler-content").find("table").css("table-layout", "auto"), setTimeout(function() {
                r.css("table-layout", "fixed"), n.resize(!0), n._drawPDFShadow({}, {
                    avoidLinks: n.options.pdf.avoidLinks
                }).done(function(e) {
                    var n = {
                        page: e,
                        pageNumber: 1,
                        progress: 1,
                        totalPages: 1
                    };
                    t.notify(n), i.resolve(n.page)
                }).fail(function(e) {
                    i.reject(e)
                }).always(function() {
                    o[0].style.cssText = a, o.removeClass(T), n.resize(!0), n.resize(!0)
                })
            }), i
        }), D = O.extend({
            init: function(e, t) {
                var n = this,
                    i = I.timezone.windows_zones;
                if (!i || !I.timezone.zones_titles) throw Error("kendo.timezones.min.js is not included.");
                O.fn.init.call(n, e, t), n.wrapper = n.element, n._zonesQuery = new I.data.Query(i), n._zoneTitleId = I.guid(), n._zoneTitlePicker(), n._zonePicker(), n._zoneTitle.bind("cascade", function() {
                    this.value() || n._zone.wrapper.hide()
                }), n._zone.bind("cascade", function() {
                    n._value = this.value(), n.trigger("change")
                }), n.value(n.options.value)
            },
            options: {
                name: "TimezoneEditor",
                value: "",
                optionLabel: "No timezone"
            },
            events: ["change"],
            _zoneTitlePicker: function() {
                var t = this,
                    n = e('<input id="' + t._zoneTitleId + '"/>').appendTo(t.wrapper);
                t._zoneTitle = new I.ui.DropDownList(n, {
                    dataSource: I.timezone.zones_titles,
                    dataValueField: "other_zone",
                    dataTextField: "name",
                    optionLabel: t.options.optionLabel
                })
            },
            _zonePicker: function() {
                var t = this,
                    n = e("<input />").appendTo(this.wrapper);
                t._zone = new I.ui.DropDownList(n, {
                    dataValueField: "zone",
                    dataTextField: "territory",
                    dataSource: t._zonesQuery.data,
                    cascadeFrom: t._zoneTitleId,
                    dataBound: function() {
                        t._value = this.value(), this.wrapper.toggle(this.dataSource.view().length > 1)
                    }
                }), t._zone.wrapper.hide()
            },
            destroy: function() {
                O.fn.destroy.call(this), I.destroy(this.wrapper)
            },
            value: function(e) {
                var n, i = this;
                return e === t ? i._value : (n = i._zonesQuery.filter({
                    field: "zone",
                    operator: "eq",
                    value: e
                }).data[0], n ? (i._zoneTitle.value(n.other_zone), i._zone.value(n.zone)) : i._zoneTitle.select(0), t)
            }
        }), N.plugin(D), A = I.template('<option value="#=other_zone#">#=name#</option>'), E = I.template('<option value="#=zone#">#=territory#</option>'), F = O.extend({
            init: function(e, t) {
                var n = this,
                    i = I.timezone.windows_zones;
                if (!i || !I.timezone.zones_titles) throw Error("kendo.timezones.min.js is not included.");
                O.fn.init.call(n, e, t), n.wrapper = n.element, n._zonesQuery = new I.data.Query(i), n._zoneTitlePicker(), n._zonePicker(), n.value(n.options.value)
            },
            options: {
                name: "MobileTimezoneEditor",
                optionLabel: "No timezone",
                value: ""
            },
            events: ["change"],
            _bindZones: function(e) {
                var t = e ? this._filter(e) : [];
                this._zone.html(this._options(t, E))
            },
            _filter: function(e) {
                return this._zonesQuery.filter({
                    field: "other_zone",
                    operator: "eq",
                    value: e
                }).data
            },
            _options: function(e, t, n) {
                var i = 0,
                    r = "",
                    o = e.length;
                for (n && (r += t({
                    other_zone: "",
                    name: n
                })); o > i; i++) r += t(e[i]);
                return r
            },
            _zoneTitlePicker: function() {
                var t = this,
                    n = t._options(I.timezone.zones_titles, A, t.options.optionLabel);
                t._zoneTitle = e("<select>" + n + "</select>").appendTo(t.wrapper).change(function() {
                    var e = this.value,
                        n = t._zone;
                    t._bindZones(e), e && n[0].children.length > 1 ? n.show() : n.hide(), t._value = n[0].value, t.trigger("change")
                })
            },
            _zonePicker: function() {
                var t = this;
                t._zone = e('<select style="display:none"></select>').appendTo(this.wrapper).change(function() {
                    t._value = this.value, t.trigger("change")
                }), t._bindZones(t._zoneTitle.val()), t._value = t._zone[0].value
            },
            destroy: function() {
                O.fn.destroy.call(this), I.destroy(this.wrapper)
            },
            value: function(e) {
                var n, i = this,
                    r = i._zone,
                    o = "",
                    a = "";
                return e === t ? i._value : (n = i._zonesQuery.filter({
                    field: "zone",
                    operator: "eq",
                    value: e
                }).data[0], n && (a = n.zone, o = n.other_zone), i._zoneTitle.val(o), i._bindZones(o), r.val(a), a = r[0].value, a && r[0].children.length > 1 ? r.show() : r.hide(), i._value = a, t)
            }
        }), N.plugin(F)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.touch.min", ["kendo.core.min", "kendo.userevents.min"], e)
}(function() {
    return function(e, t) {
        var n = window.kendo,
            i = n.ui.Widget,
            r = e.proxy,
            o = Math.abs,
            a = 20,
            s = i.extend({
                init: function(e, t) {
                    function o(e) {
                        return function(t) {
                            s._triggerTouch(e, t)
                        }
                    }

                    function a(e) {
                        return function(t) {
                            s.trigger(e, {
                                touches: t.touches,
                                distance: t.distance,
                                center: t.center,
                                event: t.event
                            })
                        }
                    }
                    var s = this;
                    i.fn.init.call(s, e, t), t = s.options, e = s.element, s.wrapper = e, s.events = new n.UserEvents(e, {
                        filter: t.filter,
                        surface: t.surface,
                        minHold: t.minHold,
                        multiTouch: t.multiTouch,
                        allowSelection: !0,
                        fastTap: t.fastTap,
                        press: o("touchstart"),
                        hold: o("hold"),
                        tap: r(s, "_tap"),
                        gesturestart: a("gesturestart"),
                        gesturechange: a("gesturechange"),
                        gestureend: a("gestureend")
                    }), t.enableSwipe ? (s.events.bind("start", r(s, "_swipestart")), s.events.bind("move", r(s, "_swipemove"))) : (s.events.bind("start", r(s, "_dragstart")), s.events.bind("move", o("drag")), s.events.bind("end", o("dragend"))), n.notify(s)
                },
                events: ["touchstart", "dragstart", "drag", "dragend", "tap", "doubletap", "hold", "swipe", "gesturestart", "gesturechange", "gestureend"],
                options: {
                    name: "Touch",
                    surface: null,
                    global: !1,
                    fastTap: !1,
                    filter: null,
                    multiTouch: !1,
                    enableSwipe: !1,
                    minXDelta: 30,
                    maxYDelta: 20,
                    maxDuration: 1e3,
                    minHold: 800,
                    doubleTapTimeout: 800
                },
                cancel: function() {
                    this.events.cancel()
                },
                _triggerTouch: function(e, t) {
                    this.trigger(e, {
                        touch: t.touch,
                        event: t.event
                    }) && t.preventDefault()
                },
                _tap: function(e) {
                    var t = this,
                        i = t.lastTap,
                        r = e.touch;
                    i && t.options.doubleTapTimeout > r.endTime - i.endTime && n.touchDelta(r, i).distance < a ? (t._triggerTouch("doubletap", e), t.lastTap = null) : (t._triggerTouch("tap", e), t.lastTap = r)
                },
                _dragstart: function(e) {
                    this._triggerTouch("dragstart", e)
                },
                _swipestart: function(e) {
                    2 * o(e.x.velocity) >= o(e.y.velocity) && e.sender.capture()
                },
                _swipemove: function(e) {
                    var t = this,
                        n = t.options,
                        i = e.touch,
                        r = e.event.timeStamp - i.startTime,
                        a = i.x.initialDelta > 0 ? "right" : "left";
                    o(i.x.initialDelta) >= n.minXDelta && o(i.y.initialDelta) < n.maxYDelta && n.maxDuration > r && (t.trigger("swipe", {
                        direction: a,
                        touch: e.touch
                    }), i.cancel())
                }
            });
        n.ui.plugin(s)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.gantt.list.min", ["kendo.dom.min", "kendo.touch.min", "kendo.draganddrop.min", "kendo.columnsorter.min", "kendo.datetimepicker.min", "kendo.editable.min"], e)
}(function() {
    return function(e) {
        function t(e) {
            var t, n, i = [],
                r = e.className;
            for (t = 0, n = e.level; n > t; t++) i.push(o("span", {
                className: r
            }));
            return i
        }

        function n() {
            var t = i._activeElement();
            "body" !== t.nodeName.toLowerCase() && e(t).blur()
        }
        var i = window.kendo,
            r = i.dom,
            o = r.element,
            a = r.text,
            s = i.support.browser,
            l = i.support.mobileOS,
            c = i.ui,
            d = c.Widget,
            u = e.extend,
            h = e.map,
            f = e.isFunction,
            p = s.msie && 9 > s.version,
            m = i.keys,
            g = {
                title: "Title",
                start: "Start Time",
                end: "End Time",
                percentComplete: "% Done",
                parentId: "Predecessor ID",
                id: "ID",
                orderId: "Order ID"
            },
            v = "string",
            _ = ".kendoGanttList",
            b = "click",
            w = ".",
            y = "<table style='visibility: hidden;'><tbody><tr style='height:{0}'><td>&nbsp;</td></tr></tbody></table>",
            k = {
                wrapper: "k-treelist k-grid k-widget",
                header: "k-header",
                alt: "k-alt",
                rtl: "k-rtl",
                editCell: "k-edit-cell",
                group: "k-treelist-group",
                gridHeader: "k-grid-header",
                gridHeaderWrap: "k-grid-header-wrap",
                gridContent: "k-grid-content",
                gridContentWrap: "k-grid-content",
                selected: "k-state-selected",
                icon: "k-icon",
                iconCollapse: "k-i-collapse",
                iconExpand: "k-i-expand",
                iconHidden: "k-i-none",
                iconPlaceHolder: "k-icon k-i-none",
                input: "k-input",
                link: "k-link",
                resizeHandle: "k-resize-handle",
                resizeHandleInner: "k-resize-handle-inner",
                dropPositions: "k-insert-top k-insert-bottom k-add k-insert-middle",
                dropTop: "k-insert-top",
                dropBottom: "k-insert-bottom",
                dropAdd: "k-add",
                dropMiddle: "k-insert-middle",
                dropDenied: "k-denied",
                dragStatus: "k-drag-status",
                dragClue: "k-drag-clue",
                dragClueText: "k-clue-text"
            },
            x = c.GanttList = d.extend({
                init: function(t, n) {
                    d.fn.init.call(this, t, n), 0 === this.options.columns.length && this.options.columns.push("title"), this.dataSource = this.options.dataSource, this._columns(), this._layout(), this._domTrees(), this._header(), this._sortable(), this._editable(), this._selectable(), this._draggable(), this._resizable(), this._attachEvents(), this._adjustHeight(), this.bind("render", function() {
                        var t, n;
                        this.options.resizable && (t = this.header.find("col"), n = this.content.find("col"), this.header.find("th").not(":last").each(function(i) {
                            var r = e(this).outerWidth();
                            t.eq(i).width(r), n.eq(i).width(r)
                        }), t.last().css("width", "auto"), n.last().css("width", "auto"))
                    }, !0)
                },
                _adjustHeight: function() {
                    this.content.height(this.element.height() - this.header.parent().outerHeight())
                },
                destroy: function() {
                    d.fn.destroy.call(this), this._reorderDraggable && this._reorderDraggable.destroy(), this._tableDropArea && this._tableDropArea.destroy(), this._contentDropArea && this._contentDropArea.destroy(), this._columnResizable && this._columnResizable.destroy(), this.touch && this.touch.destroy(), this.timer && clearTimeout(this.timer), this.content.off(_), this.header.find("thead").off(_), this.header.find(w + x.link).off(_), this.header = null, this.content = null, this.levels = null, i.destroy(this.element)
                },
                options: {
                    name: "GanttList",
                    selectable: !0,
                    editable: !0,
                    resizable: !1
                },
                _attachEvents: function() {
                    var t = this,
                        n = x.styles;
                    t.content.on(b + _, "td > span." + n.icon + ":not(." + n.iconHidden + ")", function(n) {
                        var i = e(this),
                            r = t._modelFromElement(i);
                        r.set("expanded", !r.get("expanded")), n.stopPropagation()
                    })
                },
                _domTrees: function() {
                    this.headerTree = new r.Tree(this.header[0]), this.contentTree = new r.Tree(this.content[0])
                },
                _columns: function() {
                    var e = this.options.columns,
                        t = function() {
                            this.field = "", this.title = "", this.editable = !1, this.sortable = !1
                        };
                    this.columns = h(e, function(e) {
                        return e = typeof e === v ? {
                            field: e,
                            title: g[e]
                        } : e, u(new t, e)
                    })
                },
                _layout: function() {
                    var t = this,
                        n = this.options,
                        r = this.element,
                        o = x.styles,
                        a = function() {
                            var r, o = typeof n.rowHeight === v ? n.rowHeight : n.rowHeight + "px",
                                a = e(i.format(y, o));
                            return t.content.append(a), r = a.find("tr").outerHeight(), a.remove(), r
                        };
                    r.addClass(o.wrapper).append("<div class='" + o.gridHeader + "'><div class='" + o.gridHeaderWrap + "'></div></div>").append("<div class='" + o.gridContentWrap + "'></div>"), this.header = r.find(w + o.gridHeaderWrap), this.content = r.find(w + o.gridContent), n.rowHeight && (this._rowHeight = a())
                },
                _header: function() {
                    var e = this.headerTree,
                        t = o("colgroup", null, this._cols()),
                        n = o("thead", {
                            role: "rowgroup"
                        }, [o("tr", {
                            role: "row"
                        }, this._ths())]),
                        i = o("table", {
                            style: {
                                minWidth: this.options.listWidth + "px"
                            },
                            role: "grid"
                        }, [t, n]);
                    e.render([i])
                },
                _render: function(e) {
                    var t, n, i, r = {
                        style: {
                            minWidth: this.options.listWidth + "px"
                        },
                        tabIndex: 0,
                        role: "treegrid"
                    };
                    this._rowHeight && (r.style.height = e.length * this._rowHeight + "px"), this.levels = [{
                        field: null,
                        value: 0
                    }], t = o("colgroup", null, this._cols()), n = o("tbody", {
                        role: "rowgroup"
                    }, this._trs(e)), i = o("table", r, [t, n]), this.contentTree.render([i]), this.trigger("render")
                },
                _ths: function() {
                    var e, t, n, i, r = this.columns,
                        s = [];
                    for (n = 0, i = r.length; i > n; n++) e = r[n], t = {
                        "data-field": e.field,
                        "data-title": e.title,
                        className: x.styles.header,
                        role: "columnheader"
                    }, s.push(o("th", t, [a(e.title)]));
                    return this.options.resizable && s.push(o("th", {
                        className: x.styles.header,
                        role: "columnheader"
                    })), s
                },
                _cols: function() {
                    var e, t, n, i, r, a = this.columns,
                        s = [];
                    for (i = 0, r = a.length; r > i; i++) e = a[i], n = e.width, t = n && 0 !== parseInt(n, 10) ? {
                        style: {
                            width: typeof n === v ? n : n + "px"
                        }
                    } : null, s.push(o("col", t, []));
                    return this.options.resizable && s.push(o("col", {
                        style: {
                            width: "1px"
                        }
                    })), s
                },
                _trs: function(e) {
                    var t, n, i, r, o, a = [],
                        s = [],
                        l = x.styles;
                    for (r = 0, o = e.length; o > r; r++) t = e[r], i = this._levels({
                        idx: t.parentId,
                        id: t.id,
                        summary: t.summary
                    }), n = {
                        "data-uid": t.uid,
                        "data-level": i,
                        role: "row"
                    }, t.summary && (n["aria-expanded"] = t.expanded), r % 2 !== 0 && s.push(l.alt), t.summary && s.push(l.group), s.length && (n.className = s.join(" ")), a.push(this._tds({
                        task: t,
                        attr: n,
                        level: i
                    })), s = [];
                    return a
                },
                _tds: function(e) {
                    var t, n, i, r = [],
                        a = this.columns;
                    for (n = 0, i = a.length; i > n; n++) t = a[n], r.push(this._td({
                        task: e.task,
                        column: t,
                        level: e.level
                    }));
                    return this.options.resizable && r.push(o("td", {
                        role: "gridcell"
                    })), o("tr", e.attr, r)
                },
                _td: function(e) {
                    var n, r, s, l = [],
                        c = this.options.resourcesField,
                        d = x.styles,
                        u = e.task,
                        h = e.column,
                        f = u.get(h.field);
                    if (h.field == c) {
                        for (f = f || [], n = [], s = 0; f.length > s; s++) n.push(i.format("{0} [{1}]", f[s].get("name"), f[s].get("formatedValue")));
                        n = n.join(", ")
                    } else n = h.format ? i.format(h.format, f) : f;
                    return "title" === h.field && (l = t({
                        level: e.level,
                        className: d.iconPlaceHolder
                    }), l.push(o("span", {
                        className: d.icon + " " + (u.summary ? u.expanded ? d.iconCollapse : d.iconExpand : d.iconHidden)
                    })), r = i.format("{0}, {1:P0}", n, u.percentComplete)), l.push(o("span", {
                        "aria-label": r
                    }, [a(n)])), o("td", {
                        role: "gridcell"
                    }, l)
                },
                _levels: function(e) {
                    var t, n, i, r = this.levels,
                        o = e.summary,
                        a = e.idx,
                        s = e.id;
                    for (n = 0, i = r.length; i > n; n++)
                        if (t = r[n], t.field == a) return o && r.push({
                            field: s,
                            value: t.value + 1
                        }), t.value
                },
                _sortable: function() {
                    var e, t, n, r, o, a = this,
                        s = this.options.resourcesField,
                        l = this.columns,
                        c = this.header.find("th[" + i.attr("field") + "]"),
                        d = function(e) {
                            (0 === a.dataSource.total() || a.editable && a.editable.trigger("validate")) && (e.preventDefault(), e.stopImmediatePropagation())
                        };
                    for (r = 0, o = c.length; o > r; r++) e = l[r], e.sortable && e.field !== s && (n = c.eq(r), t = n.data("kendoColumnSorter"), t && t.destroy(), n.attr("data-" + i.ns + "field", e.field).kendoColumnSorter({
                        dataSource: this.dataSource
                    }).find(w + x.styles.link).on("click" + _, d));
                    c = null
                },
                _selectable: function() {
                    var t = this,
                        n = this.options.selectable;
                    n && this.content.on(b + _, "tr", function(n) {
                        var i = e(this);
                        t.editable && t.editable.trigger("validate"), n.ctrlKey ? t.clearSelection() : t.select(i)
                    })
                },
                select: function(e) {
                    var t = this.content.find(e),
                        n = x.styles.selected;
                    return t.length ? (t.siblings(w + n).removeClass(n).attr("aria-selected", !1).end().addClass(n).attr("aria-selected", !0), void this.trigger("change")) : this.content.find(w + n)
                },
                clearSelection: function() {
                    var e = this.select();
                    e.length && (e.removeClass(x.styles.selected), this.trigger("change"))
                },
                _setDataSource: function(e) {
                    this.dataSource = e
                },
                _editable: function() {
                    var t = this,
                        i = x.styles,
                        r = "span." + i.icon + ":not(" + i.iconHidden + ")",
                        o = function() {
                            var e = t.editable;
                            e && (e.end() ? t._closeCell() : e.trigger("validate"))
                        },
                        a = function(t) {
                            var r = e(t.currentTarget);
                            r.hasClass(i.editCell) || n()
                        };
                    this.options.editable && (this._startEditHandler = function(n) {
                        var i = n.currentTarget ? e(n.currentTarget) : n,
                            r = t._columnFromElement(i);
                        t.editable || r && r.editable && t._editCell({
                            cell: i,
                            column: r
                        })
                    }, t.content.on("focusin" + _, function() {
                        clearTimeout(t.timer), t.timer = null
                    }).on("focusout" + _, function() {
                        t.timer = setTimeout(o, 1)
                    }).on("keydown" + _, function(e) {
                        e.keyCode === m.ENTER && e.preventDefault()
                    }).on("keyup" + _, function(e) {
                        var i, r, a = e.keyCode;
                        switch (a) {
                            case m.ENTER:
                                n(), o();
                                break;
                            case m.ESC:
                                t.editable && (i = t._editableContainer, r = t._modelFromElement(i), t.trigger("cancel", {
                                    model: r,
                                    cell: i
                                }) || t._closeCell(!0))
                        }
                    }), l ? t.touch = t.content.kendoTouch({
                        filter: "td",
                        touchstart: function(e) {
                            a(e.touch)
                        },
                        doubletap: function(n) {
                            e(n.touch.initialTouch).is(r) || t._startEditHandler(n.touch)
                        }
                    }).data("kendoTouch") : t.content.on("mousedown" + _, "td", function(e) {
                        a(e)
                    }).on("dblclick" + _, "td", function(n) {
                        e(n.target).is(r) || t._startEditHandler(n)
                    }))
                },
                _editCell: function(t) {
                    var n, r = this.options.resourcesField,
                        o = x.styles,
                        a = t.cell,
                        s = t.column,
                        l = this._modelFromElement(a),
                        c = this.dataSource._createNewModel(l.toJSON()),
                        d = c.fields[s.field] || c[s.field],
                        u = d.validation,
                        h = i.attr("type"),
                        m = i.attr("bind"),
                        g = i.attr("format"),
                        v = {
                            name: s.field,
                            required: d.validation ? d.validation.required === !0 : !1
                        };
                    return s.field === r ? void s.editor(a, c) : (this._editableContent = a.children().detach(), this._editableContainer = a, a.data("modelCopy", c), "date" !== d.type && "date" !== e.type(d) || s.format && !/H|m|s|F|g|u/.test(s.format) || (v[m] = "value:" + s.field, v[h] = "date", s.format && (v[g] = i._extractFormat(s.format)), n = function(t, n) {
                        e('<input type="text"/>').attr(v).appendTo(t).kendoDateTimePicker({
                            format: n.format
                        })
                    }), this.editable = a.addClass(o.editCell).kendoEditable({
                        fields: {
                            field: s.field,
                            format: s.format,
                            editor: s.editor || n
                        },
                        model: c,
                        clearContainer: !1
                    }).data("kendoEditable"), u && u.dateCompare && f(u.dateCompare) && u.message && (e("<span " + i.attr("for") + '="' + s.field + '" class="k-invalid-msg"/>').hide().appendTo(a), a.find("[name=" + s.field + "]").attr(i.attr("dateCompare-msg"), u.message)), this.editable.bind("validate", function(e) {
                        var t = this.element.find(":kendoFocusable:first").focus();
                        p && t.focus(), e.preventDefault()
                    }), void(this.trigger("edit", {
                        model: l,
                        cell: a
                    }) && this._closeCell(!0)))
                },
                _closeCell: function(e) {
                    var t = x.styles,
                        n = this._editableContainer,
                        i = this._modelFromElement(n),
                        r = this._columnFromElement(n),
                        o = r.field,
                        a = n.data("modelCopy"),
                        s = {};
                    s[o] = a.get(o), n.empty().removeData("modelCopy").removeClass(t.editCell).append(this._editableContent), this.editable.unbind(), this.editable.destroy(), this.editable = null, this._editableContainer = null, this._editableContent = null, e || ("start" === o && (s.end = new Date(s.start.getTime() + i.duration())), this.trigger("update", {
                        task: i,
                        updateInfo: s
                    }))
                },
                _draggable: function() {
                    var t, n = this,
                        r = null,
                        o = !0,
                        a = x.styles,
                        s = i.support.isRtl(this.element),
                        c = "tr[" + i.attr("level") + " = 0]:last",
                        d = {},
                        h = function() {
                            r = null, t = null, o = !0, d = {}
                        },
                        f = function(e) {
                            for (var t = e; t;) {
                                if (r.get("id") === t.get("id")) {
                                    o = !1;
                                    break
                                }
                                t = n.dataSource.taskParent(t)
                            }
                        },
                        p = function() {
                            var n = e(t).height(),
                                r = i.getOffset(t).top;
                            u(t, {
                                beforeLimit: r + .25 * n,
                                afterLimit: r + .75 * n
                            })
                        },
                        m = function(e) {
                            var n, r, o, s, l;
                            t && (n = e.location, r = a.dropAdd, o = "add", s = parseInt(t.attr(i.attr("level")), 10), t.beforeLimit >= n ? (l = t.prev(), r = a.dropTop, o = "insert-before") : n >= t.afterLimit && (l = t.next(), r = a.dropBottom, o = "insert-after"), l && parseInt(l.attr(i.attr("level")), 10) === s && (r = a.dropMiddle), d.className = r, d.command = o)
                        },
                        g = function() {
                            return n._reorderDraggable.hint.children(w + a.dragStatus).removeClass(a.dropPositions)
                        };
                    this.options.editable && (this._reorderDraggable = this.content.kendoDraggable({
                        distance: 10,
                        holdToDrag: l,
                        group: "listGroup",
                        filter: "tr[data-uid]",
                        ignore: w + a.input,
                        hint: function(t) {
                            return e('<div class="' + a.header + " " + a.dragClue + '"/>').css({
                                width: 300,
                                paddingLeft: t.css("paddingLeft"),
                                paddingRight: t.css("paddingRight"),
                                lineHeight: t.height() + "px",
                                paddingTop: t.css("paddingTop"),
                                paddingBottom: t.css("paddingBottom")
                            }).append('<span class="' + a.icon + " " + a.dragStatus + '" /><span class="' + a.dragClueText + '"/>')
                        },
                        cursorOffset: {
                            top: -20,
                            left: 0
                        },
                        container: this.content,
                        dragstart: function(e) {
                            return n.editable && n.editable.trigger("validate") ? void e.preventDefault() : (r = n._modelFromElement(e.currentTarget), this.hint.children(w + a.dragClueText).text(r.get("title")), void(s && this.hint.addClass(a.rtl)))
                        },
                        drag: function(e) {
                            o && (m(e.y), g().addClass(d.className))
                        },
                        dragend: function() {
                            h()
                        },
                        dragcancel: function() {
                            h()
                        }
                    }).data("kendoDraggable"), this._tableDropArea = this.content.kendoDropTargetArea({
                        distance: 0,
                        group: "listGroup",
                        filter: "tr[data-uid]",
                        dragenter: function(e) {
                            t = e.dropTarget, f(n._modelFromElement(t)), p(), g().toggleClass(a.dropDenied, !o)
                        },
                        dragleave: function() {
                            o = !0, g()
                        },
                        drop: function() {
                            var e = n._modelFromElement(t),
                                i = e.orderId,
                                a = {
                                    parentId: e.parentId
                                };
                            if (o) {
                                switch (d.command) {
                                    case "add":
                                        a.parentId = e.id;
                                        break;
                                    case "insert-before":
                                        a.orderId = e.parentId === r.parentId && e.orderId > r.orderId ? i - 1 : i;
                                        break;
                                    case "insert-after":
                                        a.orderId = e.parentId === r.parentId && e.orderId > r.orderId ? i : i + 1
                                }
                                n.trigger("update", {
                                    task: r,
                                    updateInfo: a
                                })
                            }
                        }
                    }).data("kendoDropTargetArea"), this._contentDropArea = this.element.kendoDropTargetArea({
                        distance: 0,
                        group: "listGroup",
                        filter: w + a.gridContent,
                        drop: function() {
                            var e = n._modelFromElement(n.content.find(c)),
                                t = e.orderId,
                                i = {
                                    parentId: null,
                                    orderId: null !== r.parentId ? t + 1 : t
                                };
                            n.trigger("update", {
                                task: r,
                                updateInfo: i
                            })
                        }
                    }).data("kendoDropTargetArea"))
                },
                _resizable: function() {
                    var t = this,
                        n = x.styles,
                        i = function(i) {
                            var r, o, a = e(i.currentTarget),
                                s = t.resizeHandle,
                                l = a.position(),
                                c = l.left,
                                d = a.outerWidth(),
                                u = a.closest("div"),
                                h = i.clientX + e(window).scrollLeft(),
                                f = t.options.columnResizeHandleWidth;
                            return c += u.scrollLeft(), s || (s = t.resizeHandle = e('<div class="' + n.resizeHandle + '"><div class="' + n.resizeHandleInner + '" /></div>')), r = a.offset().left + d, (o = h > r - f && r + f > h) ? (u.append(s), void s.show().css({
                                top: l.top,
                                left: c + d - f - 1,
                                height: a.outerHeight(),
                                width: 3 * f
                            }).data("th", a)) : void s.hide()
                        };
                    this.options.resizable && (this._columnResizable && this._columnResizable.destroy(), this.header.find("thead").on("mousemove" + _, "th", i), this._columnResizable = this.header.kendoResizable({
                        handle: w + n.resizeHandle,
                        start: function(n) {
                            var i = e(n.currentTarget).data("th"),
                                r = "col:eq(" + i.index() + ")",
                                o = t.header.find("table"),
                                a = t.content.find("table");
                            t.element.addClass("k-grid-column-resizing"), this.col = a.children("colgroup").find(r).add(o.find(r)), this.th = i, this.startLocation = n.x.location, this.columnWidth = i.outerWidth(), this.table = o.add(a), this.totalWidth = this.table.width() - o.find("th:last").outerWidth()
                        },
                        resize: function(e) {
                            var t = 11,
                                n = e.x.location - this.startLocation;
                            t > this.columnWidth + n && (n = t - this.columnWidth), this.table.css({
                                minWidth: this.totalWidth + n
                            }), this.col.width(this.columnWidth + n)
                        },
                        resizeend: function() {
                            var e, n, i;
                            t.element.removeClass("k-grid-column-resizing"), e = Math.floor(this.columnWidth), n = Math.floor(this.th.outerWidth()), i = t.columns[this.th.index()], t.trigger("columnResize", {
                                column: i,
                                oldWidth: e,
                                newWidth: n
                            }), this.table = this.col = this.th = null
                        }
                    }).data("kendoResizable"))
                },
                _modelFromElement: function(e) {
                    var t = e.closest("tr"),
                        n = this.dataSource.getByUid(t.attr(i.attr("uid")));
                    return n
                },
                _columnFromElement: function(e) {
                    var t = e.closest("td"),
                        n = t.parent(),
                        i = n.children().index(t);
                    return this.columns[i]
                }
            });
        u(!0, c.GanttList, {
            styles: k
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.gantt.timeline.min", ["kendo.dom.min", "kendo.touch.min", "kendo.draganddrop.min"], e)
}(function() {
    return function(e) {
        function t(e) {
            return delete e.name, delete e.prefix, delete e.views, e
        }

        function n(e) {
            var t = [],
                n = e.workWeekStart;
            for (t.push(n); e.workWeekEnd != n;) n > 6 ? n -= 7 : n++, t.push(n);
            return t
        }

        function i() {
            var t = kendo._activeElement();
            t && "body" !== t.nodeName.toLowerCase() && e(t).blur()
        }
        var r, o, a = kendo.ui.Widget,
            s = kendo.dom.element,
            l = kendo.dom.text,
            c = kendo.dom.html,
            d = e.isPlainObject,
            u = e.extend,
            h = e.proxy,
            f = kendo.support.browser,
            p = !1,
            m = kendo.keys,
            g = kendo.data.Query,
            v = "string",
            _ = ".kendoGanttTimeline",
            b = "click",
            w = "dblclick",
            y = "mousemove",
            k = "mouseenter",
            x = "mouseleave",
            C = "keydown",
            S = ".",
            T = kendo.template("#=kendo.toString(start, 't')#"),
            D = kendo.template("#=kendo.toString(start, 'ddd M/dd')#"),
            A = kendo.template("#=kendo.toString(start, 'ddd M/dd')# - #=kendo.toString(kendo.date.addDays(end, -1), 'ddd M/dd')#"),
            E = kendo.template("#=kendo.toString(start, 'MMM')#"),
            F = kendo.template("#=kendo.toString(start, 'yyyy')#"),
            I = kendo.template('<div class="#=styles.marquee#"><div class="#=styles.marqueeColor#"></div></div>'),
            M = kendo.template('<div style="z-index: 100002;" class="#=styles.tooltipWrapper#"><div class="#=styles.tooltipContent#"><div>#=messages.start#: #=kendo.toString(start, format)#</div><div>#=messages.end#: #=kendo.toString(end, format)#</div></div></div>'),
            R = kendo.template('<div style="z-index: 100002;" class="#=styles.tooltipWrapper#" ><div class="#=styles.tooltipContent#">#=text#%</div><div class="#=styles.tooltipCallout#" style="left:13px;"></div></div>'),
            P = kendo.template('<div class="#=styles.taskDetails#"><strong>#=task.title#</strong><div class="#=styles.taskDetailsPercent#">#=kendo.toString(task.percentComplete, "p0")#</div><ul class="#=styles.reset#"><li>#=messages.start#: #=kendo.toString(task.start, "h:mm tt ddd, MMM d")#</li><li>#=messages.end#: #=kendo.toString(task.end, "h:mm tt ddd, MMM d")#</li></ul></div>'),
            z = "<table style='visibility: hidden;'><tbody><tr style='height:{0}'><td>&nbsp;</td></tr></tbody></table>",
            B = {
                day: {
                    type: "kendo.ui.GanttDayView"
                },
                week: {
                    type: "kendo.ui.GanttWeekView"
                },
                month: {
                    type: "kendo.ui.GanttMonthView"
                },
                year: {
                    type: "kendo.ui.GanttYearView"
                }
            },
            L = {
                alt: "k-alt",
                reset: "k-reset",
                nonWorking: "k-nonwork-hour",
                header: "k-header",
                gridHeader: "k-grid-header",
                gridHeaderWrap: "k-grid-header-wrap",
                gridContent: "k-grid-content",
                tasksWrapper: "k-gantt-tables",
                rowsTable: "k-gantt-rows",
                columnsTable: "k-gantt-columns",
                tasksTable: "k-gantt-tasks",
                dependenciesWrapper: "k-gantt-dependencies",
                resource: "k-resource",
                resourceAlt: "k-resource k-alt",
                task: "k-task",
                taskSingle: "k-task-single",
                taskMilestone: "k-task-milestone",
                taskSummary: "k-task-summary",
                taskWrap: "k-task-wrap",
                taskMilestoneWrap: "k-milestone-wrap",
                resourcesWrap: "k-resources-wrap",
                taskDot: "k-task-dot",
                taskDotStart: "k-task-start",
                taskDotEnd: "k-task-end",
                taskDragHandle: "k-task-draghandle",
                taskContent: "k-task-content",
                taskTemplate: "k-task-template",
                taskActions: "k-task-actions",
                taskDelete: "k-task-delete",
                taskComplete: "k-task-complete",
                taskDetails: "k-task-details",
                taskDetailsPercent: "k-task-pct",
                link: "k-link",
                icon: "k-icon",
                iconDelete: "k-si-close",
                taskResizeHandle: "k-resize-handle",
                taskResizeHandleWest: "k-resize-w",
                taskResizeHandleEast: "k-resize-e",
                taskSummaryProgress: "k-task-summary-progress",
                taskSummaryComplete: "k-task-summary-complete",
                line: "k-line",
                lineHorizontal: "k-line-h",
                lineVertical: "k-line-v",
                arrowWest: "k-arrow-w",
                arrowEast: "k-arrow-e",
                dragHint: "k-drag-hint",
                dependencyHint: "k-dependency-hint",
                tooltipWrapper: "k-widget k-tooltip k-popup k-group k-reset",
                tooltipContent: "k-tooltip-content",
                tooltipCallout: "k-callout k-callout-s",
                callout: "k-callout",
                marquee: "k-marquee k-gantt-marquee",
                marqueeColor: "k-marquee-color"
            },
            H = kendo.ui.GanttView = a.extend({
                init: function(e, t) {
                    a.fn.init.call(this, e, t), this.title = this.options.title || this.options.name, this.header = this.element.find(S + H.styles.gridHeader), this.content = this.element.find(S + H.styles.gridContent), this.contentWidth = this.content.width(), this._workDays = n(this.options), this._headerTree = t.headerTree, this._taskTree = t.taskTree, this._taskTemplate = t.taskTemplate ? kendo.template(t.taskTemplate, u({}, kendo.Template, t.templateSettings)) : null, this._dependencyTree = t.dependencyTree, this._taskCoordinates = {}, this._currentTime()
                },
                destroy: function() {
                    a.fn.destroy.call(this), clearTimeout(this._tooltipTimeout), this.headerRow = null, this.header = null, this.content = null, this._dragHint = null, this._resizeHint = null, this._resizeTooltip = null, this._taskTooltip = null, this._percentCompleteResizeTooltip = null, this._headerTree = null, this._taskTree = null, this._dependencyTree = null
                },
                options: {
                    showWorkHours: !1,
                    showWorkDays: !1,
                    workDayStart: new Date(1980, 1, 1, 8, 0, 0),
                    workDayEnd: new Date(1980, 1, 1, 17, 0, 0),
                    workWeekStart: 1,
                    workWeekEnd: 5,
                    hourSpan: 1,
                    slotSize: 100,
                    currentTimeMarker: {
                        updateInterval: 1e4
                    }
                },
                renderLayout: function() {
                    this._slots = this._createSlots(), this._tableWidth = this._calculateTableWidth(), this.createLayout(this._layout()), this._slotDimensions(), this._adjustHeight(), this.content.find(S + H.styles.dependenciesWrapper).width(this._tableWidth)
                },
                _adjustHeight: function() {
                    this.content.height(this.element.height() - this.header.outerHeight())
                },
                createLayout: function(e) {
                    var t = this._headers(e),
                        n = this._colgroup(),
                        i = this._headerTree,
                        r = s("thead", null, t),
                        o = s("table", {
                            style: {
                                width: this._tableWidth + "px"
                            }
                        }, [n, r]);
                    i.render([o]), this.headerRow = this.header.find("table:first tr").last()
                },
                _slotDimensions: function() {
                    var e, t, n, i, r = this.headerRow[0].children,
                        o = this._timeSlots();
                    for (n = 0, i = r.length; i > n; n++) t = r[n], e = o[n], e.offsetLeft = t.offsetLeft, e.offsetWidth = t.offsetWidth
                },
                render: function(e) {
                    var t, n, i = e.length,
                        r = H.styles,
                        o = this._rowsTable(i),
                        a = this._columnsTable(i),
                        s = this._tasksTable(e),
                        l = this.options.currentTimeMarker,
                        c = this.options.calculatedSize;
                    this._taskTree.render([o, a, s]), t = this.content.find(S + r.rowsTable), c && (n = c.row * e.length, this.content.find(S + r.tasksTable).height(n), t.height(n)), this._contentHeight = t.height(), this._rowHeight = c ? c.row : this._contentHeight / t.find("tr").length, this.content.find(S + r.columnsTable).height(this._contentHeight), l !== !1 && void 0 !== l.updateInterval && this._renderCurrentTime()
                },
                _rowsTable: function(e) {
                    var t, n, i = [],
                        r = H.styles,
                        o = [null, {
                            className: r.alt
                        }];
                    for (n = 0; e > n; n++) t = s("tr", o[n % 2], [s("td", null, [l(" ")])]), i.push(t);
                    return this._createTable(1, i, {
                        className: r.rowsTable
                    })
                },
                _columnsTable: function() {
                    var e, t, n, i, r, o = [],
                        a = H.styles,
                        c = this._timeSlots(),
                        d = c.length,
                        u = 0;
                    for (r = 0; d > r; r++) t = c[r], i = {}, n = t.span, u += n, 1 !== n && (i.colspan = n), t.isNonWorking && (i.className = a.nonWorking), o.push(s("td", i, [l(" ")]));
                    return e = s("tr", null, o), this._createTable(u, [e], {
                        className: a.columnsTable
                    })
                },
                _tasksTable: function(e) {
                    var t, n, i, r, o, a, l, c, d = [],
                        u = H.styles,
                        h = this._taskCoordinates = {},
                        f = this._calculateMilestoneWidth(),
                        m = Math.round(f.width),
                        g = this.options.resourcesField,
                        v = [u.resource, u.resourceAlt],
                        _ = this.options.calculatedSize,
                        b = this._calculateResourcesMargin(),
                        w = this._calculateTaskBorderWidth(),
                        y = function(e) {
                            var t = i.left,
                                n = t + i.width;
                            r.isMilestone() && (t -= m / 2, n = t + m), h[r.id] = {
                                start: t,
                                end: n,
                                rowIndex: e
                            }
                        };
                    for (l = 0, c = e.length; c > l; l++) r = e[l], i = this._taskPosition(r), i.borderWidth = w, t = s("tr", null), n = s("td", null, [this._renderTask(e[l], i)]), r[g] && r[g].length && (o = p ? this._tableWidth - i.left : Math.max(i.width || f.clientWidth, 0) + i.left, a = {
                        width: this._tableWidth - (o + b) + "px"
                    }, a[p ? "right" : "left"] = o + "px", _ && (a.height = _.cell + "px"), n.children.push(s("div", {
                        className: u.resourcesWrap,
                        style: a
                    }, this._renderResources(r[g], v[l % 2])))), t.children.push(n), d.push(t), y(l);
                    return this._createTable(1, d, {
                        className: H.styles.tasksTable
                    })
                },
                _createTable: function(e, t, n) {
                    var i, r, o, a = [];
                    for (o = 0; e > o; o++) a.push(s("col"));
                    return i = s("colgroup", null, a), r = s("tbody", null, t), n.style || (n.style = {}), n.style.width = this._tableWidth + "px", s("table", n, [i, r])
                },
                _calculateTableWidth: function() {
                    var e, t, n, i, r = this._timeSlots(),
                        o = 0,
                        a = 0;
                    for (n = 0, i = r.length; i > n; n++) e = r[n].span, a += e, e > o && (o = e);
                    return t = Math.round(a * this.options.slotSize / o)
                },
                _calculateMilestoneWidth: function() {
                    var t, n, i = H.styles.task + " " + H.styles.taskMilestone,
                        r = e("<div class='" + i + "' style='visibility: hidden; position: absolute'>");
                    return this.content.append(r), n = r[0].getBoundingClientRect(), t = {
                        width: n.right - n.left,
                        clientWidth: r[0].clientWidth
                    }, r.remove(), t
                },
                _calculateResourcesMargin: function() {
                    var t, n = e("<div class='" + H.styles.resourcesWrap + "' style='visibility: hidden; position: absolute'>");
                    return this.content.append(n), t = parseInt(n.css(p ? "margin-right" : "margin-left"), 10), n.remove(), t
                },
                _calculateTaskBorderWidth: function() {
                    var t, n, i = H.styles.task + " " + H.styles.taskSingle,
                        r = e("<div class='" + i + "' style='visibility: hidden; position: absolute'>");
                    return this.content.append(r), n = kendo.getComputedStyles(r[0], ["border-left-width"]), t = parseFloat(n["border-left-width"], 10), r.remove(), t
                },
                _renderTask: function(e, t) {
                    var n, i, r, o = this.options.editable,
                        a = t.left,
                        l = H.styles,
                        c = l.taskWrap,
                        d = this.options.calculatedSize,
                        u = {},
                        h = {
                            className: c,
                            style: {
                                left: a + "px"
                            }
                        };
                    return d && (h.style.height = d.cell + "px"), e.summary ? i = this._renderSummary(e, t) : e.isMilestone() ? (i = this._renderMilestone(e, t), h.className += " " + l.taskMilestoneWrap) : i = this._renderSingleTask(e, t), n = s("div", h, [i]), o && (n.children.push(s("div", {
                        className: l.taskDot + " " + l.taskDotStart
                    })), n.children.push(s("div", {
                        className: l.taskDot + " " + l.taskDotEnd
                    }))), e.summary || e.isMilestone() || !o || null !== this._taskTemplate || (r = Math.round(t.width * e.percentComplete), u[p ? "right" : "left"] = r + "px", n.children.push(s("div", {
                        className: l.taskDragHandle,
                        style: u
                    }))), n
                },
                _renderSingleTask: function(e, t) {
                    var n, i, r, o = H.styles,
                        a = Math.round(t.width * e.percentComplete),
                        d = [];
                    return null !== this._taskTemplate ? n = c(this._taskTemplate(e)) : (n = l(e.title), d.push(s("div", {
                        className: o.taskComplete,
                        style: {
                            width: a + "px"
                        }
                    }))), i = s("div", {
                        className: o.taskContent
                    }, [s("div", {
                        className: o.taskTemplate
                    }, [n])]), d.push(i), this.options.editable && (i.children.push(s("span", {
                        className: o.taskActions
                    }, [s("a", {
                        className: o.link + " " + o.taskDelete,
                        href: "#"
                    }, [s("span", {
                        className: o.icon + " " + o.iconDelete
                    })])])), i.children.push(s("span", {
                        className: o.taskResizeHandle + " " + o.taskResizeHandleWest
                    })), i.children.push(s("span", {
                        className: o.taskResizeHandle + " " + o.taskResizeHandleEast
                    }))), r = s("div", {
                        className: o.task + " " + o.taskSingle,
                        "data-uid": e.uid,
                        style: {
                            width: Math.max(t.width - 2 * t.borderWidth, 0) + "px"
                        }
                    }, d)
                },
                _renderMilestone: function(e) {
                    var t = H.styles,
                        n = s("div", {
                            className: t.task + " " + t.taskMilestone,
                            "data-uid": e.uid
                        });
                    return n
                },
                _renderSummary: function(e, t) {
                    var n = H.styles,
                        i = Math.round(t.width * e.percentComplete),
                        r = s("div", {
                            className: n.task + " " + n.taskSummary,
                            "data-uid": e.uid,
                            style: {
                                width: t.width + "px"
                            }
                        }, [s("div", {
                            className: n.taskSummaryProgress,
                            style: {
                                width: i + "px"
                            }
                        }, [s("div", {
                            className: n.taskSummaryComplete,
                            style: {
                                width: t.width + "px"
                            }
                        })])]);
                    return r
                },
                _renderResources: function(e, t) {
                    var n, i, r, o = [];
                    for (i = 0, r = e.length; r > i; i++) n = e[i], o.push(s("span", {
                        className: t,
                        style: {
                            color: n.get("color")
                        }
                    }, [l(n.get("name"))]));
                    return p && o.reverse(), o
                },
                _taskPosition: function(e) {
                    var t = Math.round,
                        n = t(this._offset(p ? e.end : e.start)),
                        i = t(this._offset(p ? e.start : e.end));
                    return {
                        left: n,
                        width: i - n
                    }
                },
                _offset: function(e) {
                    var t, n, i, r, o = this._timeSlots(),
                        a = 0;
                    return o.length ? (r = this._slotIndex("start", e), t = o[r], e > t.end ? a = t.offsetWidth : e >= t.start && (n = e - t.start, i = t.end - t.start, a = n / i * t.offsetWidth), p && (a = t.offsetWidth + 1 - a), t.offsetLeft + a) : 0
                },
                _slotIndex: function(e, t, n) {
                    var i, r = this._timeSlots(),
                        o = 0,
                        a = r.length - 1;
                    n && (r = [].slice.call(r).reverse());
                    do i = Math.ceil((a + o) / 2), t > r[i][e] ? o = i : (i === a && i--, a = i); while (o !== a);
                    return n && (o = r.length - 1 - o), o
                },
                _timeByPosition: function(t, n, i) {
                    var r, o, a, s = this._slotByPosition(t);
                    return n ? i ? s.end : s.start : (r = t - e(S + H.styles.tasksTable).offset().left, o = s.end - s.start, a = r - s.offsetLeft, p && (a = s.offsetWidth - a), new Date(s.start.getTime() + o * (a / s.offsetWidth)))
                },
                _slotByPosition: function(t) {
                    var n = t - e(S + H.styles.tasksTable).offset().left,
                        i = this._slotIndex("offsetLeft", n, p);
                    return this._timeSlots()[i]
                },
                _renderDependencies: function(e) {
                    var t, n, i = [],
                        r = this._dependencyTree;
                    for (t = 0, n = e.length; n > t; t++) i.push.apply(i, this._renderDependency(e[t]));
                    r.render(i)
                },
                _renderDependency: function(e) {
                    var t, n, i, r, o = this._taskCoordinates[e.predecessorId],
                        a = this._taskCoordinates[e.successorId];
                    if (!o || !a) return [];
                    for (n = "_render" + ["FF", "FS", "SF", "SS"][p ? 3 - e.type : e.type], t = this[n](o, a), i = 0, r = t.length; r > i; i++) t[i].attr["data-uid"] = e.uid;
                    return t
                },
                _renderFF: function(e, t) {
                    var n = this._dependencyFF(e, t, !1);
                    return n[n.length - 1].children[0] = this._arrow(!0), n
                },
                _renderSS: function(e, t) {
                    var n = this._dependencyFF(t, e, !0);
                    return n[0].children[0] = this._arrow(!1), n.reverse()
                },
                _renderFS: function(e, t) {
                    var n = this._dependencyFS(e, t, !1);
                    return n[n.length - 1].children[0] = this._arrow(!1), n
                },
                _renderSF: function(e, t) {
                    var n = this._dependencyFS(t, e, !0);
                    return n[0].children[0] = this._arrow(!0), n.reverse()
                },
                _dependencyFF: function(e, t, n) {
                    var i, r = this,
                        o = [],
                        a = 0,
                        s = 0,
                        l = 0,
                        c = 0,
                        d = n ? "start" : "end",
                        u = 2,
                        h = 1,
                        f = this._rowHeight,
                        p = 10,
                        m = e.rowIndex * f + Math.floor(f / 2) - 1,
                        g = t.rowIndex * f + Math.floor(f / 2) - 1,
                        v = H.styles,
                        _ = function() {
                            o.push(r._line(v.line + " " + v.lineHorizontal, {
                                left: a + "px",
                                top: s + "px",
                                width: l + "px"
                            }))
                        },
                        b = function() {
                            o.push(r._line(v.line + " " + v.lineVertical, {
                                left: a + "px",
                                top: s + "px",
                                height: c + "px"
                            }))
                        };
                    return a = e[d], s = m, l = p, i = t[d] - e[d], i > 0 !== n && (l = Math.abs(i) + p), n ? (a -= l, l -= h, _()) : (_(), a += l - u), s > g ? (c = s - g, c += u, s = g, b()) : (c = g - s, c += u, b(), s += c - u), l = Math.abs(a - t[d]), n || (l -= h, a -= l), _(), o
                },
                _dependencyFS: function(e, t, n) {
                    var i = this,
                        r = [],
                        o = 0,
                        a = 0,
                        s = 0,
                        l = 0,
                        c = this._rowHeight,
                        d = Math.floor(c / 2),
                        u = 10,
                        h = 2 * u,
                        f = t.start - e.end,
                        p = 2,
                        m = 1,
                        g = e.rowIndex * c + Math.floor(c / 2) - 1,
                        v = t.rowIndex * c + Math.floor(c / 2) - 1,
                        _ = H.styles,
                        b = function() {
                            r.push(i._line(_.line + " " + _.lineHorizontal, {
                                left: o + "px",
                                top: a + "px",
                                width: s + "px"
                            }))
                        },
                        w = function() {
                            r.push(i._line(_.line + " " + _.lineVertical, {
                                left: o + "px",
                                top: a + "px",
                                height: l + "px"
                            }))
                        };
                    return o = e.end, a = g, s = u, n && (o += m, f > h && (s = f - (u - p)), s -= m), b(), o += s - p, h >= f && (l = n ? Math.abs(v - g) - d : d, g > v ? (a -= l, l += p, w()) : (w(), a += l), s = e.end - t.start + h, u > s && (s = u), o -= s - p, b()), g > v ? (l = a - v, a = v, l += p, w()) : (l = v - a, w(), a += l), s = t.start - o, n || (s -= m), b(), r
                },
                _line: function(e, t) {
                    return s("div", {
                        className: e,
                        style: t
                    })
                },
                _arrow: function(e) {
                    return s("span", {
                        className: e ? H.styles.arrowWest : H.styles.arrowEast
                    })
                },
                _colgroup: function() {
                    var e, t, n, i = this._timeSlots(),
                        r = i.length,
                        o = [];
                    for (e = 0; r > e; e++)
                        for (t = 0, n = i[e].span; n > t; t++) o.push(s("col"));
                    return s("colgroup", null, o)
                },
                _createDragHint: function(e) {
                    this._dragHint = e.clone().addClass(H.styles.dragHint).css("cursor", "move"), e.parent().append(this._dragHint)
                },
                _updateDragHint: function(e) {
                    var t = this._offset(e);
                    this._dragHint.css({
                        left: t
                    })
                },
                _removeDragHint: function() {
                    this._dragHint.remove(), this._dragHint = null
                },
                _createResizeHint: function(t) {
                    var n, i, r = H.styles,
                        o = this._taskCoordinates[t.id].rowIndex * this._rowHeight,
                        a = this.options,
                        s = a.messages;
                    this._resizeHint = e(I({
                        styles: r
                    })).css({
                        top: 0,
                        height: this._contentHeight
                    }), this.content.append(this._resizeHint), this._resizeTooltip = e(M({
                        styles: r,
                        start: t.start,
                        end: t.end,
                        messages: s.views,
                        format: a.resizeTooltipFormat
                    })).css({
                        top: 0,
                        left: 0
                    }), this.content.append(this._resizeTooltip), this._resizeTooltipWidth = this._resizeTooltip.outerWidth(), n = this._resizeTooltip.outerHeight(), i = o - n, 0 > i && (i = o + this._rowHeight), this._resizeTooltipTop = i
                },
                _updateResizeHint: function(t, n, i) {
                    var r = this._offset(p ? n : t),
                        o = this._offset(p ? t : n),
                        a = o - r,
                        s = i !== p ? r : o,
                        l = this._tableWidth - kendo.support.scrollbar(),
                        c = this._resizeTooltipWidth,
                        d = this.options,
                        u = d.messages,
                        h = e(S + H.styles.tasksTable).offset().left - e(S + H.styles.tasksWrapper).offset().left;
                    p && (r += h), this._resizeHint.css({
                        left: r,
                        width: a
                    }), this._resizeTooltip && this._resizeTooltip.remove(), s -= Math.round(c / 2), 0 > s ? s = 0 : s + c > l && (s = l - c), p && (s += h), this._resizeTooltip = e(M({
                        styles: H.styles,
                        start: t,
                        end: n,
                        messages: u.views,
                        format: d.resizeTooltipFormat
                    })).css({
                        top: this._resizeTooltipTop,
                        left: s,
                        "min-width": c
                    }).appendTo(this.content)
                },
                _removeResizeHint: function() {
                    this._resizeHint.remove(), this._resizeHint = null, this._resizeTooltip.remove(), this._resizeTooltip = null
                },
                _updatePercentCompleteTooltip: function(t, n, i) {
                    var r, o, a, s;
                    this._removePercentCompleteTooltip(), r = this._percentCompleteResizeTooltip = e(R({
                        styles: H.styles,
                        text: i
                    })).appendTo(this.element), o = Math.round(r.outerWidth() / 2), a = r.find(S + H.styles.callout), s = Math.round(a.outerWidth() / 2), r.css({
                        top: t - (r.outerHeight() + s),
                        left: n - o
                    }), a.css("left", o - s)
                },
                _removePercentCompleteTooltip: function() {
                    this._percentCompleteResizeTooltip && this._percentCompleteResizeTooltip.remove(), this._percentCompleteResizeTooltip = null
                },
                _updateDependencyDragHint: function(e, t, n) {
                    this._removeDependencyDragHint(), n ? this._creteVmlDependencyDragHint(e, t) : this._creteDependencyDragHint(e, t)
                },
                _creteDependencyDragHint: function(t, n) {
                    var i = H.styles,
                        r = n.x - t.x,
                        o = n.y - t.y,
                        a = Math.sqrt(r * r + o * o),
                        s = Math.atan(o / r);
                    0 > r && (s += Math.PI), e("<div class='" + i.line + " " + i.lineHorizontal + " " + i.dependencyHint + "'></div>").css({
                        top: t.y,
                        left: t.x,
                        width: a,
                        "transform-origin": "0% 0",
                        "-ms-transform-origin": "0% 0",
                        "-webkit-transform-origin": "0% 0",
                        transform: "rotate(" + s + "rad)",
                        "-ms-transform": "rotate(" + s + "rad)",
                        "-webkit-transform": "rotate(" + s + "rad)"
                    }).appendTo(this.content)
                },
                _creteVmlDependencyDragHint: function(t, n) {
                    var i = e("<kvml:line class='" + H.styles.dependencyHint + "' style='position:absolute; top: 0px; left: 0px;' strokecolor='black' strokeweight='2px' from='" + t.x + "px," + t.y + "px' to='" + n.x + "px," + n.y + "px'></kvml:line>").appendTo(this.content);
                    i[0].outerHTML = i[0].outerHTML
                },
                _removeDependencyDragHint: function() {
                    this.content.find(S + H.styles.dependencyHint).remove()
                },
                _createTaskTooltip: function(t, n, i) {
                    var r, o = H.styles,
                        a = this.options,
                        s = this.content,
                        l = s.offset(),
                        c = s.width(),
                        d = kendo.scrollLeft(s),
                        u = e(n).parents("tr").first(),
                        h = u.offset(),
                        f = a.tooltip && a.tooltip.template ? kendo.template(a.tooltip.template) : P,
                        m = p ? i - (l.left + d + kendo.support.scrollbar()) : i - (l.left - d),
                        g = h.top + u.outerHeight() - l.top + s.scrollTop(),
                        v = this._taskTooltip = e('<div style="z-index: 100002;" class="' + o.tooltipWrapper + '" ><div class="' + o.taskContent + '"></div></div>');
                    v.css({
                        left: m,
                        top: g
                    }).appendTo(s).find(S + o.taskContent).append(f({
                        styles: o,
                        task: t,
                        messages: a.messages.views
                    })), v.outerHeight() < h.top - l.top && v.css("top", h.top - l.top - v.outerHeight() + s.scrollTop()), r = v.outerWidth(), r + m - d > c && (m -= r, d > m && (m = d + c - (r + 17)), v.css("left", m))
                },
                _removeTaskTooltip: function() {
                    this._taskTooltip && this._taskTooltip.remove(), this._taskTooltip = null
                },
                _scrollTo: function(e) {
                    var t = e.offset().left,
                        n = e.width(),
                        i = t + n,
                        r = e.closest("tr"),
                        o = r.offset().top,
                        a = r.height(),
                        s = o + a,
                        l = this.content,
                        c = l.offset(),
                        d = c.top,
                        u = l.height(),
                        h = d + u,
                        f = c.left,
                        p = l.width(),
                        m = f + p,
                        g = kendo.support.scrollbar();
                    d > o ? l.scrollTop(l.scrollTop() + (o - d)) : s > h && l.scrollTop(l.scrollTop() + (s + g - h)), f > t && n > p && m > i || i > m && p > n ? l.scrollLeft(l.scrollLeft() + (i + g - m)) : (i > m && n > p && t > f || f > t && p > n) && l.scrollLeft(l.scrollLeft() + (t - f))
                },
                _timeSlots: function() {
                    return this._slots && this._slots.length ? this._slots[this._slots.length - 1] : []
                },
                _headers: function(e) {
                    var t, n, i, r, o, a, c, d, u = [],
                        h = H.styles;
                    for (o = 0, a = e.length; a > o; o++) {
                        for (t = e[o], n = [], c = 0, d = t.length; d > c; c++) i = t[c], r = l(i.text), n.push(s("th", {
                            colspan: i.span,
                            className: h.header + (i.isNonWorking ? " " + h.nonWorking : "")
                        }, [r]));
                        u.push(s("tr", null, n))
                    }
                    return u
                },
                _hours: function(e, t) {
                    var n, i, r, o = [],
                        a = this.options,
                        s = a.workDayStart.getHours(),
                        l = a.workDayEnd.getHours(),
                        c = a.hourSpan;
                    for (e = new Date(e), t = new Date(t); t > e;) n = new Date(e), r = n.getHours(), i = r >= s && l > r, n.setHours(n.getHours() + c), r == n.getHours() && n.setHours(n.getHours() + 2 * c), (!a.showWorkHours || i) && o.push({
                        start: e,
                        end: n,
                        isNonWorking: !i,
                        span: 1
                    }), e = n;
                    return o
                },
                _days: function(e, t) {
                    var n, i, r = [];
                    for (e = new Date(e), t = new Date(t); t > e;) n = kendo.date.nextDay(e), i = this._isWorkDay(e), (!this.options.showWorkDays || i) && r.push({
                        start: e,
                        end: n,
                        isNonWorking: !i,
                        span: 1
                    }), e = n;
                    return r
                },
                _weeks: function(e, t) {
                    var n, i, r, o = [],
                        a = this.calendarInfo().firstDay;
                    for (e = new Date(e), t = new Date(t); t > e;) n = kendo.date.dayOfWeek(kendo.date.addDays(e, 1), a, 1), n > t && (n = t), i = this._days(e, n), r = i.length, r > 0 && o.push({
                        start: i[0].start,
                        end: i[r - 1].end,
                        span: r
                    }), e = n;
                    return o
                },
                _months: function(e, t) {
                    var n, i, r, o = [];
                    for (e = new Date(e), t = new Date(t); t > e;) n = new Date(e), n.setMonth(n.getMonth() + 1), i = this._days(e, n), r = i.length, r > 0 && o.push({
                        start: i[0].start,
                        end: i[r - 1].end,
                        span: r
                    }), e = n;
                    return o
                },
                _years: function(e, t) {
                    var n, i = [];
                    for (e = new Date(e), t = new Date(t); t > e;) n = new Date(e), n.setFullYear(n.getFullYear() + 1), i.push({
                        start: e,
                        end: n,
                        span: 12
                    }), e = n;
                    return i
                },
                _slotHeaders: function(e, t) {
                    var n, i, r, o = [];
                    for (i = 0, r = e.length; r > i; i++) n = e[i], o.push({
                        text: t(n),
                        isNonWorking: !!n.isNonWorking,
                        span: n.span
                    });
                    return o
                },
                _isWorkDay: function(e) {
                    var t, n, i = e.getDay(),
                        r = this._workDays;
                    for (t = 0, n = r.length; n > t; t++)
                        if (r[t] === i) return !0;
                    return !1
                },
                calendarInfo: function() {
                    return kendo.getCulture().calendars.standard
                },
                _renderCurrentTime: function() {
                    var t, n = this._getCurrentTime(),
                        i = this._offset(n),
                        r = e("<div class='k-current-time'></div>"),
                        o = H.styles,
                        a = e(S + o.tasksWrapper),
                        s = e(S + o.tasksTable);
                    this.content && this._timeSlots().length && (this.content.find(".k-current-time").remove(), t = this._timeSlots()[this._slotIndex("start", n)], t.start > n || n > t.end || (a.length && s.length && (i += s.offset().left - a.offset().left), r.css({
                        left: i + "px",
                        top: "0px",
                        width: "1px",
                        height: this._contentHeight + "px"
                    }).appendTo(this.content)))
                },
                _getCurrentTime: function() {
                    return new Date
                },
                _currentTime: function() {
                    var e = this.options.currentTimeMarker;
                    e !== !1 && void 0 !== e.updateInterval && (this._renderCurrentTime(), this._currentTimeUpdateTimer = setInterval(h(this._renderCurrentTime, this), e.updateInterval))
                }
            });
        u(!0, H, {
            styles: L
        }), kendo.ui.GanttDayView = H.extend({
            name: "day",
            options: {
                timeHeaderTemplate: T,
                dayHeaderTemplate: D,
                resizeTooltipFormat: "h:mm tt ddd, MMM d"
            },
            range: function(e) {
                this.start = kendo.date.getDate(e.start), this.end = kendo.date.getDate(e.end), (kendo.date.getMilliseconds(e.end) > 0 || this.end.getTime() === this.start.getTime()) && (this.end = kendo.date.addDays(this.end, 1))
            },
            _createSlots: function() {
                var e, t, n, i, r = [],
                    o = this._days(this.start, this.end),
                    a = [];
                for (n = 0, i = o.length; i > n; n++) e = o[n], t = this._hours(e.start, e.end), e.span = t.length, a.push.apply(a, t);
                return r.push(o), r.push(a), r
            },
            _layout: function() {
                var e = [],
                    t = this.options;
                return e.push(this._slotHeaders(this._slots[0], kendo.template(t.dayHeaderTemplate))), e.push(this._slotHeaders(this._slots[1], kendo.template(t.timeHeaderTemplate))), e
            }
        }), kendo.ui.GanttWeekView = H.extend({
            name: "week",
            options: {
                dayHeaderTemplate: D,
                weekHeaderTemplate: A,
                resizeTooltipFormat: "h:mm tt ddd, MMM d"
            },
            range: function(e) {
                var t = this.calendarInfo(),
                    n = t.firstDay,
                    i = e.end;
                n === i.getDay() && i.setDate(i.getDate() + 7), this.start = kendo.date.getDate(kendo.date.dayOfWeek(e.start, n, -1)), this.end = kendo.date.getDate(kendo.date.dayOfWeek(i, n, 1))
            },
            _createSlots: function() {
                var e = [];
                return e.push(this._weeks(this.start, this.end)), e.push(this._days(this.start, this.end)), e
            },
            _layout: function() {
                var e = [],
                    t = this.options;
                return e.push(this._slotHeaders(this._slots[0], kendo.template(t.weekHeaderTemplate))), e.push(this._slotHeaders(this._slots[1], kendo.template(t.dayHeaderTemplate))), e
            }
        }), kendo.ui.GanttMonthView = H.extend({
            name: "month",
            options: {
                weekHeaderTemplate: A,
                monthHeaderTemplate: E,
                resizeTooltipFormat: "dddd, MMM d, yyyy"
            },
            range: function(e) {
                this.start = kendo.date.firstDayOfMonth(e.start), this.end = kendo.date.addDays(kendo.date.getDate(kendo.date.lastDayOfMonth(e.end)), 1)
            },
            _createSlots: function() {
                var e = [];
                return e.push(this._months(this.start, this.end)), e.push(this._weeks(this.start, this.end)), e
            },
            _layout: function() {
                var e = [],
                    t = this.options;
                return e.push(this._slotHeaders(this._slots[0], kendo.template(t.monthHeaderTemplate))), e.push(this._slotHeaders(this._slots[1], kendo.template(t.weekHeaderTemplate))), e
            }
        }), kendo.ui.GanttYearView = H.extend({
            name: "year",
            options: {
                yearHeaderTemplate: F,
                monthHeaderTemplate: E,
                resizeTooltipFormat: "dddd, MMM d, yyyy"
            },
            range: function(e) {
                this.start = kendo.date.firstDayOfMonth(new Date(e.start.setMonth(0))), this.end = kendo.date.firstDayOfMonth(new Date(e.end.setMonth(12)))
            },
            _createSlots: function() {
                var t = [],
                    n = this._months(this.start, this.end);
                return e(n).each(function(e, t) {
                    t.span = 1
                }), t.push(this._years(this.start, this.end)), t.push(n), t
            },
            _layout: function() {
                var e = [],
                    t = this.options;
                return e.push(this._slotHeaders(this._slots[0], kendo.template(t.yearHeaderTemplate))), e.push(this._slotHeaders(this._slots[1], kendo.template(t.monthHeaderTemplate))), e
            }
        }), r = {
            wrapper: "k-timeline k-grid k-widget",
            gridHeader: "k-grid-header",
            gridHeaderWrap: "k-grid-header-wrap",
            gridContent: "k-grid-content",
            gridContentWrap: "k-grid-content",
            tasksWrapper: "k-gantt-tables",
            dependenciesWrapper: "k-gantt-dependencies",
            task: "k-task",
            line: "k-line",
            taskResizeHandle: "k-resize-handle",
            taskResizeHandleWest: "k-resize-w",
            taskDragHandle: "k-task-draghandle",
            taskComplete: "k-task-complete",
            taskDelete: "k-task-delete",
            taskWrapActive: "k-task-wrap-active",
            taskWrap: "k-task-wrap",
            taskDot: "k-task-dot",
            taskDotStart: "k-task-start",
            taskDotEnd: "k-task-end",
            hovered: "k-state-hover",
            selected: "k-state-selected",
            origin: "k-origin"
        }, o = kendo.ui.GanttTimeline = a.extend({
            init: function(e, t) {
                a.fn.init.call(this, e, t), this.options.views && this.options.views.length || (this.options.views = ["day", "week", "month"]), p = kendo.support.isRtl(e), this._wrapper(), this._domTrees(), this._views(), this._selectable(), this._draggable(), this._resizable(), this._percentResizeDraggable(), this._createDependencyDraggable(), this._attachEvents(), this._tooltip()
            },
            options: {
                name: "GanttTimeline",
                messages: {
                    views: {
                        day: "Day",
                        week: "Week",
                        month: "Month",
                        year: "Year",
                        start: "Start",
                        end: "End"
                    }
                },
                snap: !0,
                selectable: !0,
                editable: !0
            },
            destroy: function() {
                a.fn.destroy.call(this), clearTimeout(this._tooltipTimeout), this._currentTimeUpdateTimer && clearInterval(this._currentTimeUpdateTimer), this._unbindView(this._selectedView), this._moveDraggable && this._moveDraggable.destroy(), this._resizeDraggable && this._resizeDraggable.destroy(), this._percentDraggable && this._percentDraggable.destroy(), this._dependencyDraggable && this._dependencyDraggable.destroy(), this.touch && this.touch.destroy(), this._headerTree = null, this._taskTree = null, this._dependencyTree = null, this.wrapper.off(_), kendo.destroy(this.wrapper)
            },
            _wrapper: function() {
                var t = o.styles,
                    n = this,
                    i = this.options,
                    r = function() {
                        var r, o, a = typeof i.rowHeight === v ? i.rowHeight : i.rowHeight + "px",
                            s = e(kendo.format(z, a)),
                            l = n.wrapper.find(S + t.tasksWrapper);
                        return l.append(s), r = s.find("tr").outerHeight(), o = s.find("td").height(), s.remove(), {
                            row: r,
                            cell: o
                        }
                    };
                this.wrapper = this.element.addClass(t.wrapper).append("<div class='" + t.gridHeader + "'><div class='" + t.gridHeaderWrap + "'></div></div>").append("<div class='" + t.gridContentWrap + "'><div class='" + t.tasksWrapper + "'></div><div class='" + t.dependenciesWrapper + "'></div></div>"), i.rowHeight && (this._calculatedSize = r())
            },
            _domTrees: function() {
                var e = o.styles,
                    t = kendo.dom.Tree,
                    n = this.wrapper;
                this._headerTree = new t(n.find(S + e.gridHeaderWrap)[0]), this._taskTree = new t(n.find(S + e.tasksWrapper)[0]), this._dependencyTree = new t(n.find(S + e.dependenciesWrapper)[0])
            },
            _views: function() {
                var e, t, n, i, r, o, a, s = this.options.views;
                for (this.views = {}, o = 0, a = s.length; a > o; o++) e = s[o], t = d(e), t && e.selectable === !1 || (n = t ? "string" != typeof e.type ? e.title : e.type : e, i = B[n], i && (t && (e.type = i.type), i.title = this.options.messages.views[n]), e = u({
                    title: n
                }, i, t ? e : {}), n && (this.views[n] = e, (!r || e.selected) && (r = n)));
                r && (this._selectedViewName = r)
            },
            view: function(e) {
                return e && (this._selectView(e), this.trigger("navigate", {
                    view: e,
                    action: "changeView"
                })), this._selectedView
            },
            _selectView: function(e) {
                e && this.views[e] && (this._selectedView && this._unbindView(this._selectedView), this._selectedView = this._initializeView(e), this._selectedViewName = e)
            },
            _viewByIndex: function(e) {
                var t, n = this.views;
                for (t in n) {
                    if (!e) return t;
                    e--
                }
            },
            _initializeView: function(e) {
                var n, i = this.views[e];
                if (i) {
                    if (n = i.type, "string" == typeof n && (n = kendo.getter(i.type)(window)), !n) throw Error("There is no such view");
                    i = new n(this.wrapper, t(u(!0, {
                        headerTree: this._headerTree,
                        taskTree: this._taskTree,
                        dependencyTree: this._dependencyTree,
                        calculatedSize: this._calculatedSize
                    }, i, this.options)))
                }
                return i
            },
            _unbindView: function(e) {
                e && e.destroy()
            },
            _range: function(e) {
                var t, n, i = {
                        field: "start",
                        dir: "asc"
                    },
                    r = {
                        field: "end",
                        dir: "desc"
                    };
                return e && e.length ? (t = new g(e).sort(i).toArray()[0].start || new Date, n = new g(e).sort(r).toArray()[0].end || new Date, {
                    start: new Date(t),
                    end: new Date(n)
                }) : {
                    start: new Date,
                    end: new Date
                }
            },
            _render: function(e) {
                var t = this.view(),
                    n = this._range(e);
                this._tasks = e, t.range(n), t.renderLayout(), t.render(e)
            },
            _renderDependencies: function(e) {
                this.view()._renderDependencies(e)
            },
            _taskByUid: function(e) {
                var t, n, i = this._tasks,
                    r = i.length;
                for (n = 0; r > n; n++)
                    if (t = i[n], t.uid === e) return t
            },
            _draggable: function() {
                var e, t, n, r, a = this,
                    s = this.options.snap,
                    l = o.styles,
                    c = function() {
                        a.view()._removeDragHint(), e && e.css("opacity", 1), e = null, t = null, a.dragInProgress = !1
                    };
                this.options.editable && (this._moveDraggable = new kendo.ui.Draggable(this.wrapper, {
                    distance: 0,
                    filter: S + l.task,
                    holdToDrag: kendo.support.mobileOS,
                    ignore: S + l.taskResizeHandle
                }), this._moveDraggable.bind("dragstart", function(i) {
                    var o = a.view();
                    return e = i.currentTarget.parent(), t = a._taskByUid(i.currentTarget.attr("data-uid")), a.trigger("moveStart", {
                        task: t
                    }) ? void i.preventDefault() : (n = t.start, r = o._timeByPosition(i.x.location, s) - n, o._createDragHint(e), e.css("opacity", .5), clearTimeout(a._tooltipTimeout), void(a.dragInProgress = !0))
                }).bind("drag", kendo.throttle(function(e) {
                    var i, o, l;
                    a.dragInProgress && (i = a.view(), o = new Date(i._timeByPosition(e.x.location, s) - r), l = o, a.trigger("move", {
                        task: t,
                        start: o
                    }) || (n = o, p && (l = new Date(n.getTime() + t.duration())), i._updateDragHint(l)))
                }, 15)).bind("dragend", function() {
                    a.trigger("moveEnd", {
                        task: t,
                        start: n
                    }), c()
                }).bind("dragcancel", function() {
                    c()
                }).userEvents.bind("select", function() {
                    i()
                }))
            },
            _resizable: function() {
                var e, t, n, r, a, s = this,
                    l = this.options.snap,
                    c = o.styles,
                    d = function() {
                        s.view()._removeResizeHint(), e = null, t = null, s.dragInProgress = !1
                    };
                this.options.editable && (this._resizeDraggable = new kendo.ui.Draggable(this.wrapper, {
                    distance: 0,
                    filter: S + c.taskResizeHandle,
                    holdToDrag: !1
                }), this._resizeDraggable.bind("dragstart", function(i) {
                    return a = i.currentTarget.hasClass(c.taskResizeHandleWest), p && (a = !a), e = i.currentTarget.closest(S + c.task), t = s._taskByUid(e.attr("data-uid")), s.trigger("resizeStart", {
                        task: t
                    }) ? void i.preventDefault() : (n = t.start, r = t.end, s.view()._createResizeHint(t), clearTimeout(s._tooltipTimeout), void(s.dragInProgress = !0))
                }).bind("drag", kendo.throttle(function(e) {
                    var i, o;
                    s.dragInProgress && (i = s.view(), o = i._timeByPosition(e.x.location, l, !a), a ? n = r > o ? o : r : r = o > n ? o : n, s.trigger("resize", {
                        task: t,
                        start: n,
                        end: r
                    }) || i._updateResizeHint(n, r, a))
                }, 15)).bind("dragend", function() {
                    s.trigger("resizeEnd", {
                        task: t,
                        resizeStart: a,
                        start: n,
                        end: r
                    }), d()
                }).bind("dragcancel", function() {
                    d()
                }).userEvents.bind("select", function() {
                    i()
                }))
            },
            _percentResizeDraggable: function() {
                var e, t, n, r, a, s, l, c, d, u, h = this,
                    f = o.styles,
                    m = function() {
                        h.view()._removePercentCompleteTooltip(), t = null, e = null, h.dragInProgress = !1
                    },
                    g = function(e) {
                        t.find(S + f.taskComplete).width(e).end().siblings(S + f.taskDragHandle).css(p ? "right" : "left", e)
                    };
                this.options.editable && (this._percentDraggable = new kendo.ui.Draggable(this.wrapper, {
                    distance: 0,
                    filter: S + f.taskDragHandle,
                    holdToDrag: !1
                }), this._percentDraggable.bind("dragstart", function(i) {
                    return h.trigger("percentResizeStart") ? void i.preventDefault() : (t = i.currentTarget.siblings(S + f.task),
                        e = h._taskByUid(t.attr("data-uid")), l = e.percentComplete, n = t.offset(), r = this.element.offset(), a = t.find(S + f.taskComplete).width(), s = t.outerWidth(), clearTimeout(h._tooltipTimeout), void(h.dragInProgress = !0))
                }).bind("drag", kendo.throttle(function(e) {
                    if (h.dragInProgress) {
                        u = p ? -e.x.initialDelta : e.x.initialDelta;
                        var t = Math.max(0, Math.min(s, a + u));
                        l = Math.round(t / s * 100), g(t), c = n.top - r.top, d = n.left + t - r.left, p && (d += s - 2 * t), h.view()._updatePercentCompleteTooltip(c, d, l)
                    }
                }, 15)).bind("dragend", function() {
                    h.trigger("percentResizeEnd", {
                        task: e,
                        percentComplete: l / 100
                    }), m()
                }).bind("dragcancel", function() {
                    g(a), m()
                }).userEvents.bind("select", function() {
                    i()
                }))
            },
            _createDependencyDraggable: function() {
                var t, n, r, a = this,
                    s = e(),
                    l = e(),
                    c = f.msie && 9 > f.version,
                    d = o.styles,
                    u = function() {
                        t.css("display", "").removeClass(d.hovered), t.parent().removeClass(d.origin), t = null, h(!1), l = e(), s = e(), a.view()._removeDependencyDragHint(), a.dragInProgress = !1
                    },
                    h = function(e) {
                        l.hasClass(d.origin) || (l.find(S + d.taskDot).css("display", e ? "block" : ""), s.toggleClass(d.hovered, e))
                    };
                this.options.editable && (c && document.namespaces && document.namespaces.add("kvml", "urn:schemas-microsoft-com:vml", "#default#VML"), this._dependencyDraggable = new kendo.ui.Draggable(this.wrapper, {
                    distance: 0,
                    filter: S + d.taskDot,
                    holdToDrag: !1
                }), this._dependencyDraggable.bind("dragstart", function(e) {
                    var i, o;
                    return a.trigger("dependencyDragStart") ? void e.preventDefault() : (t = e.currentTarget.css("display", "block").addClass(d.hovered), t.parent().addClass(d.origin), i = t.offset(), o = a.wrapper.find(S + d.tasksWrapper).offset(), n = Math.round(i.left - o.left + t.outerHeight() / 2), r = Math.round(i.top - o.top + t.outerWidth() / 2), clearTimeout(a._tooltipTimeout), void(a.dragInProgress = !0))
                }).bind("drag", kendo.throttle(function(t) {
                    var i, o, u, f;
                    a.dragInProgress && (a.view()._removeDependencyDragHint(), i = e(kendo.elementUnderCursor(t)), o = a.wrapper.find(S + d.tasksWrapper).offset(), u = t.x.location - o.left, f = t.y.location - o.top, a.view()._updateDependencyDragHint({
                        x: n,
                        y: r
                    }, {
                        x: u,
                        y: f
                    }, c), h(!1), s = i.hasClass(d.taskDot) ? i : e(), l = i.closest(S + d.taskWrap), h(!0))
                }, 15)).bind("dragend", function() {
                    var e, n, i, r, o;
                    s.length && (e = t.hasClass(d.taskDotStart), n = s.hasClass(d.taskDotStart), i = e ? n ? 3 : 2 : n ? 1 : 0, r = a._taskByUid(t.siblings(S + d.task).attr("data-uid")), o = a._taskByUid(s.siblings(S + d.task).attr("data-uid")), r !== o && a.trigger("dependencyDragEnd", {
                        type: i,
                        predecessor: r,
                        successor: o
                    })), u()
                }).bind("dragcancel", function() {
                    u()
                }).userEvents.bind("select", function() {
                    i()
                }))
            },
            _selectable: function() {
                var t = this,
                    n = o.styles;
                this.options.selectable && this.wrapper.on(b + _, S + n.task, function(n) {
                    n.stopPropagation(), n.ctrlKey ? t.trigger("clear") : t.trigger("select", {
                        uid: e(this).attr("data-uid")
                    })
                }).on(b + _, S + n.taskWrap, function(t) {
                    t.stopPropagation(), e(this).css("z-index", "0");
                    var i = e(document.elementFromPoint(t.clientX, t.clientY));
                    i.hasClass(n.line) && i.click(), e(this).css("z-index", "")
                }).on(b + _, S + n.tasksWrapper, function() {
                    t.selectDependency().length > 0 ? t.clearSelection() : t.trigger("clear")
                }).on(b + _, S + n.line, function(e) {
                    e.stopPropagation(), t.selectDependency(this)
                })
            },
            select: function(e) {
                var t = this.wrapper.find(e),
                    n = o.styles;
                return t.length ? (this.clearSelection(), t.addClass(n.selected), void(kendo.support.mobileOS && t.parent().addClass(n.taskWrapActive))) : this.wrapper.find(S + n.task + S + n.selected)
            },
            selectDependency: function(t) {
                var n, i = this.wrapper.find(t),
                    r = o.styles;
                return i.length ? (this.clearSelection(), this.trigger("clear"), n = e(i).attr("data-uid"), void this.wrapper.find(S + r.line + "[data-uid='" + n + "']").addClass(r.selected)) : this.wrapper.find(S + r.line + S + r.selected)
            },
            clearSelection: function() {
                var e = o.styles;
                this.wrapper.find(S + e.selected).removeClass(e.selected), kendo.support.mobileOS && this.wrapper.find(S + e.taskWrapActive).removeClass(e.taskWrapActive)
            },
            _attachEvents: function() {
                var t = this,
                    n = o.styles;
                this.options.editable && (this._tabindex(), this.wrapper.on(b + _, S + n.taskDelete, function(i) {
                    t.trigger("removeTask", {
                        uid: e(this).closest(S + n.task).attr("data-uid")
                    }), i.stopPropagation(), i.preventDefault()
                }).on(C + _, function(e) {
                    var n;
                    e.keyCode === m.DELETE && (n = t.selectDependency(), n.length && (t.trigger("removeDependency", {
                        uid: n.attr("data-uid")
                    }), t.clearSelection()))
                }), kendo.support.mobileOS ? this.touch = this.wrapper.kendoTouch({
                    filter: S + n.task,
                    doubletap: function(n) {
                        t.trigger("editTask", {
                            uid: e(n.touch.currentTarget).attr("data-uid")
                        })
                    }
                }).data("kendoTouch") : this.wrapper.on(w + _, S + n.task, function(n) {
                    t.trigger("editTask", {
                        uid: e(this).attr("data-uid")
                    }), n.stopPropagation(), n.preventDefault()
                }))
            },
            _tooltip: function() {
                var t, n = this,
                    i = this.options.tooltip,
                    r = o.styles,
                    a = function(e) {
                        t = e.clientX
                    };
                i && i.visible === !1 || (kendo.support.mobileOS ? (this.wrapper.on(b + _, S + r.taskDelete, function(e) {
                    e.stopPropagation(), n.view()._removeTaskTooltip()
                }).on(x + _, S + r.task, function(t) {
                    var i = e(t.relatedTarget).parents(S + r.taskWrap, S + r.task);
                    0 === i.length && n.view()._removeTaskTooltip()
                }), this.touch.bind("tap", function(t) {
                    var i = t.touch.target,
                        r = n._taskByUid(e(i).attr("data-uid")),
                        o = t.touch.x.client;
                    n.view()._taskTooltip && n.view()._removeTaskTooltip(), n.view()._createTaskTooltip(r, i, o)
                }).bind("doubletap", function() {
                    n.view()._removeTaskTooltip()
                })) : this.wrapper.on(k + _, S + r.task, function() {
                    var i = this,
                        r = n._taskByUid(e(this).attr("data-uid"));
                    n.dragInProgress || (n._tooltipTimeout = setTimeout(function() {
                        n.view()._createTaskTooltip(r, i, t)
                    }, 800), e(this).on(y, a))
                }).on(x + _, S + r.task, function() {
                    clearTimeout(n._tooltipTimeout), n.view()._removeTaskTooltip(), e(this).off(y, a)
                }))
            }
        }), u(!0, o, {
            styles: r
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.gantt.min", ["kendo.data.min", "kendo.popup.min", "kendo.window.min", "kendo.resizable.min", "kendo.gantt.list.min", "kendo.gantt.timeline.min", "kendo.grid.min", "kendo.pdf.min"], e)
}(function() {
    return function(e, t) {
        function n(e) {
            return "[" + m.attr("uid") + (e ? "='" + e + "']" : "]")
        }

        function i(e) {
            return delete e.name, delete e.prefix, delete e.remove, delete e.edit, delete e.add, delete e.navigate, e
        }

        function r(e) {
            var t, n, i, r, o, a;
            if (e.filter("[name=end], [name=start]").length) {
                for (t = e.attr("name"), n = m.widgetInstance(e, m.ui), i = {}, r = e; r !== window && !o;) r = r.parent(), o = r.data("kendoEditable");
                return (a = o ? o.options.model : null) ? (i.start = a.start, i.end = a.end, i[t] = n ? n.value() : m.parseDate(e.value()), i.end >= i.start) : !0
            }
            return !0
        }

        function o(t, n) {
            var i = t.parents("[" + m.attr("role") + '="gantt"]'),
                r = [],
                o = a(i);
            t.attr(B, 0), n && o.each(function(t, n) {
                r[t] = e(n).scrollTop()
            });
            try {
                t[0].setActive()
            } catch (s) {
                t[0].focus()
            }
            n && o.each(function(t, n) {
                e(n).scrollTop(r[t])
            })
        }

        function a(t) {
            return e(t).parentsUntil("body").filter(function(e, t) {
                var n = m.getComputedStyles(t, ["overflow"]);
                return "visible" != n.overflow
            }).add(window)
        }
        var s, l, c, d, u, h, f, p, m = window.kendo,
            g = "matchMedia" in window,
            v = m.support.browser,
            _ = m.support.mobileOS,
            b = m.Observable,
            w = m.ui.Widget,
            y = m.data.DataSource,
            k = m.data.ObservableObject,
            x = m.data.ObservableArray,
            C = m.data.Query,
            S = e.isArray,
            T = e.inArray,
            D = m.isFunction,
            A = e.proxy,
            E = e.extend,
            F = e.isPlainObject,
            I = e.map,
            M = m.keys,
            R = 3,
            P = ".kendoGantt",
            z = "p0",
            B = "tabIndex",
            L = "click",
            H = "width",
            N = "string",
            O = {
                down: {
                    origin: "bottom left",
                    position: "top left"
                },
                up: {
                    origin: "top left",
                    position: "bottom left"
                }
            },
            V = "aria-activedescendant",
            U = "gantt_active_cell",
            W = "action-option-focused",
            j = ".",
            q = "Are you sure you want to delete this task?",
            G = "Are you sure you want to delete this dependency?",
            $ = m.template('<button class="#=styles.buttonToggle#"><span class="#=styles.iconToggle#">&nbps;</span></button>'),
            Y = '<button class="#=styles.button# #=className#" #if (action) {#data-action="#=action#"#}#><span class="#=iconClass#"></span><span>#=text#</span></button>',
            K = '<a class="#=className#" #=attr# href="\\#">#=text#</a>',
            Q = m.template('<li class="#=styles.currentView# #=styles.viewButtonDefault#"><a href="\\#" class="#=styles.link#">&nbps;</a></li>'),
            X = m.template('<ul class="#=styles.viewsWrapper#">#for(var view in views){#<li class="#=styles.viewButtonDefault# #=styles.viewButton#-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a href="\\#" class="#=styles.link#">#=views[view].title#</a></li>#}#</ul>'),
            J = m.template('<div class="#=styles.popupWrapper#"><ul class="#=styles.popupList#" role="listbox">#for(var i = 0, l = actions.length; i < l; i++){#<li class="#=styles.item#" data-action="#=actions[i].data#" role="option">#=actions[i].text#</span>#}#</ul></div>'),
            Z = function(t, n) {
                var i = {
                        name: n.field
                    },
                    r = n.model.fields[n.field].validation;
                r && F(r) && r.message && (i[m.attr("dateCompare-msg")] = r.message), e('<input type="text" required ' + m.attr("type") + '="date" ' + m.attr("role") + '="datetimepicker" ' + m.attr("bind") + '="value:' + n.field + '" ' + m.attr("validate") + "='true' />").attr(i).appendTo(t), e("<span " + m.attr("for") + '="' + n.field + '" class="k-invalid-msg"/>').hide().appendTo(t)
            },
            ee = function(t, n) {
                e('<a href="#" class="' + n.styles.button + '">' + n.messages.assignButton + "</a>").click(n.click).appendTo(t)
            },
            te = {
                wrapper: "k-widget k-gantt",
                rowHeight: "k-gantt-rowheight",
                listWrapper: "k-gantt-layout k-gantt-treelist",
                list: "k-gantt-treelist",
                timelineWrapper: "k-gantt-layout k-gantt-timeline",
                timeline: "k-gantt-timeline",
                splitBarWrapper: "k-splitbar k-state-default k-splitbar-horizontal k-splitbar-draggable-horizontal k-gantt-layout",
                splitBar: "k-splitbar",
                splitBarHover: "k-splitbar-horizontal-hover",
                popupWrapper: "k-list-container",
                popupList: "k-list k-reset",
                resizeHandle: "k-resize-handle",
                icon: "k-icon",
                item: "k-item",
                line: "k-line",
                buttonDelete: "k-gantt-delete",
                buttonCancel: "k-gantt-cancel",
                buttonSave: "k-gantt-update",
                buttonToggle: "k-gantt-toggle",
                primary: "k-primary",
                hovered: "k-state-hover",
                selected: "k-state-selected",
                focused: "k-state-focused",
                gridHeader: "k-grid-header",
                gridHeaderWrap: "k-grid-header-wrap",
                gridContent: "k-grid-content",
                popup: {
                    form: "k-popup-edit-form",
                    editForm: "k-gantt-edit-form",
                    formContainer: "k-edit-form-container",
                    resourcesFormContainer: "k-resources-form-container",
                    message: "k-popup-message",
                    buttonsContainer: "k-edit-buttons k-state-default",
                    button: "k-button",
                    editField: "k-edit-field",
                    editLabel: "k-edit-label",
                    resourcesField: "k-gantt-resources"
                },
                toolbar: {
                    headerWrapper: "k-floatwrap k-header k-gantt-toolbar",
                    footerWrapper: "k-floatwrap k-header k-gantt-toolbar",
                    toolbar: "k-gantt-toolbar",
                    expanded: "k-state-expanded",
                    views: "k-gantt-views",
                    viewsWrapper: "k-reset k-header k-gantt-views",
                    actions: "k-gantt-actions",
                    button: "k-button k-button-icontext",
                    buttonToggle: "k-button k-button-icon k-gantt-toggle",
                    iconPlus: "k-icon k-i-plus",
                    iconPdf: "k-icon k-i-pdf",
                    iconToggle: "k-icon k-i-gantt-toggle",
                    viewButtonDefault: "k-state-default",
                    viewButton: "k-view",
                    currentView: "k-current-view",
                    link: "k-link",
                    pdfButton: "k-gantt-pdf",
                    appendButton: "k-gantt-create"
                }
            },
            ne = b.extend({
                init: function(e, t) {
                    b.fn.init.call(this), this.element = e, this.options = E(!0, {}, this.options, t), this._popup()
                },
                options: {
                    direction: "down",
                    navigatable: !1
                },
                _current: function(e) {
                    var t = p.styles,
                        n = this.list.find(j + t.focused),
                        i = n[e]();
                    i.length && (n.removeClass(t.focused).removeAttr("id"), i.addClass(t.focused).attr("id", W), this.list.find("ul").removeAttr(V).attr(V, W))
                },
                _popup: function() {
                    var t = this,
                        n = p.styles,
                        i = "li" + j + n.item,
                        r = j + n.toolbar.appendButton,
                        o = this.options.messages.actions,
                        a = this.options.navigatable;
                    this.list = e(J({
                        styles: n,
                        actions: [{
                            data: "add",
                            text: o.addChild
                        }, {
                            data: "insert-before",
                            text: o.insertBefore
                        }, {
                            data: "insert-after",
                            text: o.insertAfter
                        }]
                    })), this.element.append(this.list), this.popup = new m.ui.Popup(this.list, E({
                        anchor: this.element.find(r),
                        open: function() {
                            t._adjustListWidth()
                        },
                        animation: this.options.animation
                    }, O[this.options.direction])), this.element.on(L + P, r, function(i) {
                        var r = e(this),
                            o = r.attr(m.attr("action"));
                        i.preventDefault(), o ? t.trigger("command", {
                            type: o
                        }) : (t.popup.open(), a && t.list.find("li:first").addClass(n.focused).attr("id", W).end().find("ul").attr({
                            TABINDEX: 0,
                            "aria-activedescendant": W
                        }).focus())
                    }), this.list.find(i).hover(function() {
                        e(this).addClass(n.hovered)
                    }, function() {
                        e(this).removeClass(n.hovered)
                    }).end().on(L + P, i, function() {
                        t.trigger("command", {
                            type: e(this).attr(m.attr("action"))
                        }), t.popup.close()
                    }), a && (this.popup.bind("close", function() {
                        t.list.find(i).removeClass(n.focused).end().find("ul").attr(B, 0), t.element.parents("[" + m.attr("role") + '="gantt"]').find(j + n.gridContent + " > table:first").focus()
                    }), this.list.find("ul").on("keydown" + P, function(e) {
                        var i = e.keyCode;
                        switch (i) {
                            case M.UP:
                                e.preventDefault(), t._current("prev");
                                break;
                            case M.DOWN:
                                e.preventDefault(), t._current("next");
                                break;
                            case M.ENTER:
                                t.list.find(j + n.focused).click();
                                break;
                            case M.ESC:
                                e.preventDefault(), t.popup.close()
                        }
                    }))
                },
                _adjustListWidth: function() {
                    var e, t, n = this.list,
                        i = p.styles,
                        r = n[0].style.width,
                        o = this.element.find(j + i.toolbar.appendButton),
                        a = n.outerWidth();
                    (n.data(H) || !r) && (e = window.getComputedStyle ? window.getComputedStyle(o[0], null) : 0, t = e ? parseFloat(e.width) : o.outerWidth(), e && (v.mozilla || v.msie) && (t += parseFloat(e.paddingLeft) + parseFloat(e.paddingRight) + parseFloat(e.borderLeftWidth) + parseFloat(e.borderRightWidth)), r = "border-box" !== n.css("box-sizing") ? t - (n.outerWidth() - n.width()) : t, a > r && (r = a), n.css({
                        fontFamily: o.css("font-family"),
                        width: r
                    }).data(H, r))
                },
                destroy: function() {
                    clearTimeout(this._focusTimeout), this.popup.destroy(), this.element.off(P), this.list.off(P), this.unbind()
                }
            }),
            ie = function(e, t) {
                return function(n) {
                    var i, r;
                    if (n = S(n) ? {
                        data: n
                    } : n, i = n || {}, r = i.data, i.data = r, !(i instanceof e) && i instanceof y) throw Error("Incorrect DataSource type. Only " + t + " instances are supported");
                    return i instanceof e ? i : new e(i)
                }
            },
            re = m.data.Model.define({
                id: "id",
                fields: {
                    id: {
                        type: "number"
                    },
                    predecessorId: {
                        type: "number"
                    },
                    successorId: {
                        type: "number"
                    },
                    type: {
                        type: "number"
                    }
                }
            }),
            oe = y.extend({
                init: function(e) {
                    y.fn.init.call(this, E(!0, {}, {
                        schema: {
                            modelBase: re,
                            model: re
                        }
                    }, e))
                },
                successors: function(e) {
                    return this._dependencies("predecessorId", e)
                },
                predecessors: function(e) {
                    return this._dependencies("successorId", e)
                },
                dependencies: function(e) {
                    var t = this.predecessors(e),
                        n = this.successors(e);
                    return t.push.apply(t, n), t
                },
                _dependencies: function(e, t) {
                    var n = this.view(),
                        i = {
                            field: e,
                            operator: "eq",
                            value: t
                        };
                    return n = new C(n).filter(i).toArray()
                }
            });
        oe.create = ie(oe, "GanttDependencyDataSource"), l = m.data.Model.define({
            duration: function() {
                var e = this.end,
                    t = this.start;
                return e - t
            },
            isMilestone: function() {
                return 0 === this.duration()
            },
            _offset: function(e) {
                var t, n, i = ["start", "end"];
                for (n = 0; i.length > n; n++) t = new Date(this.get(i[n]).getTime() + e), this.set(i[n], t)
            },
            id: "id",
            fields: {
                id: {
                    type: "number"
                },
                parentId: {
                    type: "number",
                    defaultValue: null,
                    validation: {
                        required: !0
                    }
                },
                orderId: {
                    type: "number",
                    validation: {
                        required: !0
                    }
                },
                title: {
                    type: "string",
                    defaultValue: "New task"
                },
                start: {
                    type: "date",
                    validation: {
                        required: !0
                    }
                },
                end: {
                    type: "date",
                    validation: {
                        required: !0,
                        dateCompare: r,
                        message: "End date should be after or equal to the start date"
                    }
                },
                percentComplete: {
                    type: "number",
                    validation: {
                        required: !0,
                        min: 0,
                        max: 1,
                        step: .01
                    }
                },
                summary: {
                    type: "boolean"
                },
                expanded: {
                    type: "boolean",
                    defaultValue: !0
                }
            }
        }), c = y.extend({
            init: function(e) {
                y.fn.init.call(this, E(!0, {}, {
                    schema: {
                        modelBase: l,
                        model: l
                    }
                }, e))
            },
            remove: function(e) {
                var t = e.get("parentId"),
                    n = this.taskAllChildren(e);
                return this._removeItems(n), e = y.fn.remove.call(this, e), this._childRemoved(t, e.get("orderId")), e
            },
            add: function(e) {
                return e ? (e = this._toGanttTask(e), this.insert(this.taskSiblings(e).length, e)) : t
            },
            insert: function(e, n) {
                return n ? (n = this._toGanttTask(n), n.set("orderId", e), n = y.fn.insert.call(this, e, n), this._reorderSiblings(n, this.taskSiblings(n).length - 1), this._resolveSummaryFields(this.taskParent(n)), n) : t
            },
            taskChildren: function(e) {
                var n, i = this.view(),
                    r = {
                        field: "parentId",
                        operator: "eq",
                        value: null
                    },
                    o = this._sort && this._sort.length ? this._sort : {
                        field: "orderId",
                        dir: "asc"
                    };
                if (e) {
                    if (n = e.get("id"), n === t || null === n || "" === n) return [];
                    r.value = n
                }
                return i = new C(i).filter(r).sort(o).toArray()
            },
            taskAllChildren: function(e) {
                var t = [],
                    n = this,
                    i = function(e) {
                        var r = n.taskChildren(e);
                        t.push.apply(t, r), I(r, i)
                    };
                return e ? i(e) : t = this.view(), t
            },
            taskSiblings: function(e) {
                if (!e) return null;
                var t = this.taskParent(e);
                return this.taskChildren(t)
            },
            taskParent: function(e) {
                return e && null !== e.get("parentId") ? this.get(e.parentId) : null
            },
            taskLevel: function(e) {
                for (var t = 0, n = this.taskParent(e); null !== n;) t += 1, n = this.taskParent(n);
                return t
            },
            taskTree: function(e) {
                var t, n, i, r, o = [],
                    a = this.taskChildren(e);
                for (n = 0, i = a.length; i > n; n++) t = a[n], o.push(t), t.get("expanded") && (r = this.taskTree(t), o.push.apply(o, r));
                return o
            },
            update: function(e, n) {
                var i, r, o = this,
                    a = function(e, t) {
                        var n, i, r = o.taskAllChildren(e);
                        for (n = 0, i = r.length; i > n; n++) r[n]._offset(t)
                    },
                    s = function(e) {
                        var t = e.field,
                            n = e.sender;
                        switch (t) {
                            case "start":
                                o._resolveSummaryStart(o.taskParent(n)), a(n, n.get(t).getTime() - i.getTime());
                                break;
                            case "end":
                                o._resolveSummaryEnd(o.taskParent(n));
                                break;
                            case "percentComplete":
                                o._resolveSummaryPercentComplete(o.taskParent(n));
                                break;
                            case "orderId":
                                o._reorderSiblings(n, i)
                        }
                    };
                n.parentId !== t && (i = e.get("parentId"), i !== n.parentId && (e.set("parentId", n.parentId), o._childRemoved(i, e.get("orderId")), e.set("orderId", o.taskSiblings(e).length - 1), o._resolveSummaryFields(o.taskParent(e))), delete n.parentId), e.bind("change", s);
                for (r in n) i = e.get(r), e.set(r, n[r]);
                e.unbind("change", s)
            },
            _resolveSummaryFields: function(e) {
                e && (this._updateSummary(e), this.taskChildren(e).length && (this._resolveSummaryStart(e), this._resolveSummaryEnd(e), this._resolveSummaryPercentComplete(e)))
            },
            _resolveSummaryStart: function(e) {
                var t = this,
                    n = function(e) {
                        var n, i, r, o = t.taskChildren(e),
                            a = o[0].start.getTime();
                        for (i = 1, r = o.length; r > i; i++) n = o[i].start.getTime(), a > n && (a = n);
                        return new Date(a)
                    };
                this._updateSummaryRecursive(e, "start", n)
            },
            _resolveSummaryEnd: function(e) {
                var t = this,
                    n = function(e) {
                        var n, i, r, o = t.taskChildren(e),
                            a = o[0].end.getTime();
                        for (i = 1, r = o.length; r > i; i++) n = o[i].end.getTime(), n > a && (a = n);
                        return new Date(a)
                    };
                this._updateSummaryRecursive(e, "end", n)
            },
            _resolveSummaryPercentComplete: function(e) {
                var t = this,
                    n = function(e) {
                        var n = t.taskChildren(e),
                            i = new C(n).aggregate([{
                                field: "percentComplete",
                                aggregate: "average"
                            }]);
                        return i.percentComplete.average
                    };
                this._updateSummaryRecursive(e, "percentComplete", n)
            },
            _updateSummaryRecursive: function(e, t, n) {
                var i, r;
                e && (i = n(e), e.set(t, i), r = this.taskParent(e), r && this._updateSummaryRecursive(r, t, n))
            },
            _childRemoved: function(e, t) {
                var n, i, r = null === e ? null : this.get(e),
                    o = this.taskChildren(r);
                for (n = t, i = o.length; i > n; n++) o[n].set("orderId", n);
                this._resolveSummaryFields(r)
            },
            _reorderSiblings: function(e, t) {
                var n, i = e.get("orderId"),
                    r = i > t,
                    o = r ? t : i,
                    a = r ? i : t,
                    s = r ? o : o + 1,
                    l = this.taskSiblings(e);
                for (a = Math.min(a, l.length - 1), n = o; a >= n; n++) l[n] !== e && (l[n].set("orderId", s), s += 1)
            },
            _updateSummary: function(e) {
                if (null !== e) {
                    var t = this.taskChildren(e).length;
                    e.set("summary", t > 0)
                }
            },
            _toGanttTask: function(e) {
                if (!(e instanceof l)) {
                    var t = e;
                    e = this._createNewModel(), e.accept(t)
                }
                return e
            }
        }), c.create = ie(c, "GanttDataSource"), E(!0, m.data, {
            GanttDataSource: c,
            GanttTask: l,
            GanttDependencyDataSource: oe,
            GanttDependency: re
        }), d = {
            desktop: {
                dateRange: Z,
                resources: ee
            }
        }, u = m.Observable.extend({
            init: function(e, t) {
                m.Observable.fn.init.call(this), this.element = e, this.options = E(!0, {}, this.options, t), this.createButton = this.options.createButton
            },
            fields: function(t, n) {
                var i, r = this,
                    o = this.options,
                    a = o.messages.editor,
                    s = o.resources,
                    l = function(e) {
                        e.preventDefault(), s.editor(r.container.find(j + p.styles.popup.resourcesField), n)
                    };
                return o.editable.template ? i = e.map(n.fields, function(e, t) {
                    return {
                        field: t
                    }
                }) : (i = [{
                    field: "title",
                    title: a.title
                }, {
                    field: "start",
                    title: a.start,
                    editor: t.dateRange
                }, {
                    field: "end",
                    title: a.end,
                    editor: t.dateRange
                }, {
                    field: "percentComplete",
                    title: a.percentComplete,
                    format: z
                }], n.get(s.field) && i.push({
                    field: s.field,
                    title: a.resources,
                    messages: a,
                    editor: t.resources,
                    click: l,
                    styles: p.styles.popup
                })), i
            },
            _buildEditTemplate: function(e, t, n) {
                var i, r, o, a, s = this.options.resources,
                    l = this.options.editable.template,
                    c = E({}, m.Template, this.options.templateSettings),
                    d = c.paramName,
                    u = p.styles.popup,
                    h = "";
                if (l) typeof l === N && (l = window.unescape(l)), h += m.template(l, c)(e);
                else
                    for (i = 0, r = t.length; r > i; i++) o = t[i], h += '<div class="' + u.editLabel + '"><label for="' + o.field + '">' + (o.title || o.field || "") + "</label></div>", o.field === s.field && (h += '<div class="' + u.resourcesField + '" style="display:none"></div>'), !e.editable || e.editable(o.field) ? (n.push(o), h += "<div " + m.attr("container-for") + '="' + o.field + '" class="' + u.editField + '"></div>') : (a = "#:", o.field ? (o = m.expr(o.field, d), a += o + "==null?'':" + o) : a += "''", a += "#", a = m.template(a, c), h += '<div class="' + u.editField + '">' + a(e) + "</div>");
                return h
            }
        }), h = u.extend({
            destroy: function() {
                this.close(), this.unbind()
            },
            editTask: function(e) {
                this.editable = this._createPopupEditor(e)
            },
            close: function() {
                var e = this,
                    t = function() {
                        e.editable && (e.editable.destroy(), e.editable = null, e.container = null), e.popup && (e.popup.destroy(), e.popup = null)
                    };
                this.editable && this.container.is(":visible") ? this.container.data("kendoWindow").bind("deactivate", t).close() : t()
            },
            showDialog: function(t) {
                var n, i, r, o, a = t.buttons,
                    s = p.styles.popup,
                    l = m.format('<div class="{0}"><div class="{1}"><p class="{2}">{3}</p><div class="{4}">', s.form, s.formContainer, s.message, t.text, s.buttonsContainer);
                for (n = 0, i = a.length; i > n; n++) l += this.createButton(a[n]);
                l += "</div></div></div>", r = this.element, this.popup && this.popup.destroy(), o = this.popup = e(l).appendTo(r).eq(0).on("click", j + s.button, function(t) {
                    t.preventDefault(), o.close();
                    var n = e(t.currentTarget).index();
                    a[n].click()
                }).kendoWindow({
                    modal: !0,
                    resizable: !1,
                    draggable: !1,
                    title: t.title,
                    visible: !1,
                    close: function() {
                        this.destroy(), r.focus()
                    }
                }).getKendoWindow(), o.center().open()
            },
            _createPopupEditor: function(t) {
                var n, i, r = this,
                    o = {},
                    a = this.options.messages,
                    s = p.styles,
                    l = s.popup,
                    c = m.format('<div {0}="{1}" class="{2} {3}"><div class="{4}">', m.attr("uid"), t.uid, l.form, l.editForm, l.formContainer),
                    u = this.fields(d.desktop, t),
                    h = [];
                return c += this._buildEditTemplate(t, u, h), c += '<div class="' + l.buttonsContainer + '">', c += this.createButton({
                    name: "update",
                    text: a.save,
                    className: p.styles.primary
                }), c += this.createButton({
                    name: "cancel",
                    text: a.cancel
                }), c += this.createButton({
                    name: "delete",
                    text: a.destroy
                }), c += "</div></div></div>", n = this.container = e(c).appendTo(this.element).eq(0).kendoWindow(E({
                    modal: !0,
                    resizable: !1,
                    draggable: !0,
                    title: a.editor.editorTitle,
                    visible: !1,
                    close: function(e) {
                        e.userTriggered && r.trigger("cancel", {
                            container: n,
                            model: t
                        }) && e.preventDefault()
                    }
                }, o)), i = n.kendoEditable({
                    fields: h,
                    model: t,
                    clearContainer: !1,
                    validateOnBlur: !0,
                    target: r.options.target
                }).data("kendoEditable"), m.cycleForm(n), this.trigger("edit", {
                    container: n,
                    model: t
                }) ? r.trigger("cancel", {
                    container: n,
                    model: t
                }) : (n.data("kendoWindow").center().open(), n.on(L + P, j + s.buttonCancel, function(e) {
                    e.preventDefault(), e.stopPropagation(), r.trigger("cancel", {
                        container: n,
                        model: t
                    })
                }), n.on(L + P, j + s.buttonSave, function(e) {
                    var i, o, a, s, l;
                    for (e.preventDefault(), e.stopPropagation(), i = r.fields(d.desktop, t), o = {}, s = 0, l = i.length; l > s; s++) a = i[s].field, o[a] = t.get(a);
                    r.trigger("save", {
                        container: n,
                        model: t,
                        updateInfo: o
                    })
                }), n.on(L + P, j + s.buttonDelete, function(e) {
                    e.preventDefault(), e.stopPropagation(), r.trigger("remove", {
                        container: n,
                        model: t
                    })
                })), i
            }
        }), f = w.extend({
            init: function(e, t) {
                w.fn.init.call(this, e, t), this.wrapper = this.element, this.model = this.options.model, this.resourcesField = this.options.resourcesField, this.createButton = this.options.createButton, this._initContainer(), this._attachHandlers()
            },
            events: ["save"],
            open: function() {
                this.window.center().open(), this.grid.resize(!0)
            },
            close: function() {
                this.window.bind("deactivate", A(this.destroy, this)).close()
            },
            destroy: function() {
                this._dettachHandlers(), this.grid.destroy(), this.grid = null, this.window.destroy(), this.window = null, w.fn.destroy.call(this), m.destroy(this.wrapper), this.element = this.wrapper = null
            },
            _attachHandlers: function() {
                var t = p.styles,
                    n = this.grid,
                    i = this._cancelProxy = A(this._cancel, this);
                this.container.on(L + P, j + t.buttonCancel, this._cancelProxy), this._saveProxy = A(this._save, this), this.container.on(L + P, j + t.buttonSave, this._saveProxy), this.window.bind("close", function(e) {
                    e.userTriggered && i(e)
                }), n.wrapper.on(L + P, "input[type='checkbox']", function() {
                    var t = e(this),
                        i = e(t).closest("tr"),
                        r = n.dataSource.getByUid(i.attr(m.attr("uid"))),
                        o = e(t).is(":checked") ? 1 : "";
                    r.set("value", o)
                })
            },
            _dettachHandlers: function() {
                this._cancelProxy = null, this._saveProxy = null, this.container.off(P), this.grid.wrapper.off()
            },
            _cancel: function(e) {
                e.preventDefault(), this.close()
            },
            _save: function(e) {
                e.preventDefault(), this._updateModel(), this.wrapper.is(j + p.styles.popup.resourcesField) || this.trigger("save", {
                    container: this.wrapper,
                    model: this.model
                }), this.close()
            },
            _initContainer: function() {
                var t = p.styles.popup,
                    n = m.format('<div class="{0} {1}"><div class="{2} {3}"/></div>"', t.form, t.editForm, t.formContainer, t.resourcesFormContainer);
                n = e(n), this.container = n.find(j + t.resourcesFormContainer), this.window = n.kendoWindow({
                    modal: !0,
                    resizable: !1,
                    draggable: !0,
                    visible: !1,
                    title: this.options.messages.resourcesEditorTitle
                }).data("kendoWindow"), this._resourceGrid(), this._createButtons()
            },
            _resourceGrid: function() {
                var t = this,
                    n = this.options.messages,
                    i = e('<div id="resources-grid"/>').appendTo(this.container);
                this.grid = new m.ui.Grid(i, {
                    columns: [{
                        field: "name",
                        title: n.resourcesHeader,
                        template: "<label><input type='checkbox' value='#=name#'# if (value > 0 && value !== null) {#checked='checked'# } #/>#=name#</labe>"
                    }, {
                        field: "value",
                        title: n.unitsHeader,
                        template: function(e) {
                            var t = e.format,
                                n = null !== e.value ? e.value : "";
                            return t ? m.toString(n, t) : n
                        }
                    }],
                    height: 280,
                    sortable: !0,
                    editable: !0,
                    filterable: !0,
                    dataSource: {
                        data: t.options.data,
                        schema: {
                            model: {
                                id: "id",
                                fields: {
                                    id: {
                                        from: "id"
                                    },
                                    name: {
                                        from: "name",
                                        type: "string",
                                        editable: !1
                                    },
                                    value: {
                                        from: "value",
                                        type: "number",
                                        defaultValue: ""
                                    },
                                    format: {
                                        from: "format",
                                        type: "string"
                                    }
                                }
                            }
                        }
                    },
                    save: function(e) {
                        var t = !!e.values.value;
                        e.container.parent().find("input[type='checkbox']").prop("checked", t)
                    }
                })
            },
            _createButtons: function() {
                var e, t, n = this.options.buttons,
                    i = '<div class="' + p.styles.popup.buttonsContainer + '">';
                for (e = 0, t = n.length; t > e; e++) i += this.createButton(n[e]);
                i += "</div>", this.container.append(i)
            },
            _updateModel: function() {
                var e, t, n, i = [],
                    r = this.grid.dataSource.data();
                for (t = 0, n = r.length; n > t; t++) e = r[t].get("value"), null !== e && e > 0 && i.push(r[t]);
                this.model[this.resourcesField] = i
            }
        }), p = w.extend({
            init: function(e, t, n) {
                S(t) && (t = {
                    dataSource: t
                }), s = {
                    append: {
                        text: "Add Task",
                        action: "add",
                        className: p.styles.toolbar.appendButton,
                        iconClass: p.styles.toolbar.iconPlus
                    },
                    pdf: {
                        text: "Export to PDF",
                        className: p.styles.toolbar.pdfButton,
                        iconClass: p.styles.toolbar.iconPdf
                    }
                }, w.fn.init.call(this, e, t), n && (this._events = n), this._wrapper(), this._resources(), this.options.views && this.options.views.length || (this.options.views = ["day", "week", "month"]), this._timeline(), this._toolbar(), this._footer(), this._adjustDimensions(), this._preventRefresh = !0, this.view(this.timeline._selectedViewName), this._preventRefresh = !1, this._dataSource(), this._assignments(), this._dropDowns(), this._list(), this._dependencies(), this._resizable(), this._scrollable(), this._dataBind(), this._attachEvents(), this._createEditor(), m.notify(this)
            },
            events: ["dataBinding", "dataBound", "add", "edit", "remove", "cancel", "save", "change", "navigate", "moveStart", "move", "moveEnd", "resizeStart", "resize", "resizeEnd", "columnResize"],
            options: {
                name: "Gantt",
                autoBind: !0,
                navigatable: !1,
                selectable: !0,
                editable: !0,
                resizable: !1,
                columnResizeHandleWidth: R,
                columns: [],
                views: [],
                dataSource: {},
                dependencies: {},
                resources: {},
                assignments: {},
                taskTemplate: null,
                messages: {
                    save: "Save",
                    cancel: "Cancel",
                    destroy: "Delete",
                    deleteTaskConfirmation: q,
                    deleteDependencyConfirmation: G,
                    deleteTaskWindowTitle: "Delete task",
                    deleteDependencyWindowTitle: "Delete dependency",
                    views: {
                        day: "Day",
                        week: "Week",
                        month: "Month",
                        year: "Year",
                        start: "Start",
                        end: "End"
                    },
                    actions: {
                        append: "Add Task",
                        addChild: "Add Child",
                        insertBefore: "Add Above",
                        insertAfter: "Add Below",
                        pdf: "Export to PDF"
                    },
                    editor: {
                        editorTitle: "Task",
                        resourcesEditorTitle: "Resources",
                        title: "Title",
                        start: "Start",
                        end: "End",
                        percentComplete: "Complete",
                        resources: "Resources",
                        assignButton: "Assign",
                        resourcesHeader: "Resources",
                        unitsHeader: "Units"
                    }
                },
                showWorkHours: !0,
                showWorkDays: !0,
                toolbar: null,
                workDayStart: new Date(1980, 1, 1, 8, 0, 0),
                workDayEnd: new Date(1980, 1, 1, 17, 0, 0),
                workWeekStart: 1,
                workWeekEnd: 5,
                hourSpan: 1,
                snap: !0,
                height: 600,
                listWidth: "30%",
                rowHeight: null
            },
            select: function(e) {
                var n = this.list;
                return e ? (n.select(e), t) : n.select()
            },
            clearSelection: function() {
                this.list.clearSelection()
            },
            destroy: function() {
                w.fn.destroy.call(this), this.dataSource && (this.dataSource.unbind("change", this._refreshHandler), this.dataSource.unbind("progress", this._progressHandler), this.dataSource.unbind("error", this._errorHandler)), this.dependencies && (this.dependencies.unbind("change", this._dependencyRefreshHandler), this.dependencies.unbind("error", this._dependencyErrorHandler)), this.timeline && (this.timeline.unbind(), this.timeline.destroy()), this.list && (this.list.unbind(), this.list.destroy()), this.footerDropDown && this.footerDropDown.destroy(), this.headerDropDown && this.headerDropDown.destroy(), this._editor && this._editor.destroy(), this._resizeDraggable && this._resizeDraggable.destroy(), this.toolbar.off(P), g && (this._mediaQuery.removeListener(this._mediaQueryHandler), this._mediaQuery = null), e(window).off("resize" + P, this._resizeHandler), e(this.wrapper).off(P), this.toolbar = null, this.footer = null
            },
            setOptions: function(t) {
                var n, i = m.deepExtend({}, this.options, t),
                    r = this._events;
                t.views || (n = this.view().name, i.views = e.map(this.options.views, function(e) {
                    var t = F(e),
                        i = t ? "string" != typeof e.type ? e.title : e.type : e;
                    return n === i ? t ? e.selected = !0 : e = {
                        type: i,
                        selected: !0
                    } : t && (e.selected = !1), e
                })), t.dataSource || (i.dataSource = this.dataSource), t.dependencies || (i.dependencies = this.dependencies), t.resources || (i.resources = this.resources), t.assignments || (i.assignments = this.assignments), this.destroy(), this.element.empty(), this.options = null, this.init(this.element, i, r), w.fn._setEvents.call(this, i)
            },
            _attachEvents: function() {
                this._resizeHandler = A(this.resize, this, !1), e(window).on("resize" + P, this._resizeHandler)
            },
            _wrapper: function() {
                var e = p.styles,
                    t = [e.icon, e.resizeHandle].join(" "),
                    n = this.options,
                    i = n.height,
                    r = n.width;
                this.wrapper = this.element.addClass(e.wrapper).append("<div class='" + e.listWrapper + "'><div></div></div>").append("<div class='" + e.splitBarWrapper + "'><div class='" + t + "'></div></div>").append("<div class='" + e.timelineWrapper + "'><div></div></div>"), this.wrapper.find(j + e.list).width(n.listWidth), i && this.wrapper.height(i), r && this.wrapper.width(r), n.rowHeight && this.wrapper.addClass(e.rowHeight)
            },
            _toolbar: function() {
                var t, n, i, r = this,
                    o = p.styles,
                    a = j + o.toolbar.views + " > li",
                    s = j + o.toolbar.pdfButton,
                    l = j + o.buttonToggle,
                    c = j + o.gridContent,
                    d = e(j + o.list),
                    u = e(j + o.timeline),
                    h = o.hovered,
                    f = this.options.toolbar,
                    v = e("<div class='" + o.toolbar.actions + "'>"),
                    _ = function(e) {
                        e.matches ? d.css({
                            display: "none",
                            "max-width": 0
                        }) : (d.css({
                            display: "inline-block",
                            width: "30%",
                            "max-width": "none"
                        }), u.css("display", "inline-block"), r.refresh(), u.find(c).scrollTop(r.scrollTop)), r._resize()
                    };
                D(f) || (f = typeof f === N ? f : this._actions(f), f = A(m.template(f), this)), i = e($({
                    styles: o.toolbar
                })), n = e(X({
                    ns: m.ns,
                    views: this.timeline.views,
                    styles: o.toolbar
                })), v.append(f({})), t = e("<div class='" + o.toolbar.headerWrapper + "'>").append(i).append(n).append(v), n.find("li").length > 1 && n.prepend(Q({
                    styles: o.toolbar
                })), this.wrapper.prepend(t), this.toolbar = t, g && (this._mediaQueryHandler = A(_, this), this._mediaQuery = window.matchMedia("(max-width: 480px)"), this._mediaQuery.addListener(this._mediaQueryHandler)), t.on(L + P, a, function(t) {
                    var i, a, s;
                    t.preventDefault(), i = r.list, a = e(this).attr(m.attr("name")), s = n.find(j + o.toolbar.currentView), s.is(":visible") && s.parent().toggleClass(o.toolbar.expanded), i.editable && i.editable.trigger("validate") || r.trigger("navigate", {
                        view: a
                    }) || r.view(a)
                }).on(L + P, s, function(e) {
                    e.preventDefault(), r.saveAsPDF()
                }).on(L + P, l, function(e) {
                    e.preventDefault(), d.is(":visible") ? (d.css({
                        display: "none",
                        width: "0"
                    }), u.css({
                        display: "inline-block",
                        width: "100%"
                    }), r.refresh(), u.find(c).scrollTop(r.scrollTop)) : (u.css({
                        display: "none",
                        width: 0
                    }), d.css({
                        display: "inline-block",
                        width: "100%",
                        "max-width": "none"
                    }).find(c).scrollTop(r.scrollTop)), r._resize()
                }), this.wrapper.find(j + o.toolbar.toolbar + " li").hover(function() {
                    e(this).addClass(h)
                }, function() {
                    e(this).removeClass(h)
                })
            },
            _actions: function() {
                var e, t, n = this.options,
                    i = n.toolbar,
                    r = "";
                if (!S(i)) {
                    if (!n.editable) return r;
                    i = ["append"]
                }
                for (e = 0, t = i.length; t > e; e++) r += this._createButton(i[e]);
                return r
            },
            _footer: function() {
                var t, n, i, r, o;
                this.options.editable && (t = p.styles.toolbar, n = this.options.messages.actions, i = e(m.template(Y)(E(!0, {
                    styles: t
                }, s.append, {
                    text: n.append
                }))), r = e("<div class='" + t.actions + "'>").append(i), o = e("<div class='" + t.footerWrapper + "'>").append(r), this.wrapper.append(o), this.footer = o)
            },
            _createButton: function(e) {
                var t = e.template || Y,
                    n = this.options.messages.actions,
                    i = typeof e === N ? e : e.name || e.text,
                    r = s[i] ? s[i].className : "k-gantt-" + (i || "").replace(/\s/g, ""),
                    o = {
                        iconClass: "",
                        action: "",
                        text: i,
                        className: r,
                        styles: p.styles.toolbar
                    };
                if (!(i || F(e) && e.template)) throw Error("Custom commands should have name specified");
                return o = E(!0, o, s[i], {
                    text: n[i]
                }), F(e) && (e.className && T(o.className, e.className.split(" ")) < 0 && (e.className += " " + o.className), o = E(!0, o, e)), m.template(t)(o)
            },
            _adjustDimensions: function() {
                var e = this.element,
                    t = p.styles,
                    n = j + t.list,
                    i = j + t.timeline,
                    r = j + t.splitBar,
                    o = this.toolbar.outerHeight(),
                    a = this.footer ? this.footer.outerHeight() : 0,
                    s = e.height(),
                    l = e.width(),
                    c = e.find(r).outerWidth(),
                    d = e.find(n).outerWidth();
                e.children([n, i, r].join(",")).height(s - (o + a)).end().children(i).width(l - (c + d)), d + c > l && e.find(n).width(l - c)
            },
            _scrollTo: function(e) {
                var t, i, r = this.timeline.view(),
                    o = this.list,
                    a = m.attr("uid"),
                    s = "string" == typeof e ? e : e.closest("tr" + n()).attr(a),
                    l = function() {
                        0 !== i.length && t()
                    };
                r.content.is(":visible") ? (i = r.content.find(n(s)), t = function() {
                    r._scrollTo(i)
                }) : (i = o.content.find(n(s)), t = function() {
                    i.get(0).scrollIntoView()
                }), l()
            },
            _dropDowns: function() {
                var e = this,
                    t = j + p.styles.toolbar.actions,
                    n = this.options.messages.actions,
                    i = this.timeline,
                    r = function(t) {
                        var n, r = t.type,
                            o = e.dataSource,
                            a = o._createNewModel(),
                            s = e.dataItem(e.select()),
                            l = o.taskParent(s),
                            c = i.view()._timeSlots()[0],
                            d = "add" === r ? s : l,
                            u = e.list.editable;
                        u && u.trigger("validate") || (a.set("title", "New task"), d ? (a.set("parentId", d.get("id")), a.set("start", d.get("start")), a.set("end", d.get("end"))) : (a.set("start", c.start), a.set("end", c.end)), "add" !== r && (n = s.get("orderId"), n = "insert-before" === r ? n : n + 1), e._createTask(a, n))
                    };
                this.options.editable && (this.footerDropDown = new ne(this.footer.children(t).eq(0), {
                    messages: {
                        actions: n
                    },
                    direction: "up",
                    animation: {
                        open: {
                            effects: "slideIn:up"
                        }
                    },
                    navigatable: e.options.navigatable
                }), this.headerDropDown = new ne(this.toolbar.children(t).eq(0), {
                    messages: {
                        actions: n
                    },
                    navigatable: e.options.navigatable
                }), this.footerDropDown.bind("command", r), this.headerDropDown.bind("command", r))
            },
            _list: function() {
                var e, t, n = this,
                    i = n.options.navigatable,
                    r = p.styles,
                    a = this.wrapper.find(j + r.list),
                    s = a.find("> div"),
                    l = this.wrapper.find(j + r.toolbar.actions + " > button"),
                    c = {
                        columns: this.options.columns || [],
                        dataSource: this.dataSource,
                        selectable: this.options.selectable,
                        editable: this.options.editable,
                        resizable: this.options.resizable,
                        columnResizeHandleWidth: this.options.columnResizeHandleWidth,
                        listWidth: a.outerWidth(),
                        resourcesField: this.resources.field,
                        rowHeight: this.options.rowHeight
                    },
                    d = c.columns,
                    u = function() {
                        i && (n._current(n._cachedCurrent), o(n.list.content.find("table"), !0)), delete n._cachedCurrent
                    };
                for (t = 0; d.length > t; t++) e = d[t], e.field === this.resources.field && "function" != typeof e.editor && (e.editor = A(this._createResourceEditor, this));
                this.list = new m.ui.GanttList(s, c), this.list.bind("render", function() {
                    n._navigatable()
                }, !0).bind("edit", function(e) {
                    n._cachedCurrent = e.cell, n.trigger("edit", {
                        task: e.model,
                        container: e.cell
                    }) && e.preventDefault()
                }).bind("cancel", function(e) {
                    n.trigger("cancel", {
                        task: e.model,
                        container: e.cell
                    }) && e.preventDefault(), u()
                }).bind("update", function(e) {
                    n._updateTask(e.task, e.updateInfo), u()
                }).bind("change", function() {
                    n.trigger("change");
                    var e = n.list.select();
                    e.length ? (l.removeAttr("data-action", "add"), n.timeline.select("[data-uid='" + e.attr("data-uid") + "']")) : (l.attr("data-action", "add"), n.timeline.clearSelection())
                }).bind("columnResize", function(e) {
                    n.trigger("columnResize", {
                        column: e.column,
                        oldWidth: e.oldWidth,
                        newWidth: e.newWidth
                    })
                })
            },
            _timeline: function() {
                var e = this,
                    n = p.styles,
                    r = i(E(!0, {
                        resourcesField: this.resources.field
                    }, this.options)),
                    o = this.wrapper.find(j + n.timeline + " > div"),
                    a = j + n.toolbar.currentView + " > " + j + n.toolbar.link;
                this.timeline = new m.ui.GanttTimeline(o, r), this.timeline.bind("navigate", function(t) {
                    var i = t.view.replace(/\./g, "\\.").toLowerCase(),
                        r = e.toolbar.find(j + n.toolbar.views + " > li").removeClass(n.selected).end().find(j + n.toolbar.viewButton + "-" + i).addClass(n.selected).find(j + n.toolbar.link).text();
                    e.toolbar.find(a).text(r), e.refresh()
                }).bind("moveStart", function(n) {
                    var i = e.list.editable;
                    return i && i.trigger("validate") ? (n.preventDefault(), t) : (e.trigger("moveStart", {
                        task: n.task
                    }) && n.preventDefault(), t)
                }).bind("move", function(t) {
                    var n = t.task,
                        i = t.start,
                        r = new Date(i.getTime() + n.duration());
                    e.trigger("move", {
                        task: n,
                        start: i,
                        end: r
                    }) && t.preventDefault()
                }).bind("moveEnd", function(t) {
                    var n = t.task,
                        i = t.start,
                        r = new Date(i.getTime() + n.duration());
                    e.trigger("moveEnd", {
                        task: n,
                        start: i,
                        end: r
                    }) || e._updateTask(e.dataSource.getByUid(n.uid), {
                        start: i,
                        end: r
                    })
                }).bind("resizeStart", function(n) {
                    var i = e.list.editable;
                    return i && i.trigger("validate") ? (n.preventDefault(), t) : (e.trigger("resizeStart", {
                        task: n.task
                    }) && n.preventDefault(), t)
                }).bind("resize", function(t) {
                    e.trigger("resize", {
                        task: t.task,
                        start: t.start,
                        end: t.end
                    }) && t.preventDefault()
                }).bind("resizeEnd", function(t) {
                    var n = t.task,
                        i = {};
                    t.resizeStart ? i.start = t.start : i.end = t.end, e.trigger("resizeEnd", {
                        task: n,
                        start: t.start,
                        end: t.end
                    }) || e._updateTask(e.dataSource.getByUid(n.uid), i)
                }).bind("percentResizeStart", function(t) {
                    var n = e.list.editable;
                    n && n.trigger("validate") && t.preventDefault()
                }).bind("percentResizeEnd", function(t) {
                    e._updateTask(e.dataSource.getByUid(t.task.uid), {
                        percentComplete: t.percentComplete
                    })
                }).bind("dependencyDragStart", function(t) {
                    var n = e.list.editable;
                    n && n.trigger("validate") && t.preventDefault()
                }).bind("dependencyDragEnd", function(t) {
                    var n = e.dependencies._createNewModel({
                        type: t.type,
                        predecessorId: t.predecessor.id,
                        successorId: t.successor.id
                    });
                    e._createDependency(n)
                }).bind("select", function(t) {
                    var n = e.list.editable;
                    n && n.trigger("validate"), e.select("[data-uid='" + t.uid + "']")
                }).bind("editTask", function(t) {
                    var n = e.list.editable;
                    n && n.trigger("validate") || e.editTask(t.uid)
                }).bind("clear", function() {
                    e.clearSelection()
                }).bind("removeTask", function(t) {
                    var n = e.list.editable;
                    n && n.trigger("validate") || e.removeTask(e.dataSource.getByUid(t.uid))
                }).bind("removeDependency", function(t) {
                    var n = e.list.editable;
                    n && n.trigger("validate") || e.removeDependency(e.dependencies.getByUid(t.uid))
                })
            },
            _dataSource: function() {
                var e = this.options,
                    t = e.dataSource;
                t = S(t) ? {
                    data: t
                } : t, this.dataSource && this._refreshHandler ? this.dataSource.unbind("change", this._refreshHandler).unbind("progress", this._progressHandler).unbind("error", this._errorHandler) : (this._refreshHandler = A(this.refresh, this), this._progressHandler = A(this._requestStart, this), this._errorHandler = A(this._error, this)), this.dataSource = m.data.GanttDataSource.create(t).bind("change", this._refreshHandler).bind("progress", this._progressHandler).bind("error", this._errorHandler)
            },
            _dependencies: function() {
                var e = this.options.dependencies || {},
                    t = S(e) ? {
                        data: e
                    } : e;
                this.dependencies && this._dependencyRefreshHandler ? this.dependencies.unbind("change", this._dependencyRefreshHandler).unbind("error", this._dependencyErrorHandler) : (this._dependencyRefreshHandler = A(this.refreshDependencies, this), this._dependencyErrorHandler = A(this._error, this)), this.dependencies = m.data.GanttDependencyDataSource.create(t).bind("change", this._dependencyRefreshHandler).bind("error", this._dependencyErrorHandler)
            },
            _resources: function() {
                var e = this.options.resources,
                    t = e.dataSource || {};
                this.resources = {
                    field: "resources",
                    dataTextField: "name",
                    dataColorField: "color",
                    dataFormatField: "format"
                }, E(this.resources, e), this.resources.dataSource = m.data.DataSource.create(t)
            },
            _assignments: function() {
                var e = this.options.assignments,
                    t = e.dataSource || {};
                this.assignments ? this.assignments.dataSource.unbind("change", this._assignmentsRefreshHandler) : this._assignmentsRefreshHandler = A(this.refresh, this), this.assignments = {
                    dataTaskIdField: "taskId",
                    dataResourceIdField: "resourceId",
                    dataValueField: "value"
                }, E(this.assignments, e), this.assignments.dataSource = m.data.DataSource.create(t), this.assignments.dataSource.bind("change", this._assignmentsRefreshHandler)
            },
            _createEditor: function() {
                var e = this,
                    n = this._editor = new h(this.wrapper, E({}, this.options, {
                        target: this,
                        resources: {
                            field: this.resources.field,
                            editor: A(this._createResourceEditor, this)
                        },
                        createButton: A(this._createPopupButton, this)
                    }));
                n.bind("cancel", function(n) {
                    var i = e.dataSource.getByUid(n.model.uid);
                    return e.trigger("cancel", {
                        container: n.container,
                        task: i
                    }) ? (n.preventDefault(), t) : (e.cancelTask(), t)
                }).bind("edit", function(t) {
                    var n = e.dataSource.getByUid(t.model.uid);
                    e.trigger("edit", {
                        container: t.container,
                        task: n
                    }) && t.preventDefault()
                }).bind("save", function(t) {
                    var n = e.dataSource.getByUid(t.model.uid);
                    e.saveTask(n, t.updateInfo)
                }).bind("remove", function(t) {
                    e.removeTask(t.model.uid)
                })
            },
            _createResourceEditor: function(e, t) {
                var n = this,
                    i = t instanceof k ? t : t.model,
                    r = i.get("id"),
                    o = this.options.messages,
                    a = n.resources.field,
                    s = this._resourceEditor = new f(e, {
                        resourcesField: a,
                        data: this._wrapResourceData(r),
                        model: i,
                        messages: E({}, o.editor),
                        buttons: [{
                            name: "update",
                            text: o.save,
                            className: p.styles.primary
                        }, {
                            name: "cancel",
                            text: o.cancel
                        }],
                        createButton: A(this._createPopupButton, this),
                        save: function(e) {
                            n._updateAssignments(e.model.get("id"), e.model.get(a))
                        }
                    });
                s.open()
            },
            _createPopupButton: function(e) {
                var t = e.name || e.text,
                    n = {
                        className: p.styles.popup.button + " k-gantt-" + (t || "").replace(/\s/g, ""),
                        text: t,
                        attr: ""
                    };
                if (!(t || F(e) && e.template)) throw Error("Custom commands should have name specified");
                return F(e) && (e.className && (e.className += " " + n.className), n = E(!0, n, e)), m.template(K)(n)
            },
            view: function(e) {
                return this.timeline.view(e)
            },
            dataItem: function(e) {
                var t, n;
                return e ? (t = this.list, n = t.content.find(e), t._modelFromElement(n)) : null
            },
            setDataSource: function(e) {
                this.options.dataSource = e, this._dataSource(), this.list._setDataSource(this.dataSource), this.options.autoBind && e.fetch()
            },
            setDependenciesDataSource: function(e) {
                this.options.dependencies = e, this._dependencies(), this.options.autoBind && e.fetch()
            },
            items: function() {
                return this.wrapper.children(".k-task")
            },
            _updateAssignments: function(e, t) {
                for (var n, i, r, o, a, s, l, c = this.assignments.dataSource, d = this.assignments.dataTaskIdField, u = this.assignments.dataResourceIdField, h = !1, f = new C(c.view()).filter({
                    field: d,
                    operator: "eq",
                    value: e
                }).toArray(); f.length;) {
                    for (n = f[0], o = 0, a = t.length; a > o; o++)
                        if (i = t[o], n.get(u) === i.get("id")) {
                            r = t[o].get("value"), this._updateAssignment(n, r), t.splice(o, 1), h = !0;
                            break
                        } h || this._removeAssignment(n), h = !1, f.shift()
                }
                for (s = 0, l = t.length; l > s; s++) i = t[s], this._createAssignment(i, e);
                c.sync()
            },
            cancelTask: function() {
                var e = this._editor,
                    t = e.container;
                t && e.close()
            },
            editTask: function(e) {
                var t, n = "string" == typeof e ? this.dataSource.getByUid(e) : e;
                n && (t = this.dataSource._createNewModel(n.toJSON()), t.uid = n.uid, this.cancelTask(), this._editTask(t))
            },
            _editTask: function(e) {
                this._editor.editTask(e)
            },
            saveTask: function(e, t) {
                var n = this._editor,
                    i = n.container,
                    r = n.editable;
                i && r && r.end() && this._updateTask(e, t)
            },
            _updateTask: function(e, t) {
                var n = this.resources.field;
                this.trigger("save", {
                    task: e,
                    values: t
                }) || (this._preventRefresh = !0, this.dataSource.update(e, t), t[n] && this._updateAssignments(e.get("id"), t[n]), this._syncDataSource())
            },
            _updateAssignment: function(e, t) {
                var n = this.assignments.dataValueField;
                e.set(n, t)
            },
            removeTask: function(e) {
                var t = this,
                    n = "string" == typeof e ? this.dataSource.getByUid(e) : e;
                n && this._taskConfirm(function(e) {
                    e || t._removeTask(n)
                }, n)
            },
            _createTask: function(e, n) {
                if (!this.trigger("add", {
                    task: e,
                    dependency: null
                })) {
                    var i = this.dataSource;
                    this._preventRefresh = !0, n === t ? i.add(e) : i.insert(n, e), this._scrollToUid = e.uid, this._syncDataSource()
                }
            },
            _createDependency: function(e) {
                this.trigger("add", {
                    task: null,
                    dependency: e
                }) || (this._preventDependencyRefresh = !0, this.dependencies.add(e), this._preventDependencyRefresh = !1, this.dependencies.sync())
            },
            _createAssignment: function(e, t) {
                var n = this.assignments,
                    i = n.dataSource,
                    r = n.dataTaskIdField,
                    o = n.dataResourceIdField,
                    a = n.dataValueField,
                    s = i._createNewModel();
                s[r] = t, s[o] = e.get("id"), s[a] = e.get("value"), i.add(s)
            },
            removeDependency: function(e) {
                var t = this,
                    n = "string" == typeof e ? this.dependencies.getByUid(e) : e;
                n && this._dependencyConfirm(function(e) {
                    e || t._removeDependency(n)
                }, n)
            },
            _removeTaskDependencies: function(e, t) {
                this._preventDependencyRefresh = !0;
                for (var n = 0, i = t.length; i > n; n++) this.dependencies.remove(t[n]);
                this._preventDependencyRefresh = !1, this.dependencies.sync()
            },
            _removeTaskAssignments: function(e) {
                var t, n, i = this.assignments.dataSource,
                    r = i.view(),
                    o = {
                        field: this.assignments.dataTaskIdField,
                        operator: "eq",
                        value: e.get("id")
                    };
                for (r = new C(r).filter(o).toArray(), this._preventRefresh = !0, t = 0, n = r.length; n > t; t++) i.remove(r[t]);
                this._preventRefresh = !1, i.sync()
            },
            _removeTask: function(e) {
                var t = this.dependencies.dependencies(e.id);
                this.trigger("remove", {
                    task: e,
                    dependencies: t
                }) || (this._removeTaskDependencies(e, t), this._removeTaskAssignments(e), this._preventRefresh = !0, this.dataSource.remove(e) && this._syncDataSource(), this._preventRefresh = !1)
            },
            _removeDependency: function(e) {
                this.trigger("remove", {
                    task: null,
                    dependencies: [e]
                }) || this.dependencies.remove(e) && this.dependencies.sync()
            },
            _removeAssignment: function(e) {
                this.assignments.dataSource.remove(e)
            },
            _taskConfirm: function(e, t) {
                var n = this.options.messages;
                this._confirm(e, {
                    model: t,
                    text: n.deleteTaskConfirmation,
                    title: n.deleteTaskWindowTitle
                })
            },
            _dependencyConfirm: function(e, t) {
                var n = this.options.messages;
                this._confirm(e, {
                    model: t,
                    text: n.deleteDependencyConfirmation,
                    title: n.deleteDependencyWindowTitle
                })
            },
            _confirm: function(e, t) {
                var n, i, r = this.options.editable;
                r === !0 || r.confirmation !== !1 ? (n = this.options.messages, i = [{
                    name: "delete",
                    text: n.destroy,
                    className: p.styles.primary,
                    click: function() {
                        e()
                    }
                }, {
                    name: "cancel",
                    text: n.cancel,
                    click: function() {
                        e(!0)
                    }
                }], this.showDialog(E(!0, {}, t, {
                    buttons: i
                }))) : e()
            },
            showDialog: function(e) {
                this._editor.showDialog(e)
            },
            refresh: function() {
                var e, t, i, r, o, a;
                this._preventRefresh || this.list.editable || (this._progress(!1), e = this.dataSource, t = e.taskTree(), i = this._scrollToUid, a = -1, this.current && (o = this.current.closest("tr").attr(m.attr("uid")), a = this.current.index()), this.trigger("dataBinding") || (0 !== this.resources.dataSource.data().length && this._assignResources(t), this._editor && this._editor.close(), this.clearSelection(), this.list._render(t), this.timeline._render(t), this.timeline._renderDependencies(this.dependencies.view()), i && (this._scrollTo(i), this.select(n(i))), (i || o) && a >= 0 && (r = this.list.content.find("tr" + n(i || o) + " > td:eq(" + a + ")"), this._current(r)), this._scrollToUid = null, this.trigger("dataBound")))
            },
            refreshDependencies: function() {
                this._preventDependencyRefresh || this.trigger("dataBinding") || (this.timeline._renderDependencies(this.dependencies.view()), this.trigger("dataBound"))
            },
            _assignResources: function(e) {
                var t, n, i = this.resources,
                    r = this.assignments,
                    o = function() {
                        var e = r.dataSource.view(),
                            t = {
                                field: r.dataTaskIdField
                            };
                        return e = new C(e).group(t).toArray()
                    },
                    a = o(),
                    s = function(e, t) {
                        var n, r, o = e.get("id");
                        for (m.setter(i.field)(e, new x([])), n = 0, r = a.length; r > n; n++) a[n].value === o && t(e, a[n].items)
                    },
                    l = function(e, t) {
                        var n, o, a, s, l, c, d, u;
                        for (n = 0, o = t.length; o > n; n++) a = t[n], s = i.dataSource.get(a.get(r.dataResourceIdField)), l = a.get(r.dataValueField), c = a.get(r.dataResourceIdField), d = s.get(i.dataFormatField) || z, u = m.toString(l, d), e[i.field].push(new k({
                            id: c,
                            name: s.get(i.dataTextField),
                            color: s.get(i.dataColorField),
                            value: l,
                            formatedValue: u
                        }))
                    };
                for (t = 0, n = e.length; n > t; t++) s(e[t], l)
            },
            _wrapResourceData: function(e) {
                var t, n, i, r = this,
                    o = [],
                    a = this.resources.dataSource.view(),
                    s = this.assignments.dataSource.view(),
                    l = new C(s).filter({
                        field: r.assignments.dataTaskIdField,
                        operator: "eq",
                        value: e
                    }).toArray(),
                    c = function(e) {
                        var t = null;
                        return new C(l).filter({
                            field: r.assignments.dataResourceIdField,
                            operator: "eq",
                            value: e
                        }).select(function(e) {
                            t += e.get(r.assignments.dataValueField)
                        }), t
                    };
                for (n = 0, i = a.length; i > n; n++) t = a[n], o.push({
                    id: t.get("id"),
                    name: t.get(r.resources.dataTextField),
                    format: t.get(r.resources.dataFormatField) || z,
                    value: c(t.id)
                });
                return o
            },
            _syncDataSource: function() {
                this._preventRefresh = !1, this._requestStart(), this.dataSource.sync()
            },
            _requestStart: function() {
                this._progress(!0)
            },
            _error: function() {
                this._progress(!1)
            },
            _progress: function(e) {
                m.ui.progress(this.element, e)
            },
            _resizable: function() {
                var t, n, i, r = this,
                    o = this.wrapper,
                    a = p.styles,
                    s = j + a.gridContent,
                    l = o.find(j + a.list),
                    c = o.find(j + a.timeline);
                this._resizeDraggable = o.find(j + a.splitBar).height(l.height()).hover(function() {
                    e(this).addClass(a.splitBarHover)
                }, function() {
                    e(this).removeClass(a.splitBarHover)
                }).end().kendoResizable({
                    orientation: "horizontal",
                    handle: j + a.splitBar,
                    start: function() {
                        t = l.width(), n = c.width(), i = c.find(s).scrollLeft()
                    },
                    resize: function(e) {
                        var a = e.x.initialDelta;
                        m.support.isRtl(o) && (a *= -1), 0 > t + a || 0 > n - a || (l.width(t + a), c.width(n - a), c.find(s).scrollLeft(i + a), r.timeline.view()._renderCurrentTime())
                    }
                }).data("kendoResizable")
            },
            _scrollable: function() {
                var t = this,
                    n = p.styles,
                    i = j + n.gridContent,
                    r = j + n.gridHeaderWrap,
                    o = this.timeline.element.find(r),
                    a = this.timeline.element.find(i),
                    s = this.list.element.find(r),
                    l = this.list.element.find(i);
                _ && l.css("overflow-y", "auto"), a.on("scroll", function() {
                    t.scrollTop = this.scrollTop, o.scrollLeft(this.scrollLeft), l.scrollTop(this.scrollTop)
                }), l.on("scroll", function() {
                    t.scrollTop = this.scrollTop, s.scrollLeft(this.scrollLeft), a.scrollTop(this.scrollTop)
                }).on("DOMMouseScroll" + P + " mousewheel" + P, function(t) {
                    var n = a.scrollTop(),
                        i = m.wheelDeltaY(t);
                    i && (t.preventDefault(), e(t.currentTarget).one("wheel" + P, !1), a.scrollTop(n + -i))
                })
            },
            _navigatable: function() {
                var i, r = this,
                    a = this.options.navigatable,
                    s = this.options.editable,
                    l = this.list.header.find("table"),
                    c = this.list.content.find("table"),
                    d = p.styles,
                    u = m.support.isRtl(this.wrapper),
                    h = this.timeline.element.find(j + d.gridContent),
                    f = l.add(c),
                    g = n(),
                    v = {
                        collapse: !1,
                        expand: !0
                    },
                    _ = function(e) {
                        var t = r.timeline.view()._timeSlots()[0].offsetWidth;
                        h.scrollLeft(h.scrollLeft() + (e ? -t : t))
                    },
                    b = function(e) {
                        var t = r.current.parent("tr" + n()),
                            i = r.current.index(),
                            a = t[e]();
                        0 !== r.select().length && r.clearSelection(), 0 !== a.length ? (r._current(a.children("td:eq(" + i + ")")), r._scrollTo(r.current)) : r.current.is("td") && "prev" == e ? o(l) : r.current.is("th") && "next" == e && o(c)
                    },
                    w = function(e) {
                        var t = r.current[e]();
                        0 !== t.length && (r._current(t), i = r.current.index())
                    },
                    y = function(e) {
                        var t = r.dataItem(r.current);
                        t.summary && t.expanded !== e && t.set("expanded", e)
                    },
                    k = function() {
                        var e, t;
                        r.options.editable && !r.list.editable && (e = r.select(), t = m.attr("uid"), e.length && r.removeTask(e.attr(t)))
                    };
                return e(this.wrapper).on("mousedown" + P, "tr" + g + ", div" + g + ":not(" + j + d.line + ")", function(t) {
                    var i, l = e(t.currentTarget),
                        c = e(t.target).is(":button,a,:input,a>.k-icon,textarea,span.k-icon,span.k-link,.k-input,.k-multiselect-wrap");
                    t.ctrlKey || (a && (i = l.is("tr") ? e(t.target).closest("td") : r.list.content.find("tr" + n(l.attr(m.attr("uid"))) + " > td:first"), r._current(i)), !a && !s || c || (r._focusTimeout = setTimeout(function() {
                        o(r.list.content.find("table"), !0)
                    }, 2)))
                }), a !== !0 ? (c.on("keydown" + P, function(e) {
                    e.keyCode == M.DELETE && k()
                }), t) : (f.on("focus" + P, function() {
                    var t = this === c.get(0) ? "td" : "th",
                        n = r.select(),
                        o = r.current || e(n.length ? n : this).find(t + ":eq(" + (i || 0) + ")");
                    r._current(o)
                }).on("blur" + P, function() {
                    r._current(), this == l && e(this).attr(B, -1)
                }).on("keydown" + P, function(t) {
                    var n, i = t.keyCode;
                    if (r.current) switch (n = r.current.is("td"), i) {
                        case M.RIGHT:
                            t.preventDefault(), t.altKey ? _() : t.ctrlKey ? y(u ? v.collapse : v.expand) : w(u ? "prev" : "next");
                            break;
                        case M.LEFT:
                            t.preventDefault(), t.altKey ? _(!0) : t.ctrlKey ? y(u ? v.expand : v.collapse) : w(u ? "next" : "prev");
                            break;
                        case M.UP:
                            t.preventDefault(), b("prev");
                            break;
                        case M.DOWN:
                            t.preventDefault(), b("next");
                            break;
                        case M.SPACEBAR:
                            t.preventDefault(), n && r.select(r.current.closest("tr"));
                            break;
                        case M.ENTER:
                            t.preventDefault(), n ? r.options.editable && (r._cachedCurrent = r.current, r.list._startEditHandler(r.current), e(this).one("keyup", function(e) {
                                e.stopPropagation()
                            })) : r.current.children("a.k-link").click();
                            break;
                        case M.ESC:
                            t.stopPropagation();
                            break;
                        case M.DELETE:
                            n && k();
                            break;
                        default:
                            i >= 49 && 57 >= i && r.view(r.timeline._viewByIndex(i - 49))
                    }
                }), t)
            },
            _current: function(t) {
                var n, i = p.styles;
                this.current && this.current.length && this.current.removeClass(i.focused).removeAttr("id"), t && t.length ? (this.current = t.addClass(i.focused).attr("id", U), n = e(m._activeElement()), n.is("table") && this.wrapper.find(n).length > 0 && n.removeAttr(V).attr(V, U)) : this.current = null
            },
            _dataBind: function() {
                var t, n = this;
                n.options.autoBind && (this._preventRefresh = !0, this._preventDependencyRefresh = !0, t = e.map([this.dataSource, this.dependencies, this.resources.dataSource, this.assignments.dataSource], function(e) {
                    return e.fetch()
                }), e.when.apply(null, t).done(function() {
                    n._preventRefresh = !1, n._preventDependencyRefresh = !1, n.refresh()
                }))
            },
            _resize: function() {
                this._adjustDimensions(), this.timeline.view()._adjustHeight(), this.timeline.view()._renderCurrentTime(), this.list._adjustHeight()
            }
        }), m.PDFMixin && (m.PDFMixin.extend(p.fn), p.fn._drawPDF = function() {
            var e = p.styles,
                t = "." + e.list,
                n = this.wrapper.find(t).width(),
                i = this.wrapper.clone();
            return i.find(t).css("width", n), this._drawPDFShadow({
                content: i
            }, {
                avoidLinks: this.options.pdf.avoidLinks
            })
        }), m.ui.plugin(p), E(!0, p, {
            styles: te
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.treelist.min", ["kendo.dom.min", "kendo.data.min", "kendo.columnsorter.min", "kendo.editable.min", "kendo.window.min", "kendo.filtermenu.min", "kendo.selectable.min", "kendo.resizable.min", "kendo.treeview.draganddrop.min"], e)
}(function() {
    return function(e, t) {
        function n(e) {
            return function(t) {
                return t[e]
            }
        }

        function i(e) {
            return function(t) {
                return !e(t)
            }
        }

        function r() {
            return "none" !== this.style.display
        }

        function o(n) {
            var i, r = n.find(">tr:not(.k-filter-row)"),
                o = function() {
                    var t = e(this);
                    return !t.hasClass("k-group-cell") && !t.hasClass("k-hierarchy-cell")
                },
                a = e();
            return r.length > 1 && (a = r.find("th").filter(o).filter(function() {
                return this.rowSpan > 1
            })), a = a.add(r.last().find("th").filter(o)), i = kendo.attr("index"), a.sort(function(n, r) {
                var o, a;
                return n = e(n), r = e(r), o = n.attr(i), a = r.attr(i), o === t && (o = e(n).index()), a === t && (a = e(r).index()), o = parseInt(o, 10), a = parseInt(a, 10), o > a ? 1 : a > o ? -1 : 0
            }), a
        }

        function a(e) {
            var t, n, i = [],
                r = e.className;
            for (t = 0, n = e.level; n > t; t++) i.push(g("span", {
                className: r
            }));
            return i
        }

        function s(e) {
            var t, n, i, r = 0;
            for (n = 0, i = e.length; i > n; n++) t = e[n].style.width, t && -1 == t.indexOf("%") && (r += parseInt(t, 10));
            return r
        }

        function l(e, t) {
            var n, i, r, o;
            e = e[0], t = t[0], e.rows.length !== t.rows.length && (n = e.offsetHeight, i = t.offsetHeight, n > i ? (r = t.rows[t.rows.length - 1], o = n - i) : (r = e.rows[e.rows.length - 1], o = i - n), r.style.height = r.offsetHeight + o + "px")
        }
        var c, d, u, h, f = kendo.data,
            p = e.extend,
            m = kendo.dom,
            g = m.element,
            v = m.text,
            _ = m.html,
            b = kendo.ui,
            w = b.DataBoundWidget,
            y = f.DataSource,
            k = f.ObservableArray,
            x = f.Query,
            C = f.Model,
            S = e.proxy,
            T = e.map,
            D = e.grep,
            A = e.inArray,
            E = e.isPlainObject,
            F = Array.prototype.push,
            I = "string",
            M = "change",
            R = "error",
            P = "progress",
            z = ".",
            B = ".kendoTreeList",
            L = "click",
            H = "mousedown",
            N = "edit",
            O = "save",
            V = "expand",
            U = "collapse",
            W = "remove",
            j = "dataBinding",
            q = "dataBound",
            G = "cancel",
            $ = "filterMenuInit",
            Y = "columnHide",
            K = "columnShow",
            Q = "th.k-header",
            X = "columnReorder",
            J = "columnResize",
            Z = "columnMenuInit",
            ee = "columnLock",
            te = "columnUnlock",
            ne = "parentId",
            ie = "dragstart",
            re = "drag",
            oe = "drop",
            ae = "dragend",
            se = {
                wrapper: "k-treelist k-grid k-widget",
                header: "k-header",
                button: "k-button",
                alt: "k-alt",
                editCell: "k-edit-cell",
                group: "k-treelist-group",
                gridToolbar: "k-grid-toolbar",
                gridHeader: "k-grid-header",
                gridHeaderWrap: "k-grid-header-wrap",
                gridContent: "k-grid-content",
                gridContentWrap: "k-grid-content",
                gridFilter: "k-grid-filter",
                footerTemplate: "k-footer-template",
                loading: "k-loading",
                refresh: "k-i-refresh",
                retry: "k-request-retry",
                selected: "k-state-selected",
                status: "k-status",
                link: "k-link",
                withIcon: "k-with-icon",
                filterable: "k-filterable",
                icon: "k-icon",
                iconFilter: "k-filter",
                iconCollapse: "k-i-collapse",
                iconExpand: "k-i-expand",
                iconHidden: "k-i-none",
                iconPlaceHolder: "k-icon k-i-none",
                input: "k-input",
                dropPositions: "k-insert-top k-insert-bottom k-add k-insert-middle",
                dropTop: "k-insert-top",
                dropBottom: "k-insert-bottom",
                dropAdd: "k-add",
                dropMiddle: "k-insert-middle",
                dropDenied: "k-denied",
                dragStatus: "k-drag-status",
                dragClue: "k-drag-clue",
                dragClueText: "k-clue-text"
            },
            le = {
                create: {
                    imageClass: "k-add",
                    className: "k-grid-add",
                    methodName: "addRow"
                },
                createchild: {
                    imageClass: "k-add",
                    className: "k-grid-add",
                    methodName: "addRow"
                },
                destroy: {
                    imageClass: "k-delete",
                    className: "k-grid-delete",
                    methodName: "removeRow"
                },
                edit: {
                    imageClass: "k-edit",
                    className: "k-grid-edit",
                    methodName: "editRow"
                },
                update: {
                    imageClass: "k-update",
                    className: "k-primary k-grid-update",
                    methodName: "saveRow"
                },
                canceledit: {
                    imageClass: "k-cancel",
                    className: "k-grid-cancel",
                    methodName: "_cancelEdit"
                },
                excel: {
                    imageClass: "k-i-excel",
                    className: "k-grid-excel",
                    methodName: "saveAsExcel"
                },
                pdf: {
                    imageClass: "k-i-pdf",
                    className: "k-grid-pdf",
                    methodName: "saveAsPDF"
                }
            },
            ce = C.define({
                id: "id",
                parentId: ne,
                fields: {
                    id: {
                        type: "number"
                    },
                    parentId: {
                        type: "number",
                        nullable: !0
                    }
                },
                init: function(e) {
                    C.fn.init.call(this, e), this._loaded = !1, this.parentIdField || (this.parentIdField = ne), this.parentId = this.get(this.parentIdField)
                },
                accept: function(e) {
                    C.fn.accept.call(this, e), this.parentId = this.get(this.parentIdField)
                },
                set: function(e, t, n) {
                    e == ne && this.parentIdField != ne && (this[this.parentIdField] = t), C.fn.set.call(this, e, t, n), e == this.parentIdField && (this.parentId = this.get(this.parentIdField))
                },
                loaded: function(e) {
                    return e === t ? this._loaded : (this._loaded = e, t)
                },
                shouldSerialize: function(e) {
                    return C.fn.shouldSerialize.call(this, e) && "_loaded" !== e && "_error" != e && "_edit" != e && !("parentId" !== this.parentIdField && "parentId" === e)
                }
            });
        ce.parentIdField = ne, ce.define = function(e, n) {
            var i, r;
            return n === t && (n = e, e = ce), i = n.parentId || ne, n.parentIdField = i, r = C.define(e, n), i && (r.parentIdField = i), r
        }, c = y.extend({
            init: function(e) {
                y.fn.init.call(this, p(!0, {}, {
                    schema: {
                        modelBase: ce,
                        model: ce
                    }
                }, e))
            },
            _createNewModel: function(e) {
                var t = {},
                    n = e instanceof C;
                return n && (t = e), t = y.fn._createNewModel.call(this, t), n || (e.parentId && (e[t.parentIdField] = e.parentId), t.accept(e)), t
            },
            _shouldWrap: function() {
                return !0
            },
            _readData: function(e) {
                var t = this.data();
                return e = y.fn._readData.call(this, e), this._concat(e, t), e instanceof k ? e : t
            },
            _concat: function(e, t) {
                var n, i = t.length;
                for (n = 0; e.length > n; n++) t[i++] = e[n];
                t.length = i
            },
            _readAggregates: function(e) {
                var t = p(this._aggregateResult, this.reader.aggregates(e));
                return "" in t && (t[this._defaultParentId()] = t[""], delete t[""]), t
            },
            remove: function(e) {
                var t = this._subtree(this._childrenMap(this.data()), e.id);
                this._removeItems(t), y.fn.remove.call(this, e)
            },
            _filterCallback: function(e) {
                var t, n, i = {},
                    r = [],
                    o = e.toArray();
                for (t = 0; o.length > t; t++)
                    for (n = o[t]; n && (i[n.id] || (i[n.id] = !0, r.push(n)), !i[n.parentId]);) i[n.parentId] = !0, n = this.parentNode(n), n && r.push(n);
                return new x(r)
            },
            _subtree: function(e, t) {
                var n, i, r = e[t] || [],
                    o = this._defaultParentId();
                for (n = 0, i = r.length; i > n; n++) r[n].id !== o && (r = r.concat(this._subtree(e, r[n].id)));
                return r
            },
            _childrenMap: function(e) {
                var t, n, i, r, o = {};
                for (e = this._observeView(e), t = 0; e.length > t; t++) n = e[t], i = n.id, r = n.parentId, o[i] = o[i] || [], o[r] = o[r] || [], o[r].push(n);
                return o
            },
            _calculateAggregates: function(e, t) {
                var n, i, r, o, a, s;
                for (t = t || {}, n = {}, a = t.filter, a && (e = x.process(e, {
                    filter: a,
                    filterCallback: S(this._filterCallback, this)
                }).data), s = this._childrenMap(e), n[this._defaultParentId()] = new x(this._subtree(s, this._defaultParentId())).aggregate(t.aggregate), o = 0; e.length > o; o++) i = e[o], r = this._subtree(s, i.id), n[i.id] = new x(r).aggregate(t.aggregate);
                return n
            },
            _queryProcess: function(e, t) {
                var n, i, r, o, a, s, l;
                for (t = t || {}, t.filterCallback = S(this._filterCallback, this), n = this._defaultParentId(), i = x.process(e, t), r = this._childrenMap(i.data), e = r[n] || [], a = 0; e.length > a; a++) s = e[a], s.id !== n && (l = r[s.id], o = !(!l || !l.length), s.loaded() || s.loaded(o || !s.hasChildren), (s.loaded() || s.hasChildren !== !0) && (s.hasChildren = o), o && (e = e.slice(0, a + 1).concat(l, e.slice(a + 1))));
                return i.data = e, i
            },
            _queueRequest: function(e, t) {
                t.call(this)
            },
            _modelLoaded: function(e) {
                var t = this.get(e);
                t.loaded(!0), t.hasChildren = this.childNodes(t).length > 0
            },
            _modelError: function(e, t) {
                this.get(e)._error = t
            },
            success: function(e, n) {
                return n && t !== n.id || (this._data = this._observe([])), y.fn.success.call(this, e, n)
            },
            load: function(t) {
                var n = "_query",
                    i = this.options.serverSorting || this.options.serverPaging || this.options.serverFiltering || this.options.serverGrouping || this.options.serverAggregates,
                    r = e.Deferred().resolve().promise();
                if (t.loaded()) {
                    if (i) return r
                } else t.hasChildren && (n = "read");
                return this[n]({
                    id: t.id
                }).then(S(this._modelLoaded, this, t.id), S(this._modelError, this, t.id))
            },
            contains: function(e, t) {
                for (var n = e.id; t;) {
                    if (t.parentId === n) return !0;
                    t = this.parentNode(t)
                }
                return !1
            },
            _byParentId: function(e, t) {
                var n, i, r = [],
                    o = this.view();
                if (e === t) return [];
                for (i = 0; o.length > i; i++) n = o.at(i), n.parentId == e && r.push(n);
                return r
            },
            _defaultParentId: function() {
                return this.reader.model.fn.defaults[this.reader.model.parentIdField]
            },
            childNodes: function(e) {
                return this._byParentId(e.id, this._defaultParentId())
            },
            rootNodes: function() {
                return this._byParentId(this._defaultParentId())
            },
            parentNode: function(e) {
                return this.get(e.parentId)
            },
            level: function(e) {
                var t = -1;
                e instanceof ce || (e = this.get(e));
                do e = this.parentNode(e), t++; while (e);
                return t
            },
            filter: function(e) {
                var n = y.fn.filter;
                return e === t ? n.call(this, e) : (n.call(this, e), t)
            }
        }), c.create = function(t) {
            return e.isArray(t) ? t = {
                data: t
            } : t instanceof k && (t = {
                data: t.toJSON()
            }), t instanceof c ? t : new c(t)
        }, d = kendo.Observable.extend({
            init: function(e, t) {
                kendo.Observable.fn.init.call(this), t = this.options = p(!0, {}, this.options, t), this.element = e, this.bind(this.events, t), this.model = this.options.model, this.fields = this._fields(this.options.columns), this._initContainer(), this.createEditable()
            },
            events: [],
            _initContainer: function() {
                this.wrapper = this.element
            },
            createEditable: function() {
                var e = this.options;
                this.editable = new b.Editable(this.wrapper, {
                    fields: this.fields,
                    target: e.target,
                    clearContainer: e.clearContainer,
                    model: this.model
                })
            },
            _isEditable: function(e) {
                return e.field && this.model.editable(e.field)
            },
            _fields: function(e) {
                var t, n, i, r = [];
                for (t = 0, n = e.length; n > t; t++) i = e[t], this._isEditable(i) && r.push({
                    field: i.field,
                    format: i.format,
                    editor: i.editor
                });
                return r
            },
            end: function() {
                return this.editable.end()
            },
            close: function() {
                this.destroy()
            },
            destroy: function() {
                this.editable.destroy(), this.editable.element.find("[" + kendo.attr("container-for") + "]").empty().end().removeAttr(kendo.attr("role")), this.model = this.wrapper = this.element = this.columns = this.editable = null
            }
        }), u = d.extend({
            init: function(e, t) {
                d.fn.init.call(this, e, t), this._attachHandlers(), kendo.cycleForm(this.wrapper), this.open()
            },
            events: [G, O],
            options: {
                window: {
                    modal: !0,
                    resizable: !1,
                    draggable: !0,
                    title: "Edit",
                    visible: !1
                }
            },
            _initContainer: function() {
                var t = this.options,
                    n = [];
                this.wrapper = e('<div class="k-popup-edit-form"/>').attr(kendo.attr("uid"), this.model.uid).append('<div class="k-edit-form-container"/>'), t.template ? (this._appendTemplate(n), this.fields = []) : this._appendFields(n), this._appendButtons(n), new m.Tree(this.wrapper.children()[0]).render(n), this.wrapper.appendTo(t.appendTo), this.window = new b.Window(this.wrapper, t.window)
            },
            _appendTemplate: function(e) {
                var t = this.options.template;
                typeof t === I && (t = window.unescape(t)), t = kendo.template(t)(this.model), e.push(_(t))
            },
            _appendFields: function(e) {
                var t, n, i, r = this.options.columns;
                for (t = 0, n = r.length; n > t; t++) i = r[t], i.command || (e.push(_('<div class="k-edit-label"><label for="' + i.field + '">' + (i.title || i.field || "") + "</label></div>")), e.push(this._isEditable(i) ? _("<div " + kendo.attr("container-for") + '="' + i.field + '" class="k-edit-field"></div>') : g("div", {
                    "class": "k-edit-field"
                }, [this.options.fieldRenderer(i, this.model)])))
            },
            _appendButtons: function(e) {
                e.push(g("div", {
                    "class": "k-edit-buttons k-state-default"
                }, this.options.commandRenderer()))
            },
            _attachHandlers: function() {
                var e = this._cancelProxy = S(this._cancel, this);
                this.wrapper.on(L + B, ".k-grid-cancel", this._cancelProxy), this._saveProxy = S(this._save, this), this.wrapper.on(L + B, ".k-grid-update", this._saveProxy), this.window.bind("close", function(t) {
                    t.userTriggered && e(t)
                })
            },
            _dettachHandlers: function() {
                this._cancelProxy = null, this._saveProxy = null, this.wrapper.off(B)
            },
            _cancel: function(e) {
                this.trigger(G, e)
            },
            _save: function() {
                this.trigger(O)
            },
            open: function() {
                this.window.center().open()
            },
            close: function() {
                this.window.bind("deactivate", S(this.destroy, this)).close()
            },
            destroy: function() {
                this.window.destroy(), this.window = null,
                    this._dettachHandlers(), d.fn.destroy.call(this)
            }
        }), h = w.extend({
            init: function(t, n) {
                if (w.fn.init.call(this, t, n), this._dataSource(this.options.dataSource), this._columns(), this._layout(), this._selectable(), this._sortable(), this._resizable(), this._filterable(), this._attachEvents(), this._toolbar(), this._scrollable(), this._reorderable(), this._columnMenu(), this._minScreenSupport(), this._draggable(), this.options.autoBind && this.dataSource.fetch(), this._hasLockedColumns) {
                    var i = this;
                    this.wrapper.addClass("k-grid-lockedcolumns"), this._resizeHandler = function() {
                        i.resize()
                    }, e(window).on("resize" + B, this._resizeHandler)
                }
                kendo.notify(this)
            },
            _draggable: function() {
                var t = this.options.editable;
                t && t.move && (this._dragging = new kendo.ui.HierarchicalDragAndDrop(this.wrapper, {
                    $angular: this.$angular,
                    autoScroll: !0,
                    filter: "tbody>tr",
                    itemSelector: "tr",
                    allowedContainers: this.wrapper,
                    hintText: function(t) {
                        var n = function() {
                                return e(this).text()
                            },
                            i = "<span class='k-header k-drag-separator' />";
                        return t.children("td").map(n).toArray().join(i)
                    },
                    contains: S(function(e, t) {
                        var n = this.dataItem(t),
                            i = this.dataItem(e);
                        return i == n || this.dataSource.contains(i, n)
                    }, this),
                    itemFromTarget: function(e) {
                        var t = e.closest("tr");
                        return {
                            item: t,
                            content: t
                        }
                    },
                    dragstart: S(function(e) {
                        this.wrapper.addClass("k-treelist-dragging");
                        var t = this.dataItem(e);
                        return this.trigger(ie, {
                            source: t
                        })
                    }, this),
                    drag: S(function(e) {
                        e.source = this.dataItem(e.source), this.trigger(re, e)
                    }, this),
                    drop: S(function(e) {
                        return e.source = this.dataItem(e.source), e.destination = this.dataItem(e.destination), this.wrapper.removeClass("k-treelist-dragging"), this.trigger(oe, e)
                    }, this),
                    dragend: S(function(e) {
                        var t = this.dataItem(e.destination),
                            n = this.dataItem(e.source);
                        n.set("parentId", t ? t.id : null), e.source = n, e.destination = t, this.trigger(ae, e)
                    }, this),
                    reorderable: !1,
                    dropHintContainer: function(e) {
                        return e.children("td:eq(1)")
                    },
                    dropPositionFrom: function(e) {
                        return e.prevAll(".k-i-none").length > 0 ? "after" : "before"
                    }
                }))
            },
            itemFor: function(e) {
                return "number" == typeof e && (e = this.dataSource.get(e)), this.tbody.find("[" + kendo.attr("uid") + "=" + e.uid + "]")
            },
            _scrollable: function() {
                var t, n, i;
                this.options.scrollable && (t = this.thead.closest(".k-grid-header-wrap"), n = e(this.lockedContent).bind("DOMMouseScroll" + B + " mousewheel" + B, S(this._wheelScroll, this)), this.content.bind("scroll" + B, function() {
                    t.scrollLeft(this.scrollLeft), n.scrollTop(this.scrollTop)
                }), i = kendo.touchScroller(this.content), i && i.movable && (this._touchScroller = i, i.movable.bind("change", function(e) {
                    t.scrollLeft(-e.sender.x), n && n.scrollTop(-e.sender.y)
                })))
            },
            _wheelScroll: function(t) {
                if (!t.ctrlKey) {
                    var n = kendo.wheelDeltaY(t);
                    n && (t.preventDefault(), e(t.currentTarget).one("wheel" + B, !1), this.content.scrollTop(this.content.scrollTop() + -n))
                }
            },
            _progress: function() {
                var e = this.options.messages;
                this.tbody.find("tr").length || this._showStatus(kendo.template("<span class='#= className #' /> #: messages.loading #")({
                    className: se.icon + " " + se.loading,
                    messages: e
                }))
            },
            _error: function(e) {
                this.dataSource.rootNodes().length || this._render({
                    error: e
                })
            },
            refresh: function(e) {
                e = e || {}, "itemchange" == e.action && this.editor || this.trigger(j) || (this._cancelEditor(), this._render(), this._adjustHeight(), this.trigger(q))
            },
            _angularFooters: function(e) {
                var t, n, i, r = this.dataSource.aggregates(),
                    o = this._footerItems();
                for (t = 0; o.length > t; t++) n = o.eq(t), i = r[n.attr("data-parentId")], this._angularFooter(e, n.find("td").get(), i)
            },
            _angularFooter: function(e, t, n) {
                var i = this.columns;
                this.angular(e, function() {
                    return {
                        elements: t,
                        data: T(i, function(e) {
                            return {
                                column: e,
                                aggregate: n && n[e.field]
                            }
                        })
                    }
                })
            },
            items: function() {
                return this._hasLockedColumns ? this._items(this.tbody).add(this._items(this.lockedTable)) : this._items(this.tbody)
            },
            _items: function(t) {
                return t.find("tr").filter(function() {
                    return !e(this).hasClass(se.footerTemplate)
                })
            },
            _footerItems: function() {
                var t = this.tbody;
                return this._hasLockedColumns && (t = t.add(this.lockedTable)), t.find("tr").filter(function() {
                    return e(this).hasClass(se.footerTemplate)
                })
            },
            dataItems: function() {
                var e, t, n, i = kendo.ui.DataBoundWidget.fn.dataItems.call(this);
                if (this._hasLockedColumns) {
                    for (e = i.length, t = Array(2 * e), n = e; --n >= 0;) t[n] = t[n + e] = i[n];
                    i = t
                }
                return i
            },
            _showStatus: function(t) {
                var n = this.element.find(".k-status"),
                    i = e(this.content).add(this.lockedContent);
                n.length || (n = e("<div class='k-status' />").appendTo(this.element)), this._contentTree.render([]), this._hasLockedColumns && this._lockedContentTree.render([]), i.hide(), n.html(t)
            },
            _hideStatus: function() {
                this.element.find(".k-status").remove(), e(this.content).add(this.lockedContent).show()
            },
            _adjustHeight: function() {
                var e, t, n = this.element,
                    i = n.find(z + se.gridContentWrap),
                    r = n.find(z + se.gridHeader),
                    o = n.find(z + se.gridToolbar),
                    a = kendo.support.scrollbar();
                n.height(this.options.height), t = function(e) {
                    var t, n;
                    return e[0].style.height ? !0 : (t = e.height(), e.height("auto"), n = e.height(), e.height(""), t != n)
                }, t(n) && (e = n.height() - r.outerHeight() - o.outerHeight(), i.height(e), this._hasLockedColumns && (a = this.table[0].offsetWidth > this.table.parent()[0].clientWidth ? a : 0, this.lockedContent.height(e - a)))
            },
            _resize: function() {
                this._applyLockedContainersWidth(), this._adjustHeight()
            },
            _minScreenSupport: function() {
                var t = this.hideMinScreenCols();
                t && (this.minScreenResizeHandler = S(this.hideMinScreenCols, this), e(window).on("resize", this.minScreenResizeHandler))
            },
            hideMinScreenCols: function() {
                var e, n, i, r = this.columns,
                    o = !1,
                    a = window.innerWidth > 0 ? window.innerWidth : screen.width;
                for (e = 0; r.length > e; e++) n = r[e], i = n.minScreenWidth, i !== t && null !== i && (o = !0, i > a ? this.hideColumn(n) : this.showColumn(n));
                return o
            },
            destroy: function() {
                w.fn.destroy.call(this);
                var t = this.dataSource;
                t.unbind(M, this._refreshHandler), t.unbind(R, this._errorHandler), t.unbind(P, this._progressHandler), this._resizeHandler && e(window).off("resize" + B, this._resizeHandler), this._dragging && (this._dragging.destroy(), this._dragging = null), this.resizable && (this.resizable.destroy(), this.resizable = null), this.reorderable && (this.reorderable.destroy(), this.reorderable = null), this._draggableInstance && this._draggableInstance.element && (this._draggableInstance.destroy(), this._draggableInstance = null), this.minScreenResizeHandler && e(window).off("resize", this.minScreenResizeHandler), this._destroyEditor(), this.element.off(B), this._touchScroller && this._touchScroller.destroy(), this._autoExpandable = null, this._refreshHandler = this._errorHandler = this._progressHandler = null, this.thead = this.content = this.tbody = this.table = this.element = this.lockedHeader = this.lockedContent = null, this._statusTree = this._headerTree = this._contentTree = this._lockedHeaderColsTree = this._lockedContentColsTree = this._lockedHeaderTree = this._lockedContentTree = null
            },
            options: {
                name: "TreeList",
                columns: [],
                autoBind: !0,
                scrollable: !0,
                selectable: !1,
                sortable: !1,
                toolbar: null,
                height: null,
                columnMenu: !1,
                messages: {
                    noRows: "No records to display",
                    loading: "Loading...",
                    requestFailed: "Request failed.",
                    retry: "Retry",
                    commands: {
                        edit: "Edit",
                        update: "Update",
                        canceledit: "Cancel",
                        create: "Add new record",
                        createchild: "Add child record",
                        destroy: "Delete",
                        excel: "Export to Excel",
                        pdf: "Export to PDF"
                    }
                },
                excel: {
                    hierarchy: !0
                },
                resizable: !1,
                filterable: !1,
                editable: !1,
                reorderable: !1
            },
            events: [M, N, O, W, V, U, j, q, G, ie, re, oe, ae, $, Y, K, X, J, Z, ee, te],
            _toggle: function(n, i) {
                var r = e.Deferred().resolve().promise(),
                    o = n.loaded();
                return n._error && (n.expanded = !1, n._error = t), !o && n.expanded ? r : (t === i && (i = !n.expanded), n.expanded = i, o || (r = this.dataSource.load(n).always(S(function() {
                    this._render(), this._syncLockedContentHeight()
                }, this))), this._render(), this._syncLockedContentHeight(), r)
            },
            expand: function(e) {
                return this._toggle(this.dataItem(e), !0)
            },
            collapse: function(e) {
                return this._toggle(this.dataItem(e), !1)
            },
            _toggleChildren: function(t) {
                var n = e(t.currentTarget),
                    i = this.dataItem(n),
                    r = i.expanded ? U : V;
                this.trigger(r, {
                    model: i
                }) || this._toggle(i), t.preventDefault()
            },
            _attachEvents: function() {
                var e = z + se.iconCollapse + ", ." + se.iconExpand + ", ." + se.refresh,
                    t = z + se.retry,
                    n = this.dataSource;
                this.element.on(H + B, e, S(this._toggleChildren, this)).on(L + B, t, S(n.fetch, n)).on(L + B, ".k-button[data-command]", S(this._commandClick, this))
            },
            _commandByName: function(t) {
                var n, i, r, o, a = this.columns,
                    s = e.isArray(this.options.toolbar) ? this.options.toolbar : [];
                if (t = t.toLowerCase(), le[t]) return le[t];
                for (n = 0; a.length > n; n++)
                    if (r = a[n].command)
                        for (i = 0; r.length > i; i++)
                            if (o = r[i].name, o && o.toLowerCase() == t) return r[i];
                for (n = 0; s.length > n; n++)
                    if (o = s[n].name, o && o.toLowerCase() == t) return s[n]
            },
            _commandClick: function(n) {
                var i = e(n.currentTarget),
                    r = i.attr("data-command"),
                    o = this._commandByName(r),
                    a = i.parentsUntil(this.wrapper, "tr");
                a = a.length ? a : t, o && (o.methodName ? this[o.methodName](a) : o.click && o.click.call(this, n), n.preventDefault())
            },
            _ensureExpandableColumn: function() {
                var e, t;
                this._autoExpandable && delete this._autoExpandable.expandable, e = D(this.columns, i(n("hidden"))), t = D(e, n("expandable")), this.columns.length && !t.length && (this._autoExpandable = e[0], e[0].expandable = !0)
            },
            _columns: function() {
                var e, t = this.options.columns || [];
                this.columns = T(t, function(e) {
                    return e = "string" == typeof e ? {
                        field: e
                    } : e, p({
                        encoded: !0
                    }, e)
                }), e = this._lockedColumns(), e.length > 0 && (this._hasLockedColumns = !0, this.columns = e.concat(this._nonLockedColumns())), this._ensureExpandableColumn(), this._columnTemplates(), this._columnAttributes()
            },
            _columnTemplates: function() {
                var e, t, n, i = this.columns;
                for (e = 0, t = i.length; t > e; e++) n = i[e], n.template && (n.template = kendo.template(n.template)), n.headerTemplate && (n.headerTemplate = kendo.template(n.headerTemplate)), n.footerTemplate && (n.footerTemplate = kendo.template(n.footerTemplate))
            },
            _columnAttributes: function() {
                function t(t) {
                    var n, i, r, o;
                    if (t && t.style)
                        for (n = t.style.split(";"), t.style = {}, i = 0; n.length > i; i++) r = n[i].split(":"), o = e.trim(r[0]), o && (t.style[e.camelCase(o)] = e.trim(r[1]))
                }
                var n, i, r = this.columns;
                for (n = 0, i = r.length; i > n; n++) t(r[n].attributes), t(r[n].headerAttributes)
            },
            _layout: function() {
                var e, t, n, i = this.columns,
                    r = this.element,
                    o = "";
                this.wrapper = r.addClass(se.wrapper), o = "<div class='#= gridHeader #'>", this._hasLockedColumns && (o += "<div class='k-grid-header-locked'><table role='grid'><colgroup></colgroup><thead role='rowgroup' /></table></div>"), o += "<div class='#= gridHeaderWrap #'><table role='grid'><colgroup></colgroup><thead role='rowgroup' /></table></div></div>", this._hasLockedColumns && (o += "<div class='k-grid-content-locked'><table role='treegrid' tabindex='0'><colgroup></colgroup><tbody /></table></div>"), o += "<div class='#= gridContentWrap # k-auto-scrollable'><table role='treegrid' tabindex='0'><colgroup></colgroup><tbody /></table></div>", this.options.scrollable || (o = "<table role='treegrid' tabindex='0'><colgroup></colgroup><thead class='#= gridHeader #' role='rowgroup' /><tbody /></table>"), this.options.toolbar && (o = "<div class='#= header # #= gridToolbar #' />" + o), r.append(kendo.template(o)(se) + "<div class='k-status' />"), this.toolbar = r.find(z + se.gridToolbar), e = r.find(z + se.gridHeader).find("thead").addBack().filter("thead"), this.thead = e.last(), this.options.scrollable && (t = kendo.support.isRtl(r), r.find("div." + se.gridHeader).css(t ? "padding-left" : "padding-right", kendo.support.scrollbar())), n = r.find(z + se.gridContentWrap), n.length ? this.content = n : n = r, this.table = n.find(">table"), this.tbody = this.table.find(">tbody"), this._hasLockedColumns && (this.lockedHeader = e.first().closest(".k-grid-header-locked"), this.lockedContent = r.find(".k-grid-content-locked"), this.lockedTable = this.lockedContent.children()), this._initVirtualTrees(), this._renderCols(), this._renderHeader(), this.angular("compile", function() {
                    return {
                        elements: e.find("th.k-header").get(),
                        data: T(i, function(e) {
                            return {
                                column: e
                            }
                        })
                    }
                })
            },
            _initVirtualTrees: function() {
                this._headerColsTree = new m.Tree(this.thead.prev()[0]), this._contentColsTree = new m.Tree(this.tbody.prev()[0]), this._headerTree = new m.Tree(this.thead[0]), this._contentTree = new m.Tree(this.tbody[0]), this._statusTree = new m.Tree(this.element.children(".k-status")[0]), this.lockedHeader && (this._lockedHeaderColsTree = new m.Tree(this.lockedHeader.find("colgroup")[0]), this._lockedContentColsTree = new m.Tree(this.lockedTable.find(">colgroup")[0]), this._lockedHeaderTree = new m.Tree(this.lockedHeader.find("thead")[0]), this._lockedContentTree = new m.Tree(this.lockedTable.find(">tbody")[0]))
            },
            _toolbar: function() {
                var t, n = this.options.toolbar,
                    i = this.toolbar;
                n && (e.isArray(n) ? (t = this._buildCommands(n), new m.Tree(i[0]).render(t)) : i.append(kendo.template(n)({})), this.angular("compile", function() {
                    return {
                        elements: i.get()
                    }
                }))
            },
            _lockedColumns: function() {
                return D(this.columns, n("locked"))
            },
            _nonLockedColumns: function() {
                return D(this.columns, i(n("locked")))
            },
            _templateColumns: function() {
                return D(this.columns, n("template"))
            },
            _flushCache: function() {
                this.options.$angular && this._templateColumns().length && (this._contentTree.render([]), this._hasLockedColumns && this._lockedContentTree.render([]))
            },
            _render: function(t) {
                var n, i, r;
                t = t || {}, n = this.options.messages, i = this.dataSource.rootNodes(), r = this.select().removeClass("k-state-selected").map(function(t, n) {
                    return e(n).attr(kendo.attr("uid"))
                }), this._absoluteIndex = 0, this._angularItems("cleanup"), this._angularFooters("cleanup"), this._flushCache(), t.error ? this._showStatus(kendo.template("#: messages.requestFailed # <button class='#= buttonClass #'>#: messages.retry #</button>")({
                    buttonClass: [se.button, se.retry].join(" "),
                    messages: n
                })) : i.length ? (this._hideStatus(), this._contentTree.render(this._trs({
                    columns: this._nonLockedColumns(),
                    aggregates: t.aggregates,
                    selected: r,
                    data: i,
                    visible: !0,
                    level: 0
                })), this._hasLockedColumns && (this._absoluteIndex = 0, this._lockedContentTree.render(this._trs({
                    columns: this._lockedColumns(),
                    aggregates: t.aggregates,
                    selected: r,
                    data: i,
                    visible: !0,
                    level: 0
                })))) : this._showStatus(kendo.htmlEncode(n.noRows)), this._touchScroller && this._touchScroller.contentResized(), this._muteAngularRebind(function() {
                    this._angularItems("compile"), this._angularFooters("compile")
                }), this._adjustRowsHeight()
            },
            _adjustRowsHeight: function() {
                var e, t, n, i, r, o, a, s, l, c, d, u, h, f;
                if (this._hasLockedColumns) {
                    for (e = this.table, t = this.lockedTable, n = e[0].rows, i = n.length, o = t[0].rows, a = e.add(t), s = a.length, l = [], c = this.lockedHeader.find("tr"), d = this.thead.find("tr"), c.add(d).height("auto").height(Math.max(c.height(), d.height())), r = 0; i > r && o[r]; r++) n[r].style.height && (n[r].style.height = o[r].style.height = ""), u = n[r].offsetHeight, h = o[r].offsetHeight, f = 0, u > h ? f = u : h > u && (f = h), l.push(f);
                    for (r = 0; s > r; r++) a[r].style.display = "none";
                    for (r = 0; i > r; r++) l[r] && (n[r].style.height = o[r].style.height = l[r] + 1 + "px");
                    for (r = 0; s > r; r++) a[r].style.display = ""
                }
            },
            _ths: function(e) {
                var t, n, i, r, o, a, s, l, c = [];
                for (s = 0, l = e.length; l > s; s++) t = e[s], i = [], r = [se.header], n = t.headerTemplate ? t.headerTemplate({}) : t.title || t.field || "", a = t.headerTemplate ? _(n) : v(n), i.push(t.sortable ? g("a", {
                    href: "#",
                    className: se.link
                }, [a]) : a), o = {
                    "data-field": t.field,
                    "data-title": t.title,
                    style: t.hidden === !0 ? {
                        display: "none"
                    } : {},
                    className: r.join(" "),
                    role: "columnheader"
                }, o = p(!0, {}, o, t.headerAttributes), c.push(g("th", o, i));
                return c
            },
            _cols: function(e) {
                var t, n, i, r = [];
                for (i = 0; e.length > i; i++) e[i].hidden !== !0 && (t = e[i].width, n = {}, t && 0 !== parseInt(t, 10) && (n.style = {
                    width: "string" == typeof t ? t : t + "px"
                }), r.push(g("col", n)));
                return r
            },
            _renderCols: function() {
                var e = this._nonLockedColumns();
                this._headerColsTree.render(this._cols(e)), this.options.scrollable && this._contentColsTree.render(this._cols(e)), this._hasLockedColumns && (e = this._lockedColumns(), this._lockedHeaderColsTree.render(this._cols(e)), this._lockedContentColsTree.render(this._cols(e)))
            },
            _renderHeader: function() {
                var e = this._nonLockedColumns();
                this._headerTree.render([g("tr", {
                    role: "row"
                }, this._ths(e))]), this._hasLockedColumns && (e = this._lockedColumns(), this._lockedHeaderTree.render([g("tr", {
                    role: "row"
                }, this._ths(e))]), this._applyLockedContainersWidth())
            },
            _applyLockedContainersWidth: function() {
                var e, t, n, i, r, o;
                this._hasLockedColumns && (e = s(this.lockedHeader.find(">table>colgroup>col")), t = this.thead.parent(), n = s(t.find(">colgroup>col")), i = this.wrapper[0].clientWidth, r = kendo.support.scrollbar(), e >= i && (e = i - 3 * r), this.lockedHeader.add(this.lockedContent).width(e), t.add(this.table).width(n), o = i - e - 2, this.content.width(o), t.parent().width(o - r))
            },
            _trs: function(t) {
                var n, i, r, o, a, s, l, c = [],
                    d = t.level,
                    u = t.data,
                    h = this.dataSource,
                    f = h.aggregates() || {},
                    p = t.columns;
                for (s = 0, l = u.length; l > s; s++) r = [], n = u[s], a = n.loaded() && h.childNodes(n), o = a && a.length, i = {
                    role: "row"
                }, i[kendo.attr("uid")] = n.uid, o && (i["aria-expanded"] = !!n.expanded), t.visible ? (this._absoluteIndex % 2 !== 0 && r.push(se.alt), this._absoluteIndex++) : i.style = {
                    display: "none"
                }, e.inArray(n.uid, t.selected) >= 0 && r.push(se.selected), o && r.push(se.group), n._edit && r.push("k-grid-edit-row"), i.className = r.join(" "), c.push(this._tds({
                    model: n,
                    attr: i,
                    level: d
                }, p, S(this._td, this))), o && (c = c.concat(this._trs({
                    columns: p,
                    aggregates: f,
                    selected: t.selected,
                    visible: t.visible && !!n.expanded,
                    data: a,
                    level: d + 1
                })));
                return this._hasFooterTemplate() && (i = {
                    className: se.footerTemplate,
                    "data-parentId": n.parentId
                }, t.visible || (i.style = {
                    display: "none"
                }), c.push(this._tds({
                    model: f[n.parentId],
                    attr: i,
                    level: d
                }, p, this._footerTd))), c
            },
            _footerTd: function(t) {
                var n = [],
                    i = t.column,
                    r = t.column.footerTemplate || e.noop,
                    o = t.model[i.field] || {},
                    s = {
                        role: "gridcell",
                        style: i.hidden === !0 ? {
                            display: "none"
                        } : {}
                    };
                return i.expandable && (n = n.concat(a({
                    level: t.level + 1,
                    className: se.iconPlaceHolder
                }))), i.attributes && p(s, i.attributes), n.push(_(r(o) || "")), g("td", s, n)
            },
            _hasFooterTemplate: function() {
                return !!D(this.columns, function(e) {
                    return e.footerTemplate
                }).length
            },
            _tds: function(e, t, n) {
                var i, r, o, a = [];
                for (r = 0, o = t.length; o > r; r++) i = t[r], a.push(n({
                    model: e.model,
                    column: i,
                    level: e.level
                }));
                return g("tr", e.attr, a)
            },
            _td: function(e) {
                var t, n = [],
                    i = e.model,
                    r = e.column,
                    o = {
                        role: "gridcell",
                        style: r.hidden === !0 ? {
                            display: "none"
                        } : {}
                    };
                return i._edit && r.field && i.editable(r.field) ? o[kendo.attr("container-for")] = r.field : (r.expandable && (n = a({
                    level: e.level,
                    className: se.iconPlaceHolder
                }), t = [se.icon], t.push(i.hasChildren ? i.expanded ? se.iconCollapse : se.iconExpand : se.iconHidden), i._error ? t.push(se.refresh) : !i.loaded() && i.expanded && t.push(se.loading), n.push(g("span", {
                    className: t.join(" ")
                })), o.style["white-space"] = "nowrap"), r.attributes && p(!0, o, r.attributes), r.command ? n = this._buildCommands(i._edit ? ["update", "canceledit"] : r.command) : n.push(this._cellContent(r, i))), g("td", o, n)
            },
            _cellContent: function(e, n) {
                var i;
                return e.template ? i = e.template(n) : e.field && (i = n.get(e.field), null !== i && e.format && (i = kendo.format(e.format, i))), (null === i || t === i) && (i = ""), e.template || !e.encoded ? _(i) : v(i)
            },
            _buildCommands: function(e) {
                var t, n = [];
                for (t = 0; e.length > t; t++) n.push(this._button(e[t]));
                return n
            },
            _button: function(e) {
                var t = (e.name || e).toLowerCase(),
                    n = this.options.messages.commands[t],
                    i = [];
                return e = p({}, le[t], {
                    text: n
                }, e), e.imageClass && i.push(g("span", {
                    className: ["k-icon", e.imageClass].join(" ")
                })), g("button", {
                    type: "button",
                    "data-command": t,
                    className: ["k-button k-button-icontext", e.className].join(" ")
                }, i.concat([v(e.text || e.name)]))
            },
            _positionResizeHandle: function(n) {
                var i, r, o, a = e(n.currentTarget),
                    s = this.resizeHandle,
                    l = a.position(),
                    c = l.left,
                    d = a.outerWidth(),
                    u = a.closest("div"),
                    h = n.clientX + e(window).scrollLeft(),
                    f = this.options.columnResizeHandleWidth || 3;
                return c += u.scrollLeft(), s || (s = this.resizeHandle = e('<div class="k-resize-handle"><div class="k-resize-handle-inner" /></div>')), i = a.offset().left + d, (r = h > i - f && i + f > h) ? (u.append(s), s.show().css({
                    top: l.top,
                    left: c + d - f - 1,
                    height: a.outerHeight(),
                    width: 3 * f
                }).data("th", a), o = this, s.off("dblclick" + B).on("dblclick" + B, function() {
                    var t = a.index();
                    e.contains(o.thead[0], a[0]) && (t += D(o.columns, function(e) {
                        return e.locked && !e.hidden
                    }).length), o.autoFitColumn(t)
                }), t) : (s.hide(), t)
            },
            autoFitColumn: function(t) {
                var n, i, a, s, l, c, d, u, h, f, p, m, g, v, _, b, w, y = this,
                    k = y.options,
                    x = y.columns,
                    C = kendo.support.browser,
                    S = y.lockedHeader ? o(y.lockedHeader.find(">table>thead")).filter(r).length : 0;
                if (t = "number" == typeof t ? x[t] : E(t) ? D(x, function(e) {
                    return e === t
                })[0] : D(x, function(e) {
                    return e.field === t
                })[0], t && !t.hidden) {
                    for (n = A(t, x), s = t.locked, a = s ? y.lockedHeader.children("table") : y.thead.parent(), i = a.find("[data-index='" + n + "']"), c = s ? y.lockedTable : y.table, d = y.footer || e(), y.footer && y.lockedContent && (d = y.footer.children(s ? ".k-grid-footer-locked" : ".k-grid-footer-wrap")), u = d.find("table").first(), y.lockedHeader && S >= n && !s && (n -= S), h = 0; x.length > h && x[h] !== t; h++) x[h].hidden && n--;
                    if (l = k.scrollable ? a.find("col:not(.k-group-col):not(.k-hierarchy-col):eq(" + n + ")").add(c.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq(" + n + ")")).add(u.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq(" + n + ")")) : c.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq(" + n + ")"), f = a.add(c).add(u), p = i.outerWidth(), l.width(""), f.css("table-layout", "fixed"), l.width("auto"), f.addClass("k-autofitting"), f.css("table-layout", ""), m = Math.ceil(Math.max(i.outerWidth(), c.find("tr").eq(0).children("td:visible").eq(n).outerWidth(), u.find("tr").eq(0).children("td:visible").eq(n).outerWidth())), l.width(m), t.width = m, k.scrollable) {
                        for (g = a.find("col"), _ = 0, b = 0, w = g.length; w > b; b += 1) {
                            if (v = g[b].style.width, !v || -1 != v.indexOf("%")) {
                                _ = 0;
                                break
                            }
                            _ += parseInt(v, 10)
                        }
                        _ && f.each(function() {
                            this.style.width = _ + "px"
                        })
                    }
                    C.msie && 8 == C.version && (f.css("display", "inline-table"), setTimeout(function() {
                        f.css("display", "table")
                    }, 1)), f.removeClass("k-autofitting"), y.trigger(J, {
                        column: t,
                        oldWidth: p,
                        newWidth: m
                    }), y._applyLockedContainersWidth(), y._syncLockedContentHeight(), y._syncLockedHeaderHeight()
                }
            },
            _adjustLockedHorizontalScrollBar: function() {
                var e = this.table,
                    t = e.parent(),
                    n = e[0].offsetWidth > t[0].clientWidth ? kendo.support.scrollbar() : 0;
                this.lockedContent.height(t.height() - n)
            },
            _syncLockedContentHeight: function() {
                this.lockedTable && (this._touchScroller || this._adjustLockedHorizontalScrollBar(), this._adjustRowsHeight(this.table, this.lockedTable))
            },
            _syncLockedHeaderHeight: function() {
                var e, t;
                this.lockedHeader && (e = this.lockedHeader.children("table"), t = this.thead.parent(), this._adjustRowsHeight(e, t), l(e, t))
            },
            _resizable: function() {
                if (this.options.resizable) {
                    this.resizable && this.resizable.destroy();
                    var t = this;
                    e(this.lockedHeader).find("thead").add(this.thead).on("mousemove" + B, "th", e.proxy(this._positionResizeHandle, this)), this.resizable = new kendo.ui.Resizable(this.wrapper, {
                        handle: ".k-resize-handle",
                        start: function(n) {
                            var i, r, o = e(n.currentTarget).data("th"),
                                a = "col:eq(" + e.inArray(o[0], o.parent().children().filter(":visible")) + ")";
                            t.wrapper.addClass("k-grid-column-resizing"), t.lockedHeader && e.contains(t.lockedHeader[0], o[0]) ? (i = t.lockedHeader, r = t.lockedTable) : (i = t.thead.parent(), r = t.table), this.col = r.children("colgroup").find(a).add(i.find(a)), this.th = o, this.startLocation = n.x.location, this.columnWidth = o.outerWidth(), this.table = this.col.closest("table"), this.totalWidth = this.table.width()
                        },
                        resize: function(e) {
                            var t = 11,
                                n = e.x.location - this.startLocation;
                            t > this.columnWidth + n && (n = t - this.columnWidth), this.table.width(this.totalWidth + n), this.col.width(this.columnWidth + n)
                        },
                        resizeend: function() {
                            var e, n, i;
                            t.wrapper.removeClass("k-grid-column-resizing"), e = this.th.attr("data-field"), n = D(t.columns, function(t) {
                                return t.field == e
                            }), i = Math.floor(this.th.outerWidth()), n[0].width = i, t._resize(), t._adjustRowsHeight(), t.trigger(J, {
                                column: n,
                                oldWidth: this.columnWidth,
                                newWidth: i
                            }), this.table = this.col = this.th = null
                        }
                    })
                }
            },
            _sortable: function() {
                var t, n, i, r, o, a = this.columns,
                    s = e(this.lockedHeader).add(this.thead).find("th"),
                    l = kendo.attr("field"),
                    c = this.options.sortable;
                if (c)
                    for (r = 0, o = s.length; o > r; r++) t = a[r], t.sortable !== !1 && !t.command && t.field && (i = s.eq(r), n = i.data("kendoColumnSorter"), n && n.destroy(), i.attr(l, t.field).kendoColumnSorter(p({}, c, t.sortable, {
                        dataSource: this.dataSource
                    })))
            },
            _filterable: function() {
                var t, n, i, r, o, a, s = e(this.lockedHeader).add(this.thead).find("th"),
                    l = this.options.filterable;
                if (l && !this.options.columnMenu)
                    for (a = S(function(e) {
                        this.trigger($, {
                            field: e.field,
                            container: e.container
                        })
                    }, this), t = 0, n = s.length; n > t; t++) i = this.columns[t], r = s.eq(t), o = r.data("kendoFilterMenu"), o && o.destroy(), i.command || i.filterable === !1 || r.kendoFilterMenu(p(!0, {}, l, i.filterable, {
                        dataSource: this.dataSource,
                        init: a
                    }))
            },
            _change: function() {
                this.trigger(M)
            },
            _selectable: function() {
                var e, n, i = this.options.selectable,
                    r = this.table;
                i && (i = kendo.ui.Selectable.parseOptions(i), this._hasLockedColumns && (r = r.add(this.lockedTable), n = i.multiple && i.cell), e = ">tbody>tr:not(.k-footer-template)", i.cell && (e += ">td"), this.selectable = new kendo.ui.Selectable(r, {
                    filter: e,
                    aria: !0,
                    multiple: i.multiple,
                    change: S(this._change, this),
                    useAllItems: n,
                    continuousItems: S(this._continuousItems, this, e, i.cell),
                    relatedTarget: !i.cell && this._hasLockedColumns ? S(this._selectableTarget, this) : t
                }))
            },
            _continuousItems: function(t, n) {
                var i, r, o, a, s, l;
                if (this.lockedContent) {
                    for (i = e(t, this.lockedTable), r = e(t, this.table), o = n ? this._lockedColumns().length : 1, a = n ? this.columns.length - o : 1, s = [], l = 0; i.length > l; l += o) F.apply(s, i.slice(l, l + o)), F.apply(s, r.splice(0, a));
                    return s
                }
            },
            _selectableTarget: function(t) {
                var n, i, r, o = e();
                for (i = 0, r = t.length; r > i; i++) n = this._relatedRow(t[i]), A(n[0], t) < 0 && (o = o.add(n));
                return o
            },
            _relatedRow: function(t) {
                var n, i, r = this.lockedTable;
                return t = e(t), r ? (n = t.closest(this.table.add(this.lockedTable)), i = n.find(">tbody>tr").index(t), n = n[0] === this.table[0] ? r : this.table, n.find(">tbody>tr").eq(i)) : t
            },
            select: function(n) {
                var i = this.selectable;
                return i ? (t !== n && (i.options.multiple || (i.clear(), n = n.first()), this._hasLockedColumns && (n = n.add(e.map(n, S(this._relatedRow, this))))), i.value(n)) : e()
            },
            clearSelection: function() {
                var e = this.select();
                e.length && (this.selectable.clear(), this.trigger(M))
            },
            _dataSource: function(e) {
                var t = this.dataSource;
                t && (t.unbind(M, this._refreshHandler), t.unbind(R, this._errorHandler), t.unbind(P, this._progressHandler)), this._refreshHandler = S(this.refresh, this), this._errorHandler = S(this._error, this), this._progressHandler = S(this._progress, this), t = this.dataSource = c.create(e), t.bind(M, this._refreshHandler), t.bind(R, this._errorHandler), t.bind(P, this._progressHandler)
            },
            setDataSource: function(e) {
                this._dataSource(e), this._sortable(), this._filterable(), this._contentTree.render([]), this.options.autoBind && this.dataSource.fetch()
            },
            dataItem: function(t) {
                var n, i;
                return t instanceof ce ? t : (n = e(t).closest("tr"), i = this.dataSource.getByUid(n.attr(kendo.attr("uid"))))
            },
            editRow: function(e) {
                var t;
                typeof e === I && (e = this.tbody.find(e)), t = this.dataItem(e), t && ("popup" != this._editMode() && (t._edit = !0), this._cancelEditor(), this._render(), this._createEditor(t), this.trigger(N, {
                    container: this.editor.wrapper,
                    model: t
                }))
            },
            _cancelEdit: function(e) {
                e = p(e, {
                    container: this.editor.wrapper,
                    model: this.editor.model
                }), this.trigger(G, e) || this.cancelRow()
            },
            cancelRow: function() {
                this._cancelEditor(), this._render()
            },
            saveRow: function() {
                var e, t = this.editor;
                t && (e = {
                    model: t.model,
                    container: t.wrapper
                }, t.end() && !this.trigger(O, e) && this.dataSource.sync())
            },
            addRow: function(e) {
                var n = this.editor,
                    i = 0,
                    r = {};
                if (!n || n.end()) return e ? (e instanceof ce || (e = this.dataItem(e)), r[e.parentIdField] = e.id, i = this.dataSource.indexOf(e) + 1, this.expand(e).then(S(this._insertAt, this, r, i)), t) : (this._insertAt(r, i), t)
            },
            _insertAt: function(e, t) {
                e = this.dataSource.insert(t, e);
                var n = this.itemFor(e);
                this.editRow(n)
            },
            removeRow: function(e) {
                var t = this.dataItem(e),
                    n = {
                        model: t,
                        row: e
                    };
                t && !this.trigger(W, n) && (this.dataSource.remove(t), this.dataSource.sync())
            },
            _cancelEditor: function() {
                var e, t = this.editor;
                t && (e = t.model, this._destroyEditor(), this.dataSource.cancelChanges(e), e._edit = !1)
            },
            _destroyEditor: function() {
                this.editor && (this.editor.close(), this.editor = null)
            },
            _createEditor: function(e) {
                var t, n, i = this.itemFor(e);
                i = i.add(this._relatedRow(i)), t = this._editMode(), n = {
                    columns: this.columns,
                    model: e,
                    target: this,
                    clearContainer: !1,
                    template: this.options.editable.template
                }, "inline" == t ? this.editor = new d(i, n) : (p(n, {
                    window: this.options.editable.window,
                    commandRenderer: S(function() {
                        return this._buildCommands(["update", "canceledit"])
                    }, this),
                    fieldRenderer: this._cellContent,
                    save: S(this.saveRow, this),
                    cancel: S(this._cancelEdit, this),
                    appendTo: this.wrapper
                }), this.editor = new u(i, n))
            },
            _editMode: function() {
                var e = "inline",
                    t = this.options.editable;
                return t !== !0 && (e = "string" == typeof t ? t : t.mode || e), e.toLowerCase()
            },
            hideColumn: function(e) {
                this._toggleColumnVisibility(e, !0)
            },
            showColumn: function(e) {
                this._toggleColumnVisibility(e, !1)
            },
            _toggleColumnVisibility: function(e, t) {
                e = this._findColumn(e), e && e.hidden !== t && (e.hidden = t, this._ensureExpandableColumn(), this._renderCols(), this._renderHeader(), this._render(), this._adjustTablesWidth(), this.trigger(t ? Y : K, {
                    column: e
                }), t || e.width || this.table.add(this.thead.closest("table")).width(""))
            },
            _findColumn: function(e) {
                return e = "number" == typeof e ? this.columns[e] : E(e) ? D(this.columns, function(t) {
                    return t === e
                })[0] : D(this.columns, function(t) {
                    return t.field === e
                })[0]
            },
            _adjustTablesWidth: function() {
                var e, t, n, i = this.thead.prev().children(),
                    r = 0;
                for (e = 0, t = i.length; t > e; e++) {
                    if (n = i[e].style.width, !n || -1 != n.indexOf("%")) {
                        r = 0;
                        break
                    }
                    r += parseInt(n, 10)
                }
                r && this.table.add(this.thead.closest("table")).width(r)
            },
            _reorderable: function() {
                var t, n, i;
                this.options.reorderable && (t = this.options.scrollable === !0, n = (t ? ".k-grid-header:first " : "table:first>.k-grid-header ") + Q, i = this, this._draggableInstance = new b.Draggable(this.wrapper, {
                    group: kendo.guid(),
                    filter: n,
                    hint: function(t) {
                        return e('<div class="k-header k-drag-clue" />').css({
                            width: t.width(),
                            paddingLeft: t.css("paddingLeft"),
                            paddingRight: t.css("paddingRight"),
                            lineHeight: t.height() + "px",
                            paddingTop: t.css("paddingTop"),
                            paddingBottom: t.css("paddingBottom")
                        }).html(t.attr(kendo.attr("title")) || t.attr(kendo.attr("field")) || t.text()).prepend('<span class="k-icon k-drag-status k-denied" />')
                    }
                }), this.reorderable = new b.Reorderable(this.wrapper, {
                    draggable: this._draggableInstance,
                    dragOverContainers: S(this._allowDragOverContainers, this),
                    inSameContainer: function(t) {
                        return e(t.source).parent()[0] === e(t.target).parent()[0]
                    },
                    change: function(e) {
                        var t = e.newIndex,
                            n = e.oldIndex,
                            r = "before" === e.position,
                            o = i.columns[n];
                        i.trigger(X, {
                            newIndex: t,
                            oldIndex: n,
                            column: o
                        }), i.reorderColumn(t, o, r)
                    }
                }))
            },
            _allowDragOverContainers: function(e) {
                return this.columns[e].lockable !== !1
            },
            reorderColumn: function(n, i, r) {
                var o, a, s, l = this.columns,
                    c = A(i, l),
                    d = l[n],
                    u = !!d.locked,
                    h = this._nonLockedColumns().length;
                c !== n && (!u || i.locked || 1 != h) && (u || !i.locked || l.length - h != 1) && (r === t && (r = c > n), o = !!i.locked, o = o != u, i.locked = u, l.splice(r ? n : n + 1, 0, i), l.splice(n > c ? c : c + 1, 1), this._renderCols(), a = e(this.lockedHeader).add(this.thead).find("th"), a.eq(c)[r ? "insertBefore" : "insertAfter"](a.eq(n)), s = this._headerTree.children[0].children, this._hasLockedColumns && (s = this._lockedHeaderTree.children[0].children.concat(s)), s.splice(r ? n : n + 1, 0, s[c]), s.splice(n > c ? c : c + 1, 1), this._hasLockedColumns && (this._lockedHeaderTree.children[0].children = s.splice(0, this._lockedColumns().length), this._headerTree.children[0].children = s), this._applyLockedContainersWidth(), this.refresh(), o && (u ? this.trigger(ee, {
                    column: i
                }) : this.trigger(te, {
                    column: i
                })))
            },
            lockColumn: function(e) {
                var t, n = this.columns;
                e = "number" == typeof e ? n[e] : D(n, function(t) {
                    return t.field === e
                })[0], e && !e.hidden && (t = this._lockedColumns().length - 1, this.reorderColumn(t, e, !1))
            },
            unlockColumn: function(e) {
                var t, n = this.columns;
                e = "number" == typeof e ? n[e] : D(n, function(t) {
                    return t.field === e
                })[0], e && !e.hidden && (t = this._lockedColumns().length, this.reorderColumn(t, e, !0))
            },
            _columnMenu: function() {
                var t, n, i, r, o, a, s = e(this.lockedHeader).add(this.thead).find("th"),
                    l = this.columns,
                    c = this.options,
                    d = c.columnMenu,
                    u = S(this._columnMenuInit, this),
                    h = this._lockedColumns().length;
                if (d)
                    for ("boolean" == typeof d && (d = {}), a = 0; s.length > a; a++) t = l[a], t.field && (n = s.eq(a).data("kendoColumnMenu"), n && n.destroy(), r = !1, t.sortable !== !1 && d.sortable !== !1 && c.sortable !== !1 && (r = p({}, c.sortable, {
                        compare: (t.sortable || {}).compare
                    })), o = !1, c.filterable && t.filterable !== !1 && d.filterable !== !1 && (o = p({
                        pane: this.pane
                    }, t.filterable, c.filterable)), i = {
                        dataSource: this.dataSource,
                        values: t.values,
                        columns: d.columns,
                        sortable: r,
                        filterable: o,
                        messages: d.messages,
                        owner: this,
                        closeCallback: e.noop,
                        init: u,
                        pane: this.pane,
                        lockedColumns: t.lockable !== !1 && h > 0
                    }, c.$angular && (i.$angular = c.$angular), s.eq(a).kendoColumnMenu(i))
            },
            _columnMenuInit: function(e) {
                this.trigger(Z, {
                    field: e.field,
                    container: e.container
                })
            }
        }), kendo.ExcelMixin && kendo.ExcelMixin.extend(h.prototype), kendo.PDFMixin && (kendo.PDFMixin.extend(h.prototype), h.fn._drawPDF = function(t) {
            var n = new e.Deferred;
            return this._drawPDFShadow({
                width: this.wrapper.width()
            }, {
                avoidLinks: this.options.pdf.avoidLinks
            }).done(function(e) {
                var i = {
                    page: e,
                    pageNumber: 1,
                    progress: 1,
                    totalPages: 1
                };
                t.notify(i), n.resolve(i.page)
            }).fail(function(e) {
                n.reject(e)
            }), n
        }), p(!0, kendo.data, {
            TreeListDataSource: c,
            TreeListModel: ce
        }), p(!0, kendo.ui, {
            TreeList: h
        }), b.plugin(h)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("util/parse-xml.min", ["kendo.core.min", "util/main.min"], e)
}(function() {
    "use strict";

    function e(e) {
        var t, n = [];
        for (t = 0; e.length > t; ++t) n.push(e.charCodeAt(t));
        return n
    }

    function t(e, t) {
        t > 65535 ? (t -= 65536, e.push(t >>> 10 & 1023 | 55296, 56320 | 1023 & t)) : e.push(t)
    }

    function n(e, n) {
        function C(n) {
            var i = e[q++];
            240 & i ^ 240 ? 224 & i ^ 224 ? 192 & i ^ 192 ? n.push(i) : t(n, (31 & i) << 6 | 63 & e[q++]) : t(n, (15 & i) << 12 | (63 & e[q++]) << 6 | 63 & e[q++]) : t(n, (3 & i) << 18 | (63 & e[q++]) << 12 | (63 & e[q++]) << 6 | 63 & e[q++])
        }

        function S(e) {
            throw Error(e + ", at " + q)
        }

        function T(t) {
            for (var n = []; e.length > q && t(e[q]);) n.push(e[q++]);
            return n
        }

        function D(e) {
            return i.apply(0, T(e))
        }

        function A() {
            T(I)
        }

        function E(t) {
            var n, i = q;
            for (n = 0; t.length > n; ++n)
                if (e[q++] != t[n]) return q = i, !1;
            return t
        }

        function F(e) {
            E(e) || S("Expecting " + e.join(", "))
        }

        function I(e) {
            return 9 == e || 10 == e || 13 == e || 32 == e
        }

        function M(e) {
            return e >= 48 && 57 >= e
        }

        function R(e) {
            return e >= 48 && 57 >= e || (e |= 32) >= 97 && 102 >= e
        }

        function P(e) {
            return 58 == e || 95 == e || (e |= 32) >= 97 && 122 >= e
        }

        function z(e) {
            return 45 == e || M(e) || P(e)
        }

        function B() {
            for (var t = []; e.length > q;) {
                if (E(s)) return j("comment", i.apply(0, t));
                C(t)
            }
        }

        function L() {
            var e, t;
            E(h) ? U() : E(l) ? B() : (e = N(), t = W(e), G.push(t), E(c) ? j("enter", e, t, !0) : (F(p), j("enter", e, t), H(e), e != N() && S("Bad closing tag"), j("leave", e, t), A(), F(p)), G.pop())
        }

        function H(t) {
            for (var n = []; e.length > q;) {
                if (E(d)) return n.length && j("text", i.apply(0, n));
                if (E(o))
                    for (; e.length > q && !E(a);) C(n);
                else E(f) ? (n.length && j("text", i.apply(0, n)), L(), n = []) : E(v) ? V(n) : C(n)
            }
            S("Unclosed tag " + t)
        }

        function N() {
            return P(e[q]) || S("Expecting XML name"), D(z)
        }

        function O() {
            var t, n = E(_) || E(b);
            for (n || S("Expecting string"), t = []; e.length > q;) {
                if (E(n)) return i.apply(0, t);
                E(v) ? V(t) : C(t)
            }
            S("Unfinished string")
        }

        function V(e) {
            var n, i;
            E(w) ? (n = E(y) || E(k) ? parseInt(D(R), 16) : parseInt(D(M), 10), isNaN(n) && S("Bad numeric entity")) : (i = N(), n = r[i], void 0 === n && S("Unknown entity " + i)), t(e, n), F(m)
        }

        function U() {
            j("decl", N(), W()), F(u)
        }

        function W(t) {
            for (var n, i = {
                $tag: t
            }; e.length > q && (A(), n = e[q], 63 != n && 62 != n && 47 != n);) i[N()] = (F(g), O());
            return i
        }

        function j(e, t, i, r) {
            var o = n && n[e];
            o && o.call($, t, i, r)
        }
        var q = 0,
            G = [],
            $ = {
                is: function(e) {
                    for (var t = G.length, n = e.length; --t >= 0 && --n >= 0;)
                        if (G[t].$tag != e[n] && "*" != e[n]) return !1;
                    return 0 > n ? G[G.length - 1] : null
                },
                exit: function() {
                    throw x
                },
                stack: G
            },
            Y = [];
        for (C(Y), 65279 != Y[0] && (q = 0); e.length > q;) A(), F(f), L(), A()
    }
    var i = String.fromCharCode,
        r = {
            amp: 38,
            lt: 60,
            gt: 62,
            quot: 34,
            nbsp: 160
        },
        o = e("<![CDATA["),
        a = e("]]>"),
        s = e("-->"),
        l = e("!--"),
        c = e("/>"),
        d = e("</"),
        u = e("?>"),
        h = e("?"),
        f = e("<"),
        p = e(">"),
        m = e(";"),
        g = e("="),
        v = e("&"),
        _ = e('"'),
        b = e("'"),
        w = e("#"),
        y = e("x"),
        k = e("X"),
        x = {};
    kendo.util.parseXML = function() {
        try {
            return n.apply(this, arguments)
        } catch (e) {
            if (e !== x) throw e
        }
    }
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/commands.min", ["kendo.core.min", "kendo.binder.min", "kendo.window.min", "kendo.list.min", "kendo.tabstrip.min"], e)
}(function() {
    ! function(e) {
        var t, n, i, r, o, a;
        e.support.browser.msie && 9 > e.support.browser.version || (t = e.jQuery, n = e.spreadsheet.Command = e.Class.extend({
            init: function(e) {
                this.options = e, this._workbook = e.workbook, this._property = e && e.property, this._state = {}
            },
            range: function(e) {
                return void 0 !== e && (this._range = e), this._range
            },
            redo: function() {
                this.exec()
            },
            undo: function() {
                this.range().setState(this._state)
            },
            getState: function() {
                this._state = this.range().getState(this._property)
            },
            _forEachCell: function(e) {
                var t = this.range(),
                    n = t._ref;
                n.forEach(function(n) {
                    t.sheet().forEach(n.toRangeRef(), e.bind(this))
                }.bind(this))
            }
        }), i = e.spreadsheet.PropertyChangeCommand = n.extend({
            init: function(e) {
                n.fn.init.call(this, e), this._value = e.value
            },
            exec: function() {
                var e = this.range();
                this.getState(), e[this._property](this._value)
            }
        }), e.spreadsheet.ClearContentCommand = n.extend({
            exec: function() {
                this.getState(), this.range().clearContent()
            }
        }), e.spreadsheet.EditCommand = i.extend({
            init: function(e) {
                e.property = "input", i.fn.init.call(this, e)
            },
            rejectState: function(e) {
                return this.undo(), {
                    title: e.title,
                    body: e.message,
                    reason: "error",
                    type: "validationError"
                }
            },
            exec: function() {
                var t, n = this.range(),
                    i = this._value;
                this.getState();
                try {
                    if (n.input(i), t = n._getValidationState()) return this.rejectState(t)
                } catch (r) {
                    if (!(r instanceof e.spreadsheet.calc.ParseError)) throw r;
                    try {
                        if (n.input(i + ")"), t = n._getValidationState()) return this.rejectState(t)
                    } catch (o) {
                        if (o instanceof e.spreadsheet.calc.ParseError) return n.input("'" + i), {
                            title: "Error in formula",
                            body: r + "",
                            reason: "error"
                        }
                    }
                }
            }
        }), e.spreadsheet.TextWrapCommand = i.extend({
            init: function(e) {
                e.property = "wrap", i.fn.init.call(this, e), this._value = e.value
            },
            getState: function() {
                var e = {};
                this.range().forEachRow(function(t) {
                    var n = t.topLeft().row;
                    e[n] = t.sheet().rowHeight(n)
                }), this._state = this.range().getState(this._property), this._rowHeight = e
            },
            undo: function() {
                var e, t = this.range().sheet(),
                    n = this._rowHeight;
                this.range().setState(this._state);
                for (e in n) t.rowHeight(e, n[e])
            }
        }), e.spreadsheet.AdjustDecimalsCommand = n.extend({
            init: function(e) {
                this._decimals = e.value, e.property = "format", n.fn.init.call(this, e)
            },
            exec: function() {
                var t = this.range().sheet(),
                    n = this._decimals,
                    i = e.spreadsheet.formatting;
                this.getState(), t.batch(function() {
                    this.range().forEachCell(function(e, r, o) {
                        var a = o.format;
                        (a || n > 0) && (a = i.adjustDecimals(a || "#", n), t.range(e, r).format(a))
                    })
                }.bind(this))
            }
        }), e.spreadsheet.BorderChangeCommand = n.extend({
            init: function(e) {
                e.property = "border", n.fn.init.call(this, e), this._type = e.border, this._style = e.style
            },
            exec: function() {
                this.getState(), this[this._type](this._style)
            },
            noBorders: function() {
                var e = this.range();
                e.sheet().batch(function() {
                    e.borderLeft(null).borderTop(null).borderRight(null).borderBottom(null)
                }.bind(this), {})
            },
            allBorders: function(e) {
                var t = this.range();
                t.sheet().batch(function() {
                    t.borderLeft(e).borderTop(e).borderRight(e).borderBottom(e)
                }.bind(this), {})
            },
            leftBorder: function(e) {
                this.range().leftColumn().borderLeft(e)
            },
            rightBorder: function(e) {
                this.range().rightColumn().borderRight(e)
            },
            topBorder: function(e) {
                this.range().topRow().borderTop(e)
            },
            bottomBorder: function(e) {
                this.range().bottomRow().borderBottom(e)
            },
            outsideBorders: function(e) {
                var t = this.range();
                t.sheet().batch(function() {
                    t.leftColumn().borderLeft(e), t.topRow().borderTop(e), t.rightColumn().borderRight(e), t.bottomRow().borderBottom(e)
                }.bind(this), {})
            },
            insideBorders: function(e) {
                this.range().sheet().batch(function() {
                    this.allBorders(e), this.outsideBorders(null)
                }.bind(this), {})
            },
            insideHorizontalBorders: function(e) {
                var t = this.range();
                t.sheet().batch(function() {
                    t.borderBottom(e), t.bottomRow().borderBottom(null)
                }.bind(this), {})
            },
            insideVerticalBorders: function(e) {
                var t = this.range();
                t.sheet().batch(function() {
                    t.borderRight(e), t.rightColumn().borderRight(null)
                }.bind(this), {})
            }
        }), e.spreadsheet.MergeCellCommand = n.extend({
            init: function(e) {
                n.fn.init.call(this, e), this._type = e.value
            },
            exec: function() {
                this.getState(), this[this._type]()
            },
            activate: function(e) {
                this.range().sheet().activeCell(e)
            },
            getState: function() {
                this._state = this.range().getState()
            },
            undo: function() {
                "unmerge" !== this._type && (this.range().unmerge(), this.activate(this.range().topLeft())), this.range().setState(this._state)
            },
            cells: function() {
                var e = this.range(),
                    t = e._ref;
                e.merge(), this.activate(t)
            },
            horizontally: function() {
                var e = this.range().topRow()._ref;
                this.range().forEachRow(function(e) {
                    e.merge()
                }), this.activate(e)
            },
            vertically: function() {
                var e = this.range().leftColumn()._ref;
                this.range().forEachColumn(function(e) {
                    e.merge()
                }), this.activate(e)
            },
            unmerge: function() {
                var e = this.range(),
                    t = e._ref.topLeft;
                e.unmerge(), this.activate(t)
            }
        }), e.spreadsheet.FreezePanesCommand = n.extend({
            init: function(e) {
                n.fn.init.call(this, e), this._type = e.value
            },
            exec: function() {
                this.getState(), this._topLeft = this.range().topLeft(), this[this._type]()
            },
            getState: function() {
                this._state = this.range().sheet().getState()
            },
            undo: function() {
                this.range().sheet().setState(this._state)
            },
            panes: function() {
                var e = this._topLeft,
                    t = this.range().sheet();
                t.frozenColumns(e.col).frozenRows(e.row)
            },
            rows: function() {
                var e = this._topLeft,
                    t = this.range().sheet();
                t.frozenRows(e.row)
            },
            columns: function() {
                var e = this._topLeft,
                    t = this.range().sheet();
                t.frozenColumns(e.col)
            },
            unfreeze: function() {
                var e = this.range().sheet();
                e.frozenRows(0).frozenColumns(0)
            }
        }), e.spreadsheet.PasteCommand = n.extend({
            init: function(e) {
                n.fn.init.call(this, e), this._clipboard = this._workbook.clipboard()
            },
            getState: function() {
                this._range = this._workbook.activeSheet().range(this._clipboard.pasteRef()), this._state = this._range.getState()
            },
            exec: function() {
                var e, t = this._clipboard.canPaste();
                return this._clipboard.menuInvoked = !0, t.canPaste ? (this.getState(), this._clipboard.paste(), e = this._workbook.activeSheet().range(this._clipboard.pasteRef()), void e._adjustRowHeight()) : t.menuInvoked ? {
                    reason: "error",
                    type: "useKeyboard"
                } : t.pasteOnMerged ? {
                    reason: "error",
                    type: "modifyMerged"
                } : t.overflow ? {
                    reason: "error",
                    type: "overflow"
                } : {
                    reason: "error"
                }
            }
        }), e.spreadsheet.AdjustRowHeightCommand = n.extend({
            exec: function() {
                var e = this.options,
                    t = this._workbook.activeSheet(),
                    n = e.range || t.range(e.rowIndex);
                n._adjustRowHeight()
            }
        }), e.spreadsheet.ToolbarPasteCommand = n.extend({
            exec: function() {
                return e.support.clipboard.paste ? (this._workbook._view.clipboard.focus().select(), void document.execCommand("paste")) : {
                    reason: "error",
                    type: "useKeyboard"
                }
            }
        }), e.spreadsheet.CopyCommand = n.extend({
            init: function(e) {
                n.fn.init.call(this, e), this._clipboard = e.workbook.clipboard()
            },
            undo: t.noop,
            exec: function() {
                var e = this._clipboard.canCopy();
                if (this._clipboard.menuInvoked = !0, e.canCopy) this._clipboard.copy();
                else {
                    if (e.menuInvoked) return {
                        reason: "error",
                        type: "useKeyboard"
                    };
                    if (e.multiSelection) return {
                        reason: "error",
                        type: "unsupportedSelection"
                    }
                }
            }
        }), e.spreadsheet.ToolbarCopyCommand = n.extend({
            init: function(e) {
                n.fn.init.call(this, e), this._clipboard = e.workbook.clipboard()
            },
            undo: t.noop,
            exec: function() {
                var n, i;
                return e.support.clipboard.copy ? (n = this._workbook._view.clipboard, i = document.createElement("textarea"), t(i).addClass("k-spreadsheet-clipboard").val(n.html()).appendTo(document.body).focus().select(), document.execCommand("copy"), n.trigger("copy"), t(i).remove(), void 0) : {
                    reason: "error",
                    type: "useKeyboard"
                }
            }
        }), e.spreadsheet.CutCommand = n.extend({
            init: function(e) {
                n.fn.init.call(this, e), this._clipboard = e.workbook.clipboard()
            },
            exec: function() {
                this._clipboard.canCopy() && (this.getState(), this._clipboard.cut())
            }
        }), e.spreadsheet.AutoFillCommand = n.extend({
            init: function(e) {
                n.fn.init.call(this, e)
            },
            origin: function(e) {
                this._origin = e
            },
            exec: function() {
                this.getState(), this.range().fillFrom(this._origin)
            }
        }), e.spreadsheet.ToolbarCutCommand = n.extend({
            init: function(e) {
                n.fn.init.call(this, e), this._clipboard = e.workbook.clipboard()
            },
            exec: function() {
                var n, i;
                return e.support.clipboard.copy ? (n = this._workbook._view.clipboard, i = document.createElement("textarea"), t(i).val(n.html()).appendTo(document.body).focus().select(), document.execCommand("copy"), n.trigger("cut"), t(i).remove(), void 0) : {
                    reason: "error",
                    type: "useKeyboard"
                }
            }
        }), e.spreadsheet.FilterCommand = n.extend({
            undo: function() {
                this.range().filter(this._state)
            },
            exec: function() {
                var e = this.range();
                if (this._state = e.hasFilter(), e.hasFilter()) e.filter(!1);
                else {
                    if (e.intersectingMerged().length) return {
                        reason: "error",
                        type: "filterRangeContainingMerges"
                    };
                    e.filter(!0)
                }
            }
        }), e.spreadsheet.SortCommand = n.extend({
            undo: function() {
                var e = this.range().sheet();
                e.setState(this._state)
            },
            exec: function() {
                var e = this.range(),
                    t = e.sheet(),
                    n = t.activeCell(),
                    i = this.options.sheet ? n.topLeft.col : this.options.column || 0,
                    r = "asc" === this.options.value ? !0 : !1;
                return this._state = t.getState(), this.options.sheet && (e = this.expandRange()), e.intersectingMerged().length ? {
                    reason: "error",
                    type: "sortRangeContainingMerges"
                } : void e.sort({
                    column: i,
                    ascending: r
                })
            },
            expandRange: function() {
                var t = this.range().sheet();
                return new e.spreadsheet.Range(t._sheetRef, t)
            }
        }), r = e.spreadsheet.ApplyFilterCommand = n.extend({
            column: function() {
                return this.options.column || 0
            },
            undo: function() {
                var e = this.range().sheet();
                e.clearFilter(this.column()), this._state.length && this.range().filter(this._state)
            },
            getState: function() {
                var e = this.range().sheet(),
                    t = e.filter();
                t && (this._state = t.columns.filter(function(e) {
                    return e.index == this.column()
                }.bind(this)))
            },
            exec: function() {
                var t, n, i = this.range(),
                    r = this.column(),
                    o = i.sheet().filter(),
                    a = !1;
                this.options.valueFilter ? n = {
                    column: r,
                    filter: new e.spreadsheet.ValueFilter(this.options.valueFilter)
                } : this.options.customFilter && (n = {
                    column: r,
                    filter: new e.spreadsheet.CustomFilter(this.options.customFilter)
                }), this.getState(), o && o.ref.eq(i._ref) && o.columns.length ? (o.columns.forEach(function(e) {
                    e.index === r && (a = !0)
                }), t = o.columns.map(function(e) {
                    return e.index === r ? n : {
                        column: e.index,
                        filter: e.filter
                    }
                }), a || t.push(n)) : t = n, i.filter(t)
            }
        }), e.spreadsheet.ClearFilterCommand = r.extend({
            exec: function() {
                var e = this.range(),
                    t = this.column();
                this.getState(), e.clearFilter(t)
            }
        }), e.spreadsheet.HideLineCommand = n.extend({
            init: function(e) {
                n.fn.init.call(this, e), this.axis = e.axis
            },
            undo: function() {
                var e = this.range().sheet();
                e.setAxisState(this._state)
            },
            exec: function() {
                var e = this.range().sheet();
                this._state = e.getAxisState(), "row" == this.axis ? e.axisManager().hideSelectedRows() : e.axisManager().hideSelectedColumns()
            }
        }), e.spreadsheet.UnHideLineCommand = e.spreadsheet.HideLineCommand.extend({
            exec: function() {
                var e = this.range().sheet();
                this._state = e.getAxisState(), "row" == this.axis ? e.axisManager().unhideSelectedRows() : e.axisManager().unhideSelectedColumns()
            }
        }), o = e.spreadsheet.DeleteCommand = n.extend({
            undo: function() {
                var e = this.range().sheet();
                e.setState(this._state)
            }
        }), e.spreadsheet.DeleteRowCommand = o.extend({
            exec: function() {
                var e = this.range().sheet();
                this._state = e.getState(), e.axisManager().deleteSelectedRows()
            }
        }), e.spreadsheet.DeleteColumnCommand = o.extend({
            exec: function() {
                var e = this.range().sheet();
                this._state = e.getState(), e.axisManager().deleteSelectedColumns()
            }
        }), a = n.extend({
            init: function(e) {
                n.fn.init.call(this, e), this._value = e.value
            },
            undo: function() {
                var e = this.range().sheet();
                e.setState(this._state)
            }
        }), e.spreadsheet.AddColumnCommand = a.extend({
            exec: function() {
                var e = this.range().sheet();
                this._state = e.getState(), "left" === this._value ? e.axisManager().addColumnLeft() : e.axisManager().addColumnRight()
            }
        }), e.spreadsheet.AddRowCommand = a.extend({
            exec: function() {
                var e = this.range().sheet();
                return e.axisManager().canAddRow() ? (this._state = e.getState(), void("above" === this._value ? e.axisManager().addRowAbove() : e.axisManager().addRowBelow())) : {
                    reason: "error",
                    type: "shiftingNonblankCells"
                }
            }
        }), e.spreadsheet.EditValidationCommand = n.extend({
            init: function(e) {
                n.fn.init.call(this, e), this._value = e.value
            },
            exec: function() {
                this.range().validation(this._value)
            }
        }), e.spreadsheet.OpenCommand = n.extend({
            exec: function() {
                var e = this.options.file;
                return null === e.name.match(/.xlsx$/i) ? {
                    reason: "error",
                    type: "openUnsupported"
                } : void this.options.workbook.fromFile(this.options.file)
            }
        }), e.spreadsheet.SaveAsCommand = n.extend({
            exec: function() {
                var e = this.options.name + this.options.extension;
                ".xlsx" === this.options.extension ? this.options.workbook.saveAsExcel({
                    fileName: e
                }) : ".pdf" === this.options.extension && this.options.workbook.saveAsPDF(t.extend(this.options.pdf, {
                    workbook: this.options.workbook,
                    fileName: e
                }))
            }
        }))
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/formulabar.min", ["kendo.core.min"], e)
}(function() {
    ! function(e) {
        var t, n, i;
        e.support.browser.msie && 9 > e.support.browser.version || (t = e.jQuery, n = {
            wrapper: "k-spreadsheet-formula-bar"
        }, i = e.ui.Widget.extend({
            init: function(n, r) {
                e.ui.Widget.call(this, n, r), n = this.element.addClass(i.classNames.wrapper), this.formulaInput = new e.spreadsheet.FormulaInput(t("<div/>").appendTo(n))
            },
            destroy: function() {
                this.formulaInput && this.formulaInput.destroy(), this.formulaInput = null
            }
        }), e.spreadsheet.FormulaBar = i, t.extend(!0, i, {
            classNames: n
        }))
    }(window.kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/formulainput.min", ["kendo.core.min"], e)
}(function() {
    ! function(e, t) {
        function n(e) {
            return "(" == e || "[" == e || "{" == e
        }

        function i(e) {
            return ")" == e || "]" == e || "}" == e
        }

        function r(e, t) {
            return "(" == t ? ")" == e : "[" == t ? "]" == e : "{" == t ? "}" == e : !1
        }

        function o(e, t) {
            return t.begin >= e.begin && e.end >= t.end
        }

        function a(t) {
            return e.spreadsheet.calc.runtime.FUNCS[t.toLowerCase()]
        }

        function s(e, t) {
            return e && t ? "ref" == e.type && "ref" == t.type ? e.ref.eq(t.ref) : e.value === t.value : !1
        }
        var l, c, d, u, h, f, p, m, g;
        e.support.browser.msie && 9 > e.support.browser.version || (l = e.jQuery, c = e.ui.Widget, d = ".kendoFormulaInput", u = e.keys, h = {
            wrapper: "k-spreadsheet-formula-input",
            listWrapper: "k-spreadsheet-formula-list"
        }, f = ["font-family", "font-size", "font-stretch", "font-style", "font-weight", "letter-spacing", "text-transform", "line-height"], p = {
            27: "esc",
            37: "left",
            39: "right",
            35: "end",
            36: "home",
            32: "spacebar"
        }, m = /(^_|[^a-z0-9]$)/i, g = c.extend({
            init: function(e, t) {
                c.call(this, e, t), e = this.element, e.addClass(g.classNames.wrapper).attr("contenteditable", !0).attr("spellcheck", !1), this.options.autoScale && e.on("input", this.scale.bind(this)), this._highlightedRefs = [], this._staticTokens = [], this._formulaSource(), this._formulaList(), this._popup(), this._tooltip(), e.on("keydown", this._keydown.bind(this)).on("keyup", this._keyup.bind(this)).on("blur", this._blur.bind(this)).on("input click", this._input.bind(this)).on("focus", this._focus.bind(this))
            },
            options: {
                name: "FormulaInput",
                autoScale: !1,
                filterOperator: "startswith",
                scalePadding: 30,
                minLength: 1
            },
            events: ["keyup", "focus"],
            enable: function(e) {
                return void 0 === e ? "false" === this.element.attr("contenteditable") ? !1 : !0 : void this.element.attr("contenteditable", e).toggleClass("k-state-disabled", !e)
            },
            getPos: function() {
                function e(e, t) {
                    try {
                        ! function r(n) {
                            if (n === e) throw t;
                            if (1 == n.nodeType)
                                for (var i = n.firstChild; i; i = i.nextSibling) r(i);
                            else 3 == n.nodeType && (t += n.nodeValue.length)
                        }(i)
                    } catch (n) {
                        return n
                    }
                }
                var n, i = this.element[0],
                    r = t.getSelection(),
                    o = e(r.focusNode, r.focusOffset),
                    a = e(r.anchorNode, r.anchorOffset);
                return null != o && null != a ? (o > a && (n = o, o = a, a = n), {
                    begin: o,
                    end: a,
                    collapsed: o == a
                }) : void 0
            },
            setPos: function(e, n) {
                function i(e, t) {
                    return e.startOffset != t.startOffset || e.endOffset != t.endOffset || e.startContainer != t.endContainer || e.endContainer != t.endContainer
                }

                function r(e, t) {
                    try {
                        ! function i(e) {
                            var n, r;
                            if (3 == e.nodeType) {
                                if (n = e.nodeValue.length, n >= t) throw e;
                                t -= n
                            } else if (1 == e.nodeType)
                                for (r = e.firstChild; r; r = r.nextSibling) i(r)
                        }(e)
                    } catch (n) {
                        return {
                            node: n,
                            pos: t
                        }
                    }
                }
                var o, a, s, l = this.element[0];
                e = r(l, e), n = null != n ? r(l, n) : e, e && n && (o = document.createRange(), o.setStart(e.node, e.pos), o.setEnd(n.node, n.pos), a = t.getSelection(), s = a.getRangeAt(0), i(o, s) && (a.removeAllRanges(), a.addRange(o)))
            },
            end: function() {
                this.setPos(this.length())
            },
            home: function() {
                this.setPos(0)
            },
            length: function() {
                return this.value().length
            },
            _formulaSource: function() {
                var t, n, i = [];
                for (n in e.spreadsheet.calc.runtime.FUNCS) m.test(n) || (t = n.toUpperCase(), i.push({
                    value: t,
                    text: t
                }));
                this.formulaSource = new e.data.DataSource({
                    data: i
                })
            },
            _formulaList: function() {
                this.list = new e.ui.StaticList(l("<ul />").addClass(g.classNames.listWrapper).insertAfter(this.element), {
                    autoBind: !1,
                    selectable: !0,
                    change: this._formulaListChange.bind(this),
                    dataSource: this.formulaSource,
                    dataValueField: "value",
                    template: "#:data.value#"
                }), this.list.element.on("mousedown", function(e) {
                    e.preventDefault()
                })
            },
            _formulaListChange: function() {
                var e, t, n, i = this._tokenContext();
                i && !this._mute && (e = i.token, t = this.list.value()[0], n = {
                    replace: !0,
                    token: e,
                    end: e.end
                }, i.nextToken && "(" == i.nextToken.value || (t += "("), this._replaceAt(n, t), this.popup.close())
            },
            _popup: function() {
                this.popup = new e.ui.Popup(this.list.element, {
                    anchor: this.element
                })
            },
            _blur: function() {
                this.popup.close(), clearTimeout(this._focusId)
            },
            _isFormula: function() {
                return /^=/.test(this.value())
            },
            _keydown: function(e) {
                var t = e.keyCode;
                p[t] ? (this.popup.close(), this._navigated = !0) : this._move(t) && (this._navigated = !0, e.preventDefault()), this._keyDownTimeout = setTimeout(this._syntaxHighlight.bind(this))
            },
            _keyup: function() {
                var e, t = this.popup;
                this._isFormula() && !this._navigated && (e = ((this._tokenContext() || {}).token || {}).value, this.filter(e), e && this.formulaSource.view().length ? (t[t.visible() ? "position" : "open"](), this.list.focusFirst()) : t.close()), this._navigated = !1, this._syntaxHighlight(), this.trigger("keyup")
            },
            _input: function() {
                this._syntaxHighlight()
            },
            _focus: function() {
                this._focusTimeout = setTimeout(this._syntaxHighlight.bind(this)), this.trigger("focus")
            },
            _move: function(e) {
                var t = this.list,
                    n = !1,
                    i = this.popup;
                return e === u.DOWN ? (t.focusNext(), t.focus() || t.focusFirst(), n = !0) : e === u.UP ? (t.focusPrev(), t.focus() || t.focusLast(), n = !0) : e === u.ENTER ? (i.visible() && t.select(t.focus()), i.close(), n = !0) : e === u.TAB ? (t.select(t.focus()), i.close(), n = !0) : e === u.PAGEUP ? (t.focusFirst(), n = !0) : e === u.PAGEDOWN && (t.focusLast(), n = !0), n
            },
            _tokenContext: function() {
                var t, n, i, r = this.getPos(),
                    a = this.value();
                if (!a || !r || !r.collapsed) return null;
                for (t = e.spreadsheet.calc.tokenize(a, this.row(), this.col()), i = 0; t.length > i; ++i)
                    if (n = t[i], o(n, r) && /^(?:str|sym|func)$/.test(n.type)) return {
                        token: n,
                        nextToken: t[i + 1]
                    };
                return null
            },
            _sync: function() {
                this._editorToSync && this.isActive() && this._editorToSync.value(this.value())
            },
            _textContainer: function() {
                var t = e.getComputedStyles(this.element[0], f);
                t.position = "absolute", t.visibility = "hidden", t.whiteSpace = "pre", t.top = -3333, t.left = -3333, this._span = l("<span/>").css(t).insertAfter(this.element)
            },
            _tooltip: function() {
                this._cellTooltip = l('<div class="k-widget k-tooltip" style="position:absolute; display:none">A1</div>').insertAfter(this.element)
            },
            tooltip: function(e) {
                this._cellTooltip.text(e)
            },
            toggleTooltip: function(e) {
                this._cellTooltip.toggle(e)
            },
            isActive: function() {
                return this.element[0] === e._activeElement()
            },
            filter: function(e) {
                !e || this.options.minLength > e.length || (this._mute = !0, this.list.select(-1), this._mute = !1, this.formulaSource.filter({
                    field: this.list.options.dataValueField,
                    operator: this.options.filterOperator,
                    value: e
                }))
            },
            hide: function() {
                this.element.hide(), this._cellTooltip.hide()
            },
            show: function() {
                this.element.show()
            },
            row: function() {
                return this.activeCell ? this.activeCell.row : void 0
            },
            col: function() {
                return this.activeCell ? this.activeCell.col : void 0
            },
            position: function(e) {
                e && (this.element.show().css({
                    top: e.top + 1 + "px",
                    left: e.left + 1 + "px"
                }), this._cellTooltip.css({
                    top: e.top - this._cellTooltip.height() - 10 + "px",
                    left: e.left
                }))
            },
            resize: function(e) {
                e && this.element.css({
                    width: e.width - 1,
                    height: e.height - 1
                })
            },
            canInsertRef: function(e) {
                var t, n = this._canInsertRef(e),
                    i = n && n.token;
                if (i)
                    for (t = 0; this._staticTokens.length > t; t++)
                        if (s(i, this._staticTokens[t])) return null;
                return n
            },
            _canInsertRef: function(t) {
                function i(e) {
                    return e.begin > l.begin
                }

                function r(e) {
                    if (e) {
                        if (/^(?:num|str|bool|sym|ref)$/.test(e.type)) return {
                            replace: !0,
                            token: e,
                            end: e.end
                        };
                        if (/^(?:op|punc|startexp)$/.test(e.type)) return e.end == l.end ? a(e, c[u + 1]) : a(c[u - 1], e)
                    }
                }

                function a(e, t) {
                    if (null == e) return null;
                    if (null == t) return /^(?:op|startexp)$/.test(e.type) || n(e.value) ? {
                        token: e,
                        end: l.end
                    } : null;
                    if (s) {
                        if ("op" == e.type && /^(?:punc|op)$/.test(t.type)) return {
                            token: e,
                            end: l.end
                        }
                    } else {
                        if ("startexp" == e.type) return {
                            token: e,
                            end: l.end
                        };
                        if (/^(?:ref|op|punc)$/.test(e.type)) return {
                            token: e,
                            end: l.end
                        };
                        if (/^(?:punc|op)$/.test(e.type)) return /^[,;({]$/.test(e.value) ? {
                            token: e,
                            end: l.end
                        } : null
                    }
                    return !1
                }
                var s, l, c, d, u;
                if (this.popup.visible()) return null;
                if (s = t, l = this.getPos(), l && this._isFormula()) {
                    if (0 === l.begin) return null;
                    for (c = e.spreadsheet.calc.tokenize(this.value(), this.row(), this.col()), u = 0; c.length > u; ++u) {
                        if (d = c[u], o(d, l)) return r(d);
                        if (i(d)) return a(c[u - 1], d)
                    }
                    return a(d, null)
                }
                return null
            },
            refAtPoint: function(e) {
                var t = this._canInsertRef();
                t && this._replaceAt(t, "" + e.simplify())
            },
            _replaceAt: function(e, t) {
                var n, i = this.value(),
                    r = e.token,
                    o = i.substr(e.end);
                i = i.substr(0, e.replace ? r.begin : e.end) + t, n = i.length, i += o, this._value(i), this.setPos(n), this.scale(), this._syntaxHighlight(), this._sync()
            },
            syncWith: function(t) {
                var n, i = this,
                    r = "input" + d,
                    o = i._sync.bind(i);
                e.support.browser.msie && (r = "keydown" + d, n = function() {
                    setTimeout(o)
                }), i._editorToSync = t, i.element.off(r).on(r, n || o)
            },
            scale: function() {
                var e, t = this.element;
                this._span || this._textContainer(), this._span.html(t.html()), e = this._span.width() + this.options.scalePadding, e > t.width() && t.width(e)
            },
            _value: function(e) {
                this.element.text(e)
            },
            value: function(e) {
                return void 0 === e ? this.element.text() : (this._value(e), void this._syntaxHighlight())
            },
            highlightedRefs: function() {
                return this._highlightedRefs.slice()
            },
            _syntaxHighlight: function() {
                var t, s = this.getPos(),
                    l = this.value(),
                    c = e.spreadsheet.Pane.classNames.series,
                    d = [],
                    u = 0,
                    h = [],
                    f = [];
                (!s || s.collapsed) && (/^=/.test(l) ? (f = e.spreadsheet.calc.tokenize(l, this.row(), this.col()), f.forEach(function(e) {
                    if (e.active = !1, e.cls = ["k-syntax-" + e.type], "ref" == e.type && (e.colorClass = c[u++ % c.length], e.cls.push(e.colorClass), d.push(e)), s && "punc" == e.type)
                        if (n(e.value)) h.unshift(e);
                        else if (i(e.value)) {
                            var l = h.shift();
                            l ? r(e.value, l.value) ? (o(e, s) || o(l, s)) && (e.cls.push("k-syntax-paren-match"), l.cls.push("k-syntax-paren-match")) : (e.cls.push("k-syntax-error"), l.cls.push("k-syntax-error")) : e.cls.push("k-syntax-error")
                        }
                    s && o(e, s) && (e.cls.push("k-syntax-at-point"), e.active = !0, t = e), "func" != e.type || a(e.value) || s && o(e, s) || e.cls.push("k-syntax-error")
                }), f.reverse().forEach(function(t) {
                    var n = t.begin,
                        i = t.end,
                        r = e.htmlEncode(l.substring(n, i));
                    l = l.substr(0, n) + "<span class='" + t.cls.join(" ") + "'>" + r + "</span>" + l.substr(i)
                }), this.element.html(l)) : (this.element.html() != l && this.element.text(l), this.popup && this.popup.close()), s && this.setPos(s.begin, s.end), t && /^(?:startexp|op|punc)$/.test(t.type) && this._setStaticTokens(f), this._highlightedRefs = d)
            },
            _setStaticTokens: function(e) {
                var t, n;
                for (this._staticTokens = [], t = 0; e.length > t; t++) n = e[t], /^(?:num|str|bool|sym|ref)$/.test(n.type) && this._staticTokens.push(n)
            },
            destroy: function() {
                this._editorToSync = null, this.element.off(d), clearTimeout(this._focusTimeout), clearTimeout(this._keyDownTimeout), this._cellTooltip = null, this._span = null, this.popup.destroy(), this.popup = null, c.fn.destroy.call(this)
            }
        }), e.spreadsheet.FormulaInput = g, l.extend(!0, g, {
            classNames: h
        }))
    }(kendo, window)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/eventlistener.min", ["kendo.core.min"], e)
}(function() {
    ! function(e) {
        var t, n, i, r, o, a;
        e.support.browser.msie && 9 > e.support.browser.version || (t = e.jQuery, n = {
            8: "backspace",
            9: "tab",
            13: "enter",
            27: "esc",
            37: "left",
            38: "up",
            39: "right",
            40: "down",
            35: "end",
            36: "home",
            32: "spacebar",
            33: "pageup",
            34: "pagedown",
            46: "delete",
            113: ":edit"
        }, i = navigator.platform.toUpperCase().indexOf("MAC") >= 0, r = function(e) {
            return e > 47 && 58 > e || e > 64 && 91 > e || e > 95 && 112 > e || e > 185 && 193 > e || e > 218 && 223 > e ? !0 : !1
        }, o = function(e) {
            var t = n[e];
            return !t && r(e) && (t = ":alphanum"), t
        }, a = e.Class.extend({
            init: function(e, n, i) {
                if (this._handlers = {}, this.target = e, this._observer = n || window, this.keyDownProxy = this.keyDown.bind(this), this.mouseProxy = this.mouse.bind(this), this.threshold = 5, this._pressLocation = null, e.on("keydown", this.keyDownProxy), e.on("contextmenu mousedown cut copy paste scroll wheel click dblclick focus", this.mouseProxy), t(document.documentElement).on("mousemove mouseup", this.mouseProxy), i)
                    for (var r in i) this.on(r, i[r])
            },
            keyDown: function(e) {
                this.handleEvent(e, o(e.keyCode))
            },
            mouse: function(e) {
                var t, n, i, r, o;
                e.which ? t = 3 == e.which : e.button && (t = 2 == e.button), n = e.type, "mousedown" === n && (t ? n = "rightmousedown" : this._pressLocation = {
                    x: e.pageX,
                    y: e.pageY
                }), "mouseup" === n && (t || (this._pressLocation = null)), "mousemove" === n && this._pressLocation && (i = this._pressLocation.x - e.pageX, r = this._pressLocation.y - e.pageY, o = Math.sqrt(i * i + r * r), o > this.threshold && (n = "mousedrag")), this.handleEvent(e, n)
            },
            handleEvent: function(e, t) {
                var n, r, o = "";
                e.mod = i ? e.metaKey : e.ctrlKey, e.shiftKey && (o += "shift+"), e.ctrlKey && (o += "ctrl+"), o += t, n = this._handlers["*+" + t], n && n.call(this._observer, e, o), r = this._handlers[o], r && r.call(this._observer, e, o)
            },
            on: function(e, t) {
                var n = this._handlers;
                "string" == typeof t && (t = this._observer[t]), "string" == typeof e && (e = e.split(",")), e.forEach(function(e) {
                    n[e] = t
                })
            },
            destroy: function() {
                this.target.off("keydown", this.keyDownProxy), this.target.off("keydown", this.mouseProxy), t(document.documentElement).off("mousemove mouseup", this.mouseProxy)
            }
        }), e.spreadsheet.EventListener = a)
    }(window.kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/rangelist.min", ["kendo.core.min"], e)
}(function() {
    ! function(e) {
        function t(e) {
            return e
        }

        function n(e) {
            if (e.left.level === e.level) {
                var t = e;
                e = e.left, t.left = e.right, e.right = t
            }
            return e
        }

        function i(e) {
            if (e.right.right.level === e.level) {
                var t = e;
                e = e.right, t.right = e.left, e.left = t, e.level += 1
            }
            return e
        }

        function r(e, t) {
            return e === d ? new c(1, t, d, d) : (e.value.start - t.start > 0 ? e.left = r(e.left, t) : e.right = r(e.right, t), i(n(e)))
        }

        function o(e, t) {
            var r, a;
            if (e === d) return e;
            if (r = e.value.start - t.start, 0 === r)
                if (e.left !== d && e.right !== d) {
                    for (a = e.left; a.right !== d;) a = a.right;
                    e.value = a.value, e.left = o(e.left, e.value)
                } else e = e.left === d ? e.right : e.left;
            else r > 0 ? e.left = o(e.left, t) : e.right = o(e.right, t);
            return (e.level - 1 > e.left.level || e.level - 1 > e.right.level) && (e.level -= 1, e.right.level > e.level && (e.right.level = e.level), e = n(e), e.right = n(e.right), e.right.right = n(e.right.right), e = i(e), e.right = i(e.right)), e
        }

        function a(e, t) {
            e !== d && (a(e.left, t), t.push(e.value), a(e.right, t))
        }

        function s(e, t, n) {
            if (e !== d) {
                var i = e.value;
                i.start > t.start && s(e.left, t, n), i.intersects(t) && n.push(i), t.end > i.end && s(e.right, t, n)
            }
        }

        function l(e, t, n) {
            t !== d && (l(e, t.left, n), e.insert(n(t.value)), l(e, t.right, n))
        }
        var c, d, u, h, f, p, m;
        e.support.browser.msie && 9 > e.support.browser.version || (c = e.Class.extend({
            init: function(e, t, n, i) {
                this.level = e, this.value = t, this.left = n, this.right = i
            }
        }), d = new function() {
            this.left = this, this.right = this, this.level = 0
        }, u = e.Class.extend({
            init: function(e, t, n) {
                this.start = e, this.end = t, this.value = n
            },
            intersects: function(e) {
                return this.end >= e.start && e.end >= this.start
            }
        }), h = e.Class.extend({
            init: function() {
                this.root = d
            },
            insert: function(e) {
                this.root = r(this.root, e)
            },
            remove: function(e) {
                this.root = o(this.root, e)
            },
            findrange: function(e) {
                for (var t = this.root; t != d;)
                    if (t.value.start > e) t = t.left;
                    else {
                        if (!(e > t.value.end)) return t.value;
                        t = t.right
                    } return null
            },
            values: function() {
                var e = [];
                return a(this.root, e), e
            },
            intersecting: function(e, t) {
                var n = [];
                return s(this.root, new u(e, t), n), n
            },
            map: function(e) {
                var t = new h;
                return l(t, this.root, e), t
            },
            clone: function() {
                return this.map(t)
            },
            first: function() {
                for (var e = this.root; e.left != d;) e = e.left;
                return e
            },
            last: function() {
                for (var e = this.root; e.right != d;) e = e.right;
                return e
            }
        }), f = e.Class.extend({
            init: function(e, t, n) {
                void 0 === t ? this.tree = e : (this.tree = new h, this.tree.insert(new u(e, t, n)))
            },
            values: function() {
                return this.tree.values()
            },
            map: function(e) {
                return new f(this.tree.map(e))
            },
            intersecting: function(e, t) {
                return this.tree.intersecting(e, t)
            },
            first: function() {
                return this.tree.first().value
            },
            last: function() {
                return this.tree.last().value
            },
            insert: function(e, t, n) {
                return this.tree.insert(new u(e, t, n))
            },
            value: function(e, t, n) {
                var i, r, o, a, s, l, c, d, u;
                if (void 0 === n) return void 0 === t && (t = e), this.intersecting(e, t)[0].value;
                if (i = this.tree.intersecting(e - 1, t + 1), i.length)
                    for (r = i[0], o = i[i.length - 1], e > r.end && (r.value === n ? e = r.start : i.shift()), o.start > t && (o.value === n ? t = o.end : i.pop()), a = 0, s = i.length; s > a; a++) l = i[a], c = l.value, d = l.start, u = l.end, this.tree.remove(l), e > d && (c !== n ? this.insert(d, e - 1, c) : e = d), u > t && (c !== n ? this.insert(t + 1, u, c) : t = u);
                this.insert(e, t, n)
            },
            expandedValues: function(e, t) {
                var n, i = this.intersecting(e, t),
                    r = [],
                    o = 0;
                for (n = e; t >= n; n++) n > i[o].end && o++, r.push({
                    index: n - e,
                    value: i[o].value
                });
                return r
            },
            sortedIndices: function(e, t, n, i) {
                var r = this.expandedValues(e, t),
                    o = function(e, t) {
                        return e.value === t.value ? e.index - t.index : n(e.value, t.value)
                    };
                return i && (o = function(e, t) {
                    var r = i[e.index],
                        o = i[t.index];
                    return r.value === o.value ? n(e.value, t.value) : e.index - t.index
                }), r.sort(o), r
            },
            sort: function(e, t, n) {
                var i, r, o;
                if (1 !== this.intersecting(e, t).length)
                    for (i = this.expandedValues(e, t), r = 0, o = n.length; o > r; r++) this.value(r + e, r + e, i[n[r].index].value)
            },
            copy: function(e, t, n) {
                var i, r, o, a, s, l = this.intersecting(e, t),
                    c = n;
                for (r = 0, o = l.length; o > r; r++) a = l[r].start, e > a && (a = e), s = l[r].end, s > t && (s = t), i = c + (s - a), this.value(c, i, l[r].value), c = ++i
            },
            iterator: function(e, t) {
                return new p(e, t, this.intersecting(e, t))
            },
            getState: function() {
                return this.tree.clone()
            },
            setState: function(e) {
                this.tree = e
            }
        }), p = e.Class.extend({
            init: function(e, t, n) {
                this.start = e, this.end = t, this.index = 0, this.ranges = n
            },
            unique: function() {
                return this.ranges.map(function(e) {
                    return e.value
                })
            },
            at: function(e) {
                for (; e > this.ranges[this.index].end;) this.index++;
                return this.ranges[this.index].value
            },
            forEach: function(e) {
                for (var t = this.start; this.end >= t; t++) e(this.at(t), t);
                this.index = 0
            }
        }), m = f.extend({
            init: function(e, t, n) {
                this.tree = new h, this.range = new u(e, t, n)
            },
            intersecting: function(e, t) {
                var n, i, r, o = this.tree.intersecting(e, t),
                    a = [];
                if (!o.length) return [this.range];
                for (i = 0, r = o.length; r > i; i++) n = o[i], n.start > e && a.push(new u(e, n.start - 1, this.range.value)), a.push(n), e = n.end + 1;
                return t > n.end && a.push(new u(n.end + 1, t, this.range.value)), a
            },
            insert: function(e, t, n) {
                n !== this.range.value && this.tree.insert(new u(e, t, n))
            },
            lastRangeStart: function() {
                var e = this.tree.root;
                if (e === d) return this.range.start;
                for (; e.right !== d;) e = e.right;
                return e.value.end + 1
            }
        }), e.spreadsheet.RangeTree = h, e.spreadsheet.RangeList = f, e.spreadsheet.SparseRangeList = m, e.spreadsheet.ValueRange = u)
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/propertybag.min", ["kendo.core.min"], e)
}(function() {
    ! function(e) {
        function t(e) {
            return e.replace(/M/g, "m").replace(/'/g, '"').replace(/tt/, "am/pm")
        }
        var n, i, r, o;
        e.support.browser.msie && 9 > e.support.browser.version || (n = e.jQuery, i = e.Class.extend({
            init: function(e) {
                this.list = e
            },
            get: function(e) {
                return this.parse(this.list.value(e, e))
            },
            set: function(e, t, n) {
                void 0 === n && (n = t, t = e), this.list.value(e, t, n)
            },
            parse: function(e) {
                return e
            },
            copy: function(e, t, n) {
                this.list.copy(e, t, n)
            },
            iterator: function(e, t) {
                return this.list.iterator(e, t)
            }
        }), r = i.extend({
            set: function(e, t, n) {
                this.list.value(e, t, JSON.stringify(n))
            },
            parse: function(e) {
                return JSON.parse(e)
            }
        }), o = i.extend({
            init: function(e, t, n) {
                i.prototype.init.call(this, e), this.validations = n, this.formats = t
            },
            set: function(n, i, r) {
                r instanceof Date && (r = e.spreadsheet.dateToNumber(r), this.formats.value(n, i, t(e.culture().calendar.patterns.d))), this.list.value(n, i, r)
            }
        }), e.spreadsheet.PropertyBag = e.Class.extend({
            specs: [{
                property: o,
                name: "value",
                value: null,
                sortable: !0,
                serializable: !0,
                depends: "format"
            }, {
                property: i,
                name: "format",
                value: null,
                sortable: !0,
                serializable: !0
            }, {
                property: i,
                name: "formula",
                value: null,
                sortable: !0,
                serializable: !0
            }, {
                property: i,
                name: "background",
                value: null,
                sortable: !0,
                serializable: !0
            }, {
                property: r,
                name: "borderBottom",
                value: null,
                sortable: !1,
                serializable: !0
            }, {
                property: r,
                name: "borderRight",
                value: null,
                sortable: !1,
                serializable: !0
            }, {
                property: r,
                name: "borderLeft",
                value: null,
                sortable: !1,
                serializable: !0
            }, {
                property: r,
                name: "borderTop",
                value: null,
                sortable: !1,
                serializable: !0
            }, {
                property: i,
                name: "color",
                value: null,
                sortable: !0,
                serializable: !0
            }, {
                property: i,
                name: "fontFamily",
                value: null,
                sortable: !0,
                serializable: !0
            }, {
                property: i,
                name: "underline",
                value: null,
                sortable: !0,
                serializable: !0
            }, {
                property: i,
                name: "fontSize",
                value: null,
                sortable: !0,
                serializable: !0
            }, {
                property: i,
                name: "italic",
                value: null,
                sortable: !0,
                serializable: !0
            }, {
                property: i,
                name: "bold",
                value: null,
                sortable: !0,
                serializable: !0
            }, {
                property: i,
                name: "textAlign",
                value: null,
                sortable: !0,
                serializable: !0
            }, {
                property: i,
                name: "verticalAlign",
                value: null,
                sortable: !0,
                serializable: !0
            }, {
                property: i,
                name: "wrap",
                value: null,
                sortable: !0,
                serializable: !0
            }, {
                property: i,
                name: "validation",
                value: null,
                sortable: !1,
                serializable: !0
            }, {
                property: i,
                name: "enable",
                value: null,
                sortable: !1,
                serializable: !0
            }],
            init: function(t) {
                this.properties = {}, this.lists = {}, this.specs.forEach(function(n) {
                    this.lists[n.name] = new e.spreadsheet.SparseRangeList(0, t, n.value)
                }, this), this.specs.forEach(function(e) {
                    this.properties[e.name] = new e.property(this.lists[e.name], this.lists[e.depends])
                }, this)
            },
            getState: function() {
                var e = {};
                return this.specs.forEach(function(t) {
                    e[t.name] = this.lists[t.name].getState()
                }, this), e
            },
            setState: function(e) {
                this.specs.forEach(function(t) {
                    this.lists[t.name].setState(e[t.name])
                }, this)
            },
            get: function(e, t) {
                return void 0 === t ? this.lists[e] : this.properties[e].get(t)
            },
            set: function(e, t, n, i) {
                this.properties[e].set(t, n, i)
            },
            fromJSON: function(e, t) {
                var n, i;
                for (n = 0; this.specs.length > n; n++) i = this.specs[n], i.serializable && void 0 !== t[i.name] && this.set(i.name, e, e, t[i.name], !1)
            },
            copy: function(e, t, n) {
                this.specs.forEach(function(i) {
                    this.properties[i.name].copy(e, t, n)
                }, this)
            },
            iterator: function(e, t, n) {
                return this.properties[e].iterator(t, n)
            },
            sortable: function() {
                return this.specs.filter(function(e) {
                    return e.sortable
                }).map(function(e) {
                    return this.lists[e.name]
                }, this)
            },
            iterators: function(e, t) {
                var n = this.specs.filter(function(e) {
                    return e.serializable
                });
                return n.map(function(n) {
                    var i = this.iterator(n.name, e, t);
                    return {
                        name: n.name,
                        value: n.value,
                        at: function(e) {
                            return n.property.fn.parse(i.at(e))
                        }
                    }
                }, this)
            },
            forEach: function(e, t, n) {
                var i, r, o, a, s, l = this.iterators(e, t);
                for (i = e; t >= i; i++) {
                    for (r = {}, o = 0; l.length > o; o++) a = l[o], s = a.at(i), s !== a.value && (r[a.name] = s);
                    n(r)
                }
            },
            forEachProperty: function(e) {
                for (var t in this.properties) e(this.properties[t])
            }
        }), e.spreadsheet.ALL_PROPERTIES = n.map(e.spreadsheet.PropertyBag.prototype.specs, function(e) {
            return e.name
        }))
    }(window.kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/references.min", ["kendo.core.min"], e)
}(function() {
    "use strict";

    function e(t) {
        var n = Math.floor(t / 26) - 1;
        return (n >= 0 ? e(n) : "") + String.fromCharCode(65 + t % 26)
    }

    function t(e) {
        return /^[a-z0-9_]*$/i.test(e) ? e : "'" + e.replace(/\x27/g, "\\'") + "'"
    }

    function n(n, i, r, o) {
        var a = "";
        return ++i, isFinite(i) ? null == o || 2 & o || (i = "$" + i) : i = "", isFinite(r) ? (a = e(r), null == o || 1 & o || (a = "$" + a)) : r = "", n ? t(n) + "!" + a + i : a + i
    }
    var i, r, o, a, s, l, c, d;
    kendo.support.browser.msie && kendo.support.browser.version < 9 || (i = kendo.spreadsheet, r = kendo.Class, o = r.extend({
        type: "ref",
        hasSheet: function() {
            return this._hasSheet
        },
        simplify: function() {
            return this
        },
        setSheet: function(e, t) {
            return this.sheet = e, null != t && (this._hasSheet = t), this
        },
        absolute: function() {
            return this
        },
        relative: function() {
            return this
        },
        adjust: function() {
            return this
        },
        toString: function() {
            return this.relative(0, 0, 3, 3).print(0, 0)
        },
        forEach: function(e, t) {
            e.call(t, this)
        },
        map: function(e, t) {
            return e.call(t, this)
        },
        intersects: function(e) {
            return this.intersect(e) !== a
        },
        isCell: function() {
            return !1
        },
        toRow: function() {
            return this
        },
        toColumn: function() {
            return this
        },
        first: function() {
            return this
        },
        lastRange: function() {
            return this
        },
        size: function() {
            return 1
        },
        rangeAt: function() {
            return this
        },
        nextRangeIndex: function() {
            return 0
        },
        previousRangeIndex: function() {
            return 0
        },
        eq: function(e) {
            var t, n, i, r, o = this,
                s = e;
            if (o === a || s === a) return o === s;
            if ((s instanceof l || s instanceof c && !(o instanceof l)) && (o = e, s = this), o instanceof l) return s = s.simplify(), s instanceof l && o.row == s.row && o.col == s.col && o.sheet == s.sheet;
            if (o instanceof c) {
                if (s instanceof c) return s.topLeft.eq(o.topLeft) && s.bottomRight.eq(o.bottomRight);
                if (s instanceof d) return s.single() && o.eq(s.refs[0])
            } else if (o instanceof d && s instanceof d) {
                if (t = o.refs, n = s.refs, t.length != n.length) return !1;
                for (i = 0, r = t.length; r > i; i++)
                    if (!t[i].eq(n[i])) return !1;
                return !0
            }
            return o === s
        },
        concat: function(e) {
            return new d([this, e])
        },
        replaceAt: function(e, t) {
            return t
        },
        forEachColumnIndex: function(e) {
            this.forEachAxisIndex("col", e)
        },
        forEachRowIndex: function(e) {
            this.forEachAxisIndex("row", e)
        },
        forEachAxisIndex: function(e, t) {
            var n = [],
                i = "row" === e ? "forEachRow" : "forEachColumn";
            this[i](function(t) {
                var i = t.first()[e]; - 1 === n.indexOf(i) && n.push(i)
            }), n.sort(function(e, t) {
                return e > t ? 1 : t > e ? -1 : 0
            }).forEach(t)
        },
        valid: function() {
            return !1
        }
    }), o.display = n, a = new(o.extend({
        init: function() {},
        print: function() {
            return "#NULL!"
        },
        clone: function() {
            return this
        },
        eq: function(e) {
            return e === this
        },
        forEach: function() {}
    })), s = o.extend({
        ref: "name",
        init: function(e) {
            this.name = e
        },
        print: function() {
            var e = t(this.name);
            return this.hasSheet() && (e = t(this.sheet) + "!" + e), e
        }
    }), l = o.extend({
        ref: "cell",
        init: function(e, t, n) {
            this.row = e, this.col = t, this.rel = n || 0
        },
        clone: function() {
            return new l(this.row, this.col, this.rel).setSheet(this.sheet, this.hasSheet())
        },
        intersect: function(e) {
            return e instanceof l ? this.eq(e) ? this : a : e.intersect(this)
        },
        print: function(e, i) {
            var r, o, a = this.col,
                s = this.row,
                l = this.rel;
            return null == e ? (o = this.hasSheet() ? t(this.sheet) + "!" : "", a = isFinite(a) ? 1 & l ? "C[" + a + "]" : "C" + (a + 1) : "", s = isFinite(s) ? 2 & l ? "R[" + s + "]" : "R" + (s + 1) : "", o + s + a) : (r = this.absolute(e, i), r.valid() ? n(this._hasSheet && this.sheet, r.row, r.col, l) : "#REF!")
        },
        absolute: function(e, t) {
            var n = this.clone();
            return n.rel & !1 ? n : (1 & n.rel && (n.col += t), 2 & n.rel && (n.row += e), n.rel = 0, n)
        },
        toRangeRef: function() {
            return new c(this, this)
        },
        relative: function(e, t, n) {
            var i, r;
            return null == n && (n = this.rel), i = 2 & n ? this.row - e : this.row, r = 1 & n ? this.col - t : this.col, new l(i, r, n).setSheet(this.sheet, this.hasSheet())
        },
        height: function() {
            return 1
        },
        width: function() {
            return 1
        },
        toString: function() {
            return n(null, this.row, this.col, 3)
        },
        isCell: function() {
            return !0
        },
        leftColumn: function() {
            return this
        },
        rightColumn: function() {
            return this
        },
        topRow: function() {
            return this
        },
        bottomRow: function() {
            return this
        },
        forEachRow: function(e) {
            e(this.toRangeRef())
        },
        forEachColumn: function(e) {
            e(this.toRangeRef())
        },
        adjust: function(e, t, n, i, r, o, s) {
            var l = this.absolute(e, t);
            if (r) {
                if (l.row >= o) {
                    if (0 > s && o - s > l.row) return a;
                    l.row += s
                }
            } else if (l.col >= o) {
                if (0 > s && o - s > l.col) return a;
                l.col += s
            }
            return null != n && null != i && (l = l.relative(n, i, this.rel)), l
        },
        valid: function() {
            if (this.rel) throw Error("valid() called on relative reference");
            var e = this.col,
                t = this.row;
            return !(isFinite(e) && 0 > e || isFinite(t) && 0 > t)
        }
    }), c = o.extend({
        ref: "range",
        init: function(e, t) {
            e._hasSheet && t._hasSheet && e.sheet.toLowerCase() != t.sheet.toLowerCase() && (this.endSheet = t.sheet), this.topLeft = new l(e.row, e.col, e.rel), this.bottomRight = new l(t.row, t.col, t.rel), this.normalize()
        },
        clone: function() {
            return new c(this.topLeft.clone(), this.bottomRight.clone()).setSheet(this.sheet, this.hasSheet())
        },
        _containsRange: function(e) {
            return this._containsCell(e.topLeft) && this._containsCell(e.bottomRight)
        },
        _containsCell: function(e) {
            return e.sheet == this.sheet && e.row >= this.topLeft.row && e.col >= this.topLeft.col && this.bottomRight.row >= e.row && this.bottomRight.col >= e.col
        },
        contains: function(e) {
            if (e instanceof Array) {
                var t = this;
                return e.some(function(e) {
                    return t.contains(e)
                })
            }
            return e instanceof l ? this._containsCell(e) : e instanceof c ? this._containsRange(e) : !1
        },
        _intersectRange: function(e) {
            var t, n, i, r, o, s, d, u;
            return this.sheet != e.sheet ? a : (t = this.topLeft.col, n = this.topLeft.row, i = this.bottomRight.col, r = this.bottomRight.row, o = e.topLeft.col, s = e.topLeft.row, d = e.bottomRight.col, u = e.bottomRight.row, d >= t && i >= o && u >= n && r >= s ? new c(new l(Math.max(n, s), Math.max(t, o)), new l(Math.min(r, u), Math.min(i, d))).setSheet(this.sheet, this.hasSheet()) : a)
        },
        intersect: function(e) {
            if (e === a) return e;
            if (e instanceof l) return this._containsCell(e) ? e : a;
            if (e instanceof c) return this._intersectRange(e).simplify();
            if (e instanceof d) return e.intersect(this);
            throw Error("Unknown reference")
        },
        simplify: function() {
            return this.isCell() ? new l(this.topLeft.row, this.topLeft.col, this.topLeft.rel).setSheet(this.sheet, this.hasSheet()) : this
        },
        normalize: function() {
            var e, t = this.topLeft,
                n = this.bottomRight,
                i = t.row,
                r = t.col,
                o = n.row,
                a = n.col,
                s = 2 & t.rel,
                c = 1 & t.rel,
                d = 2 & n.rel,
                u = 1 & n.rel,
                h = !1;
            return i > o && (h = !0, e = i, i = o, o = e, e = s, s = d, d = e), r > a && (h = !0, e = r, r = a, a = e, e = c, c = u, u = e), h && (this.topLeft = new l(i, r, c | s), this.bottomRight = new l(o, a, u | d)), this
        },
        print: function(e, n) {
            var i, r = this.absolute(e, n);
            return r.valid() ? (i = this.topLeft.print(e, n) + ":" + this.bottomRight.print(e, n), this.hasSheet() && (i = t(this.sheet) + (this.endSheet ? ":" + t(this.endSheet) : "") + "!" + i), i) : "#REF!"
        },
        absolute: function(e, t) {
            return new c(this.topLeft.absolute(e, t), this.bottomRight.absolute(e, t)).setSheet(this.sheet, this.hasSheet())
        },
        relative: function(e, t, n, i) {
            return null == i && (i = n), new c(this.topLeft.relative(e, t, n), this.bottomRight.relative(e, t, i)).setSheet(this.sheet, this.hasSheet())
        },
        height: function() {
            if (this.topLeft.rel != this.bottomRight.rel) throw Error("Mixed relative/absolute references");
            return this.bottomRight.row - this.topLeft.row + 1
        },
        width: function() {
            if (this.topLeft.rel != this.bottomRight.rel) throw Error("Mixed relative/absolute references");
            return this.bottomRight.col - this.topLeft.col + 1
        },
        collapse: function() {
            return this.topLeft.toRangeRef()
        },
        leftColumn: function() {
            return new c(this.topLeft, new l(this.bottomRight.row, this.topLeft.col))
        },
        rightColumn: function() {
            return new c(new l(this.topLeft.row, this.bottomRight.col), this.bottomRight)
        },
        topRow: function() {
            return new c(this.topLeft, new l(this.topLeft.row, this.bottomRight.col))
        },
        bottomRow: function() {
            return new c(new l(this.bottomRight.row, this.topLeft.col), this.bottomRight)
        },
        toRangeRef: function() {
            return this
        },
        toRow: function(e) {
            return new c(new l(this.topLeft.row + e, this.topLeft.col), new l(this.topLeft.row + e, this.bottomRight.col))
        },
        toColumn: function(e) {
            return new c(new l(this.topLeft.row, this.topLeft.col + e), new l(this.bottomRight.row, this.topLeft.col + e))
        },
        forEachRow: function(e) {
            var t, n = this.topLeft.row,
                i = this.bottomRight.row,
                r = this.topLeft.col,
                o = this.bottomRight.col;
            for (t = n; i >= t; t++) e(new c(new l(t, r), new l(t, o)))
        },
        forEachColumn: function(e) {
            var t, n = this.topLeft.row,
                i = this.bottomRight.row,
                r = this.topLeft.col,
                o = this.bottomRight.col;
            for (t = r; o >= t; t++) e(new c(new l(n, t), new l(i, t)))
        },
        intersecting: function(e) {
            return e.filter(function(e) {
                return e.toRangeRef().intersects(this)
            }, this)
        },
        union: function(e, t) {
            var n, i = this.intersecting(e),
                r = this.topLeft.row,
                o = this.topLeft.col,
                a = this.bottomRight.row,
                s = this.bottomRight.col,
                d = !1;
            return i.forEach(function(e) {
                e = e.toRangeRef(), r > e.topLeft.row && (d = !0, r = e.topLeft.row), o > e.topLeft.col && (d = !0, o = e.topLeft.col), e.bottomRight.row > a && (d = !0, a = e.bottomRight.row), e.bottomRight.col > s && (d = !0, s = e.bottomRight.col), t && t(e)
            }), n = new c(new l(r, o), new l(a, s)), d ? n.union(e, t) : n
        },
        resize: function(e) {
            function t(e) {
                return e || 0
            }
            var n = Math.max.bind(Math, 0),
                i = this.topLeft.row + t(e.top),
                r = this.topLeft.col + t(e.left),
                o = this.bottomRight.row + t(e.bottom),
                s = this.bottomRight.col + t(e.right);
            return 0 > r && 0 > s || 0 > i && 0 > o ? a : o >= i && s >= r ? new c(new l(n(i), n(r)), new l(n(o), n(s))) : a
        },
        move: function(e, t) {
            return new c(new l(this.topLeft.row + e, this.topLeft.col + t), new l(this.bottomRight.row + e, this.bottomRight.col + t))
        },
        first: function() {
            return this.topLeft
        },
        isCell: function() {
            return !this.endSheet && this.topLeft.eq(this.bottomRight)
        },
        toString: function() {
            return this.topLeft + ":" + this.bottomRight
        },
        adjust: function(e, t, n, i, r, o, s) {
            var l = this.topLeft.adjust(e, t, n, i, r, o, s),
                d = this.bottomRight.adjust(e, t, n, i, r, o, s);
            return l === a && d === a ? a : (l === a ? (l = this.topLeft.absolute(e, t), r ? l.row = o : l.col = o, null != n && null != i && (l = l.relative(n, i, this.topLeft.rel))) : d === a && (d = this.bottomRight.absolute(e, t), r ? d.row = o - 1 : d.col = o - 1, null != n && null != i && (d = d.relative(n, i, this.bottomRight.rel))), new c(l, d).setSheet(this.sheet, this.hasSheet()).simplify())
        },
        valid: function() {
            return this.topLeft.valid() && this.bottomRight.valid()
        }
    }), d = o.extend({
        init: function(e) {
            this.refs = e, this.length = this.refs.length
        },
        intersect: function(e) {
            var t, n, i = [];
            for (t = 0; this.length > t; ++t) n = e.intersect(this.refs[t]), n !== a && i.push(n);
            return i.length > 0 ? new d(i).simplify() : a
        },
        simplify: function() {
            var e = new d(this.refs.reduce(function(e, t) {
                return t = t.simplify(), t !== a && e.push(t), e
            }, []));
            return e.empty() ? a : e.single() ? e.refs[0] : e
        },
        absolute: function(e, t) {
            return new d(this.refs.map(function(n) {
                return n.absolute(e, t)
            }))
        },
        forEach: function(e, t) {
            this.refs.forEach(e, t)
        },
        toRangeRef: function() {
            return this.refs[0].toRangeRef()
        },
        contains: function(e) {
            return this.refs.some(function(t) {
                return t.contains(e)
            })
        },
        map: function(e, t) {
            return new d(this.refs.map(e, t))
        },
        first: function() {
            return this.refs[0].first()
        },
        lastRange: function() {
            return this.refs[this.length - 1]
        },
        size: function() {
            return this.length
        },
        single: function() {
            return 1 == this.length
        },
        empty: function() {
            return 0 === this.length
        },
        isCell: function() {
            return this.single() && this.refs[0].isCell()
        },
        rangeAt: function(e) {
            return this.refs[e]
        },
        nextRangeIndex: function(e) {
            return e === this.length - 1 ? 0 : e + 1
        },
        previousRangeIndex: function(e) {
            return 0 === e ? this.length - 1 : e - 1
        },
        concat: function(e) {
            return new d(this.refs.concat([e]))
        },
        print: function(e, t) {
            return this.refs.map(function(n) {
                return n.print(e, t)
            }).join(",")
        },
        replaceAt: function(e, t) {
            var n = this.refs.slice();
            return n.splice(e, 1, t), new d(n)
        },
        leftColumn: function() {
            return this.map(function(e) {
                return e.leftColumn()
            })
        },
        rightColumn: function() {
            return this.map(function(e) {
                return e.rightColumn()
            })
        },
        topRow: function() {
            return this.map(function(e) {
                return e.topRow()
            })
        },
        bottomRow: function() {
            return this.map(function(e) {
                return e.bottomRow()
            })
        },
        forEachRow: function(e) {
            this.forEach(function(t) {
                t.forEachRow(e)
            })
        },
        forEachColumn: function(e) {
            this.forEach(function(t) {
                t.forEachColumn(e)
            })
        },
        adjust: function(e, t, n, i, r, o, a) {
            return this.map(function(s) {
                return s.adjust(e, t, n, i, r, o, a)
            }).simplify()
        },
        toString: function() {
            return this.refs.map(function(e) {
                return "" + e
            }).join(", ")
        },
        valid: function() {
            for (var e = this.refs.length; --e >= 0;)
                if (this.refs[e].valid()) return !1;
            return !0
        }
    }), i.NULLREF = a, i.SHEETREF = new c(new l(0, 0), new l(1 / 0, 1 / 0)), i.FIRSTREF = new l(0, 0), i.Ref = o, i.NameRef = s, i.CellRef = l, i.RangeRef = c, i.UnionRef = d, i.SHEETREF.print = function() {
        return "#SHEET"
    })
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/autofillcalculator.min", ["kendo.core.min"], e)
}(function() {
    ! function(e) {
        var t, n, i;
        e.support.browser.msie && 9 > e.support.browser.version || (t = e.spreadsheet.RangeRef, n = e.spreadsheet.CellRef, i = e.Class.extend({
            init: function(e) {
                this._grid = e
            },
            rectIsVertical: function(e, t, n, i) {
                var r = this._grid.rectangle(e.toRangeRef()),
                    o = this._grid.rectangle(t.toRangeRef());
                return Math.abs(o[i] - r[i]) > Math.abs(r[n] - o[n])
            },
            autoFillDest: function(e, i) {
                var r, o, a, s, l, c, d, u = e.topLeft,
                    h = e.bottomRight,
                    f = i.row >= u.row,
                    p = i.col >= u.col;
                return r = f ? p ? 4 : 3 : p ? 2 : 1, 4 === r ? (o = u, a = h, l = i.row > a.row || i.col > a.col, l && (i = new n(Math.max(i.row, a.row), Math.max(i.col, a.col))), s = this.rectIsVertical(a, i, "right", "bottom") ? new n(i.row, a.col) : new n(a.row, i.col)) : 3 === r ? (c = new n(u.col, h.row), i.row > h.row && this.rectIsVertical(c, i, "left", "bottom") ? (o = u, s = new n(i.row, h.col)) : (o = h, s = new n(u.row, i.col))) : 2 === r ? (d = new n(u.row, h.col), i.col > h.col && !this.rectIsVertical(d, i, "right", "top") ? (o = u, s = new n(h.row, i.col)) : (o = h, s = new n(i.row, u.col))) : (o = h, s = this.rectIsVertical(u, i, "left", "top") ? new n(i.row, u.col) : new n(u.row, i.col)), this._grid.normalize(new t(o, s))
            }
        }), e.spreadsheet.AutoFillCalculator = i)
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/navigator.min", ["kendo.core.min", "spreadsheet/autofillcalculator.min"], e)
}(function() {
    ! function(e) {
        var t, n, i, r;
        e.support.browser.msie && 9 > e.support.browser.version || (t = e.spreadsheet.RangeRef, n = e.spreadsheet.CellRef, i = e.Class.extend({
            init: function(e, t, n, i) {
                this.rangeGetter = n, this.prevLeft = function(n) {
                    var r = i(this.range(n)),
                        o = this.range(t.prevVisible(r.topLeft[e]));
                    return i(o).topLeft[e]
                }, this.nextRight = function(n) {
                    var r = i(this.range(n)),
                        o = this.range(t.nextVisible(r.bottomRight[e]));
                    return i(o).bottomRight[e]
                }, this.nextLeft = function(n) {
                    var r = i(this.range(n));
                    return t.nextVisible(r.bottomRight[e])
                }, this.prevRight = function(n) {
                    var r = i(this.range(n));
                    return t.prevVisible(r.topLeft[e])
                }
            },
            boundary: function(e, t) {
                this.top = e, this.bottom = t
            },
            range: function(e) {
                return this.rangeGetter(e, this.top, this.bottom)
            }
        }), r = e.Class.extend({
            init: function(t) {
                this._sheet = t, this.columns = this._sheet._grid._columns, this.autoFillCalculator = new e.spreadsheet.AutoFillCalculator(t._grid), this.colEdge = new i("col", this._sheet._grid._columns, this.columnRange.bind(this), this.union.bind(this)), this.rowEdge = new i("row", this._sheet._grid._rows, this.rowRange.bind(this), this.union.bind(this))
            },
            height: function(e) {
                this._viewPortHeight = e
            },
            union: function(e) {
                return this._sheet.unionWithMerged(e)
            },
            columnRange: function(e, t, n) {
                return this._sheet._ref(t, e, n - t, 1)
            },
            rowRange: function(e, t, n) {
                return this._sheet._ref(e, t, 1, n - t)
            },
            selectionIncludesMergedCells: function() {
                return this._sheet.select().contains(this._sheet._mergedCells)
            },
            setSelectionValue: function(e) {
                var t = this._sheet.selection();
                setTimeout(function() {
                    t.value(e())
                })
            },
            selectAll: function() {
                this._sheet.select(this._sheet._sheetRef)
            },
            select: function(e, t, n) {
                e = this.refForMode(e, t), n && (e = this._sheet.select().concat(e)), this._sheet.select(e)
            },
            refForMode: function(e, t) {
                var n = this._sheet._grid;
                switch (t) {
                    case "range":
                        e = n.normalize(e);
                        break;
                    case "row":
                        e = n.rowRef(e.row);
                        break;
                    case "column":
                        e = n.colRef(e.col);
                        break;
                    case "sheet":
                        e = this._sheet._sheetRef
                }
                return e
            },
            startSelection: function(e, t, n) {
                "autofill" == t ? this._sheet.startAutoFill() : (this._sheet.startSelection(), this.select(e, t, n))
            },
            completeSelection: function() {
                this._sheet.completeSelection()
            },
            selectForContextMenu: function(e, t) {
                var n = this._sheet;
                n.select().contains(this.refForMode(e, t)) || this.select(e, t)
            },
            modifySelection: function(e) {
                var n, i, r = this.determineDirection(e),
                    o = this._sheet,
                    a = this._viewPortHeight,
                    s = o._grid._rows,
                    l = o._grid._columns,
                    c = o.currentOriginalSelectionRange(),
                    d = o.select().toRangeRef(),
                    u = o.activeCell(),
                    h = c.topLeft.clone(),
                    f = c.bottomRight.clone();
                switch (this.colEdge.boundary(d.topLeft.row, d.bottomRight.row), this.rowEdge.boundary(d.topLeft.col, d.bottomRight.col), r) {
                    case "expand-left":
                        h.col = this.colEdge.prevLeft(h.col), n = h;
                        break;
                    case "shrink-right":
                        h.col = this.colEdge.nextLeft(h.col), n = h;
                        break;
                    case "expand-right":
                        f.col = this.colEdge.nextRight(f.col), n = f;
                        break;
                    case "shrink-left":
                        f.col = this.colEdge.prevRight(f.col), n = f;
                        break;
                    case "expand-up":
                        h.row = this.rowEdge.prevLeft(h.row), n = h;
                        break;
                    case "shrink-down":
                        h.row = this.rowEdge.nextLeft(h.row), n = h;
                        break;
                    case "expand-down":
                        f.row = this.rowEdge.nextRight(f.row), n = f;
                        break;
                    case "shrink-up":
                        f.row = this.rowEdge.prevRight(f.row), n = f;
                        break;
                    case "expand-page-up":
                        h.row = s.prevPage(h.row, a);
                        break;
                    case "shrink-page-up":
                        f.row = s.prevPage(f.row, a);
                        break;
                    case "expand-page-down":
                        f.row = s.nextPage(f.row, a);
                        break;
                    case "shrink-page-down":
                        h.row = s.nextPage(h.row, a);
                        break;
                    case "first-col":
                        h.col = l.firstVisible(), f.col = u.bottomRight.col, n = h;
                        break;
                    case "last-col":
                        f.col = l.lastVisible(), h.col = u.topLeft.col, n = f;
                        break;
                    case "first-row":
                        h.row = s.firstVisible(), f.row = u.bottomRight.row, n = h;
                        break;
                    case "last-row":
                        f.row = s.lastVisible(), h.row = u.topLeft.row, n = f;
                        break;
                    case "last":
                        f.row = s.lastVisible(), f.col = l.lastVisible(), h = u.topLeft, n = f;
                        break;
                    case "first":
                        h.row = s.firstVisible(), h.col = l.firstVisible(), f = u.bottomRight, n = h
                }
                return i = new t(h, f), this.union(i).intersects(u) ? (n && o.focus(n), void this.updateCurrentSelectionRange(i)) : void this.modifySelection(r.replace("shrink", "expand"))
            },
            moveActiveCell: function(e) {
                var t = this._sheet,
                    i = t.activeCell(),
                    r = i.topLeft,
                    o = i.bottomRight,
                    a = t.originalActiveCell(),
                    s = t._grid._rows,
                    l = t._grid._columns,
                    c = a.row,
                    d = a.col;
                switch (e) {
                    case "left":
                        d = l.prevVisible(r.col);
                        break;
                    case "up":
                        c = s.prevVisible(r.row);
                        break;
                    case "right":
                        d = l.nextVisible(o.col);
                        break;
                    case "down":
                        c = s.nextVisible(o.row);
                        break;
                    case "first-col":
                        d = l.firstVisible();
                        break;
                    case "last-col":
                        d = l.lastVisible();
                        break;
                    case "first-row":
                        c = s.firstVisible();
                        break;
                    case "last-row":
                        c = s.lastVisible();
                        break;
                    case "last":
                        c = s.lastVisible(), d = l.lastVisible();
                        break;
                    case "first":
                        c = s.firstVisible(), d = l.firstVisible();
                        break;
                    case "next-page":
                        c = s.nextPage(o.row, this._viewPortHeight);
                        break;
                    case "prev-page":
                        c = s.prevPage(o.row, this._viewPortHeight)
                }
                t.select(new n(c, d))
            },
            navigateInSelection: function(e) {
                for (var t, i = this._sheet, r = i.activeCell(), o = r.topLeft, a = i.originalActiveCell(), s = i._grid._rows, l = i._grid._columns, c = a.row, d = a.col, u = i.currentNavigationRange(), h = u.topLeft, f = u.bottomRight, p = !1, m = o.col, g = o.row; !p;) {
                    switch (t = new n(c, d), e) {
                        case "next":
                            f.eq(t) ? (u = i.nextNavigationRange(), c = u.topLeft.row, d = u.topLeft.col) : (d = l.nextVisible(m, !0), d > f.col && (d = h.col, c = s.nextVisible(c, !0)));
                            break;
                        case "previous":
                            h.eq(t) ? (u = i.previousNavigationRange(), c = u.bottomRight.row, d = u.bottomRight.col) : (d = l.prevVisible(m, !0), h.col > d && (d = f.col, c = s.prevVisible(c, !0)));
                            break;
                        case "lower":
                            f.eq(t) ? (u = i.nextNavigationRange(), c = u.topLeft.row, d = u.topLeft.col) : (c = s.nextVisible(g, !0), c > f.row && (c = h.row, d = l.nextVisible(d, !0)));
                            break;
                        case "upper":
                            h.eq(t) ? (u = i.previousNavigationRange(), c = u.bottomRight.row, d = u.bottomRight.col) : (c = s.prevVisible(g, !0), h.row > c && (c = f.row, d = l.prevVisible(d, !0)));
                            break;
                        default:
                            throw Error("Unknown entry navigation: " + e)
                    }
                    p = !this.shouldSkip(c, d), m = d, g = c
                }
                i.singleCellSelection() ? i.select(new n(c, d)) : i.activeCell(new n(c, d))
            },
            extendSelection: function(e, n) {
                var i, r = this._sheet,
                    o = r._grid;
                return "autofill" === n ? void this.resizeAutoFill(e) : ("range" === n ? e = o.normalize(e) : "row" === n ? e = o.rowRef(e.row).bottomRight : "column" === n && (e = o.colRef(e.col).bottomRight), i = r.originalActiveCell().toRangeRef(), void this.updateCurrentSelectionRange(new t(i.topLeft, e)))
            },
            shouldSkip: function(e, t) {
                var i = new n(e, t),
                    r = !1;
                return this._sheet.forEachMergedCell(function(e) {
                    e.intersects(i) && !e.collapse().eq(i) && (r = !0)
                }), r
            },
            resizeAutoFill: function(e) {
                var t, n, i, r, o, a = this._sheet,
                    s = a.select(),
                    l = a._autoFillOrigin,
                    c = this.autoFillCalculator.autoFillDest(s, e),
                    d = this.punch(s, c);
                d || (r = a.range(c)._previewFillFrom(a.range(l)), r && (n = r.direction, o = r.props, 0 === n || 1 == n ? (i = o[o.length - 1], t = i[i.length - 1].value) : 2 === n ? (i = o[0], t = i[i.length - 1].value) : 3 === n && (i = o[o.length - 1], t = i[0].value))), a.updateAutoFill(c, d, t, n)
            },
            determineDirection: function(e) {
                var t = this._sheet.currentSelectionRange(),
                    n = this._sheet.activeCell(),
                    i = n.topLeft.col == t.topLeft.col,
                    r = n.bottomRight.col == t.bottomRight.col,
                    o = n.topLeft.row == t.topLeft.row,
                    a = n.bottomRight.row == t.bottomRight.row;
                switch (e) {
                    case "left":
                        e = r ? "expand-left" : "shrink-left";
                        break;
                    case "right":
                        e = i ? "expand-right" : "shrink-right";
                        break;
                    case "up":
                        e = a ? "expand-up" : "shrink-up";
                        break;
                    case "down":
                        e = o ? "expand-down" : "shrink-down";
                        break;
                    case "prev-page":
                        e = a ? "expand-page-up" : "shrink-page-up";
                        break;
                    case "next-page":
                        e = o ? "expand-page-down" : "shrink-page-down"
                }
                return e
            },
            updateCurrentSelectionRange: function(e) {
                var t = this._sheet;
                t.select(t.originalSelect().replaceAt(t.selectionRangeIndex(), e), !1)
            },
            punch: function(e, i) {
                var r, o, a;
                return i.topLeft.eq(e.topLeft) && (e.bottomRight.row > i.bottomRight.row ? (o = this.rowEdge.nextRight(i.bottomRight.row), r = new t(new n(o, e.topLeft.col), e.bottomRight)) : e.bottomRight.col > i.bottomRight.col && (a = this.colEdge.nextRight(i.bottomRight.col), r = new t(new n(e.topLeft.row, a), e.bottomRight))), r
            }
        }), e.spreadsheet.SheetNavigator = r)
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/axismanager.min", ["kendo.core.min"], e)
}(function() {
    ! function(e) {
        if (!(e.support.browser.msie && 9 > e.support.browser.version)) {
            var t = e.Class.extend({
                init: function(e) {
                    this._sheet = e
                },
                forEachSelectedColumn: function(e) {
                    var t = this._sheet;
                    t.batch(function() {
                        t.select().forEachColumnIndex(function(n, i) {
                            e(t, n, i)
                        })
                    }, {
                        layout: !0,
                        recalc: !0
                    })
                },
                forEachSelectedRow: function(e) {
                    var t = this._sheet;
                    t.batch(function() {
                        t.select().forEachRowIndex(function(n, i) {
                            e(t, n, i)
                        })
                    }, {
                        layout: !0,
                        recalc: !0
                    })
                },
                includesHiddenColumns: function(e) {
                    return this._sheet._grid._columns.includesHidden(e.topLeft.col, e.bottomRight.col)
                },
                includesHiddenRows: function(e) {
                    return this._sheet._grid._rows.includesHidden(e.topLeft.row, e.bottomRight.row)
                },
                selectionIncludesHiddenColumns: function() {
                    return this.includesHiddenColumns(this._sheet.select())
                },
                selectionIncludesHiddenRows: function() {
                    return this.includesHiddenRows(this._sheet.select())
                },
                deleteSelectedColumns: function() {
                    this.forEachSelectedColumn(function(e, t, n) {
                        e.deleteColumn(t - n)
                    })
                },
                deleteSelectedRows: function() {
                    this.forEachSelectedRow(function(e, t, n) {
                        e.deleteRow(t - n)
                    })
                },
                hideSelectedColumns: function() {
                    this.forEachSelectedColumn(function(e, t) {
                        e.hideColumn(t)
                    })
                },
                hideSelectedRows: function() {
                    this.forEachSelectedRow(function(e, t) {
                        e.hideRow(t)
                    })
                },
                unhideSelectedColumns: function() {
                    this.forEachSelectedColumn(function(e, t) {
                        e.unhideColumn(t)
                    })
                },
                unhideSelectedRows: function() {
                    this.forEachSelectedRow(function(e, t) {
                        e.unhideRow(t)
                    })
                },
                addColumnLeft: function() {
                    this.forEachSelectedColumn(function(e, t, n) {
                        e.insertColumn(t - n)
                    })
                },
                addColumnRight: function() {
                    this.forEachSelectedColumn(function(e, t, n) {
                        e.insertColumn(t + (n + 1))
                    })
                },
                canAddRow: function() {
                    var e = this._sheet.select().toRangeRef(),
                        t = e.height();
                    return this._sheet.canInsertRow(0, t)
                },
                addRowAbove: function() {
                    this.forEachSelectedRow(function(e, t, n) {
                        e.insertRow(t - n)
                    })
                },
                addRowBelow: function() {
                    this.forEachSelectedRow(function(e, t, n) {
                        e.insertRow(t + (n + 1))
                    })
                }
            });
            e.spreadsheet.AxisManager = t
        }
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/clipboard.min", ["kendo.core.min"], e)
}(function() {
    ! function(e) {
        var t, n, i, r;
        e.support.browser.msie && 9 > e.support.browser.version || (t = e.jQuery, n = e.spreadsheet.RangeRef, i = e.spreadsheet.CellRef, r = e.Class.extend({
            init: function(t) {
                this.workbook = t, this.origin = e.spreadsheet.NULLREF, this.iframe = document.createElement("iframe"), this.iframe.className = "k-spreadsheet-clipboard-paste", this.menuInvoked = !0, this._external = {}, this._uid = e.guid(), document.body.appendChild(this.iframe)
            },
            canCopy: function() {
                var t = {
                        canCopy: !0
                    },
                    n = this.workbook.activeSheet().select();
                return n === e.spreadsheet.NULLREF && (t.canCopy = !1), n instanceof e.spreadsheet.UnionRef && (t.canCopy = !1, t.multiSelection = !0), this.menuInvoked && (t.canCopy = !1, t.menuInvoked = !0), t
            },
            canPaste: function() {
                var t, n = this.workbook.activeSheet(),
                    i = this.pasteRef(),
                    r = {
                        canPaste: !0
                    };
                return i === e.spreadsheet.NULLREF ? (t = this._external.hasOwnProperty("html") || this._external.hasOwnProperty("plain"), r.pasteOnMerged = this.intersectsMerged(), r.canPaste = r.pasteOnMerged ? !1 : t, r) : (i.eq(n.unionWithMerged(i)) || (r.canPaste = !1, r.pasteOnMerged = !0), this.menuInvoked && (r.canPaste = !1, r.menuInvoked = !0), (i.bottomRight.row >= n._rows._count || i.bottomRight.col >= n._columns._count) && (r.canPaste = !1, r.overflow = !0), r)
            },
            intersectsMerged: function() {
                var e, t = this.workbook.activeSheet(),
                    n = this.parse(this._external);
                return this.origin = this.stateRangeRef(n), e = this.pasteRef(), !e.eq(t.unionWithMerged(e))
            },
            copy: function() {
                var e = this.workbook.activeSheet();
                this.origin = e.select(), this.contents = e.selection().getState()
            },
            cut: function() {
                var e = this.workbook.activeSheet();
                this.copy(), e.range(e.select()).clear()
            },
            pasteRef: function() {
                var e = this.workbook.activeSheet(),
                    t = e.activeCell().first(),
                    n = this.origin.first(),
                    i = n.row - t.row,
                    r = n.col - t.col;
                return this.origin.relative(i, r, 3)
            },
            stateRangeRef: function(e) {
                var t, r, o, a, s = [],
                    l = [];
                for (t in e) "mergedCells" !== t && "ref" !== t && (r = t.split(","), s.push(r[0]), l.push(r[1]));
                return o = new i(Math.min.apply(null, s), Math.min.apply(null, l)), a = new i(Math.max.apply(null, s), Math.max.apply(null, l)), new n(o, a)
            },
            destroy: function() {
                document.body.removeChild(this.iframe)
            },
            paste: function() {
                var e, t = {},
                    n = this.workbook.activeSheet();
                this._isInternal() ? t = this.contents : (t = this.parse(this._external), this.origin = this.stateRangeRef(t)), e = this.pasteRef(), n.range(e).clear().setState(t), n.triggerChange({
                    recalc: !0,
                    ref: e
                })
            },
            external: function(e) {
                return e.html || e.plain ? void(this._external = e) : this._external
            },
            parse: function(e) {
                var n, r, o, a = {
                    ref: new i(0, 0, 0),
                    mergedCells: []
                };
                return e.html ? (n = this.iframe.contentWindow.document, n.open(), n.write(e.html), n.close(), r = t(n).find("table:first"), r.length ? a = this._parseHTML(r.find("tbody:first")) : e.plain ? a = this._parseTSV(e.plain) : (o = t(n.body).find(":not(style)"), a["0,0"] = this._cellState(o.text()))) : a = this._parseTSV(e.plain), a
            },
            _parseHTML: function(e) {
                var n = this,
                    r = {
                        ref: new i(0, 0, 0),
                        mergedCells: []
                    };
                return e.find("tr").each(function(n, i) {
                    t(i).find("td").each(function(r, o) {
                        var a, s, l, c, d, u = parseInt(t(o).attr("rowspan"), 10) - 1 || 0,
                            h = parseInt(t(o).attr("colspan"), 10) - 1 || 0,
                            f = "<td/>";
                        if (u) {
                            for (s = n + u, l = n; s >= l; l++)
                                if (c = e.find("tr").eq(l), l > n && (f = "<td class='rowspan'></td>", 0 === r ? c.find("td").eq(r).after(f) : (d = Math.min(c.find("td").length, r), c.find("td").eq(d - 1).after(f))), h)
                                    for (a = r; h + r > a; a++) f = "<td class='rowspan colspan'></td>", c.find("td").eq(a).after(f)
                        } else if (h)
                            for (a = r; h + r > a; a++) f = "<td class='colspan'></td>", t(i).find("td").eq(a).after(f)
                    })
                }), e.find("tr").each(function(e, i) {
                    t(i).find("td").each(function(i, o) {
                        var a, s, l, c = e + "," + i,
                            d = parseInt(t(o).attr("rowspan"), 10) - 1 || 0,
                            u = parseInt(t(o).attr("colspan"), 10) - 1 || 0,
                            h = n._cellState(t(o));
                        r[c] = h, (d || u) && (a = String.fromCharCode(65 + i), s = String.fromCharCode(65 + i + u), l = a + (e + 1) + ":" + s + (e + 1 + d), r.mergedCells.push(l))
                    })
                }), r
            },
            _parseTSV: function(e) {
                var t, n, r, o, a = {
                    ref: new i(0, 0, 0),
                    mergedCells: []
                };
                if (-1 === e.indexOf("	") && -1 == e.indexOf("\n")) a["0,0"] = {
                    value: e
                };
                else
                    for (t = e.split("\n"), n = 0; t.length > n; n++)
                        for (r = t[n].split("	"), o = 0; r.length > o; o++) a[n + "," + o] = {
                            value: r[o]
                        };
                return a
            },
            _isInternal: function() {
                var e, n;
                return void 0 === this._external.html ? !0 : (e = t("<div/>").html(this._external.html).find("table.kendo-clipboard-" + this._uid).length ? !0 : !1, n = t("<div/>").html(this._external.plain).find("table.kendo-clipboard-" + this._uid).length ? !0 : !1, e || n ? !0 : !1)
            },
            _cellState: function(e) {
                var t = window.getComputedStyle(e[0]),
                    n = e.text(),
                    i = this._borderObject(t),
                    r = {
                        value: "" === n ? null : n,
                        borderBottom: i.borderBottom,
                        borderRight: i.borderRight,
                        borderLeft: i.borderLeft,
                        borderTop: i.borderTop,
                        fontSize: parseInt(t["font-size"], 10)
                    };
                return "rgb(0, 0, 0)" !== t["background-color"] && "rgba(0, 0, 0, 0)" !== t["background-color"] && (r.background = t["background-color"]), "rgb(0, 0, 0)" !== t.color && "rgba(0, 0, 0, 0)" !== t.color && (r.color = t.color), "underline" == t["text-decoration"] && (r.underline = !0), "italic" == t["font-style"] && (r.italic = !0), "bold" == t["font-weight"] && (r.bold = !0), "right" !== this._strippedStyle(t["text-align"]) && (r.textAlign = this._strippedStyle(t["text-align"])), "middle" !== t["vertical-align"] && (r.verticalAlign = t["vertical-align"]), "normal" !== t["word-wrap"] && (r.wrap = !0), r
            },
            _strippedStyle: function(e) {
                var t = ["-ms-", "-moz-", "-webkit-"];
                return t.forEach(function(t) {
                    e = e.replace(t, "")
                }), e
            },
            _borderObject: function(e) {
                var t = {},
                    n = ["borderBottom", "borderRight", "borderLeft", "borderTop"];
                return n.forEach(function(n) {
                    return "none" == e[n + "Style"] ? void(t[n] = null) : void(t[n] = {
                        size: 1,
                        color: e[n + "Color"]
                    })
                }), t
            }
        }), e.spreadsheet.Clipboard = r)
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/range.min", ["kendo.core.min", "util/text-metrics.min"], e)
}(function() {
    ! function(e) {
        function t(e) {
            return e.replace(/M/g, "m").replace(/'/g, '"').replace(/tt/, "am/pm")
        }

        function n(t) {
            return !/^=/.test(t) && /number|percent/.test(e.spreadsheet.calc.parse(null, 0, 0, t).type)
        }

        function i(t, n, i, r) {
            var o = {
                baselineMarkerSize: 0,
                width: n + "px",
                "font-size": (i || 12) + "px",
                "word-break": r === !0 ? "break-all" : "normal",
                "white-space": r === !0 ? "pre-wrap" : "pre"
            };
            return e.util.measureText(t, o, c).height
        }
        var r, o, a, s, l, c;
        e.support.browser.msie && 9 > e.support.browser.version || (r = e.jQuery, o = e.spreadsheet.UnionRef, a = ["color", "fontFamily", "underline", "italic", "bold", "textAlign", "verticalAlign", "background"], s = {
            borderTop: {
                complement: "borderBottom",
                direction: {
                    top: -1,
                    bottom: -1
                }
            },
            borderLeft: {
                complement: "borderRight",
                direction: {
                    left: -1,
                    right: -1
                }
            },
            borderRight: {
                complement: "borderLeft",
                direction: {
                    left: 1,
                    right: 1
                }
            },
            borderBottom: {
                complement: "borderTop",
                direction: {
                    top: 1,
                    bottom: 1
                }
            }
        }, l = e.Class.extend({
            init: function(e, t) {
                this._sheet = t, this._ref = e
            },
            _normalize: function(e) {
                return this._sheet._grid.normalize(e)
            },
            _set: function(e, t, n) {
                var i = this._sheet;
                return this._ref.forEach(function(n) {
                    i._set(n.toRangeRef(), e, t)
                }), n || i.triggerChange({
                    recalc: "formula" == e || "value" == e || "validation" == e,
                    value: t,
                    ref: this._ref
                }), this
            },
            _get: function(e) {
                return this._sheet._get(this._ref.toRangeRef(), e)
            },
            _property: function(e, t) {
                return void 0 === t ? this._get(e) : this._set(e, t)
            },
            value: function(e) {
                return void 0 !== e && this._set("formula", null, !0), this._property("value", e)
            },
            resize: function(e) {
                var t = this._resizedRef(e);
                return new l(t, this._sheet)
            },
            _resizedRef: function(e) {
                return this._ref.map(function(t) {
                    return t.toRangeRef().resize(e)
                })
            },
            _border: function(t, n) {
                var i, r = s[t].complement,
                    o = s[t].direction,
                    a = this._sheet;
                return a.batch(function() {
                    i = this._property(t, n), void 0 !== n && this._resizedRef(o).forEach(function(t) {
                        t !== e.spreadsheet.NULLREF && new l(t, a)._property(r, null)
                    })
                }.bind(this), {}), i
            },
            _collapsedBorder: function(t) {
                var n = this._property(t),
                    i = s[t].complement,
                    r = s[t].direction;
                return this._resizedRef(r).forEach(function(t) {
                    if (!n && t !== e.spreadsheet.NULLREF) {
                        var r = new l(t, this._sheet);
                        n = r._property(i)
                    }
                }.bind(this)), n
            },
            borderTop: function(e) {
                return this._border("borderTop", e)
            },
            borderRight: function(e) {
                return this._border("borderRight", e)
            },
            borderBottom: function(e) {
                return this._border("borderBottom", e)
            },
            borderLeft: function(e) {
                return this._border("borderLeft", e)
            },
            collapsedBorderTop: function() {
                return this._collapsedBorder("borderTop")
            },
            collapsedBorderRight: function() {
                return this._collapsedBorder("borderRight")
            },
            collapsedBorderBottom: function() {
                return this._collapsedBorder("borderBottom")
            },
            collapsedBorderLeft: function() {
                return this._collapsedBorder("borderLeft")
            },
            input: function(i) {
                var r, o, a, s, l, c, d = this._get("format");
                return void 0 !== i ? (o = this._ref.toRangeRef().topLeft, r = e.spreadsheet.calc.parse(this._sheet.name(), o.row, o.col, i), this._sheet.batch(function() {
                    var n = null;
                    "exp" == r.type ? n = e.spreadsheet.calc.compile(r) : "date" == r.type ? this.format(r.format || t(e.culture().calendar.patterns.d)) : "percent" == r.type ? this.format(100 * r.value == (100 * r.value | 0) ? "0%" : "0.00%") : r.format && !d && this.format(r.format), this.formula(n), n || this.value(r.value)
                }.bind(this), {
                    recalc: !0,
                    value: i,
                    ref: this._ref,
                    editorChange: this._sheet.isInEditMode()
                }), this) : (i = this._get("value"), a = this._get("formula"), s = d && !a && e.spreadsheet.formatting.type(i, d), a ? i = "=" + a : d && "number" == typeof i && (l = e.spreadsheet.formatting.text(i, d), r = e.spreadsheet.calc.parse(null, null, null, l), c = e.spreadsheet.formatting.text(r.value, d), l == c) ? i = l : "date" === s ? i = e.toString(e.spreadsheet.numberToDate(i), e.culture().calendar.patterns.d) : "percent" === s ? i = 100 * i + "%" : "string" == typeof i && (/^[=']/.test(i) || /^(?:true|false)$/i.test(i) || n(i)) && (i = "'" + i), i)
            },
            enable: function(e) {
                return void 0 === e ? (e = !0, this._sheet.forEach(this._ref.toRangeRef(), function(t, t, n) {
                    n.enable === !1 && (e = !1)
                }), e) : void this._property("enable", e)
            },
            format: function(e) {
                return this._property("format", e)
            },
            formula: function(e) {
                if (void 0 === e) {
                    var t = this._get("formula");
                    return t ? "" + t : null
                }
                return this._property("formula", e)
            },
            validation: function(e) {
                if (void 0 === e) {
                    var t = this._get("validation");
                    return t ? t.toJSON() : null
                }
                return this._property("validation", e)
            },
            _getValidationState: function() {
                var e, t, n, i = this._ref.toRangeRef(),
                    r = i.topLeft.row,
                    o = i.topLeft.col,
                    a = i.bottomRight.row,
                    s = i.bottomRight.col;
                for (e = o; s >= e; e++)
                    for (t = r; a >= t; t++)
                        if (n = this._sheet._validation(t, e), n && "reject" === n.type && n.value === !1) return n;
                return !1
            },
            merge: function() {
                return this._ref = this._sheet._merge(this._ref), this
            },
            unmerge: function() {
                var e = this._sheet._mergedCells;
                return this._ref.forEach(function(t) {
                    t.toRangeRef().intersecting(e).forEach(function(t) {
                        e.splice(e.indexOf(t), 1)
                    })
                }), this._sheet.triggerChange({}), this
            },
            select: function() {
                return this._sheet.select(this._ref), this
            },
            values: function(t) {
                var n, i, r, a, s, l, c, d, u, h;
                if (this._ref instanceof o) throw Error("Unsupported for multiple ranges.");
                if (this._ref === e.spreadsheet.NULLREF) {
                    if (void 0 !== t) throw Error("Unsupported for NULLREF.");
                    return []
                }
                if (n = this._ref.toRangeRef(), i = n.topLeft.row, r = n.topLeft.col, a = n.bottomRight.row, s = n.bottomRight.col, void 0 === t) {
                    for (t = Array(n.height()), d = 0; t.length > d; d++) t[d] = Array(n.width());
                    for (l = r; s >= l; l++)
                        for (c = i; a >= c; c++) t[c - i][l - r] = this._sheet._value(c, l);
                    return t
                }
                for (l = r; s >= l; l++)
                    for (c = i; a >= c; c++) u = t[c - i], u && (h = u[l - r], void 0 !== h && this._sheet._value(c, l, h));
                return this._sheet.triggerChange({
                    recalc: !0
                }), this
            },
            _properties: function(t) {
                var n, i, r, a, s, l, c, d, u, h, f;
                if (this._ref instanceof o) throw Error("Unsupported for multiple ranges.");
                if (this._ref === e.spreadsheet.NULLREF) {
                    if (void 0 !== t) throw Error("Unsupported for NULLREF.");
                    return []
                }
                if (n = this._ref.toRangeRef(), i = n.topLeft.row, r = n.topLeft.col, a = n.bottomRight.row, s = n.bottomRight.col, d = this._sheet, void 0 === t) return t = Array(n.height()), d.forEach(n, function(e, n, o) {
                    e -= i, n -= r;
                    var a = t[e] || (t[e] = []);
                    a[n] = o
                }), t;
                for (n = n.clone(), h = function(e) {
                    var t = u[e];
                    n.topLeft.row = n.bottomRight.row = c, n.topLeft.col = n.bottomRight.col = l, d._set(n, e, t)
                }, l = r; s >= l; l++)
                    for (c = i; a >= c; c++) f = t[c - i], f && (u = f[l - r], u && Object.keys(u).forEach(h));
                return d.triggerChange({
                    recalc: !0,
                    ref: this._ref
                }), this
            },
            clear: function(e) {
                var t = !e || !Object.keys(e).length,
                    n = this._sheet,
                    i = {
                        recalc: t || e && e.contentsOnly === !0,
                        ref: this._ref
                    };
                return n.batch(function() {
                    i.recalc && this.formula(null), t && this.validation(null), (t || e && e.formatOnly === !0) && (a.forEach(function(e) {
                        this[e](null)
                    }.bind(this)), this.format(null), this.unmerge())
                }.bind(this), i), this
            },
            clearContent: function() {
                return this.clear({
                    contentsOnly: !0
                })
            },
            clearFormat: function() {
                return this.clear({
                    formatOnly: !0
                })
            },
            isSortable: function() {
                return !(this._ref instanceof o || this._ref === e.spreadsheet.NULLREF)
            },
            sort: function(t) {
                if (this._ref instanceof o) throw Error("Unsupported for multiple ranges.");
                if (this._ref === e.spreadsheet.NULLREF) throw Error("Unsupported for NULLREF.");
                return void 0 === t && (t = {
                    column: 0
                }), t = t instanceof Array ? t : [t], this._sheet._sortBy(this._ref.toRangeRef(), t.map(function(e, t) {
                    return "number" == typeof e && (e = {
                        column: e
                    }), {
                        index: void 0 === e.column ? t : e.column,
                        ascending: void 0 === e.ascending ? !0 : e.ascending
                    }
                })), this
            },
            isFilterable: function() {
                return !(this._ref instanceof o)
            },
            filter: function(e) {
                if (this._ref instanceof o) throw Error("Unsupported for multiple ranges.");
                return e === !1 ? this.clearFilters() : (e = e === !0 ? [] : e instanceof Array ? e : [e], this._sheet._filterBy(this._ref.toRangeRef(), e.map(function(e, t) {
                    return {
                        index: void 0 === e.column ? t : e.column,
                        filter: e.filter
                    }
                }))), this
            },
            clearFilter: function(e) {
                this._sheet.clearFilter(e)
            },
            clearFilters: function() {
                var e, t = this._sheet.filter(),
                    n = [];
                if (t) {
                    for (e = 0; t.columns.length > e; e++) n.push(e);
                    this._sheet.batch(function() {
                        this.clearFilter(n), this._filter = null
                    }, {
                        layout: !0,
                        filter: !0
                    })
                }
            },
            hasFilter: function() {
                var e = this._sheet.filter();
                return !!e
            },
            leftColumn: function() {
                return new l(this._ref.leftColumn(), this._sheet)
            },
            rightColumn: function() {
                return new l(this._ref.rightColumn(), this._sheet)
            },
            topRow: function() {
                return new l(this._ref.topRow(), this._sheet)
            },
            bottomRow: function() {
                return new l(this._ref.bottomRow(), this._sheet)
            },
            column: function(e) {
                return new l(this._ref.toColumn(e), this._sheet)
            },
            row: function(e) {
                return new l(this._ref.toRow(e), this._sheet)
            },
            forEachRow: function(e) {
                this._ref.forEachRow(function(t) {
                    e(new l(t, this._sheet))
                }.bind(this))
            },
            forEachColumn: function(e) {
                this._ref.forEachColumn(function(t) {
                    e(new l(t, this._sheet))
                }.bind(this))
            },
            sheet: function() {
                return this._sheet
            },
            topLeft: function() {
                return this._ref.toRangeRef().topLeft
            },
            intersectingMerged: function() {
                var e = this._sheet,
                    t = [];
                return e._mergedCells.forEach(function(e) {
                    e.intersects(this._ref) && t.push("" + e)
                }.bind(this)), t
            },
            getState: function(t) {
                var n, i = {
                    ref: this._ref.first()
                };
                return t ? n = "input" === t ? ["value", "formula"] : "border" === t ? ["borderLeft", "borderTop", "borderRight", "borderBottom"] : [t] : (n = e.spreadsheet.ALL_PROPERTIES, i.mergedCells = this.intersectingMerged()), this.forEachCell(function(e, t, r) {
                    var o = i[e + "," + t] = {};
                    n.forEach(function(e) {
                        o[e] = r[e] || null
                    })
                }), i
            },
            setState: function(e) {
                var t = this._sheet,
                    n = this._ref.first(),
                    i = e.ref.row - n.row,
                    r = e.ref.col - n.col;
                t.batch(function() {
                    e.mergedCells && this.unmerge(), this.forEachCell(function(n, o) {
                        var a, s = e[n + i + "," + (o + r)],
                            l = t.range(n, o);
                        for (a in s) "value" != a && l._set(a, s[a]);
                        s.formula || l._set("value", s.value)
                    }), e.mergedCells && e.mergedCells.forEach(function(e) {
                        e = t._ref(e).relative(i, r, 3), t.range(e).merge()
                    }, this)
                }.bind(this), {
                    recalc: !0
                })
            },
            _adjustRowHeight: function() {
                var t, n = this._sheet,
                    i = this.getState(),
                    r = [];
                for (t = 0; i.mergedCells.length > t; t++) r.push(n.range(i.mergedCells[t]));
                this.forEachRow(function(t) {
                    var i = t.sheet().rowHeight(t.topLeft().row);
                    t.forEachCell(function(t, o, a) {
                        var s, l, c = n.range(t, o),
                            d = 0;
                        for (s = 0; r.length > s; s++)
                            if (c._ref.intersects(r[s]._ref)) {
                                d += a.width;
                                break
                            } l = Math.max(n.columnWidth(o), d), i = Math.max(i, e.spreadsheet.util.getTextHeight(a.value, l, a.fontSize, a.wrap))
                    }), n.rowHeight(t.topLeft().row, Math.max(n.rowHeight(t.topLeft().row), i))
                })
            },
            forEachCell: function(e) {
                this._ref.forEach(function(t) {
                    this._sheet.forEach(t.toRangeRef(), e.bind(this))
                }.bind(this))
            },
            hasValue: function() {
                var e = !1;
                return this.forEachCell(function(t, n, i) {
                    0 !== Object.keys(i).length && (e = !0)
                }), e
            },
            wrap: function(t) {
                return void 0 === t ? !!this._property("wrap") : (this.forEachRow(function(t) {
                    var n = t.sheet().rowHeight(t.topLeft().row);
                    t.forEachCell(function(t, i, r) {
                        var o = this._sheet.columnWidth(i);
                        null !== r.value && void 0 !== r.value && (n = Math.max(n, e.spreadsheet.util.getTextHeight(r.value, o, r.fontSize, !0)))
                    }), t.sheet().rowHeight(t.topLeft().row, n)
                }.bind(this)), this._property("wrap", t), this)
            },
            fontSize: function(t) {
                return void 0 === t ? this._property("fontSize") : (this.forEachRow(function(n) {
                    var i = n.sheet().rowHeight(n.topLeft().row);
                    n.forEachCell(function(n, r, o) {
                        var a = this._sheet.columnWidth(r);
                        null !== o.value && void 0 !== o.value && (i = Math.max(i, e.spreadsheet.util.getTextHeight(o.value, a, t, o.wrap)))
                    }), n.sheet().rowHeight(n.topLeft().row, i)
                }.bind(this)), this._property("fontSize", t), this)
            },
            draw: function(e, t) {
                this._sheet.draw(this, e, t)
            }
        }), r.each(a, function(e, t) {
            l.prototype[t] = function(e) {
                return this._property(t, e)
            }
        }), c = r('<div style="position: absolute !important; top: -4000px !important; height: auto !important;padding: 1px !important; margin: 0 !important; border: 1px solid black !important;line-height: normal !important; visibility: hidden !important;white-space: pre-wrap !important; word-break: break-all !important;" />')[0], e.spreadsheet.util = {
            getTextHeight: i
        }, e.spreadsheet.Range = l)
    }(window.kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/runtime.min", ["spreadsheet/references.min"], e)
}(function() {
    "use strict";

    function e(t) {
        return t instanceof e ? t : void(this.code = t)
    }

    function t(e, t, n) {
        for (var i, r = n(e), o = e; ++e < t;) i = n(e), i > r && (r = i, o = e);
        return o
    }

    function n(t, n) {
        function i(e) {
            var t, n, l, c;
            return s = e[0], t = "{ ", Array.isArray(s) ? (d += "while (i < args.length) { ", u += "while (i < args.length) { ", t += "xargs.push(tmp = []); stack.push(xargs); xargs = tmp; ", t += "while (i < args.length) { ", t += e.map(i).join(""), t += "} ", t += "xargs = stack.pop(); ", u += "} ", d += "} ") : "+" == s ? (d += "while (i < args.length) { ", u += "while (i < args.length) { ", t += "xargs.push(tmp = []); stack.push(xargs); xargs = tmp; ", t += "do { ", t += e.slice(1).map(i).join(""), t += "} while (i < args.length); ", t += "xargs = stack.pop(); ", u += "} ", d += "} ") : "?" == s ? t += "if (!(" + a(e[1]) + ")) return new CalcError(err); " : (n = e[1], Array.isArray(n) && /^#?collect/.test(n[0]) ? (l = n[2], r(), t += "try {var $" + s + " = this.cellValues(args.slice(i", l && (t += ", i + " + l), t += ")).filter(function($" + s + "){ ", "collect" == n[0] && (t += "if ($" + s + " instanceof CalcError) throw $" + s + "; "), t += "return " + a(n[1]) + "; }, this); ", t += l ? "i += " + l + "; " : "i = args.length; ", t += "xargs.push($" + s + ")} catch(ex) { if (ex instanceof CalcError) return ex; throw ex; } ", u += "toResolve.push(args.slice(i)); ") : "rest" == n ? t += "xargs.push(args.slice(i)); i = args.length; " : ((p = /^\*/.test(s)) && (m = !0, s = s.substr(1)), t += "var $" + s + " = args[i++]; ", c = !1, /!$/.test(n) ? (n = n.substr(0, n.length - 1), c = !0) : t += "if ($" + s + " instanceof CalcError) return $" + s + "; ", t += o(n, c) + "xargs.push($" + s + "); ")), t += "} "
        }

        function r() {
            return l ? "$" + s : (f = !0, l = !0, u += "toResolve.push(args[i++]); ", "($" + s + " = this.force($" + s + "))")
        }

        function o(e, t) {
            l = !1;
            var n = "if (!(" + a(e) + ")) { ";
            return l && !t && (n += " if ($" + s + " instanceof CalcError) return $" + s + "; "), n += "return new CalcError(err); } ", l || (u += "i++; "), d += p ? "var $" + s + " = this.asMatrix(args[i]); if ($" + s + ") { xargs.push($" + s + "); width = Math.max(width, $" + s + ".width); height = Math.max(height, $" + s + ".height); arrays.push(true) } else { xargs.push(args[i]); arrays.push(false); } i++; " : "xargs.push(args[i++]); arrays.push(false); ", n
        }

        function a(e) {
            if (Array.isArray(e)) {
                if ("or" == e[0]) return "(" + e.slice(1).map(a).join(") || (") + ")";
                if ("and" == e[0]) return "(" + e.slice(1).map(a).join(") && (") + ")";
                if ("values" == e[0]) return "(" + e.slice(1).map(function(e) {
                    return r() + " === " + e
                }).join(") || (") + ")";
                if ("null" == e[0]) return "(" + a("null") + " ? (($" + s + " = " + e[1] + "), true) : false)";
                if ("between" == e[0] || "[between]" == e[0]) return "(" + r() + " >= " + e[1] + " && $" + s + " <= " + e[2] + " ? true : ((err = 'NUM'), false))";
                if ("(between)" == e[0]) return "(" + r() + " > " + e[1] + " && $" + s + " < " + e[2] + " ? true : ((err = 'NUM'), false))";
                if ("(between]" == e[0]) return "(" + r() + " > " + e[1] + " && $" + s + " <= " + e[2] + " ? true : ((err = 'NUM'), false))";
                if ("[between)" == e[0]) return "(" + r() + " >= " + e[1] + " && $" + s + " < " + e[2] + " ? true : ((err = 'NUM'), false))";
                if ("assert" == e[0]) {
                    var t = e[2] || "N/A";
                    return "((" + e[1] + ") ? true : (err = " + JSON.stringify(t) + ", false))"
                }
                if ("not" == e[0]) return "!(" + a(e[1]) + ")";
                throw Error("Unknown array type condition: " + e[0])
            }
            if ("number" == e) return "(typeof " + r() + " == 'number' || typeof $" + s + " == 'boolean')";
            if ("integer" == e) return "((typeof " + r() + " == 'number' || typeof $" + s + " == 'boolean') ? ($" + s + " |= 0, true) : false)";
            if ("date" == e) return "((typeof " + r() + " == 'number') ? ($" + s + " |= 0, true) : false)";
            if ("datetime" == e) return "(typeof " + r() + " == 'number')";
            if ("divisor" == e) return "((typeof " + r() + " == 'number' || typeof $" + s + " == 'boolean') && ($" + s + " == 0 ? ((err = 'DIV/0'), false) : true))";
            if ("number+" == e) return "((typeof " + r() + " == 'number' || typeof $" + s + " == 'boolean') && ($" + s + " >= 0 ? true : ((err = 'NUM'), false)))";
            if ("integer+" == e) return "((typeof " + r() + " == 'number' || typeof $" + s + " == 'boolean') && (($" + s + " |= 0) >= 0 ? true : ((err = 'NUM'), false)))";
            if ("number++" == e) return "((typeof " + r() + " == 'number' || typeof $" + s + " == 'boolean') && ($" + s + " > 0 ? true : ((err = 'NUM'), false)))";
            if ("integer++" == e) return "((typeof " + r() + " == 'number' || typeof $" + s + " == 'boolean') && (($" + s + " |= 0 ) > 0) ? true : ((err = 'NUM'), false))";
            if ("string" == e) return "((typeof " + r() + " == 'string' || typeof $" + s + " == 'boolean' || typeof $" + s + " == 'number') ? ($" + s + " += '', true) : false)";
            if ("boolean" == e) return "(typeof " + r() + " == 'boolean')";
            if ("logical" == e) return "(typeof " + r() + " == 'boolean' || (typeof $" + s + " == 'number' ? ($" + s + " = !!$" + s + ", true) : false))";
            if ("matrix" == e) return r(), "((m = this.asMatrix($" + s + ")) ? ($" + s + " = m) : false)";
            if ("#matrix" == e) return "((m = this.asMatrix($" + s + ")) ? ($" + s + " = m) : false)";
            if ("ref" == e) return "($" + s + " instanceof kendo.spreadsheet.Ref)";
            if ("area" == e) return "($" + s + " instanceof kendo.spreadsheet.CellRef || $" + s + " instanceof kendo.spreadsheet.RangeRef)";
            if ("cell" == e) return "($" + s + " instanceof kendo.spreadsheet.CellRef)";
            if ("null" == e) return "(" + r() + " == null)";
            if ("anyvalue" == e) return "(" + r() + " != null && i <= args.length)";
            if ("forced" == e) return "(" + r() + ", i <= args.length)";
            if ("anything" == e) return "(i <= args.length)";
            if ("blank" == e) return "(" + r() + " == null || $" + s + " === '')";
            throw Error("Can't check for type: " + e)
        }
        var s, l, c, d = "function arrayArgs(args) { var xargs = [], width = 0, height = 0, arrays = [], i = 0; ",
            u = "function resolve(args, callback) { var toResolve = [], i = 0; ",
            h = "'use strict'; function check(args) { var stack = [], tmp, xargs = [], i = 0, m, err = 'VALUE'; ",
            f = !1,
            p = !1,
            m = !1;
        return h += n.map(i).join(""), h += "if (i < args.length) return new CalcError('N/A'); ", h += "return xargs; } ", d += "return { args: xargs, width: width, height: height, arrays: arrays }; } ", f ? (u += "this.resolveCells(toResolve, callback); } ", c = Function("CalcError", h + u + d + " return { resolve: resolve, check: check, arrayArgs: arrayArgs };")) : c = Function("CalcError", h + " return { check: check };"), c = c(e), m || delete c.arrayArgs, c
    }

    function i(t, n, i) {
        if (i instanceof e) return i;
        try {
            return n.apply(t, i)
        } catch (r) {
            if (r instanceof e) return r;
            throw r
        }
    }

    function r(e, t, n, r) {
        return function(o, a) {
            function s() {
                var t, s, l, c, d, u, h;
                if (r && (t = r.call(this, a), a = t.args, t.width > 0 && t.height > 0)) {
                    for (s = new F(this), l = 0; t.height > l; ++l)
                        for (c = 0; t.width > c; ++c) {
                            for (d = [], u = 0; a.length > u; ++u) t.arrays[u] ? (h = a[u], d[u] = h.get(l % h.height, c % h.width)) : d[u] = a[u];
                            d = n.call(this, d), s.set(l, c, i(this, e, d))
                        }
                    return o(s)
                }
                d = n.call(this, a), o(i(this, e, d))
            }
            t ? t.call(this, a, s) : s.call(this)
        }
    }

    function o(t, n, i, r) {
        return function(o, a) {
            function s() {
                var n, s, l, c, d, u, h, f, p;
                if (r && (n = r.call(this, a), a = n.args, n.width > 0 && n.height > 0))
                    for (s = new F(this), l = n.width * n.height, c = function(e, t) {
                        return function(n) {
                            return s.set(e, t, n), --l, 0 === l ? o(s) : void 0
                        }
                    }, d = 0; n.height > d && l > 0; ++d)
                        for (u = 0; n.width > u && l > 0; ++u) {
                            for (h = [], f = 0; a.length > f; ++f) n.arrays[f] ? (p = a[f], h[f] = p.get(d % p.height, u % p.width)) : h[f] = a[f];
                            if (h = i.call(this, h), h instanceof e) {
                                if (s.set(d, u, h), --l, 0 === l) return o(s)
                            } else h.unshift(c(d, u)), t.apply(this, h)
                        } else n = i.call(this, a), n instanceof e ? o(n) : (n.unshift(o), t.apply(this, n))
            }
            n ? n.call(this, a, s) : s.call(this)
        }
    }

    function a(e, t) {
        return e = e.toLowerCase(), M[e] = t, {
            args: function(i, o) {
                var a, s = n(e, i);
                return o && (s.arrayArgs && console.log("" + s.arrayArgs), s.resolve && console.log("" + s.resolve), s.check && console.log("" + s.check)), a = M[e] = r(t, s.resolve, s.check, s.arrayArgs), a.kendoSpreadsheetArgs = i, this
            },
            argsAsync: function(i, r) {
                var a, s = n(e, i);
                return r && (s.arrayArgs && console.log("" + s.arrayArgs), s.resolve && console.log("" + s.resolve), s.check && console.log("" + s.check)), a = M[e] = o(t, s.resolve, s.check, s.arrayArgs), a.kendoSpreadsheetArgs = i, this
            }
        }
    }

    function s(e, t, n) {
        return t++, (1461 * (e + 4800 + ((t - 14) / 12 | 0)) / 4 | 0) + (367 * (t - 2 - 12 * ((t - 14) / 12 | 0)) / 12 | 0) - (3 * ((e + 4900 + ((t - 14) / 12 | 0)) / 100 | 0) / 4 | 0) + n - 32075
    }

    function l(e) {
        var t, n, i, r, o, a, s;
        return t = e + 68569, n = 4 * t / 146097 | 0, t -= (146097 * n + 3) / 4 | 0, r = 4e3 * (t + 1) / 1461001 | 0, t = t - (1461 * r / 4 | 0) + 31, i = 80 * t / 2447 | 0, a = t - (2447 * i / 80 | 0), t = i / 11 | 0, o = i + 2 - 12 * t, s = 100 * (n - 49) + r + t, o--, {
            year: s,
            month: o,
            date: a,
            day: (e + 1) % 7,
            ord: z[c(s)][o] + a
        }
    }

    function c(e) {
        return e % 4 ? 0 : e % 100 ? 1 : e % 400 ? 0 : 1
    }

    function d(e) {
        return c(e) ? 366 : 365
    }

    function u(e, t) {
        return c(e) && 1 == t ? 29 : P[t]
    }

    function h(e) {
        return l((0 | e) + R)
    }

    function f(e, t, n) {
        return s(e, t, n) - R
    }

    function p(e) {
        var t, n, i, r, o = e - (0 | e);
        return 0 > o && o++, t = Math.round(H * o), n = Math.floor(t / L), t -= n * L, i = Math.floor(t / B), t -= i * B, r = Math.floor(t / 1e3), t -= 1e3 * r, {
            hours: n,
            minutes: i,
            seconds: r,
            milliseconds: t
        }
    }

    function m(e) {
        var t = h(e),
            n = p(e);
        return new Date(t.year, t.month, t.date, n.hours, n.minutes, n.seconds, n.milliseconds)
    }

    function g(e, t, n, i) {
        return (e + (t + (n + i / 1e3) / 60) / 60) / 24
    }

    function v(e) {
        var t = g(e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
        return e = f(e.getFullYear(), e.getMonth(), e.getDate()), 0 > e ? e - 1 + t : e + t
    }

    function _(e) {
        return kendo.parseDate(e, ["MM/dd/yyyy", "MM-dd-yyyy", "MM/dd/yy", "MM-dd-yy", "MMMM dd yyyy", "MMMM dd yy", "MMM dd yyyy", "MMM dd yy", "dd MMMM yyyy", "dd MMMM yy", "dd MMM yyyy", "dd MMM yy", "MMMM dd, yyyy", "MMMM dd, yy", "MMM dd, yyyy", "MMM dd, yy", "MMMM dd", "MMM dd", "MMMM yyyy", "MMM yyyy", "dd MMMM", "dd MMM", "MM-dd", "MM/dd"]) || kendo.parseDate(e)
    }

    function b(t) {
        return function(n, i) {
            return "string" == typeof n && "string" != typeof i && (i = null == i ? "" : i + ""), "string" != typeof n && "string" == typeof i && (n = null == n ? "" : n + ""), "number" == typeof n && null == i && (i = 0), "number" == typeof i && null == n && (n = 0), "string" == typeof n && "string" == typeof i && (n = n.toLowerCase(), i = i.toLowerCase()), typeof i == typeof n ? t(n, i) : new e("VALUE")
        }
    }
    var w, y, k, x, C, S, T, D, A, E, F, I, M, R, P, z, B, L, H, N, O, V;
    kendo.support.browser.msie && kendo.support.browser.version < 9 || (w = {}, y = kendo.spreadsheet, y.calc = w, k = w.runtime = {}, x = kendo.Class, C = y.Ref, S = y.CellRef, T = y.RangeRef, D = y.UnionRef, A = y.NULLREF, e.prototype.toString = function() {
        return "#" + this.code + ("NAME" == this.code ? "?" : "!")
    }, E = x.extend({
        init: function(e, t, n, i) {
            this.callback = e, this.formula = t, this.ss = n, this.parent = i
        },
        resolve: function(e) {
            var t = this;
            e instanceof C ? t.resolveCells([e], function() {
                e = t.getRefData(e), Array.isArray(e) && (e = e[0]), t._resolve(e)
            }) : t._resolve(e)
        },
        _resolve: function(e) {
            void 0 === e && (e = null);
            var t = this.formula;
            t.value = e, this.ss.onFormula(t) && this.callback && this.callback.call(t, e)
        },
        resolveCells: function(e, t) {
            function n(e) {
                e.formula.exec(a.ss, function() {
                    --r || t.call(a)
                }, a)
            }

            function i(e) {
                var t, n;
                for (t = 0; e.length > t; ++t) n = e[t], n.formula && s.push(n);
                return !0
            }
            var r, o, a = this,
                s = [];
            if (function l(e) {
                var t, n;
                for (t = 0; e.length > t; ++t) n = e[t], n instanceof C && i(a.getRefCells(n)), Array.isArray(n) && l(n)
            }(e), !s.length) return t.call(a);
            for (r = s.length, o = 0; s.length > o; ++o) n(s[o])
        },
        cellValues: function(e, t) {
            var n, i, r = [];
            for (n = 0; e.length > n; ++n) i = e[n], i instanceof C ? (i = this.getRefData(i), r = r.concat(i)) : Array.isArray(i) ? r = r.concat(this.cellValues(i)) : i instanceof F ? r = r.concat(this.cellValues(i.data)) : r.push(i);
            return t ? t.apply(this, r) : r
        },
        force: function(e) {
            return e instanceof C ? this.getRefData(e) : e
        },
        func: function(t, n, i) {
            t = t.toLowerCase();
            var r = M[t];
            return r ? r.call(this, n, i) : void n(new e("NAME"))
        },
        bool: function(e) {
            return e instanceof C && (e = this.getRefData(e)), "string" == typeof e ? "true" == e.toLowerCase() : "number" == typeof e ? 0 !== e : "boolean" == typeof e ? e : null != e
        },
        asMatrix: function(e) {
            var t, n, i, r, o, a, s;
            return e instanceof F ? e : (t = this, e instanceof T ? (n = e.topLeft, i = n.row, r = n.col, o = t.getRefCells(e), a = new F(t), isFinite(e.width()) && (a.width = e.width()), isFinite(e.height()) && (a.height = e.height()), isFinite(i) || (i = 0), isFinite(r) || (r = 0), o.forEach(function(e) {
                a.set(e.row - i, e.col - r, e.value)
            }), a) : Array.isArray(e) && e.length > 0 ? (a = new F(t), s = 0, e.forEach(function(e) {
                var n = 0,
                    i = 1;
                e.forEach(function(e) {
                    var r = e instanceof T;
                    e instanceof C && !r && (e = t.getRefData(e)), (r || Array.isArray(e)) && (e = t.asMatrix(e)), e instanceof F ? (e.each(function(e, t, i) {
                        a.set(s + t, n + i, e)
                    }), i = Math.max(i, e.height), n += e.width) : a.set(s, n++, e)
                }), s += i
            }), a) : void 0)
        },
        getRefCells: function(e, t) {
            return this.ss.getRefCells(e, t)
        },
        getRefData: function(e) {
            return this.ss.getData(e)
        },
        workbook: function() {
            return this.ss.workbook
        }
    }), F = x.extend({
        init: function(e) {
            this.context = e, this.height = 0, this.width = 0, this.data = []
        },
        clone: function() {
            var e = new F(this.context);
            return e.height = this.height, e.width = this.width, e.data = this.data.map(function(e) {
                return e.slice()
            }), e
        },
        get: function(e, t) {
            var n = this.data[e],
                i = n ? n[t] : null;
            return i instanceof C ? this.context.getRefData(i) : i
        },
        set: function(e, t, n) {
            var i = this.data[e];
            null == i && (i = this.data[e] = []), i[t] = n, e >= this.height && (this.height = e + 1), t >= this.width && (this.width = t + 1)
        },
        each: function(e, t) {
            var n, i, r;
            for (n = 0; this.height > n; ++n)
                for (i = 0; this.width > i; ++i)
                    if (r = this.get(n, i), (t || null != r) && (r = e.call(this.context, r, n, i), void 0 !== r)) return r
        },
        map: function(e, t) {
            var n = new F(this.context);
            return this.each(function(t, i, r) {
                n.set(i, r, e.call(this, t, i, r))
            }, t), n
        },
        eachRow: function(e) {
            var t, n;
            for (t = 0; this.height > t; ++t)
                if (n = e.call(this.context, t), void 0 !== n) return n
        },
        eachCol: function(e) {
            var t, n;
            for (t = 0; this.width > t; ++t)
                if (n = e.call(this.context, t), void 0 !== n) return n
        },
        mapRow: function(e) {
            var t = new F(this.context);
            return this.eachRow(function(n) {
                t.set(n, 0, e.call(this.context, n))
            }), t
        },
        mapCol: function(e) {
            var t = new F(this.context);
            return this.eachCol(function(n) {
                t.set(0, n, e.call(this.context, n))
            }), t
        },
        toString: function() {
            return JSON.stringify(this.data)
        },
        transpose: function() {
            var e = new F(this.context);
            return this.each(function(t, n, i) {
                e.set(i, n, t)
            }), e
        },
        unit: function(e) {
            var t, n, i, r;
            for (this.width = this.height = e, t = this.data = Array(e), n = e; --n >= 0;)
                for (i = t[n] = Array(e), r = e; --r >= 0;) i[r] = n == r ? 1 : 0;
            return this
        },
        multiply: function(t) {
            var n, i, r, o, a, s, l = this,
                c = new F(l.context);
            for (n = 0; l.height > n; ++n)
                for (i = 0; t.width > i; ++i) {
                    for (r = 0, o = 0; l.width > o; ++o) {
                        if (a = l.get(n, o), s = t.get(o, i), "number" != typeof a || "number" != typeof s) throw new e("VALUE");
                        r += a * s
                    }
                    c.set(n, i, r)
                }
            return c
        },
        adds: function(e, t) {
            var n, i, r, o, a = this,
                s = new F(a.context),
                l = t ? -1 : 1;
            for (n = 0; a.height > n; ++n)
                for (i = 0; a.width > i; ++i) r = a.get(n, i), o = e.get(n, i), s.set(n, i, r + l * o);
            return s
        },
        determinant: function() {
            var e, t, n, i, r, o = this.clone().data,
                a = o.length,
                s = 1;
            for (e = 0; a > e; e++) {
                for (t = e; a > t && !o[t][e]; t++);
                if (t == a) return 0;
                if (t != e)
                    for (s = -s, i = e; a > i; i++) r = o[e][i], o[e][i] = o[t][i], o[t][i] = r;
                for (n = e + 1; a > n; n++)
                    for (i = e + 1; a > i; i++) o[n][i] -= o[e][i] * o[n][e] / o[e][e];
                s *= o[e][e]
            }
            return s
        },
        inverse: function() {
            var e, n, i, r, o, a, s = this.width,
                l = this.augment(new F(this.context).unit(s)),
                c = l.data;
            for (n = 0; s > n; ++n) {
                if (i = t(n, s, function(e) {
                    return c[e][n]
                }), !c[i][n]) return null;
                for (n != i && (e = c[n], c[n] = c[i], c[i] = e), r = n + 1; s > r; ++r) {
                    for (o = n + 1; 2 * s > o; ++o) c[r][o] -= c[n][o] * c[r][n] / c[n][n];
                    c[r][n] = 0
                }
            }
            for (r = 0; s > r; ++r)
                for (a = c[r][r], o = 0; 2 * s > o; ++o) c[r][o] /= a;
            for (n = s; --n >= 0;)
                for (r = n; --r >= 0;)
                    if (c[r][n])
                        for (o = 2 * s; --o >= s;) c[r][o] -= c[n][o] * c[r][n];
            return l.slice(0, s, s, s)
        },
        augment: function(e) {
            var t = this.clone(),
                n = t.width;
            return e.each(function(e, i, r) {
                t.set(i, r + n, e)
            }), t
        },
        slice: function(e, t, n, i) {
            var r, o, a = new F(this.context);
            for (r = 0; n > r; ++r)
                for (o = 0; i > o; ++o) a.set(r, o, this.get(e + r, t + o));
            return a
        }
    }), I = x.extend({
        init: function(e, t, n, i, r, o) {
            this.refs = e, this.handler = t, this.print = n, this.absrefs = null, this.sheet = i, this.row = r, this.col = o, this.onReady = [], this.pending = !1
        },
        clone: function(e, t, n) {
            var i = e.toLowerCase(),
                r = this.refs;
            return i != this.sheet.toLowerCase() && (r = r.map(function(t) {
                return t.hasSheet() || t.sheet.toLowerCase() == i || (t = t.clone().setSheet(e)), t
            })), new I(r, this.handler, this.print, e, t, n)
        },
        resolve: function(e) {
            this.pending = !1, this.onReady.forEach(function(t) {
                t(e)
            })
        },
        exec: function(t, n, i) {
            if ("value" in this) n && n(this.value);
            else {
                n && this.onReady.push(n);
                for (var r = new E(this.resolve, this, t, i); i;) {
                    if (i.formula === this) return this.pending = !1, void r.resolve(new e("CIRCULAR"));
                    i = i.parent
                }
                if (this.pending) return;
                this.pending = !0, this.absrefs || (this.absrefs = this.refs.map(function(e) {
                    return e.absolute(this.row, this.col)
                }, this)), this.handler.call(r)
            }
        },
        reset: function() {
            this.onReady = [], this.pending = !1, delete this.value
        },
        renameSheet: function(e, t) {
            e = e.toLowerCase(), this.absrefs = null, this.sheet.toLowerCase() == e && (this.sheet = t), this.refs.forEach(function(n) {
                n.sheet.toLowerCase() == e && (n.sheet = t)
            })
        },
        adjust: function(e, t, n, i) {
            var r, o, a, s, l, c;
            e = e.toLowerCase(), r = this.row, o = this.col, a = this.sheet.toLowerCase(), s = !1, a == e && ("row" == t && r >= n && (this.row += i, s = !0), "col" == t && o >= n && (this.col += i, s = !0)), l = this.row, c = this.col, this.absrefs = null, this.refs = this.refs.map(function(a) {
                return a === A ? a : a.sheet.toLowerCase() != e ? (s && ("row" == t && r >= n && (a = a.relative(i, 0)), "col" == t && o >= n && (a = a.relative(0, i))), a) : a.adjust(r, o, l, c, "row" == t, n, i)
            }, this)
        },
        toString: function() {
            return this.print(this.row, this.col)
        }
    }), M = Object.create(null), M["if"] = function(t, n) {
        var i = this,
            r = n[0],
            o = n[1],
            a = n[2];
        this.resolveCells([r], function() {
            var n = i.asMatrix(r);
            n ? o(function(r) {
                a(function(o) {
                    var a = i.asMatrix(r),
                        s = i.asMatrix(o);
                    t(n.map(function(t, n, l) {
                        return t instanceof e ? t : i.bool(t) ? a ? a.get(n, l) : r : s ? s.get(n, l) : o
                    }))
                })
            }) : (r = this.force(r), r instanceof e ? t(r) : i.bool(r) ? o(t) : a(t))
        })
    }, M["φ"] = function(e) {
        e((1 + Math.sqrt(5)) / 2)
    }, R = s(1900, 0, -1), P = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], z = [
        [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
        [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]
    ], B = 6e4, L = 60 * B, H = 24 * L, k.CalcError = e, k.Formula = I, k.Matrix = F, k.packDate = f, k.unpackDate = h, k.packTime = g, k.unpackTime = p, k.serialToDate = m, k.dateToSerial = v, k.daysInMonth = u, k.isLeapYear = c, k.daysInYear = d, k.parseDate = _, y.dateToNumber = v, y.numberToDate = m, y.defineFunction = a, y.CalcError = e, k.defineFunction = a, k.defineAlias = function(e, t) {
        var n = M[t];
        if (!n) throw Error("Function " + t + " is not yet defined");
        n.kendoSpreadsheetAliases || (n.kendoSpreadsheetAliases = [t]), n.kendoSpreadsheetAliases.push(e), M[e] = n
    }, k.FUNCS = M, N = ["or", "number", ["null", 0]], O = [
        ["*a", N],
        ["*b", N]
    ], V = [
        ["*a", ["or", "anyvalue", ["null", 0]]],
        ["*b", ["or", "anyvalue", ["null", 0]]]
    ], a("binary+", function(e, t) {
        return e + t
    }).args(O), a("binary-", function(e, t) {
        return e - t
    }).args(O), a("binary*", function(e, t) {
        return e * t
    }).args(O), a("binary/", function(e, t) {
        return e / t
    }).args([
        ["*a", N],
        ["*b", "divisor"]
    ]), a("binary^", function(e, t) {
        return Math.pow(e, t)
    }).args(O), a("binary&", function(e, t) {
        return null == e && (e = ""), null == t && (t = ""), "" + e + t
    }).args([
        ["*a", ["or", "number", "string", "boolean", "null"]],
        ["*b", ["or", "number", "string", "boolean", "null"]]
    ]), a("binary=", function(e, t) {
        return e === t
    }).args(V), a("binary<>", function(e, t) {
        return e !== t
    }).args(V), a("binary<", b(function(e, t) {
        return t > e
    })).args(V), a("binary<=", b(function(e, t) {
        return t >= e
    })).args(V), a("binary>", b(function(e, t) {
        return e > t
    })).args(V), a("binary>=", b(function(e, t) {
        return e >= t
    })).args(V), a("unary+", function(e) {
        return e
    }).args([
        ["*a", N]
    ]), a("unary-", function(e) {
        return -e
    }).args([
        ["*a", N]
    ]), a("unary%", function(e) {
        return e / 100
    }).args([
        ["*a", N]
    ]), a("binary:", function(e, t) {
        return new T(e, t).setSheet(e.sheet || this.formula.sheet, e.hasSheet())
    }).args([
        ["a", "cell"],
        ["b", "cell"]
    ]), a("binary,", function(e, t) {
        return new D([e, t])
    }).args([
        ["a", "ref"],
        ["b", "ref"]
    ]), a("binary ", function(e, t) {
        return e.intersect(t)
    }).args([
        ["a", "ref"],
        ["b", "ref"]
    ]), a("not", function(e) {
        return !this.bool(e)
    }).args([
        ["*a", ["or", "anyvalue", ["null", 0]]]
    ]), a("isblank", function(e) {
        return e instanceof S ? (e = this.getRefData(e), null == e) : !1
    }).args([
        ["*value", "anything!"]
    ]), a("iserror", function(t) {
        return t instanceof e
    }).args([
        ["*value", "forced!"]
    ]), a("iserr", function(t) {
        return t instanceof e && "N/A" != t.code
    }).args([
        ["*value", "forced!"]
    ]), a("isna", function(t) {
        return t instanceof e && "N/A" == t.code
    }).args([
        ["*value", "forced!"]
    ]), a("islogical", function(e) {
        return "boolean" == typeof e
    }).args([
        ["*value", "forced!"]
    ]), a("isnontext", function(e) {
        return "string" != typeof e
    }).args([
        ["*value", "forced!"]
    ]), a("istext", function(e) {
        return "string" == typeof e
    }).args([
        ["*value", "forced!"]
    ]), a("isnumber", function(e) {
        return "number" == typeof e
    }).args([
        ["*value", "forced!"]
    ]), a("isref", function(e) {
        return e instanceof S || e instanceof T
    }).args([
        ["*value", "anything!"]
    ]))
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/validation.min", ["spreadsheet/runtime.min"], e)
}(function() {
    "use strict";

    function e(e, t, r, s) {
        var c, d, u, h;
        if ("string" == typeof s && (s = JSON.parse(s)), s.from && ("list" === s.dataType && (s.from = kendo.format(o, s.from)), "date" === s.dataType && (u = i.runtime.parseDate(s.from), u && (s.from = kendo.format(a, s.from), s.fromIsDateValue = !0)), s.from = i.compile(i.parseFormula(e, t, r, s.from))), s.to && ("date" === s.dataType && (h = i.runtime.parseDate(s.to), h && (s.to = kendo.format(a, s.to), s.toIsDateValue = !0)), s.to = i.compile(i.parseFormula(e, t, r, s.to))), d = "custom" == s.dataType ? n.validationComparers.custom : "list" == s.dataType ? n.validationComparers.list : n.validationComparers[s.comparerType], !d) throw kendo.format("'{0}' comparer is not implemented.", s.comparerType);
        return c = function(e) {
            var t, n = this.to && this.to.value ? this.to.value : void 0;
            return null === e || "" === e ? this.value = this.allowNulls ? !0 : !1 : "custom" == this.dataType ? this.value = d(e, this.from.value, n) : "list" == this.dataType ? (t = this._getListData(), this.value = d(e, t, n)) : this.value = d(e, this.from.value, n), this.value
        }, new kendo.spreadsheet.validation.Validation(l.extend(s, {
            handler: c,
            sheet: e,
            row: t,
            col: r
        }))
    }
    var t, n, i, r, o, a, s, l = kendo.jQuery;
    kendo.support.browser.msie && kendo.support.browser.version < 9 || (t = kendo.spreadsheet, n = {}, t.validation = n, i = t.calc, r = kendo.Class, o = "_matrix({0})", a = 'DATEVALUE("{0}")', i.runtime.defineFunction("_matrix", function(e) {
        return e
    }).args([
        ["m", "matrix"]
    ]), s = r.extend({
        init: function(e) {
            this.handler = e.handler, this.from = e.from, this.to = e.to, this.dataType = e.dataType, this.comparerType = e.comparerType, this.type = e.type ? e.type : "warning", this.allowNulls = e.allowNulls ? !0 : !1, this.fromIsDateValue = e.fromIsDateValue ? !0 : !1, this.toIsDateValue = e.toIsDateValue ? !0 : !1, this.sheet = e.sheet, this.row = e.row, this.col = e.col, e.tooltipMessageTemplate && (this.tooltipMessageTemplate = e.tooltipMessageTemplate), e.tooltipTitleTemplate && (this.tooltipTitleTemplate = e.tooltipTitleTemplate), e.messageTemplate && (this.messageTemplate = e.messageTemplate), e.titleTemplate && (this.titleTemplate = e.titleTemplate)
        },
        _formatMessages: function(e) {
            var t = this.from ? this.from.value : "",
                n = this.to ? this.to.value : "",
                i = this.from ? "" + this.from : "",
                r = this.to ? "" + this.to : "",
                o = this.dataType,
                a = this.type,
                s = this.comparerType;
            return kendo.format(e, t, n, i, r, o, a, s)
        },
        _setMessages: function() {
            this.title = "", this.message = "", this.tooltipTitleTemplate && (this.tooltipTitle = this._formatMessages(this.tooltipTitleTemplate)), this.tooltipMessageTemplate && (this.tooltipMessage = this._formatMessages(this.tooltipMessageTemplate)), this.titleTemplate && (this.title = this._formatMessages(this.titleTemplate)), this.messageTemplate && (this.message = this._formatMessages(this.messageTemplate))
        },
        _getListData: function() {
            var e, t, n, i, r;
            if (!this.from.value || !this.from.value.data) return [];
            for (e = this.from.value.data, i = [], t = 0; e.length > t; t++)
                if (r = e[t])
                    for (n = 0; r.length > n; n++) i.push(r[n]);
            return i
        },
        clone: function(e, t, n) {
            var i = this._getOptions();
            return i.from && (i.from = i.from.clone(e, t, n)), i.to && (i.to = i.to.clone(e, t, n)), new s(l.extend(i, {
                handler: this.handler
            }, {
                sheet: e,
                row: t,
                col: n
            }))
        },
        exec: function(e, t, n, i) {
            var r = this,
                o = function() {
                    r.value = r.handler.call(r, t, n), r._setMessages(), i && i(r.value)
                };
            r.to ? r.to.exec(e, function() {
                r.from.exec(e, o)
            }) : r.from.exec(e, o)
        },
        reset: function() {
            this.from && this.from.reset(), this.to && this.to.reset(), delete this.value
        },
        adjust: function(e, t, n, i) {
            var r, o;
            if (this.from && this.from.adjust(e, t, n, i), this.to && this.to.adjust(e, t, n, i), this.sheet.toLowerCase() == e.toLowerCase()) switch (r = this.row, o = this.col, t) {
                case "row":
                    r >= n && (this.row += i);
                    break;
                case "col":
                    o >= n && (this.col += i)
            }
        },
        toJSON: function() {
            var e = this._getOptions();
            return e.from && (e.from = "" + e.from, "list" === e.dataType && (e.from = e.from.replace(/^_matrix\((.*)\)$/i, "$1")), "date" === e.dataType && this.fromIsDateValue && (e.from = e.from.replace(/^DATEVALUE\("(.*)"\)$/i, "$1"))), e.to && (e.to = "" + e.to, "date" === e.dataType && this.toIsDateValue && (e.to = e.to.replace(/^DATEVALUE\("(.*)"\)$/i, "$1"))), e
        },
        _getOptions: function() {
            return {
                from: this.from,
                to: this.to,
                dataType: this.dataType,
                type: this.type,
                comparerType: this.comparerType,
                row: this.row,
                col: this.col,
                sheet: this.sheet,
                allowNulls: this.allowNulls,
                tooltipMessageTemplate: this.tooltipMessageTemplate,
                tooltipTitleTemplate: this.tooltipTitleTemplate,
                messageTemplate: this.messageTemplate,
                titleTemplate: this.titleTemplate
            }
        }
    }), n.compile = e, n.validationComparers = {
        greaterThan: function(e, t) {
            return e > t
        },
        lessThan: function(e, t) {
            return t > e
        },
        between: function(e, t, n) {
            return e > t && n > e
        },
        equalTo: function(e, t) {
            return e == t
        },
        notEqualTo: function(e, t) {
            return e != t
        },
        greaterThanOrEqualTo: function(e, t) {
            return e >= t
        },
        lessThanOrEqualTo: function(e, t) {
            return t >= e
        },
        notBetween: function(e, t, n) {
            return t > e || e > n
        },
        custom: function(e, t) {
            return t
        },
        list: function(e, t) {
            return t.indexOf(e) > -1
        }
    }, n.Validation = s)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/sheet.min", ["kendo.core.min", "kendo.color.min", "spreadsheet/runtime.min", "spreadsheet/validation.min", "spreadsheet/references.min"], e)
}(function() {
    ! function(e) {
        var t, n, i, r, o;
        e.support.browser.msie && 9 > e.support.browser.version || (t = e.spreadsheet.RangeRef, n = e.spreadsheet.CellRef, i = e.spreadsheet.Range, r = e.Class.extend({
            init: function(t) {
                this._sheet = t, this.selection = e.spreadsheet.FIRSTREF.toRangeRef(), this.originalSelection = e.spreadsheet.FIRSTREF.toRangeRef(), this._activeCell = e.spreadsheet.FIRSTREF.toRangeRef(), this.originalActiveCell = e.spreadsheet.FIRSTREF
            },
            currentSelectionRange: function() {
                return this.selection.rangeAt(this.selectionRangeIndex).toRangeRef()
            },
            currentOriginalNavigationRange: function() {
                return this.originalSelection.rangeAt(this.selectionRangeIndex).toRangeRef()
            },
            currentNavigationRange: function() {
                return this.singleCellSelection() ? this._sheet._sheetRef : this.selection.rangeAt(this.selectionRangeIndex).toRangeRef()
            },
            nextNavigationRange: function() {
                return this.singleCellSelection() || (this.selectionRangeIndex = this.selection.nextRangeIndex(this.selectionRangeIndex)), this.currentNavigationRange()
            },
            previousNavigationRange: function() {
                return this.singleCellSelection() || (this.selectionRangeIndex = this.selection.previousRangeIndex(this.selectionRangeIndex)), this.currentNavigationRange()
            },
            activeCell: function(e) {
                return e && (this.originalActiveCell = e.first(), this._activeCell = this._sheet.unionWithMerged(e.toRangeRef()), this._sheet.focus(e), this._sheet.triggerChange({
                    activeCell: !0,
                    selection: !0
                })), this._activeCell
            },
            select: function(e, t, n) {
                if (e) {
                    if (e.eq(this.originalSelection)) return;
                    this.originalSelection = e, this.selection = t, n !== !1 ? (this.activeCell(e.isCell() ? e : this.selection.lastRange().first()), this.selectionRangeIndex = this.selection.size() - 1) : this._sheet.triggerChange({
                        selection: !0
                    })
                }
                return this.selection
            },
            singleCellSelection: function() {
                return this._activeCell.eq(this.selection)
            }
        }), o = e.Observable.extend({
            init: function(t, n, i, o, a, s) {
                e.Observable.prototype.init.call(this);
                var l = t * n - 1;
                this._rows = new e.spreadsheet.Axis(t, i), this._columns = new e.spreadsheet.Axis(n, o), this._mergedCells = [], this._frozenRows = 0, this._frozenColumns = 0, this._suspendChanges = !1, this._filter = null, this._grid = new e.spreadsheet.Grid(this._rows, this._columns, t, n, a, s), this._sheetRef = this._grid.normalize(e.spreadsheet.SHEETREF), this._properties = new e.spreadsheet.PropertyBag(l), this._sorter = new e.spreadsheet.Sorter(this._grid, this._properties.sortable()), this._viewSelection = new r(this), this._editSelection = new r(this), this._formulaSelections = [], this.options = {
                    showGridLines: !0
                }
            },
            _selectionState: function() {
                return this._inEdit ? this._editSelection : this._viewSelection
            },
            navigator: function() {
                return this._navigator || (this._navigator = new e.spreadsheet.SheetNavigator(this)), this._navigator
            },
            axisManager: function() {
                return this._axisManager || (this._axisManager = new e.spreadsheet.AxisManager(this)), this._axisManager
            },
            _name: function(e) {
                return e ? (this._sheetName = e, this) : this._sheetName
            },
            name: function() {
                return this._name()
            },
            _property: function(e, t, n) {
                return void 0 === t ? e() : (e(t), this.triggerChange(n))
            },
            _field: function(e, t, n) {
                return void 0 === t ? this[e] : (this[e] = t, this.triggerChange(n))
            },
            suspendChanges: function(e) {
                return void 0 === e ? this._suspendChanges : (this._suspendChanges = e, this)
            },
            triggerChange: function(e) {
                return this._suspendChanges || this.trigger("change", e), this
            },
            setDataSource: function(t, n) {
                this.dataSourceBinder && this.dataSourceBinder.destroy(), this.dataSourceBinder = new e.spreadsheet.SheetDataSourceBinder({
                    dataSource: t,
                    sheet: this,
                    columns: n
                })
            },
            hideColumn: function(e) {
                return this._property(this._columns.hide.bind(this._columns), e, {
                    layout: !0
                })
            },
            unhideColumn: function(e) {
                return this._property(this._columns.unhide.bind(this._columns), e, {
                    layout: !0
                })
            },
            isHiddenColumn: function(e) {
                return this._grid._columns.hidden(e)
            },
            _copyRange: function(e, t) {
                var n = this._grid,
                    i = n.rowCount,
                    r = n.normalize(e.topLeft),
                    o = n.normalize(e.bottomRight),
                    a = r.col * i + r.row,
                    s = o.col * i + o.row,
                    l = t.col * i + t.row;
                this._properties.copy(a, s, l)
            },
            _adjustReferences: function(t, n, i, r) {
                var o, a;
                this._mergedCells = r.reduce(function(r, o) {
                    return o = o.adjust(null, null, null, null, "row" == t, n, i), o !== e.spreadsheet.NULLREF && r.push(o), r
                }, []), this._workbook && (o = this._name(), this._workbook._sheets.forEach(function(e) {
                    e._forFormulas(function(e) {
                        e.adjust(o, t, n, i)
                    }), e._forValidations(function(e) {
                        e.adjust(o, t, n, i)
                    })
                }), this._workbook.adjustNames(o, "row" == t, n, i)), a = this.select(), a = a.adjust(null, null, null, null, "row" == t, n, i), a !== e.spreadsheet.NULLREF && this.select(a)
            },
            _forFormulas: function(e) {
                var t = this._properties,
                    n = t.get("formula").values(),
                    i = n.length;
                n.forEach(function(t, n) {
                    e.call(this, t.value, n, i)
                }, this)
            },
            _forValidations: function(e) {
                var t = this._properties;
                t.get("validation").values().forEach(function(t) {
                    e.call(this, t.value)
                }, this)
            },
            canInsertRow: function(e, t) {
                var n, i;
                return t = t || 1, n = this._grid, i = this.range(n.rowCount - t, 0, t, n.columnCount), !i.hasValue()
            },
            insertRow: function(e) {
                if (!this.canInsertRow(e)) throw Error("Shifting nonblank cells off the worksheet is not supported!");
                return this.batch(function() {
                    var r, o, a, s, l, c, d = this._grid,
                        u = d.columnCount,
                        h = d.rowCount,
                        f = this.frozenRows();
                    for (f > e && this.frozenRows(f + 1), r = this._mergedCells.slice(), o = 0; u > o; o++) a = new t(new n(e, o), new n(e, o)), s = d.normalize(a.topLeft), l = d.normalize(a.bottomRight), c = new t(new n(s.row, s.col), new n(h - 2, l.col)), this._copyRange(c, new n(s.row + 1, s.col)), new i(a, this).clear();
                    this._adjustReferences("row", e, 1, r)
                }, {
                    recalc: !0,
                    layout: !0
                }), this.trigger("insertRow", {
                    index: e
                }), this
            },
            isEnabledRow: function(e) {
                var r = new t(new n(e, 0), new n(e, this._grid.columnCount));
                return new i(r, this).enable()
            },
            deleteRow: function(e) {
                return this.isEnabledRow(e) ? (this.batch(function() {
                    var r, o, a, s, l, c, d, u = this._grid,
                        h = u.columnCount,
                        f = this.frozenRows();
                    for (f > e && this.frozenRows(f - 1), r = this._mergedCells.slice(), o = 0; h > o; o++) a = new t(new n(e, o), new n(e, o)), new i(a, this).clear(), s = u.normalize(a.topLeft), l = u.normalize(a.bottomRight), c = new t(new n(s.row + 1, s.col), new n(1 / 0, l.col)), this._copyRange(c, s), d = u.normalize(c.bottomRight), new i(new t(d, d), this).clear();
                    this._adjustReferences("row", e, -1, r)
                }, {
                    recalc: !0,
                    layout: !0
                }), this.trigger("deleteRow", {
                    index: e
                }), this) : this
            },
            insertColumn: function(e) {
                return this.batch(function() {
                    var r, o, a, s, l, c, d = this._grid,
                        u = d.columnCount,
                        h = this.frozenColumns();
                    for (h > e && this.frozenColumns(h + 1), r = this._mergedCells.slice(), o = u; o >= e && (a = new t(new n(0, o), new n(1 / 0, o)), new i(a, this).clear(), o != e); o--) s = d.normalize(a.topLeft), l = d.normalize(a.bottomRight), c = new t(new n(s.row, s.col - 1), new n(l.row, l.col - 1)), this._copyRange(c, s);
                    this._adjustReferences("col", e, 1, r)
                }, {
                    recalc: !0,
                    layout: !0
                }), this
            },
            isEnabledColumn: function(e) {
                var r = new t(new n(0, e), new n(1 / 0, e));
                return new i(r, this).enable()
            },
            deleteColumn: function(e) {
                return this.isEnabledColumn(e) ? (this.batch(function() {
                    var r, o, a, s, l, c, d = this._grid,
                        u = d.columnCount,
                        h = this.frozenColumns();
                    for (h > e && this.frozenColumns(h - 1), r = this._mergedCells.slice(), o = e; u > o && (a = new t(new n(0, o), new n(1 / 0, o)), new i(a, this).clear(), o != u - 1); o++) s = d.normalize(a.topLeft), l = d.normalize(a.bottomRight), c = new t(new n(s.row, s.col + 1), new n(l.row, l.col + 1)), this._copyRange(c, s);
                    this._adjustReferences("col", e, -1, r)
                }, {
                    recalc: !0,
                    layout: !0
                }), this) : this
            },
            hideRow: function(e) {
                return this._property(this._rows.hide.bind(this._rows), e, {
                    layout: !0
                })
            },
            unhideRow: function(e) {
                return this._property(this._rows.unhide.bind(this._rows), e, {
                    layout: !0
                })
            },
            isHiddenRow: function(e) {
                return this._grid._rows.hidden(e)
            },
            columnWidth: function(e, t) {
                return this._property(this._columns.value.bind(this._columns, e, e), t, {
                    layout: !0
                })
            },
            rowHeight: function(e, t) {
                return this._property(this._rows.value.bind(this._rows, e, e), t, {
                    layout: !0
                })
            },
            frozenRows: function(e) {
                return this._field("_frozenRows", e, {
                    layout: !0
                })
            },
            frozenColumns: function(e) {
                return this._field("_frozenColumns", e, {
                    layout: !0
                })
            },
            _ref: function(i, r, o, a) {
                var s = null;
                return i instanceof e.spreadsheet.Ref ? i : i instanceof e.spreadsheet.Range ? i._ref.toRangeRef() : ("string" == typeof i ? s = e.spreadsheet.calc.parseReference(i) : (o || (o = 1), a || (a = 1), s = new t(new n(i, r), new n(i + o - 1, r + a - 1))), s)
            },
            range: function(e, t, n, r) {
                return new i(this._ref(e, t, n, r), this)
            },
            forEachMergedCell: function(e, t) {
                var n = !1;
                void 0 === t && (t = e, n = !0), this._mergedCells.forEach(function(i) {
                    (n || i.intersects(e)) && t(i)
                })
            },
            forEachFilterHeader: function(e, t) {
                var n, i = !1;
                void 0 === t && (t = e, i = !0), this._filter && (n = [], this._filter.ref.forEachColumn(function(t) {
                    (i || t.intersects(e)) && n.push(t.topLeft)
                }), this._mergedCells.forEach(function(e) {
                    n = n.map(function(t) {
                        return e.intersects(t) ? e : t
                    })
                }), n.reduce(function(e, t) {
                    return e.indexOf(t) < 0 && e.push(t), e
                }, []).forEach(t))
            },
            forEach: function(e, n) {
                var i, r, o, a, s, l;
                for (e instanceof t || (e = this._ref(e)), i = this._grid.normalize(e.topLeft), r = this._grid.normalize(e.bottomRight), o = i.col; r.col >= o; o++) a = i.row, s = this._grid.index(a, o), l = this._grid.index(r.row, o), this._properties.forEach(s, l, function(e) {
                    n(a++, o, e)
                })
            },
            startResizing: function(e) {
                this._initialPosition = e, this._resizeInProgress = !0
            },
            startAutoFill: function() {
                this._autoFillInProgress = !0;
                var e = this.select();
                this._autoFillOrigin = e, this._autoFillDest = e, this.triggerChange({
                    selection: !0
                })
            },
            updateAutoFill: function(e, t, n, i) {
                this._autoFillDest = e, this._autoFillPunch = t, this._autoFillHint = n, this._autoFillDirection = i, this.triggerChange({
                    selection: !0
                })
            },
            autoFillRef: function() {
                return this._autoFillDest
            },
            autoFillPunch: function() {
                return this._autoFillPunch
            },
            autoFillInProgress: function() {
                return this._autoFillInProgress
            },
            resizingInProgress: function() {
                return this._resizeInProgress
            },
            completeResizing: function() {
                var e, t;
                this._resizeInProgress && (this._resizeInProgress = !1, e = this.resizeHintPosition(), this._initialPosition && e ? (t = this.resizeHandlePosition(), t.col !== -(1 / 0) ? this.columnWidth(t.col, this.columnWidth(t.col) - (this._initialPosition.x - e.x)) : this.rowHeight(t.row, this.rowHeight(t.row) - (this._initialPosition.y - e.y))) : this.trigger("change", {
                    resize: !0
                }))
            },
            resizeHandlePosition: function() {
                return this._resizeHandlePosition
            },
            resizeHintPosition: function(e) {
                return void 0 !== e && (this._resizeHintPosition = e, this.trigger("change", {
                    resize: !0
                })), this._resizeHintPosition
            },
            removeResizeHandle: function() {
                this._resizeHandlePosition && (this._resizeHintPosition = void 0, this._resizeHandlePosition = void 0, this._initialPosition = void 0, this.trigger("change", {
                    resize: !0
                }))
            },
            positionResizeHandle: function(e) {
                this._resizeHandlePosition = e, this.trigger("change", {
                    resize: !0
                })
            },
            startSelection: function() {
                this._selectionInProgress = !0
            },
            completeSelection: function() {
                var e, t;
                this._selectionInProgress && (this._selectionInProgress = !1, this._resizeHintPosition = void 0, this.trigger("change", {
                    selection: !0
                })), this._autoFillInProgress && (this._autoFillInProgress = !1, e = this._autoFillDest, t = this._autoFillOrigin, this._autoFillPunch ? this._workbook.execute({
                    command: "ClearContentCommand",
                    options: {
                        operatingRange: this.range(this._autoFillPunch)
                    }
                }) : e.eq(t) ? this.triggerChange({
                    selection: !0
                }) : this._workbook.execute({
                    command: "AutoFillCommand",
                    options: {
                        operatingRange: this.range(e),
                        origin: this.range(t)
                    }
                }), this._autoFillDest = null, this._autoFillPunch = null, this._autoFillOrigin = null, this.select(e))
            },
            selectionInProgress: function() {
                return this._selectionInProgress
            },
            select: function(e, t) {
                var n, i = this._selectionState();
                return e && (e = this._ref(e), n = this._grid.isAxis(e) ? e : this.unionWithMerged(e)), i.select(e, n, t)
            },
            originalSelect: function() {
                return this._selectionState().originalSelection
            },
            currentSelectionRange: function() {
                return this._selectionState().currentSelectionRange()
            },
            currentOriginalSelectionRange: function() {
                return this._selectionState().currentOriginalNavigationRange()
            },
            currentNavigationRange: function() {
                return this._selectionState().currentNavigationRange()
            },
            nextNavigationRange: function() {
                return this._selectionState().nextNavigationRange()
            },
            previousNavigationRange: function() {
                return this._selectionState().previousNavigationRange()
            },
            selectionRangeIndex: function() {
                return this._selectionState().selectionRangeIndex
            },
            activeCell: function(e) {
                return this._selectionState().activeCell(e)
            },
            originalActiveCell: function() {
                return this._selectionState().originalActiveCell
            },
            singleCellSelection: function() {
                return this._selectionState().singleCellSelection()
            },
            unionWithMerged: function(e) {
                var t = this._mergedCells;
                return e.map(function(e) {
                    return e.toRangeRef().union(t)
                })
            },
            trim: function(e) {
                var t = [],
                    n = this._grid;
                return this._properties.forEachProperty(function(i) {
                    t.push(n.trim(e, i.list))
                }), this.unionWithMerged(e.topLeft.toRangeRef().union(t))
            },
            focus: function(e) {
                if (!e) {
                    var t = this._focus;
                    return this._focus = null, t
                }
                this._focus = e.toRangeRef()
            },
            activeCellSelection: function() {
                return new i(this._grid.normalize(this.activeCell()), this)
            },
            selection: function() {
                return new i(this._grid.normalize(this._selectionState().selection), this)
            },
            selectedHeaders: function() {
                var e = this.select(),
                    t = {},
                    n = {},
                    i = !1,
                    r = !1;
                return e.forEach(function(e) {
                    var o, a, s, l, c = "partial",
                        d = "partial";
                    if (e = e.toRangeRef(), a = e.bottomRight, s = a.col === 1 / 0, l = a.row === 1 / 0, l && (r = !0, d = "full"), s && (i = !0, c = "full"), !l)
                        for (o = e.topLeft.row; a.row >= o; o++) "full" !== t[o] && (t[o] = c);
                    if (!s)
                        for (o = e.topLeft.col; a.col >= o; o++) "full" !== n[o] && (n[o] = d)
                }), {
                    rows: t,
                    cols: n,
                    allRows: r,
                    allCols: i,
                    all: r && i
                }
            },
            isInEditMode: function(e) {
                return void 0 === e ? this._inEdit : (this._inEdit = e, void(e && (this._editSelection.selection = this._viewSelection.selection.clone(), this._editSelection.originalSelection = this._viewSelection.originalSelection.clone(), this._editSelection._activeCell = this._viewSelection._activeCell.clone(), this._editSelection.originalActiveCell = this._viewSelection.originalActiveCell.clone())))
            },
            _setFormulaSelections: function(e) {
                this._formulaSelections = (e || []).slice(), this.triggerChange({
                    selection: !0
                })
            },
            _viewActiveCell: function() {
                return this._viewSelection._activeCell.toRangeRef()
            },
            toJSON: function() {
                var t, n = {},
                    i = this._rows.toJSON("height", n),
                    r = this._columns.toJSON("width", {}),
                    o = this._viewSelection;
                return this.forEach(e.spreadsheet.SHEETREF, function(t, r, o) {
                    if (0 !== Object.keys(o).length) {
                        var a = n[t];
                        void 0 === a && (a = i.length, i.push({
                            index: t
                        }), n[t] = a), t = i[a], o.index = r, void 0 === t.cells && (t.cells = []), o.formula && (o.formula = "" + o.formula), o.validation && (o.validation = o.validation.toJSON()), o.color && (o.color = e.parseColor(o.color).toCss()), o.background && (o.background = e.parseColor(o.background).toCss()), o.borderTop && o.borderTop.color && (o.borderTop.color = e.parseColor(o.borderTop.color).toCss()), o.borderBottom && o.borderBottom.color && (o.borderBottom.color = e.parseColor(o.borderBottom.color).toCss()), o.borderRight && o.borderRight.color && (o.borderRight.color = e.parseColor(o.borderRight.color).toCss()), o.borderLeft && o.borderLeft.color && (o.borderLeft.color = e.parseColor(o.borderLeft.color).toCss()), t.cells.push(o)
                    }
                }), t = {
                    name: this._name(),
                    rows: i,
                    columns: r,
                    selection: "" + o.selection,
                    activeCell: "" + o.activeCell(),
                    frozenRows: this.frozenRows(),
                    frozenColumns: this.frozenColumns(),
                    mergedCells: this._mergedCells.map(function(e) {
                        return "" + e
                    })
                }, this._sort && (t.sort = {
                    ref: "" + this._sort.ref,
                    columns: this._sort.columns.map(function(e) {
                        return {
                            index: e.index,
                            ascending: e.ascending
                        }
                    })
                }), this._filter && (t.filter = {
                    ref: "" + this._filter.ref,
                    columns: this._filter.columns.map(function(e) {
                        var t = e.filter.toJSON();
                        return t.index = e.index, t
                    })
                }), t
            },
            fromJSON: function(t) {
                this.batch(function() {
                    var n, i, r, o, a, s, l, c, d;
                    if (void 0 !== t.name && this._name(t.name), void 0 !== t.frozenColumns && this.frozenColumns(t.frozenColumns), void 0 !== t.frozenRows && this.frozenRows(t.frozenRows), void 0 !== t.columns && this._columns.fromJSON("width", t.columns), void 0 !== t.rows)
                        for (this._rows.fromJSON("height", t.rows), n = 0; t.rows.length > n; n++)
                            if (i = t.rows[n], r = i.index, void 0 === r && (r = n), i.cells)
                                for (o = 0; i.cells.length > o; o++) a = i.cells[o], s = a.index, void 0 === s && (s = o), a.formula && (a.formula = this._compileFormula(r, s, a.formula)), a.validation && (a.validation = this._compileValidation(r, s, a.validation)), this._properties.fromJSON(this._grid.index(r, s), a);
                    t.selection && (this._viewSelection.selection = this._viewSelection.originalSelection = this._ref(t.selection)), t.activeCell && (l = this._ref(t.activeCell), this._viewSelection._activeCell = l.toRangeRef(), this._viewSelection.originalActiveCell = l), t.mergedCells && t.mergedCells.forEach(function(e) {
                        this.range(e).merge()
                    }, this), t.sort && (this._sort = {
                        ref: this._ref(t.sort.ref),
                        columns: t.sort.columns.slice(0)
                    }), t.filter && (c = t.filter.ref, d = void 0 === t.filter.columns ? [] : t.filter.columns, c ? (this._filter = {
                        ref: this._ref(c),
                        columns: d.map(function(t) {
                            return {
                                index: t.index,
                                filter: e.spreadsheet.Filter.create(t)
                            }
                        })
                    }, this._refreshFilter()) : e.logToConsole("Dropping filter for sheet '" + t.name + "' due to missing ref"))
                })
            },
            formula: function(e) {
                return this._properties.get("formula", this._grid.cellRefIndex(e))
            },
            validation: function(e) {
                return this._properties.get("validation", this._grid.cellRefIndex(e))
            },
            resetFormulas: function() {
                this._forFormulas(function(e) {
                    e.reset()
                })
            },
            resetValidations: function() {
                this._forValidations(function(e) {
                    e.reset()
                })
            },
            recalc: function(e, t) {
                function n() {
                    o--, a != r || o || t()
                }
                var i = this._properties.get("formula").values(),
                    r = i.length,
                    o = 0,
                    a = 0;
                if (!r && t) return t();
                for (; r > a;) o++, i[a++].value.exec(e, t ? n : null)
            },
            revalidate: function(e) {
                var i = this;
                this._forValidations(function(r) {
                    var o = new n(r.row, r.col),
                        a = new t(o, o);
                    r.exec(e, i._get(a, "value"), i._get(a, "format"))
                })
            },
            _value: function(e, t, n) {
                var i = this._grid.index(e, t);
                return void 0 === n ? this._properties.get("value", i) : void this._properties.set("value", i, i, n)
            },
            _validation: function(e, t) {
                var n = this._grid.index(e, t);
                return this._properties.get("validation", n)
            },
            _compileValidation: function(t, n, i) {
                return (null !== i.from || void 0 !== i.from) && (i.from = (i.from + "").replace(/^=/, "")), (null !== i.to || void 0 !== i.to) && (i.to = (i.to + "").replace(/^=/, "")), e.spreadsheet.validation.compile(this._name(), t, n, i)
            },
            _compileFormula: function(t, n, i) {
                return i = i.replace(/^=/, ""), i = e.spreadsheet.calc.parseFormula(this._name(), t, n, i), e.spreadsheet.calc.compile(i)
            },
            _copyValuesInRange: function(e, t, n, i) {
                var r, o, a, s, l;
                for (r = e.col; t.col >= r; r++)
                    for (o = this._grid.index(e.row, r), a = this._grid.index(t.row, r), s = o, l = e.row; a >= s; ++s, ++l) n = n.clone(this._name(), l, r), this._properties.set(i, s, s, n);
                return n
            },
            _set: function(e, t, n) {
                var i, r, o, a = this._grid.normalize(e.topLeft),
                    s = this._grid.normalize(e.bottomRight);
                if (n && "formula" == t) "string" == typeof n && (n = this._compileFormula(a.row, a.col, n)), n = this._copyValuesInRange(a, s, n, "formula");
                else if (n && "validation" == t) n = this._compileValidation(a.row, a.col, n), n = this._copyValuesInRange(a, s, n, "validation");
                else
                    for (i = a.col; s.col >= i; i++) r = this._grid.index(a.row, i), o = this._grid.index(s.row, i), this._properties.set(t, r, o, n), "formula" == t && this._properties.set("value", r, o, null)
            },
            _get: function(e, t) {
                var n = this._grid.normalize(e.topLeft),
                    i = this._grid.index(n.row, n.col);
                return this._properties.get(t, i)
            },
            batch: function(e, t) {
                var n = this.suspendChanges();
                return this.suspendChanges(!0), e.call(this), this.suspendChanges(n).triggerChange(t)
            },
            _sortBy: function(e, t) {
                var n = null;
                t.forEach(function(t) {
                    n = this._sorter.sortBy(e, t.index, this._properties.get("value"), t.ascending, n)
                }, this), this._sort = {
                    ref: e,
                    columns: t
                }, this._refreshFilter(), this.triggerChange({
                    recalc: !0
                })
            },
            _refreshFilter: function() {
                this._filter && this._filterBy(this._filter.ref, this._filter.columns)
            },
            _filterBy: function(t, n) {
                this.batch(function() {
                    for (var i = t.topLeft.row; t.bottomRight.row >= i; i++) this._rows.hidden(i) && this._rows.unhide(i);
                    n.forEach(function(n) {
                        var i, r, o, a = t.resize({
                                top: 1
                            }).toColumn(n.index),
                            s = [];
                        if (a !== e.spreadsheet.NULLREF)
                            for (this.forEach(a, function(e, t, n) {
                                n.row = e, s.push(n)
                            }), n.filter.prepare(s), i = 0; s.length > i; i++) r = s[i], o = n.filter.value(r), n.filter.matches(o) === !1 && this.hideRow(r.row)
                    }, this), this._filter = {
                        ref: t,
                        columns: n
                    }
                }, {
                    layout: !0,
                    filter: !0
                })
            },
            filterColumn: function(e) {
                var t = this.filter().ref;
                return e.toRangeRef().topLeft.col - t.topLeft.col
            },
            filter: function() {
                return this._filter
            },
            clearFilter: function(e) {
                this._clearFilter(e instanceof Array ? e : [e])
            },
            _clearFilter: function(e) {
                this._filter && this.batch(function() {
                    this._filter.columns = this._filter.columns.filter(function(t) {
                        return e.indexOf(t.index) < 0
                    }), this._refreshFilter()
                }, {
                    layout: !0,
                    filter: !0
                })
            },
            getAxisState: function() {
                return {
                    rows: this._rows.getState(),
                    columns: this._columns.getState()
                }
            },
            setAxisState: function(e) {
                this._rows.setState(e.rows), this._columns.setState(e.columns), this.triggerChange({
                    layout: !0
                })
            },
            getState: function() {
                return {
                    rows: this._rows.getState(),
                    columns: this._columns.getState(),
                    mergedCells: this._mergedCells.map(function(e) {
                        return e.clone()
                    }),
                    properties: this._properties.getState()
                }
            },
            setState: function(t) {
                this._rows.setState(t.rows), this._columns.setState(t.columns), this._mergedCells = t.mergedCells, this._properties.setState(t.properties), this.triggerChange(e.spreadsheet.ALL_REASONS)
            },
            _merge: function(t) {
                var n, r = this._mergedCells,
                    o = this;
                return this.batch(function() {
                    n = t.map(function(t) {
                        var n, a, s, l, c, d, u;
                        return t instanceof e.spreadsheet.CellRef ? t : (n = t.toRangeRef().union(r, function(e) {
                            r.splice(r.indexOf(e), 1)
                        }), a = new i(n, o), s = a._get("formula"), l = a.value(), c = a.format(), d = a.background(), a.value(null), a.format(null), a.background(null), u = new i(n.collapse(), o), s ? u._set("formula", s) : u.value(l), u.format(c), u.background(d), r.push(n), n)
                    });
                    var a = o._viewSelection;
                    a.selection = o.unionWithMerged(a.originalSelection), a._activeCell = o.unionWithMerged(a.originalActiveCell)
                }, {
                    activeCell: !0,
                    selection: !0
                }), n
            }
        }), e.spreadsheet.Sheet = o)
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/sheetsbar.min", ["kendo.core.min", "kendo.sortable.min"], e)
}(function() {
    ! function(e) {
        var t, n, i, r, o;
        e.support.browser.msie && 9 > e.support.browser.version || (t = e.jQuery, n = ".", i = " ", r = {
            sheetsBarWrapper: "k-widget k-header",
            sheetsBarSheetsWrapper: "k-tabstrip k-floatwrap k-tabstrip-bottom",
            sheetsBarActive: "k-spreadsheet-sheets-bar-active",
            sheetsBarInactive: "k-spreadsheet-sheets-bar-inactive",
            sheetsBarAdd: "k-spreadsheet-sheets-bar-add",
            sheetsBarRemove: "k-spreadsheet-sheets-remove",
            sheetsBarItems: "k-spreadsheet-sheets-items",
            sheetsBarEditor: "k-spreadsheet-sheets-editor",
            sheetsBarScrollable: "k-tabstrip-scrollable",
            sheetsBarNext: "k-tabstrip-next",
            sheetsBarPrev: "k-tabstrip-prev",
            sheetsBarKItem: "k-item k-state-default",
            sheetsBarKActive: "k-state-active k-state-tab-on-top",
            sheetsBarKTextbox: "k-textbox",
            sheetsBarKLink: "k-link",
            sheetsBarKIcon: "k-icon",
            sheetsBarKFontIcon: "k-font-icon",
            sheetsBarKButton: "k-button k-button-icon",
            sheetsBarKButtonBare: "k-button-bare",
            sheetsBarKArrowW: "k-i-arrow-w",
            sheetsBarKArrowE: "k-i-arrow-e",
            sheetsBarKReset: "k-reset k-tabstrip-items",
            sheetsBarKIconX: "k-i-x",
            sheetsBarKSprite: "k-sprite",
            sheetsBarKIconPlus: "k-i-plus",
            sheetsBarHintWrapper: "k-widget k-tabstrip k-tabstrip-bottom k-spreadsheet-sheets-items-hint",
            sheetsBarKResetItems: "k-reset k-tabstrip-items"
        }, o = e.ui.Widget.extend({
            init: function(t, i) {
                var r = o.classNames;
                e.ui.Widget.call(this, t, i), t = this.element, t.addClass(r.sheetsBarWrapper), this._tree = new e.dom.Tree(t[0]), this._tree.render([this._addButton(), this._createSheetsWrapper([])]), this._toggleScrollEvents(!0), this._createSortable(), this._sortable.bind("start", this._onSheetReorderStart.bind(this)), this._sortable.bind("end", this._onSheetReorderEnd.bind(this)), t.on("click", n + r.sheetsBarRemove, this._onSheetRemove.bind(this)), t.on("click", "li", this._onSheetSelect.bind(this)), t.on("dblclick", "li" + n + r.sheetsBarActive, this._createEditor.bind(this)), t.on("click", n + r.sheetsBarAdd, this._onAddSelect.bind(this))
            },
            options: {
                name: "SheetsBar",
                scrollable: {
                    distance: 200
                }
            },
            events: ["select", "reorder", "rename"],
            _createEditor: function() {
                this._editor || (this._renderSheets(this._sheets, this._selectedIndex, !0), this._editor = this.element.find(e.format("input{0}{1}", n, o.classNames.sheetsBarEditor)).focus().on("keydown", this._onEditorKeydown.bind(this)).on("blur", this._onEditorBlur.bind(this)))
            },
            _destroyEditor: function() {
                this._editor.off(), this._editor = null, this._renderSheets(this._sheets, this._selectedIndex, !1)
            },
            renderSheets: function(e, t) {
                !e || 0 > t || this._renderSheets(e, t, !1)
            },
            _renderSheets: function(t, r, a) {
                var s, l, c, d, u, h, f, p, m, g, v, _ = this,
                    b = o.classNames;
                _._isRtl = e.support.isRtl(_.element), _._sheets = t, _._selectedIndex = r, _._renderHtml(a, !0), _._scrollableAllowed() && (c = _._sheetsWrapper(), d = c.children(n + b.sheetsBarPrev), u = c.children(n + b.sheetsBarNext), h = 2, f = _.element.find(n + b.sheetsBarAdd), p = f.outerWidth() + f.position().left + h, m = d.outerWidth() + h, g = _._sheetsGroup(), d.css({
                    left: p
                }), c.addClass(b.sheetsBarScrollable + i + b.sheetsBarSheetsWrapper), g.css({
                    marginLeft: p
                }), s = c[0].offsetWidth, l = g[0].scrollWidth, l + p > s ? (v = Math.ceil(e.parseFloat(u.css("right"))), _._scrollableModeActive || (_._nowScrollingSheets = !1, _._scrollableModeActive = !0), g.css({
                    marginLeft: m + p,
                    marginRight: u.outerWidth() + v + h
                })) : _._scrollableModeActive && s >= l ? (_._scrollableModeActive = !1, g.css({
                    marginLeft: p,
                    marginRight: ""
                })) : g.css({
                    marginLeft: p
                }), _._toggleScrollButtons())
            },
            _toggleScrollButtons: function(e) {
                var t = this,
                    i = t._sheetsGroup(),
                    r = t._sheetsWrapper(),
                    a = i.scrollLeft(),
                    s = r.find(n + o.classNames.sheetsBarPrev),
                    l = r.find(n + o.classNames.sheetsBarNext);
                e === !1 ? (s.toggle(!1), l.toggle(!1)) : (s.toggle(t._isRtl ? i[0].scrollWidth - i[0].offsetWidth - 1 > a : 0 !== a), l.toggle(t._isRtl ? 0 !== a : i[0].scrollWidth - i[0].offsetWidth - 1 > a))
            },
            _toggleScrollEvents: function(e) {
                var t = this,
                    i = o.classNames,
                    r = t.options,
                    a = t._sheetsWrapper(),
                    s = a.children(n + i.sheetsBarPrev),
                    l = a.children(n + i.sheetsBarNext);
                e ? (s.on("mousedown", function() {
                    t._nowScrollingSheets = !0, t._scrollSheetsByDelta(r.scrollable.distance * (t._isRtl ? 1 : -1))
                }), l.on("mousedown", function() {
                    t._nowScrollingSheets = !0, t._scrollSheetsByDelta(r.scrollable.distance * (t._isRtl ? -1 : 1))
                }), s.add(l).on("mouseup", function() {
                    t._nowScrollingSheets = !1
                })) : (s.off(), l.off())
            },
            _renderHtml: function(t, n) {
                var r, a, s, l, c, d, u = [],
                    h = e.dom,
                    f = h.element,
                    p = this._sheets,
                    m = this._selectedIndex,
                    g = o.classNames;
                for (r = 0; p.length > r; r++) a = p[r], s = r === m, l = {
                    className: g.sheetsBarKItem + i
                }, c = [], l.className += s ? g.sheetsBarKActive + i + g.sheetsBarActive : g.sheetsBarInactive, s && t ? c.push(f("input", {
                    type: "text",
                    value: a.name(),
                    className: g.sheetsBarKTextbox + i + g.sheetsBarEditor,
                    maxlength: 50
                }, [])) : (c.push(f("span", {
                    className: g.sheetsBarKLink,
                    title: a.name()
                }, [h.text(a.name())])), d = f("span", {
                    className: g.sheetsBarKIcon + i + g.sheetsBarKFontIcon + i + g.sheetsBarKIconX
                }, []), c.push(f("span", {
                    className: g.sheetsBarKLink + i + g.sheetsBarRemove
                }, [d]))), u.push(f("li", l, c));
                this._tree.render([this._addButton(), this._createSheetsWrapper(u, n)])
            },
            _createSheetsWrapper: function(t, n) {
                var r, a = e.dom.element,
                    s = o.classNames,
                    l = [a("ul", {
                        className: s.sheetsBarKReset
                    }, t)];
                return n = !0, n && (r = s.sheetsBarKButton + i + s.sheetsBarKButtonBare + i, l.push(a("span", {
                    className: r + s.sheetsBarPrev
                }, [a("span", {
                    className: s.sheetsBarKIcon + i + s.sheetsBarKArrowW
                }, [])])), l.push(a("span", {
                    className: r + s.sheetsBarNext
                }, [a("span", {
                    className: s.sheetsBarKIcon + i + s.sheetsBarKArrowE
                }, [])]))), a("div", {
                    className: s.sheetsBarItems
                }, l)
            },
            _createSortable: function() {
                var i = o.classNames;
                this._sortable = new e.ui.Sortable(this.element, {
                    filter: e.format("ul li.{0},ul li.{1}", i.sheetsBarActive, i.sheetsBarInactive),
                    container: n + i.sheetsBarItems,
                    axis: "x",
                    animation: !1,
                    ignore: "input",
                    end: function() {
                        this.draggable.hint && this.draggable.hint.remove()
                    },
                    hint: function(e) {
                        var n = t(e).clone();
                        return n.wrap("<div class='" + i.sheetsBarHintWrapper + "'><ul class='" + i.sheetsBarKResetItems + "'></ul></div>").closest("div")
                    }
                })
            },
            _onEditorKeydown: function(e) {
                this._editor && (13 === e.which && (this._destroyEditor(), this._onSheetRename(t(e.target).val())), 27 === e.which && (this._destroyEditor(), this._onSheetRename()))
            },
            _onEditorBlur: function(e) {
                this._editor && (this._destroyEditor(), this._onSheetRename(t(e.target).val()))
            },
            _onSheetReorderEnd: function(e) {
                e.preventDefault(), this.trigger("reorder", {
                    oldIndex: e.oldIndex,
                    newIndex: e.newIndex
                })
            },
            _onSheetReorderStart: function(e) {
                this._editor && e.preventDefault()
            },
            _onSheetRemove: function(e) {
                var n = t(e.target).closest("li").text();
                this._editor && (this._destroyEditor(), this._onSheetRename(this._editor.val())), this.trigger("remove", {
                    name: n
                })
            },
            _onSheetSelect: function(e) {
                var i, r = t(e.target).text();
                return t(e.target).is(n + o.classNames.sheetsBarEditor) || !r ? void e.preventDefault() : (this._editor && (i = this._editor.val(), this._destroyEditor(), this._onSheetRename(i)), this._scrollSheetsToItem(t(e.target).closest("li")), void this.trigger("select", {
                    name: r,
                    isAddButton: !1
                }))
            },
            _onSheetRename: function(e) {
                this.trigger("rename", {
                    name: e,
                    sheetIndex: this._selectedIndex
                })
            },
            _onAddSelect: function() {
                this.trigger("select", {
                    isAddButton: !0
                })
            },
            _addButton: function() {
                var t = e.dom.element,
                    n = o.classNames;
                return t("a", {
                    className: n.sheetsBarAdd + i + n.sheetsBarKButton
                }, [t("span", {
                    className: n.sheetsBarKSprite + i + n.sheetsBarKIcon + i + n.sheetsBarKFontIcon + i + n.sheetsBarKIconPlus
                }, [])])
            },
            destroy: function() {
                this._sortable.destroy()
            },
            _scrollableAllowed: function() {
                var e = this.options;
                return e.scrollable && !isNaN(e.scrollable.distance)
            },
            _scrollSheetsToItem: function(e) {
                var t, n, i, r, o, a, s, l = this;
                l._scrollableModeActive && (t = l._sheetsGroup(), n = t.scrollLeft(), i = e.outerWidth(), r = l._isRtl ? e.position().left : e.position().left - t.children().first().position().left, o = t[0].offsetWidth, a = Math.ceil(parseFloat(t.css("padding-left"))), l._isRtl ? 0 > r ? s = n + r - (o - n) - a : r + i > o && (s = n + r - i + 2 * a) : r + i > n + o ? s = r + i - o + 2 * a : n > r && (s = r - a), t.finish().animate({
                    scrollLeft: s
                }, "fast", "linear", function() {
                    l._toggleScrollButtons()
                }))
            },
            _sheetsGroup: function() {
                return this._sheetsWrapper().children("ul")
            },
            _sheetsWrapper: function() {
                return this.element.find(n + o.classNames.sheetsBarItems)
            },
            _scrollSheetsByDelta: function(e) {
                var t = this,
                    n = t._sheetsGroup(),
                    i = n.scrollLeft();
                n.finish().animate({
                    scrollLeft: i + e
                }, "fast", "linear", function() {
                    t._nowScrollingSheets ? t._scrollSheetsByDelta(e) : t._toggleScrollButtons()
                })
            }
        }), e.spreadsheet.SheetsBar = o, t.extend(!0, o, {
            classNames: r
        }))
    }(window.kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/calc.min", ["spreadsheet/runtime.min"], e)
}(function() {
    "use strict";

    function e(e) {
        e = e.toUpperCase();
        for (var t = 0, n = 0; e.length > n; ++n) t = 26 * t + e.charCodeAt(n) - 64;
        return t - 1
    }

    function t(e) {
        return parseInt(e, 10) - 1
    }

    function n(n, i) {
        var r, o, a, s, c, d;
        if ("#sheet" == n.toLowerCase()) return f.SHEETREF;
        e: {
            if (!(r = /^(\$)?([a-z]+)(\$)?(\d+)$/i.exec(n))) {
                for (s = l(n, {}), c = [];;) {
                    if (d = s.next(), d instanceof m) d.rel = 0;
                    else {
                        if (!(d instanceof p)) break e;
                        d.topLeft.rel = 0, d.bottomRight.rel = 0
                    }
                    if (c.push(d), s.eof()) break;
                    if (!s.is("op", ",")) break e;
                    s.next()
                }
                return 1 == c.length ? c[0] : new f.UnionRef(c)
            }
            if (o = t(r[4]), a = e(r[2]), 1048576 >= o && 16383 >= a) return new m(t(r[4]), e(r[2]))
        }
        if (!i) throw Error("Cannot parse reference: " + n)
    }

    function i(e, t, n, i) {
        function r(e) {
            return e.index = _.length, _.push(e), e
        }

        function o(e, t) {
            if (v(e, t)) return i.next();
            var n = i.peek();
            i.croak(n ? "Expected " + e + " «" + t + "» but found " + n.type + " «" + n.value + "»" : "Expected " + e + " «" + t + "»")
        }

        function a(e) {
            return m(f(u(e)), 0, e)
        }

        function s(e) {
            return "TRUE" == e.upper || "FALSE" == e.upper ? "TRUE" == e.upper ? y : k : r(new g(e.value))
        }

        function c() {
            var e, t = i.next();
            if (t = t.value, o("punc", "("), e = [], !v("punc", ")"))
                for (;;)
                    if (v("op", ",")) e.push({
                        type: "null"
                    }), i.next();
                    else {
                        if (e.push(a(!1)), i.eof() || v("punc", ")")) break;
                        o("op", ",")
                    } return o("punc", ")"), {
                type: "func",
                func: t,
                args: e
            }
        }

        function d(t) {
            return t.hasSheet() || t.setSheet(e), r(t)
        }

        function u(e) {
            var t;
            return v("ref") ? t = d(i.next()) : v("func") ? t = c() : v("punc", "(") ? (i.next(), t = a(!0), o("punc", ")")) : v("punc", "{") ? (i.next(), t = h(), o("punc", "}")) : v("num") || v("str") ? t = i.next() : v("sym") ? t = s(i.next()) : v("op", "+") || v("op", "-") ? t = {
                type: "prefix",
                op: i.next().value,
                exp: a(e)
            } : i.croak(i.peek() ? "Parse error" : "Incomplete expression"), p(t)
        }

        function h() {
            for (var e = [], t = [e], n = !0; !i.eof() && !v("punc", "}");) n ? n = !1 : v("punc", ";") ? (t.push(e = []), i.next()) : o("op", ","), e.push(a(!1));
            return {
                type: "matrix",
                value: t
            }
        }

        function f(e) {
            return v("punc", "(") || v("ref") || v("num") || v("func") ? {
                type: "binary",
                op: " ",
                left: e,
                right: a(!1)
            } : e
        }

        function p(e) {
            return v("op", "%") ? (i.next(), p({
                type: "postfix",
                op: "%",
                exp: e
            })) : e
        }

        function m(e, t, n) {
            var r, o, a = v("op");
            return a && (n || "," != a.value) && (r = b[a.value], r > t) ? (i.next(), o = m(u(n), r, n), m({
                type: "binary",
                op: a.value,
                left: e,
                right: o
            }, t, n)) : e
        }
        var v, _ = [];
        return i = l(i, {
            row: t,
            col: n
        }), v = i.is, {
            type: "exp",
            ast: a(!0),
            refs: _,
            sheet: e,
            row: t,
            col: n
        }
    }

    function r(e) {
        function t(e, i, r) {
            function o(t) {
                var o = e.op,
                    a = r > b[o] || !r && "," == o || "binary" == i.type && r == b[o] && e === i.right;
                return n(t(), a)
            }
            switch (e.type) {
                case "num":
                case "bool":
                    return JSON.stringify(e.value);
                case "str":
                    return JSON.stringify(JSON.stringify(e.value));
                case "ref":
                    return "this.refs[" + e.index + "].print(row, col)";
                case "prefix":
                    return o(function() {
                        return JSON.stringify(e.op) + " + " + t(e.exp, e, b[e.op])
                    });
                case "postfix":
                    return o(function() {
                        return t(e.exp, e, b[e.op]) + " + " + JSON.stringify(e.op)
                    });
                case "binary":
                    return o(function() {
                        var i = n(t(e.left, e, b[e.op]), e.left instanceof g && ":" == e.op),
                            r = n(t(e.right, e, b[e.op]), e.right instanceof g && ":" == e.op);
                        return i + " + " + JSON.stringify(e.op) + " + " + r
                    });
                case "func":
                    return JSON.stringify(e.func + "(") + " + " + (e.args.length > 0 ? e.args.map(function(n) {
                        return t(n, e, 0)
                    }).join(" + ', ' + ") : "''") + " + ')'";
                case "matrix":
                    return "'{ ' + " + e.value.map(function(n) {
                        return n.map(function(n) {
                            return t(n, e, 0)
                        }).join(" + ', ' + ")
                    }).join(" + '; ' + ") + "+ ' }'";
                case "null":
                    return "''"
            }
            throw Error("Cannot make printer for node " + e.type)
        }

        function n(e, t) {
            return t ? "'(' + " + e + " + ')'" : e
        }
        return x("function(row, col){return(" + t(e.ast, e, 0) + ")}")
    }

    function o(e, t) {
        function n(e, t) {
            switch (e.type) {
                case "ref":
                case "num":
                case "str":
                case "null":
                case "bool":
                    return i(e, t);
                case "prefix":
                case "postfix":
                    return r(e, t);
                case "binary":
                    return o(e, t);
                case "func":
                    return c(e, t);
                case "lambda":
                    return d(e, t);
                case "matrix":
                    return u(e.value, t, !0)
            }
            throw Error("Cannot CPS " + e.type)
        }

        function i(e, t) {
            return t(e)
        }

        function r(e, t) {
            return n({
                type: "func",
                func: "unary" + e.op,
                args: [e.exp]
            }, t)
        }

        function o(e, t) {
            return n({
                type: "func",
                func: "binary" + e.op,
                args: [e.left, e.right]
            }, t)
        }

        function a(e, t, i, r) {
            return n(e, function(e) {
                var o = h(r),
                    a = f("T"),
                    s = f("E");
                return {
                    type: "func",
                    func: "if",
                    args: [o, e, {
                        type: "lambda",
                        vars: [a],
                        body: n(t || y, function(e) {
                            return {
                                type: "call",
                                func: {
                                    type: "var",
                                    name: a
                                },
                                args: [e]
                            }
                        })
                    }, {
                        type: "lambda",
                        vars: [s],
                        body: n(i || k, function(e) {
                            return {
                                type: "call",
                                func: {
                                    type: "var",
                                    name: s
                                },
                                args: [e]
                            }
                        })
                    }]
                }
            })
        }

        function s(e, t) {
            return 0 === e.length ? i(y, t) : n({
                type: "func",
                func: "IF",
                args: [e[0], {
                    type: "func",
                    func: "AND",
                    args: e.slice(1)
                }, k]
            }, t)
        }

        function l(e, t) {
            return 0 === e.length ? i(k, t) : n({
                type: "func",
                func: "IF",
                args: [e[0], y, {
                    type: "func",
                    func: "OR",
                    args: e.slice(1)
                }]
            }, t)
        }

        function c(e, t) {
            switch (e.func.toLowerCase()) {
                case "if":
                    return a(e.args[0], e.args[1], e.args[2], t);
                case "and":
                    return s(e.args, t);
                case "or":
                    return l(e.args, t);
                case "true":
                    return t(y);
                case "false":
                    return t(k)
            }
            return function i(t, r) {
                return r == e.args.length ? {
                    type: "func",
                    func: e.func,
                    args: t
                } : n(e.args[r], function(e) {
                    return i(t.concat([e]), r + 1)
                })
            }([h(t)], 0)
        }

        function d(e, t) {
            var i = f("K"),
                r = n(e.body, function(e) {
                    return {
                        type: "call",
                        func: {
                            type: "var",
                            value: i
                        },
                        args: [e]
                    }
                });
            return t({
                type: "lambda",
                vars: [i].concat(e.vars),
                body: r
            })
        }

        function u(e, t, i) {
            var r = [];
            return function o(a) {
                return a == e.length ? t({
                    type: "matrix",
                    value: r
                }) : (i ? u : n)(e[a], function(e) {
                    return r[a] = e, o(a + 1)
                })
            }(0)
        }

        function h(e) {
            var t = f("R");
            return {
                type: "lambda",
                vars: [t],
                body: e({
                    type: "var",
                    name: t
                })
            }
        }

        function f(e) {
            return e || (e = ""), e = "_" + e, e + ++p
        }
        var p = 0;
        return n(e, t)
    }

    function a(e) {
        function t(e) {
            var i = e.type;
            if ("num" == i) return e.value + "";
            if ("str" == i) return JSON.stringify(e.value);
            if ("return" == i) return "context.resolve(" + t(e.value) + ")";
            if ("func" == i) return "context.func(" + JSON.stringify(e.func) + ", " + t(e.args[0]) + ", " + n(e.args.slice(1)) + ")";
            if ("call" == i) return t(e.func) + "(" + e.args.map(t).join(", ") + ")";
            if ("ref" == i) return "refs[" + e.index + "]";
            if ("bool" == i) return "" + e.value;
            if ("if" == i) return "(context.bool(" + t(e.co) + ") ? " + t(e.th) + " : " + t(e.el) + ")";
            if ("lambda" == i) return "(function(" + e.vars.join(", ") + "){ return(" + t(e.body) + ") })";
            if ("var" == i) return e.name;
            if ("matrix" == i) return n(e.value);
            if ("null" == i) return "null";
            throw Error("Cannot compile expression " + i)
        }

        function n(e) {
            return "[ " + e.map(t).join(", ") + " ]"
        }
        var i, a = r(e),
            s = a.call(e),
            l = C[s];
        return l ? l.clone(e.sheet, e.row, e.col) : (i = t(o(e.ast, function(e) {
            return {
                type: "return",
                value: e
            }
        })), i = ["function(){", "var context = this, refs = context.formula.absrefs", i, "}"].join(";\n"), l = new _.Formula(e.refs, x(i), a, e.sheet, e.row, e.col), C[s] = l, l)
    }

    function s(e) {
        return e
    }

    function l(n, i) {
        function r(e, t) {
            var n = o();
            return null == n || null != e && n.type !== e || null != t && n.value !== t ? null : n
        }

        function o() {
            return null == C && (C = l()), C
        }

        function a() {
            if (null != C) {
                var e = C;
                return C = null, e
            }
            return l()
        }

        function l() {
            var e, t = n.peek();
            return t && (("sym" == t.type || "rc" == t.type || "num" == t.type) && (e = k(8, h) || k(6, f) || k(6, v) || k(4, _) || k(4, b) || k(2, w) || k(2, y)), e || (e = n.next())), e
        }

        function u(r, o) {
            var a, s, l, c, d;
            if ("rc" == r.type) return !r.rel || i.forEditor || null != i.row && null != i.col || n.croak("Cannot read relative cell in RC notation"), new m(r.row, r.col, r.rel);
            if ("num" == r.type) return 1048577 >= r.value ? S(new m(t(r.value), o ? -(1 / 0) : +(1 / 0), 2)) : null;
            if (a = r.value, s = /^(\$)?([a-z]+)(\$)?(\d+)$/i.exec(a)) return l = t(s[4]), c = e(s[2]), 1048576 >= l && 16383 >= c ? S(new m(t(s[4]), e(s[2]), (s[1] ? 0 : 1) | (s[3] ? 0 : 2))) : null;
            if (d = "$" == a.charAt(0), d && (a = a.substr(1)), /^\d+$/.test(a)) {
                if (l = t(a), 1048576 >= l) return S(new m(t(a), o ? -(1 / 0) : +(1 / 0), d ? 0 : 2))
            } else if (c = e(a), 16383 >= c) return S(new m(o ? -(1 / 0) : +(1 / 0), e(a), d ? 0 : 1))
        }

        function h(e, t, n, i, r, o, a, s) {
            if ("sym" == e.type && "op" == t.type && ":" == t.value && "sym" == n.type && "punc" == i.type && "!" == i.value && ("sym" == r.type || "rc" == r.type || "num" == r.type && r.value == r.value | 0) && "op" == o.type && ":" == o.value && ("sym" == a.type || "rc" == a.type || "num" == a.type && a.value == a.value | 0) && a.type == r.type && ("punc" != s.type || "(" != s.value || a.space)) {
                var l = u(r, !0),
                    c = u(a, !1);
                if (l && c) return x(7), T(new p(l.setSheet(e.value, !0), c.setSheet(n.value, !0)).setSheet(e.value, !0), e, a)
            }
        }

        function f(e, t, n, i, r, o) {
            var a, s;
            return "sym" == e.type && "op" == t.type && ":" == t.value && "sym" == n.type && "punc" == i.type && "!" == i.value && ("sym" == r.type || "rc" == r.type || "num" == r.type && r.value == r.value | 0) && ("punc" != o.type || "(" != o.value || r.space) && (a = u(r)) ? (x(5), s = a.clone(), T(new p(a.setSheet(e.value, !0), s.setSheet(n.value, !0)).setSheet(e.value, !0), e, r)) : void 0
        }

        function v(e, t, n, i, r, o) {
            if ("sym" == e.type && "punc" == t.type && "!" == t.value && ("sym" == n.type || "rc" == n.type || "num" == n.type && n.value == n.value | 0) && "op" == i.type && ":" == i.value && ("sym" == r.type || "rc" == r.type || "num" == r.type && r.value == r.value | 0) && ("punc" != o.type || "(" != o.value || r.space)) {
                var a = u(n, !0),
                    s = u(r, !1);
                if (a && s) return x(5), T(new p(a, s).setSheet(e.value, !0), e, r)
            }
        }

        function _(e, t, n, i) {
            if ("sym" == e.type && "punc" == t.type && "!" == t.value && ("sym" == n.type || "rc" == n.type || "num" == n.type && n.value == n.value | 0) && ("punc" != i.type || "(" != i.value || n.space)) {
                x(3);
                var r = u(n);
                return r || (r = new g(n.value)), T(r.setSheet(e.value, !0), e, n)
            }
        }

        function b(e, t, n, i) {
            if (("sym" == e.type || "rc" == e.type || "num" == e.type && e.value == e.value | 0) && "op" == t.type && ":" == t.value && ("sym" == n.type || "rc" == n.type || "num" == n.type && n.value == n.value | 0) && ("punc" != i.type || "(" != i.value || n.space)) {
                var r = u(e, !0),
                    o = u(n, !1);
                if (r && o) return x(3), T(new p(r, o), e, n)
            }
        }

        function w(e, t) {
            if (("sym" == e.type || "rc" == e.type) && ("punc" != t.type || "(" != t.value || e.space)) {
                var n = u(e);
                if (n && isFinite(n.row) && isFinite(n.col)) return x(1), T(n, e, e)
            }
        }

        function y(e, t) {
            return "sym" != e.type || "punc" != t.type || "(" != t.value || e.space ? void 0 : (e.type = "func", x(1), e)
        }
        var k, x, C, S, T;
        return n = c(d(n), i), k = n.ahead, x = n.skip, C = null, S = null != i.row && null != i.col ? function(e) {
            return 1 & e.rel && (e.col -= i.col), 2 & e.rel && (e.row -= i.row), e
        } : s, T = i.forEditor ? function(e, t, n) {
            return e.begin = t.begin, e.end = n.end, e
        } : s, {
            peek: o,
            next: a,
            croak: n.croak,
            eof: n.eof,
            is: r
        }
    }

    function c(e, t) {
        function n(e) {
            return /[0-9]/i.test(e)
        }

        function i(e) {
            return /[a-z$_]/i.test(e) || e.toLowerCase() != e.toUpperCase()
        }

        function r(e) {
            return i(e) || n(e) || "." == e
        }

        function o(e) {
            return e in b
        }

        function a(e) {
            return "!;(){}[]".indexOf(e) >= 0
        }

        function s(e) {
            return " 	\n ".indexOf(e) >= 0
        }

        function l() {
            var e = !1,
                t = T(function(t) {
                    return "." == t ? e ? !1 : (e = !0, !0) : n(t)
                });
            return {
                type: "num",
                value: parseFloat(t)
            }
        }

        function c(t, n) {
            return {
                type: "sym",
                value: t,
                upper: t.toUpperCase(),
                space: s(e.peek()),
                quote: n
            }
        }

        function d(e, t, n) {
            var i, r;
            return !e && !n || e && n ? (i = e && /-$/.test(e), r = parseInt(t, 10), i && (r = -r), e || r--, r) : void 0
        }

        function u() {
            var t, n, i = e.lookingAt(/^R(\[-?)?([0-9]+)(\])?C(\[-?)?([0-9]+)(\])?/i);
            return i && (t = d(i[1], i[2], i[3]), n = d(i[4], i[5], i[6]), null != t && null != n) ? (e.skip(i), {
                type: "rc",
                row: t,
                col: n,
                rel: (i[4] ? 1 : 0) | (i[1] ? 2 : 0)
            }) : c(T(r))
        }

        function h() {
            return e.next(), {
                type: "str",
                value: e.readEscaped('"')
            }
        }

        function f() {
            return e.next(), c(e.readEscaped("'"), !0)
        }

        function p() {
            return {
                type: "op",
                value: T(function(e, t) {
                    return t + e in b
                })
            }
        }

        function m() {
            return {
                type: "punc",
                value: e.next()
            }
        }

        function g() {
            if (e.eof()) return null;
            var r, s = e.peek();
            return '"' == s ? h() : "'" == s ? f() : n(s) ? l() : i(s) ? u() : o(s) ? p() : a(s) ? m() : (r = e.lookingAt(/^#([a-z\/]+)[?!]/i)) ? (e.skip(r), {
                type: "error",
                value: r[1]
            }) : (t.forEditor || e.croak("Can't handle character: " + s), {
                type: "error",
                value: e.next()
            })
        }

        function v() {
            for (var n, i; C >= x.length;) T(s), n = e.pos(), i = g(), t.forEditor && i && (i.begin = n, i.end = e.pos()), x.push(i);
            return x[C]
        }

        function _() {
            var e = v();
            return e && C++, e
        }

        function w(e, t) {
            for (var n = C, i = []; e-- > 0;) i.push(_() || S);
            return C = n, t.apply(i, i)
        }

        function y(e) {
            C += e
        }

        function k() {
            return null == v()
        }
        var x = [],
            C = 0,
            T = e.readWhile;
        return {
            next: _,
            peek: v,
            eof: k,
            croak: e.croak,
            ahead: w,
            skip: y
        }
    }

    function d(e) {
        function t() {
            return u
        }

        function n() {
            var t = e.charAt(u++);
            return "\n" == t ? (h++, f = 0) : f++, t
        }

        function i() {
            return e.charAt(u)
        }

        function r() {
            return "" === i()
        }

        function o(e) {
            throw new w(e, u)
        }

        function a(t) {
            if ("string" == typeof t) e.substr(u, t.length) != t && o("Expected " + t), s(t.length);
            else if (t instanceof RegExp) {
                var n = t.exec(e.substr(u));
                if (n) return s(n[0].length), n
            } else s(t[0].length)
        }

        function s(e) {
            for (; e-- > 0;) n()
        }

        function l(e) {
            for (var t, i = !1, o = ""; !r();)
                if (t = n(), i) o += t, i = !1;
                else if ("\\" == t) i = !0;
                else {
                    if (t == e) break;
                    o += t
                }
            return o
        }

        function c(e) {
            for (var t = ""; !r() && e(i(), t);) t += n();
            return t
        }

        function d(t) {
            return t.exec(e.substr(u))
        }
        var u = 0,
            h = 1,
            f = 0;
        return {
            next: n,
            peek: i,
            eof: r,
            croak: o,
            readWhile: c,
            readEscaped: l,
            lookingAt: d,
            skip: a,
            forward: s,
            pos: t
        }
    }

    function u(e, t, n) {
        function i() {
            var i = e.next();
            return "sym" == i.type ? "TRUE" == i.upper ? (i.type = "bool", i.value = !0) : "FALSE" == i.upper && (i.type = "bool", i.value = !1) : "ref" == i.type && (i = {
                type: "ref",
                ref: null != t && null != n ? i.absolute(t, n) : i,
                begin: i.begin,
                end: i.end
            }), i
        }
        var r, o = [];
        for (e = l(e, {
            forEditor: !0,
            row: t,
            col: n
        }); !e.eof();) o.push(i());
        return r = o[0], "op" == r.type && "=" == r.value && (r.type = "startexp"), o
    }

    function h(e, t) {
        for (var n = ""; t-- > 0;) n += e;
        return n
    }
    var f, p, m, g, v, _, b, w, y, k, x, C, S, T, D;
    kendo.support.browser.msie && kendo.support.browser.version < 9 || (f = kendo.spreadsheet, p = f.RangeRef, m = f.CellRef, g = f.NameRef, v = f.calc, _ = v.runtime, b = Object.create(null), w = kendo.Class.extend({
        init: function(e, t) {
            this.message = e, this.pos = t
        },
        toString: function() {
            return this.message
        }
    }), function(e) {
        e.forEach(function(t, n) {
            t.forEach(function(t) {
                b[t] = e.length - n
            })
        })
    }([
        [":"],
        [" "],
        [","],
        ["%"],
        ["^"],
        ["*", "/"],
        ["+", "-"],
        ["&"],
        ["=", "<", ">", "<=", ">=", "<>"]
    ]), y = {
        type: "bool",
        value: !0
    }, k = {
        type: "bool",
        value: !1
    }, x = function(e) {
        return function(t) {
            var n = e[t];
            return n || (n = e[t] = Function("'use strict';return(" + t + ")")()), n
        }
    }(Object.create(null)), C = Object.create(null), S = {
        type: "eof"
    }, T = [], D = v.registerFormatParser = function(e) {
        T.push(e)
    }, v.parse = function(e, t, n, r) {
        var o, a, s, l, c;
        if (r instanceof Date) return {
            type: "date",
            value: _.dateToSerial(r)
        };
        if ("number" == typeof r) return {
            type: "number",
            value: r
        };
        if ("boolean" == typeof r) return {
            type: "boolean",
            value: r
        };
        if (r += "", /^'/.test(r)) return {
            type: "string",
            value: r.substr(1)
        };
        if (/^[0-9.]+%$/.test(r) && (o = r.substr(0, r.length - 1), a = parseFloat(o), !isNaN(a) && a == o)) return {
            type: "percent",
            value: a / 100
        };
        if (/^=/.test(r)) return r = r.substr(1), /\S/.test(r) ? i(e, t, n, r) : {
            type: "string",
            value: "=" + r
        };
        for (s = 0; T.length > s; ++s)
            if (l = T[s](r)) return l;
        return "true" == r.toLowerCase() ? {
            type: "boolean",
            value: !0
        } : "false" == r.toLowerCase() ? {
            type: "boolean",
            value: !1
        } : (c = _.parseDate(r)) ? {
            type: "date",
            value: _.dateToSerial(c)
        } : (a = parseFloat(r), !isNaN(a) && r.length > 0 && a == r ? {
            type: "number",
            value: a
        } : {
            type: "string",
            value: r
        })
    }, v.parseFormula = i, v.parseReference = n, v.compile = a, v.InputStream = d, v.ParseError = w, v.tokenize = u, D(function(e) {
        var t, n, i, r, o;
        return (t = /^(\d+):(\d+)$/.exec(e)) ? (n = parseInt(t[1], 10), i = parseInt(t[2], 10), {
            type: "date",
            format: "hh:mm",
            value: _.packTime(n, i, 0, 0)
        }) : (t = /^(\d+):(\d+)(\.\d+)$/.exec(e)) ? (i = parseInt(t[1], 10), r = parseInt(t[2], 10), o = 1e3 * parseFloat(t[3]), {
            type: "date",
            format: "mm:ss.00",
            value: _.packTime(0, i, r, o)
        }) : (t = /^(\d+):(\d+):(\d+)$/.exec(e)) ? (n = parseInt(t[1], 10), i = parseInt(t[2], 10), r = parseInt(t[3], 10), {
            type: "date",
            format: "hh:mm:ss",
            value: _.packTime(n, i, r, 0)
        }) : (t = /^(\d+):(\d+):(\d+)(\.\d+)$/.exec(e)) ? (n = parseInt(t[1], 10), i = parseInt(t[2], 10), r = parseInt(t[3], 10), o = 1e3 * parseFloat(t[4]), {
            type: "date",
            format: "hh:mm:ss.00",
            value: _.packTime(n, i, r, o)
        }) : void 0
    }), D(function(e) {
        var t, n, i, r = kendo.culture(),
            o = r.numberFormat[","],
            a = r.numberFormat["."],
            s = r.numberFormat.currency.symbol,
            l = RegExp("^(\\" + s + "\\s*)?(\\d+(\\" + o + "\\d{3})*(\\" + a + "\\d+)?)(\\s*\\" + s + ")?$");
        return (t = l.exec(e)) ? (n = t[2].replace(RegExp("\\" + o, "g"), "").replace(a, "."), i = "#", (t[1] || t[3] || t[5]) && (i += ",#"), t[4] && (i += "." + h("0", t[1] || t[5] ? 2 : t[4].length - 1)), t[1] && (i = '"' + t[1] + '"' + i), t[5] && (i = i + '"' + t[5] + '"'), {
            type: "number",
            format: "#" == i ? null : i,
            value: parseFloat(n)
        }) : void 0
    }))
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/excel-reader.min", ["kendo.core.min", "kendo.color.min", "util/parse-xml.min", "spreadsheet/calc.min"], e)
}(function() {
    "use strict";

    function e(e, n, i) {
        var r = new FileReader;
        r.onload = function(e) {
            var r = new JSZip(e.target.result);
            t(r, n, i)
        }, r.readAsArrayBuffer(e)
    }

    function t(e, t, i) {
        var a = u(e),
            s = h(e, "workbook.xml"),
            l = p(e, s.byType.theme[0]),
            c = f(e, l),
            v = [],
            _ = 0;
        d(e, "xl/workbook.xml", {
            enter: function(n, i) {
                var r, l, d, u;
                this.is(E) ? (r = i["r:id"], l = s.byId[r], d = i.name, u = o(e, l), v.push({
                    workbook: t,
                    zip: e,
                    strings: a,
                    styles: c,
                    file: l,
                    options: {
                        name: d,
                        rows: Math.max(t.options.rows || 0, u.rows),
                        columns: Math.max(t.options.columns || 0, u.cols),
                        columnWidth: u.columnWidth,
                        rowHeight: u.rowHeight
                    }
                })) : this.is(P) && i.activeTab && (_ = m(i.activeTab))
            },
            text: function(e) {
                var n, i = this.is(x);
                !i || g(i["function"]) || g(i.vbProcedure) || (n = w(e, !0), t.defineName(i.name, n, g(i.hidden)))
            }
        }), n(v, t, i).then(function() {
            var e = t.sheets();
            r(e), t.activeSheet(e[_])
        })
    }

    function n(e, t, n) {
        var r, o = (new _.Deferred).resolve();
        for (r = 0; e.length > r; r++) ! function(r, a) {
            o = o.then(function() {
                var o, s, l = t.insertSheet(r.options);
                return l.suspendChanges(!0), o = i(l, r), n && (s = {
                    sheet: l,
                    progress: a / (e.length - 1)
                }, o.then(function() {
                    n.notify(s)
                })), o
            })
        }(e[r], r);
        return n && o.then(function() {
            n.resolve()
        }), o
    }

    function i(e, t) {
        var n = new _.Deferred;
        return setTimeout(function() {
            l(t.zip, t.file, e, t.strings, t.styles), n.resolve()
        }, 0), n
    }

    function r(e) {
        for (var t = 0; e.length > t; t++) e[t].suspendChanges(!1).triggerChange({
            recalc: !0
        })
    }

    function o(e, t) {
        var n = {
            rows: 0,
            cols: 0
        };
        return d(e, "xl/" + t, {
            enter: function(e, t) {
                if ("dimension" == e) {
                    var i = w(t.ref);
                    i.bottomRight && (n.cols = i.bottomRight.col + 1, n.rows = i.bottomRight.row + 1)
                } else "sheetFormatPr" === e ? (t.defaultColWidth && (n.columnWidth = a(parseFloat(t.defaultColWidth))), t.defaultRowHeight && (n.rowHeight = s(parseFloat(t.defaultRowHeight)))) : this.is(D) && this.exit()
            }
        }), n
    }

    function a(e) {
        var t = 7,
            n = (256 * e + Math.floor(128 / t)) / 256;
        return Math.floor(n) * t
    }

    function s(e) {
        return 1.5625 * e
    }

    function l(e, t, n, i, r) {
        var o, l, u, h, f, p = n._columns._count,
            v = null;
        d(e, "xl/" + t, {
            enter: function(e, t) {
                var i, d, _, b, x, C, E, F;
                if (this.is(y)) u = null, h = null, f = null, o = t.r, null == o && (o = w(v), o.col++, o = "" + o), v = o, l = t.t, i = t.s, null != i && c(n, o, r, i);
                else if (this.is(S)) n.range(t.ref).merge();
                else if (this.is(k)) {
                    if (d = m(t.min) - 1, _ = Math.min(p, m(t.max)) - 1, t.width && (b = a(parseFloat(t.width)), n._columns.values.value(d, _, b)), "1" === t.hidden)
                        for (x = d; _ >= x; x++) n.hideColumn(x)
                } else this.is(D) ? (C = m(t.r) - 1, t.ht && (E = s(parseFloat(t.ht)), n._rows.values.value(C, C, E)), "1" === t.hidden && n.hideRow(C)) : this.is(A) ? t.activeCell && (F = w(t.activeCell), n.select(F, !0)) : this.is(T) ? "frozen" == t.state && (t.xSplit && n.frozenColumns(m(t.xSplit)), t.ySplit && n.frozenRows(m(t.ySplit))) : this.is(z) && (n.options.showGridLines = g(t.showGridLines, !0))
            },
            leave: function(e) {
                if (this.is(y)) {
                    if (null != h) try {
                        n.range(f || o).formula(h)
                    } catch (t) {
                        n.range(f || o).value(h).background("#ffaaaa")
                    } else if (null != u) {
                        var r = n.range(o);
                        r._get("formula") || (l && "n" != l ? "s" == l ? u = i[m(u)] : "b" == l ? u = "1" === u : "d" == l && (u = kendo.parseDate(u)) : u = parseFloat(u), r.value(u))
                    }
                } else "cols" == e ? n._columns._refresh() : "sheetData" == e && n._rows._refresh()
            },
            text: function(e) {
                var t;
                this.is(R) || this.is(F) ? u = e : (t = this.is(C)) && (h = e, "shared" == t.t && (f = t.ref))
            }
        })
    }

    function c(e, t, n, i) {
        function r(e) {
            var t = "string" == typeof e ? e : e.formatCode;
            null == t || /^general$/i.test(t) || (t = t.replace(/^\[\$-[0-9]+\]/, ""), u.format(t))
        }

        function o(e) {
            "solid" == e.type && u.background(e.color)
        }

        function a(e) {
            u.fontFamily(e.name), u._property("fontSize", e.size), e.bold && u.bold(!0), e.italic && u.italic(!0)
        }

        function s(e) {
            function t(t, n) {
                var i, r, o = e[t];
                o && (i = B[o.style], 0 !== i && (r = o.color, null == r && (r = "#000"), u._property(n, {
                    size: i,
                    color: r
                })))
            }
            t("left", "borderLeft"), t("top", "borderTop"), t("right", "borderRight"), t("bottom", "borderBottom")
        }

        function l(e, t) {
            var n = h[e];
            if (null != n && !n) return !1;
            if (d = h[t], c && null == d) {
                if (n = c[e], null != n && !n) return !1;
                d = c[t]
            }
            return null != d
        }
        var c, d, u = e.range(t),
            h = n.inlineStyles[i];
        h.xfId && (c = n.namedStyles[h.xfId]), l("applyBorder", "borderId") && s(n.borders[d]), l("applyFont", "fontId") && a(n.fonts[d]), l("applyAlignment", "textAlign") && u.textAlign(d), l("applyAlignment", "verticalAlign") && u.verticalAlign(d), l("applyAlignment", "wrapText") && u._property("wrap", d), l("applyFill", "fillId") && o(n.fills[d]), l("applyNumberFormat", "numFmtId") && r(n.numFmts[d] || L[d])
    }

    function d(e, t, n) {
        var i = e.files[t];
        i && b(i.asUint8Array(), n)
    }

    function u(e) {
        var t, n = [];
        return d(e, "xl/sharedStrings.xml", {
            enter: function() {
                this.is(M) && (t = "")
            },
            leave: function() {
                this.is(M) && n.push(t)
            },
            text: function(e) {
                this.is(I) && (t += e)
            }
        }), n
    }

    function h(e, t) {
        var n = {
            byId: {},
            byType: {
                theme: []
            }
        };
        return d(e, "xl/_rels/" + t + ".rels", {
            enter: function(e, t) {
                var i, r;
                "Relationship" == e && (n.byId[t.Id] = t.Target, i = t.Type.match(/\w+$/)[0], r = n.byType[i] || [], r.push(t.Target), n.byType[i] = r)
            }
        }), n
    }

    function f(e, t) {
        function n(e) {
            function t(t) {
                null != e[t] && (n[t] = g(e[t]))
            }
            var n = {
                borderId: m(e.borderId),
                fillId: m(e.fillId),
                fontId: m(e.fontId),
                numFmtId: m(e.numFmtId),
                pivotButton: g(e.pivotButton),
                quotePrefix: g(e.quotePrefix),
                xfId: m(e.xfId)
            };
            return t("applyAlignment"), t("applyBorder"), t("applyFill"), t("applyFont"), t("applyNumberFormat"), t("applyProtection"), n
        }

        function i(e) {
            var n, i, r;
            return e.rgb ? v(e.rgb) : e.indexed ? j[m(e.indexed)] : e.theme ? (n = t.colorScheme[m(e.theme)], i = kendo.parseColor(n), e.tint && (i = i.toHSL(), r = parseFloat(e.tint), i.l = 0 > r ? i.l * (1 + r) : i.l * (1 - r) + (100 - 100 * (1 - r))), i.toCssRgba()) : void 0
        }
        var r = {
                fonts: [],
                numFmts: {},
                fills: [],
                borders: [],
                namedStyles: [],
                inlineStyles: []
            },
            o = null,
            a = null,
            s = null,
            l = null;
        return d(e, "xl/styles.xml", {
            enter: function(e, t, c) {
                if (this.is(W)) r.numFmts[t.numFmtId] = t;
                else if (this.is(O)) r.fonts.push(o = {});
                else if (o) "sz" == e ? o.size = parseFloat(t.val) : "name" == e ? o.name = t.val : "b" == e ? o.bold = g(t.val, !0) : "i" == e && (o.italic = g(t.val, !0));
                else if (this.is(N)) r.fills.push(a = {});
                else if (a) "patternFill" == e ? a.type = t.patternType : "fgColor" == e && "solid" === a.type ? a.color = i(t) : "bgColor" == e && "solid" !== a.type && (a.color = i(t));
                else if (this.is(H)) r.borders.push(s = {});
                else if (s) {
                    if (/^(?:left|top|right|bottom)$/.test(e) && t.style && (s[e] = {
                        style: t.style
                    }), "color" == e) {
                        var d = this.stack[this.stack.length - 2].$tag;
                        s[d].color = i(t)
                    }
                } else this.is(U) ? (l = n(t), r.namedStyles.push(l), c && (l = null)) : this.is(V) ? (l = n(t), r.inlineStyles.push(l), c && (l = null)) : l && "alignment" == e && (/^(?:left|center|right|justify)$/.test(t.horizontal) && (l.textAlign = t.horizontal), /^(?:top|center|bottom)$/.test(t.vertical) && (l.verticalAlign = t.vertical), null != t.wrapText && (l.wrapText = g(t.wrapText)))
            },
            leave: function(e) {
                this.is(O) ? o = null : this.is(N) ? a = null : this.is(H) ? s = null : "xf" == e && (l = null)
            }
        }), r
    }

    function p(e, t) {
        function n(e, t, n) {
            var i = e[t];
            e[t] = e[n], e[n] = i
        }
        var i = [],
            r = {
                colorScheme: i
            },
            o = "xl/" + t;
        return e.files[o] && (d(e, o, {
            enter: function(e, t) {
                this.is(G) ? i.push(v("window" == t.val ? "FFFFFFFF" : "FF000000")) : this.is(q) && i.push(v("FF" + t.val))
            }
        }), i.length > 3 && (n(i, 0, 1), n(i, 2, 3))), r
    }

    function m(e) {
        return null == e ? null : parseInt(e, 10)
    }

    function g(e, t) {
        return null == e ? t : "true" == e || e === !0 || 1 == e
    }

    function v(e) {
        var t = /^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);
        return "rgba(" + parseInt(t[2], 16) + ", " + parseInt(t[3], 16) + ", " + parseInt(t[4], 16) + ", " + parseInt(t[1], 16) / 255 + ")"
    }
    var _, b, w, y, k, x, C, S, T, D, A, E, F, I, M, R, P, z, B, L, H, N, O, V, U, W, j, q, G;
    kendo.support.browser.msie && kendo.support.browser.version < 9 || (_ = kendo.jQuery, b = kendo.util.parseXML, w = kendo.spreadsheet.calc.parseReference, y = ["sheetData", "row", "c"], k = ["cols", "col"], x = ["definedNames", "definedName"], C = ["sheetData", "row", "c", "f"], S = ["mergeCells", "mergeCell"], T = ["sheetViews", "sheetView", "pane"], D = ["sheetData", "row"], A = ["sheetViews", "sheetView", "selection"], E = ["sheets", "sheet"], F = ["sheetData", "row", "c", "is"], I = ["t"], M = ["si"], R = ["sheetData", "row", "c", "v"], P = ["bookViews", "workbookView"], z = ["sheetViews", "sheetView"], B = {
        none: 0,
        thin: 1,
        medium: 2,
        dashed: 1,
        dotted: 1,
        thick: 3,
        "double": 3,
        hair: 1,
        mediumDashed: 2,
        dashDot: 1,
        mediumDashDot: 2,
        dashDotDot: 1,
        mediumDashDotDot: 2,
        slantDashDot: 1
    }, L = {
        0: "General",
        1: "0",
        2: "0.00",
        3: "#,##0",
        4: "#,##0.00",
        9: "0%",
        10: "0.00%",
        11: "0.00E+00",
        12: "# ?/?",
        13: "# ??/??",
        14: "mm-dd-yy",
        15: "d-mmm-yy",
        16: "d-mmm",
        17: "mmm-yy",
        18: "h:mm AM/PM",
        19: "h:mm:ss AM/PM",
        20: "h:mm",
        21: "h:mm:ss",
        22: "m/d/yy h:mm",
        37: "#,##0 ;(#,##0)",
        38: "#,##0 ;[Red](#,##0)",
        39: "#,##0.00;(#,##0.00)",
        40: "#,##0.00;[Red](#,##0.00)",
        45: "mm:ss",
        46: "[h]:mm:ss",
        47: "mmss.0",
        48: "##0.0E+0",
        49: "@"
    }, H = ["borders", "border"], N = ["fills", "fill"], O = ["fonts", "font"], V = ["cellXfs", "xf"], U = ["cellStyleXfs", "xf"], W = ["numFmts", "numFmt"], j = [v("FF000000"), v("FFFFFFFF"), v("FFFF0000"), v("FF00FF00"), v("FF0000FF"), v("FFFFFF00"), v("FFFF00FF"), v("FF00FFFF"), v("FF000000"), v("FFFFFFFF"), v("FFFF0000"), v("FF00FF00"), v("FF0000FF"), v("FFFFFF00"), v("FFFF00FF"), v("FF00FFFF"), v("FF800000"), v("FF008000"), v("FF000080"), v("FF808000"), v("FF800080"), v("FF008080"), v("FFC0C0C0"), v("FF808080"), v("FF9999FF"), v("FF993366"), v("FFFFFFCC"), v("FFCCFFFF"), v("FF660066"), v("FFFF8080"), v("FF0066CC"), v("FFCCCCFF"), v("FF000080"), v("FFFF00FF"), v("FFFFFF00"), v("FF00FFFF"), v("FF800080"), v("FF800000"), v("FF008080"), v("FF0000FF"), v("FF00CCFF"), v("FFCCFFFF"), v("FFCCFFCC"), v("FFFFFF99"), v("FF99CCFF"), v("FFFF99CC"), v("FFCC99FF"), v("FFFFCC99"), v("FF3366FF"), v("FF33CCCC"), v("FF99CC00"), v("FFFFCC00"), v("FFFF9900"), v("FFFF6600"), v("FF666699"), v("FF969696"), v("FF003366"), v("FF339966"), v("FF003300"), v("FF333300"), v("FF993300"), v("FF993366"), v("FF333399"), v("FF333333"), v("FF000000"), v("FFFFFFFF")], q = ["a:clrScheme", "*", "a:srgbClr"], G = ["a:clrScheme", "*", "a:sysClr"], kendo.spreadsheet.readExcel = e, kendo.spreadsheet._readSheet = l, kendo.spreadsheet._readStrings = u, kendo.spreadsheet._readStyles = f, kendo.spreadsheet._readTheme = p, kendo.spreadsheet._readWorkbook = t)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/workbook.min", ["kendo.core.min", "spreadsheet/runtime.min", "spreadsheet/references.min", "spreadsheet/excel-reader.min"], e)
}(function() {
    ! function(e) {
        var t, n;
        e.support.browser.msie && 9 > e.support.browser.version || (t = e.jQuery, n = e.Observable.extend({
            init: function(t, n) {
                e.Observable.fn.init.call(this), this.options = t, this._view = n, this._sheets = [], this._sheetsSearchCache = {}, this._sheet = this.insertSheet({
                    rows: this.options.rows,
                    columns: this.options.columns,
                    rowHeight: this.options.rowHeight,
                    columnWidth: this.options.columnWidth,
                    headerHeight: this.options.headerHeight,
                    headerWidth: this.options.headerWidth,
                    dataSource: this.options.dataSource
                }), this.undoRedoStack = new e.util.UndoRedoStack, this.undoRedoStack.bind(["undo", "redo"], this._onUndoRedo.bind(this)), this._context = new e.spreadsheet.FormulaContext(this), this._validationContext = new e.spreadsheet.ValidationFormulaContext(this), this._names = Object.create(null), this.fromJSON(this.options)
            },
            clipboard: function() {
                return this._clipboard || (this._clipboard = new e.spreadsheet.Clipboard(this)), this._clipboard
            },
            destroy: function() {
                this.unbind(), this._clipboard && this._clipboard.destroy()
            },
            events: ["change", "excelImport", "excelExport"],
            _sheetChange: function(e) {
                this.trigger("change", e)
            },
            _inputForRef: function(t) {
                return new e.spreadsheet.Range(t, this._sheet).input()
            },
            _onUndoRedo: function(e) {
                e.command.range().select()
            },
            execute: function(n) {
                var i, r = t.extend({
                        workbook: this
                    }, n.options),
                    o = new e.spreadsheet[n.command](r),
                    a = this.activeSheet();
                return r.origin && o.origin(r.origin), o.range(r.operatingRange ? r.operatingRange : r.editActiveCell ? a.activeCellSelection() : a.selection()), i = o.exec(), i && "error" === i.reason || this.undoRedoStack.push(o), i
            },
            resetFormulas: function() {
                this._sheets.forEach(function(e) {
                    e.resetFormulas()
                })
            },
            resetValidations: function() {
                this._sheets.forEach(function(e) {
                    e.resetValidations()
                })
            },
            refresh: function(e) {
                e.recalc && (this.resetFormulas(), this.resetValidations(), this._sheet.recalc(this._context), this._sheet.revalidate(this._validationContext))
            },
            activeSheet: function(t) {
                return void 0 === t ? this._sheet : void(this.sheetByName(t.name()) && (this._sheet = t, t.triggerChange(e.spreadsheet.ALL_REASONS)))
            },
            moveSheetToIndex: function(e, t) {
                var n = this.sheetIndex(e),
                    i = this._sheets; - 1 !== n && (this._sheetsSearchCache = {}, i.splice(t, 0, i.splice(n, 1)[0]), this.trigger("change", {
                    sheetSelection: !0
                }))
            },
            insertSheet: function(t) {
                var n, i, r, o, a, s;
                return t = t || {}, n = this, i = "number" == typeof t.index ? t.index : n._sheets.length, o = n._sheets, a = function(e) {
                    e = e ? e : 1;
                    var t = "Sheet" + e;
                    return n.sheetByName(t) ? a(e + 1) : t
                }, t.name && n.sheetByName(t.name) ? void 0 : (this._sheetsSearchCache = {}, r = t.name || a(), s = new e.spreadsheet.Sheet(t.rows || this.options.rows, t.columns || this.options.columns, t.rowHeight || this.options.rowHeight, t.columnWidth || this.options.columnWidth, t.headerHeight || this.options.headerHeight, t.headerWidth || this.options.headerWidth), s._workbook = this, s._name(r), s.bind("change", this._sheetChange.bind(this)), o.splice(i, 0, s), t.data && s.fromJSON(t.data), t.dataSource && s.setDataSource(t.dataSource), this.trigger("change", {
                    sheetSelection: !0
                }), s)
            },
            sheets: function() {
                return this._sheets.slice()
            },
            sheetByName: function(e) {
                return this._sheets[this.sheetIndex(e)]
            },
            sheetByIndex: function(e) {
                return this._sheets[e]
            },
            sheetIndex: function(e) {
                var t, n = this._sheets,
                    i = ("string" == typeof e ? e : e.name()).toLowerCase(),
                    r = this._sheetsSearchCache[i];
                if (r >= 0) return r;
                for (r = 0; n.length > r; r++)
                    if (t = n[r].name().toLowerCase(), this._sheetsSearchCache[t] = r, t === i) return r;
                return -1
            },
            renameSheet: function(e, t) {
                var n = e.name();
                if (t && n !== t && (e = this.sheetByName(n))) return this._sheetsSearchCache = {}, this._sheets.forEach(function(e) {
                    e._forFormulas(function(e) {
                        e.renameSheet(n, t)
                    })
                }), e._name(t), this.trigger("change", {
                    sheetSelection: !0
                }), e
            },
            removeSheet: function(e) {
                var t, n = this,
                    i = n._sheets,
                    r = e.name(),
                    o = n.sheetIndex(e);
                1 !== i.length && (this._sheetsSearchCache = {}, o > -1 && (e.unbind(), i.splice(o, 1), n.activeSheet().name() === r ? (t = i[o === i.length ? o - 1 : o], n.activeSheet(t)) : this.trigger("change", {
                    recalc: !0,
                    sheetSelection: !0
                })))
            },
            fromJSON: function(e) {
                var t, n, i;
                if (e.sheets)
                    for (t = 0; e.sheets.length > t; t++) n = this.sheetByIndex(t),
                    n || (n = this.insertSheet()), n.fromJSON(e.sheets[t]), i = e.sheets[t].dataSource, i && n.setDataSource(i);
                e.activeSheet && this.activeSheet(this.sheetByName(e.activeSheet))
            },
            toJSON: function() {
                return this.resetFormulas(), this.resetValidations(), {
                    activeSheet: this.activeSheet().name(),
                    sheets: this._sheets.map(function(e) {
                        return e.recalc(this._context), e.toJSON()
                    }, this)
                }
            },
            fromFile: function(n) {
                var i, r = new t.Deferred,
                    o = r.promise(),
                    a = {
                        file: n,
                        promise: o
                    };
                if (n && !this.trigger("excelImport", a)) {
                    for (i = 0; this._sheets.length > i; i++) this._sheets[i].unbind();
                    this._sheets = [], this._sheetsSearchCache = {}, e.spreadsheet.readExcel(n, this, r)
                } else r.reject();
                return o
            },
            saveAsExcel: function(n) {
                var i, r;
                n = t.extend({}, this.options.excel, n), i = this.toJSON(), this.trigger("excelExport", {
                    workbook: i
                }) || (r = new e.ooxml.Workbook(i), e.saveAs({
                    dataURI: r.toDataURL(),
                    fileName: i.fileName || n.fileName,
                    proxyURL: n.proxyURL,
                    forceProxy: n.forceProxy
                }))
            },
            draw: function(t, n) {
                "function" != typeof t || n || (n = t, t = {});
                var i = [],
                    r = this._sheets;
                ! function o(a) {
                    if (r.length > a) r[a].draw(e.spreadsheet.SHEETREF, t, function(e) {
                        i.push(e), o(a + 1)
                    });
                    else {
                        var s = i[0];
                        for (a = 1; i.length > a; ++a) s.children = s.children.concat(i[a].children);
                        n(s)
                    }
                }(0)
            },
            defineName: function(e, t, n) {
                this._names[e] = {
                    value: t,
                    hidden: n
                }
            },
            undefineName: function(e) {
                delete this._names[e]
            },
            nameValue: function(e) {
                return e in this._names ? this._names[e].value : null
            },
            adjustNames: function(t, n, i, r) {
                t = t.toLowerCase(), Object.keys(this._names).forEach(function(o) {
                    var a = this.nameValue(o);
                    a instanceof e.spreadsheet.Ref && a.sheet.toLowerCase() == t && (a = a.adjust(null, null, null, null, n, i, r), this.defineName(o, a))
                }, this)
            },
            options: {}
        }), e.spreadsheet.Workbook = n, e.PDFMixin && (e.PDFMixin.extend(n.prototype), n.prototype.saveAsPDF = function(n) {
            var i = new t.Deferred,
                r = i.promise(),
                o = {
                    promise: r
                };
            if (!this.trigger("pdfExport", o)) return this._drawPDF(n, i).then(function(t) {
                return e.drawing.exportPDF(t)
            }).done(function(t) {
                e.saveAs({
                    dataURI: t,
                    fileName: n.fileName,
                    proxyURL: n.proxyURL,
                    forceProxy: n.forceProxy,
                    proxyTarget: n.proxyTarget
                }), i.resolve()
            }).fail(function(e) {
                i.reject(e)
            }), r
        }, n.prototype._drawPDF = function(e) {
            var n = new t.Deferred,
                i = function(e) {
                    n.resolve(e)
                };
            switch (e.area) {
                case "workbook":
                    e.workbook.draw(e, i);
                    break;
                case "sheet":
                    e.workbook.activeSheet().draw(e, i);
                    break;
                case "selection":
                    e.workbook.activeSheet().selection().draw(e, i)
            }
            return n.promise()
        }))
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/formulacontext.min", ["kendo.core.min"], e)
}(function() {
    var e, t, n, i, r, o, a, s;
    kendo.support.browser.msie && kendo.support.browser.version < 9 || (e = kendo.spreadsheet, t = e.CellRef, n = e.RangeRef, i = e.UnionRef, r = e.NameRef, o = e.Ref, a = kendo.Class.extend({
        init: function(e) {
            this.workbook = e
        },
        getRefCells: function(e, a) {
            var s, l, c, d, u, h, f, p, m, g, v, _, b, w, y, k, x;
            if (e instanceof t) return s = this.workbook.sheetByName(e.sheet), s && e.valid() ? (l = s.formula(e), c = s.range(e.row, e.col).value(), null != l || null != c ? [{
                formula: l,
                value: c,
                row: e.row,
                col: e.col,
                sheet: e.sheet,
                hidden: a ? 0 === s.columnWidth(e.col) || 0 === s.rowHeight(e.row) : !1
            }] : []) : [{
                value: new kendo.spreadsheet.calc.runtime.CalcError("REF")
            }];
            if (e instanceof n) {
                if (d = this.workbook.sheetIndex(e.sheet), u = [], h = d, e.endSheet && (h = this.workbook.sheetIndex(e.endSheet), d > h && (f = d, d = h, h = f)), 0 > d || 0 > h || !e.valid()) return [{
                    value: new kendo.spreadsheet.calc.runtime.CalcError("REF")
                }];
                for (; h >= d;)
                    for (s = this.workbook.sheetByIndex(d++), p = s._grid.normalize(e.topLeft), m = s._grid.normalize(e.bottomRight), g = s._grid.cellRefIndex(p), v = s._grid.cellRefIndex(m), _ = s._properties.iterator("value", g, v), b = p.col; m.col >= b; ++b)
                        for (w = p.row; m.row >= w; ++w) y = s._grid.index(w, b), l = s._properties.get("formula", y), c = _.at(y), (null != l || null != c) && u.push({
                            formula: l,
                            value: c,
                            row: w,
                            col: b,
                            sheet: s.name(),
                            hidden: a ? 0 === s.columnWidth(b) || 0 === s.rowHeight(w) : !1
                        });
                return u
            }
            if (e instanceof i) {
                for (k = [], d = 0; e.refs.length > d; ++d) k = k.concat(this.getRefCells(e.refs[d], a));
                return k
            }
            return e instanceof r ? (x = this.workbook.nameValue(e.name), x instanceof o ? this.getRefCells(x, a) : [{
                value: new kendo.spreadsheet.calc.runtime.CalcError("NAME")
            }]) : []
        },
        getData: function(e) {
            var n, i = e instanceof t;
            return e instanceof r && (i = this.workbook.nameValue(e) instanceof t), n = this.getRefCells(e).map(function(e) {
                return e.value
            }), i ? n[0] : n
        },
        onFormula: function(e) {
            var t = this.workbook.sheetByName(e.sheet),
                n = e.row,
                i = e.col,
                r = e.value,
                o = t.formula({
                    row: n,
                    col: i
                });
            return o !== e ? !1 : (r instanceof kendo.spreadsheet.calc.runtime.Matrix ? r.each(function(e, r, o) {
                t._value(n + r, i + o, e)
            }) : t._value(n, i, r), clearTimeout(t._formulaContextRefresh), t._formulaContextRefresh = setTimeout(function() {
                t.batch(function() {}, {
                    layout: !0
                })
            }, 50), !0)
        }
    }), s = a.extend({
        onFormula: function() {
            return !0
        }
    }), e.FormulaContext = a, e.ValidationFormulaContext = s)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/controller.min", ["kendo.core.min"], e)
}(function() {
    ! function(e) {
        "use strict";

        function t(e) {
            return e.map(function(e) {
                return '[data-action="' + e + '"]'
            }).join(",")
        }
        var n, i, r, o, a, s, l, c, d, u, h, f, p, m, g, v, _;
        if (!(e.support.browser.msie && 9 > e.support.browser.version)) {
            n = e.jQuery, i = /:alphanum$/, r = {
                up: "up",
                down: "down",
                left: "left",
                right: "right",
                home: "first-col",
                "ctrl+left": "first-col",
                end: "last-col",
                "ctrl+right": "last-col",
                "ctrl+up": "first-row",
                "ctrl+down": "last-row",
                "ctrl+home": "first",
                "ctrl+end": "last",
                pageup: "prev-page",
                pagedown: "next-page"
            }, o = {
                tab: "next",
                "shift+tab": "previous",
                enter: "lower",
                "shift+enter": "upper",
                "delete": "clearContents",
                backspace: "clearContents",
                "shift+:alphanum": "edit",
                ":alphanum": "edit",
                "ctrl+:alphanum": "ctrl",
                ":edit": "edit"
            }, a = {
                wheel: "onWheel",
                "*+mousedown": "onMouseDown",
                contextmenu: "onContextMenu",
                "*+mousedrag": "onMouseDrag",
                "*+mouseup": "onMouseUp",
                "*+dblclick": "onDblClick",
                mousemove: "onMouseMove"
            }, s = {
                "*+pageup": "onPageUp",
                "*+pagedown": "onPageDown",
                mouseup: "onMouseUp",
                "*+cut": "onCut",
                "*+paste": "onPaste",
                "*+copy": "onCopy"
            }, l = {
                esc: "onEditorEsc",
                enter: "onEditorBlur",
                "shift+enter": "onEditorBlur",
                tab: "onEditorBlur",
                "shift+tab": "onEditorBlur"
            }, c = n.extend({
                focus: "onEditorBarFocus"
            }, l), d = n.extend({
                focus: "onEditorCellFocus"
            }, l), u = {
                cell: "range",
                rowheader: "row",
                columnheader: "column",
                topcorner: "sheet",
                autofill: "autofill"
            }, h = t(["cut", "copy", "paste", "insert-left", "insert-right", "insert-above", "insert-below"]), f = t(["unhide-row", "unhide-column"]), p = [], m = [], g = [];
            for (v in r) p.push(v), m.push("shift+" + v);
            for (v in o) g.push(v);
            s[p] = "onAction", s[m] = "onShiftAction", s[g] = "onEntryAction", d[p] = "onEditorAction", d[m] = "onEditorShiftAction", _ = e.Class.extend({
                init: function(t, i) {
                    this.view = t, this.workbook(i), this.container = n(t.container), this.clipboardElement = n(t.clipboard), this.cellContextMenu = t.cellContextMenu, this.rowHeaderContextMenu = t.rowHeaderContextMenu, this.colHeaderContextMenu = t.colHeaderContextMenu, this.scroller = t.scroller, this.tabstrip = t.tabstrip, this.sheetsbar = t.sheetsbar, this.editor = t.editor, this.editor.bind("change", this.onEditorChange.bind(this)), this.editor.bind("activate", this.onEditorActivate.bind(this)), this.editor.bind("deactivate", this.onEditorDeactivate.bind(this)), this.editor.bind("update", this.onEditorUpdate.bind(this)), n(t.scroller).on("scroll", this.onScroll.bind(this)), this.listener = new e.spreadsheet.EventListener(this.container, this, a), this.keyListener = new e.spreadsheet.EventListener(this.clipboardElement, this, s), this.barKeyListener = new e.spreadsheet.EventListener(this.editor.barElement(), this, c), this.inputKeyListener = new e.spreadsheet.EventListener(this.editor.cellElement(), this, d), this.sheetsbar && (this.sheetsbar.bind("select", this.onSheetBarSelect.bind(this)), this.sheetsbar.bind("reorder", this.onSheetBarReorder.bind(this)), this.sheetsbar.bind("rename", this.onSheetBarRename.bind(this)), this.sheetsbar.bind("remove", this.onSheetBarRemove.bind(this))), this.cellContextMenu.bind("select", this.onContextMenuSelect.bind(this)), this.rowHeaderContextMenu.bind("select", this.onContextMenuSelect.bind(this)), this.colHeaderContextMenu.bind("select", this.onContextMenuSelect.bind(this)), this.cellContextMenu.element.add(this.rowHeaderContextMenu.element).add(this.colHeaderContextMenu.element).on("contextmenu", !1), this.tabstrip && (this.tabstrip.bind("action", this.onCommandRequest.bind(this)), this.tabstrip.bind("dialog", this.onDialogRequest.bind(this)))
                },
                _execute: function(e) {
                    var t = this._workbook.execute(e);
                    return "EditCommand" !== e.command || t || this._workbook.trigger("change", {
                        editorClose: !0
                    }), t && ("error" === t.reason ? this.view.showError(t) : this.view.openDialog(t.reason)), t
                },
                _activeTooltip: function() {
                    return "" + this._workbook.activeSheet().activeCell().simplify()
                },
                onContextMenuSelect: function(e) {
                    var t, i = n(e.item).data("action");
                    switch (i) {
                        case "cut":
                            t = {
                                command: "ToolbarCutCommand",
                                options: {
                                    workbook: this._workbook
                                }
                            };
                            break;
                        case "copy":
                            t = {
                                command: "ToolbarCopyCommand",
                                options: {
                                    workbook: this._workbook
                                }
                            };
                            break;
                        case "paste":
                            t = {
                                command: "ToolbarPasteCommand",
                                options: {
                                    workbook: this._workbook
                                }
                            };
                            break;
                        case "unmerge":
                            t = {
                                command: "MergeCellCommand",
                                options: {
                                    value: "unmerge"
                                }
                            };
                            break;
                        case "merge":
                            this.view.openDialog("merge");
                            break;
                        case "hide-row":
                            t = {
                                command: "HideLineCommand",
                                options: {
                                    axis: "row"
                                }
                            };
                            break;
                        case "hide-column":
                            t = {
                                command: "HideLineCommand",
                                options: {
                                    axis: "column"
                                }
                            };
                            break;
                        case "unhide-row":
                            t = {
                                command: "UnHideLineCommand",
                                options: {
                                    axis: "row"
                                }
                            };
                            break;
                        case "unhide-column":
                            t = {
                                command: "UnHideLineCommand",
                                options: {
                                    axis: "column"
                                }
                            };
                            break;
                        case "delete-row":
                            t = {
                                command: "DeleteRowCommand"
                            };
                            break;
                        case "delete-column":
                            t = {
                                command: "DeleteColumnCommand"
                            }
                    }
                    t && this._execute(t)
                },
                onSheetBarRemove: function(e) {
                    var t = this._workbook.sheetByName(e.name);
                    t && this._workbook.removeSheet(t)
                },
                destroy: function() {
                    this.listener.destroy(), this.keyListener.destroy(), this.inputKeyListener.destroy()
                },
                onSheetBarSelect: function(e) {
                    var t, n = this._workbook;
                    t = e.isAddButton ? n.insertSheet() : n.sheetByName(e.name), n.activeSheet().name() !== t.name() && n.activeSheet(t)
                },
                onSheetBarReorder: function(e) {
                    var t = this._workbook.sheetByIndex(e.oldIndex);
                    this._workbook.moveSheetToIndex(t, e.newIndex), this._workbook.activeSheet(t)
                },
                onSheetBarRename: function(e) {
                    var t = this._workbook.sheetByIndex(e.sheetIndex);
                    this._workbook.renameSheet(t, e.name), this.clipboardElement.focus()
                },
                sheet: function(e) {
                    this.navigator = e.navigator(), this.axisManager = e.axisManager()
                },
                workbook: function(e) {
                    this._workbook = e, this.clipboard = e.clipboard()
                },
                refresh: function() {
                    var e = this.editor,
                        t = this._workbook,
                        n = t.activeSheet();
                    this._viewPortHeight = this.view.scroller.clientHeight, this.navigator.height(this._viewPortHeight), e.isActive() || (e.enable(n.selection().enable() !== !1), e.value(t._inputForRef(n.activeCell())))
                },
                onScroll: function() {
                    this.view.render()
                },
                onWheel: function(e) {
                    var t = e.originalEvent.deltaX,
                        n = e.originalEvent.deltaY;
                    1 === e.originalEvent.deltaMode && (t *= 10, n *= 10), this.scrollWith(t, n), e.preventDefault()
                },
                onAction: function(e, t) {
                    this.navigator.moveActiveCell(r[t]), e.preventDefault()
                },
                onPageUp: function() {
                    this.scrollDown(-this._viewPortHeight)
                },
                onPageDown: function() {
                    this.scrollDown(this._viewPortHeight)
                },
                onEntryAction: function(e, t) {
                    var n, r, a;
                    if (e.mod) {
                        switch (n = !0, r = String.fromCharCode(e.keyCode)) {
                            case "A":
                                this.navigator.selectAll();
                                break;
                            case "Y":
                                this._workbook.undoRedoStack.redo();
                                break;
                            case "Z":
                                this._workbook.undoRedoStack.undo();
                                break;
                            default:
                                n = !1
                        }
                        n && e.preventDefault()
                    } else if (a = this._workbook.activeSheet().selection().enable() === !1, "delete" == t || "backspace" == t) {
                        if (a) return;
                        this._execute({
                            command: "ClearContentCommand"
                        }), e.preventDefault()
                    } else if (i.test(t) || ":edit" === t) {
                        if (a) return;
                        ":edit" !== t && this.editor.value(""), this.editor.activate({
                            range: this._workbook.activeSheet()._viewActiveCell(),
                            rect: this.view.activeCellRectangle(),
                            tooltip: this._activeTooltip()
                        }).focus()
                    } else this.navigator.navigateInSelection(o[t]), e.preventDefault()
                },
                onShiftAction: function(e, t) {
                    this.navigator.modifySelection(r[t.replace("shift+", "")], this.appendSelection), e.preventDefault()
                },
                onMouseMove: function(e) {
                    var t, n = this._workbook.activeSheet();
                    n.resizingInProgress() || n.selectionInProgress() || (t = this.objectAt(e), "columnresizehandle" === t.type || "rowresizehandle" === t.type ? n.positionResizeHandle(t.ref) : n.removeResizeHandle())
                },
                onMouseDown: function(e) {
                    var t, n = this.objectAt(e);
                    return n.pane && (this.originFrame = n.pane), this.editor.canInsertRef(!1) && n.ref ? (this._workbook.activeSheet()._setFormulaSelections(this.editor.highlightedRefs()), this.navigator.startSelection(n.ref, this._selectionMode, this.appendSelection), void e.preventDefault()) : (this.editor.deactivate(), this.editor.isActive() ? void e.preventDefault() : (t = this._workbook.activeSheet(), "columnresizehandle" === n.type || "rowresizehandle" === n.type ? (t.startResizing({
                        x: n.x,
                        y: n.y
                    }), void e.preventDefault()) : "filtericon" === n.type ? (this.openFilterMenu(e), void e.preventDefault()) : (this._selectionMode = u[n.type], this.appendSelection = e.mod, void this.navigator.startSelection(n.ref, this._selectionMode, this.appendSelection))))
                },
                onContextMenu: function(t) {
                    var n, i, r, o, a, s, l = this._workbook.activeSheet();
                    l.resizingInProgress() || (t.preventDefault(), this.cellContextMenu.close(), this.colHeaderContextMenu.close(), this.rowHeaderContextMenu.close(), i = {
                        pageX: t.pageX,
                        pageY: t.pageY
                    }, r = this.objectAt(i), "columnresizehandle" !== r.type && "rowresizehandle" !== r.type && (this.navigator.selectForContextMenu(r.ref, u[r.type]), o = this.navigator._sheet.select() instanceof e.spreadsheet.UnionRef, a = !1, s = !1, "columnheader" == r.type ? (n = this.colHeaderContextMenu, a = !o && this.axisManager.selectionIncludesHiddenColumns()) : "rowheader" == r.type ? (n = this.rowHeaderContextMenu, a = !o && this.axisManager.selectionIncludesHiddenRows()) : (n = this.cellContextMenu, s = this.navigator.selectionIncludesMergedCells()), n.element.find(h).toggle(!o), n.element.find(f).toggle(a), n.element.find("[data-action=unmerge]").toggle(s), setTimeout(function() {
                        n.open(t.pageX, t.pageY)
                    })))
                },
                prevent: function(e) {
                    e.preventDefault()
                },
                constrainResize: function(e, t) {
                    var n = this._workbook.activeSheet(),
                        i = n.resizeHandlePosition();
                    return !i || "outside" === e || "topcorner" === e || i.col > t.col || i.row > t.row
                },
                onMouseDrag: function(e) {
                    var t, n, i, r;
                    if ("sheet" !== this._selectionMode) {
                        if (t = {
                            pageX: e.pageX,
                            pageY: e.pageY
                        }, n = this.objectAt(t), i = this._workbook.activeSheet(), i.resizingInProgress()) return void(this.constrainResize(n.type, n.ref) || i.resizeHintPosition({
                            x: n.x,
                            y: n.y
                        }));
                        if ("outside" === n.type) return void this.startAutoScroll(n);
                        this.originFrame === n.pane ? this.selectToLocation(t) : (r = this.originFrame._grid, n.x > r.right && this.scrollLeft(), n.y > r.bottom && this.scrollTop(), r.top > n.y || r.left > n.x ? this.startAutoScroll(n, t) : this.selectToLocation(t)), e.preventDefault()
                    }
                },
                onMouseUp: function(e) {
                    var t, n, i, r = this._workbook.activeSheet();
                    if (r.completeResizing(), this.navigator.completeSelection(), this.stopAutoScroll(), t = this.editor.activeEditor()) {
                        for (n = e.target; n;) {
                            if (n === t.element[0]) return;
                            n = n.parentNode
                        }
                        i = this.objectAt(e), i && i.ref && t.canInsertRef(!1) && (t.refAtPoint(r.selection()._ref), r._setFormulaSelections(t.highlightedRefs()))
                    }
                },
                onDblClick: function(e) {
                    var t = this.objectAt(e),
                        n = this._workbook.activeSheet().selection().enable() === !1;
                    "cell" !== t.type || n || (this.editor.activate({
                        range: this._workbook.activeSheet()._viewActiveCell(),
                        rect: this.view.activeCellRectangle(),
                        tooltip: this._activeTooltip()
                    }).focus(), this.onEditorUpdate())
                },
                onCut: function(e) {
                    if (e) {
                        var t = this.clipboardElement.find("table.kendo-clipboard-" + this.clipboard._uid).detach();
                        this.clipboardElement.append(t.clone(!1)), setTimeout(function() {
                            this.clipboardElement.empty().append(t)
                        }.bind(this))
                    }
                    this._execute({
                        command: "CutCommand",
                        options: {
                            workbook: this.view._workbook
                        }
                    })
                },
                clipBoardValue: function() {
                    return this.clipboardElement.html()
                },
                onPaste: function(t) {
                    var n, i, r, o = "",
                        a = "";
                    if (this.clipboard.menuInvoked = void 0 === t, t) {
                        if (!t.originalEvent.clipboardData || !t.originalEvent.clipboardData.getData) return r = this.clipboardElement.find("table.kendo-clipboard-" + this.clipboard._uid).detach(), this.clipboardElement.empty(), void setTimeout(function() {
                            var e = this.clipboardElement.html(),
                                t = window.clipboardData.getData("Text").trim();
                            (e || t) && (this.clipboard.external({
                                html: e,
                                plain: t
                            }), this.clipboardElement.empty().append(r), this._execute({
                                command: "PasteCommand",
                                options: {
                                    workbook: this.view._workbook
                                }
                            }), this.clipboard.menuInvoked = !0)
                        }.bind(this));
                        t.preventDefault(), n = !1, i = !1, window.DOMStringList && t.originalEvent.clipboardData.types instanceof window.DOMStringList ? (n = t.originalEvent.clipboardData.types.contains("text/html"), i = t.originalEvent.clipboardData.types.contains("text/plain")) : (n = /text\/html/.test(t.originalEvent.clipboardData.types), i = /text\/plain/.test(t.originalEvent.clipboardData.types)), n && (o = t.originalEvent.clipboardData.getData("text/html")), i && (a = t.originalEvent.clipboardData.getData("text/plain").trim())
                    } else {
                        if (e.support.browser.msie) return this.clipboardElement.focus().select(), void document.execCommand("paste");
                        this.clipboard.menuInvoked = !0
                    }(o || a) && (this.clipboard.external({
                        html: o,
                        plain: a
                    }), this._execute({
                        command: "PasteCommand",
                        options: {
                            workbook: this.view._workbook
                        }
                    }))
                },
                onCopy: function(e) {
                    this.clipboard.menuInvoked = void 0 === e, this._execute({
                        command: "CopyCommand",
                        options: {
                            workbook: this.view._workbook
                        }
                    })
                },
                scrollTop: function() {
                    this.scroller.scrollTop = 0
                },
                scrollLeft: function() {
                    this.scroller.scrollLeft = 0
                },
                scrollDown: function(e) {
                    this.scroller.scrollTop += e
                },
                scrollRight: function(e) {
                    this.scroller.scrollLeft += e
                },
                scrollWith: function(e, t) {
                    this.scroller.scrollTop += t, this.scroller.scrollLeft += e
                },
                objectAt: function(e) {
                    var t = this.container.offset(),
                        n = {
                            left: e.pageX - t.left,
                            top: e.pageY - t.top
                        };
                    return this.view.objectAt(n.left, n.top)
                },
                selectToLocation: function(e) {
                    var t = this.objectAt(e);
                    t.pane && (this.extendSelection(t), this.lastKnownCellLocation = e, this.originFrame = t.pane), this.stopAutoScroll()
                },
                extendSelection: function(e) {
                    this.navigator.extendSelection(e.ref, this._selectionMode, this.appendSelection)
                },
                autoScroll: function() {
                    var e = this._autoScrollTarget.x,
                        t = this._autoScrollTarget.y,
                        n = this.originFrame._grid,
                        i = this.view.scroller,
                        r = 8,
                        o = i.scrollLeft,
                        a = i.scrollTop;
                    n.left > e && this.scrollRight(-r), e > n.right && this.scrollRight(r), n.top > t && this.scrollDown(-r), t > n.bottom && this.scrollDown(r), a === i.scrollTop && o === i.scrollLeft ? this.selectToLocation(this.finalLocation) : this.extendSelection(this.objectAt(this.lastKnownCellLocation))
                },
                startAutoScroll: function(e, t) {
                    this._scrollInterval || (this._scrollInterval = setInterval(this.autoScroll.bind(this), 50)), this.finalLocation = t || this.lastKnownCellLocation, this._autoScrollTarget = e
                },
                stopAutoScroll: function() {
                    clearInterval(this._scrollInterval), this._scrollInterval = null
                },
                openFilterMenu: function(e) {
                    var t = this.objectAt(e),
                        n = this._workbook.activeSheet(),
                        i = n.filterColumn(t.ref),
                        r = this.view.createFilterMenu(i);
                    r.bind("action", this.onCommandRequest.bind(this)), r.bind("action", r.close.bind(r)), r.openFor(e.target)
                },
                onEditorChange: function(e) {
                    this._workbook.activeSheet().isInEditMode(!1);
                    var t = this._execute({
                        command: "EditCommand",
                        options: {
                            editActiveCell: !0,
                            value: e.value
                        }
                    });
                    t && "error" === t.reason && e.preventDefault()
                },
                onEditorActivate: function() {
                    var e = this._workbook,
                        t = e.activeSheet();
                    t._setFormulaSelections(this.editor.highlightedRefs()), t.isInEditMode(!0)
                },
                onEditorDeactivate: function() {
                    var e = this._workbook.activeSheet();
                    e.isInEditMode(!1), e._setFormulaSelections([])
                },
                onEditorUpdate: function() {
                    this._workbook.activeSheet()._setFormulaSelections(this.editor.highlightedRefs())
                },
                onEditorBarFocus: function() {
                    var e = this._workbook.activeSheet().selection().enable() === !1;
                    e || this.editor.activate({
                        range: this._workbook.activeSheet()._viewActiveCell(),
                        rect: this.view.activeCellRectangle(),
                        tooltip: this._activeTooltip()
                    })
                },
                onEditorCellFocus: function() {
                    this.editor.scale()
                },
                onEditorEsc: function() {
                    this.editor.value(this._workbook._inputForRef(this._workbook.activeSheet()._viewActiveCell())), this.editor.deactivate(), this.clipboardElement.focus()
                },
                onEditorBlur: function(e, t) {
                    this.editor.isFiltered() || (this.editor.deactivate(), this.editor.isActive() || (this.clipboardElement.focus(), this.navigator.navigateInSelection(o[t])))
                },
                onEditorAction: function(e, t) {
                    var n = this.editor,
                        i = this._workbook.activeSheet();
                    n.canInsertRef(!0) && (this.navigator.moveActiveCell(r[t]), n.activeEditor().refAtPoint(i.selection()._ref), i._setFormulaSelections(n.highlightedRefs()), e.preventDefault())
                },
                onEditorShiftAction: function(e, t) {
                    var n = this.editor,
                        i = this._workbook.activeSheet();
                    n.canInsertRef(!0) && (this.navigator.modifySelection(r[t.replace("shift+", "")], this.appendSelection), n.activeEditor().refAtPoint(i.selection()._ref), i._setFormulaSelections(n.highlightedRefs()), e.preventDefault())
                },
                onCommandRequest: function(e) {
                    e.command ? this._execute(e) : this._workbook.undoRedoStack[e.action]()
                },
                onDialogRequest: function(e) {
                    var t = {
                        pdfExport: this._workbook.options.pdf,
                        excelExport: this._workbook.options.excel
                    };
                    e.options ? n.extend(!0, e.options, t) : e.options = t, this.view.openDialog(e.name, e.options)
                }
            }), e.spreadsheet.Controller = _
        }
    }(window.kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/view.min", ["kendo.core.min", "kendo.menu.min", "spreadsheet/sheetsbar.min"], e)
}(function() {
    ! function(e) {
        function t(e) {
            var t, n = window.getSelection();
            n.removeAllRanges(), t = document.createRange(), t.selectNodeContents(e), n.addRange(t)
        }

        function n(e, t) {
            var n = e.trs[t].children;
            return n[n.length - 2]
        }

        function i(e, t) {
            var n = e.trs[t - 1],
                i = e.trs[t].children.length - 1;
            return n && i >= 0 ? n.children[i] : void 0
        }

        function r(e) {
            return ["solid", (e.size || 1) + "px", e.color || "#000"].join(" ")
        }

        function o(t, n, i, o, a, s) {
            var l, c, d, u, h, f, p, m, g, v, _, b, y, k, x;
            if (i || e.spreadsheet.draw.shouldDrawCell(n)) {
                if (l = n.left, c = n.top, d = n.width + 1, u = n.height + 1, h = {}, f = n.background, p = null, f && (p = f, s && (p = e.parseColor(p).toHSV(), p.v *= .9, p = p.toCssRgba()), p = r({
                    color: p
                })), f && (h.backgroundColor = f), n.color && (h.color = n.color), n.fontFamily && (h.fontFamily = n.fontFamily), n.underline && (h.textDecoration = "underline"), n.italic && (h.fontStyle = "italic"), n.textAlign && (h.textAlign = n.textAlign), n.bold && (h.fontWeight = "bold"), n.fontSize && (h.fontSize = n.fontSize + "px"), n.wrap === !0 && (h.whiteSpace = "pre-wrap", h.wordBreak = "break-all"), n.borderLeft ? (h.borderLeft = r(n.borderLeft), a && (a[n.left] = !0)) : p && a && !a[n.left] ? h.borderLeft = p : (l++, d--), n.borderTop ? (h.borderTop = r(n.borderTop), o && (o[n.top] = !0)) : p && o && !o[n.top] ? h.borderTop = p : (c++, u--), n.borderRight ? (h.borderRight = r(n.borderRight), a && (a[n.right] = !0)) : p && a && !a[n.right] ? h.borderRight = p : d--, n.borderBottom ? (h.borderBottom = r(n.borderBottom), o && (o[n.bottom] = !0)) : p && o && !o[n.bottom] ? h.borderBottom = p : u--, h.left = l + "px", h.top = c + "px", h.width = d + "px", h.height = u + "px", m = n.value, g = typeof m, n.format && null !== m ? (m = e.spreadsheet.formatting.format(m, n.format), m.__dataType && (g = m.__dataType)) : null !== m && void 0 !== m && (m = e.dom.text(m)), !h.textAlign) switch (g) {
                    case "number":
                    case "date":
                    case "percent":
                        h.textAlign = "right";
                        break;
                    case "boolean":
                        h.textAlign = "center"
                }
                return v = [w.cell], i && v.push(i), n.enable === !1 && v.push("k-state-disabled"), n.merged && v.push("k-spreadsheet-merged-cell"), _ = n.verticalAlign || "bottom", _ && m && (m = e.dom.element("div", {
                    className: "k-vertical-align-" + _
                }, [m])), b = m ? [m] : [], y = {
                    style: h
                }, k = n.validation, k && !k.value && (b.push(e.dom.element("span", {
                    className: "k-dirty"
                })), v.push("k-dirty-cell"), y.title = k._getOptions().messageTemplate), y.className = v.join(" "), x = e.dom.element("div", y, b), t.push(x), x
            }
        }

        function a(t, o, a) {
            var s, l, c, d, u, h, f = {};
            if (a.background && (f.backgroundColor = a.background), a.color && (f.color = a.color), a.fontFamily && (f.fontFamily = a.fontFamily), a.underline && (f.textDecoration = "underline"), a.italic && (f.fontStyle = "italic"), a.textAlign && (f.textAlign = a.textAlign), a.verticalAlign && (f.verticalAlign = "center" === a.verticalAlign ? "middle" : a.verticalAlign), a.bold && (f.fontWeight = "bold"), a.fontSize && (f.fontSize = a.fontSize + "px"), a.wrap === !0 && (f.whiteSpace = "pre-wrap", f.wordBreak = "break-all"), a.borderRight ? f.borderRight = r(a.borderRight) : a.background && (f.borderRightColor = a.background), a.borderBottom ? f.borderBottom = r(a.borderBottom) : a.background && (f.borderBottomColor = a.background), s = a.value, l = typeof s, a.format && null !== s && (s = e.spreadsheet.formatting.format(s, a.format), s.__dataType && (l = s.__dataType)), !f.textAlign) switch (l) {
                case "number":
                case "date":
                case "percent":
                    f.textAlign = "right";
                    break;
                case "boolean":
                    f.textAlign = "center"
            }
            return c = null, a.enable === !1 && (c = "k-state-disabled"), d = t.addCell(o, s, f, c, a.validation), a.borderLeft ? (h = n(t, o), u = r(a.borderLeft), h && u && (h.attr.style.borderRight = u)) : a.background && (f.borderLeftColor = a.background), a.borderTop ? (h = i(t, o), u = r(a.borderTop), h && u && (h.attr.style.borderBottom = u)) : a.background && (f.borderTopColor = a.background), d
        }

        function s(e, t, n) {
            return e >= t && n >= e
        }
        var l, c, d, u, h, f, p, m, g, v, _, b, w, y;
        e.support.browser.msie && 9 > e.support.browser.version || (l = e.jQuery, c = e.spreadsheet.CellRef, d = ".", u = 7, h = {
            view: "k-spreadsheet-view",
            fixedContainer: "k-spreadsheet-fixed-container",
            scroller: "k-spreadsheet-scroller",
            viewSize: "k-spreadsheet-view-size",
            clipboard: "k-spreadsheet-clipboard",
            cellEditor: "k-spreadsheet-cell-editor",
            barEditor: "k-spreadsheet-editor",
            topCorner: "k-spreadsheet-top-corner",
            filterHeadersWrapper: "k-filter-wrapper",
            filterRange: "k-filter-range",
            filterButton: "k-spreadsheet-filter",
            filterButtonActive: "k-state-active",
            icon: "k-icon k-font-icon",
            iconFilterDefault: "k-i-arrow-s",
            sheetsBar: "k-spreadsheet-sheets-bar",
            sheetsBarActive: "k-spreadsheet-sheets-bar-active",
            sheetsBarInactive: "k-spreadsheet-sheets-bar-inactive",
            cellContextMenu: "k-spreadsheet-cell-context-menu",
            rowHeaderContextMenu: "k-spreadsheet-row-header-context-menu",
            colHeaderContextMenu: "k-spreadsheet-col-header-context-menu"
        }, f = e.spreadsheet.messages.view = {
            errors: {
                openUnsupported: "Unsupported format. Please select an .xlsx file.",
                shiftingNonblankCells: "Cannot insert cells due to data loss possibility. Select another insert location or delete the data from the end of your worksheet.",
                filterRangeContainingMerges: "Cannot create a filter within a range containing merges",
                sortRangeContainingMerges: "Cannot sort a range containing merges",
                validationError: "The value that you entered violates the validation rules set on the cell."
            },
            tabs: {
                home: "Home",
                insert: "Insert",
                data: "Data"
            }
        }, p = e.Class.extend({
            init: function() {
                this.cols = [], this.trs = [], this._height = 0, this._width = 0
            },
            addColumn: function(t) {
                this._width += t;
                var n = e.dom.element("col", {
                    style: {
                        width: t + "px"
                    }
                });
                n.visible = t > 0, this.cols.push(n)
            },
            addRow: function(t) {
                var n, i = null;
                i = {
                    style: {
                        height: t + "px"
                    }
                }, this._height += t, n = e.dom.element("tr", i), n.visible = t > 0, this.trs.push(n)
            },
            addCell: function(t, n, i, r, o) {
                var a, s, l;
                return (null === n || void 0 === n) && (n = ""), n instanceof e.dom.Node || (n = e.dom.text(n)), a = [n], s = {
                    style: i
                }, o && !o.value && (a.push(e.dom.element("span", {
                    className: "k-dirty"
                })), r = (r || "") + (r ? " " : "") + "k-dirty-cell", s.title = o._getOptions().messageTemplate), r && (s.className = r), l = e.dom.element("td", s, a), this.trs[t].children.push(l), l
            },
            toDomTree: function(t, n, i) {
                this.trs = this.trs.filter(function(e) {
                    return e.visible
                });
                var r = 0;
                return this.cols = this.cols.filter(function(e, t) {
                    return e.visible || (this.trs.forEach(function(e) {
                        e.children.splice(t - r, 1)
                    }), r++), e.visible
                }, this), e.dom.element("table", {
                    style: {
                        left: t + "px",
                        top: n + "px",
                        height: this._height + "px",
                        width: this._width + "px"
                    },
                    className: i
                }, [e.dom.element("colgroup", null, this.cols), e.dom.element("tbody", null, this.trs)])
            }
        }), m = '<ul class="#=classNames.cellContextMenu#"><li data-action=cut>Cut</li><li data-action=copy>Copy</li><li data-action=paste>Paste</li><li class="k-separator"></li><li data-action=merge>Merge</li><li data-action=unmerge>Unmerge</li></ul>', g = '<ul class="#=classNames.rowHeaderContextMenu#"><li data-action=cut>Cut</li><li data-action=copy>Copy</li><li data-action=paste>Paste</li><li class="k-separator"></li><li data-action="delete-row">Delete</li><li data-action="hide-row">Hide</li><li data-action="unhide-row">Unhide</li></ul>', v = '<ul class="#=classNames.colHeaderContextMenu#"><li data-action=cut>Cut</li><li data-action=copy>Copy</li><li data-action=paste>Paste</li><li class="k-separator"></li><li data-action="delete-column">Delete</li><li data-action="hide-column">Hide</li><li data-action="unhide-column">Unhide</li></ul>', e.spreadsheet.ContextMenu = e.ui.ContextMenu, _ = e.template('<div class="#=classNames.view#"><div class="#=classNames.fixedContainer#"></div><div class="#=classNames.scroller#"><div class="#=classNames.viewSize#"></div></div><div tabindex="0" class="#=classNames.clipboard#" contenteditable=true></div><div class="#=classNames.cellEditor#"></div></div><div class="#=classNames.sheetsBar#"></div>' + m + g + v), b = e.Class.extend({
            init: function(t, n) {
                var i, r, o = b.classNames;
                this.element = t, this.options = l.extend(!0, {}, this.options, n), this._chrome(), this._dialogs = [], t.append(_({
                    classNames: o
                })), this._formulaInput(), this.wrapper = t.find(d + o.view), this.container = t.find(d + o.fixedContainer)[0], this.scroller = t.find(d + o.scroller)[0], this.clipboard = t.find(d + o.clipboard), this.viewSize = l(this.scroller.firstChild), this.tree = new e.dom.Tree(this.container), this.clipboardContents = new e.dom.Tree(this.clipboard[0]), this.editor = new e.spreadsheet.SheetEditor(this), this._sheetsbar(), i = {
                    target: t,
                    animation: !1,
                    showOn: "never"
                }, this.cellContextMenu = new e.spreadsheet.ContextMenu(t.find(d + o.cellContextMenu), i), this.colHeaderContextMenu = new e.spreadsheet.ContextMenu(t.find(d + o.colHeaderContextMenu), i), this.rowHeaderContextMenu = new e.spreadsheet.ContextMenu(t.find(d + o.rowHeaderContextMenu), i), r = e.support.scrollbar(), l(this.container).css({
                    width: this.wrapper[0].clientWidth - r,
                    height: this.wrapper[0].clientHeight - r
                })
            },
            _resize: function() {
                var e = this.tabstrip ? this.tabstrip.element.outerHeight() : 0,
                    t = this.formulaBar ? this.formulaBar.element.outerHeight() : 0,
                    n = this.sheetsbar ? this.sheetsbar.element.outerHeight() : 0;
                this.wrapper.height(this.element.height() - (e + t + n)), this.tabstrip && this.tabstrip.quickAccessAdjust()
            },
            _chrome: function() {
                var t = l("<div />").prependTo(this.element);
                this.formulaBar = new e.spreadsheet.FormulaBar(t), this.options.toolbar && this._tabstrip()
            },
            _formulaInput: function() {
                var t = this.element.find(d + b.classNames.cellEditor);
                this.formulaInput = new e.spreadsheet.FormulaInput(t, {
                    autoScale: !0
                })
            },
            _sheetsbar: function() {
                this.options.sheetsbar && (this.sheetsbar = new e.spreadsheet.SheetsBar(this.element.find(d + b.classNames.sheetsBar), l.extend(!0, {}, this.options.sheetsbar)))
            },
            _tabstrip: function() {
                var t, n = f.tabs,
                    i = l.extend(!0, {
                        home: !0,
                        insert: !0,
                        data: !0
                    }, this.options.toolbar),
                    r = [];
                this.tabstrip && (this.tabstrip.destroy(), this.element.children(".k-tabstrip").remove());
                for (t in i)(i[t] === !0 || i[t] instanceof Array) && r.push({
                    id: t,
                    text: n[t],
                    content: ""
                });
                this.tabstrip = new e.spreadsheet.TabStrip(l("<div />").prependTo(this.element), {
                    animation: !1,
                    dataTextField: "text",
                    dataContentField: "content",
                    dataSource: r,
                    toolbarOptions: i,
                    view: this
                }), this.tabstrip.select(0)
            },
            _executeCommand: function(e) {
                this._workbook.execute(e)
            },
            workbook: function(e) {
                this._workbook = e
            },
            sheet: function(e) {
                this._sheet = e
            },
            activeCellRectangle: function() {
                return this.cellRectangle(this._sheet._viewActiveCell())
            },
            _rectangle: function(e, t) {
                return e._grid.boundingRectangle(t.toRangeRef())
            },
            isColumnResizer: function(e, t, n) {
                var i, r, o = this._rectangle(t, n);
                return e -= this._sheet._grid._headerWidth, i = u / 2, r = o.right - this.scroller.scrollLeft, e >= r - i && r + i >= e
            },
            isRowResizer: function(e, t, n) {
                var i, r, o = this._rectangle(t, n);
                return e -= this._sheet._grid._headerHeight, i = u / 2, r = o.bottom - this.scroller.scrollTop, e >= r - i && r + i >= e
            },
            isFilterIcon: function(e, t, n, i) {
                var r = !1;
                return e -= this._sheet._grid._headerWidth - this.scroller.scrollLeft, t -= this._sheet._grid._headerHeight - this.scroller.scrollTop, this._sheet.forEachFilterHeader(i, function(i) {
                    var o = this._rectangle(n, i);
                    r = r || n.filterIconRect(o).intersects(e, t)
                }.bind(this)), r
            },
            isAutoFill: function(e, t, n) {
                var i, r = this._sheet.select();
                return r.size > 1 ? !1 : (e -= this._sheet._grid._headerWidth, t -= this._sheet._grid._headerHeight, n._grid.columns.frozen || (e += this.scroller.scrollLeft), n._grid.rows.frozen || (t += this.scroller.scrollTop), i = this._rectangle(n, r), Math.abs(i.right - e) < 8 && Math.abs(i.bottom - t) < 8)
            },
            objectAt: function(e, t) {
                var n, i, r, o, a, s, l = this._sheet._grid;
                return 0 > e || 0 > t || e > this.scroller.clientWidth || t > this.scroller.clientHeight ? n = {
                    type: "outside"
                } : l._headerWidth > e && l._headerHeight > t ? n = {
                    type: "topcorner"
                } : (i = this.paneAt(e, t), r = i._grid.rows.index(t, this.scroller.scrollTop), o = i._grid.columns.index(e, this.scroller.scrollLeft), a = "cell", s = new c(r, o), this.isAutoFill(e, t, i) ? a = "autofill" : this.isFilterIcon(e, t, i, s) ? a = "filtericon" : l._headerWidth > e ? (s = new c(r, -(1 / 0)),
                    a = this.isRowResizer(t, i, s) ? "rowresizehandle" : "rowheader") : l._headerHeight > t && (s = new c(-(1 / 0), o), a = this.isColumnResizer(e, i, s) ? "columnresizehandle" : "columnheader"), n = {
                    type: a,
                    ref: s
                }), n.pane = i, n.x = e, n.y = t, n
            },
            paneAt: function(e, t) {
                return this.panes.filter(function(n) {
                    var i = n._grid;
                    return s(t, i.top, i.bottom) && s(e, i.left, i.right)
                })[0]
            },
            containingPane: function(e) {
                return this.panes.filter(function(t) {
                    return t._grid.contains(e) ? !0 : !1
                })[0]
            },
            cellRectangle: function(e) {
                var t = this.containingPane(e)._grid,
                    n = this._sheet._grid.rectangle(e);
                return n.offset(t.headerWidth - this.scroller.scrollLeft, t.headerHeight - this.scroller.scrollTop)
            },
            refresh: function(e) {
                var t, n, i = this._sheet;
                this.tabstrip && this.tabstrip.refreshTools(i.range(i.activeCell())), e.sheetSelection && this.sheetsbar && this.sheetsbar.renderSheets(this._workbook.sheets(), this._workbook.sheetIndex(this._sheet)), this._resize(), this.viewSize[0].style.height = i._grid.totalHeight() + "px", this.viewSize[0].style.width = i._grid.totalWidth() + "px", e.layout && (t = i.frozenColumns(), n = i.frozenRows(), this.panes = [this._pane(n, t)], t > 0 && this.panes.push(this._pane(n, 0, null, t)), n > 0 && this.panes.push(this._pane(0, t, n, null)), n > 0 && t > 0 && this.panes.push(this._pane(0, 0, n, t))), e.filter && this._destroyFilterMenu(), e.activeCell && (this._focus = i.activeCell().toRangeRef())
            },
            createFilterMenu: function(t) {
                var n, i, r, o, a, s;
                return this._filterMenu && this._filterMenu.options.column == t ? this._filterMenu : (this._destroyFilterMenu(), n = this._sheet, i = n.filter().ref, r = new e.spreadsheet.Range(i, n), o = l("<div />").appendTo(this.element), a = {
                    column: t,
                    range: r
                }, s = new e.spreadsheet.FilterMenu(o, a), this._filterMenu = s, s)
            },
            selectClipBoardContents: function() {
                this.clipboard.focus(), t(this.clipboard[0])
            },
            scrollIntoView: function(e) {
                var t = !1,
                    n = this.containingPane(e)._grid,
                    i = n.scrollBoundaries(e),
                    r = this.scroller,
                    o = n.rows.frozen ? 0 : r.scrollTop,
                    a = n.columns.frozen ? 0 : r.scrollLeft;
                return o > i.top && (t = !0, r.scrollTop = i.scrollTop), i.bottom > o && (t = !0, r.scrollTop = i.scrollBottom), a > i.left && (t = !0, r.scrollLeft = i.scrollLeft), i.right > a && (t = !0, r.scrollLeft = i.scrollRight), t
            },
            _destroyDialog: function() {
                this._dialogs.pop()
            },
            openDialog: function(t, n) {
                var i = this._sheet,
                    r = i.activeCell(),
                    o = new e.spreadsheet.Range(r, i),
                    a = e.spreadsheet.dialogs.create(t, n);
                return a ? (a.bind("action", this._executeCommand.bind(this)), a.bind("deactivate", this._destroyDialog.bind(this)), this._dialogs.push(a), a.open(o), a) : void 0
            },
            showError: function(t) {
                var n = f.errors;
                e.spreadsheet.dialogs.registered(t.type) ? this.openDialog(t.type) : this.openDialog("message", {
                    title: t.title || "Error",
                    text: t.body ? t.body : n[t.type],
                    activate: function() {
                        this.dialog().element.find(".k-button").focus()
                    },
                    close: function() {
                        this.editor.focusLastActive()
                    }.bind(this)
                })
            },
            destroy: function() {
                this._dialogs.forEach(function(e) {
                    e.destroy()
                }), this.cellContextMenu.destroy(), this.rowHeaderContextMenu.destroy(), this.colHeaderContextMenu.destroy(), this.tabstrip && this.tabstrip.destroy(), this._destroyFilterMenu()
            },
            _destroyFilterMenu: function() {
                this._filterMenu && (this._filterMenu.destroy(), this._filterMenu = void 0, this._filterMenuColumn = void 0)
            },
            render: function() {
                var t, n, i, r, o, a, s, l;
                this.element.is(":visible") && (t = this._sheet, n = t.focus(), n && this.scrollIntoView(n) || (i = t._grid, r = this.scroller.scrollTop, o = this.scroller.scrollLeft, 0 > r && (r = 0), 0 > o && (o = 0), a = this.panes.map(function(e) {
                    return e.render(o, r)
                }, this), s = [], s = Array.prototype.concat.apply(s, a), l = e.dom.element("div", {
                    style: {
                        width: i._headerWidth + "px",
                        height: i._headerHeight + "px"
                    },
                    className: b.classNames.topCorner
                }), s.push(l), t.resizeHandlePosition() && t.resizeHintPosition() && s.push(this.renderResizeHint()), this.tree.render(s), this.editor.isActive() ? this.editor.toggleTooltip(this.activeCellRectangle()) : t.selectionInProgress() || t.resizingInProgress() || t.isInEditMode() || this.renderClipboardContents()))
            },
            renderResizeHint: function() {
                var t, n, i = this._sheet,
                    r = i.resizeHandlePosition(),
                    o = r.col !== -(1 / 0);
                return t = o ? {
                    height: this.scroller.clientHeight + "px",
                    width: u + "px",
                    left: i.resizeHintPosition().x + "px",
                    top: "0px"
                } : {
                    height: u + "px",
                    width: this.scroller.clientWidth + "px",
                    top: i.resizeHintPosition().y + "px",
                    left: "0px"
                }, n = y.classNames, e.dom.element("div", {
                    className: n.resizeHint + (o ? "" : " " + n.resizeHintVertical),
                    style: t
                }, [e.dom.element("div", {
                    className: n.resizeHintHandle
                }), e.dom.element("div", {
                    className: n.resizeHintMarker
                })])
            },
            renderClipboardContents: function() {
                var e, t, n, i, r = this._sheet,
                    o = r._grid,
                    s = r.select().toRangeRef(),
                    l = this._workbook.clipboard().canCopy();
                return l.canCopy === !1 && l.multiSelection ? (this.clipboardContents.render([]), void this.selectClipBoardContents()) : (s = r.trim(s), e = new p, t = o.rangeDimensions(s), t.rows.forEach(function(t) {
                    e.addRow(t)
                }), t.columns.forEach(function(t) {
                    e.addColumn(t)
                }), n = {}, i = {}, r.forEachMergedCell(s, function(e) {
                    var t = e.topLeft;
                    o.forEach(e, function(r) {
                        t.eq(r) ? n[r.print()] = e : i[r.print()] = !0
                    })
                }), r.forEach(s, function(t, r, o) {
                    var l, d, u = new c(t, r).print();
                    i[u] || (l = a(e, t - s.topLeft.row, o), d = n[u], d && (l.attr.colspan = d.width(), l.attr.rowspan = d.height()))
                }), this.clipboardContents.render([e.toDomTree(0, 0, "kendo-clipboard-" + this._workbook.clipboard()._uid)]), void this.selectClipBoardContents())
            },
            _pane: function(e, t, n, i) {
                var r = new y(this._sheet, this._sheet._grid.pane({
                    row: e,
                    column: t,
                    rowCount: n,
                    columnCount: i
                }));
                return r.refresh(this.scroller.clientWidth, this.scroller.clientHeight), r
            }
        }), w = {
            cell: "k-spreadsheet-cell",
            vaxis: "k-spreadsheet-vaxis",
            haxis: "k-spreadsheet-haxis",
            rowHeader: "k-spreadsheet-row-header",
            columnHeader: "k-spreadsheet-column-header",
            pane: "k-spreadsheet-pane",
            data: "k-spreadsheet-data",
            mergedCell: "k-spreadsheet-merged-cell",
            mergedCellsWrapper: "k-merged-cells-wrapper",
            activeCell: "k-spreadsheet-active-cell",
            selection: "k-spreadsheet-selection",
            selectionWrapper: "k-selection-wrapper",
            autoFillWrapper: "k-auto-fill-wrapper",
            single: "k-single",
            top: "k-top",
            right: "k-right",
            bottom: "k-bottom",
            left: "k-left",
            resizeHandle: "k-resize-handle",
            resizeHint: "k-resize-hint",
            resizeHintHandle: "k-resize-hint-handle",
            resizeHintMarker: "k-resize-hint-marker",
            resizeHintVertical: "k-resize-hint-vertical",
            selectionHighlight: "k-spreadsheet-selection-highlight",
            series: ["k-series-a", "k-series-b", "k-series-c", "k-series-d", "k-series-e", "k-series-f"]
        }, y = e.Class.extend({
            init: function(e, t) {
                this._sheet = e, this._grid = t
            },
            refresh: function(e, t) {
                this._grid.refresh(e, t)
            },
            isVisible: function(e, t, n) {
                return this._grid.view(e, t).ref.intersects(n)
            },
            render: function(t, n) {
                var i, r, o, a, s, l, c = y.classNames,
                    d = this._sheet,
                    u = this._grid,
                    h = u.view(t, n);
                return this._currentView = h, this._currentRect = this._rectangle(h.ref), this._selectedHeaders = d.selectedHeaders(), i = [], i.push(this.renderData()), i.push(this.renderSelection()), i.push(this.renderAutoFill()), i.push(this.renderEditorSelection()), i.push(this.renderFilterHeaders()), u.hasRowHeader && (r = e.dom.element("div", {
                    className: c.rowHeader,
                    style: {
                        width: u.headerWidth + "px",
                        top: h.rowOffset + "px"
                    }
                }), i.push(r), d.forEach(h.ref.leftColumn(), function(t) {
                    if (!d.isHiddenRow(t)) {
                        var n = t + 1,
                            i = d.rowHeight(t);
                        r.children.push(e.dom.element("div", {
                            className: this.headerClassName(t, "row"),
                            style: {
                                width: u.headerWidth + "px",
                                height: i + "px"
                            }
                        }, [e.dom.element("div", {
                            className: "k-vertical-align-center"
                        }, [e.dom.text(n + "")])]))
                    }
                }.bind(this))), u.hasColumnHeader && (o = e.dom.element("div", {
                    className: c.columnHeader,
                    style: {
                        top: "0px",
                        left: h.columnOffset + "px",
                        width: this._currentRect.width + "px",
                        height: u.headerHeight + "px"
                    }
                }), i.push(o), a = 0, d.forEach(h.ref.topRow(), function(t, n) {
                    if (!d.isHiddenColumn(n)) {
                        var i = e.spreadsheet.Ref.display(null, 1 / 0, n),
                            r = d.columnWidth(n);
                        o.children.push(e.dom.element("div", {
                            className: this.headerClassName(n, "col"),
                            style: {
                                position: "absolute",
                                left: a + "px",
                                width: r + "px",
                                height: u.headerHeight + "px"
                            }
                        }, [e.dom.element("div", {
                            className: "k-vertical-align-center"
                        }, [e.dom.text(i + "")])])), a += r
                    }
                }.bind(this))), d.resizeHandlePosition() && (u.hasColumnHeader || u.hasRowHeader) && (s = d._grid.normalize(d.resizeHandlePosition()), h.ref.intersects(s) && (d.resizeHintPosition() || i.push(this.renderResizeHandler()))), l = [c.pane], u.hasColumnHeader && l.push(c.top), u.hasRowHeader && l.push(c.left), e.dom.element("div", {
                    style: u.style,
                    className: l.join(" ")
                }, i)
            },
            headerClassName: function(e, t) {
                var n, i, r, o = this._selectedHeaders;
                return "row" === t ? (n = o.rows[e], i = o.allRows) : (n = o.cols[e], i = o.allCols), r = n || (o.all ? "full" : i ? "partial" : "none"), r && (r = "k-selection-" + r), r
            },
            renderData: function() {
                var t, n, i, r = this._currentView,
                    a = e.dom.element("div", {
                        className: y.classNames.data,
                        style: {
                            position: "relative",
                            left: r.columnOffset + "px",
                            top: r.rowOffset + "px"
                        }
                    }),
                    s = this._currentRect,
                    l = e.spreadsheet.draw.doLayout(this._sheet, r.ref, {
                        forScreen: !0
                    }),
                    c = this._sheet.options.showGridLines;
                return c && (t = null, l.xCoords.forEach(function(n) {
                    n !== t && (t = n, a.children.push(e.dom.element("div", {
                        className: w.vaxis,
                        style: {
                            left: n + "px",
                            height: s.height + "px"
                        }
                    })))
                }), t = null, l.yCoords.forEach(function(n) {
                    n !== t && (t = n, a.children.push(e.dom.element("div", {
                        className: w.haxis,
                        style: {
                            top: n + "px",
                            width: s.width + "px"
                        }
                    })))
                })), n = {}, i = {}, l.cells.forEach(function(e) {
                    var t = i[e.col] || (i[e.col] = {}),
                        r = n[e.row] || (n[e.row] = {});
                    o(a.children, e, null, t, r, c)
                }), a
            },
            renderResizeHandler: function() {
                var t, n = this._sheet,
                    i = n.resizeHandlePosition(),
                    r = this._rectangle(i);
                return t = i.col !== -(1 / 0) ? {
                    height: this._grid.headerHeight + "px",
                    width: u + "px",
                    left: r.right - u / 2 + "px",
                    top: "0px"
                } : {
                    height: u + "px",
                    width: this._grid.headerWidth + "px",
                    top: r.bottom - u / 2 + "px",
                    left: "0px"
                }, e.dom.element("div", {
                    className: y.classNames.resizeHandle,
                    style: t
                })
            },
            filterIconRect: function(t) {
                var n = 16,
                    i = 3;
                return new e.spreadsheet.Rectangle(t.right - n - i, t.top + i, n, n)
            },
            renderFilterHeaders: function() {
                function t(t) {
                    return e.dom.element("span", {
                        className: o.icon + " " + t
                    })
                }

                function n(n, i, r) {
                    var o, s = {
                            left: i.left + "px",
                            top: i.top + "px"
                        },
                        l = a && a.columns.some(function(e) {
                            return e.index === r
                        }),
                        c = n.filterButton;
                    return l && (c += " " + n.filterButtonActive), o = e.dom.element("span", {
                        className: c,
                        style: s
                    }, [t(n.iconFilterDefault)])
                }
                var i = this._sheet,
                    r = [],
                    o = b.classNames,
                    a = i.filter();
                return a && this._addDiv(r, a.ref, o.filterRange), i.forEachFilterHeader(this._currentView.ref, function(e) {
                    var t = this._rectangle(e),
                        i = this.filterIconRect(t),
                        a = this._sheet.filterColumn(e),
                        s = n(o, i, a);
                    r.push(s)
                }.bind(this)), e.dom.element("div", {
                    className: o.filterHeadersWrapper
                }, r)
            },
            renderEditorSelection: function() {
                var t = y.classNames,
                    n = this._sheet,
                    i = [];
                return n._formulaSelections.forEach(function(n) {
                    var r = n.ref;
                    r !== e.spreadsheet.NULLREF && this._addDiv(i, r, t.selectionHighlight + " " + n.colorClass)
                }.bind(this)), e.dom.element("div", {
                    className: t.selectionWrapper
                }, i)
            },
            renderSelection: function() {
                var t = y.classNames,
                    n = [],
                    i = [t.activeCell],
                    r = [t.selection],
                    o = this._sheet,
                    a = o.activeCell().toRangeRef(),
                    s = this._activeFormulaColor(),
                    l = o.select();
                return i = i.concat(s, this._directionClasses(a)), r = r.concat(s), o.singleCellSelection() && i.push(t.single), 1 === l.size() && r.push("k-single-selection"), this._sheet.autoFillPunch() && r.push("k-dim-auto-fill-handle"), l.forEach(function(t) {
                    t !== e.spreadsheet.NULLREF && this._addDiv(n, t, r.join(" "))
                }.bind(this)), this._addTable(n, a, i.join(" ")), e.dom.element("div", {
                    className: t.selectionWrapper
                }, n)
            },
            renderAutoFill: function() {
                var t, n, i, r, o, a, s, l = [];
                if (this._sheet.autoFillInProgress())
                    if (t = this._sheet.autoFillRef(), n = this._sheet.autoFillPunch(), i = this._sheet._autoFillDirection, this._addDiv(l, t, "k-auto-fill"), n) this._addDiv(l, n, "k-auto-fill-punch");
                    else if (void 0 !== i) {
                        switch (i) {
                            case 0:
                                r = t.bottomRight, o = "k-auto-fill-br-hint";
                                break;
                            case 1:
                                r = t.bottomRight, o = "k-auto-fill-br-hint";
                                break;
                            case 2:
                                r = new c(t.topLeft.row, t.bottomRight.col), o = "k-auto-fill-tr-hint";
                                break;
                            case 3:
                                r = new c(t.bottomRight.row, t.topLeft.col), o = "k-auto-fill-bl-hint"
                        }
                        a = e.dom.element("span", {
                            className: "k-tooltip"
                        }, [e.dom.text(this._sheet._autoFillHint)]), s = this._addDiv(l, r, o), s && s.children.push(a)
                    }
                return e.dom.element("div", {
                    className: y.classNames.autoFillWrapper
                }, l)
            },
            _addDiv: function(e, t, n) {
                var i, r = this._currentView;
                return r.ref.intersects(t) && (i = this._rectangle(t).resize(1, 1).toDiv(n), e.push(i)), i
            },
            _addTable: function(e, t, n) {
                var i = this._sheet,
                    r = this._currentView;
                r.ref.intersects(t) && i.forEach(t.collapse(), function(i, r, a) {
                    var s = this._rectangle(t);
                    a.left = s.left, a.top = s.top, a.width = s.width, a.height = s.height, o(e, a, n, null, null, !0)
                }.bind(this))
            },
            _activeFormulaColor: function() {
                var e, t = [];
                return this._sheet.isInEditMode() && (e = this._sheet._formulaSelections.filter(function(e) {
                    return e.active && "ref" == e.type
                })[0], e && t.push(e.colorClass)), t
            },
            _directionClasses: function(e) {
                var t = [],
                    n = y.classNames,
                    i = this._currentView.ref;
                return e.move(0, -1).intersects(i) || t.push(n.left), e.move(-1, 0).intersects(i) || t.push(n.top), e.move(0, 1).intersects(i) || t.push(n.right), e.move(1, 0).intersects(i) || t.push(n.bottom), t
            },
            _rectangle: function(e) {
                return this._grid.boundingRectangle(e.toRangeRef()).offset(-this._currentView.mergedCellLeft, -this._currentView.mergedCellTop)
            }
        }), e.spreadsheet.View = b, e.spreadsheet.Pane = y, e.spreadsheet.drawCell = o, l.extend(!0, b, {
            classNames: h
        }), l.extend(!0, y, {
            classNames: w
        }))
    }(window.kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/grid.min", ["kendo.core.min", "spreadsheet/references.min"], e)
}(function() {
    ! function(e) {
        var t, n, i, r, o, a;
        e.support.browser.msie && 9 > e.support.browser.version || (t = e.spreadsheet.CellRef, n = e.spreadsheet.RangeRef, i = e.spreadsheet.UnionRef, r = e.Class.extend({
            init: function(e, t, n, i) {
                this.left = e, this.width = n, this.right = e + n, this.top = t, this.height = i, this.bottom = t + i
            },
            offset: function(e, t) {
                return new r(this.left + e, this.top + t, this.width, this.height)
            },
            resize: function(e, t) {
                return new r(this.left, this.top, this.width + e, this.height + t)
            },
            intersects: function(e, t) {
                return e > this.left && this.left + this.width > e && t > this.top && this.top + this.height > t
            },
            toDiv: function(t) {
                return e.dom.element("div", {
                    className: t,
                    style: {
                        width: this.width + "px",
                        height: this.height + "px",
                        top: this.top + "px",
                        left: this.left + "px"
                    }
                })
            }
        }), o = e.Class.extend({
            init: function(e, t, n, i, r, o) {
                this.rowCount = n, this.columnCount = i, this._columns = t, this._rows = e, this._headerHeight = r, this._headerWidth = o
            },
            isAxis: function(e) {
                var t, n;
                return e = e.toRangeRef(), t = e.topLeft, n = e.bottomRight, 0 === t.row && n.row === this.rowCount - 1 || 0 === t.col && n.col === this.columnCount - 1
            },
            width: function(e, t) {
                return this._columns.sum(e, t)
            },
            height: function(e, t) {
                return this._rows.sum(e, t)
            },
            totalHeight: function() {
                return this._rows.total + this._headerHeight
            },
            totalWidth: function() {
                return this._columns.total + this._headerWidth
            },
            index: function(e, t) {
                return t * this.rowCount + e
            },
            cellRef: function(e) {
                return new t(e % this.rowCount, e / this.rowCount >> 0)
            },
            rowRef: function(e) {
                return new n(new t(e, 0), new t(e, this.columnCount - 1))
            },
            colRef: function(e) {
                return new n(new t(0, e), new t(this.rowCount - 1, e))
            },
            cellRefIndex: function(e) {
                return this.index(e.row, e.col)
            },
            normalize: function(e) {
                if (e instanceof n) return new n(this.normalize(e.topLeft), this.normalize(e.bottomRight)).setSheet(e.sheet, e.hasSheet());
                if (e instanceof i) return e.map(function(e) {
                    return this.normalize(e)
                }, this);
                var t = e.clone();
                return t.col = Math.max(0, Math.min(this.columnCount - 1, e.col)), t.row = Math.max(0, Math.min(this.rowCount - 1, e.row)), t
            },
            rectangle: function(e) {
                var t = this.normalize(e.topLeft),
                    n = this.normalize(e.bottomRight);
                return new r(this.width(0, t.col - 1), this.height(0, t.row - 1), this.width(t.col, n.col), this.height(t.row, n.row))
            },
            pane: function(t) {
                return new a(new e.spreadsheet.PaneAxis(this._rows, t.row, t.rowCount, this._headerHeight), new e.spreadsheet.PaneAxis(this._columns, t.column, t.columnCount, this._headerWidth), this)
            },
            rangeDimensions: function(e) {
                return {
                    rows: this._rows.values.iterator(e.topLeft.row, e.bottomRight.row),
                    columns: this._columns.values.iterator(e.topLeft.col, e.bottomRight.col)
                }
            },
            forEach: function(e, n) {
                var i, r, o = this.normalize(e.topLeft),
                    a = this.normalize(e.bottomRight);
                for (i = o.col; a.col >= i; i++)
                    for (r = o.row; a.row >= r; r++) n(new t(r, i))
            },
            trim: function(e, i) {
                var r, o, a, s, l, c = e.topLeft,
                    d = e.bottomRight,
                    u = c.row,
                    h = c.col;
                for (r = c.col; d.col >= r; r++) o = this.index(c.row, r), a = this.index(d.row, r), s = i.tree.intersecting(o, a), s.length && (l = this.cellRef(s[s.length - 1].end), u = Math.max(u, l.row), h = r);
                return new n(e.topLeft, new t(Math.min(u, e.bottomRight.row), h))
            }
        }), a = e.Class.extend({
            init: function(e, t, n) {
                this.rows = e, this.columns = t, this._grid = n, this.headerHeight = e.headerSize, this.headerWidth = t.headerSize, this.hasRowHeader = t.hasHeader, this.hasColumnHeader = e.hasHeader
            },
            refresh: function(e, t) {
                var n, i;
                this.columns.viewSize(e), this.rows.viewSize(t), n = this.columns.paneSegment(), i = this.rows.paneSegment(), this.left = n.offset, this.top = i.offset, this.right = n.offset + n.length, this.bottom = i.offset + i.length, this.style = {
                    top: i.offset + "px",
                    left: n.offset + "px",
                    height: i.length + "px",
                    width: n.length + "px"
                }
            },
            view: function(e, i) {
                var r = this.rows.visible(i),
                    o = this.columns.visible(e);
                return {
                    rows: r,
                    columns: o,
                    rowOffset: r.offset,
                    columnOffset: o.offset,
                    mergedCellLeft: o.start,
                    mergedCellTop: r.start,
                    ref: new n(new t(r.values.start, o.values.start), new t(r.values.end, o.values.end))
                }
            },
            contains: function(e) {
                return this.rows.contains(e.topLeft.row, e.bottomRight.row) && this.columns.contains(e.topLeft.col, e.bottomRight.col)
            },
            index: function(e, t) {
                return this._grid.index(e, t)
            },
            boundingRectangle: function(e) {
                return this._grid.rectangle(e)
            },
            cellRefIndex: function(e) {
                return this._grid.cellRefIndex(e)
            },
            scrollBoundaries: function(e) {
                var t = this.boundingRectangle(e),
                    n = {
                        top: Math.max(0, t.top - this.top + (this.hasColumnHeader ? 0 : this.headerHeight)),
                        left: Math.max(0, t.left - this.left + (this.hasRowHeader ? 0 : this.headerWidth)),
                        right: t.right - this.columns._viewSize + this.headerWidth,
                        bottom: t.bottom - this.rows._viewSize + this.headerHeight
                    },
                    i = this.columns.defaultValue / 2,
                    r = this.rows.defaultValue / 2;
                return n.scrollTop = n.top - r, n.scrollBottom = n.bottom + r, n.scrollLeft = n.left - i, n.scrollRight = n.right + i, n
            }
        }), e.spreadsheet.Grid = o, e.spreadsheet.PaneGrid = a, e.spreadsheet.Rectangle = r)
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/axis.min", ["kendo.core.min"], e)
}(function() {
    ! function(e) {
        var t, n;
        e.support.browser.msie && 9 > e.support.browser.version || (t = e.Class.extend({
            init: function(t, n) {
                this._value = n, this._count = t, this.values = new e.spreadsheet.RangeList(0, t - 1, n), this._hidden = new e.spreadsheet.RangeList(0, t - 1, 0), this.scrollBarSize = e.support.scrollbar(), this._refresh()
            },
            toJSON: function(e, t) {
                var n, i, r, o, a = [],
                    s = this.values.iterator(0, this._count - 1);
                for (n = 0; this._count > n; n++) i = s.at(n), i !== this._value && (r = t[n], void 0 === r && (r = a.length, o = {
                    index: n
                }, o[e] = i, a.push(o), t[n] = r));
                return a
            },
            fromJSON: function(e, t) {
                var n, i, r;
                for (n = 0; t.length > n; n++) i = t[n][e], r = t[n].index, void 0 === r && (r = n), this.value(r, r, i)
            },
            hide: function(e) {
                if (!this.hidden(e)) {
                    var t = this.value(e, e);
                    this._hidden.value(e, e, t), this.value(e, e, 0)
                }
            },
            hidden: function(e) {
                return 0 !== this._hidden.value(e, e)
            },
            includesHidden: function(e, t) {
                return this._hidden.intersecting(e, t).length > 1
            },
            nextVisible: function(e, t) {
                var n, i = this._count - 1;
                return e === i ? t ? e + 1 : e : (e += 1, n = this._hidden.intersecting(e, e)[0], 0 !== n.value ? n.end === i ? e - 1 : n.end + 1 : e)
            },
            nextPage: function(e, t) {
                return this.index(this.sum(0, e - 1) + t)
            },
            prevPage: function(e, t) {
                return this.index(this.sum(0, e) - t)
            },
            firstVisible: function() {
                var e = this._hidden.first();
                return 0 === e.value ? 0 : e.end + 1
            },
            lastVisible: function() {
                var e = this._hidden.last();
                return 0 === e.value ? this._count - 1 : e.start - 1
            },
            prevVisible: function(e, t) {
                if (0 === e) return t ? -1 : 0;
                e -= 1;
                var n = this._hidden.intersecting(e, e)[0];
                return 0 !== n.value ? 0 === n.start ? e + 1 : n.start - 1 : e
            },
            unhide: function(e) {
                if (this.hidden(e)) {
                    var t = this._hidden.value(e, e);
                    this._hidden.value(e, e, 0), this.value(e, e, t)
                }
            },
            value: function(e, t, n) {
                return void 0 === n ? this.values.iterator(e, t).at(0) : (this.values.value(e, t, n), void this._refresh())
            },
            sum: function(e, t) {
                var n, i = this.values.iterator(e, t),
                    r = 0;
                for (n = e; t >= n; n++) r += i.at(n);
                return r
            },
            visible: function(e, t) {
                var n, i, r, o, a, s, l = null,
                    c = null,
                    d = !1;
                return t >= this.total + this.scrollBarSize && (d = !0), n = this._pixelValues.intersecting(e, t), l = n[0], c = n[n.length - 1], l ? (i = e - l.start, r = (i / l.value.value >> 0) + l.value.start, o = i - (r - l.value.start) * l.value.value, a = t - c.start, s = (a / c.value.value >> 0) + c.value.start, s > c.value.end && (s = c.value.end), d && (o += c.value.value - (a - (s - c.value.start) * c.value.value)), o = Math.min(-o, 0), {
                    values: this.values.iterator(r, s),
                    offset: o
                }) : {
                    values: this.values.iterator(0, 0),
                    offset: 0
                }
            },
            index: function(e) {
                for (var t = 0, n = this.values.iterator(0, this._count - 1), i = n.at(0); e > i && this._count - 1 > t;) i += n.at(++t);
                return t
            },
            _refresh: function() {
                var t = 0;
                this._pixelValues = this.values.map(function(n) {
                    var i, r = t;
                    return t += (n.end - n.start + 1) * n.value, i = t - 1, new e.spreadsheet.ValueRange(r, i, n)
                }), this.total = t
            },
            getState: function() {
                return {
                    values: this.values.getState(),
                    hidden: this._hidden.getState()
                }
            },
            setState: function(e) {
                this.values.setState(e.values), this._hidden.setState(e.hidden), this._refresh()
            }
        }), n = e.Class.extend({
            init: function(e, t, n, i) {
                this._axis = e, this._start = t, this._count = n, this.hasHeader = 0 === t, this.headerSize = i, this.defaultValue = e._value, this.frozen = n > 0
            },
            viewSize: function(e) {
                this._viewSize = e
            },
            sum: function(e, t) {
                return this._axis.sum(e, t - 1)
            },
            start: function() {
                return this.sum(0, this._start)
            },
            size: function() {
                return this.sum(this._start, this._start + this._count)
            },
            index: function(e, t) {
                return this._axis.index(e + (this.frozen ? 0 : t) - this.headerSize)
            },
            paneSegment: function() {
                var e, t = this.start();
                return this.hasHeader || (t += this.headerSize), this.frozen ? (e = this.size(), this.hasHeader ? e += this.headerSize : e -= this.headerSize) : e = this._viewSize - t, {
                    offset: t,
                    length: e
                }
            },
            visible: function(e) {
                var t, n, i = this.start();
                return this.frozen ? (t = this.size(), this.hasHeader || (t -= this.headerSize)) : (t = this._viewSize - i - this.headerSize, i += e), n = this._axis.visible(i, i + t - 1), this.frozen && (n.offset = 0), n.start = i, this.hasHeader && (n.offset += this.headerSize, n.start -= this.headerSize), n
            },
            contains: function(e, t) {
                return this.frozen ? e > this._start + this._count ? !1 : this._start > t ? !1 : !0 : t >= this._start
            }
        }), e.spreadsheet.Axis = t, e.spreadsheet.PaneAxis = n)
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/filter.min", ["kendo.core.min", "kendo.data.min"], e)
}(function() {
    ! function(e) {
        function t(e) {
            var t = e.getMonth() + 1;
            return t >= 1 && 3 >= t ? 1 : t >= 4 && 6 >= t ? 2 : t >= 7 && 9 >= t ? 3 : 4
        }

        function n(t, n) {
            if (t instanceof Date) {
                var i = e.date.today();
                return i.setFullYear(i.getFullYear() + n), i.getFullYear() === t.getFullYear()
            }
            return !1
        }

        function i(t, n) {
            if (t instanceof Date) {
                var i = e.date.firstDayOfMonth(e.date.today());
                return i.setMonth(i.getMonth() + n, 1), i.getTime() === e.date.firstDayOfMonth(t).getTime()
            }
            return !1
        }

        function r(t, n) {
            var i, r;
            return n instanceof Date ? (i = e.date.dayOfWeek(e.date.getDate(t), 1), r = e.date.dayOfWeek(e.date.getDate(n), 1), i.getTime() === r.getTime()) : !1
        }
        if (!(e.support.browser.msie && 9 > e.support.browser.version)) {
            var o = e.spreadsheet.Filter = e.Class.extend({
                prepare: function() {},
                value: function(e) {
                    return e.value
                },
                matches: function() {
                    throw Error("The 'matches' method is not implemented.")
                },
                toJSON: function() {
                    throw Error("The 'toJSON' method is not implemented.")
                }
            });
            o.create = function(t) {
                var n, i = t.filter;
                if (!i) throw Error("Filter type not specified.");
                if (n = e.spreadsheet[i.charAt(0).toUpperCase() + i.substring(1) + "Filter"], !n) throw Error("Filter type not recognized.");
                return new n(t)
            }, e.spreadsheet.ValueFilter = o.extend({
                _values: [],
                _dates: [],
                _blanks: !1,
                init: function(e) {
                    void 0 !== e.values && (this._values = e.values), void 0 !== e.blanks && (this._blanks = e.blanks), void 0 !== e.dates && (this._dates = e.dates)
                },
                value: function(t) {
                    var n, i = t.value;
                    return this._dates.length > 0 && t.format && "number" == typeof i && (n = e.spreadsheet.formatting.type(i, t.format), "date" === n && (i = e.spreadsheet.numberToDate(i))), i
                },
                matches: function(e) {
                    return null === e || void 0 === e ? this._blanks : e instanceof Date ? this._dates.some(function(t) {
                        return !(t.year !== e.getFullYear() || void 0 !== t.month && t.month !== e.getMonth() || void 0 !== t.day && t.day !== e.getDate() || void 0 !== t.hours && t.hours !== e.getHours() || void 0 !== t.minutes && t.minutes !== e.getMinutes() || void 0 !== t.seconds && t.seconds !== e.getSeconds())
                    }) : this._values.indexOf(e) >= 0
                },
                toJSON: function() {
                    return {
                        filter: "value",
                        values: this._values.slice(0)
                    }
                }
            }), e.spreadsheet.CustomFilter = o.extend({
                _logic: "and",
                init: function(t) {
                    if (void 0 !== t.logic && (this._logic = t.logic), void 0 === t.criteria) throw Error("Must specify criteria.");
                    this._criteria = t.criteria;
                    var n = e.data.Query.filterExpr({
                        logic: this._logic,
                        filters: this._criteria
                    }).expression;
                    this._matches = Function("d", "return " + n)
                },
                matches: function(e) {
                    return null === e ? !1 : this._matches(e)
                },
                value: function(t) {
                    var n = t.value,
                        i = this._criteria[0].value,
                        r = i instanceof Date ? "date" : typeof i,
                        o = typeof n;
                    return t.format && (o = e.spreadsheet.formatting.type(n, t.format)), o != r ? "string" == r && (t.format && (n = e.spreadsheet.formatting.text(n, t.format)), n += "") : "date" == o && (n = e.spreadsheet.numberToDate(n)), n
                },
                toJSON: function() {
                    return {
                        filter: "custom",
                        logic: this._logic,
                        criteria: this._criteria
                    }
                }
            }), e.spreadsheet.TopFilter = o.extend({
                init: function(e) {
                    this._type = e.type, this._value = e.value, this._values = []
                },
                prepare: function(e) {
                    var t, n = e.map(this.value).sort().filter(function(e, t, n) {
                        return 0 === t || e !== n[t - 1]
                    });
                    n.sort("topNumber" === this._type || "topPercent" == this._type ? function(e, t) {
                        return t - e
                    } : function(e, t) {
                        return e - t
                    }), t = this._value, ("topPercent" === this._type || "bottomPercent" === this._type) && (t = n.length * t / 100 >> 0), this._values = n.slice(0, t)
                },
                matches: function(e) {
                    return this._values.indexOf(e) >= 0
                },
                toJSON: function() {
                    return {
                        filter: "top",
                        type: this._type,
                        value: this._value
                    }
                }
            }), e.spreadsheet.DynamicFilter = o.extend({
                init: function(e) {
                    if (this._type = e.type, this._predicate = this[e.type], "function" != typeof this._predicate) throw Error("DynamicFilter type '" + e.type + "' not recognized.")
                },
                value: function(t) {
                    var n, i = t.value;
                    return t.format && (n = e.spreadsheet.formatting.type(i, t.format), "date" === n && (i = e.spreadsheet.numberToDate(i))), i
                },
                prepare: function(e) {
                    var t, n, i = 0,
                        r = 0;
                    for (t = 0; e.length > t; t++) n = this.value(e[t]), "number" == typeof n && (i += n, r++);
                    this._average = r > 0 ? i / r : 0
                },
                matches: function(e) {
                    return this._predicate(e)
                },
                aboveAverage: function(t) {
                    return t instanceof Date && (t = e.spreadsheet.dateToNumber(t)), "number" != typeof t ? !1 : t > this._average
                },
                belowAverage: function(t) {
                    return t instanceof Date && (t = e.spreadsheet.dateToNumber(t)), "number" != typeof t ? !1 : this._average > t
                },
                tomorrow: function(t) {
                    if (t instanceof Date) {
                        var n = e.date.addDays(e.date.today(), 1);
                        return e.date.getDate(t).getTime() === n.getTime()
                    }
                    return !1
                },
                today: function(t) {
                    return t instanceof Date ? e.date.isToday(t) : !1
                },
                yesterday: function(t) {
                    if (t instanceof Date) {
                        var n = e.date.addDays(e.date.today(), -1);
                        return e.date.getDate(t).getTime() === n.getTime()
                    }
                    return !1
                },
                nextWeek: function(t) {
                    return r(e.date.addDays(e.date.today(), 7), t)
                },
                thisWeek: function(t) {
                    return r(e.date.today(), t)
                },
                lastWeek: function(t) {
                    return r(e.date.addDays(e.date.today(), -7), t)
                },
                nextMonth: function(e) {
                    return i(e, 1)
                },
                thisMonth: function(e) {
                    return i(e, 0)
                },
                lastMonth: function(e) {
                    return i(e, -1)
                },
                nextQuarter: function(n) {
                    var i, r;
                    return n instanceof Date ? (i = e.date.today(), r = t(n) - t(i), 1 === r && i.getFullYear() === n.getFullYear() || -3 == r && i.getFullYear() + 1 === n.getFullYear()) : !1
                },
                thisQuarter: function(n) {
                    var i, r;
                    return n instanceof Date ? (i = e.date.today(), r = t(n) - t(i), 0 === r && i.getFullYear() === n.getFullYear()) : !1
                },
                lastQuarter: function(n) {
                    var i, r;
                    return n instanceof Date ? (i = e.date.today(), r = t(i) - t(n), 1 === r && i.getFullYear() === n.getFullYear() || -3 == r && i.getFullYear() - 1 === n.getFullYear()) : !1
                },
                nextYear: function(e) {
                    return n(e, 1)
                },
                thisYear: function(e) {
                    return n(e, 0)
                },
                lastYear: function(e) {
                    return n(e, -1)
                },
                yearToDate: function(t) {
                    if (t instanceof Date) {
                        var n = e.date.today();
                        return t.getFullYear() === n.getFullYear() && n >= t
                    }
                    return !1
                },
                toJSON: function() {
                    return {
                        filter: "dynamic",
                        type: this._type
                    }
                }
            }), [1, 2, 3, 4].forEach(function(n) {
                e.spreadsheet.DynamicFilter.prototype["quarter" + n] = function(e) {
                    return e instanceof Date ? t(e) === n : !1
                }
            }), e.cultures["en-US"].calendar.months.names.forEach(function(t, n) {
                e.spreadsheet.DynamicFilter.prototype[t.toLowerCase()] = function(e) {
                    return e instanceof Date ? e.getMonth() === n : !1
                }
            })
        }
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/sorter.min", ["kendo.core.min"], e)
}(function() {
    ! function(e) {
        if (!(e.support.browser.msie && 9 > e.support.browser.version)) {
            var t = e.Class.extend({
                init: function(e, t) {
                    this._grid = e, this._lists = t
                },
                indices: function(e, n, i, r) {
                    var o = t.ascendingComparer;
                    return i === !1 && (o = t.descendingComparer), n.sortedIndices(this._grid.cellRefIndex(e.topLeft), this._grid.cellRefIndex(e.bottomRight), o, r)
                },
                sortBy: function(e, t, n, i, r) {
                    var o, a, s, l, c = this.indices(e.toColumn(t), n, i, r);
                    for (o = e.topLeft.col; e.bottomRight.col >= o; o++)
                        for (a = this._grid.index(e.topLeft.row, o), s = this._grid.index(e.bottomRight.row, o), l = 0; this._lists.length > l; l++) a < this._lists[l].lastRangeStart() && this._lists[l].sort(a, s, c);
                    return c
                }
            });
            t.ascendingComparer = function(t, n) {
                var i, r;
                if (null === t && null === n) return 0;
                if (null === t) return 1;
                if (null === n) return -1;
                if (i = typeof t, r = typeof n, "number" === i) return "number" === r ? t - n : -1;
                if ("string" === i) switch (r) {
                    case "number":
                        return 1;
                    case "string":
                        return t.localeCompare(n);
                    default:
                        return -1
                }
                if ("boolean" === i) switch (r) {
                    case "number":
                        return 1;
                    case "string":
                        return 1;
                    case "boolean":
                        return t - n;
                    default:
                        return -1
                }
                if (t instanceof e.spreadsheet.calc.runtime.CalcError) return n instanceof e.spreadsheet.calc.runtime.CalcError ? 0 : 1;
                throw Error("Cannot compare " + t + " and " + n)
            }, t.descendingComparer = function(e, n) {
                return null === e && null === n ? 0 : null === e ? 1 : null === n ? -1 : t.ascendingComparer(n, e)
            }, e.spreadsheet.Sorter = t
        }
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/numformat.min", ["spreadsheet/calc.min", "kendo.dom.min"], e)
}(function() {
    "use strict";

    function e(e) {
        function t() {
            c.push({
                cond: "text",
                body: [{
                    type: "text"
                }]
            })
        }

        function n() {
            var t = e.skip(d);
            return t ? t[1].toLowerCase() : void 0
        }

        function i() {
            var t, n = e.skip(u);
            return n && (t = parseFloat(n[2]), !isNaN(t)) ? {
                op: n[1],
                value: t
            } : void 0
        }

        function r() {
            for (var t, n = [], i = null; !e.eof() && (t = a());) "date" == t.type ? i && /^(el)?time$/.test(i.type) && "h" == i.part && "m" == t.part && 3 > t.format && (t.type = "time") : /^(el)?time$/.test(t.type) && "s" == t.part && i && "date" == i.type && "m" == i.part && 3 > i.format && (i.type = "time"), /^(?:str|space|fill)$/.test(t.type) || (i = t), n.push(t);
            return n
        }

        function o(t) {
            if ("date" != t.type || "m" == t.part && 3 > t.format) {
                var n = e.skip(/^\.(0+)/);
                n && (t.fraction = n[1].length, "date" == t.type && (t.type = "time"))
            }
            return t
        }

        function a() {
            var t, n;
            if (n = e.skip(/^([#0?]+),([#0?]+)/)) return {
                type: "digit",
                sep: !0,
                format: n[1] + n[2],
                decimal: f
            };
            if (n = e.skip(/^[#0?]+/)) return {
                type: "digit",
                sep: !1,
                format: n[0],
                decimal: f
            };
            if (n = e.skip(/^(e)([+-])/i)) return {
                type: "exp",
                ch: n[1],
                sign: n[2]
            };
            if (n = e.skip(/^(d{1,4}|m{1,5}|yyyy|yy)/i)) return n = n[1].toLowerCase(), o({
                type: "date",
                part: n.charAt(0),
                format: n.length
            });
            if (n = e.skip(/^(hh?|ss?)/i)) return n = n[1].toLowerCase(), o({
                type: "time",
                part: n.charAt(0),
                format: n.length
            });
            if (n = e.skip(/^\[(hh?|mm?|ss?)\]/i)) return n = n[1].toLowerCase(), o({
                type: "eltime",
                part: n.charAt(0),
                format: n.length
            });
            if (n = e.skip(/^(am\/pm|a\/p)/i)) return n = n[1].split("/"), {
                type: "ampm",
                am: n[0],
                pm: n[1]
            };
            switch (t = e.next()) {
                case ";":
                    return null;
                case "\\":
                    return {
                        type: "str", value: e.next()
                    };
                case '"':
                    return {
                        type: "str", value: e.readEscaped(t)
                    };
                case "@":
                    return {
                        type: "text"
                    };
                case "_":
                    return {
                        type: "space", value: e.next()
                    };
                case "*":
                    return {
                        type: "fill", value: e.next()
                    };
                case ".":
                    return e.lookingAt(/^\s*[#0?]/) ? (f = !0, {
                        type: "dec"
                    }) : {
                        type: "str",
                        value: "."
                    };
                case "%":
                    return {
                        type: "percent"
                    };
                case ",":
                    return {
                        type: "comma"
                    }
            }
            return {
                type: "str",
                value: t
            }
        }

        function s() {
            f = !1;
            var e = n(),
                t = i();
            return !e && t && (e = n()), {
                color: e,
                cond: t,
                body: r()
            }
        }
        var c, h, f, p;
        for (e = l.InputStream(e), c = [], h = !1; !e.eof();) p = s(), c.push(p), p.cond && (h = !0);
        return h ? t() : 1 == c.length ? (c[0].cond = "num", t()) : 2 == c.length ? (c[0].cond = {
            op: ">=",
            value: 0
        }, c[1].cond = {
            op: "<",
            value: 0
        }, t()) : c.length >= 3 && (c[0].cond = {
            op: ">",
            value: 0
        }, c[1].cond = {
            op: "<",
            value: 0
        }, c[2].cond = {
            op: "=",
            value: 0
        }, t(), c.length > 3 && (c[3].cond = "text", c = c.slice(0, 4))), c
    }

    function t(e) {
        function t(e) {
            var t = "";
            return e.color && (t += "[" + e.color + "]"), e.cond && "text" != e.cond && "num" != e.cond && (t += "[" + e.cond.op + e.cond.value + "]"), t += e.body.map(i).join("")
        }

        function n(e, t) {
            return t.fraction && (e += "." + a("", t.fraction, "0")), e
        }

        function i(e) {
            return "digit" == e.type ? e.sep ? e.format.charAt(0) + "," + e.format.substr(1) : e.format : "exp" == e.type ? e.ch + e.sign : "date" == e.type || "time" == e.type ? n(a("", e.format, e.part), e) : "eltime" == e.type ? n("[" + a("", e.format, e.part) + "]", e) : "ampm" == e.type ? e.am + "/" + e.pm : "str" == e.type ? JSON.stringify(e.value) : "text" == e.type ? "@" : "space" == e.type ? "_" + e.value : "fill" == e.type ? "*" + e.value : "dec" == e.type ? "." : "percent" == e.type ? "%" : "comma" == e.type ? "," : void 0;
        }
        return e.map(t).join(";")
    }

    function n(e, t) {
        e.forEach(function(e) {
            var n, i, r, o, s, l = t;
            if ("text" != e.cond) {
                for (n = e.body, i = !1, r = n.length; 0 !== l && --r >= 0;)
                    if (o = n[r], "digit" == o.type) {
                        if (o.decimal && (i = !0, l > 0 ? o.format += a("", l, "0") : 0 > l && (s = o.format.length, o.format = o.format.substr(0, s + l), l += s - o.format.length), 0 === o.format.length))
                            for (n.splice(r, 1); --r >= 0;) {
                                if (o = n[r], "digit" == o.type && o.decimal) {
                                    ++r;
                                    break
                                }
                                if ("dec" == o.type) {
                                    n.splice(r, 1);
                                    break
                                }
                            }
                        if (l > 0) break
                    }! i && l > 0 && n.splice(r + 1, 0, {
                    type: "dec"
                }, {
                    type: "digit",
                    sep: !1,
                    decimal: !0,
                    format: a("", l, "0")
                })
            }
        })
    }

    function i(e) {
        var t = 0;
        return {
            next: function() {
                return e[t++]
            },
            eof: function() {
                return t >= e.length
            },
            ahead: function(n, i) {
                if (e.length >= t + n) {
                    var r = i.apply(null, e.slice(t, t + n));
                    return r && (t += n), r
                }
            },
            restart: function() {
                t = 0
            }
        }
    }

    function r(e) {
        function t(e, t) {
            ("digit" == e.type && "comma" == t.type || "comma" == e.type && e.hidden && "comma" == t.type) && (t.hidden = !0, d++)
        }
        var n, r, o = i(e.body),
            a = !1,
            s = !1,
            l = !1,
            c = 0,
            d = 0,
            u = "",
            h = !1,
            f = 0,
            p = [],
            m = [],
            g = e.cond,
            v = "";
        for ("text" == g ? v = "if (typeof value == 'string' || value instanceof kendo.spreadsheet.CalcError) { " : "num" == g ? v = "if (typeof value == 'number') { " : g && (n = "=" == g.op ? "==" : g.op, v = "if (typeof value == 'number' && value " + n + " " + g.value + ") { ", u += "value = Math.abs(value); "), e.color && (u += "result.color = " + JSON.stringify(e.color) + "; "); !o.eof();) o.ahead(2, t), r = o.next(), "percent" == r.type ? c++ : "digit" == r.type ? r.decimal ? (f += r.format.length, m.push(r.format)) : (p.push(r.format), r.sep && (h = !0)) : "time" == r.type ? s = !0 : "date" == r.type ? a = !0 : "ampm" == r.type && (l = s = !0);
        for (c > 0 && (u += "value *= " + Math.pow(100, c) + "; "), d > 0 && (u += "value /= " + Math.pow(1e3, d) + "; "), p.length && (u += "var intPart = runtime.formatInt(culture, value, " + JSON.stringify(p) + ", " + f + ", " + h + "); "), m.length && (u += "var decPart = runtime.formatDec(value, " + JSON.stringify(m) + ", " + f + "); "), (p.length || m.length) && (u += "type = 'number'; "), a && (u += "var date = runtime.unpackDate(value); "), s && (u += "var time = runtime.unpackTime(value); "), (a || s) && (u += "type = 'date'; "), (c > 0 || d > 0 || p.length || m.length || a || s) && (v || (v = "if (typeof value == 'number') { ")), o.restart(); !o.eof();) r = o.next(), "dec" == r.type ? u += "output += culture.numberFormat['.']; " : "comma" != r.type || r.hidden ? "percent" == r.type ? (u += "type = 'percent'; ", u += "output += culture.numberFormat.percent.symbol; ") : "str" == r.type ? u += "output += " + JSON.stringify(r.value) + "; " : "text" == r.type ? (u += "type = 'text'; ", u += "output += value; ") : "space" == r.type ? (u += "if (output) result.body.push(output); ", u += "output = ''; ", u += "result.body.push({ type: 'space', value: " + JSON.stringify(r.value) + " }); ") : "fill" == r.type ? u += "output += runtime.fill(" + JSON.stringify(r.value) + "); " : "digit" == r.type ? u += "output += " + (r.decimal ? "decPart" : "intPart") + ".shift(); " : "date" == r.type ? u += "output += runtime.date(culture, date, " + JSON.stringify(r.part) + ", " + r.format + "); " : "time" == r.type ? u += "output += runtime.time(time, " + JSON.stringify(r.part) + ", " + r.format + ", " + l + ", " + r.fraction + "); " : "eltime" == r.type ? u += "output += runtime.eltime(value, " + JSON.stringify(r.part) + ", " + r.format + ", " + r.fraction + "); " : "ampm" == r.type && (u += "output += time.hours < 12 ? " + JSON.stringify(r.am) + " : " + JSON.stringify(r.pm) + "; ") : u += "output += ','; ";
        return u += "if (output) result.body.push(output); ", u += "result.type = type; ", u += "return result; ", v && (u = v + u + "}"), u
    }

    function o(t) {
        var n, i, o = h[t];
        return o || (n = e(t), i = n.map(r).join("\n"), i = "'use strict'; return function(value, culture){ if (!culture) culture = kendo.culture(); var output = '', type = null, result = { body: [] }; " + i + "; return result; };", o = h[t] = Function("runtime", i)(f)), o
    }

    function a(e, t, n) {
        for (e += ""; t > e.length;) e = n + e;
        return e
    }

    function s(e) {
        var t, n, i = e.body,
            r = "";
        for (t = 0; i.length > t; ++t) n = i[t], "string" == typeof n ? r += n : "space" == n.type && (r += " ");
        return r
    }
    var l, c, d, u, h, f;
    kendo.support.browser.msie && kendo.support.browser.version < 9 || (l = kendo.spreadsheet.calc, c = kendo.dom, d = /^\[(black|green|white|blue|magenta|yellow|cyan|red)\]/i, u = /^\[(<=|>=|<>|<|>|=)(-?[0-9.]+)\]/, h = Object.create(null), f = {
        unpackDate: l.runtime.unpackDate,
        unpackTime: l.runtime.unpackTime,
        date: function(e, t, n, i) {
            switch (n) {
                case "d":
                    switch (i) {
                        case 1:
                            return t.date;
                        case 2:
                            return a(t.date, 2, "0");
                        case 3:
                            return e.calendars.standard.days.namesAbbr[t.day];
                        case 4:
                            return e.calendars.standard.days.names[t.day]
                    }
                    break;
                case "m":
                    switch (i) {
                        case 1:
                            return t.month + 1;
                        case 2:
                            return a(t.month + 1, 2, "0");
                        case 3:
                            return e.calendars.standard.months.namesAbbr[t.month];
                        case 4:
                            return e.calendars.standard.months.names[t.month];
                        case 5:
                            return e.calendars.standard.months.names[t.month].charAt(0)
                    }
                    break;
                case "y":
                    switch (i) {
                        case 2:
                            return t.year % 100;
                        case 4:
                            return t.year
                    }
            }
            return "##"
        },
        time: function(e, t, n, i, r) {
            var o, s;
            switch (t) {
                case "h":
                    o = a(i ? e.hours % 12 || 12 : e.hours, n, "0"), r && (s = (e.minutes + (e.seconds + e.milliseconds / 1e3) / 60) / 60);
                    break;
                case "m":
                    o = a(e.minutes, n, "0"), r && (s = (e.seconds + e.milliseconds / 1e3) / 60);
                    break;
                case "s":
                    o = a(e.seconds, n, "0"), r && (s = e.milliseconds / 1e3)
            }
            return s && (o += s.toFixed(r).replace(/^0+/, "")), o
        },
        eltime: function(e, t, n, i) {
            var r, o;
            switch (t) {
                case "h":
                    r = 24 * e;
                    break;
                case "m":
                    r = 24 * e * 60;
                    break;
                case "s":
                    r = 24 * e * 60 * 60
            }
            return i && (o = r - (0 | r)), r = a(0 | r, n, "0"), o && (r += o.toFixed(i).replace(/^0+/, "")), r
        },
        fill: function(e) {
            return e
        },
        formatInt: function(e, t, n, i, r) {
            function o(t) {
                r && l && l % 3 === 0 && " " != t && (c = e.numberFormat[","] + c), c = t + c, l++
            }
            var a, s, l, c, d, u, h, f;
            for (t = t.toFixed(i).replace(/\..*$/, ""), i > 0 && ("0" === t ? t = "" : "-0" === t && (t = "-")), a = t.length - 1, s = [], l = 0, d = n.length; --d >= 0;) {
                for (u = n[d], c = "", h = u.length; --h >= 0;) f = u.charAt(h), 0 > a ? "0" == f ? o("0") : "?" == f && o(" ") : o(t.charAt(a--));
                if (0 === d)
                    for (; a >= 0;) o(t.charAt(a--));
                s.unshift(c)
            }
            return s
        },
        formatDec: function(e, t, n) {
            var i, r, o, a, s, l, c, d;
            for (e = e.toFixed(n), i = e.indexOf("."), e = i >= 0 ? e.substr(i + 1).replace(/0+$/, "") : "", r = 0, o = [], a = 0; t.length > a; ++a) {
                for (s = t[a], l = "", c = 0; s.length > c; ++c) d = s.charAt(c), e.length > r ? l += e.charAt(r++) : "0" == d ? l += "0" : "?" == d && (l += " ");
                o.push(l)
            }
            return o
        }
    }, kendo.spreadsheet.formatting = {
        compile: o,
        parse: e,
        format: function(e, t, n) {
            var i, r, a, s = o(t)(e, n),
                l = c.element("span");
            for (l.__dataType = s.type, i = s.body, s.color && (l.attr.style = {
                color: s.color
            }), r = 0; i.length > r; ++r) a = i[r], "string" == typeof a ? l.children.push(c.text(a)) : "space" == a.type && l.children.push(c.element("span", {
                style: {
                    visibility: "hidden"
                }
            }, [c.text(a.value)]));
            return l
        },
        text: function(e, t, n) {
            var i = o(t)(e, n);
            return s(i)
        },
        textAndColor: function(e, t, n) {
            var i = o(t)(e, n);
            return {
                text: s(i),
                color: i.color,
                type: i.type
            }
        },
        type: function(e, t) {
            return o(t)(e).type
        },
        adjustDecimals: function(i, r) {
            var o = e(i);
            return n(o, r), t(o)
        }
    })
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/runtime.functions.min", ["spreadsheet/runtime.min", "util/main.min"], e)
}(function() {
    "use strict";

    function e(e) {
        return (Math.exp(e) + Math.exp(-e)) / 2
    }

    function t(e) {
        return (Math.exp(e) - Math.exp(-e)) / 2
    }

    function n(n) {
        return t(n) / e(n)
    }

    function i(e, t) {
        for (; t;) {
            var n = e % t;
            e = t, t = n
        }
        return e
    }

    function r(e, t) {
        return Math.abs(e * t) / i(e, t)
    }

    function o(e, t) {
        for (var n, i, r, o = [], a = 0, s = e[0]; e.length > a;) o.push({
            matrix: e[a++],
            pred: q(e[a++])
        });
        for (n = 0; s.height > n; ++n) e: for (i = 0; s.width > i; ++i) {
            for (a = 0; o.length > a; ++a)
                if (r = o[a].matrix.get(n, i), !o[a].pred(null == r || "" === r ? 0 : r)) continue e;
            t(n, i)
        }
    }

    function a(e) {
        return e.reduce(function(e, t) {
            return e + t
        }, 0) / e.length
    }

    function s(e, t, n) {
        return null == n && (n = a(e)), e.reduce(function(e, t) {
            return e + Math.pow(t - n, 2)
        }, 0) / t
    }

    function l(e, t) {
        return Math.sqrt(s(e, t))
    }

    function c(e, t, n) {
        var i = 0,
            r = 0,
            o = null,
            a = null,
            s = !1;
        return e.forEach(function(e) {
            t > e ? (i++, o = null == o ? e : Math.max(o, e)) : e > t ? (r++, a = null == a ? e : Math.min(a, e)) : s = !0
        }), i || r ? s ? n ? (i + 1) / (e.length + 1) : i / (i + r) : ((a - t) * c(e, o, n) + (t - o) * c(e, a, n)) / (a - o) : new D("N/A")
    }

    function d(e, t, n) {
        var i, r = 0,
            o = a(e),
            s = a(t),
            l = e.length;
        for (i = 0; l > i; ++i) r += (e[i] - o) * (t[i] - s);
        return r / n
    }

    function u(e, t) {
        var n, i, r;
        return e.sort(b), n = e.length, i = 0 | t, r = t - i, 0 === i ? e[0] : i >= n ? e[n - 1] : (--i, e[i] + r * (e[i + 1] - e[i]))
    }

    function h(e, t) {
        var n = t * (e.length - 1) + 1;
        return u(e, n)
    }

    function f(e, t) {
        var n = t * (e.length + 1);
        return u(e, n)
    }

    function p(e, t, n) {
        var i = [],
            r = 1,
            o = 2,
            a = 4;
        return function s(t) {
            if (t instanceof M) e.getRefCells(t, !0).forEach(function(e) {
                var t, s = e.value;
                if (!(n & r && e.hidden)) {
                    if (e.formula) {
                        if (t = e.formula.print(e.row, e.col), /^\s*(?:aggregate|subtotal)\s*\(/i.test(t) && !(n & a)) return;
                        "value" in e.formula && (s = e.formula.value)
                    }
                    n & o && s instanceof D || ("number" == typeof s || s instanceof D) && i.push(s)
                }
            });
            else if (Array.isArray(t))
                for (var l = 0; t.length > l; ++l) s(t[l]);
            else t instanceof I ? t.each(s) : "number" == typeof t ? i.push(t) : t instanceof D && !(n & o) && i.push(t)
        }(t), i
    }

    function m(e, t, n, i) {
        var r, o;
        if (i) {
            for (r = 0, o = 0; e >= o; ++o) r += U(t, o) * Math.pow(n, o) * Math.pow(1 - n, t - o);
            return r
        }
        return U(t, e) * Math.pow(n, e) * Math.pow(1 - n, t - e)
    }

    function g(e) {
        var t = z(P(e, 0, 1));
        return 4 == t.day || 3 == t.day && C.isLeapYear(e) ? 53 : 52
    }

    function v(e, t, n) {
        var i = z(e),
            r = z(t);
        return n ? (31 == i.date && (i.date = 30), 31 == r.date && (r.date = 30)) : (1 == i.month && 1 == r.month && i.date == R(i.year, 1) && r.date == R(r.year, 1) && (r.date = 30), i.date == R(i.year, i.month) ? (i.date = 30, 31 == r.date && (r.date = 30)) : 30 == i.date && 31 == r.date && (r.date = 30)), 360 * (r.year - i.year) + 30 * (r.month - i.month) + (r.date - i.date)
    }

    function _(e) {
        return "number" == typeof e || "boolean" == typeof e || null == e || "" === e
    }

    function b(e, t) {
        return e === t ? 0 : t > e ? -1 : 1
    }

    function w(e, t) {
        return e === t ? 0 : t > e ? 1 : -1
    }
    var y, k, x, C, S, T, D, A, E, F, I, M, R, P, z, B, L, H, N, O, V, U, W, j, q;
    kendo.support.browser.msie && kendo.support.browser.version < 9 || (y = kendo.util, k = kendo.spreadsheet, x = k.calc, C = x.runtime, S = C.defineFunction, T = C.defineAlias, D = C.CalcError, A = k.RangeRef, E = k.CellRef, F = k.UnionRef, I = C.Matrix, M = k.Ref, R = C.daysInMonth, P = C.packDate, z = C.unpackDate, B = C.daysInYear, ["abs", "cos", "sin", "acos", "asin", "tan", "atan", "exp", "sqrt"].forEach(function(e) {
        S(e, Math[e]).args([
            ["*n", "number"]
        ])
    }), S("ln", Math.log).args([
        ["*n", "number"]
    ]), S("log", function(e, t) {
        return Math.log(e) / Math.log(t)
    }).args([
        ["*num", "number++"],
        ["*base", ["or", "number++", ["null", 10]]],
        ["?", ["assert", "$base != 1", "DIV/0"]]
    ]), S("log10", function(e) {
        return Math.log(e) / Math.log(10)
    }).args([
        ["*num", "number++"]
    ]), S("pi", function() {
        return Math.PI
    }).args([]), S("sqrtpi", function(e) {
        return Math.sqrt(e * Math.PI)
    }).args([
        ["*num", "number+"]
    ]), S("degrees", function(e) {
        return 180 * e / Math.PI % 360
    }).args([
        ["*radians", "number"]
    ]), S("radians", function(e) {
        return Math.PI * e / 180
    }).args([
        ["*degrees", "number"]
    ]), S("cosh", e).args([
        ["*num", "number"]
    ]), S("acosh", function(e) {
        return Math.log(e + Math.sqrt(e - 1) * Math.sqrt(e + 1))
    }).args([
        ["*num", "number"],
        ["?", ["assert", "$num >= 1"]]
    ]), S("sinh", t).args([
        ["*num", "number"]
    ]), S("asinh", function(e) {
        return Math.log(e + Math.sqrt(e * e + 1))
    }).args([
        ["*num", "number"]
    ]), S("sec", function(e) {
        return 1 / Math.cos(e)
    }).args([
        ["*num", "number"]
    ]), S("sech", function(t) {
        return 1 / e(t)
    }).args([
        ["*num", "number"]
    ]), S("csc", function(e) {
        return 1 / Math.sin(e)
    }).args([
        ["*num", "number"]
    ]), S("csch", function(e) {
        return 1 / t(e)
    }).args([
        ["*num", "number"]
    ]), S("atan2", function(e, t) {
        return Math.atan(t / e)
    }).args([
        ["*x", "divisor"],
        ["*y", "number"]
    ]), S("tanh", n).args([
        ["*num", "number"]
    ]), S("atanh", function(e) {
        return Math.log(Math.sqrt(1 - e * e) / (1 - e))
    }).args([
        ["*num", ["and", "number", ["(between)", -1, 1]]]
    ]), S("cot", function(e) {
        return 1 / Math.tan(e)
    }).args([
        ["*num", "divisor"]
    ]), S("coth", function(e) {
        return 1 / n(e)
    }).args([
        ["*num", "divisor"]
    ]), S("acot", function(e) {
        return Math.PI / 2 - Math.atan(e)
    }).args([
        ["*num", "number"]
    ]), S("acoth", function(e) {
        return Math.log((e + 1) / (e - 1)) / 2
    }).args([
        ["*num", "number"],
        ["?", ["or", ["assert", "$num < -1"],
            ["assert", "$num > 1"]
        ]]
    ]), S("power", function(e, t) {
        return Math.pow(e, t)
    }).args([
        ["*a", "number"],
        ["*b", "number"]
    ]), S("mod", function(e, t) {
        return e % t
    }).args([
        ["*a", "number"],
        ["*b", "divisor"]
    ]), S("quotient", function(e, t) {
        return Math.floor(e / t)
    }).args([
        ["*a", "number"],
        ["*b", "divisor"]
    ]), S("ceiling", function(e, t) {
        return t ? t * Math.ceil(e / t) : 0
    }).args([
        ["*number", "number"],
        ["*significance", "number"],
        ["?", ["assert", "$significance >= 0 || $number < 0"]]
    ]), S("ceiling.precise", function(e, t) {
        return t = Math.abs(t), t ? t * Math.ceil(e / t) : 0
    }).args([
        ["*number", "number"],
        ["*significance", ["or", "number", ["null", 1]]]
    ]), T("iso.ceiling", "ceiling.precise"), S("ceiling.math", function(e, t, n) {
        return t && e ? (0 > e && (!n && 0 > t || n && t > 0) && (t = -t), t ? t * Math.ceil(e / t) : 0) : 0
    }).args([
        ["*number", "number"],
        ["*significance", ["or", "number", ["null", "$number < 0 ? -1 : 1"]]],
        ["*mode", ["or", "logical", ["null", 0]]]
    ]), S("floor", function(e, t) {
        return t ? t * Math.floor(e / t) : 0
    }).args([
        ["*number", "number"],
        ["*significance", "number"],
        ["?", ["assert", "$significance >= 0 || $number < 0"]]
    ]), S("floor.precise", function(e, t) {
        return t = Math.abs(t), t ? t * Math.floor(e / t) : 0
    }).args([
        ["*number", "number"],
        ["*significance", ["or", "number", ["null", 1]]]
    ]), S("floor.math", function(e, t, n) {
        return t && e ? (0 > e && (!n && 0 > t || n && t > 0) && (t = -t), t ? t * Math.floor(e / t) : 0) : 0
    }).args([
        ["*number", "number"],
        ["*significance", ["or", "number", ["null", "$number < 0 ? -1 : 1"]]],
        ["*mode", ["or", "logical", ["null", 0]]]
    ]), S("int", Math.floor).args([
        ["*number", "number"]
    ]), S("mround", function(e, t) {
        return t ? t * Math.round(e / t) : 0
    }).args([
        ["*number", "number"],
        ["*multiple", "number"]
    ]), S("round", function(e, t) {
        var n = 0 > e ? -1 : 1;
        return 0 > n && (e = -e), t = Math.pow(10, t), e *= t, e = Math.round(e), n * e / t
    }).args([
        ["*number", "number"],
        ["*digits", "number"]
    ]), S("roundup", function(e, t) {
        return t = Math.pow(10, t), e *= t, e = 0 > e ? Math.floor(e) : Math.ceil(e), e / t
    }).args([
        ["*number", "number"],
        ["*digits", "number"]
    ]), S("rounddown", function(e, t) {
        return t = Math.pow(10, t), e *= t, e = 0 > e ? Math.ceil(e) : Math.floor(e), e / t
    }).args([
        ["*number", "number"],
        ["*digits", "number"]
    ]), S("even", function(e) {
        var t = 0 > e ? Math.floor(e) : Math.ceil(e);
        return t % 2 ? t + (0 > t ? -1 : 1) : t
    }).args([
        ["*number", "number"]
    ]), S("odd", function(e) {
        var t = 0 > e ? Math.floor(e) : Math.ceil(e);
        return t % 2 ? t : t + (0 > t ? -1 : 1)
    }).args([
        ["*number", "number"]
    ]), S("sign", function(e) {
        return 0 > e ? -1 : e > 0 ? 1 : 0
    }).args([
        ["*number", "number"]
    ]), S("gcd", function(e) {
        var t, n = e[0];
        for (t = 1; e.length > t; ++t) n = i(n, e[t]);
        return n
    }).args([
        ["numbers", ["collect", "number"]]
    ]), S("lcm", function(e) {
        var t, n = e[0];
        for (t = 1; e.length > t; ++t) n = r(n, e[t]);
        return n
    }).args([
        ["numbers", ["collect", "number"]]
    ]), S("sum", function(e) {
        return e.reduce(function(e, t) {
            return e + t
        }, 0)
    }).args([
        ["numbers", ["collect", "number"]]
    ]), S("product", function(e) {
        return e.reduce(function(e, t) {
            return e * t
        }, 1)
    }).args([
        ["numbers", ["collect", "number"]]
    ]), S("sumproduct", function(e, t) {
        var n = 0;
        return e.each(function(e, i, r) {
            var o, a;
            if ("number" == typeof e) {
                for (o = 0; t.length > o; ++o) {
                    if (a = t[o].get(i, r), "number" != typeof a) return;
                    e *= a
                }
                n += e
            }
        }), n
    }).args([
        ["a1", "matrix"],
        ["+", ["a2", ["and", "matrix", ["assert", "$a2.width == $a1.width"],
            ["assert", "$a2.height == $a1.height"]
        ]]]
    ]), S("sumsq", function(e) {
        return e.reduce(function(e, t) {
            return e + t * t
        }, 0)
    }).args([
        ["numbers", ["collect", "number"]]
    ]), S("sumx2my2", function(e, t) {
        var n = 0;
        return e.each(function(e, i, r) {
            var o = t.get(i, r);
            "number" == typeof e && "number" == typeof o && (n += e * e - o * o)
        }), n
    }).args([
        ["a", "matrix"],
        ["b", ["and", "matrix", ["assert", "$b.width == $a.width"],
            ["assert", "$b.height == $a.height"]
        ]]
    ]), S("sumx2py2", function(e, t) {
        var n = 0;
        return e.each(function(e, i, r) {
            var o = t.get(i, r);
            "number" == typeof e && "number" == typeof o && (n += e * e + o * o)
        }), n
    }).args([
        ["a", "matrix"],
        ["b", ["and", "matrix", ["assert", "$b.width == $a.width"],
            ["assert", "$b.height == $a.height"]
        ]]
    ]), S("sumxmy2", function(e, t) {
        var n = 0;
        return e.each(function(e, i, r) {
            var o = t.get(i, r);
            "number" == typeof e && "number" == typeof o && (n += (e - o) * (e - o))
        }), n
    }).args([
        ["a", "matrix"],
        ["b", ["and", "matrix", ["assert", "$b.width == $a.width"],
            ["assert", "$b.height == $a.height"]
        ]]
    ]), S("seriessum", function(e, t, n, i) {
        var r = 0;
        return i.each(function(i) {
            if ("number" != typeof i) throw new D("VALUE");
            r += i * Math.pow(e, t), t += n
        }), r
    }).args([
        ["x", "number"],
        ["y", "number"],
        ["m", "number"],
        ["a", "matrix"]
    ]), S("min", function(e) {
        return Math.min.apply(Math, e)
    }).args([
        ["numbers", ["collect", "number"]],
        ["?", ["assert", "$numbers.length > 0", "N/A"]]
    ]), S("max", function(e) {
        return Math.max.apply(Math, e)
    }).args([
        ["numbers", ["collect", "number"]],
        ["?", ["assert", "$numbers.length > 0", "N/A"]]
    ]), S("counta", function(e) {
        return e.length
    }).args([
        ["values", ["#collect", "anyvalue"]]
    ]), S("count", function(e) {
        return e.length
    }).args([
        ["numbers", ["#collect", "number"]]
    ]), S("countunique", function(e) {
        var t = 0,
            n = [];
        return e.forEach(function(e) {
            n.indexOf(e) < 0 && (t++, n.push(e))
        }), t
    }).args([
        ["values", ["#collect", "anyvalue"]]
    ]), S("countblank", function(e) {
        function t(e) {
            (null == e || "" === e) && i++
        }

        function n(e) {
            var n, i;
            for (n = 0; e.length > n; ++n) i = e[n], i instanceof I ? i.each(t, !0) : t(i)
        }
        var i = 0;
        return n(e), i
    }).args([
        ["+", ["args", ["or", "matrix", "anyvalue"]]]
    ]), S("iseven", function(e) {
        return e % 2 === 0
    }).args([
        ["*number", "number"]
    ]), S("isodd", function(e) {
        return e % 2 !== 0
    }).args([
        ["*number", "number"]
    ]), S("n", function(e) {
        return "boolean" == typeof e ? e ? 1 : 0 : "number" == typeof e ? e : 0
    }).args([
        ["*value", "anyvalue"]
    ]), S("na", function() {
        return new D("N/A")
    }).args([]), L = [
        ["m1", "matrix"],
        ["c1", "anyvalue"],
        [
            ["m2", ["and", "matrix", ["assert", "$m1.width == $m2.width"],
                ["assert", "$m1.height == $m2.height"]
            ]],
            ["c2", "anyvalue"]
        ]
    ], S("countifs", function(e, t, n) {
        var i = 0;
        return n.unshift(e, t), o(n, function() {
            i++
        }), i
    }).args(L), H = [
        ["range", "matrix"]
    ].concat(L), S("sumifs", function(e, t, n, i) {
        i.unshift(e, _, t, n);
        var r = 0;
        return o(i, function(t, n) {
            var i = e.get(t, n);
            i && (r += i)
        }), r
    }).args(H), S("averageifs", function(e, t, n, i) {
        i.unshift(e, _, t, n);
        var r = 0,
            a = 0;
        return o(i, function(t, n) {
            var i = e.get(t, n);
            (null == i || "" === i) && (i = 0), r += i, a++
        }), a ? r / a : new D("DIV/0")
    }).args(H), S("countif", function(e, t) {
        t = q(t);
        var n = 0;
        return e.each(function(e) {
            t(e) && n++
        }), n
    }).args([
        ["range", "matrix"],
        ["*criteria", "anyvalue"]
    ]), N = [
        ["range", "matrix"],
        ["*criteria", "anyvalue"],
        ["sumRange", ["or", ["and", "matrix", ["assert", "$sumRange.width == $range.width"],
            ["assert", "$sumRange.height == $range.height"]
        ],
            ["null", "$range"]
        ]]
    ], S("sumif", function(e, t, n) {
        var i = 0;
        return t = q(t), e.each(function(e, r, o) {
            if (t(e)) {
                var a = n.get(r, o);
                _(a) && (i += a || 0)
            }
        }), i
    }).args(N), S("averageif", function(e, t, n) {
        var i = 0,
            r = 0;
        return t = q(t), e.each(function(e, o, a) {
            if (t(e)) {
                var s = n.get(o, a);
                _(s) && (i += s || 0, r++)
            }
        }), r ? i / r : new D("DIV/0")
    }).args(N), function(e) {
        e("large", function(e, t) {
            return e.sort(w)[t]
        }), e("small", function(e, t) {
            return e.sort(b)[t]
        })
    }(function(e, t) {
        S(e, function(e, n) {
            var i = [],
                r = e.each(function(e) {
                    return e instanceof D ? e : void("number" == typeof e && i.push(e))
                });
            return r ? r : n > i.length ? new D("NUM") : t(i, n - 1)
        }).args([
            ["array", "matrix"],
            ["*nth", "number++"]
        ])
    }), S("stdev.s", function(e) {
        return l(e, e.length - 1)
    }).args([
        ["numbers", ["collect", "number"]],
        ["?", ["assert", "$numbers.length >= 2", "NUM"]]
    ]), S("stdev.p", function(e) {
        return l(e, e.length)
    }).args([
        ["numbers", ["collect", "number"]],
        ["?", ["assert", "$numbers.length >= 2", "NUM"]]
    ]), S("var.s", function(e) {
        return s(e, e.length - 1)
    }).args([
        ["numbers", ["collect", "number"]],
        ["?", ["assert", "$numbers.length >= 2", "NUM"]]
    ]), S("var.p", function(e) {
        return s(e, e.length)
    }).args([
        ["numbers", ["collect", "number"]],
        ["?", ["assert", "$numbers.length >= 2", "NUM"]]
    ]), S("median", function(e) {
        var t = e.length;
        return e.sort(b), t % 2 ? e[t >> 1] : (e[t >> 1] + e[t >> 2]) / 2
    }).args([
        ["numbers", ["collect", "number"]],
        ["?", ["assert", "$numbers.length > 0", "N/A"]]
    ]), S("mode.sngl", function(e) {
        var t, n, i, r, o, a;
        for (e.sort(b), t = null, n = 0, i = 1, r = null, o = 0; e.length > o; ++o) a = e[o], a != t ? (n = 1, t = a) : n++, n > i && (i = n, r = a);
        return null == r ? new D("N/A") : r
    }).args([
        ["numbers", ["collect", "number"]]
    ]), S("mode.mult", function(e) {
        var t, n = Object.create(null),
            i = 2,
            r = [];
        return e.forEach(function(e) {
            var t = n[e] || 0;
            n[e] = ++t, t == i ? r.push(e) : t > i && (i = t, r = [e])
        }), t = new I(this), r.forEach(function(e, n) {
            t.set(n, 0, e)
        }), t
    }).args([
        ["numbers", ["collect", "number"]]
    ]), S("geomean", function(e) {
        var t = e.length,
            n = e.reduce(function(e, t) {
                if (0 > t) throw new D("NUM");
                return e * t
            }, 1);
        return Math.pow(n, 1 / t)
    }).args([
        ["numbers", ["collect", "number"]],
        ["?", ["assert", "$numbers.length > 0", "NUM"]]
    ]), S("harmean", function(e) {
        var t = e.length,
            n = e.reduce(function(e, t) {
                if (!t) throw new D("DIV/0");
                return e + 1 / t
            }, 0);
        return t / n
    }).args([
        ["numbers", ["collect", "number"]],
        ["?", ["assert", "$numbers.length > 0", "NUM"]]
    ]), S("trimmean", function(e, t) {
        var n, i, r, o = e.length;
        for (e.sort(b), n = Math.floor(o * t), n % 2 && --n, n /= 2, i = 0, r = n; o - n > r; ++r) i += e[r];
        return i / (o - 2 * n)
    }).args([
        ["numbers", ["collect", "number", 1]],
        ["percent", ["and", "number", ["[between)", 0, 1]]],
        ["?", ["assert", "$numbers.length > 0", "NUM"]]
    ]), S("frequency", function(e, t) {
        function n(t) {
            for (var n = 0; e.length > r && e[r] > i && t >= e[r];) ++n, ++r;
            return n
        }
        var i, r, o;
        return e.sort(b), t.sort(b), i = -(1 / 0), r = 0, o = new I(this), t.forEach(function(e, t) {
            var r = n(e);
            i = e, o.set(t, 0, r)
        }), o.set(o.height, 0, e.length - r), o
    }).args([
        ["data", ["collect", "number", 1]],
        ["bins", ["collect", "number", 1]]
    ]), S("rank.eq", function(e, t, n) {
        t.sort(n ? b : w);
        var i = t.indexOf(e);
        return 0 > i ? new D("N/A") : i + 1
    }).args([
        ["value", "number"],
        ["numbers", ["collect", "number"]],
        ["order", ["or", "logical", ["null", !1]]]
    ]), T("rank", "rank.eq"), S("rank.avg", function(e, t, n) {
        var i, r;
        if (t.sort(n ? b : w), i = t.indexOf(e), 0 > i) return new D("N/A");
        for (r = i; t[r] == e; ++r);
        return (i + r + 1) / 2
    }).args([
        ["value", "number"],
        ["numbers", ["collect", "number"]],
        ["order", ["or", "logical", ["null", !1]]]
    ]), S("kurt", function(e) {
        var t = e.length,
            n = a(e),
            i = s(e, t - 1, n),
            r = Math.sqrt(i),
            o = e.reduce(function(e, t) {
                return e + Math.pow((t - n) / r, 4)
            }, 0);
        return t * (t + 1) / ((t - 1) * (t - 2) * (t - 3)) * o - 3 * Math.pow(t - 1, 2) / ((t - 2) * (t - 3))
    }).args([
        ["numbers", ["collect", "number"]],
        ["?", ["assert", "$numbers.length >= 4", "NUM"]]
    ]), O = [
        ["array", ["collect", "number", 1]],
        ["x", "number"],
        ["significance", ["or", ["null", 3], "integer++"]],
        ["?", ["assert", "$array.length > 0", "NUM"]]
    ], S("percentrank.inc", function(e, t, n) {
        var i = c(e, t, 0);
        return i = i.toFixed(n + 1), parseFloat(i.substr(0, i.length - 1))
    }).args(O), S("percentrank.exc", function(e, t, n) {
        var i = c(e, t, 1);
        return i = i.toFixed(n + 1), parseFloat(i.substr(0, i.length - 1))
    }).args(O), T("percentrank", "percentrank.inc"), S("covariance.p", function(e, t) {
        return d(e, t, e.length)
    }).args([
        ["array1", ["collect", "number", 1]],
        ["array2", ["collect", "number", 1]],
        ["?", ["assert", "$array1.length == $array2.length", "N/A"]],
        ["?", ["assert", "$array1.length > 0", "DIV/0"]]
    ]), S("covariance.s", function(e, t) {
        return d(e, t, e.length - 1)
    }).args([
        ["array1", ["collect", "number", 1]],
        ["array2", ["collect", "number", 1]],
        ["?", ["assert", "$array1.length == $array2.length", "N/A"]],
        ["?", ["assert", "$array1.length > 1", "DIV/0"]]
    ]), T("covar", "covariance.p"), V = y.memoize(function(e) {
        for (var t = 2, n = 1; e >= t; ++t) n *= t;
        return n
    }), S("fact", V).args([
        ["*n", "integer+"]
    ]), S("factdouble", function(e) {
        for (var t = 2 + (1 & e), n = 1; e >= t; t += 2) n *= t;
        return n
    }).args([
        ["*n", "integer+"]
    ]), S("multinomial", function(e) {
        var t = 1,
            n = 0;
        return e.forEach(function(e) {
            if (0 > e) throw new D("NUM");
            n += e, t *= V(e)
        }), V(n) / t
    }).args([
        ["numbers", ["collect", "number"]]
    ]), U = y.memoize(function(e, t) {
        for (var n = t + 1, i = 1, r = 1, o = 1; e - t >= i; ++n, ++i) r *= n, o *= i;
        return r / o
    }), S("combin", U).args([
        ["*n", "integer++"],
        ["*k", ["and", "integer", ["[between]", 0, "$n"]]]
    ]), S("combina", function(e, t) {
        return U(e + t - 1, e - 1)
    }).args([
        ["*n", "integer++"],
        ["*k", ["and", "integer", ["[between]", 1, "$n"]]]
    ]), S("average", function(e) {
        var t = e.reduce(function(e, t) {
            return e + t
        }, 0);
        return t / e.length
    }).args([
        ["numbers", ["collect", ["and", "number", ["not", "boolean"]]]],
        ["?", ["assert", "$numbers.length > 0", "DIV/0"]]
    ]), S("averagea", function(e) {
        var t = 0,
            n = 0;
        return e.forEach(function(e) {
            "string" != typeof e && (t += e), ++n
        }), n ? t / n : new D("DIV/0")
    }).args([
        ["values", ["collect", "anyvalue"]]
    ]), S("percentile.inc", h).args([
        ["numbers", ["collect", "number", 1]],
        ["p", ["and", "number", ["[between]", 0, 1]]]
    ]), S("percentile.exc", f).args([
        ["numbers", ["collect", "number", 1]],
        ["p", ["and", "number", ["(between)", 0, 1]]]
    ]), S("quartile.inc", function(e, t) {
        return h(e, t / 4)
    }).args([
        ["numbers", ["collect", "number", 1]],
        ["quarter", ["values", 0, 1, 2, 3, 4]]
    ]), S("quartile.exc", function(e, t) {
        return f(e, t / 4)
    }).args([
        ["numbers", ["collect", "number", 1]],
        ["quarter", ["values", 0, 1, 2, 3, 4]]
    ]), T("quartile", "quartile.inc"), T("percentile", "percentile.inc"), W = ["AVERAGE", "COUNT", "COUNTA", "MAX", "MIN", "PRODUCT", "STDEV.S", "STDEV.P", "SUM", "VAR.S", "VAR.P", "MEDIAN", "MODE.SNGL", "LARGE", "SMALL", "PERCENTILE.INC", "QUARTILE.INC", "PERCENTILE.EXC", "QUARTILE.EXC"], S("aggregate", function(e, t, n, i) {
        var r = this;
        r.resolveCells(i, function() {
            var o, a;
            if (t > 12) {
                if (o = p(r, i[0], n), a = i[1], a instanceof E && (a = r.getRefData(a)), "number" != typeof a) return e(new D("VALUE"))
            } else o = p(r, i, n);
            r.func(W[t - 1], e, o)
        })
    }).argsAsync([
        ["funcId", ["values", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]],
        ["options", ["or", ["null", 0],
            ["values", 0, 1, 2, 3, 4, 5, 6, 7]
        ]],
        ["args", "rest"]
    ]), S("subtotal", function(e, t) {
        var n, i, r = this,
            o = t > 100;
        for (o && (t -= 100), n = [], i = 2; i < arguments.length; ++i) n.push(arguments[i]);
        r.resolveCells(n, function() {
            var i = p(r, n, o ? 1 : 0);
            r.func(W[t - 1], e, i)
        })
    }).argsAsync([
        ["funcId", ["values", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111]],
        ["+", ["ref", ["or", "ref", "#matrix"]]]
    ]), S("avedev", function(e) {
        var t = e.reduce(function(e, t) {
            return e + t
        }, 0) / e.length;
        return e.reduce(function(e, n) {
            return e + Math.abs(n - t)
        }, 0) / e.length
    }).args([
        ["numbers", ["collect", "number"]],
        ["?", ["assert", "$numbers.length >= 2", "NUM"]]
    ]), S("binom.dist", m).args([
        ["successes", "integer+"],
        ["trials", ["and", "integer", ["assert", "$trials >= $successes"]]],
        ["probability", ["and", "number", ["[between]", 0, 1]]],
        ["cumulative", "logical"]
    ]), T("binomdist", "binom.dist"), S("binom.inv", function(e, t, n) {
        for (var i = 0; e >= i; ++i)
            if (m(i, e, t, !0) >= n) return i;
        return new D("N/A")
    }).args([
        ["trials", "integer+"],
        ["probability", ["and", "number", ["[between]", 0, 1]]],
        ["alpha", ["and", "number", ["[between]", 0, 1]]]
    ]), T("critbinom", "binom.inv"), S("binom.dist.range", function(e, t, n, i) {
        var r, o = 0;
        for (r = n; i >= r; ++r) o += U(e, r) * Math.pow(t, r) * Math.pow(1 - t, e - r);
        return o
    }).args([
        ["trials", "integer+"],
        ["probability", ["and", "number", ["[between]", 0, 1]]],
        ["successes_min", ["and", "integer", ["[between]", 0, "$trials"]]],
        ["successes_max", ["or", ["and", "integer", ["[between]", "$successes_min", "$trials"]],
            ["null", "$successes_min"]
        ]]
    ]), S("negbinom.dist", function(e, t, n, i) {
        if (i) {
            for (var r = 0; e >= 0;) r += U(e + t - 1, e) * Math.pow(n, t) * Math.pow(1 - n, e), e--;
            return r
        }
        return U(e + t - 1, e) * Math.pow(n, t) * Math.pow(1 - n, e)
    }).args([
        ["number_f", "integer+"],
        ["number_s", "integer+"],
        ["probability_s", ["and", "number", ["[between]", 0, 1]]],
        ["cumulative", "logical"]
    ]), T("negbinomdist", "negbinom.dist"), S("address", function(e, t, n, i, r) {
        var o = new E(e - 1, t - 1, n - 1);
        return r && o.setSheet(r, !0), i ? o.print(0, 0) : o.print()
    }).args([
        ["row", "integer++"],
        ["col", "integer++"],
        ["abs", ["or", ["null", 1],
            ["values", 1, 2, 3, 4]
        ]],
        ["a1", ["or", ["null", !0], "logical"]],
        ["sheet", ["or", "null", "string"]]
    ]), S("areas", function(e) {
        var t = 0;
        return function n(e) {
            e instanceof E || e instanceof A ? t++ : e instanceof F && e.refs.forEach(n)
        }(e), t
    }).args([
        ["ref", "ref"]
    ]), S("choose", function(e, t) {
        return e > t.length ? new D("N/A") : t[e - 1]
    }).args([
        ["*index", "integer"],
        ["+", ["value", "anything"]]
    ]), S("column", function(e) {
        return e ? e instanceof E ? e.col + 1 : this.asMatrix(e).mapCol(function(t) {
            return t + e.topLeft.col + 1
        }) : this.formula.col + 1
    }).args([
        ["ref", ["or", "area", "null"]]
    ]), S("columns", function(e) {
        return e instanceof M ? e.width() : e.width
    }).args([
        ["ref", ["or", "area", "#matrix"]]
    ]), S("formulatext", function(e) {
        var t = this.getRefCells(e)[0];
        return t.formula ? t.formula.print(t.row, t.col) : new D("N/A")
    }).args([
        ["ref", "ref"]
    ]), S("hlookup", function(e, t, n, i) {
        var r = null;
        return t.eachCol(function(n) {
            var o = t.get(0, n);
            if (i) {
                if (o > e) return !0;
                r = n
            } else if (o === e) return r = n, !0
        }), null == r ? new D("N/A") : t.get(n - 1, r)
    }).args([
        ["value", "anyvalue"],
        ["range", "matrix"],
        ["row", "integer++"],
        ["approx", ["or", "logical", ["null", !0]]]
    ]), S("index", function(e, t, n, i) {
        var r = e instanceof F ? e.refs[i - 1] : e;
        if (!t && !n || !r) return new D("N/A");
        if (r = this.asMatrix(r), r.width > 1 && r.height > 1) {
            if (t && n) return r.get(t - 1, n - 1);
            if (!t) return r.mapRow(function(e) {
                return r.get(e, n - 1)
            });
            if (!n) return r.mapCol(function(e) {
                return r.get(t - 1, e)
            })
        }
        return 1 == r.width ? r.get(t - 1, 0) : 1 == r.height ? r.get(0, n - 1) : new D("REF")
    }).args([
        ["range", ["or", "matrix", "ref"]],
        ["row", ["or", "integer+", "null"]],
        ["col", ["or", "integer+", "null"]],
        ["areanum", ["or", "integer++", ["null", 1]]]
    ]), S("indirect", function(e) {
        var t, n;
        try {
            if (t = this.formula, n = x.parseFormula(t.sheet, t.row, t.col, e), !(n.ast instanceof M)) throw 1;
            return n.ast.absolute(t.row, t.col)
        } catch (i) {
            return new D("REF")
        }
    }).args([
        ["thing", "string"]
    ]), S("match", function(e, t, n) {
        var i, r = 1;
        return 0 === n ? i = q(e) : -1 === n ? i = q("<=" + e) : 1 === n && (i = q(">=" + e)), t.each(function(t) {
            return null != t && i(t) ? (0 !== n && e != t && --r, !0) : void r++
        }, !0) && r > 0 ? r : new D("N/A")
    }).args([
        ["value", "anyvalue"],
        ["range", "matrix"],
        ["type", ["or", ["values", -1, 0, 1],
            ["null", 1]
        ]]
    ]), S("offset", function(e, t, n, i, r) {
        var o = (e instanceof E ? e : e.topLeft).clone();
        return o.row += t, o.col += n, 0 > o.row || 0 > o.col ? new D("VALUE") : i > 1 || r > 1 ? new A(o, new E(o.row + i - 1, o.col + r - 1)).setSheet(e.sheet, e.hasSheet()) : o
    }).args([
        ["ref", "area"],
        ["*rows", "integer"],
        ["*cols", "integer"],
        ["*height", ["or", "integer++", ["null", "$ref.height()"]]],
        ["*width", ["or", "integer++", ["null", "$ref.width()"]]]
    ]), S("row", function(e) {
        return e ? e instanceof E ? e.row + 1 : this.asMatrix(e).mapRow(function(t) {
            return t + e.topLeft.row + 1
        }) : this.formula.row + 1
    }).args([
        ["ref", ["or", "area", "null"]]
    ]), S("rows", function(e) {
        return e instanceof M ? e.height() : e.height
    }).args([
        ["ref", ["or", "area", "#matrix"]]
    ]), S("vlookup", function(e, t, n, i) {
        var r = null;
        return t.eachRow(function(n) {
            var o = t.get(n, 0);
            if (i) {
                if (o > e) return !0;
                r = n
            } else if (o === e) return r = n, !0
        }), null == r ? new D("N/A") : t.get(r, n - 1)
    }).args([
        ["value", "anyvalue"],
        ["range", "matrix"],
        ["col", "integer++"],
        ["approx", ["or", "logical", ["null", !0]]]
    ]), S("date", function(e, t, n) {
        return P(e, t - 1, n)
    }).args([
        ["*year", "integer"],
        ["*month", "integer"],
        ["*date", "integer"]
    ]), S("day", function(e) {
        return z(e).date
    }).args([
        ["*date", "date"]
    ]), S("month", function(e) {
        return z(e).month + 1
    }).args([
        ["*date", "date"]
    ]), S("year", function(e) {
        return z(e).year
    }).args([
        ["*date", "date"]
    ]), S("weekday", function(e) {
        return z(e).day + 1
    }).args([
        ["*date", "date"]
    ]), S("weeknum", function(e, t) {
        var n, i = P(z(e).year, 0, 1),
            r = z(i);
        return 21 == t ? (n = 3 - (r.day + 6) % 7, 0 > n && (n += 7), i += n, r.date += n, r.day = 4, t = 1) : t = 1 == t ? 0 : 2 == t ? 1 : (t - 10) % 7, n = r.day - t, 0 > n && (n += 7), i -= n, Math.ceil((e + 1 - i) / 7)
    }).args([
        ["*date", "date"],
        ["*type", ["or", ["null", 1],
            ["values", 1, 2, 11, 12, 13, 14, 15, 16, 17, 21]
        ]]
    ]), S("isoweeknum", function(e) {
        var t = z(e),
            n = t.day || 7,
            i = Math.floor((t.ord - n + 10) / 7);
        return 1 > i ? g(t.year - 1) : 53 == i && i > g(t.year) ? 1 : i
    }).args([
        ["*date", "date"]
    ]), S("now", function() {
        return C.dateToSerial(new Date)
    }).args([]), S("today", function() {
        return 0 | C.dateToSerial(new Date)
    }).args([]), S("time", function(e, t, n) {
        return C.packTime(e, t, n, 0)
    }).args([
        ["*hours", "integer"],
        ["*minutes", "integer"],
        ["*seconds", "integer"]
    ]), S("hour", function(e) {
        return C.unpackTime(e).hours
    }).args([
        ["*time", "datetime"]
    ]), S("minute", function(e) {
        return C.unpackTime(e).minutes
    }).args([
        ["*time", "datetime"]
    ]), S("second", function(e) {
        return C.unpackTime(e).seconds
    }).args([
        ["*time", "datetime"]
    ]), S("edate", function(e, t) {
        var n = z(e),
            i = n.month + t,
            r = n.year + Math.floor(i / 12);
        return i %= 12, 0 > i && (i += 12), n = Math.min(n.date, R(r, i)), P(r, i, n)
    }).args([
        ["*start_date", "date"],
        ["*months", "integer"]
    ]), S("eomonth", function(e, t) {
        var n = z(e),
            i = n.month + t,
            r = n.year + Math.floor(i / 12);
        return i %= 12, 0 > i && (i += 12), n = R(r, i), P(r, i, n)
    }).args([
        ["*start_date", "date"],
        ["*months", "integer"]
    ]), S("workday", function(e, t, n) {
        var i, r = t > 0 ? 1 : -1;
        for (t = Math.abs(t), i = z(e).day; t > 0;) e += r, i = (i + r) % 7, i > 0 && 6 > i && n.indexOf(e) < 0 && --t;
        return e
    }).args([
        ["start_date", "date"],
        ["days", "integer"],
        ["holidays", ["collect", "date"]]
    ]), S("networkdays", function(e, t, n) {
        var i, r, o;
        for (e > t && (i = e, e = t, t = i), r = 0, o = z(e).day; t >= e;) o > 0 && 6 > o && n.indexOf(e) < 0 && r++, e++, o = (o + 1) % 7;
        return r
    }).args([
        ["start_date", "date"],
        ["end_date", "date"],
        ["holidays", ["collect", "date"]]
    ]), S("days", function(e, t) {
        return t - e
    }).args([
        ["*start_date", "date"],
        ["*end_date", "date"]
    ]), C._days_360 = v, S("days360", v).args([
        ["*start_date", "date"],
        ["*end_date", "date"],
        ["*method", ["or", "logical", ["null", "false"]]]
    ]), S("yearfrac", function(e, t, n) {
        switch (n) {
            case 0:
                return v(e, t, !1) / 360;
            case 1:
                return (t - e) / B(z(e).year);
            case 2:
                return (t - e) / 360;
            case 3:
                return (t - e) / 365;
            case 4:
                return v(e, t, !0) / 360
        }
    }).args([
        ["*start_date", "date"],
        ["*end_date", "date"],
        ["*method", ["or", ["null", 0],
            ["values", 0, 1, 2, 3, 4]
        ]]
    ]), S("datevalue", function(e) {
        var t = C.parseDate(e);
        return t ? C.dateToSerial(t) : new D("VALUE")
    }).args([
        ["*text", "string"]
    ]), S("timevalue", function(e) {
        var t, n, i, r, o = e.toLowerCase().match(/(\d+):(\d+)(:(\d+)(\.(\d+))?)?\s*(am?|pm?)?/);
        return o ? (t = parseFloat(o[1]), n = parseFloat(o[2]), i = o[3] ? parseFloat(o[4]) : 0, r = o[7], r && (t > 12 || 1 > t) ? new D("VALUE") : (/^p/.test(r) && (t += 12), C.packTime(t, n, i, 0))) : new D("VALUE");
    }).args([
        ["*text", "string"]
    ]), S("mdeterm", function(e) {
        var t = e.each(function(e) {
            return "number" != typeof e ? new D("VALUE") : void 0
        }, !0);
        return t || e.determinant()
    }).args([
        ["m", ["and", "matrix", ["assert", "$m.width == $m.height"]]]
    ]), S("transpose", function(e) {
        return e.transpose()
    }).args([
        ["range", "matrix"]
    ]), S("mmult", function(e, t) {
        return e.multiply(t)
    }).args([
        ["a", "matrix"],
        ["b", ["and", "matrix", ["assert", "$b.height == $a.width"]]]
    ]), S("munit", function(e) {
        return new I(this).unit(e)
    }).args([
        ["n", "integer+"]
    ]), S("minverse", function(e) {
        var t = e.each(function(e) {
            return "number" != typeof e ? new D("VALUE") : void 0
        }, !0);
        return t || e.inverse() || new D("VALUE")
    }).args([
        ["m", ["and", "matrix", ["assert", "$m.width == $m.height"]]]
    ]), S("rand", function() {
        return Math.random()
    }).args([]), S("randbetween", function(e, t) {
        return e + Math.floor((t - e + 1) * Math.random())
    }).args([
        ["min", "integer"],
        ["max", ["and", "integer", ["assert", "$max >= $min"]]]
    ]), S("true", function() {
        return !0
    }).args([]), S("false", function() {
        return !0
    }).args([]), S("roman", function(e) {
        return y.arabicToRoman(e).toUpperCase()
    }).args([
        ["*number", "integer"]
    ]), S("arabic", function(e) {
        var t = y.romanToArabic(e);
        return null == t ? new D("VALUE") : t
    }).args([
        ["*roman", "string"]
    ]), S("base", function(e, t, n) {
        for (var i = e.toString(t).toUpperCase(); n > i.length;) i = "0" + i;
        return i
    }).args([
        ["*number", "integer"],
        ["*radix", ["and", "integer", ["[between]", 2, 36]]],
        ["*minLen", ["or", "integer+", ["null", 0]]]
    ]), S("decimal", function(e, t) {
        var n, i, r;
        for (e = e.toUpperCase(), n = 0, i = 0; e.length > i; ++i) {
            if (r = e.charCodeAt(i), r >= 48 && 57 >= r) r -= 48;
            else {
                if (!(r >= 65 && 55 + t > r)) return new D("VALUE");
                r -= 55
            }
            n = n * t + r
        }
        return n
    }).args([
        ["*text", "string"],
        ["*radix", ["and", "integer", ["[between]", 2, 36]]]
    ]), S("char", function(e) {
        return String.fromCharCode(e)
    }).args([
        ["*code", "integer+"]
    ]), j = /[\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g, S("clean", function(e) {
        return e.replace(j, "")
    }).args([
        ["*text", "string"]
    ]), S("code", function(e) {
        return e.charAt(0)
    }).args([
        ["*text", "string"]
    ]), T("unichar", "char"), T("unicode", "code"), S("concatenate", function() {
        var e, t = "";
        for (e = 0; e < arguments.length; ++e) t += arguments[e];
        return t
    }).args([
        ["+", ["*text", "string"]]
    ]), S("dollar", function(e, t) {
        for (var n = "$#,##0.DECIMALS;($#,##0.DECIMALS)", i = ""; t-- > 0;) i += "0";
        return n = n.replace(/DECIMALS/g, i), k.formatting.text(e, n)
    }).args([
        ["*number", "number"],
        ["*decimals", ["or", "integer++", ["null", 2]]]
    ]), S("exact", function(e, t) {
        return e === t
    }).args([
        ["*text1", "string"],
        ["*text2", "string"]
    ]), S("find", function(e, t, n) {
        var i = t.indexOf(e, n - 1);
        return 0 > i ? new D("VALUE") : i + 1
    }).args([
        ["*substring", "string"],
        ["*string", "string"],
        ["*start", ["or", "integer++", ["null", 1]]]
    ]), S("fixed", function(e, t, n) {
        for (var i = n ? "0.DECIMALS" : "#,##0.DECIMALS", r = ""; t-- > 0;) r += "0";
        return i = i.replace(/DECIMALS/g, r), k.formatting.text(e, i)
    }).args([
        ["*number", "number"],
        ["*decimals", ["or", "integer++", ["null", 2]]],
        ["*noCommas", ["or", "boolean", ["null", !1]]]
    ]), S("left", function(e, t) {
        return e.substr(0, t)
    }).args([
        ["*text", "string"],
        ["*length", ["or", "integer+", ["null", 1]]]
    ]), S("right", function(e, t) {
        return e.substr(-t)
    }).args([
        ["*text", "string"],
        ["*length", ["or", "integer+", ["null", 1]]]
    ]), S("len", function(e) {
        return e.length
    }).args([
        ["*text", "string"]
    ]), S("lower", function(e) {
        return e.toLowerCase()
    }).args([
        ["*text", "string"]
    ]), S("upper", function(e) {
        return e.toUpperCase()
    }).args([
        ["*text", "string"]
    ]), S("ltrim", function(e) {
        return e.replace(/^\s+/, "")
    }).args([
        ["*text", "string"]
    ]), S("rtrim", function(e) {
        return e.replace(/\s+$/, "")
    }).args([
        ["*text", "string"]
    ]), S("trim", function(e) {
        return e.replace(/^\s+|\s+$/, "")
    }).args([
        ["*text", "string"]
    ]), S("mid", function(e, t, n) {
        return e.substr(t - 1, n)
    }).args([
        ["*text", "string"],
        ["*start", "integer++"],
        ["*length", "integer+"]
    ]), S("proper", function(e) {
        return e.toLowerCase().replace(/\b./g, function(e) {
            return e.toUpperCase()
        })
    }).args([
        ["*text", "string"]
    ]), S("replace", function(e, t, n, i) {
        return e.substr(0, --t) + i + e.substr(t + n)
    }).args([
        ["*text", "string"],
        ["*start", "integer++"],
        ["*length", "integer+"],
        ["*newText", "string"]
    ]), S("rept", function(e, t) {
        for (var n = ""; t-- > 0;) n += e;
        return n
    }).args([
        ["*text", "string"],
        ["*number", "integer+"]
    ]), S("search", function(e, t, n) {
        var i = t.toLowerCase().indexOf(e.toLowerCase(), n - 1);
        return 0 > i ? new D("VALUE") : i + 1
    }).args([
        ["*substring", "string"],
        ["*string", "string"],
        ["*start", ["or", "integer++", ["null", 1]]]
    ]), S("substitute", function(e, t, n, i) {
        function r() {
            e = e.substring(0, o) + n + e.substring(o + t.length)
        }
        if (t === n) return e;
        for (var o = -1;
             (o = e.indexOf(t, o + 1)) >= 0;)
            if (null == i) r();
            else if (0 === --i) {
                r();
                break
            }
        return e
    }).args([
        ["*text", "string"],
        ["*oldText", "string"],
        ["*newText", "string"],
        ["*nth", ["or", "integer++", "null"]]
    ]), S("t", function(e) {
        return "string" == typeof e ? e : ""
    }).args([
        ["*value", "anyvalue"]
    ]), S("text", function(e, t) {
        return k.formatting.text(e, t)
    }).args([
        ["*value", "anyvalue"],
        ["*format", "string"]
    ]), S("value", function(e) {
        return "number" == typeof e ? e : "boolean" == typeof e ? +e : (e = (e + "").replace(/[$€,]/g, ""), e = parseFloat(e), isNaN(e) ? new D("VALUE") : e)
    }).args([
        ["*value", "anyvalue"]
    ]), S("iferror", function(e, t) {
        return e instanceof D ? t : e
    }).args([
        ["*value", "forced!"],
        ["*value_if_error", "anyvalue"]
    ]), q = function() {
        function e(e, t) {
            if ("string" == typeof t) {
                var n = parseFloat(t);
                isNaN(n) || n != t || (t = n)
            }
            return function(n) {
                var i = t;
                return "string" == typeof n && "string" == typeof i && (n = n.toLowerCase(), i = i.toLowerCase()), e(n, i)
            }
        }

        function t(e) {
            return "string" == typeof e ? e.toLowerCase() : e
        }

        function n(e, n) {
            return t(e) < t(n)
        }

        function i(e, n) {
            return t(e) <= t(n)
        }

        function r(e, n) {
            return t(e) > t(n)
        }

        function o(e, n) {
            return t(e) >= t(n)
        }

        function a(e, n) {
            return t(e) != t(n)
        }

        function s(e, n) {
            return n instanceof RegExp ? n.test(e) : t(e) == t(n)
        }
        var l = Object.create(null);
        return function(t) {
            var c, d;
            return "function" == typeof t ? t : (c = /^=(.*)$/.exec(t)) ? e(s, c[1]) : (c = /^<>(.*)$/.exec(t)) ? e(a, c[1]) : (c = /^<=(.*)$/.exec(t)) ? e(i, c[1]) : (c = /^<(.*)$/.exec(t)) ? e(n, c[1]) : (c = /^>=(.*)$/.exec(t)) ? e(o, c[1]) : (c = /^>(.*)$/.exec(t)) ? e(r, c[1]) : /[?*]/.exec(t) ? (d = l[t], d || (d = t.replace(/(~\?|~\*|[\]({\+\.\|\^\$\\})\[]|[?*])/g, function(e) {
                switch (e) {
                    case "~?":
                        return "\\?";
                    case "~*":
                        return "\\*";
                    case "?":
                        return ".";
                    case "*":
                        return ".*";
                    default:
                        return "\\" + e
                }
            }), d = l[t] = RegExp("^" + d + "$", "i")), e(s, d)) : e(s, t)
        }
    }())
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/runtime.functions.2.min", ["spreadsheet/runtime.min"], e)
}(function() {
    "use strict";

    function e(e) {
        var n, i, r, o;
        if (ct(e) >= 3.3) return 1 - t(e);
        for (n = e > 0 ? 1 : -1, -1 == n && (e = -e), i = 0, r = 1, o = 1; 100 > o; o++) i += r, r *= 2 * e * e / (2 * o + 1);
        return 2 * n / Math.sqrt(Math.PI) * e * Math.exp(-e * e) * i
    }

    function t(t) {
        var n, i, r;
        if (ct(t) < 3.3) return 1 - e(t);
        for (n = 1, 0 > t && (n = -1, t = -t), i = t, r = 8; r >= 1; r -= .5) i = t + r / i;
        return i = 1 / (t + i), 1 == n ? Math.exp(-t * t) / Math.sqrt(Math.PI) * i : 2 - Math.exp(-t * t) / Math.sqrt(Math.PI) * i
    }

    function n(e) {
        var t, n = [1.000000000190015, 76.18009172947146, -86.50532032941678, 24.01409824083091, -1.231739572450155, .001208650973866179, -5395239384953e-18],
            i = e,
            r = e + 5.5,
            o = n[0];
        for (r -= (e + .5) * Math.log(r), t = 1; 6 >= t; t++) i += 1, o += n[t] / i;
        return -r + Math.log(Math.sqrt(2 * Math.PI) * o / e)
    }

    function i(e) {
        if (e > 0) return Math.exp(n(e));
        var t = Math.PI,
            r = -e;
        return -t / (r * i(r) * Math.sin(t * r))
    }

    function r(e, t) {
        return n(e) + n(t) - n(e + t)
    }

    function o(e, t) {
        return Math.exp(r(e, t))
    }

    function a(e, t) {
        return e + 1 > t ? s(e, t) : 1 - l(e, t)
    }

    function s(e, t) {
        var i, r = 1 / e,
            o = r,
            a = e,
            s = n(e);
        for (i = 1; at >= i && (a++, o *= t / a, r += o, !(ct(o) < ct(r) * st)); i++);
        return r * Math.exp(-t + e * Math.log(t) - s)
    }

    function l(e, t) {
        var i, r, o = lt,
            a = o,
            s = 0,
            l = 1,
            c = t + 1 - e,
            d = n(e);
        for (i = 1; at >= i && (s = c + l * s, ct(s) < lt && (s = lt), a = c + l / a, ct(a) < lt && (a = lt), s = 1 / s, r = a * s, o *= r, !(ct(r - 1) < st)); i++) c += 2, l = -i * (i - e);
        return o * Math.exp(-t - d + e * Math.log(t))
    }

    function c(e, t, n, r) {
        return r ? a(t, e / n) : Math.pow(e / n, t - 1) * Math.exp(-e / n) / (n * i(t))
    }

    function d(e, t, n) {
        var i, r, o, a, s, l;
        if (0 === e) return 0;
        if (1 == e) return 1 / 0;
        for (i = 0, r = 10, o = 0, a = t * n, a > 1 && (r *= a), s = 0; at > s && (o = .5 * (i + r), l = c(o, t, n, !0), !(ct(e - l) < 1e-16)); s++) l > e ? r = o : i = o;
        return o
    }

    function u(t, n) {
        return n ? .5 + .5 * e(t / Math.sqrt(2)) : Math.exp(-t * t / 2) / Math.sqrt(2 * Math.PI)
    }

    function h(e) {
        var t, n, i = [-39.69683028665376, 220.9460984245205, -275.9285104469687, 138.357751867269, -30.66479806614716, 2.506628277459239],
            r = [-54.47609879822406, 161.5858368580409, -155.6989798598866, 66.80131188771972, -13.28068155288572],
            o = [-.007784894002430293, -.3223964580411365, -2.400758277161838, -2.549732539343734, 4.374664141464968, 2.938163982698783],
            a = [.007784695709041462, .3224671290700398, 2.445134137142996, 3.754408661907416],
            s = .02425,
            l = 1 - s;
        return s > e ? (t = Math.sqrt(-2 * Math.log(e)), (((((o[0] * t + o[1]) * t + o[2]) * t + o[3]) * t + o[4]) * t + o[5]) / ((((a[0] * t + a[1]) * t + a[2]) * t + a[3]) * t + 1)) : e > l ? (t = Math.sqrt(-2 * Math.log(1 - e)), -(((((o[0] * t + o[1]) * t + o[2]) * t + o[3]) * t + o[4]) * t + o[5]) / ((((a[0] * t + a[1]) * t + a[2]) * t + a[3]) * t + 1)) : (t = e - .5, n = t * t, (((((i[0] * n + i[1]) * n + i[2]) * n + i[3]) * n + i[4]) * n + i[5]) * t / (((((r[0] * n + r[1]) * n + r[2]) * n + r[3]) * n + r[4]) * n + 1))
    }

    function f(e, t, n, i) {
        return i ? u((e - t) / n, !0) : Math.exp(-(e - t) * (e - t) / (2 * n * n)) / (n * Math.sqrt(2 * Math.PI))
    }

    function p(e, t, n) {
        return t + n * h(e)
    }

    function m(e, t, n) {
        return Math.exp((t - 1) * Math.log(e) + (n - 1) * Math.log(1 - e) - r(t, n))
    }

    function g(e, t, n) {
        var i = Math.exp(t * Math.log(e) + n * Math.log(1 - e) - r(t, n));
        return (t + 1) / (t + n + 2) > e ? i * v(t, n, e) / t : 1 - i * v(n, t, 1 - e) / n
    }

    function v(e, t, n) {
        var i, r, o, a, s, l = e + t,
            c = e + 1,
            d = e - 1,
            u = 1,
            h = 1 - l * n / c;
        for (ct(h) < lt && (h = lt), h = 1 / h, s = h, i = 1; at >= i && (r = 2 * i, o = i * (t - i) * n / ((d + r) * (e + r)), h = 1 + o * h, ct(h) < lt && (h = lt), u = 1 + o / u, ct(u) < lt && (u = lt), h = 1 / h, s *= h * u, o = -(e + i) * (l + i) * n / ((e + r) * (c + r)), h = 1 + o * h, ct(h) < lt && (h = lt), u = 1 + o / u, ct(u) < lt && (u = lt), h = 1 / h, a = h * u, s *= a, !(ct(a - 1) < st)); i++);
        return s
    }

    function _(e, t, n) {
        var i, r, o = 0,
            a = 1,
            s = 0;
        for (i = 0; at > i && (s = .5 * (o + a), r = g(s, t, n), !(ct(e - r) < st)); i++) r > e ? a = s : o = s;
        return s
    }

    function b(e, t, n, i, r) {
        return g((e - i) / (r - i), t, n)
    }

    function w(e, t, n, i, r, o) {
        return i ? g((e - r) / (o - r), t, n) : m((e - r) / (o - r), t, n) / (o - r)
    }

    function y(e, t, n, i, r) {
        return i + (r - i) * _(e, t, n)
    }

    function k(e, t, n) {
        return c(e, t / 2, 2, n)
    }

    function x(e, t) {
        return 1 - k(e, t, !0)
    }

    function C(e, t) {
        return d(e, t / 2, 2)
    }

    function S(e, t) {
        return C(1 - e, t)
    }

    function T(e, t) {
        var n, i, r, o, a, s = e.length,
            l = e[0].length,
            c = 0;
        for (n = 0; s > n; n++)
            for (i = 0; l > i; i++) r = t[n][i], o = e[n][i] - r, o *= o, c += o / r;
        return a = (s - 1) * (l - 1), x(c, a)
    }

    function D(e, t, n) {
        return n ? 1 - Math.exp(-t * e) : t * Math.exp(-t * e)
    }

    function A(e, t, n) {
        var i, r;
        if (n) return 1 - k(2 * t, 2 * (e + 1), !0);
        for (i = 0, r = 2; e >= r; r++) i += Math.log(r);
        return Math.exp(e * Math.log(t) - t - i)
    }

    function E(e, t, n, i) {
        if (i) return g(t * e / (n + t * e), t / 2, n / 2);
        var r = t / n;
        return t /= 2, n /= 2, r / o(t, n) * Math.pow(r * e, t - 1) / Math.pow(1 + r * e, t + n)
    }

    function F(e, t, n) {
        return 1 - E(e, t, n, !0)
    }

    function I(e, t, n) {
        return n / t * (1 / y(e, n / 2, t / 2, 0, 1) - 1)
    }

    function M(e, t, n) {
        return n / t * (1 / y(1 - e, n / 2, t / 2, 0, 1) - 1)
    }

    function R(e) {
        var t, n = 0,
            i = e.length;
        for (t = 0; i > t; t++) n += e[t];
        return n / i
    }

    function P(e, t) {
        var n, i, r = 0,
            o = e.length;
        for (n = 0; o > n; n++) i = e[n] - t, r += i * i;
        return r / (o - 1)
    }

    function z(e, t) {
        var n = e.length - 1,
            i = t.length - 1,
            r = P(e, R(e)),
            o = P(t, R(t));
        if (!r || !o) throw new Ze("DIV/0");
        return 2 * E(r / o, n, i, !0)
    }

    function B(e) {
        return .5 * Math.log((1 + e) / (1 - e))
    }

    function L(e) {
        var t = Math.exp(2 * e);
        return (t - 1) / (t + 1)
    }

    function H(e, t, n) {
        return n ? 1 - .5 * g(t / (e * e + t), t / 2, .5) : 1 / (Math.sqrt(t) * o(.5, t / 2)) * Math.pow(1 + e * e / t, -(t + 1) / 2)
    }

    function N(e, t) {
        return 1 - H(e, t, !0)
    }

    function O(e, t) {
        return 0 > e && (e = -e), 2 * N(e, t)
    }

    function V(e, t) {
        var n = _(2 * Math.min(e, 1 - e), t / 2, .5);
        return n = Math.sqrt(t * (1 - n) / n), e > .5 ? n : -n
    }

    function U(e, t) {
        return V(1 - e / 2, t)
    }

    function W(e, t, n, i) {
        var r, o, a, s, l, c, d, u, h, f, p, m, g, v, _, b, w = e.length,
            y = t.length;
        if (1 == i) {
            for (a = 0, s = 0, l = 0; w > l; l++) c = e[l] - t[l], a += c, s += c * c;
            return d = a / w, r = d / Math.sqrt((s - a * d) / (w * (w - 1))), 1 == n ? N(r, w - 1) : O(r, w - 1)
        }
        return u = R(e), h = R(t), f = P(e, u), p = P(t, h), 3 == i ? (m = f / w, g = p / y, v = m + g, _ = m / v, b = g / v, o = 1 / (_ * _ / (w - 1) + b * b / (y - 1)), r = ct(u - h) / Math.sqrt(v), 1 == n ? N(r, o) : O(r, o)) : (o = w + y - 2, r = ct(u - h) * Math.sqrt(o * w * y / ((w + y) * ((w - 1) * f + (y - 1) * p))), 1 == n ? N(r, o) : O(r, o))
    }

    function j(e, t, n) {
        return -V(e / 2, n - 1) * t / Math.sqrt(n)
    }

    function q(e, t, n) {
        return -h(e / 2) * t / Math.sqrt(n)
    }

    function G(e) {
        return u(e, !0) - .5
    }

    function $(e) {
        return u(e)
    }

    function Y(t, n, i, r) {
        if (r) return .5 + .5 * e((Math.log(t) - n) / (i * Math.sqrt(2)));
        var o = Math.log(t) - n;
        return Math.exp(-o * o / (2 * i * i)) / (t * i * Math.sqrt(2 * Math.PI))
    }

    function K(e, t, n) {
        return Math.exp(p(e, t, n))
    }

    function Q(e, t, n, i) {
        var r, o, a, s = e.length,
            l = 0;
        for (r = 0; s > r; r++) {
            if (0 >= t[r] || t[r] > 1) throw new Ze("NUM");
            l += t[r]
        }
        if (1 != l) throw new Ze("NUM");
        for (o = 0, r = 0; s > r; r++) a = e[r], a >= n && i >= a && (o += t[r]);
        return o
    }

    function X(e, t) {
        var n, i, r, o = R(t),
            a = R(e),
            s = 0,
            l = 0;
        for (n = 0, i = e.length; i > n; n++) r = t[n] - o, s += r * (e[n] - a), l += r * r;
        return s / l
    }

    function J(e, t) {
        var n, i, r, o = R(t),
            a = R(e),
            s = 0,
            l = 0;
        for (n = 0, i = e.length; i > n; n++) r = t[n] - o, s += r * (e[n] - a), l += r * r;
        return a - s * o / l
    }

    function Z(e, t) {
        var n, i, r, o, a = R(e),
            s = R(t),
            l = 0,
            c = 0,
            d = 0;
        for (n = 0, i = e.length; i > n; n++) r = e[n] - a, o = t[n] - s, l += r * o, c += r * r, d += o * o;
        return l / Math.sqrt(c * d)
    }

    function ee(e, t) {
        var n = Z(e, t);
        return n * n
    }

    function te(e, t) {
        var n, i, r, o = t.length,
            a = R(t),
            s = R(e),
            l = 0,
            c = 0,
            d = 0;
        for (n = 0; o > n; n++) i = t[n] - a, r = e[n] - s, l += r * r, c += i * r, d += i * i;
        return Math.sqrt((l - c * c / d) / (o - 2))
    }

    function ne(e, t, n) {
        var i, r, o, a, s, l, c = R(n),
            d = R(t),
            u = 0,
            h = 0;
        for (i = 0, r = n.length; r > i; i++) o = n[i] - c, a = t[i] - d, u += o * a, h += o * o;
        if (0 === h) throw new Ze("N/A");
        return s = u / h, l = d - s * c, l + s * e
    }

    function ie(e) {
        var t, n = e.height,
            i = 0;
        for (t = 0; n > t; t++) i += e.data[t][0];
        return i / n
    }

    function re(e, t) {
        var n, i, r = e.height,
            o = 0;
        for (n = 0; r > n; n++) i = e.data[n][0] - t, o += i * i;
        return o
    }

    function oe(e, t, n, i) {
        var r, o, a, s, l, c, d, u, h, f, p, m, g, v, _, b, w, y, k = 0;
        for (t || (t = e.map(function() {
            return ++k
        })), n && (t = t.clone(), t.eachRow(function(e) {
            t.data[e].unshift(1)
        }), ++t.width), r = t.transpose(), o = r.multiply(t).inverse().multiply(r).multiply(e), a = [], k = o.height - 1; k >= 0; k--) a.push(o.data[k][0]);
        if (n || a.push(0), !i) return this.asMatrix([a]);
        for (s = t.multiply(o), l = e.adds(s, !0), c = n ? ie(s) : 0, d = re(s, c), u = n ? ie(l) : 0, h = re(l, u), f = [], f.push(d, h), p = d / (d + h), m = e.height - t.width, g = Math.sqrt(h / m), v = [], v.push(p, g), _ = n ? d / (t.width - 1) / (h / m) : p / t.width / ((1 - p) / m), b = [], b.push(_, m), w = r.multiply(t).inverse(), y = [], k = w.height - 1; k >= 0; k--) y.push(Math.sqrt(w.data[k][k] * h / m));
        return this.asMatrix([a, y, v, b, f])
    }

    function ae(e, t, n, i) {
        return oe.call(this, e.map(Math.log), t, n, i).map(Math.exp)
    }

    function se(e, t, n, i) {
        var r, o, a = 0;
        return t || (t = e.map(function() {
            return ++a
        })), i && (t = t.clone(), t.eachRow(function(e) {
            t.data[e].unshift(1)
        }), ++t.width), r = t.transpose(), o = r.multiply(t).inverse().multiply(r).multiply(e), n ? i && (n = n.clone(), n.eachRow(function(e) {
            n.data[e].unshift(1)
        }), ++n.width) : n = t, n.multiply(o)
    }

    function le(e, t, n, i) {
        return se.call(this, e.map(Math.log), t, n, i).map(Math.exp)
    }

    function ce(e, t, n, i) {
        var r, o, a, s, l, c = n || 20,
            d = i || 1e-7,
            u = t;
        for (r = 1; c >= r; r++)
            if (o = e(u), a = o[0], s = o[1], l = a / s, u -= l, Math.abs(l) < d) return u;
        return new Ze("NUM")
    }

    function de(e, t, n, i, r) {
        var o = Math.pow(1 + e, t),
            a = e ? (o - 1) / e : t;
        return -(i * o + n * a * (1 + e * r))
    }

    function ue(e, t, n, i, r) {
        if (!e) return -i - n * t;
        var o = Math.pow(1 + e, t);
        return -(i + n * (o - 1) / e * (1 + e * r)) / o
    }

    function he(e, t, n, i, r) {
        if (!e) return -(i + n) / t;
        var o = Math.pow(1 + e, t);
        return -e * (i + n * o) / ((1 + e * r) * (o - 1))
    }

    function fe(e, t, n, i, r) {
        if (!e) return -(i + n) / t;
        var o = t * (1 + e * r);
        return Math.log((o - i * e) / (o + n * e)) / Math.log(1 + e)
    }

    function pe(e, t, n, i, r, o) {
        function a(o) {
            var a = Math.pow(1 + o, e - 1),
                s = a * (1 + o);
            return [n * s + t * (1 / o + r) * (s - 1) + i, e * n * a + t * (-(s - 1) / (o * o) + (1 / o + r) * e * a)]
        }
        return ce(a, o)
    }

    function me(e, t, n, i, r, o) {
        var a, s;
        return 1 == o && 1 == t ? 0 : (a = he(e, n, i, r, o), s = de(e, t - 1, a, i, o) * e, o ? s / (1 + e) : s)
    }

    function ge(e, t, n, i, r, o) {
        var a = he(e, n, i, r, o);
        return a - me(e, t, n, i, r, o)
    }

    function ve(e, t, n, i, r, o) {
        var a, s, l, c, d, u;
        return 1 == o && (i--, r--), a = Math.pow(1 + e, t), s = Math.pow(1 + e, i - 1), l = Math.pow(1 + e, r), c = e * n * a / (a - 1), d = s * n - (s - 1) / e * c, u = l * n - (l - 1) / e * c, u - d
    }

    function _e(e, t, n, i, r, o) {
        var a, s = 0;
        for (a = i; r >= a; a++) s += me(e, a, t, n, 0, o);
        return s
    }

    function be(e, t) {
        var n, i, r = 0;
        for (n = 0, i = t.length; i > n; n++) r += t[n] * Math.pow(1 + e, -n - 1);
        return r
    }

    function we(e, t) {
        function n(t) {
            var n, i, r = 0,
                o = 0;
            for (n = 0, i = e.length; i > n; n++) r += e[n] * Math.pow(1 + t, -n - 1), o += -n * e[n] * Math.pow(1 + t, -n - 2);
            return [r, o]
        }
        return ce(n, t)
    }

    function ye(e, t) {
        return Math.pow(1 + e / t, t) - 1
    }

    function ke(e, t) {
        return t * (Math.pow(e + 1, 1 / t) - 1)
    }

    function xe(e, t, n) {
        var i, r, o = 0;
        for (i = 0, r = t.length; r > i; i++) o += t[i] * Math.pow(1 + e, (n[0] - n[i]) / 365);
        return o
    }

    function Ce(e, t, n) {
        function i(n) {
            var i, r, o, a = e[0],
                s = 0;
            for (i = 1, r = e.length; r > i; i++) o = (t[0] - t[i]) / 365, a += e[i] * Math.pow(1 + n, o), s += o * e[i] * Math.pow(1 + n, o - 1);
            return [a, s]
        }
        return ce(i, n)
    }

    function Se(e, t, n, i) {
        var r = -i * e;
        return r * (1 - t / n)
    }

    function Te(e, t, n, i, r) {
        var o, a, s = 1 - Math.pow(t / e, 1 / n);
        if (s = Math.floor(1e3 * s + .5) / 1e3, o = e * s * r / 12, 1 == i) return o;
        for (a = 1; n > a; a++) {
            if (a == i - 1) return (e - o) * s;
            o += (e - o) * s
        }
        return (e - o) * s * (12 - r) / 12
    }

    function De(e, t, n, i, r) {
        var o = r / n,
            a = -e * (Math.pow(1 - o, i - 1) - 1),
            s = (e - a) * o;
        return s = Math.min(s, Math.max(0, e - a - t))
    }

    function Ae(e, t, n) {
        return (e - t) / n
    }

    function Ee(e, t, n, i) {
        return (e - t) * (n - i + 1) * 2 / (n * (n + 1))
    }

    function Fe(e, t, n, i, r, o, a) {
        function s(e, n) {
            var i, r, o;
            return r = 1 == f ? 1 == n ? e : 0 : e * Math.pow(1 - f, n - 1), o = e * Math.pow(1 - f, n), i = t > o ? r - t : r - o, 0 > i ? 0 : i
        }

        function l(e, n, i) {
            var r, o, a, l = e - t,
                c = Math.ceil(i),
                d = 0,
                u = 0,
                h = !1;
            for (o = 1; c >= o; o++) h ? r = d : (a = s(e, o), d = l / (n - o + 1), d > a ? (r = d, h = !0) : (r = a, l -= a)), o == c && (r *= i + 1 - c), u += r;
            return u
        }
        var c, d, u, h, f = o >= n ? 1 : o / n,
            p = Math.floor(i),
            m = Math.ceil(r),
            g = 0;
        if (a)
            for (c = p + 1; m >= c; c++) d = s(e, c), c == p + 1 ? d *= Math.min(r, p + 1) - i : c == m && (d *= r + 1 - m), g += d;
        else u = n, i != Math.floor(i) && o > 1 && i >= n / 2 && (h = i - n / 2, i = n / 2, r -= h, u += 1), e -= l(e, u, i), g = l(e, n - i, r - i);
        return g
    }

    function Ie(e, t) {
        var n = tt(e),
            i = n.month + t,
            r = n.year + Math.floor(i / 12);
        return i %= 12, 0 > i && (i += 12), n = Math.min(n.date, it(r, i)), et(r, i, n)
    }

    function Me(e, t, n) {
        return 1 == n || 2 == n || 3 == n ? t - e : rt(e, t, n)
    }

    function Re(e, t, n) {
        var i, r, o, a = tt(e),
            s = tt(t),
            l = s.year - a.year;
        l > 0 && (l = (l - 1) * n), o = 12 / n;
        do l++, i = Ie(t, -l * o); while (i > e);
        return l--, r = Ie(t, -l * o), [i, r]
    }

    function Pe(e, t, n) {
        var i, r, o, a = tt(t),
            s = tt(e),
            l = a.year - s.year;
        for (l > 0 && (l = (l - 1) * n), i = e, o = 12 / n; t > i;) r = i, l++, i = Ie(e, l * o);
        return [r, i]
    }

    function ze(e, t, n, i) {
        var r = Re(e, t, n)[0];
        return Me(r, e, i)
    }

    function Be(e, t, n, i) {
        if (1 == i) {
            var r = Re(e, t, n);
            return Me(r[0], r[1], 1)
        }
        return 3 == i ? 365 / n : 360 / n
    }

    function Le(e, t, n, i) {
        var r = Re(e, t, n)[1];
        return Me(e, r, i)
    }

    function He(e, t, n) {
        return Re(e, t, n)[0]
    }

    function Ne(e, t, n) {
        return Re(e, t, n)[1]
    }

    function Oe(e, t, n) {
        var i = tt(e),
            r = tt(t),
            o = 12 * (r.year - i.year) + r.month - i.month;
        return 1 + (o * n / 12 | 0)
    }

    function Ve(e, t) {
        return 3 == t ? 365 : 1 == t ? nt(e) ? 366 : 365 : 360
    }

    function Ue(e, t, n, i, r) {
        var o = Ve(tt(t).year, r);
        return n * i * Me(e, t, r) / o
    }

    function We(e, t, n, i, r, o, a, s) {
        function l(e, t) {
            return (t - e) * o / v | 0
        }
        var c, d, u, h, f, p, m = 0,
            g = r * i / o,
            v = a % 2 === 0 ? 360 : 365;
        return t >= n ? (c = Re(n, t, o), d = c[0], u = c[1], e >= d ? g * Me(e, n, a) / Me(d, u, a) : (c = Re(e, d, o), h = c[0], f = c[1], p = l(f, n), g * (p + Me(e, f, a) / Me(h, f, a) + (u > n ? Me(d, n, a) / Me(d, u, a) : 0)))) : (c = Pe(t, n, o), d = c[0], u = c[1], p = l(t, n), m = u == n ? g * p : g * (p + Me(d, n, a) / Me(d, u, a)), s ? (c = Re(e, t, o), d = c[0], u = c[1], p = l(e, t), m += g * (p + Me(e, u, a) / Me(d, u, a))) : m)
    }

    function je(e, t, n, i, r) {
        var o = r % 2 === 0 ? 360 : nt(tt(e).year) ? 366 : 365;
        return (i - n) / i * o / Me(e, t, r)
    }

    function qe(e, t, n, i, r) {
        var o = r % 2 === 0 ? 360 : nt(tt(e).year) ? 366 : 365;
        return (i - n) / n * o / Me(e, t, r)
    }

    function Ge(e, t, n, i, r) {
        var o = r % 2 === 0 ? 360 : nt(tt(e).year) ? 366 : 365;
        return n / (1 - i * Me(e, t, r) / o)
    }

    function $e(e, t, n, i, r, o, a) {
        var s = 1 + ((t - e) * o / (a % 2 === 0 ? 360 : 365) | 0),
            l = Re(e, t, o),
            c = l[0],
            d = l[1],
            u = Me(c, e, a),
            h = Me(e, d, a),
            f = Me(c, d, a),
            p = 100 * n / o,
            m = i / o,
            g = h / f;
        return 1 == s ? (r + p) / (1 + g * m) - u / f * p : r / Math.pow(1 + m, s - 1 + g) + p * Math.pow(1 + m, 1 - s - g) * (Math.pow(1 + m, s) - 1) / m - u / f * p
    }

    function Ye(e, t, n, i, r) {
        var o = Me(e, t, r),
            a = Ve(tt(t).year, r);
        return i - n * i * o / a
    }
    var Ke, Qe, Xe, Je, Ze, et, tt, nt, it, rt, ot, at, st, lt, ct;
    kendo.support.browser.msie && kendo.support.browser.version < 9 || (Ke = kendo.spreadsheet, Qe = Ke.calc, Xe = Qe.runtime, Je = Xe.defineFunction, Ze = Xe.CalcError, et = Xe.packDate, tt = Xe.unpackDate, nt = Xe.isLeapYear, it = Xe.daysInMonth, rt = Xe._days_360, Je("ERF", function(t, n) {
        return null == n ? e(t) : e(n) - e(t)
    }).args([
        ["lower_limit", "number"],
        ["upper_limit", ["or", "number", "null"]]
    ]), Je("ERFC", t).args([
        ["x", "number"]
    ]), Je("GAMMALN", n).args([
        ["x", "number++"]
    ]), Je("GAMMA", i).args([
        ["x", "number"]
    ]), Je("GAMMA.DIST", c).args([
        ["x", "number+"],
        ["alpha", "number++"],
        ["beta", "number++"],
        ["cumulative", "logical"]
    ]), Je("GAMMA.INV", d).args([
        ["p", ["and", "number", ["[between]", 0, 1]]],
        ["alpha", "number++"],
        ["beta", "number++"]
    ]), Je("NORM.S.DIST", u).args([
        ["z", "number"],
        ["cumulative", "logical"]
    ]), Je("NORM.S.INV", h).args([
        ["p", ["and", "number", ["[between]", 0, 1]]]
    ]), Je("NORM.DIST", f).args([
        ["x", "number"],
        ["mean", "number"],
        ["stddev", "number++"],
        ["cumulative", "logical"]
    ]), Je("NORM.INV", p).args([
        ["p", ["and", "number", ["[between]", 0, 1]]],
        ["mean", "number"],
        ["stddev", "number++"]
    ]), Je("BETADIST", b).args([
        ["x", "number"],
        ["alpha", "number++"],
        ["beta", "number++"],
        ["A", ["or", "number", ["null", 0]]],
        ["B", ["or", "number", ["null", 1]]],
        ["?", ["assert", "$x >= $A", "NUM"]],
        ["?", ["assert", "$x <= $B", "NUM"]],
        ["?", ["assert", "$A < $B", "NUM"]]
    ]), Je("BETA.DIST", w).args([
        ["x", "number"],
        ["alpha", "number++"],
        ["beta", "number++"],
        ["cumulative", "logical"],
        ["A", ["or", "number", ["null", 0]]],
        ["B", ["or", "number", ["null", 1]]],
        ["?", ["assert", "$x >= $A", "NUM"]],
        ["?", ["assert", "$x <= $B", "NUM"]],
        ["?", ["assert", "$A < $B", "NUM"]]
    ]), Je("BETA.INV", y).args([
        ["p", ["and", "number", ["[between]", 0, 1]]],
        ["alpha", "number++"],
        ["beta", "number++"],
        ["A", ["or", "number", ["null", 0]]],
        ["B", ["or", "number", ["null", 1]]]
    ]), Je("CHISQ.DIST", k).args([
        ["x", "number+"],
        ["deg_freedom", "integer++"],
        ["cumulative", "logical"]
    ]), Je("CHISQ.DIST.RT", x).args([
        ["x", "number+"],
        ["deg_freedom", "integer++"]
    ]), Je("CHISQ.INV", C).args([
        ["p", ["and", "number", ["[between]", 0, 1]]],
        ["deg_freedom", "integer++"]
    ]), Je("CHISQ.INV.RT", S).args([
        ["p", ["and", "number", ["[between]", 0, 1]]],
        ["deg_freedom", "integer++"]
    ]), Je("CHISQ.TEST", function(e, t) {
        return T(e.data, t.data)
    }).args([
        ["actual_range", "matrix"],
        ["expected_range", "matrix"],
        ["?", ["assert", "$actual_range.width == $expected_range.width"]],
        ["?", ["assert", "$actual_range.height == $expected_range.height"]]
    ]), Je("EXPON.DIST", D).args([
        ["x", "number+"],
        ["lambda", "number++"],
        ["cumulative", "logical"]
    ]), Je("POISSON.DIST", A).args([
        ["x", "integer+"],
        ["mean", "number+"],
        ["cumulative", "logical"]
    ]), Je("F.DIST", E).args([
        ["x", "number+"],
        ["deg_freedom1", "integer++"],
        ["deg_freedom2", "integer++"],
        ["cumulative", "logical"]
    ]), Je("F.DIST.RT", F).args([
        ["x", "number+"],
        ["deg_freedom1", "integer++"],
        ["deg_freedom2", "integer++"]
    ]), Je("F.INV", M).args([
        ["p", ["and", "number", ["[between]", 0, 1]]],
        ["deg_freedom1", "integer++"],
        ["deg_freedom2", "integer++"]
    ]), Je("F.INV.RT", I).args([
        ["p", ["and", "number", ["[between]", 0, 1]]],
        ["deg_freedom1", "integer++"],
        ["deg_freedom2", "integer++"]
    ]), Je("F.TEST", z).args([
        ["array1", ["collect", "number", 1]],
        ["array2", ["collect", "number", 1]],
        ["?", ["assert", "$array1.length >= 2", "DIV/0"]],
        ["?", ["assert", "$array2.length >= 2", "DIV/0"]]
    ]), Je("FISHER", B).args([
        ["x", ["and", "number", ["(between)", -1, 1]]]
    ]), Je("FISHERINV", L).args([
        ["y", "number"]
    ]), Je("T.DIST", H).args([
        ["x", "number"],
        ["deg_freedom", "integer++"],
        ["cumulative", "logical"]
    ]), Je("T.DIST.RT", N).args([
        ["x", "number"],
        ["deg_freedom", "integer++"]
    ]), Je("T.DIST.2T", O).args([
        ["x", "number+"],
        ["deg_freedom", "integer++"]
    ]), Je("T.INV", V).args([
        ["p", ["and", "number", ["(between]", 0, 1]]],
        ["deg_freedom", "integer++"]
    ]), Je("T.INV.2T", U).args([
        ["p", ["and", "number", ["(between]", 0, 1]]],
        ["deg_freedom", "integer++"]
    ]), Je("T.TEST", W).args([
        ["array1", ["collect", "number", 1]],
        ["array2", ["collect", "number", 1]],
        ["tails", ["and", "integer", ["values", 1, 2]]],
        ["type", ["and", "integer", ["values", 1, 2, 3]]],
        ["?", ["assert", "$type != 1 || $array1.length == $array2.length", "N/A"]],
        ["?", ["assert", "$array1.length >= 2", "DIV/0"]],
        ["?", ["assert", "$array2.length >= 2", "DIV/0"]]
    ]), Je("CONFIDENCE.T", j).args([
        ["alpha", ["and", "number", ["(between)", 0, 1]]],
        ["standard_dev", "number++"],
        ["size", ["and", "integer++", ["assert", "$size != 1", "DIV/0"]]]
    ]), Je("CONFIDENCE.NORM", q).args([
        ["alpha", ["and", "number", ["(between)", 0, 1]]],
        ["standard_dev", "number++"],
        ["size", ["and", "integer++"]]
    ]), Je("GAUSS", G).args([
        ["z", "number"]
    ]), Je("PHI", $).args([
        ["x", "number"]
    ]), Je("LOGNORM.DIST", Y).args([
        ["x", "number++"],
        ["mean", "number"],
        ["standard_dev", "number++"],
        ["cumulative", "logical"]
    ]), Je("LOGNORM.INV", K).args([
        ["probability", ["and", "number", ["(between)", 0, 1]]],
        ["mean", "number"],
        ["standard_dev", "number++"]
    ]), Je("PROB", Q).args([
        ["x_range", ["collect", "number", 1]],
        ["prob_range", ["collect", "number", 1]],
        ["lower_limit", "number"],
        ["upper_limit", ["or", "number", ["null", "$lower_limit"]]],
        ["?", ["assert", "$prob_range.length == $x_range.length", "N/A"]]
    ]), Je("SLOPE", X).args([
        ["known_y", ["collect", "number", 1]],
        ["known_x", ["collect", "number", 1]],
        ["?", ["assert", "$known_x.length == $known_y.length", "N/A"]],
        ["?", ["assert", "$known_x.length > 0 && $known_y.length > 0", "N/A"]]
    ]), Je("INTERCEPT", J).args([
        ["known_y", ["collect", "number", 1]],
        ["known_x", ["collect", "number", 1]],
        ["?", ["assert", "$known_x.length == $known_y.length", "N/A"]],
        ["?", ["assert", "$known_x.length > 0 && $known_y.length > 0", "N/A"]]
    ]), Je("PEARSON", Z).args([
        ["array1", ["collect", "number", 1]],
        ["array2", ["collect", "number", 1]],
        ["?", ["assert", "$array2.length == $array1.length", "N/A"]],
        ["?", ["assert", "$array2.length > 0 && $array1.length > 0", "N/A"]]
    ]), Je("RSQ", ee).args([
        ["known_y", ["collect", "number", 1]],
        ["known_x", ["collect", "number", 1]],
        ["?", ["assert", "$known_x.length == $known_y.length", "N/A"]],
        ["?", ["assert", "$known_x.length > 0 && $known_y.length > 0", "N/A"]],
        ["?", ["assert", "$known_x.length != 1 && $known_y.length != 1", "N/A"]]
    ]), Je("STEYX", te).args([
        ["known_y", ["collect", "number", 1]],
        ["known_x", ["collect", "number", 1]],
        ["?", ["assert", "$known_x.length == $known_y.length", "N/A"]],
        ["?", ["assert", "$known_x.length >= 3 && $known_y.length >= 3", "DIV/0"]]
    ]), Je("FORECAST", ne).args([
        ["x", "number"],
        ["known_y", ["collect", "number", 1]],
        ["known_x", ["collect", "number", 1]],
        ["?", ["assert", "$known_x.length == $known_y.length", "N/A"]],
        ["?", ["assert", "$known_x.length > 0 && $known_y.length > 0", "N/A"]]
    ]), Je("LINEST", oe).args([
        ["known_y", "matrix"],
        ["known_x", ["or", "matrix", "null"]],
        ["const", ["or", "logical", ["null", !0]]],
        ["stats", ["or", "logical", ["null", !1]]]
    ]), Je("LOGEST", ae).args([
        ["known_y", "matrix"],
        ["known_x", ["or", "matrix", "null"]],
        ["const", ["or", "logical", ["null", !0]]],
        ["stats", ["or", "logical", ["null", !1]]]
    ]), Je("TREND", se).args([
        ["known_y", "matrix"],
        ["known_x", ["or", "matrix", "null"]],
        ["new_x", ["or", "matrix", "null"]],
        ["const", ["or", "logical", ["null", !0]]]
    ]), Je("GROWTH", le).args([
        ["known_y", "matrix"],
        ["known_x", ["or", "matrix", "null"]],
        ["new_x", ["or", "matrix", "null"]],
        ["const", ["or", "logical", ["null", !0]]]
    ]), Je("FV", de).args([
        ["rate", "number"],
        ["nper", "number"],
        ["pmt", ["or", "number", ["null", 0]]],
        ["pv", ["or", "number", ["null", 0]]],
        ["type", ["or", ["values", 0, 1],
            ["null", 0]
        ]],
        ["?", ["assert", "$pmt || $pv"]]
    ]), Je("PV", ue).args([
        ["rate", "number"],
        ["nper", "number"],
        ["pmt", ["or", "number", ["null", 0]]],
        ["fv", ["or", "number", ["null", 0]]],
        ["type", ["or", ["values", 0, 1],
            ["null", 0]
        ]],
        ["?", ["assert", "$pmt || $fv"]]
    ]), Je("PMT", he).args([
        ["rate", "number"],
        ["nper", "number"],
        ["pmt", "number"],
        ["fv", ["or", "number", ["null", 0]]],
        ["type", ["or", ["values", 0, 1],
            ["null", 0]
        ]]
    ]), Je("NPER", fe).args([
        ["rate", "number"],
        ["pmt", "number"],
        ["pv", "number"],
        ["fv", ["or", "number", ["null", 0]]],
        ["type", ["or", ["values", 0, 1],
            ["null", 0]
        ]]
    ]), Je("RATE", pe).args([
        ["nper", "number"],
        ["pmt", ["or", "number", ["null", 0]]],
        ["pv", "number"],
        ["fv", ["or", "number", ["null", 0]]],
        ["type", ["or", ["values", 0, 1],
            ["null", 0]
        ]],
        ["guess", ["or", "number++", ["null", .01]]],
        ["?", ["assert", "$pmt || $fv"]]
    ]), Je("IPMT", me).args([
        ["rate", "number"],
        ["per", "number++"],
        ["nper", "number++"],
        ["pv", "number"],
        ["fv", ["or", "number", ["null", 0]]],
        ["type", ["or", ["values", 0, 1],
            ["null", 0]
        ]],
        ["?", ["assert", "$per >= 1 && $per <= $nper"]]
    ]), Je("PPMT", ge).args([
        ["rate", "number"],
        ["per", "number++"],
        ["nper", "number++"],
        ["pv", "number"],
        ["fv", ["or", "number", ["null", 0]]],
        ["type", ["or", ["values", 0, 1],
            ["null", 0]
        ]],
        ["?", ["assert", "$per >= 1 && $per <= $nper"]]
    ]), Je("CUMPRINC", ve).args([
        ["rate", "number++"],
        ["nper", "number++"],
        ["pv", "number++"],
        ["start_period", "number++"],
        ["end_period", "number++"],
        ["type", ["or", ["values", 0, 1],
            ["null", 0]
        ]],
        ["?", ["assert", "$end_period >= $start_period", "NUM"]]
    ]), Je("CUMIPMT", _e).args([
        ["rate", "number++"],
        ["nper", "number++"],
        ["pv", "number++"],
        ["start_period", "number++"],
        ["end_period", "number++"],
        ["type", ["or", ["values", 0, 1],
            ["null", 0]
        ]],
        ["?", ["assert", "$end_period >= $start_period", "NUM"]]
    ]), Je("NPV", be).args([
        ["rate", "number"],
        ["values", ["collect", "number"]],
        ["?", ["assert", "$values.length > 0", "N/A"]]
    ]), Je("IRR", we).args([
        ["values", ["collect", "number", 1]],
        ["guess", ["or", "number", ["null", .1]]]
    ]), Je("EFFECT", ye).args([
        ["nominal_rate", "number++"],
        ["npery", "integer++"]
    ]), Je("NOMINAL", ke).args([
        ["effect_rate", "number++"],
        ["npery", "integer++"]
    ]), Je("XNPV", xe).args([
        ["rate", "number"],
        ["values", ["collect", "number", 1]],
        ["dates", ["collect", "date", 1]],
        ["?", ["assert", "$values.length == $dates.length", "NUM"]]
    ]), Je("XIRR", Ce).args([
        ["values", ["collect", "number", 1]],
        ["dates", ["collect", "date", 1]],
        ["guess", ["or", "number", ["null", .1]]],
        ["?", ["assert", "$values.length == $dates.length", "NUM"]]
    ]),
        Je("ISPMT", Se).args([
            ["rate", "number"],
            ["per", "number++"],
            ["nper", "number++"],
            ["pv", "number"],
            ["?", ["assert", "$per >= 1 && $per <= $nper"]]
        ]), Je("DB", Te).args([
        ["cost", "number"],
        ["salvage", "number"],
        ["life", "number++"],
        ["period", "number++"],
        ["month", ["or", "number", ["null", 12]]]
    ]), Je("DDB", De).args([
        ["cost", "number"],
        ["salvage", "number"],
        ["life", "number++"],
        ["period", "number++"],
        ["factor", ["or", "number", ["null", 2]]]
    ]), Je("SLN", Ae).args([
        ["cost", "number"],
        ["salvage", "number"],
        ["life", "number++"]
    ]), Je("SYD", Ee).args([
        ["cost", "number"],
        ["salvage", "number"],
        ["life", "number++"],
        ["per", "number++"]
    ]), Je("VDB", Fe).args([
        ["cost", "number+"],
        ["salvage", "number+"],
        ["life", "number++"],
        ["start_period", "number+"],
        ["end_period", "number+"],
        ["factor", ["or", "number+", ["null", 2]]],
        ["no_switch", ["or", "logical", ["null", !1]]],
        ["?", ["assert", "$end_period >= $start_period", "NUM"]]
    ]), ot = [
        ["settlement", "date"],
        ["maturity", "date"],
        ["frequency", ["and", "integer", ["values", 1, 2, 4]]],
        ["basis", ["or", ["null", 0],
            ["and", "integer", ["values", 0, 1, 2, 3, 4]]
        ]],
        ["?", ["assert", "$settlement < $maturity", "NUM"]]
    ], Je("COUPDAYBS", ze).args(ot), Je("COUPDAYS", Be).args(ot), Je("COUPDAYSNC", Le).args(ot), Je("COUPPCD", He).args(ot), Je("COUPNCD", Ne).args(ot), Je("COUPNUM", Oe).args(ot), Je("ACCRINTM", Ue).args([
        ["issue", "date"],
        ["settlement", "date"],
        ["rate", "number++"],
        ["par", ["or", ["null", 1e3], "number++"]],
        ["basis", ["or", ["null", 0],
            ["and", "integer", ["values", 0, 1, 2, 3, 4]]
        ]],
        ["?", ["assert", "$issue < $settlement", "NUM"]]
    ]), Je("ACCRINT", We).args([
        ["issue", "date"],
        ["first_interest", "date"],
        ["settlement", "date"],
        ["rate", "number++"],
        ["par", ["or", ["null", 1e3], "number++"]],
        ["frequency", ["and", "integer", ["values", 1, 2, 4]]],
        ["basis", ["or", ["null", 0],
            ["and", "integer", ["values", 0, 1, 2, 3, 4]]
        ]],
        ["calc_method", ["or", "logical", ["null", !0]]],
        ["?", ["assert", "$issue < $settlement", "NUM"]]
    ]), Je("DISC", je).args([
        ["settlement", "date"],
        ["maturity", "date"],
        ["pr", "number++"],
        ["redemption", "number++"],
        ["basis", ["or", ["null", 0],
            ["and", "integer", ["values", 0, 1, 2, 3, 4]]
        ]],
        ["?", ["assert", "$settlement < $maturity", "NUM"]]
    ]), Je("INTRATE", qe).args([
        ["settlement", "date"],
        ["maturity", "date"],
        ["investment", "number++"],
        ["redemption", "number++"],
        ["basis", ["or", ["null", 0],
            ["and", "integer", ["values", 0, 1, 2, 3, 4]]
        ]],
        ["?", ["assert", "$settlement < $maturity", "NUM"]]
    ]), Je("RECEIVED", Ge).args([
        ["settlement", "date"],
        ["maturity", "date"],
        ["investment", "number++"],
        ["discount", "number++"],
        ["basis", ["or", ["null", 0],
            ["and", "integer", ["values", 0, 1, 2, 3, 4]]
        ]],
        ["?", ["assert", "$settlement < $maturity", "NUM"]]
    ]), Je("PRICE", $e).args([
        ["settlement", "date"],
        ["maturity", "date"],
        ["rate", "number++"],
        ["yld", "number++"],
        ["redemption", "number++"],
        ["frequency", ["and", "integer", ["values", 1, 2, 4]]],
        ["basis", ["or", ["null", 0],
            ["and", "integer", ["values", 0, 1, 2, 3, 4]]
        ]],
        ["?", ["assert", "$settlement < $maturity", "NUM"]]
    ]), Je("PRICEDISC", Ye).args([
        ["settlement", "date"],
        ["maturity", "date"],
        ["discount", "number++"],
        ["redemption", "number++"],
        ["basis", ["or", ["null", 0],
            ["and", "integer", ["values", 0, 1, 2, 3, 4]]
        ]],
        ["?", ["assert", "$settlement < $maturity", "NUM"]]
    ]), at = 300, st = 2.2204e-16, lt = 1e-30, ct = Math.abs)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/borderpalette.min", ["kendo.core.min", "kendo.colorpicker.min", "kendo.popup.min"], e)
}(function() {
    ! function(e) {
        var t, n, i, r, o;
        e.support.browser.msie && 9 > e.support.browser.version || (t = e.jQuery, n = ["allBorders", "insideBorders", "insideHorizontalBorders", "insideVerticalBorders", "outsideBorders", "leftBorder", "topBorder", "rightBorder", "bottomBorder", "noBorders"], i = e.spreadsheet.messages.borderPalette = {
            allBorders: "All borders",
            insideBorders: "Inside borders",
            insideHorizontalBorders: "Inside horizontal borders",
            insideVerticalBorders: "Inside vertical borders",
            outsideBorders: "Outside borders",
            leftBorder: "Left border",
            topBorder: "Top border",
            rightBorder: "Right border",
            bottomBorder: "Bottom border",
            noBorders: "No border",
            reset: "Reset color",
            customColor: "Custom color...",
            apply: "Apply",
            cancel: "Cancel"
        }, r = e.ui.Widget.extend({
            init: function(t, n) {
                e.ui.Widget.call(this, t, n), this.element = t, this.color = n.color, this._resetButton(), this._colorPalette(), this._customColorPalette(), this._customColorButton(), this.resetButton.on("click", this.resetColor.bind(this)), this.customColorButton.on("click", this.customColor.bind(this))
            },
            options: {
                name: "ColorChooser"
            },
            events: ["change"],
            destroy: function() {
                e.unbind(this.dialog.element.find(".k-action-buttons")), this.dialog.destroy(), this.colorPalette.destroy(), this.resetButton.off("click"), this.customColorButton.off("click")
            },
            value: function(e) {
                return void 0 === e ? this.color : (this.color = e, this.customColorButton.find(".k-icon").css("background-color", this.color), this.colorPalette.value(null), this.flatColorPicker.value(this.color), void 0)
            },
            _change: function(e) {
                this.color = e, this.trigger("change", {
                    value: e
                })
            },
            _colorPalette: function() {
                var e = t("<div />", {
                        "class": "k-spreadsheet-color-palette"
                    }),
                    n = this.colorPalette = t("<div />").kendoColorPalette({
                        palette: ["#ffffff", "#000000", "#d6ecff", "#4e5b6f", "#7fd13b", "#ea157a", "#feb80a", "#00addc", "#738ac8", "#1ab39f", "#f2f2f2", "#7f7f7f", "#a7d6ff", "#d9dde4", "#e5f5d7", "#fad0e4", "#fef0cd", "#c5f2ff", "#e2e7f4", "#c9f7f1", "#d8d8d8", "#595959", "#60b5ff", "#b3bcca", "#cbecb0", "#f6a1c9", "#fee29c", "#8be6ff", "#c7d0e9", "#94efe3", "#bfbfbf", "#3f3f3f", "#007dea", "#8d9baf", "#b2e389", "#f272af", "#fed46b", "#51d9ff", "#aab8de", "#5fe7d5", "#a5a5a5", "#262626", "#003e75", "#3a4453", "#5ea226", "#af0f5b", "#c58c00", "#0081a5", "#425ea9", "#138677", "#7f7f7f", "#0c0c0c", "#00192e", "#272d37", "#3f6c19", "#750a3d", "#835d00", "#00566e", "#2c3f71", "#0c594f"],
                        value: this.color,
                        change: function(e) {
                            this.customColorButton.find(".k-icon").css("background-color", "transparent"), this.flatColorPicker.value(null), this._change(e.value)
                        }.bind(this)
                    }).data("kendoColorPalette");
                e.append(n.wrapper).appendTo(this.element)
            },
            _customColorPalette: function() {
                var n, r, o = t("<div />", {
                        "class": "k-spreadsheet-window",
                        html: "<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>" + i.apply + "</button><button class='k-button' data-bind='click: close'>" + i.cancel + "</button></div>"
                    }),
                    a = this.dialog = o.appendTo(document.body).kendoWindow({
                        animation: !1,
                        scrollable: !1,
                        resizable: !1,
                        maximizable: !1,
                        modal: !0,
                        visible: !1,
                        width: 268,
                        open: function() {
                            this.center()
                        }
                    }).data("kendoWindow");
                a.one("activate", function() {
                    this.element.find("[data-role=flatcolorpicker]").data("kendoFlatColorPicker")._hueSlider.resize()
                }), n = this.flatColorPicker = a.element.children().first().kendoFlatColorPicker().data("kendoFlatColorPicker"), r = e.observable({
                    apply: function() {
                        this.customColorButton.find(".k-icon").css("background-color", n.value()), this.colorPalette.value(null), this._change(n.value()), a.close()
                    }.bind(this),
                    close: function() {
                        n.value(null), a.close()
                    }
                }), e.bind(a.element.find(".k-action-buttons"), r)
            },
            _resetButton: function() {
                this.resetButton = t("<a class='k-button k-reset-color' href='#'><span class='k-icon k-font-icon k-i-reset-color'></span>" + i.reset + "</a>").appendTo(this.element)
            },
            _customColorButton: function() {
                this.customColorButton = t("<a class='k-button k-custom-color' href='#'><span class='k-icon'></span>" + i.customColor + "</a>").appendTo(this.element)
            },
            resetColor: function() {
                this.colorPalette.value(null), this.flatColorPicker.value(null), this._change(null)
            },
            customColor: function() {
                this.dialog.open()
            }
        }), o = e.ui.Widget.extend({
            init: function(t, n) {
                e.ui.Widget.call(this, t, n), this.element = t, this.color = "#000", this.element.addClass("k-spreadsheet-border-palette"), this._borderTypePalette(), this._borderColorPalette(), this.element.on("click", ".k-spreadsheet-border-type-palette .k-button", this._click.bind(this))
            },
            options: {
                name: "BorderPalette"
            },
            events: ["change"],
            destroy: function() {
                this.colorChooser.destroy(), this.element.off("click")
            },
            _borderTypePalette: function() {
                var r = i,
                    o = n.map(function(t) {
                        return '<a title="' + r[t] + '" href="#" data-border-type="' + t + '" class="k-button k-button-icon"><span class="k-sprite k-font-icon k-icon k-i-' + e.toHyphens(t) + '"></span></a>'
                    }).join(""),
                    a = t("<div />", {
                        "class": "k-spreadsheet-border-type-palette",
                        html: o
                    });
                a.appendTo(this.element)
            },
            _borderColorPalette: function() {
                var e = t("<div />", {
                    "class": "k-spreadsheet-border-color-palette"
                });
                e.appendTo(this.element), this.colorChooser = new r(e, {
                    color: this.color,
                    change: this._colorChange.bind(this)
                })
            },
            _click: function(e) {
                this.type = t(e.currentTarget).data("borderType"), this.trigger("change", {
                    type: this.type,
                    color: this.color
                })
            },
            _colorChange: function(e) {
                this.color = e.value, this.type && this.trigger("change", {
                    type: this.type,
                    color: this.color
                })
            }
        }), e.spreadsheet.ColorChooser = r, e.spreadsheet.BorderPalette = o)
    }(window.kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/toolbar.min", ["kendo.toolbar.min", "kendo.colorpicker.min", "kendo.combobox.min", "kendo.dropdownlist.min", "kendo.popup.min", "spreadsheet/borderpalette.min"], e)
}(function() {
    ! function(e) {
        var t, n, i, r, o, a, s, l, c, d, u, h, f, p, m, g, v, _, b, w, y, k, x, C, S, T, D, A, E, F, I, M, R, P, z;
        e.support.browser.msie && 9 > e.support.browser.version || (t = e.jQuery, n = e.ui.ToolBar, i = e.spreadsheet.messages.toolbar = {
            addColumnLeft: "Add column left",
            addColumnRight: "Add column right",
            addRowAbove: "Add row above",
            addRowBelow: "Add row below",
            alignment: "Alignment",
            alignmentButtons: {
                justtifyLeft: "Align left",
                justifyCenter: "Center",
                justifyRight: "Align right",
                justifyFull: "Justify",
                alignTop: "Align top",
                alignMiddle: "Align middle",
                alignBottom: "Align bottom"
            },
            backgroundColor: "Background",
            bold: "Bold",
            borders: "Borders",
            colorPicker: {
                reset: "Reset color",
                customColor: "Custom color..."
            },
            copy: "Copy",
            cut: "Cut",
            deleteColumn: "Delete column",
            deleteRow: "Delete row",
            filter: "Filter",
            fontFamily: "Font",
            fontSize: "Font size",
            format: "Custom format...",
            formatTypes: {
                automatic: "Automatic",
                number: "Number",
                percent: "Percent",
                financial: "Financial",
                currency: "Currency",
                date: "Date",
                time: "Time",
                dateTime: "Date time",
                duration: "Duration",
                moreFormats: "More formats..."
            },
            formatDecreaseDecimal: "Decrease decimal",
            formatIncreaseDecimal: "Increase decimal",
            freeze: "Freeze panes",
            freezeButtons: {
                freezePanes: "Freeze panes",
                freezeRows: "Freeze rows",
                freezeColumns: "Freeze columns",
                unfreeze: "Unfreeze panes"
            },
            italic: "Italic",
            merge: "Merge cells",
            mergeButtons: {
                mergeCells: "Merge all",
                mergeHorizontally: "Merge horizontally",
                mergeVertically: "Merge vertically",
                unmerge: "Unmerge"
            },
            open: "Open...",
            paste: "Paste",
            quickAccess: {
                redo: "Redo",
                undo: "Undo"
            },
            exportAs: "Export...",
            sortAsc: "Sort ascending",
            sortDesc: "Sort descending",
            sortButtons: {
                sortSheetAsc: "Sort sheet A to Z",
                sortSheetDesc: "Sort sheet Z to A",
                sortRangeAsc: "Sort range A to Z",
                sortRangeDesc: "Sort range Z to A"
            },
            textColor: "Text Color",
            textWrap: "Wrap text",
            underline: "Underline",
            validation: "Data validation..."
        }, r = {
            home: ["open", "exportAs", ["cut", "copy", "paste"],
                ["bold", "italic", "underline"], "backgroundColor", "textColor", "borders", "fontSize", "fontFamily", "alignment", "textWrap", ["formatDecreaseDecimal", "formatIncreaseDecimal"], "format", "merge", "freeze", "filter"
            ],
            insert: [
                ["addColumnLeft", "addColumnRight", "addRowBelow", "addRowAbove"],
                ["deleteColumn", "deleteRow"]
            ],
            data: ["sort", "filter", "validation"]
        }, o = {
            open: {
                type: "open",
                overflow: "never",
                iconClass: "xlsa"
            },
            exportAs: {
                type: "exportAsDialog",
                dialogName: "exportAs",
                overflow: "never",
                text: "",
                iconClass: "xlsa"
            },
            bold: {
                type: "button",
                command: "PropertyChangeCommand",
                property: "bold",
                value: !0,
                iconClass: "bold",
                togglable: !0
            },
            italic: {
                type: "button",
                command: "PropertyChangeCommand",
                property: "italic",
                value: !0,
                iconClass: "italic",
                togglable: !0
            },
            underline: {
                type: "button",
                command: "PropertyChangeCommand",
                property: "underline",
                value: !0,
                iconClass: "underline",
                togglable: !0
            },
            formatDecreaseDecimal: {
                type: "button",
                command: "AdjustDecimalsCommand",
                value: -1,
                iconClass: "decrease-decimal"
            },
            formatIncreaseDecimal: {
                type: "button",
                command: "AdjustDecimalsCommand",
                value: 1,
                iconClass: "increase-decimal"
            },
            textWrap: {
                type: "button",
                command: "TextWrapCommand",
                property: "wrap",
                value: !0,
                iconClass: "text-wrap",
                togglable: !0
            },
            cut: {
                type: "button",
                command: "ToolbarCutCommand",
                iconClass: "cut"
            },
            copy: {
                type: "button",
                command: "ToolbarCopyCommand",
                iconClass: "copy"
            },
            paste: {
                type: "button",
                command: "ToolbarPasteCommand",
                iconClass: "paste"
            },
            separator: {
                type: "separator"
            },
            alignment: {
                type: "alignment",
                iconClass: "justify-left"
            },
            backgroundColor: {
                type: "colorPicker",
                property: "background",
                iconClass: "background"
            },
            textColor: {
                type: "colorPicker",
                property: "color",
                iconClass: "text"
            },
            fontFamily: {
                type: "fontFamily",
                property: "fontFamily",
                iconClass: "text"
            },
            fontSize: {
                type: "fontSize",
                property: "fontSize",
                iconClass: "font-size"
            },
            format: {
                type: "format",
                property: "format",
                iconClass: "format-number"
            },
            filter: {
                type: "filter",
                property: "hasFilter",
                iconClass: "filter"
            },
            merge: {
                type: "merge",
                iconClass: "merge-cells"
            },
            freeze: {
                type: "freeze",
                iconClass: "freeze-panes"
            },
            borders: {
                type: "borders",
                iconClass: "all-borders"
            },
            formatCells: {
                type: "dialog",
                dialogName: "formatCells",
                overflow: "never"
            },
            addColumnLeft: {
                type: "button",
                command: "AddColumnCommand",
                value: "left",
                iconClass: "add-column-left"
            },
            addColumnRight: {
                type: "button",
                command: "AddColumnCommand",
                value: "right",
                iconClass: "add-column-right"
            },
            addRowBelow: {
                type: "button",
                command: "AddRowCommand",
                value: "below",
                iconClass: "add-row-below"
            },
            addRowAbove: {
                type: "button",
                command: "AddRowCommand",
                value: "above",
                iconClass: "add-row-above"
            },
            deleteColumn: {
                type: "button",
                command: "DeleteColumnCommand",
                iconClass: "delete-column"
            },
            deleteRow: {
                type: "button",
                command: "DeleteRowCommand",
                iconClass: "delete-row"
            },
            sort: {
                type: "sort",
                iconClass: "sort-desc"
            },
            validation: {
                type: "dialog",
                dialogName: "validation",
                iconClass: "exception",
                overflow: "never"
            }
        }, a = n.extend({
            init: function(e, t) {
                t.items = this._expandTools(t.tools || a.prototype.options.tools[t.toolbarName]), n.fn.init.call(this, e, t);
                var i = this._click.bind(this);
                this.element.addClass("k-spreadsheet-toolbar"), this._addSeparators(this.element), this.bind({
                    click: i,
                    toggle: i
                })
            },
            _addSeparators: function(e) {
                var t = e.children(".k-widget, a.k-button, .k-button-group");
                t.before("<span class='k-separator' />")
            },
            _expandTools: function(e) {
                function n(e) {
                    var r = t.isPlainObject(e) ? e : o[e] || {},
                        a = "k-icon k-font-icon k-i-" + r.iconClass,
                        s = r.type,
                        l = {
                            splitButton: {
                                spriteCssClass: a
                            },
                            button: {
                                showText: "overflow"
                            },
                            colorPicker: {
                                toolIcon: a
                            }
                        },
                        c = t.extend({
                            name: r.name || e,
                            text: i[r.name || e],
                            spriteCssClass: a,
                            attributes: {
                                title: i[r.name || e]
                            }
                        }, l[s], r);
                    return "splitButton" == s && (c.menuButtons = c.menuButtons.map(n)), c.attributes["data-tool"] = e, r.property && (c.attributes["data-property"] = r.property), c
                }
                return e.reduce(function(e, i) {
                    return e.push(t.isArray(i) ? {
                        type: "buttonGroup",
                        buttons: i.map(n)
                    } : n.call(this, i)), e
                }, [])
            },
            _click: function(e) {
                var t, n = e.target.attr("data-tool"),
                    i = o[n] || {},
                    r = i.command;
                r && (t = {
                    command: r,
                    options: {
                        property: i.property || null,
                        value: i.value || null
                    }
                }, "boolean" == typeof t.options.value && (t.options.value = e.checked ? !0 : null), this.action(t))
            },
            events: ["click", "toggle", "open", "close", "overflowOpen", "overflowClose", "action", "dialog"],
            options: {
                name: "SpreadsheetToolBar",
                resizable: !0,
                tools: r
            },
            action: function(e) {
                this.trigger("action", e)
            },
            dialog: function(e) {
                this.trigger("dialog", e)
            },
            refresh: function(t) {
                function n(e, t) {
                    var n, i = e.toolbar,
                        r = e.overflow,
                        o = i && i.options.togglable || r && r.options.togglable;
                    o && (n = !1, "boolean" == typeof t ? n = t : "string" == typeof t && (n = i.options.value === t), i.toggle(n), r && r.toggle(n))
                }

                function i(e, t) {
                    var n = e.toolbar,
                        i = e.overflow;
                    n && n.update && n.update(t), i && i.update && i.update(t)
                }
                var r, o, a, s, l = t,
                    c = this._tools();
                for (r = 0; c.length > r; r++) o = c[r].property, a = c[r].tool, s = e.isFunction(l[o]) ? l[o]() : l, "button" === a.type ? n(a, s) : i(a, s)
            },
            _tools: function() {
                return this.element.find("[data-property]").toArray().reduce(function(e, n) {
                    n = t(n);
                    var i = n.attr("data-property");
                    return e.push({
                        property: i,
                        tool: this._getItem(n)
                    }), e
                }.bind(this), [])
            },
            destroy: function() {
                this.element.find("[data-command],.k-button").each(function() {
                    var e = t(this),
                        n = e.data("instance");
                    n && n.destroy && n.destroy()
                }), n.fn.destroy.call(this)
            }
        }), e.spreadsheet.ToolBar = a, s = e.toolbar.Item.extend({
            init: function(e, n) {
                var i = t("<select />").kendoDropDownList({
                    height: "auto"
                }).data("kendoDropDownList");
                this.dropDownList = i, this.element = i.wrapper, this.options = e, this.toolbar = n, this.attributes(), this.addUidAttr(), this.addOverflowAttr(), i.bind("open", this._open.bind(this)), i.bind("change", this._change.bind(this)), this.element.width(e.width).attr({
                    "data-command": "PropertyChangeCommand",
                    "data-property": e.property
                })
            },
            _open: function() {
                var t, n = this.dropDownList,
                    i = n.list;
                i.css({
                    whiteSpace: "nowrap",
                    width: "auto"
                }), t = i.width(), t ? t += 20 : t = n._listWidth, i.css("width", t + e.support.scrollbar()), n._listWidth = t
            },
            _change: function(e) {
                var t = e.sender,
                    n = t.value(),
                    i = t.dataItem(),
                    r = i ? i.popup : void 0;
                r ? this.toolbar.dialog({
                    name: r
                }) : this.toolbar.action({
                    command: "PropertyChangeCommand",
                    options: {
                        property: this.options.property,
                        value: "null" == n ? null : n
                    }
                })
            },
            value: function(e) {
                return void 0 === e ? this.dropDownList.value() : void this.dropDownList.value(e)
            }
        }), l = e.toolbar.Item.extend({
            init: function(e, n) {
                this.element = t("<a href='#' class='k-button k-button-icon'><span class='" + e.spriteCssClass + "'></span><span class='k-icon k-i-arrow-s'></span></a>"), this.element.on("click", this.open.bind(this)).attr("data-command", e.command), this.options = e, this.toolbar = n, this.attributes(), this.addUidAttr(), this.addOverflowAttr(), this._popup()
            },
            destroy: function() {
                this.popup.destroy()
            },
            open: function() {
                this.popup.toggle()
            },
            _popup: function() {
                var e = this.element;
                this.popup = t("<div class='k-spreadsheet-popup' />").appendTo(e).kendoPopup({
                    anchor: e
                }).data("kendoPopup")
            }
        }), e.toolbar.registerComponent("dialog", e.toolbar.ToolBarButton.extend({
            init: function(t, n) {
                e.toolbar.ToolBarButton.fn.init.call(this, t, n), this._dialogName = t.dialogName, this.element.bind("click", this.open.bind(this)).data("instance", this)
            },
            open: function() {
                this.toolbar.dialog({
                    name: this._dialogName
                })
            }
        })), e.toolbar.registerComponent("exportAsDialog", e.toolbar.Item.extend({
            init: function(e, n) {
                this._dialogName = e.dialogName, this.toolbar = n, this.element = t("<button class='k-button k-button-icon' title='" + e.attributes.title + "'><span class='k-icon k-font-icon k-i-xls' /></button>").data("instance", this), this.element.bind("click", this.open.bind(this)).data("instance", this)
            },
            open: function() {
                this.toolbar.dialog({
                    name: this._dialogName
                })
            }
        })), c = e.toolbar.OverflowButton.extend({
            init: function(t, n) {
                e.toolbar.OverflowButton.fn.init.call(this, t, n), this.element.on("click", this._click.bind(this)), this.message = this.options.text;
                var i = this.element.data("button");
                this.element.data(this.options.type, i)
            },
            _click: t.noop
        }), d = l.extend({
            init: function(t, n) {
                l.fn.init.call(this, t, n), this.popup.element.addClass("k-spreadsheet-colorpicker"), this.colorChooser = new e.spreadsheet.ColorChooser(this.popup.element, {
                    change: this._colorChange.bind(this)
                }), this.element.attr({
                    "data-property": t.property
                }), this.element.data({
                    type: "colorPicker",
                    colorPicker: this,
                    instance: this
                })
            },
            destroy: function() {
                this.colorChooser.destroy(), l.fn.destroy.call(this)
            },
            update: function(e) {
                this.value(e)
            },
            value: function(e) {
                this.colorChooser.value(e)
            },
            _colorChange: function(e) {
                this.toolbar.action({
                    command: "PropertyChangeCommand",
                    options: {
                        property: this.options.property,
                        value: e.sender.value()
                    }
                }), this.popup.close()
            }
        }), u = c.extend({
            init: function(e, t) {
                e.iconName = "text", c.fn.init.call(this, e, t)
            },
            _click: function() {
                this.toolbar.dialog({
                    name: "colorPicker",
                    options: {
                        title: this.options.property,
                        property: this.options.property
                    }
                })
            }
        }), e.toolbar.registerComponent("colorPicker", d, u), h = [8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72], f = 12, p = e.toolbar.Item.extend({
            init: function(e, n) {
                var i = t("<input />").kendoComboBox({
                    change: this._valueChange.bind(this),
                    dataSource: e.fontSizes || h,
                    value: f
                }).data("kendoComboBox");
                this.comboBox = i, this.element = i.wrapper, this.options = e, this.toolbar = n, this.attributes(), this.addUidAttr(), this.addOverflowAttr(), this.element.width(e.width).attr({
                    "data-command": "PropertyChangeCommand",
                    "data-property": e.property
                }), this.element.data({
                    type: "fontSize",
                    fontSize: this
                })
            },
            _valueChange: function(t) {
                this.toolbar.action({
                    command: "PropertyChangeCommand",
                    options: {
                        property: this.options.property,
                        value: e.parseInt(t.sender.value())
                    }
                })
            },
            update: function(t) {
                this.value(e.parseInt(t) || f)
            },
            value: function(e) {
                return void 0 === e ? this.comboBox.value() : void this.comboBox.value(e)
            }
        }), m = c.extend({
            _click: function() {
                this.toolbar.dialog({
                    name: "fontSize",
                    options: {
                        sizes: h,
                        defaultSize: f
                    }
                })
            },
            update: function(e) {
                this._value = e || f, this.element.find(".k-text").text(this.message + " (" + this._value + ") ...")
            }
        }), e.toolbar.registerComponent("fontSize", p, m), g = ["Arial", "Courier New", "Georgia", "Times New Roman", "Trebuchet MS", "Verdana"], v = "Arial", _ = s.extend({
            init: function(e, t) {
                s.fn.init.call(this, e, t);
                var n = this.dropDownList;
                n.setDataSource(e.fontFamilies || g), n.value(v), this.element.data({
                    type: "fontFamily",
                    fontFamily: this
                })
            },
            update: function(e) {
                this.value(e || v)
            }
        }), b = c.extend({
            _click: function() {
                this.toolbar.dialog({
                    name: "fontFamily",
                    options: {
                        fonts: g,
                        defaultFont: v
                    }
                })
            },
            update: function(e) {
                this._value = e || v, this.element.find(".k-text").text(this.message + " (" + this._value + ") ...")
            }
        }), e.toolbar.registerComponent("fontFamily", _, b), w = e.spreadsheet.formats = {
            automatic: null,
            number: "#,0.00",
            percent: "0.00%",
            financial: '_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',
            currency: "$#,##0.00;[Red]$#,##0.00",
            date: "m/d/yyyy",
            time: "h:mm:ss AM/PM",
            dateTime: "m/d/yyyy h:mm",
            duration: "[h]:mm:ss"
        }, y = s.extend({
            _revertTitle: function(e) {
                e.sender.value(""), e.sender.wrapper.width("auto")
            },
            init: function(e, t) {
                var n, r;
                s.fn.init.call(this, e, t), n = this.dropDownList, r = "<span class='k-icon k-font-icon k-i-" + e.iconClass + "' style='line-height: 1em; width: 1.35em;'></span>", n.bind("change", this._revertTitle.bind(this)), n.bind("dataBound", this._revertTitle.bind(this)), n.setOptions({
                    dataValueField: "format",
                    dataTextField: "name",
                    dataValuePrimitive: !0,
                    valueTemplate: r,
                    template: "# if (data.sample) { #<span class='k-spreadsheet-sample'>#: data.sample #</span># } ##: data.name #"
                }), n.text(r), n.setDataSource([{
                    format: w.automatic,
                    name: i.formatTypes.automatic
                }, {
                    format: w.number,
                    name: i.formatTypes.number,
                    sample: "1,499.99"
                }, {
                    format: w.percent,
                    name: i.formatTypes.percent,
                    sample: "14.50%"
                }, {
                    format: w.financial,
                    name: i.formatTypes.financial,
                    sample: "(1,000.12)"
                }, {
                    format: w.currency,
                    name: i.formatTypes.currency,
                    sample: "$1,499.99"
                }, {
                    format: w.date,
                    name: i.formatTypes.date,
                    sample: "4/21/2012"
                }, {
                    format: w.time,
                    name: i.formatTypes.time,
                    sample: "5:49:00 PM"
                }, {
                    format: w.dateTime,
                    name: i.formatTypes.dateTime,
                    sample: "4/21/2012 5:49:00"
                }, {
                    format: w.duration,
                    name: i.formatTypes.duration,
                    sample: "168:05:00"
                }, {
                    popup: "formatCells",
                    name: i.formatTypes.moreFormats
                }]), this.element.data({
                    type: "format",
                    format: this
                })
            }
        }), k = c.extend({
            _click: function() {
                this.toolbar.dialog({
                    name: "formatCells"
                })
            }
        }), e.toolbar.registerComponent("format", y, k), x = l.extend({
            init: function(e, t) {
                l.fn.init.call(this, e, t), this._borderPalette(), this.element.data({
                    type: "borders",
                    instance: this
                })
            },
            destroy: function() {
                this.borderPalette.destroy(), l.fn.destroy.call(this)
            },
            _borderPalette: function() {
                var n = t("<div />").appendTo(this.popup.element);
                this.borderPalette = new e.spreadsheet.BorderPalette(n, {
                    change: this._action.bind(this)
                })
            },
            _action: function(e) {
                this.toolbar.action({
                    command: "BorderChangeCommand",
                    options: {
                        border: e.type,
                        style: {
                            size: 1,
                            color: e.color
                        }
                    }
                })
            }
        }), C = c.extend({
            _click: function() {
                this.toolbar.dialog({
                    name: "borders"
                })
            }
        }), e.toolbar.registerComponent("borders", x, C), S = l.extend({
            init: function(e, n) {
                l.fn.init.call(this, e, n), this.element.attr({
                    "data-property": "alignment"
                }), this._commandPalette(), this.popup.element.on("click", ".k-button", function(e) {
                    this._action(t(e.currentTarget))
                }.bind(this)), this.element.data({
                    type: "alignment",
                    alignment: this,
                    instance: this
                })
            },
            buttons: [{
                property: "textAlign",
                value: "left",
                iconClass: "justify-left",
                text: i.alignmentButtons.justtifyLeft
            }, {
                property: "textAlign",
                value: "center",
                iconClass: "justify-center",
                text: i.alignmentButtons.justifyCenter
            }, {
                property: "textAlign",
                value: "right",
                iconClass: "justify-right",
                text: i.alignmentButtons.justifyRight
            }, {
                property: "textAlign",
                value: "justify",
                iconClass: "justify-full",
                text: i.alignmentButtons.justifyFull
            }, {
                property: "verticalAlign",
                value: "top",
                iconClass: "align-top",
                text: i.alignmentButtons.alignTop
            }, {
                property: "verticalAlign",
                value: "center",
                iconClass: "align-middle",
                text: i.alignmentButtons.alignMiddle
            }, {
                property: "verticalAlign",
                value: "bottom",
                iconClass: "align-bottom",
                text: i.alignmentButtons.alignBottom
            }],
            destroy: function() {
                this.popup.element.off(), l.fn.destroy.call(this)
            },
            update: function(e) {
                var t = e.textAlign(),
                    n = e.verticalAlign();
                this.popup.element.find(".k-button").removeClass("k-state-active"), t && this.popup.element.find(".k-button[data-value=" + t + "]").addClass("k-state-active"), n && this.popup.element.find(".k-button[data-value=" + n + "]").addClass("k-state-active")
            },
            _commandPalette: function() {
                var e = this.buttons,
                    n = t("<div />").appendTo(this.popup.element);
                e.forEach(function(i, r) {
                    var o = "<a title='" + i.text + "' data-property='" + i.property + "' data-value='" + i.value + "' class='k-button k-button-icon'><span class='k-icon k-font-icon k-i-" + i.iconClass + "'></span></a>";
                    0 !== r && e[r - 1].property !== i.property && n.append(t("<span class='k-separator' />")), n.append(o)
                })
            },
            _action: function(e) {
                var t = e.attr("data-property"),
                    n = e.attr("data-value");
                this.toolbar.action({
                    command: "PropertyChangeCommand",
                    options: {
                        property: t,
                        value: n
                    }
                })
            }
        }), T = c.extend({
            _click: function() {
                this.toolbar.dialog({
                    name: "alignment"
                })
            }
        }), e.toolbar.registerComponent("alignment", S, T), D = l.extend({
            init: function(e, n) {
                l.fn.init.call(this, e, n), this._commandPalette(), this.popup.element.on("click", ".k-button", function(e) {
                    this._action(t(e.currentTarget))
                }.bind(this)), this.element.data({
                    type: "merge",
                    merge: this,
                    instance: this
                })
            },
            buttons: [{
                value: "cells",
                iconClass: "merge-cells",
                text: i.mergeButtons.mergeCells
            }, {
                value: "horizontally",
                iconClass: "merge-horizontally",
                text: i.mergeButtons.mergeHorizontally
            }, {
                value: "vertically",
                iconClass: "merge-vertically",
                text: i.mergeButtons.mergeVertically
            }, {
                value: "unmerge",
                iconClass: "normal-layout",
                text: i.mergeButtons.unmerge
            }],
            destroy: function() {
                this.popup.element.off(), l.fn.destroy.call(this)
            },
            _commandPalette: function() {
                var e = t("<div />").appendTo(this.popup.element);
                this.buttons.forEach(function(t) {
                    var n = "<a title='" + t.text + "' data-value='" + t.value + "' class='k-button k-button-icontext'><span class='k-icon k-font-icon k-i-" + t.iconClass + "'></span>" + t.text + "</a>";
                    e.append(n)
                })
            },
            _action: function(e) {
                var t = e.attr("data-value");
                this.toolbar.action({
                    command: "MergeCellCommand",
                    options: {
                        value: t
                    }
                })
            }
        }), A = c.extend({
            _click: function() {
                this.toolbar.dialog({
                    name: "merge"
                })
            }
        }), e.toolbar.registerComponent("merge", D, A), E = l.extend({
            init: function(e, n) {
                l.fn.init.call(this, e, n), this._commandPalette(), this.popup.element.on("click", ".k-button", function(e) {
                    this._action(t(e.currentTarget))
                }.bind(this)), this.element.data({
                    type: "freeze",
                    freeze: this,
                    instance: this
                })
            },
            buttons: [{
                value: "panes",
                iconClass: "freeze-panes",
                text: i.freezeButtons.freezePanes
            }, {
                value: "rows",
                iconClass: "freeze-row",
                text: i.freezeButtons.freezeRows
            }, {
                value: "columns",
                iconClass: "freeze-col",
                text: i.freezeButtons.freezeColumns
            }, {
                value: "unfreeze",
                iconClass: "normal-layout",
                text: i.freezeButtons.unfreeze
            }],
            destroy: function() {
                this.popup.element.off(), l.fn.destroy.call(this)
            },
            _commandPalette: function() {
                var e = t("<div />").appendTo(this.popup.element);
                this.buttons.forEach(function(t) {
                    var n = "<a title='" + t.text + "' data-value='" + t.value + "' class='k-button k-button-icontext'><span class='k-icon k-font-icon k-i-" + t.iconClass + "'></span>" + t.text + "</a>";
                    e.append(n)
                })
            },
            _action: function(e) {
                var t = e.attr("data-value");
                this.toolbar.action({
                    command: "FreezePanesCommand",
                    options: {
                        value: t
                    }
                })
            }
        }), F = c.extend({
            _click: function() {
                this.toolbar.dialog({
                    name: "freeze"
                })
            }
        }), e.toolbar.registerComponent("freeze", E, F), I = s.extend({
            _revertTitle: function(e) {
                e.sender.value(""), e.sender.wrapper.width("auto")
            },
            init: function(e, t) {
                s.fn.init.call(this, e, t);
                var n = this.dropDownList;
                n.bind("change", this._revertTitle.bind(this)), n.bind("dataBound", this._revertTitle.bind(this)), n.setOptions({
                    valueTemplate: "<span class='k-icon k-font-icon k-i-" + e.iconClass + "' style='line-height: 1em; width: 1.35em;'></span>",
                    template: "<span class='k-icon k-font-icon k-i-#= iconClass #' style='line-height: 1em; width: 1.35em;'></span>#=text#",
                    dataTextField: "text",
                    dataValueField: "value"
                }), n.setDataSource([{
                    value: "asc",
                    sheet: !1,
                    text: i.sortButtons.sortRangeAsc,
                    iconClass: "sort-asc"
                }, {
                    value: "desc",
                    sheet: !1,
                    text: i.sortButtons.sortRangeDesc,
                    iconClass: "sort-desc"
                }]), n.select(0), this.element.data({
                    type: "sort",
                    sort: this
                })
            },
            _change: function(e) {
                var t = e.sender,
                    n = t.dataItem();
                n && this.toolbar.action({
                    command: "SortCommand",
                    options: {
                        value: n.value,
                        sheet: n.sheet
                    }
                })
            },
            value: t.noop
        }), M = c.extend({
            _click: function() {
                this.toolbar.dialog({
                    name: "sort"
                })
            }
        }), e.toolbar.registerComponent("sort", I, M), R = e.toolbar.ToolBarButton.extend({
            init: function(t, n) {
                t.showText = "overflow", e.toolbar.ToolBarButton.fn.init.call(this, t, n), this.element.on("click", this._click.bind(this)), this.element.data({
                    type: "filter",
                    filter: this
                })
            },
            _click: function() {
                this.toolbar.action({
                    command: "FilterCommand"
                })
            },
            update: function(e) {
                this.toggle(e)
            }
        }), P = c.extend({
            init: function(e, t) {
                c.fn.init.call(this, e, t), this.element.data({
                    type: "filter",
                    filter: this
                })
            },
            _click: function() {
                this.toolbar.action({
                    command: "FilterCommand"
                })
            },
            update: function(e) {
                this.toggle(e)
            }
        }), e.toolbar.registerComponent("filter", R, P), z = e.toolbar.Item.extend({
            init: function(e, n) {
                this.toolbar = n, this.element = t("<div class='k-button k-upload-button k-button-icon'><span class='k-icon k-font-icon k-i-folder-open' /></div>").data("instance", this), this._title = e.attributes.title, this._reset()
            },
            _reset: function() {
                this.element.remove("input"), t("<input type='file' autocomplete='off' accept='.xlsx'/>").attr("title", this._title).one("change", this._change.bind(this)).appendTo(this.element)
            },
            _change: function(e) {
                this.toolbar.action({
                    command: "OpenCommand",
                    options: {
                        file: e.target.files[0]
                    }
                }), this._reset()
            }
        }), e.toolbar.registerComponent("open", z), e.spreadsheet.TabStrip = e.ui.TabStrip.extend({
            init: function(n, i) {
                e.ui.TabStrip.fn.init.call(this, n, i), n.addClass("k-spreadsheet-tabstrip"), this._quickAccessButtons(), this.quickAccessToolBar.on("click", ".k-button", function(e) {
                    var n = t(e.currentTarget).attr("title").toLowerCase();
                    this.trigger("action", {
                        action: n
                    })
                }.bind(this)), this.toolbars = {};
                var r = i.dataSource;
                this.contentElements.each(function(e, n) {
                    this._toolbar(t(n), r[e].id, i.toolbarOptions[r[e].id])
                }.bind(this)), this.one("activate", function() {
                    this.toolbars[this.options.dataSource[0].id].resize()
                })
            },
            events: e.ui.TabStrip.fn.events.concat(["action", "dialog"]),
            destroy: function() {
                this.quickAccessToolBar.off("click"), e.ui.TabStrip.fn.destroy.call(this);
                for (var t in this.toolbars) this.toolbars[t].destroy()
            },
            action: function(e) {
                this.trigger("action", e)
            },
            dialog: function(e) {
                this.trigger("dialog", e)
            },
            refreshTools: function(e) {
                var t, n = this.toolbars;
                for (t in n) n.hasOwnProperty(t) && n[t].refresh(e)
            },
            _quickAccessButtons: function() {
                var n = [{
                        title: i.quickAccess.undo,
                        iconClass: "undo-large",
                        action: "undo"
                    }, {
                        title: i.quickAccess.redo,
                        iconClass: "redo-large",
                        action: "redo"
                    }],
                    r = e.template("<a href='\\#' title='#= title #' data-action='#= action #' class='k-button k-button-icon'><span class='k-icon k-font-icon k-i-#=iconClass#'></span></a>");
                this.quickAccessToolBar = t("<div />", {
                    "class": "k-spreadsheet-quick-access-toolbar",
                    html: e.render(r, n)
                }).insertBefore(this.wrapper), this.quickAccessToolBar.on("click", ".k-button", function(e) {
                    e.preventDefault();
                    var n = t(e.currentTarget).attr("title").toLowerCase();
                    this.action({
                        action: n
                    })
                }.bind(this)), this.quickAccessAdjust()
            },
            quickAccessAdjust: function() {
                this.tabGroup.css("padding-left", this.quickAccessToolBar.outerWidth())
            },
            _toolbar: function(t, n, i) {
                var r, o;
                this.toolbars[n] && (this.toolbars[n].destroy(), t.children(".k-toolbar").remove()), i && (r = t.html("<div />").children("div"), o = {
                    tools: "boolean" == typeof i ? void 0 : i,
                    toolbarName: n,
                    action: this.action.bind(this),
                    dialog: this.dialog.bind(this)
                }, this.toolbars[n] = new e.spreadsheet.ToolBar(r, o))
            }
        }))
    }(window.kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/dialogs.min", ["kendo.core.min", "kendo.binder.min", "kendo.validator.min"], e)
}(function() {
    ! function(e) {
        function t(t, n) {
            return e.spreadsheet.formatting.text(t, n)
        }

        function n(e, t) {
            var n, r = [],
                o = [];
            for (n = 0; t.length > n; n++) - 1 == i.inArray(t[n][e], o) && (r.push(t[n]), o.push(t[n][e]));
            return r
        }
        var i, r, o, a, s, l, c, d, u, h, f, p, m, g, v, _, b, w, y, k, x, C, S, T;
        e.support.browser.msie && 9 > e.support.browser.version || (i = e.jQuery, r = e.data.ObservableObject, o = e.spreadsheet.messages.dialogs = {
            apply: "Apply",
            save: "Save",
            cancel: "Cancel",
            remove: "Remove",
            okText: "OK",
            formatCellsDialog: {
                title: "Format",
                categories: {
                    number: "Number",
                    currency: "Currency",
                    date: "Date"
                }
            },
            fontFamilyDialog: {
                title: "Font"
            },
            fontSizeDialog: {
                title: "Font size"
            },
            bordersDialog: {
                title: "Borders"
            },
            alignmentDialog: {
                title: "Alignment",
                buttons: {
                    justtifyLeft: "Align left",
                    justifyCenter: "Center",
                    justifyRight: "Align right",
                    justifyFull: "Justify",
                    alignTop: "Align top",
                    alignMiddle: "Align middle",
                    alignBottom: "Align bottom"
                }
            },
            mergeDialog: {
                title: "Merge cells",
                buttons: {
                    mergeCells: "Merge all",
                    mergeHorizontally: "Merge horizontally",
                    mergeVertically: "Merge vertically",
                    unmerge: "Unmerge"
                }
            },
            freezeDialog: {
                title: "Freeze panes",
                buttons: {
                    freezePanes: "Freeze panes",
                    freezeRows: "Freeze rows",
                    freezeColumns: "Freeze columns",
                    unfreeze: "Unfreeze panes"
                }
            },
            validationDialog: {
                title: "Data Validation",
                hintMessage: "Please enter a valid {0} value {1}.",
                hintTitle: "Validation {0}",
                criteria: {
                    any: "Any value",
                    number: "Number",
                    text: "Text",
                    date: "Date",
                    custom: "Custom Formula",
                    list: "List"
                },
                comparers: {
                    greaterThan: "greater than",
                    lessThan: "less than",
                    between: "between",
                    notBetween: "not between",
                    equalTo: "equal to",
                    notEqualTo: "not equal to",
                    greaterThanOrEqualTo: "greater than or equal to",
                    lessThanOrEqualTo: "less than or equal to"
                },
                comparerMessages: {
                    greaterThan: "greater than {0}",
                    lessThan: "less than {0}",
                    between: "between {0} and {1}",
                    notBetween: "not between {0} and {1}",
                    equalTo: "equal to {0}",
                    notEqualTo: "not equal to {0}",
                    greaterThanOrEqualTo: "greater than or equal to {0}",
                    lessThanOrEqualTo: "less than or equal to {0}",
                    custom: "that satisfies the formula: {0}"
                },
                labels: {
                    criteria: "Criteria",
                    comparer: "Comparer",
                    min: "Min",
                    max: "Max",
                    value: "Value",
                    start: "Start",
                    end: "End",
                    onInvalidData: "On invalid data",
                    rejectInput: "Reject input",
                    showWarning: "Show warning",
                    showHint: "Show hint",
                    hintTitle: "Hint title",
                    hintMessage: "Hint message",
                    ignoreBlank: "Ignore blank"
                },
                placeholders: {
                    typeTitle: "Type title",
                    typeMessage: "Type message"
                }
            },
            exportAsDialog: {
                title: "Export...",
                labels: {
                    scale: "Scale",
                    fit: "Fit to page",
                    fileName: "File name",
                    saveAsType: "Save as type",
                    exportArea: "Export",
                    paperSize: "Paper size",
                    margins: "Margins",
                    orientation: "Orientation",
                    print: "Print",
                    guidelines: "Guidelines",
                    center: "Center",
                    horizontally: "Horizontally",
                    vertically: "Vertically"
                }
            },
            modifyMergedDialog: {
                errorMessage: "Cannot change part of a merged cell."
            },
            overflowDialog: {
                errorMessage: "Cannot paste, because the copy area and the paste area are not the same size and shape."
            },
            useKeyboardDialog: {
                title: "Copying and pasting",
                errorMessage: "These actions cannot be invoked through the menu. Please use the keyboard shortcuts instead:",
                labels: {
                    forCopy: "for copy",
                    forCut: "for cut",
                    forPaste: "for paste"
                }
            },
            unsupportedSelectionDialog: {
                errorMessage: "That action cannot be performed on multiple selection."
            }
        }, a = {}, e.spreadsheet.dialogs = {
            register: function(e, t) {
                a[e] = t
            },
            registered: function(e) {
                return !!a[e]
            },
            create: function(e, t) {
                var n = a[e];
                return n ? new n(t) : void 0
            }
        }, s = e.spreadsheet.SpreadsheetDialog = e.Observable.extend({
            init: function(t) {
                e.Observable.fn.init.call(this, t), this.options = i.extend(!0, {}, this.options, t), this.bind(this.events, t)
            },
            events: ["close", "activate"],
            dialog: function() {
                return this._dialog || (this._dialog = i("<div class='k-spreadsheet-window k-action-window' />").addClass(this.options.className || "").append(e.template(this.options.template)({
                    messages: e.spreadsheet.messages.dialogs || o
                })).appendTo(document.body).kendoWindow({
                    scrollable: !1,
                    resizable: !1,
                    maximizable: !1,
                    modal: !0,
                    visible: !1,
                    width: this.options.width || 320,
                    title: this.options.title,
                    open: function() {
                        this.center()
                    },
                    close: this._onDialogClose.bind(this),
                    activate: this._onDialogActivate.bind(this),
                    deactivate: this._onDialogDeactivate.bind(this)
                }).data("kendoWindow")), this._dialog
            },
            _onDialogClose: function() {
                this.trigger("close")
            },
            _onDialogActivate: function() {
                this.trigger("activate")
            },
            _onDialogDeactivate: function() {
                this.trigger("deactivate"), this.destroy()
            },
            destroy: function() {
                this._dialog && (this._dialog.destroy(), this._dialog = null)
            },
            open: function() {
                this.dialog().open()
            },
            apply: function() {
                this.close()
            },
            close: function() {
                this.dialog().close()
            }
        }), l = e.spreadsheet.FormatCellsViewModel = r.extend({
            init: function(e) {
                r.fn.init.call(this, e), this.useCategory(this.category)
            },
            useCategory: function(e) {
                var t = e && e.type || "number",
                    n = "currency" == t;
                this.category = e, this.set("showCurrencyFilter", n && this.currencies.length > 1), n ? this.currency(this.currencies[0]) : this.set("formats", this.allFormats[t + "Formats"]), this.useFirstFormat()
            },
            useFirstFormat: function() {
                this.formats.length && this.set("format", this.formats[0].value)
            },
            currency: function(e) {
                var n, i;
                return void 0 !== e && (this._currency = e, n = e.value, i = [{
                    currency: n,
                    decimals: !0
                }, {
                    currency: n,
                    decimals: !0,
                    iso: !0
                }, {
                    currency: n,
                    decimals: !1
                }], i = i.map(function(e) {
                    return e = l.convert.currency(e), {
                        value: e,
                        name: t(1e3, e)
                    }
                }), this.set("formats", i), this.useFirstFormat()), this._currency || this.currencies[0]
            },
            categoryFilter: function(e) {
                return void 0 !== e && this.useCategory(e), this.category
            },
            preview: function() {
                var e = this.get("format"),
                    n = this.value || 0;
                return e && e.length ? t(n, e) : n
            }
        }), l.convert = {
            currency: function(e) {
                function t(e, t) {
                    return Array(t + 1).join(e)
                }
                var n = e.currency,
                    i = n.pattern[1];
                return e.decimals && (i = i.replace(/n/g, "n" + n["."] + t("0", n.decimals))), i = e.iso ? '"' + n.abbr + '" ' + i.replace(/\s*\$\s*/g, "") : i.replace(/\$/g, n.symbol), i = i.replace(/n/g, "?")
            },
            date: function(e) {
                return /T|Z/.test(e) ? "" : e.toLowerCase().replace(/tt/g, "AM/PM").replace(/'/g, '"')
            }
        }, c = s.extend({
            init: function(t) {
                var n = e.spreadsheet.messages.dialogs.formatCellsDialog || o,
                    r = {
                        title: n.title,
                        categories: [{
                            type: "number",
                            name: n.categories.number
                        }, {
                            type: "currency",
                            name: n.categories.currency
                        }, {
                            type: "date",
                            name: n.categories.date
                        }]
                    };
                s.fn.init.call(this, i.extend(r, t)), this._generateFormats()
            },
            options: {
                className: "k-spreadsheet-format-cells",
                template: "<div class='k-root-tabs' data-role='tabstrip' data-text-field='name' data-bind='source: categories, value: categoryFilter' data-animation='false' /><div class='k-spreadsheet-preview' data-bind='text: preview' /><script type='text/x-kendo-template' id='format-item-template'>\\#: data.name \\#</script><select data-role='dropdownlist' class='k-format-filter' data-text-field='description' data-value-field='value.name' data-bind='visible: showCurrencyFilter, value: currency, source: currencies' /><ul data-role='staticlist' tabindex='0' class='k-list k-reset' data-template='format-item-template' data-value-primitive='true' data-value-field='value' data-bind='source: formats, value: format' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>"
            },
            _generateFormats: function() {
                var r, o = this.options;
                o.currencies || (o.currencies = c.currenciesFrom(e.cultures)), o.numberFormats || (o.numberFormats = [{
                    value: "#.00%",
                    name: "100.00%"
                }, {
                    value: "#%",
                    name: "100%"
                }, {
                    value: "#.00",
                    name: "1024.00"
                }, {
                    value: "#,###.00",
                    name: "1,024.00"
                }]), o.dateFormats || (r = e.cultures.current.calendars.standard.patterns, o.dateFormats = n("value", i.map(r, function(e) {
                    return (e = l.convert.date(e)) ? {
                        value: e,
                        name: t(34567.7678, e)
                    } : void 0
                })))
            },
            open: function(t) {
                var n, i, r = this.options,
                    o = t.value(),
                    a = r.categories.slice(0);
                this.viewModel = new l({
                    currencies: r.currencies.slice(0),
                    allFormats: {
                        numberFormats: r.numberFormats.slice(0),
                        dateFormats: r.dateFormats.slice(0)
                    },
                    categories: a,
                    format: t.format(),
                    category: o instanceof Date ? a[2] : a[0],
                    apply: this.apply.bind(this),
                    close: this.close.bind(this),
                    value: o
                }), s.fn.open.call(this), n = this.dialog().element, e.bind(n, this.viewModel), i = n.find("select.k-format-filter").data("kendoDropDownList"), r.currencies.length > 10 && i.setOptions({
                    filter: "contains"
                }), n.find(e.roleSelector("staticlist")).parent().addClass("k-list-wrapper")
            },
            apply: function() {
                var e = this.viewModel.format;
                s.fn.apply.call(this), this.trigger("action", {
                    command: "PropertyChangeCommand",
                    options: {
                        property: "format",
                        value: e
                    }
                })
            }
        }), c.currenciesFrom = function(t) {
            return n("description", i.map(t, function(t, n) {
                var i, r;
                if (/-/.test(n)) return i = t.numberFormat.currency, r = e.format("{0} ({1}, {2})", i.name, i.abbr, i.symbol), {
                    description: r,
                    value: i
                }
            }))
        }, e.spreadsheet.dialogs.register("formatCells", c), e.spreadsheet.dialogs.FormatCellsDialog = c, d = s.extend({
            options: {
                className: "k-spreadsheet-message",
                title: "",
                messageId: "",
                text: "",
                template: "<div class='k-spreadsheet-message-content' data-bind='text: text' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: close'>#= messages.okText #</button></div>"
            },
            open: function() {
                var t, n;
                s.fn.open.call(this), t = this.options, n = t.text, t.messageId && (n = e.getter(t.messageId, !0)(e.spreadsheet.messages.dialogs)), e.bind(this.dialog().element, {
                    text: n,
                    close: this.close.bind(this)
                })
            }
        }), e.spreadsheet.dialogs.register("message", d), u = s.extend({
            init: function(t) {
                var n = e.spreadsheet.messages.dialogs.fontFamilyDialog || o;
                s.fn.init.call(this, i.extend({
                    title: n.title
                }, t)), this._list()
            },
            options: {
                template: "<ul class='k-list k-reset'></ul>"
            },
            _list: function() {
                var t = this.dialog().element.find("ul"),
                    n = this.options.fonts,
                    i = this.options.defaultFont;
                this.list = new e.ui.StaticList(t, {
                    dataSource: new e.data.DataSource({
                        data: n
                    }),
                    template: "#: data #",
                    value: i,
                    change: this.apply.bind(this)
                }), this.list.dataSource.fetch()
            },
            apply: function(e) {
                s.fn.apply.call(this), this.trigger("action", {
                    command: "PropertyChangeCommand",
                    options: {
                        property: "fontFamily",
                        value: e.sender.value()[0]
                    }
                })
            }
        }), e.spreadsheet.dialogs.register("fontFamily", u), h = s.extend({
            init: function(t) {
                var n = e.spreadsheet.messages.dialogs.fontSizeDialog || o;
                s.fn.init.call(this, i.extend({
                    title: n.title
                }, t)), this._list()
            },
            options: {
                template: "<ul class='k-list k-reset'></ul>"
            },
            _list: function() {
                var t = this.dialog().element.find("ul"),
                    n = this.options.sizes,
                    i = this.options.defaultSize;
                this.list = new e.ui.StaticList(t, {
                    dataSource: new e.data.DataSource({
                        data: n
                    }),
                    template: "#: data #",
                    value: i,
                    change: this.apply.bind(this)
                }), this.list.dataSource.fetch()
            },
            apply: function(t) {
                s.fn.apply.call(this), this.trigger("action", {
                    command: "PropertyChangeCommand",
                    options: {
                        property: "fontSize",
                        value: e.parseInt(t.sender.value()[0])
                    }
                })
            }
        }), e.spreadsheet.dialogs.register("fontSize", h), f = s.extend({
            init: function(t) {
                var n = e.spreadsheet.messages.dialogs.bordersDialog || o;
                s.fn.init.call(this, i.extend({
                    title: n.title
                }, t)), this.element = this.dialog().element, this._borderPalette(), this.viewModel = e.observable({
                    apply: this.apply.bind(this),
                    close: this.close.bind(this)
                }), e.bind(this.element.find(".k-action-buttons"), this.viewModel)
            },
            options: {
                width: 177,
                template: "<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>"
            },
            apply: function() {
                s.fn.apply.call(this);
                var e = this.value();
                this.trigger("action", {
                    command: "BorderChangeCommand",
                    options: {
                        border: e.type,
                        style: {
                            size: 1,
                            color: e.color
                        }
                    }
                })
            },
            _borderPalette: function() {
                var t = this.dialog().element.find("div:first");
                this.borderPalette = new e.spreadsheet.BorderPalette(t, {
                    change: this.value.bind(this)
                })
            },
            value: function(e) {
                return void 0 === e ? this._state : void(this._state = e)
            }
        }), e.spreadsheet.dialogs.register("borders", f), p = s.extend({
            init: function(t) {
                s.fn.init.call(this, t), this.element = this.dialog().element, this.property = t.property, this.options.title = t.title, this.viewModel = e.observable({
                    apply: this.apply.bind(this),
                    close: this.close.bind(this)
                }), e.bind(this.element.find(".k-action-buttons"), this.viewModel)
            },
            options: {
                template: "<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>"
            },
            apply: function() {
                s.fn.apply.call(this), this.trigger("action", {
                    command: "PropertyChangeCommand",
                    options: {
                        property: this.property,
                        value: this.value()
                    }
                })
            },
            value: function(e) {
                return void 0 === e ? this._value : void(this._value = e.value)
            }
        }), m = p.extend({
            init: function(e) {
                e.width = 177, p.fn.init.call(this, e), this._colorPalette()
            },
            _colorPalette: function() {
                var e = this.dialog().element.find("div:first");
                this.colorPalette = e.kendoColorPalette({
                    palette: ["#ffffff", "#000000", "#d6ecff", "#4e5b6f", "#7fd13b", "#ea157a", "#feb80a", "#00addc", "#738ac8", "#1ab39f", "#f2f2f2", "#7f7f7f", "#a7d6ff", "#d9dde4", "#e5f5d7", "#fad0e4", "#fef0cd", "#c5f2ff", "#e2e7f4", "#c9f7f1", "#d8d8d8", "#595959", "#60b5ff", "#b3bcca", "#cbecb0", "#f6a1c9", "#fee29c", "#8be6ff", "#c7d0e9", "#94efe3", "#bfbfbf", "#3f3f3f", "#007dea", "#8d9baf", "#b2e389", "#f272af", "#fed46b", "#51d9ff", "#aab8de", "#5fe7d5", "#a5a5a5", "#262626", "#003e75", "#3a4453", "#5ea226", "#af0f5b", "#c58c00", "#0081a5", "#425ea9", "#138677", "#7f7f7f", "#0c0c0c", "#00192e", "#272d37", "#3f6c19", "#750a3d", "#835d00", "#00566e", "#2c3f71", "#0c594f"],
                    change: this.value.bind(this)
                }).data("kendoColorPalette")
            }
        }), e.spreadsheet.dialogs.register("colorPicker", m), g = p.extend({
            init: function(e) {
                e.width = 268, p.fn.init.call(this, e), this.dialog().setOptions({
                    animation: !1
                }), this.dialog().one("activate", this._colorPicker.bind(this))
            },
            _colorPicker: function() {
                var e = this.dialog().element.find("div:first");
                this.colorPicker = e.kendoFlatColorPicker({
                    change: this.value.bind(this)
                }).data("kendoFlatColorPicker")
            }
        }), e.spreadsheet.dialogs.register("customColor", g), v = s.extend({
            init: function(t) {
                var n = e.spreadsheet.messages.dialogs.alignmentDialog || o,
                    r = {
                        title: n.title,
                        buttons: [{
                            property: "textAlign",
                            value: "left",
                            iconClass: "justify-left",
                            text: n.buttons.justtifyLeft
                        }, {
                            property: "textAlign",
                            value: "center",
                            iconClass: "justify-center",
                            text: n.buttons.justifyCenter
                        }, {
                            property: "textAlign",
                            value: "right",
                            iconClass: "justify-right",
                            text: n.buttons.justifyRight
                        }, {
                            property: "textAlign",
                            value: "justify",
                            iconClass: "justify-full",
                            text: n.buttons.justifyFull
                        }, {
                            property: "verticalAlign",
                            value: "top",
                            iconClass: "align-top",
                            text: n.buttons.alignTop
                        }, {
                            property: "verticalAlign",
                            value: "center",
                            iconClass: "align-middle",
                            text: n.buttons.alignMiddle
                        }, {
                            property: "verticalAlign",
                            value: "bottom",
                            iconClass: "align-bottom",
                            text: n.buttons.alignBottom
                        }]
                    };
                s.fn.init.call(this, i.extend(r, t)), this._list()
            },
            options: {
                template: "<ul class='k-list k-reset'></ul>"
            },
            _list: function() {
                var t = this.dialog().element.find("ul");
                this.list = new e.ui.StaticList(t, {
                    dataSource: new e.data.DataSource({
                        data: this.options.buttons
                    }),
                    template: "<a title='#=text#' data-property='#=property#' data-value='#=value#'><span class='k-icon k-font-icon k-i-#=iconClass#'></span>#=text#</a>",
                    change: this.apply.bind(this)
                }), this.list.dataSource.fetch()
            },
            apply: function(e) {
                var t = e.sender.value()[0];
                s.fn.apply.call(this), this.trigger("action", {
                    command: "PropertyChangeCommand",
                    options: {
                        property: t.property,
                        value: t.value
                    }
                })
            }
        }), e.spreadsheet.dialogs.register("alignment", v), _ = s.extend({
            init: function(t) {
                var n = e.spreadsheet.messages.dialogs.mergeDialog || o,
                    r = {
                        title: n.title,
                        buttons: [{
                            value: "cells",
                            iconClass: "merge-cells",
                            text: n.buttons.mergeCells
                        }, {
                            value: "horizontally",
                            iconClass: "merge-horizontally",
                            text: n.buttons.mergeHorizontally
                        }, {
                            value: "vertically",
                            iconClass: "merge-vertically",
                            text: n.buttons.mergeVertically
                        }, {
                            value: "unmerge",
                            iconClass: "normal-layout",
                            text: n.buttons.unmerge
                        }]
                    };
                s.fn.init.call(this, i.extend(r, t)), this._list()
            },
            options: {
                template: "<ul class='k-list k-reset'></ul>"
            },
            _list: function() {
                var t = this.dialog().element.find("ul");
                this.list = new e.ui.StaticList(t, {
                    dataSource: new e.data.DataSource({
                        data: this.options.buttons
                    }),
                    template: "<a title='#=text#' data-value='#=value#'><span class='k-icon k-font-icon k-i-#=iconClass#'></span>#=text#</a>",
                    change: this.apply.bind(this)
                }), this.list.dataSource.fetch()
            },
            apply: function(e) {
                var t = e.sender.value()[0];
                s.fn.apply.call(this), this.trigger("action", {
                    command: "MergeCellCommand",
                    options: {
                        value: t.value
                    }
                })
            }
        }), e.spreadsheet.dialogs.register("merge", _), b = s.extend({
            init: function(t) {
                var n = e.spreadsheet.messages.dialogs.freezeDialog || o,
                    r = {
                        title: n.title,
                        buttons: [{
                            value: "panes",
                            iconClass: "freeze-panes",
                            text: n.buttons.freezePanes
                        }, {
                            value: "rows",
                            iconClass: "freeze-row",
                            text: n.buttons.freezeRows
                        }, {
                            value: "columns",
                            iconClass: "freeze-col",
                            text: n.buttons.freezeColumns
                        }, {
                            value: "unfreeze",
                            iconClass: "normal-layout",
                            text: n.buttons.unfreeze
                        }]
                    };
                s.fn.init.call(this, i.extend(r, t)), this._list()
            },
            options: {
                template: "<ul class='k-list k-reset'></ul>"
            },
            _list: function() {
                var t = this.dialog().element.find("ul");
                this.list = new e.ui.StaticList(t, {
                    dataSource: new e.data.DataSource({
                        data: this.options.buttons
                    }),
                    template: "<a title='#=text#' data-value='#=value#'><span class='k-icon k-font-icon k-i-#=iconClass#'></span>#=text#</a>",
                    change: this.apply.bind(this)
                }), this.list.dataSource.fetch()
            },
            apply: function(e) {
                var t = e.sender.value()[0];
                s.fn.apply.call(this), this.trigger("action", {
                    command: "FreezePanesCommand",
                    options: {
                        value: t.value
                    }
                })
            }
        }), e.spreadsheet.dialogs.register("freeze", b), w = e.spreadsheet.ValidationCellsViewModel = r.extend({
            init: function(e) {
                r.fn.init.call(this, e), this.bind("change", function(e) {
                    "criterion" === e.field && (this.reset(), ("custom" === this.criterion || "list" === this.criterion) && this.setHintMessageTemplate()), "comparer" === e.field && this.setHintMessageTemplate(), "hintMessage" != e.field && "hintTitle" != e.field || this._mute || (this.shouldBuild = !1), "from" != e.field && "to" != e.field && "hintMessageTemplate" != e.field && "type" != e.field || !this.shouldBuild || this.buildMessages()
                }.bind(this)), this.reset()
            },
            buildMessages: function() {
                this._mute = !0, this.set("hintTitle", this.hintTitleTemplate ? e.format(this.hintTitleTemplate, this.type) : ""), this.set("hintMessage", this.hintMessageTemplate ? e.format(this.hintMessageTemplate, this.from, this.to) : ""), this._mute = !1
            },
            reset: function() {
                this.setComparers(), this.set("comparer", this.comparers[0].type), this.set("from", null), this.set("to", null), this.set("useCustomMessages", !1), this.shouldBuild = !0, this.hintTitleTemplate = this.defaultHintTitle, this.buildMessages()
            },
            setComparers: function() {
                var e, t, n = this.defaultComparers,
                    i = [];
                if ("text" === this.criterion)
                    for (e = ["equalTo", "notEqualTo"], t = 0; n.length > t; t++) e[0] == n[t].type && (i.push(n[t]), e.shift());
                else i = n.slice();
                this.set("comparers", i)
            },
            setHintMessageTemplate: function() {
                "custom" !== this.criterion && "list" !== this.criterion ? this.set("hintMessageTemplate", e.format(this.defaultHintMessage, this.criterion, this.comparerMessages[this.comparer])) : (this.set("hintMessageTemplate", ""), this.set("hintMessage", ""))
            },
            isAny: function() {
                return "any" === this.get("criterion")
            },
            isNumber: function() {
                return "number" === this.get("criterion")
            },
            showToForNumber: function() {
                return this.showTo() && this.isNumber()
            },
            showToForDate: function() {
                return this.showTo() && this.isDate()
            },
            isText: function() {
                return "text" === this.get("criterion")
            },
            isDate: function() {
                return "date" === this.get("criterion")
            },
            isList: function() {
                return "list" === this.get("criterion")
            },
            isCustom: function() {
                return "custom" === this.get("criterion")
            },
            showRemove: function() {
                return this.get("hasValidation")
            },
            showTo: function() {
                return "between" == this.get("comparer") || "notBetween" == this.get("comparer")
            },
            update: function(e) {
                this.set("hasValidation", !!e), e && this.fromValidationObject(e)
            },
            fromValidationObject: function(e) {
                this.set("criterion", e.dataType), this.set("comparer", e.comparerType), this.set("from", e.from), this.set("to", e.to), this.set("type", e.type), this.set("ignoreBlank", e.allowNulls), e.messageTemplate || e.titleTemplate ? (this.hintMessageTemplate = e.messageTemplate, this.hintMessage = e.messageTemplate, this.hintTitleTemplate = e.titleTemplate, this.hintTitle = e.titleTemplate, this.useCustomMessages = !0, this.buildMessages()) : this.useCustomMessages = !1
            },
            toValidationObject: function() {
                if ("any" === this.criterion) return null;
                var e = {
                    type: this.type,
                    dataType: this.criterion,
                    comparerType: this.comparer,
                    from: this.from,
                    to: this.to,
                    allowNulls: this.ignoreBlank
                };
                return this.useCustomMessages && (e.messageTemplate = this.shouldBuild ? this.hintMessageTemplate : this.hintMessage, e.titleTemplate = this.hintTitle), e
            }
        }), y = s.extend({
            init: function(t) {
                var n = e.spreadsheet.messages.dialogs.validationDialog || o,
                    r = {
                        title: n.title,
                        hintMessage: n.hintMessage,
                        hintTitle: n.hintTitle,
                        criteria: [{
                            type: "any",
                            name: n.criteria.any
                        }, {
                            type: "number",
                            name: n.criteria.number
                        }, {
                            type: "text",
                            name: n.criteria.text
                        }, {
                            type: "date",
                            name: n.criteria.date
                        }, {
                            type: "custom",
                            name: n.criteria.custom
                        }, {
                            type: "list",
                            name: n.criteria.list
                        }],
                        comparers: [{
                            type: "greaterThan",
                            name: n.comparers.greaterThan
                        }, {
                            type: "lessThan",
                            name: n.comparers.lessThan
                        }, {
                            type: "between",
                            name: n.comparers.between
                        }, {
                            type: "notBetween",
                            name: n.comparers.notBetween
                        }, {
                            type: "equalTo",
                            name: n.comparers.equalTo
                        }, {
                            type: "notEqualTo",
                            name: n.comparers.notEqualTo
                        }, {
                            type: "greaterThanOrEqualTo",
                            name: n.comparers.greaterThanOrEqualTo
                        }, {
                            type: "lessThanOrEqualTo",
                            name: n.comparers.lessThanOrEqualTo
                        }],
                        comparerMessages: n.comparerMessages
                    };
                s.fn.init.call(this, i.extend(r, t))
            },
            options: {
                width: 420,
                criterion: "any",
                type: "reject",
                ignoreBlank: !0,
                useCustomMessages: !1,
                errorTemplate: '<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-warning"> </span>#= message #<div class="k-callout k-callout-n"></div></div>',
                template: '<div class="k-edit-form-container"><div class="k-edit-label"><label>#: messages.validationDialog.labels.criteria #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" data-text-field="name" data-value-field="type" data-bind="value: criterion, source: criteria" /></div><div data-bind="visible: isNumber"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.min #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.min #" placeholder="e.g. 10" class="k-textbox" data-bind="value: from, enabled: isNumber" required="required" /></div><div data-bind="visible: showTo"><div class="k-edit-label"><label>#: messages.validationDialog.labels.max #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.max #" placeholder="e.g. 100" class="k-textbox" data-bind="value: to, enabled: showToForNumber" required="required" /></div></div></div><div data-bind="visible: isText"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isText" required="required" /></div></div><div data-bind="visible: isDate"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.start #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.start #" class="k-textbox" data-bind="value: from, enabled: isDate" required="required" /></div><div data-bind="visible: showTo"><div class="k-edit-label"><label>#: messages.validationDialog.labels.end #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.end #" class="k-textbox" data-bind="value: to, enabled: showToForDate" required="required" /></div></div></div><div data-bind="visible: isCustom"><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isCustom" required="required" /></div></div><div data-bind="visible: isList"><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isList" required="required" /></div></div><div data-bind="invisible: isAny"><div class="k-edit-label"><label>#: messages.validationDialog.labels.ignoreBlank #:</label></div><div class="k-edit-field"><input type="checkbox" name="ignoreBlank" id="ignoreBlank" class="k-checkbox" data-bind="checked: ignoreBlank"/><label class="k-checkbox-label" for="ignoreBlank"></label></div></div><div data-bind="invisible: isAny"><div class="k-action-buttons"></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.onInvalidData #:</label></div><div class="k-edit-field"><input type="radio" id="validationTypeReject" name="validationType" value="reject" data-bind="checked: type" class="k-radio" /><label for="validationTypeReject" class="k-radio-label">#: messages.validationDialog.labels.rejectInput #</label> <input type="radio" id="validationTypeWarning" name="validationType" value="warning" data-bind="checked: type" class="k-radio" /><label for="validationTypeWarning" class="k-radio-label">#: messages.validationDialog.labels.showWarning #</label></div></div><div data-bind="invisible: isAny"><div class="k-edit-label"><label>#: messages.validationDialog.labels.showHint #:</label></div><div class="k-edit-field"><input type="checkbox" name="useCustomMessages" id="useCustomMessages" class="k-checkbox" data-bind="checked: useCustomMessages" /><label class="k-checkbox-label" for="useCustomMessages"></label></div><div data-bind="visible: useCustomMessages"><div class="k-edit-label"><label>#: messages.validationDialog.labels.hintTitle #:</label></div><div class="k-edit-field"><input class="k-textbox" placeholder="#: messages.validationDialog.placeholders.typeTitle #" data-bind="value: hintTitle" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.hintMessage #:</label></div><div class="k-edit-field"><input class="k-textbox" placeholder="#: messages.validationDialog.placeholders.typeMessage #" data-bind="value: hintMessage" /></div></div></div><div class="k-action-buttons"><button class="k-button" data-bind="visible: showRemove, click: remove">#: messages.remove #</button><button class="k-button k-primary" data-bind="click: apply">#: messages.apply #</button><button class="k-button" data-bind="click: close">#: messages.cancel #</button></div></div>'
            },
            open: function(t) {
                var n, i = this.options;
                this.viewModel = new w({
                    type: i.type,
                    defaultHintMessage: i.hintMessage,
                    defaultHintTitle: i.hintTitle,
                    defaultComparers: i.comparers.slice(0),
                    comparerMessages: i.comparerMessages,
                    criteria: i.criteria.slice(0),
                    criterion: i.criterion,
                    ignoreBlank: i.ignoreBlank,
                    apply: this.apply.bind(this),
                    close: this.close.bind(this),
                    remove: this.remove.bind(this)
                }), this.viewModel.update(t.validation()), s.fn.open.call(this), n = this.dialog().element, this.validatable && this.validatable.destroy(), e.bind(n, this.viewModel), this.validatable = new e.ui.Validator(n.find(".k-edit-form-container"), {
                    validateOnBlur: !1,
                    errorTemplate: this.options.errorTemplate || void 0
                })
            },
            apply: function() {
                this.validatable.validate() && (s.fn.apply.call(this), this.trigger("action", {
                    command: "EditValidationCommand",
                    options: {
                        value: this.viewModel.toValidationObject()
                    }
                }))
            },
            remove: function() {
                this.viewModel.set("criterion", "any"), this.apply()
            }
        }), e.spreadsheet.dialogs.register("validation", y), e.spreadsheet.dialogs.ValidationDialog = y, k = s.extend({
            init: function(t) {
                var n = e.spreadsheet.messages.dialogs.exportAsDialog || o;
                s.fn.init.call(this, i.extend({
                    title: n.title
                }, t)), this.viewModel = e.observable({
                    title: this.options.title,
                    name: this.options.name,
                    extension: this.options.extension,
                    fileFormats: this.options.fileFormats,
                    excel: t.excelExport,
                    pdf: {
                        proxyURL: t.pdfExport.proxyURL,
                        forceProxy: t.pdfExport.forceProxy,
                        title: t.pdfExport.title,
                        author: t.pdfExport.author,
                        subject: t.pdfExport.subject,
                        keywords: t.pdfExport.keywords,
                        creator: t.pdfExport.creator,
                        date: t.pdfExport.date,
                        fitWidth: this.options.pdf.fitWidth,
                        area: this.options.pdf.area,
                        areas: this.options.pdf.areas,
                        paperSize: this.options.pdf.paperSize,
                        paperSizes: this.options.pdf.paperSizes,
                        margin: this.options.pdf.margin,
                        margins: this.options.pdf.margins,
                        landscape: this.options.pdf.landscape,
                        guidelines: this.options.pdf.guidelines,
                        hCenter: this.options.pdf.hCenter,
                        vCenter: this.options.pdf.vCenter
                    },
                    apply: this.apply.bind(this),
                    close: this.close.bind(this)
                }), this.viewModel.bind("change", function(e) {
                    "extension" === e.field && this.set("showPdfOptions", ".pdf" === this.extension ? !0 : !1)
                }), e.bind(this.dialog().element, this.viewModel)
            },
            options: {
                name: "Workbook",
                extension: ".xlsx",
                fileFormats: [{
                    description: "Excel Workbook (.xlsx)",
                    extension: ".xlsx"
                }, {
                    description: "Portable Document Format(.pdf)",
                    extension: ".pdf"
                }],
                pdf: {
                    fitWidth: !0,
                    area: "workbook",
                    areas: [{
                        area: "workbook",
                        text: "Entire Workbook"
                    }, {
                        area: "sheet",
                        text: "Active Sheet"
                    }, {
                        area: "selection",
                        text: "Selection"
                    }],
                    paperSize: "a4",
                    paperSizes: [{
                        value: "a2",
                        text: "A2 (420 mm × 594 mm)     "
                    }, {
                        value: "a3",
                        text: "A3 (297 mm x 420 mm)     "
                    }, {
                        value: "a4",
                        text: "A4 (210 mm x 297 mm)     "
                    }, {
                        value: "a5",
                        text: "A5 (148 mm x 210 mm)     "
                    }, {
                        value: "b3",
                        text: "B3 (353 mm × 500 mm)     "
                    }, {
                        value: "b4",
                        text: "B4 (250 mm x 353 mm)     "
                    }, {
                        value: "b5",
                        text: "B5 (176 mm x 250 mm)     "
                    }, {
                        value: "folio",
                        text: 'Folio (8.5" x 13")       '
                    }, {
                        value: "legal",
                        text: 'Legal (8.5" x 14")       '
                    }, {
                        value: "letter",
                        text: 'Letter (8.5" x 11")      '
                    }, {
                        value: "tabloid",
                        text: 'Tabloid (11" x 17")      '
                    }, {
                        value: "executive",
                        text: 'Executive (7.25" x 10.5")'
                    }],
                    margin: {
                        bottom: "0.75in",
                        left: "0.7in",
                        right: "0.7in",
                        top: "0.75in"
                    },
                    margins: [{
                        value: {
                            bottom: "0.75in",
                            left: "0.7in",
                            right: "0.7in",
                            top: "0.75in"
                        },
                        text: "Normal"
                    }, {
                        value: {
                            bottom: "0.75in",
                            left: "0.25in",
                            right: "0.25in",
                            top: "0.75in"
                        },
                        text: "Narrow"
                    }, {
                        value: {
                            bottom: "1in",
                            left: "1in",
                            right: "1in",
                            top: "1in"
                        },
                        text: "Wide"
                    }],
                    landscape: !0,
                    guidelines: !0,
                    hCenter: !0,
                    vCenter: !0
                },
                width: 520,
                template: "<div class='k-edit-label'><label>#: messages.exportAsDialog.labels.fileName #:</label></div><div class='k-edit-field'><input class='k-textbox' data-bind='value: name' /></div><div ><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.saveAsType #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='description' data-value-field='extension' data-bind='value: extension, source: fileFormats' /></div></div><div class='export-config' data-bind='visible: showPdfOptions'><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.exportArea #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='text' data-value-field='area' data-bind='value: pdf.area, source: pdf.areas' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.paperSize#:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='text' data-value-field='value' data-bind='value: pdf.paperSize, source: pdf.paperSizes' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.margins #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-value-primitive='true'data-text-field='text' data-value-field='value' data-bind='value: pdf.margin, source: pdf.margins' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.orientation #:</label></div><div class='k-edit-field'><input type='radio' id='k-orientation-portrait' name='orientation' data-type='boolean' data-bind='checked: pdf.landscape' value='false' /><label class='k-orientation-label k-orientation-portrait-label' for='k-orientation-portrait'></label><input type='radio' id='k-orientation-landscape' name='orientation' data-type='boolean' data-bind='checked: pdf.landscape' value='true' /><label class='k-orientation-label k-orientation-landscape-label' for='k-orientation-landscape'></label></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.print #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='guidelines' type='checkbox' data-bind='checked: pdf.guidelines'/><label class='k-checkbox-label' for='guidelines'>#: messages.exportAsDialog.labels.guidelines#</label></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.scale #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='fitWidth' type='checkbox' data-bind='checked: pdf.fitWidth'/><label class='k-checkbox-label' for='fitWidth'>#: messages.exportAsDialog.labels.fit #</label></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.center #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='hCenter' type='checkbox' data-bind='checked: pdf.hCenter'/><label class='k-checkbox-label' for='hCenter'>#: messages.exportAsDialog.labels.horizontally #</label><input class='k-checkbox' id='vCenter' type='checkbox' data-bind='checked: pdf.vCenter'/><label class='k-checkbox-label' for='vCenter'>#: messages.exportAsDialog.labels.vertically #</label></div><div class='k-page-orientation' data-bind='css: {k-page-landscape: pdf.landscape}'><div class='k-margins-horizontal'></div><div class='k-margins-vertical'></div></div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.save #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>"
            },
            apply: function() {
                s.fn.apply.call(this), this.trigger("action", {
                    command: "SaveAsCommand",
                    options: this.viewModel
                })
            }
        }), e.spreadsheet.dialogs.register("exportAs", k), x = d.extend({
            options: {
                messageId: "modifyMergedDialog.errorMessage"
            }
        }), e.spreadsheet.dialogs.register("modifyMerged", x), C = d.extend({
            options: {
                messageId: "overflowDialog.errorMessage"
            }
        }), e.spreadsheet.dialogs.register("overflow", C), S = d.extend({
            init: function(t) {
                var n = e.spreadsheet.messages.dialogs.useKeyboardDialog || o;
                s.fn.init.call(this, i.extend({
                    title: n.title
                }, t))
            },
            options: {
                template: "#: messages.useKeyboardDialog.errorMessage #<div>Ctrl+C #: messages.useKeyboardDialog.labels.forCopy #</div><div>Ctrl+X #: messages.useKeyboardDialog.labels.forCut #</div><div>Ctrl+V #: messages.useKeyboardDialog.labels.forPaste #</div><div class=\"k-action-buttons\"><button class='k-button k-primary' data-bind='click: close'>#= messages.okText #</button></div>"
            }
        }), e.spreadsheet.dialogs.register("useKeyboard", S), T = d.extend({
            options: {
                messageId: "unsupportedSelectionDialog.errorMessage"
            }
        }), e.spreadsheet.dialogs.register("unsupportedSelection", T))
    }(window.kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/sheetbinder.min", ["kendo.core.min", "kendo.data.min", "spreadsheet/sheet.min"], e)
}(function() {
    ! function(e) {
        if (!(e.support.browser.msie && 9 > e.support.browser.version)) {
            var t = e.Class.extend({
                init: function(e) {
                    this.options = $.extend({}, this.options, e), this.columns = this._normalizeColumns(this.options.columns), this._sheet(), this._dataSource(), this._header(), this._boundRowsCount = 0, this.dataSource.fetch()
                },
                _sheet: function() {
                    this.sheet = this.options.sheet, this._sheetChangeHandler = this._sheetChange.bind(this), this._sheetDeleteRowHandler = this._sheetDeleteRow.bind(this), this._sheetInsertRowHandler = this._sheetInsertRow.bind(this), this.sheet.bind("change", this._sheetChangeHandler).bind("deleteRow", this._sheetDeleteRowHandler).bind("insertRow", this._sheetInsertRowHandler)
                },
                _sheetInsertRow: function(e) {
                    void 0 !== e.index && this.dataSource.insert(Math.max(e.index - 1, 0), {})
                },
                _sheetDeleteRow: function(e) {
                    var t, n;
                    void 0 !== e.index && (t = this.dataSource, n = t.view()[e.index - 1], n && t.remove(n))
                },
                _header: function() {
                    this.sheet.batch(function() {
                        this.columns.forEach(function(e, t) {
                            this.sheet.range(0, t).value(e.title)
                        }.bind(this))
                    }.bind(this))
                },
                _sheetChange: function(e) {
                    var t, n, i, r;
                    e.recalc && e.ref && (t = this.dataSource, n = t.view(), i = this.columns, !i.length && n.length && (i = Object.keys(n[0].toJSON())), this._skipRebind = !0, r = this.sheet.range(e.ref).values(), e.ref.forEach(function(e) {
                        var o, a, s, l, c;
                        for (e = e.toRangeRef(), a = 0, s = e.topLeft.row; e.bottomRight.row >= s; s++) {
                            for (o = n[s - 1], o || (o = t.insert(s - 1, {}), n = t.view()), l = 0, c = e.topLeft.col; e.bottomRight.col >= c && i.length > c; c++) o.set(i[c].field, r[a][l++]);
                            a++
                        }
                    }), this._boundRowsCount = t.view().length, this._skipRebind = !1)
                },
                _normalizeColumns: function(e) {
                    return e.map(function(e) {
                        var t = e.field || e;
                        return {
                            field: t,
                            title: e.title || t
                        }
                    })
                },
                _dataSource: function() {
                    var t = this.options,
                        n = t.dataSource;
                    n = Array.isArray(n) ? {
                        data: n
                    } : n, this.dataSource && this._changeHandler ? this.dataSource.unbind("change", this._changeHandler) : this._changeHandler = this._change.bind(this), this.dataSource = e.data.DataSource.create(n).bind("change", this._changeHandler)
                },
                _change: function() {
                    var t, n, i;
                    this._skipRebind || (t = this.dataSource.view(), n = this.columns, !n.length && t.length && (this.columns = n = this._normalizeColumns(Object.keys(t[0].toJSON())), this._header()), i = n.map(function(t) {
                        return e.getter(t.field)
                    }), this.sheet.batch(function() {
                        var e, n, r, o = Math.max(t.length, this._boundRowsCount);
                        for (e = 0; o > e; e++)
                            for (n = 0; i.length > n; n++) r = t[e] ? i[n](t[e]) : null, this.sheet.range(e + 1, n).value(r)
                    }.bind(this)), this._boundRowsCount = t.length)
                },
                destroy: function() {
                    this.dataSource.unbind("change", this._changeHandler), this.sheet.unbind("change", this._sheetChangeHandler).unbind("deleteRow", this._sheetDeleteRowHandler).unbind("insertRow", this._sheetInsertRowHandler)
                },
                options: {
                    columns: []
                }
            });
            e.spreadsheet.SheetDataSourceBinder = t
        }
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/filtermenu.min", ["kendo.core.min", "kendo.popup.min", "kendo.treeview.min", "kendo.numerictextbox.min", "kendo.datepicker.min", "kendo.datetimepicker.min"], e)
}(function() {
    ! function(e) {
        function t(e) {
            var t, n = {},
                i = [];
            for (t = 0; e.length > t; t++) n[e[t].value] ? !n[e[t].value].checked && e[t].checked && (n[e[t].value].checked = !0) : (n[e[t].value] = e[t], i.push(e[t]));
            return i
        }

        function n(t, i) {
            var r, o, a, s, l, c = !1,
                d = t instanceof e.data.HierarchicalDataSource && t.data();
            for (r = 0; d.length > r; r++) o = d[r], a = ("" + o.text).toLowerCase(), s = i === !0 || "" === i || a.indexOf(i) >= 0, l = n(o.children, s || i), c = c || l || s, o.hidden = !s && !l, o.checked = !o.hidden;
            return d && t.filter({
                field: "hidden",
                operator: "neq",
                value: !0
            }), c
        }

        function i(t) {
            var n, r, o = t instanceof e.data.HierarchicalDataSource && t.data();
            for (n = 0; o.length > n; n++) r = o[n], r.checked = !1, r.hasChildren && i(r.children)
        }

        function r(e) {
            var t, n, i = c.operators,
                r = [];
            for (t in e)
                if (e.hasOwnProperty(t))
                    for (n in e[t]) e[t].hasOwnProperty(n) && r.push({
                        text: i[t][n],
                        value: n,
                        unique: t + "_" + n,
                        type: t
                    });
            return r
        }
        var o, a, s, l, c, d, u, h, f;
        e.support.browser.msie && 9 > e.support.browser.version || (o = e.jQuery, a = e.ui.Widget, s = {
            details: "k-details",
            button: "k-button",
            detailsSummary: "k-details-summary",
            detailsContent: "k-details-content",
            icon: "k-icon k-font-icon",
            iconCollapse: "k-i-collapse-se",
            iconExpand: "k-i-expand-e",
            iconSearch: "k-i-search",
            textbox: "k-textbox",
            wrapper: "k-spreadsheet-filter-menu",
            filterByCondition: "k-spreadsheet-condition-filter",
            filterByValue: "k-spreadsheet-value-filter",
            valuesTreeViewWrapper: "k-spreadsheet-value-treeview-wrapper",
            actionButtons: "k-action-buttons"
        }, l = a.extend({
            init: function(t, n) {
                a.fn.init.call(this, t, n), this.element.addClass(f.classNames.details), this._summary = this.element.find("." + f.classNames.detailsSummary).on("click", this._toggle.bind(this));
                var i = n.expanded ? f.classNames.iconCollapse : f.classNames.iconExpand;
                this._icon = o("<span />", {
                    "class": f.classNames.icon + " " + i
                }).prependTo(this._summary), this._container = e.wrap(this._summary.next(), !0), n.expanded || this._container.hide()
            },
            options: {
                name: "Details"
            },
            events: ["toggle"],
            visible: function() {
                return this.options.expanded
            },
            toggle: function(t) {
                var n = e.fx(this._container).expand("vertical");
                n.stop()[t ? "reverse" : "play"](), this._icon.toggleClass(f.classNames.iconExpand, t).toggleClass(f.classNames.iconCollapse, !t), this.options.expanded = !t
            },
            _toggle: function() {
                var e = this.visible();
                this.toggle(e), this.trigger("toggle", {
                    show: e
                })
            }
        }), c = e.spreadsheet.messages.filterMenu = {
            sortAscending: "Sort range A to Z",
            sortDescending: "Sort range Z to A",
            filterByValue: "Filter by value",
            filterByCondition: "Filter by condition",
            apply: "Apply",
            search: "Search",
            addToCurrent: "Add to current selection",
            clear: "Clear",
            blanks: "(Blanks)",
            operatorNone: "None",
            and: "AND",
            or: "OR",
            operators: {
                string: {
                    contains: "Text contains",
                    doesnotcontain: "Text does not contain",
                    startswith: "Text starts with",
                    endswith: "Text ends with"
                },
                date: {
                    eq: "Date is",
                    neq: "Date is not",
                    lt: "Date is before",
                    gt: "Date is after"
                },
                number: {
                    eq: "Is equal to",
                    neq: "Is not equal to",
                    gte: "Is greater than or equal to",
                    gt: "Is greater than",
                    lte: "Is less than or equal to",
                    lt: "Is less than"
                }
            }
        }, e.data.binders.spreadsheetFilterValue = e.data.Binder.extend({
            init: function(t, n, i) {
                e.data.Binder.fn.init.call(this, t, n, i), this._change = o.proxy(this.change, this), o(this.element).on("change", this._change)
            },
            refresh: function() {
                var e = this,
                    t = e.bindings.spreadsheetFilterValue.get();
                o(e.element).val(t instanceof Date ? "" : t)
            },
            change: function() {
                var e = this.element.value;
                this.bindings.spreadsheetFilterValue.set(e)
            }
        }), e.data.binders.widget.spreadsheetFilterValue = e.data.Binder.extend({
            init: function(t, n, i) {
                e.data.Binder.fn.init.call(this, t.element[0], n, i), this.widget = t, this._change = o.proxy(this.change, this), this.widget.first("change", this._change)
            },
            refresh: function() {
                var e = this.bindings.spreadsheetFilterValue,
                    t = e.get(),
                    n = o(this.widget.element).data("filterType");
                this.widget.value("date" === n && t instanceof Date || "number" === n && !isNaN(t) ? t : null)
            },
            change: function() {
                var e = this.widget.value(),
                    t = this.bindings.spreadsheetFilterValue;
                t.set(e)
            }
        }), d = {
            filterByValue: "<div class='" + s.detailsSummary + "'>#= messages.filterByValue #</div><div class='" + s.detailsContent + "'><div class='k-textbox k-space-right'><input placeholder='#= messages.search #' data-#=ns#bind='events: { input: filterValues }' /><span class='k-icon k-font-icon k-i-search' /></div><div data-#=ns#bind='visible: hasActiveSearch'><input class='k-checkbox' type='checkbox' data-#=ns#bind='checked: appendToSearch' id='_#=guid#' /><label class='k-checkbox-label' for='_#=guid#'>#= messages.addToCurrent #</label></div><div class='" + s.valuesTreeViewWrapper + "'><div data-#=ns#role='treeview' data-#=ns#checkboxes='{ checkChildren: true }' data-#=ns#bind='source: valuesDataSource, events: { check: valuesChange, select: valueSelect }' /></div></div>",
            filterByCondition: "<div class='" + s.detailsSummary + "'>#= messages.filterByCondition #</div><div class='" + s.detailsContent + '\'><div><select data-#=ns#role="dropdownlist"data-#=ns#bind="value: operator, source: operators, events: { change: operatorChange } "data-value-primitive="false"data-option-label="#=messages.operatorNone#"data-height="auto"data-text-field="text"data-value-field="unique"></select></div><div data-#=ns#bind="visible: isString"><input data-filter-type="string" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" class="k-textbox" /></div><div data-#=ns#bind="visible: isNumber"><input data-filter-type="number" data-#=ns#role="numerictextbox" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" /></div><div data-#=ns#bind="visible: isDate"><input data-filter-type="date" data-#=ns#role="datepicker" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" /></div></div>',
            menuItem: "<li data-command='#=command#' data-dir='#=dir#'><span class='k-icon k-font-icon k-i-#=iconClass#'></span>#=text#</li>",
            actionButtons: "<button data-#=ns#bind='click: apply' class='k-button k-primary'>#=messages.apply#</button><button data-#=ns#bind='click: clear' class='k-button'>#=messages.clear#</button>"
        }, u = e.spreadsheet.FilterMenuViewModel = e.data.ObservableObject.extend({
            valuesChange: function(t) {
                var n = t ? t.sender.dataSource : this.valuesDataSource,
                    i = function(e) {
                        return e.checked && e.value
                    },
                    r = function(t) {
                        return "date" === t.dataType ? e.spreadsheet.dateToNumber(t.value) : t.value
                    },
                    o = function(e, t, n) {
                        return n.lastIndexOf(e) === t
                    },
                    a = n.data(),
                    s = a[0].children.data().toJSON(),
                    l = s.filter(function(e) {
                        return "blank" === e.dataType
                    });
                l = l.length ? l[0].checked : !1, s = s.filter(i).map(r), this.appendToSearch && this.valueFilter && this.valueFilter.values.length && (s = s.concat(this.valueFilter.values.toJSON()).sort().filter(o)), this.set("valueFilter", {
                    values: s,
                    blanks: l
                })
            },
            valueSelect: function(e) {
                e.preventDefault();
                var t = e.sender.dataItem(e.node);
                t.set("checked", !t.checked)
            },
            hasActiveSearch: !1,
            appendToSearch: !1,
            filterValues: function(e) {
                var t = "string" == typeof e ? e : o(e.target).val().toLowerCase(),
                    r = this.valuesDataSource;
                this.set("hasActiveSearch", !!t), i(r), n(r, t)
            },
            reset: function() {
                this.set("customFilter", {
                    logic: "and",
                    criteria: [{
                        operator: null,
                        value: null
                    }]
                }), this.set("valueFilter", {
                    values: []
                })
            },
            operatorChange: function(e) {
                var t = e.sender.dataItem();
                this.set("operatorType", t.type), this.set("customFilter.criteria[0].operator", t.value)
            },
            isNone: function() {
                return void 0 === this.get("operatorType")
            },
            isString: function() {
                return "string" === this.get("operatorType")
            },
            isNumber: function() {
                return "number" === this.get("operatorType")
            },
            isDate: function() {
                return "date" === this.get("operatorType")
            }
        }), h = e.spreadsheet.FilterMenuController = {
            valuesTree: function(e, t) {
                return [{
                    text: "All",
                    expanded: !0,
                    checked: !0,
                    items: this.values(e.resize({
                        top: 1
                    }), t)
                }]
            },
            values: function(n, i) {
                var r = [],
                    o = c,
                    a = n.column(i),
                    s = n.sheet();
                return a.forEachCell(function(t, n, i) {
                    i.dataType = void 0 === i.value ? "blank" : i.format ? e.spreadsheet.formatting.type(i.value, i.format) : typeof i.value, i.text = null !== i.value && i.format ? e.spreadsheet.formatting.text(i.value, i.format) : i.value ? i.value : o.blanks, "percent" === i.dataType && (i.dataType = "number"), "date" === i.dataType && (i.value = e.spreadsheet.numberToDate(i.value)), i.hasOwnProperty("wrap") && delete i.wrap, i.checked = !s.isHiddenRow(t), r.push(i)
                }), r = t(r), r.sort(function(e, t) {
                    return e.dataType === t.dataType ? 0 : "blank" === e.dataType || "blank" === t.dataType ? "blank" === e.dataType ? -1 : 1 : "number" === e.dataType || "number" === t.dataType ? "number" === e.dataType ? -1 : 1 : "date" === e.dataType || "date" === t.dataType ? "date" === e.dataType ? -1 : 1 : 0
                }), r
            },
            filterType: function(e, t) {
                var n, i, r, o = e.sheet(),
                    a = this.filterForColumn(t, o);
                return a = a && a.filter.toJSON(), a && "custom" == a.filter && (i = a.criteria[0].value, i instanceof Date ? n = "date" : "string" == typeof i ? n = "string" : "number" == typeof i && (n = "number")), n || (r = this.values(e.row(1), t)[0], n = r && r.dataType, "blank" == n && (n = null)), n
            },
            filterForColumn: function(e, t) {
                var n, i = t.filter();
                return i && (n = i.columns.filter(function(t) {
                    return t.index === e
                })[0]), n
            },
            filter: function(e, t) {
                var n, i, r, o, a = this.filterForColumn(e, t);
                if (a) return n = a.filter.toJSON(), i = n.filter, delete n.filter, r = {
                    type: i,
                    options: n
                }, o = n.criteria, o && o.length && (r.operator = o[0].operator), r
            }
        }, f = a.extend({
            init: function(e, t) {
                a.call(this, e, t), this.element.addClass(f.classNames.wrapper), this.viewModel = new u({
                    active: "value",
                    operator: null,
                    operators: r(this.options.operators),
                    clear: this.clear.bind(this),
                    apply: this.apply.bind(this)
                }), this._filterInit(), this._popup(), this._sort(), this._filterByCondition(), this._filterByValue(), this._actionButtons()
            },
            options: {
                name: "FilterMenu",
                column: 0,
                range: null,
                operators: {
                    string: {
                        contains: "Text contains",
                        doesnotcontain: "Text does not contain",
                        startswith: "Text starts with",
                        endswith: "Text ends with"
                    },
                    date: {
                        eq: "Date is",
                        neq: "Date is not",
                        lt: "Date is before",
                        gt: "Date is after"
                    },
                    number: {
                        eq: "Is equal to",
                        neq: "Is not equal to",
                        gte: "Is greater than or equal to",
                        gt: "Is greater than",
                        lte: "Is less than or equal to",
                        lt: "Is less than"
                    }
                }
            },
            events: ["action"],
            destroy: function() {
                a.fn.destroy.call(this), this.menu.destroy(), this.valuesTreeView.destroy(), this.popup.destroy()
            },
            openFor: function(e) {
                this.popup.setOptions({
                    anchor: e
                }), this.popup.open()
            },
            close: function() {
                this.popup.close()
            },
            clear: function() {
                this.action({
                    command: "ClearFilterCommand",
                    options: {
                        column: this.options.column
                    }
                }), this.viewModel.reset(), this.close()
            },
            apply: function() {
                var e, t, n;
                this._active(), e = {
                    operatingRange: this.options.range,
                    column: this.options.column
                }, "value" === this.viewModel.active ? (this.viewModel.valuesChange({
                    sender: this.valuesTreeView
                }), t = this.viewModel.valueFilter.toJSON(), t.values && t.values.length && (e.valueFilter = t)) : "custom" === this.viewModel.active && (n = this.viewModel.customFilter.toJSON(), n.criteria.length && null !== n.criteria[0].value && (e.customFilter = n)), (e.valueFilter || e.customFilter) && this.action({
                    command: "ApplyFilterCommand",
                    options: e
                })
            },
            action: function(e) {
                this.trigger("action", o.extend({}, e))
            },
            _filterInit: function() {
                var e, t = this.options.column,
                    n = this.options.range,
                    i = n.sheet(),
                    r = h.filter(t, i);
                r ? (e = h.filterType(n, t), this.viewModel.set("active", r.type), this.viewModel.set(r.type + "Filter", r.options), "custom" == r.type && (this.viewModel.set("operator", e + "_" + r.operator), this.viewModel.set("operatorType", e))) : this.viewModel.reset()
            },
            _popup: function() {
                this.popup = this.element.kendoPopup({
                    copyAnchorStyles: !1
                }).data("kendoPopup")
            },
            _sort: function() {
                var t = e.template(f.templates.menuItem),
                    n = c,
                    i = [{
                        command: "sort",
                        dir: "asc",
                        text: n.sortAscending,
                        iconClass: "sort-asc"
                    }, {
                        command: "sort",
                        dir: "desc",
                        text: n.sortDescending,
                        iconClass: "sort-desc"
                    }],
                    r = o("<ul />", {
                        html: e.render(t, i)
                    }).appendTo(this.element);
                this.menu = r.kendoMenu({
                    orientation: "vertical",
                    select: function(e) {
                        var t = o(e.item).data("dir"),
                            n = this.options.range.resize({
                                top: 1
                            }),
                            i = {
                                value: t,
                                sheet: !1,
                                operatingRange: n,
                                column: this.options.column
                            };
                        n.isSortable() ? this.action({
                            command: "SortCommand",
                            options: i
                        }) : this.close()
                    }.bind(this)
                }).data("kendoMenu")
            },
            _appendTemplate: function(t, n, i, r) {
                var a = e.template(t),
                    s = o("<div class='" + n + "'/>").html(a({
                        messages: c,
                        guid: e.guid(),
                        ns: e.ns
                    }));
                return this.element.append(s), i && (i = new l(s, {
                    expanded: r,
                    toggle: this._detailToggle.bind(this)
                })), e.bind(s, this.viewModel), s
            },
            _detailToggle: function(e) {
                this.element.find("[data-role=details]").not(e.sender.element).data("kendoDetails").toggle(!e.show)
            },
            _filterByCondition: function() {
                var e = "custom" === this.viewModel.active;
                this._appendTemplate(f.templates.filterByCondition, f.classNames.filterByCondition, !0, e)
            },
            _filterByValue: function() {
                var t, n = "value" === this.viewModel.active,
                    i = this._appendTemplate(f.templates.filterByValue, f.classNames.filterByValue, !0, n);
                this.valuesTreeView = i.find("[data-role=treeview]").data("kendoTreeView"), t = h.valuesTree(this.options.range, this.options.column), this.viewModel.set("valuesDataSource", new e.data.HierarchicalDataSource({
                    data: t
                }))
            },
            _actionButtons: function() {
                this._appendTemplate(f.templates.actionButtons, f.classNames.actionButtons, !1)
            },
            _active: function() {
                var e = this.element.find("[data-role=details]").filter(function(e, t) {
                    return o(t).data("kendoDetails").visible()
                });
                e.hasClass(f.classNames.filterByValue) ? this.viewModel.set("active", "value") : e.hasClass(f.classNames.filterByCondition) && this.viewModel.set("active", "custom")
            }
        }), e.spreadsheet.FilterMenu = f, o.extend(!0, f, {
            classNames: s,
            templates: d
        }))
    }(window.kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/editor.min", ["kendo.core.min"], e)
}(function() {
    ! function(e) {
        function t(e, t) {
            return e && (e.top !== t.top || e.left !== t.left)
        }
        if (!(e.support.browser.msie && 9 > e.support.browser.version)) {
            var n = e.Observable.extend({
                init: function(t) {
                    e.Observable.fn.init.call(this), this.view = t, this.formulaBar = t.formulaBar, this.barInput = t.formulaBar.formulaInput, this.cellInput = t.formulaInput, this.barInput.syncWith(this.cellInput), this.cellInput.syncWith(this.barInput), this.barInput.bind("keyup", this._triggerUpdate.bind(this)), this.cellInput.bind("keyup", this._triggerUpdate.bind(this)), this.barInput.bind("focus", this._focus.bind(this)), this.cellInput.bind("focus", this._focus.bind(this))
                },
                events: ["activate", "deactivate", "change", "update"],
                _focus: function(e) {
                    this.lastActive = e.sender == this.barInput ? "bar" : "cell"
                },
                _triggerUpdate: function() {
                    this.trigger("update", {
                        value: this.value()
                    })
                },
                activeEditor: function() {
                    var t = null,
                        n = e._activeElement();
                    return this.barElement()[0] === n ? t = this.barInput : this.cellElement()[0] === n && (t = this.cellInput), t
                },
                activate: function(e) {
                    return this._active = !0, this._rect = e.rect, this.cellInput.position(e.rect), this.cellInput.resize(e.rect), this.cellInput.tooltip(e.tooltip), this.cellInput.activeCell = this.barInput.activeCell = e.range.topLeft, this.trigger("activate"), this
                },
                deactivate: function() {
                    var e = this.cellInput;
                    this._active && (e.value() != this._value && this.trigger("change", {
                        value: e.value()
                    }) || (this._active = !1, this._rect = null, e.hide(), this.trigger("deactivate")))
                },
                enable: function(e) {
                    this.barInput.enable(e)
                },
                barElement: function() {
                    return this.barInput.element
                },
                cellElement: function() {
                    return this.cellInput.element
                },
                focusLastActive: function() {
                    this.focus(this.lastActive)
                },
                focus: function(e) {
                    e = e || "cell", "cell" === e ? (this.cellInput.element.focus(), this.cellInput.end()) : this.barInput.element.focus()
                },
                isActive: function() {
                    return this._active
                },
                isFiltered: function() {
                    return this.barInput.popup.visible() || this.cellInput.popup.visible()
                },
                canInsertRef: function(e) {
                    var t = this.activeEditor();
                    return t && t.canInsertRef(e)
                },
                highlightedRefs: function() {
                    var e = this.activeEditor(),
                        t = [];
                    return e && (t = e.highlightedRefs()), t
                },
                scale: function() {
                    this.cellInput.scale()
                },
                toggleTooltip: function(e) {
                    this.cellInput.toggleTooltip(t(this._rect, e))
                },
                value: function(e) {
                    return void 0 === e ? this.barInput.value() : (null === e && (e = ""), this._value = e, this.barInput.value(e), void this.cellInput.value(e))
                }
            });
            e.spreadsheet.SheetEditor = n
        }
    }(kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/autofill.min", ["spreadsheet/runtime.min", "spreadsheet/range.min"], e)
}(function() {
    "use strict";

    function e(e) {
        var t, n, i, r, o, a = e.length,
            s = (a + 1) / 2,
            l = e.reduce(function(e, t) {
                return e + t
            }, 0) / a,
            c = 0,
            d = 0;
        for (t = 0; a > t; t++) n = t + 1 - s, i = e[t] - l, c += n * i, d += n * n;
        return d ? (r = c / d, o = l - r * s, function(e) {
            return o + r * (e + 1)
        }) : function(t) {
            return e[t % e.length]
        }
    }

    function t(t) {
        function o(e) {
            var t, n = e[1] - e[0];
            for (t = 2; e.length > t; ++t)
                if (e[t] - e[t - 1] != n) return null;
            return n
        }

        function a(e) {
            return e.map(function(e) {
                return e.number
            })
        }
        var s = [],
            l = t.map(function(e) {
                return e.formula || e.value
            });
        return r(l, function(i, r, c, d) {
            var u, h, f, p, m;
            for ("number" == c ? (h = a(d), 1 == h.length && (i > 0 || l.length > r || "date" == n(h[0], t[i].format)) && h.push(h[0] + 1), u = e(h)) : "string" == c || "formula" == c || "boolean" == c ? u = function(e, t) {
                return l[t]
            } : Array.isArray(c) ? 1 == d.length ? u = function(e) {
                return c[(d[0].number + e) % c.length]
            } : (f = o(a(d)), u = null == f ? function(e) {
                return d[e % d.length].value
            } : function(e) {
                var t = d[0].number + f * e;
                return c[t % c.length]
            }) : "null" != c ? (h = a(d), 1 == h.length && h.push(h[0] + 1), h = e(h), u = function(e, t) {
                return l[t].replace(/^(.*\D)\d+/, "$1" + h(e, t))
            }) : u = function() {
                return null
            }, p = {
                f: u,
                begin: i,
                end: r,
                len: r - i
            }, m = i; r > m; ++m) s[m] = p
        }),
            function(e, n) {
                var r = s[n],
                    o = e / l.length | 0,
                    a = e % l.length,
                    c = o * r.len + a - r.begin,
                    d = r.f(c, n),
                    u = i(t[n]);
                return d instanceof h ? u.formula = d : u.value = d, u
            }
    }

    function n(e, t) {
        return null != t ? c.formatting.type(e, t) : void 0
    }

    function i(e) {
        var t = {};
        return Object.keys(e || {}).forEach(function(n) {
            t[n] = e[n]
        }), t
    }

    function r(e, t) {
        var n, i, r = null,
            a = 0,
            s = [];
        for (i = 0; e.length > i; ++i) n = o(e[i]), s.push(n), null != r && n.type !== r.type && (t(a, i, r.type, s.slice(a, i)), a = i), r = n;
        t(a, i, r.type, s.slice(a, i))
    }

    function o(e) {
        var t, n;
        if ("number" == typeof e) return {
            type: "number",
            number: e
        };
        if ("string" == typeof e) return (t = s(e)) ? t : (n = /^(.*\D)(\d+)/.exec(e), n ? (e = e.replace(/^(.*\D)\d+/, "$1-######"), {
            type: e,
            match: n,
            number: parseFloat(n[2])
        }) : {
            type: "string"
        });
        if ("boolean" == typeof e) return {
            type: "boolean"
        };
        if (null == e) return {
            type: "null"
        };
        if (e instanceof h) return {
            type: "formula"
        };
        throw window.console.error(e), Error("Cannot fill data")
    }

    function a() {
        var e = kendo.culture();
        return [e.calendars.standard.days.namesAbbr, e.calendars.standard.days.names, e.calendars.standard.months.namesAbbr, e.calendars.standard.months.names]
    }

    function s(e) {
        var t, n, i, r, o = e.toLowerCase(),
            s = a();
        for (t = 0; s.length > t; ++t)
            for (n = s[t], i = n.length; --i >= 0;)
                if (r = n[i].toLowerCase(), r == o) return {
                    type: n,
                    number: i,
                    value: e
                }
    }

    function l(e) {
        var t, n, i = e.length,
            r = e[0].length,
            o = [];
        for (t = 0; r > t; ++t)
            for (o[t] = [], n = 0; i > n; ++n) o[t][n] = e[n][t];
        return o
    }
    var c, d, u, h, f, p;
    kendo.support.browser.msie && kendo.support.browser.version < 9 || (c = kendo.spreadsheet, d = c.Range, u = c.calc.runtime, h = u.Formula, f = "Incompatible ranges in fillFrom", p = "Cannot determine fill direction", d.prototype._previewFillFrom = function(e, n) {
        var i, r, o, a, s, c, d, u, h, m, g, v, _, b, w = this,
            y = w._sheet;
        if ("string" == typeof e && (e = y.range(e)), i = e._ref.toRangeRef(), r = w._ref.toRangeRef(), i.intersects(r)) {
            if (i.eq(r)) return null;
            if (r = r.clone(), i.topLeft.eq(r.topLeft))
                if (i.width() == r.width()) r.topLeft.row += i.height(), n = 0;
                else {
                    if (i.height() != r.height()) throw Error(f);
                    r.topLeft.col += i.width(), n = 1
                }
            else {
                if (!i.bottomRight.eq(r.bottomRight)) throw Error(f);
                if (i.width() == r.width()) r.bottomRight.row -= i.height(), n = 2;
                else {
                    if (i.height() != r.height()) throw Error(f);
                    r.bottomRight.col -= i.width(), n = 3
                }
            }
            return y.range(r)._previewFillFrom(e, n)
        }
        if (null == n)
            if (i.topLeft.col == r.topLeft.col) n = r.topLeft.row > i.topLeft.row ? 0 : 2;
            else {
                if (i.topLeft.row != r.topLeft.row) throw Error(p);
                n = r.topLeft.col > i.topLeft.col ? 1 : 3
            } if (o = 1 & n, a = 2 & n, o && i.height() != r.height() || !o && i.width() != r.width()) throw Error(f);
        for (s = e._properties(), o ? c = r.width() : (s = l(s), c = r.height()), d = Array(s.length), u = 0; s.length > u; ++u)
            for (h = s[u], m = t(h), g = d[u] = Array(c), v = 0; c > v; ++v) _ = a ? -v - 1 : h.length + v, b = a ? h.length - v % h.length - 1 : v % h.length, g[a ? c - v - 1 : v] = m(_, b);
        return o || (d = l(d)), {
            props: d,
            direction: n,
            dest: w
        }
    }, d.prototype.fillFrom = function(e, t) {
        var n = this._previewFillFrom(e, t);
        return n.dest._properties(n.props), n.dest
    })
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("spreadsheet/print.min", ["kendo.pdf.min", "spreadsheet/sheet.min", "spreadsheet/range.min", "spreadsheet/references.min", "spreadsheet/numformat.min", "util/text-metrics.min"], e)
}(function() {
    "use strict";

    function e(e, t) {
        var n = 0,
            i = [],
            r = .2 * t,
            o = t;
        return e.forEach(function(e) {
            t && n + e > o && (r > o - n && (n = t * Math.ceil(n / t)), o += t * Math.ceil(e / t)), i.push(n), n += e
        }), i.push(n), i
    }

    function t(e, t) {
        var n = e._grid,
            i = {},
            r = {};
        return e.forEachMergedCell(t, function(e) {
            var o = e.topLeft;
            n.forEach(e, function(n) {
                o.eq(n) ? i[n.print()] = e : t.contains(n) && (r[n.print()] = o)
            })
        }), {
            primary: i,
            secondary: r
        }
    }

    function n(n, s, l) {
        var c, d, u, h, f, m, g, v, _ = [],
            b = [],
            w = [],
            y = t(n, s),
            k = -1,
            x = -1;
        return n.forEach(s, function(e, t, i) {
            var r, a, c, d = e - s.topLeft.row,
                u = t - s.topLeft.col;
            u || b.push(n.rowHeight(e)), d || w.push(n.columnWidth(t)), n.isHiddenColumn(t) || n.isHiddenRow(e) || (r = l.forScreen || o(i), (l.emptyCells || r) && (a = new p(e, t).print(), y.secondary[a] || (r ? (k = Math.max(k, d), x = Math.max(x, u)) : i.empty = !0, c = y.primary[a], c ? (delete y.primary[a], i.merged = !0, i.rowspan = c.height(), i.colspan = c.width(), l.forScreen && (i.width = n._columns.sum(c.topLeft.col, c.bottomRight.col), i.height = n._rows.sum(c.topLeft.row, c.bottomRight.row))) : (i.rowspan = 1, i.colspan = 1), i.row = d, i.col = u, _.push(i))))
        }), b = b.slice(0, k + 1), w = w.slice(0, x + 1), c = l.pageWidth, d = l.pageHeight, u = 1, l.fitWidth && (h = w.reduce(i, 0), h > c && (u = c / h, c /= u, d /= u)), f = e(b, d || 0), m = e(w, c || 0), g = 0, v = 0, _ = _.filter(function(e) {
            return e.empty && (e.row > k || e.col > x) ? !1 : (e.left = m[e.col], e.top = f[e.row], e.merged ? l.forScreen ? (e.right = e.left + e.width, e.bottom = e.top + e.height) : (e.right = r(m, e.col + e.colspan), e.bottom = r(f, e.row + e.rowspan), e.width = e.right - e.left, e.height = e.bottom - e.top) : (e.width = w[e.col], e.height = b[e.row], e.bottom = e.top + e.height, e.right = e.left + e.width), g = Math.max(g, e.right), v = Math.max(v, e.bottom), !0)
        }), Object.keys(y.primary).forEach(function(e) {
            var t = y.primary[e];
            n.forEach(t.topLeft.toRangeRef(), function(e, i, r) {
                var o = e - s.topLeft.row,
                    a = i - s.topLeft.col;
                r.merged = !0, r.colspan = t.height(), r.rowspan = t.width(), r.top = 0 > o ? -n._rows.sum(e, e - o - 1) : f[o], r.left = 0 > a ? -n._columns.sum(i, i - a - 1) : m[a], r.height = n._rows.sum(t.topLeft.row, t.bottomRight.row), r.width = n._columns.sum(t.topLeft.col, t.bottomRight.col), r.right = r.left + r.width, r.bottom = r.top + r.height, _.push(r)
            })
        }), {
            width: g,
            height: v,
            cells: _.sort(a),
            scale: u,
            xCoords: m,
            yCoords: f
        }
    }

    function i(e, t) {
        return e + t
    }

    function r(e, t) {
        return e.length > t ? e[t] : e[e.length - 1]
    }

    function o(e) {
        return null != e.value || e.merged || null != e.background || null != e.borderTop || null != e.borderRight || null != e.borderBottom || null != e.borderLeft
    }

    function a(e, t) {
        return t.top > e.top ? -1 : e.top == t.top ? t.left > e.left ? -1 : e.left == t.left ? 0 : 1 : 1
    }

    function s(e, t, n) {
        function i(i, r) {
            var o, a, s, u, h, f = r * c,
                p = f + c,
                g = i * d,
                b = g + d,
                w = 0,
                y = 0,
                k = e.cells.filter(function(e) {
                    return f >= e.right || e.left >= p || g >= e.bottom || e.top >= b ? !1 : (w = Math.max(e.bottom, w), y = Math.max(e.right, y), !0)
                });
            k.length > 0 && (o = new m.Group, t.append(o), o.clip(m.Path.fromRect(new v.Rect([0, 0], [n.pageWidth, n.pageHeight]))), a = new m.Group, o.append(a), s = v.Matrix.scale(e.scale, e.scale).multiplyCopy(v.Matrix.translate(-f, -g)), (n.hCenter || n.vCenter) && (s = s.multiplyCopy(v.Matrix.translate(n.hCenter ? (p - y) / 2 : 0, n.vCenter ? (b - w) / 2 : 0))), a.transform(s), n.guidelines && (u = null, e.xCoords.forEach(function(e) {
                e = Math.min(e, y), e !== u && e >= f && p >= e && (u = e, a.append((new m.Path).moveTo(e, g).lineTo(e, w).close().stroke("#999", _)))
            }), u = null, e.yCoords.forEach(function(e) {
                e = Math.min(e, w), e !== u && e >= g && b >= e && (u = e, a.append((new m.Path).moveTo(f, e).lineTo(y, e).close().stroke("#999", _)))
            })), h = new m.Group, k.forEach(function(e) {
                l(e, a, h, n)
            }), a.append(h))
        }
        var r, o, a = Math.ceil(e.width / n.pageWidth),
            s = Math.ceil(e.height / n.pageHeight),
            c = n.pageWidth / e.scale,
            d = n.pageHeight / e.scale;
        for (r = 0; a > r; ++r)
            for (o = 0; s > o; ++o) i(o, r)
    }

    function l(e, t, n, i) {
        var r, o, a, s, l, d, u = new m.Group;
        if (t.append(u), r = new v.Rect([e.left, e.top], [e.width, e.height]), (e.background || e.merged) && (o = r, i.guidelines && (o = r.clone(), o.origin.x += _ / 2, o.origin.y += _ / 2, o.size.width -= _, o.size.height -= _), u.append(new m.Rect(o).fill(e.background || "#fff").stroke(null))), e.borderLeft && n.append((new m.Path).moveTo(e.left, e.top).lineTo(e.left, e.bottom).close().stroke(e.borderLeft.color, e.borderLeft.size)), e.borderTop && n.append((new m.Path).moveTo(e.left, e.top).lineTo(e.right, e.top).close().stroke(e.borderTop.color, e.borderTop.size)), e.borderRight && n.append((new m.Path).moveTo(e.right, e.top).lineTo(e.right, e.bottom).close().stroke(e.borderRight.color, e.borderRight.size)), e.borderBottom && n.append((new m.Path).moveTo(e.left, e.bottom).lineTo(e.right, e.bottom).close().stroke(e.borderBottom.color, e.borderBottom.size)), a = e.value, null != a) {
            if (s = "number" == typeof a ? "number" : null, l = new m.Group, l.clip(m.Path.fromRect(r)), u.append(l), e.format ? (d = g.textAndColor(a, e.format), a = d.text, d.type && (s = d.type)) : a += "", !e.textAlign) switch (s) {
                case "number":
                case "date":
                case "percent":
                    e.textAlign = "right";
                    break;
                case "boolean":
                    e.textAlign = "center"
            }
            c(a, d && d.color || e.color || "#000", e, l)
        }
    }

    function c(e, t, n, i) {
        var r, o, a, s, l = n.left + 2,
            c = n.top + 2,
            h = n.width - 4,
            f = n.height - 4,
            p = u(n),
            g = {
                font: p
            },
            _ = {
                font: p,
                fill: {
                    color: t
                }
            },
            b = [],
            w = 0,
            y = c;
        switch (n.wrap ? (d(e, g, h).forEach(function(e) {
            var t = new m.Text(e.text, [l, y], _);
            y += e.box.height, b.push({
                el: t,
                box: e.box
            })
        }), w = y - c) : (r = new m.Text(e, [l, y], _), o = kendo.util.measureText(e, g), b.push({
            el: r,
            box: o
        }), w = o.height), a = new m.Group, i.append(a), s = 0, n.verticalAlign) {
            case "center":
                s = f - w >> 1;
                break;
            case void 0:
            case null:
            case "bottom":
                s = f - w
        }
        0 > s && (s = 0), b.forEach(function(e) {
            a.append(e.el);
            var t = 0;
            switch (n.textAlign) {
                case "center":
                    t = h - e.box.width >> 1;
                    break;
                case "right":
                    t = h - e.box.width
            }
            0 > t && (t = 0), (t || s) && e.el.transform(v.Matrix.translate(t, s))
        })
    }

    function d(e, t, n) {
        function i(o, s, l) {
            var c = e.substring(a, s).trim(),
                d = kendo.util.measureText(c, t);
            n >= d.width ? l - 1 > s ? i(s, s + l >> 1, l) : (r.push({
                text: c,
                box: d
            }), a = s) : s > o && i(o, o + s >> 1, s)
        }
        for (var r = [], o = e.length, a = 0; o > a;) i(a, o, o);
        return r
    }

    function u(e) {
        var t = [];
        return e.italic && t.push("italic"), e.bold && t.push("bold"), t.push((e.fontSize || 12) + "px"), t.push(e.fontFamily || "Arial"), t.join(" ")
    }

    function h(e, t, i, r) {
        var o, a, l, c, d;
        null == i && null == r && (r = t, i = {}, t = f.SHEETREF), null == r && (r = i, t instanceof f.Range || t instanceof f.Ref || "string" == typeof t ? i = {} : (i = t, t = f.SHEETREF)), i = kendo.jQuery.extend({
            paperSize: "A4",
            landscape: !0,
            margin: "1cm",
            guidelines: !0,
            emptyCells: !0,
            fitWidth: !1,
            center: !1
        }, i), o = new m.Group, a = kendo.pdf.getPaperOptions(i), o.options.set("pdf", {
            author: i.author,
            creator: i.creator,
            date: i.date,
            keywords: i.keywords,
            margin: a.margin,
            multiPage: !0,
            paperSize: a.paperSize,
            subject: i.subject,
            title: i.title
        }), l = a.paperSize[0], c = a.paperSize[1], a.margin && (l -= a.margin.left + a.margin.right, c -= a.margin.top + a.margin.bottom), i.pageWidth = l, i.pageHeight = c, d = n(e, e._ref(t), i), s(d, o, i), r(o)
    }
    var f, p, m, g, v, _;
    kendo.support.browser.msie && kendo.support.browser.version < 9 || (f = kendo.spreadsheet, p = f.CellRef, m = kendo.drawing, g = f.formatting, v = kendo.geometry, _ = .8, f.Sheet.prototype.draw = function(e, t, n) {
        var i = this;
        i._workbook ? i.recalc(i._workbook._context, function() {
            h(i, e, t, n)
        }) : h(i, e, t, n)
    }, f.draw = {
        doLayout: n,
        drawLayout: s,
        shouldDrawCell: o
    })
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.spreadsheet.min", ["util/undoredostack.min", "util/text-metrics.min", "util/parse-xml.min", "kendo.excel.min", "kendo.progressbar.min", "kendo.pdf.min", "spreadsheet/commands.min", "spreadsheet/formulabar.min", "spreadsheet/formulainput.min", "spreadsheet/eventlistener.min", "spreadsheet/rangelist.min", "spreadsheet/propertybag.min", "spreadsheet/references.min", "spreadsheet/navigator.min", "spreadsheet/axismanager.min", "spreadsheet/clipboard.min", "spreadsheet/range.min", "spreadsheet/sheet.min", "spreadsheet/sheetsbar.min", "spreadsheet/excel-reader.min", "spreadsheet/workbook.min", "spreadsheet/formulacontext.min", "spreadsheet/controller.min", "spreadsheet/view.min", "spreadsheet/grid.min", "spreadsheet/axis.min", "spreadsheet/filter.min", "spreadsheet/sorter.min", "spreadsheet/runtime.min", "spreadsheet/calc.min", "spreadsheet/numformat.min", "spreadsheet/runtime.functions.min", "spreadsheet/runtime.functions.2.min", "spreadsheet/toolbar.min", "spreadsheet/dialogs.min", "spreadsheet/sheetbinder.min", "spreadsheet/filtermenu.min", "spreadsheet/editor.min", "spreadsheet/autofill.min", "spreadsheet/print.min"], e)
}(function() {
    ! function(e, t) {
        var n, i, r, o, a, s, l, c, d;
        e.support.browser.msie && 9 > e.support.browser.version || (n = e.jQuery, i = e.ui.Widget, r = e.spreadsheet.Workbook, o = e.spreadsheet.Controller,
            a = e.spreadsheet.View, s = ".kendoSpreadsheet", l = {
            recalc: !0,
            selection: !0,
            activeCell: !0,
            layout: !0,
            sheetSelection: !0,
            resize: !0,
            editorChange: !1,
            editorClose: !1
        }, c = {
            wrapper: "k-widget k-spreadsheet"
        }, d = e.ui.Widget.extend({
            init: function(e, t) {
                i.fn.init.call(this, e, t), this.element.addClass(d.classNames.wrapper), this._view = new a(this.element, {
                    toolbar: this.options.toolbar,
                    sheetsbar: this.options.sheetsbar
                }), this._workbook = new r(this.options, this._view), this._controller = new o(this._view, this._workbook), this._autoRefresh = !0, this._bindWorkbookEvents(), this._view.workbook(this._workbook), this.refresh(), this._resizeHandler = function() {
                    this.resize()
                }.bind(this), n(window).on("resize" + s, this._resizeHandler)
            },
            _resize: function() {
                this.refresh({
                    layout: !0
                })
            },
            _workbookChange: function(t) {
                if (this._autoRefresh && this.refresh(t), t.recalc && t.ref) {
                    var n = new e.spreadsheet.Range(t.ref, this.activeSheet());
                    this.trigger("change", {
                        range: n
                    })
                }
            },
            activeSheet: function(e) {
                return this._workbook.activeSheet(e)
            },
            moveSheetToIndex: function(e, t) {
                return this._workbook.moveSheetToIndex(e, t)
            },
            insertSheet: function(e) {
                return this._workbook.insertSheet(e)
            },
            sheets: function() {
                return this._workbook.sheets()
            },
            removeSheet: function(e) {
                return this._workbook.removeSheet(e)
            },
            sheetByName: function(e) {
                return this._workbook.sheetByName(e)
            },
            sheetIndex: function(e) {
                return this._workbook.sheetIndex(e)
            },
            sheetByIndex: function(e) {
                return this._workbook.sheetByIndex(e)
            },
            renameSheet: function(e, t) {
                return this._workbook.renameSheet(e, t)
            },
            refresh: function(e) {
                return e || (e = l), e.editorClose || (this._view.sheet(this._workbook.activeSheet()), this._controller.sheet(this._workbook.activeSheet()), this._workbook.refresh(e)), e.editorChange || (this._view.refresh(e), this._controller.refresh(), this._view.render(), this.trigger("render")), this
            },
            openDialog: function(e, t) {
                return this._view.openDialog(e, t)
            },
            autoRefresh: function(e) {
                return e !== t ? (this._autoRefresh = e, e === !0 && this.refresh(), this) : this._autoRefresh
            },
            toJSON: function() {
                return this._workbook.toJSON()
            },
            fromJSON: function(e) {
                e.sheets ? (this._workbook.destroy(), this._workbook = new r(n.extend({}, this.options, e)), this._bindWorkbookEvents(), this._view.workbook(this._workbook), this._controller.workbook(this._workbook), this.activeSheet(this.activeSheet())) : this.refresh()
            },
            fromFile: function(e, t) {
                return this._workbook.fromFile(e, t)
            },
            saveAsPDF: function(e) {
                this._workbook.saveAsPDF(n.extend({}, this.options.pdf, e, {
                    workbook: this._workbook
                }))
            },
            saveAsExcel: function(e) {
                this._workbook.saveAsExcel(e)
            },
            draw: function(e, t) {
                this._workbook.draw(e, t)
            },
            _workbookExcelExport: function(e) {
                this.trigger("excelExport", e) && e.preventDefault()
            },
            _workbookExcelImport: function(e) {
                this.trigger("excelImport", e) ? e.preventDefault() : this._initProgress(e.promise)
            },
            _initProgress: function(t) {
                var i = n("<div class='k-loading-mask' style='width: 100%; height: 100%; top: 0;'><div class='k-loading-color'/></div>").appendTo(this.element),
                    r = n("<div class='k-loading-progress'>").appendTo(i).kendoProgressBar({
                        type: "chunk",
                        chunkCount: 10,
                        min: 0,
                        max: 1,
                        value: 0
                    }).data("kendoProgressBar");
                t.progress(function(e) {
                    r.value(e.progress)
                }).always(function() {
                    e.destroy(i), i.remove()
                })
            },
            _workbookPdfExport: function(e) {
                this.trigger("pdfExport", e) && e.preventDefault()
            },
            _bindWorkbookEvents: function() {
                this._workbook.bind("change", this._workbookChange.bind(this)), this._workbook.bind("excelExport", this._workbookExcelExport.bind(this)), this._workbook.bind("excelImport", this._workbookExcelImport.bind(this)), this._workbook.bind("pdfExport", this._workbookPdfExport.bind(this))
            },
            destroy: function() {
                e.ui.Widget.fn.destroy.call(this), this._workbook.destroy(), this._controller.destroy(), this._view.destroy(), this._resizeHandler && n(window).off("resize" + s, this._resizeHandler)
            },
            options: {
                name: "Spreadsheet",
                toolbar: !0,
                sheetsbar: !0,
                rows: 200,
                columns: 50,
                rowHeight: 20,
                columnWidth: 64,
                headerHeight: 20,
                headerWidth: 32,
                excel: {
                    proxyURL: "",
                    fileName: "Workbook.xlsx"
                },
                pdf: {
                    area: "workbook",
                    fileName: "Workbook.pdf",
                    proxyURL: "",
                    paperSize: "a4",
                    landscape: !0,
                    margin: null,
                    title: null,
                    author: null,
                    subject: null,
                    keywords: null,
                    creator: "Kendo UI PDF Generator v." + e.version,
                    date: null
                }
            },
            events: ["pdfExport", "excelExport", "excelImport", "change", "render"]
        }), e.spreadsheet.ALL_REASONS = l, e.ui.plugin(d), n.extend(!0, d, {
            classNames: c
        }))
    }(window.kendo)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.pivot.configurator.min", ["kendo.dom.min"], e)
}(function() {
    return function(e, t) {
        function n(e) {
            for (var t, n = 0, i = e.length; i > n; n++)
                if (2 == e[n].type) {
                    t = !0;
                    break
                } t && e.splice(n + 1, 0, {
                caption: "KPIs",
                defaultHierarchy: "[KPIs]",
                name: "KPIs",
                uniqueName: "[KPIs]"
            })
        }

        function i(e) {
            return {
                name: e.uniqueName,
                type: e.type
            }
        }

        function r(e) {
            for (var t = 0, n = e.length; n > t; t++) e[t].uniqueName = e[t].name, e[t].type = "kpi";
            return e
        }

        function o(t) {
            var n = e(t).closest(".k-pivot-setting");
            return n.length ? n.data("kendoPivotSettingTarget") : null
        }

        function a(e, t, n) {
            return {
                hierarchyUniqueName: e,
                uniqueName: t,
                caption: t,
                measure: t,
                name: t,
                type: n,
                kpi: !0
            }
        }

        function s(e) {
            var t = e.name;
            return [a(t, e.value, "value"), a(t, e.goal, "goal"), a(t, e.status, "status"), a(t, e.trend, "trend")]
        }
        var l = window.kendo,
            c = l.ui,
            d = c.Widget,
            u = ".kendoPivotConfigurator",
            h = "mouseenter" + u + " mouseleave" + u,
            f = l.template('<p class="k-reset"><span class="k-icon #=icon#"></span>${name}</p><div class="k-list-container k-reset"/>'),
            p = d.extend({
                init: function(e, t) {
                    d.fn.init.call(this, e, t), this.element.addClass("k-widget k-fieldselector k-alt k-edit-form-container"), this._dataSource(), this._layout(), this.refresh(), l.notify(this)
                },
                events: [],
                options: {
                    name: "PivotConfigurator",
                    filterable: !1,
                    sortable: !1,
                    messages: {
                        measures: "Drop Data Fields Here",
                        columns: "Drop Column Fields Here",
                        rows: "Drop Rows Fields Here",
                        measuresLabel: "Measures",
                        columnsLabel: "Columns",
                        rowsLabel: "Rows",
                        fieldsLabel: "Fields"
                    }
                },
                _dataSource: function() {
                    var t = this;
                    t.dataSource && t._refreshHandler ? t.dataSource.unbind("change", t._refreshHandler).unbind("error", t._errorHandler).unbind("progress", t._progressHandler) : (t._errorHandler = e.proxy(t._error, t), t._refreshHandler = e.proxy(t.refresh, t), t._progressHandler = e.proxy(t._requestStart, t)), t.dataSource = l.data.PivotDataSource.create(t.options.dataSource), t.dataSource.bind("change", t._refreshHandler).bind("error", t._errorHandler).bind("progress", t._progressHandler)
                },
                setDataSource: function(e) {
                    this.options.dataSource = e, this._dataSource(), this.measures && this.measures.setDataSource(e), this.rows && this.rows.setDataSource(e), this.columns && this.columns.setDataSource(e), this.refresh()
                },
                _treeViewDataSource: function() {
                    var t = this;
                    return l.data.HierarchicalDataSource.create({
                        schema: {
                            model: {
                                id: "uniqueName",
                                hasChildren: function(e) {
                                    return !("hierarchyUniqueName" in e || "aggregator" in e)
                                }
                            }
                        },
                        transport: {
                            read: function(i) {
                                var o, a, l;
                                e.isEmptyObject(i.data) ? (o = t.dataSource.schemaDimensions(), o.done(function(e) {
                                    t.dataSource.cubeBuilder || n(e), i.success(e)
                                }).fail(i.error)) : (a = t.treeView.dataSource.get(i.data.uniqueName), "[KPIs]" === a.uniqueName ? (l = !0, o = t.dataSource.schemaKPIs(), o.done(function(e) {
                                    i.success(r(e))
                                }).fail(i.error)) : "kpi" == a.type && (l = !0, i.success(s(a))), l || (o = 2 == a.type ? t.dataSource.schemaMeasures() : a.dimensionUniqueName ? t.dataSource.schemaLevels(i.data.uniqueName) : t.dataSource.schemaHierarchies(i.data.uniqueName), o.done(i.success).fail(i.error)))
                            }
                        }
                    })
                },
                _progress: function(e) {
                    l.ui.progress(this.element, e)
                },
                _error: function() {
                    this._progress(!1)
                },
                _requestStart: function() {
                    this._progress(!0)
                },
                _layout: function() {
                    this.form = e('<div class="k-columns k-state-default k-floatwrap"/>').appendTo(this.element), this._fields(), this._targets()
                },
                _fields: function() {
                    var t = e('<div class="k-state-default"><p class="k-reset"><span class="k-icon k-i-group"></span>' + this.options.messages.fieldsLabel + "</p></div>").appendTo(this.form),
                        n = '# if (item.type == 2 || item.uniqueName == "[KPIs]") { #<span class="k-icon k-i-#= (item.type == 2 ? "sum" : "kpi") #"></span># } else if (item.type && item.type !== "kpi") { #<span class="k-icon k-i-dimension"></span># } ##: item.caption || item.name #';
                    this.treeView = e("<div/>").appendTo(t).kendoTreeView({
                        template: n,
                        dataTextField: "caption",
                        dragAndDrop: !0,
                        autoBind: !1,
                        dataSource: this._treeViewDataSource(),
                        dragstart: function(e) {
                            var t = this.dataItem(e.sourceNode);
                            (t.hasChildren || t.aggregator || t.measure) && 2 != t.type && "[KPIs]" !== t.uniqueName || e.preventDefault()
                        },
                        drag: function(e) {
                            var t = "k-denied",
                                n = o(e.dropTarget);
                            n && n.validate(this.dataItem(e.sourceNode)) && (t = "k-add"), e.setStatusClass(t)
                        },
                        drop: function(e) {
                            var t, n, r, a, l, c;
                            if (e.preventDefault(), t = o(e.dropTarget), n = this.dataItem(e.sourceNode), t && t.validate(n)) {
                                if (c = n.defaultHierarchy || n.uniqueName, "kpi" === n.type)
                                    for (l = s(n), a = l.length, c = [], r = 0; a > r; r++) c.push(i(l[r]));
                                else n.kpi && (c = [i(n)]);
                                t.add(c)
                            }
                        }
                    }).data("kendoTreeView")
                },
                _createTarget: function(t, n) {
                    var i = '<li class="k-item k-header" data-' + l.ns + 'name="${data.name}">${data.name}',
                        r = n.sortable,
                        o = "";
                    return r && (o += "#if (data.sortIcon) {#", o += '<span class="k-icon ${data.sortIcon} k-setting-sort"></span>', o += "#}#"), (n.filterable || r) && (o += '<span class="k-icon k-i-arrowhead-s k-setting-fieldmenu"></span>'), o += '<span class="k-icon k-si-close k-setting-delete"></span>', i += '<span class="k-field-actions">' + o + "</span></li>", new l.ui.PivotSettingTarget(t, e.extend({
                        dataSource: this.dataSource,
                        hint: function(t) {
                            var n = e('<div class="k-fieldselector"><ul class="k-list k-reset"></ul></div>');
                            return n.find(".k-list").append(t.clone()), n
                        },
                        template: i,
                        emptyTemplate: '<li class="k-item k-empty">${data}</li>'
                    }, n))
                },
                _targets: function() {
                    var t = e('<div class="k-state-default"/>').appendTo(this.form),
                        n = e(f({
                            name: this.options.messages.columnsLabel,
                            icon: "k-i-vbars"
                        })).appendTo(t),
                        i = e('<ul class="k-pivot-configurator-settings k-list k-reset" />').appendTo(n.last()),
                        r = e(f({
                            name: this.options.messages.rowsLabel,
                            icon: "k-i-hbars"
                        })).appendTo(t),
                        o = e('<ul class="k-pivot-configurator-settings k-list k-reset" />').appendTo(r.last()),
                        a = e(f({
                            name: this.options.messages.measuresLabel,
                            icon: "k-i-sum"
                        })).appendTo(t),
                        s = e('<ul class="k-pivot-configurator-settings k-list k-reset" />').appendTo(a.last()),
                        l = this.options;
                    this.columns = this._createTarget(i, {
                        filterable: l.filterable,
                        sortable: l.sortable,
                        connectWith: o,
                        messages: {
                            empty: l.messages.columns,
                            fieldMenu: l.messages.fieldMenu
                        }
                    }), this.rows = this._createTarget(o, {
                        filterable: l.filterable,
                        setting: "rows",
                        connectWith: i,
                        messages: {
                            empty: this.options.messages.rows,
                            fieldMenu: this.options.messages.fieldMenu
                        }
                    }), this.measures = this._createTarget(s, {
                        setting: "measures",
                        messages: {
                            empty: l.messages.measures
                        }
                    }), i.add(o).add(s).on(h, ".k-item:not(.k-empty)", this._toggleHover)
                },
                _toggleHover: function(t) {
                    e(t.currentTarget).toggleClass("k-state-hover", "mouseenter" === t.type)
                },
                _resize: function() {
                    var e, t, n = this.element,
                        i = this.options.height;
                    i && (n.height(i), n.is(":visible") && (t = n.children(".k-columns").children("div.k-state-default"), i = n.innerHeight(), e = (n.outerHeight() - i) / 2, i = i - (t.outerHeight(!0) - t.height()) - e, t.height(i)))
                },
                refresh: function() {
                    var e = this.dataSource;
                    (e.cubeBuilder || this._cube !== e.cube() || this._catalog !== e.catalog()) && this.treeView.dataSource.fetch(), this._catalog = this.dataSource.catalog(), this._cube = this.dataSource.cube(), this._resize(), this._progress(!1)
                },
                destroy: function() {
                    d.fn.destroy.call(this), this.dataSource.unbind("change", this._refreshHandler), this.form.find(".k-list").off(u), this.rows.destroy(), this.columns.destroy(), this.measures.destroy(), this.treeView.destroy(), this.element = null, this._refreshHandler = null
                }
            });
        c.plugin(p)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.angular.min", ["kendo.core.min"], e)
}(function() {
    return function(e, t, n) {
        "use strict";

        function i(e) {
            var t = T;
            try {
                return T = function(e) {
                    return e()
                }, e()
            } finally {
                T = t
            }
        }

        function r(t, i, r, c, d, g) {
            function v() {
                var n, g, v, _, b, x, S;
                return r.kRebind && (n = e(e(i)[0].cloneNode(!0))), C = o(t, i, r, c, k).options, i.is("select") && ! function(t) {
                    if (t.length > 0) {
                        var n = e(t[0]);
                        !/\S/.test(n.text()) && /^\?/.test(n.val()) && n.remove()
                    }
                }(i[0].options), g = k.call(i, E = C).data(c), l(g, t, r, c, d), t.$emit("kendoWidgetCreated", g), v = f(t, g), r.kRebind && m(g, t, i, n, r.kRebind, v, r), r.kNgDisabled && (_ = r.kNgDisabled, b = t.$eval(_), b && g.enable(!b), a(g, t, i, _)), r.kNgReadonly && (x = r.kNgReadonly, S = t.$eval(x), S && g.readonly(S), s(g, t, i, x)), r.kNgModel && h(g, t, r.kNgModel), w && u(g, t, i, w, y), g && p(g, i), g
            }
            var _, b, w, y, k, x, C, S, D, A, F, I, M, R;
            if (!(i instanceof jQuery)) throw Error("The Kendo UI directives require jQuery to be available before AngularJS. Please include jquery before angular in the document.");
            if (_ = r.kNgDelay, b = t.$eval(_), g = g || [], w = g[0], y = g[1], k = e(i)[c], !k) return window.console.error("Could not find: " + c), null;
            if (x = o(t, i, r, c, k), C = x.options, x.unresolved.length) {
                for (S = [], D = 0, A = x.unresolved.length; A > D; D++) F = x.unresolved[D], I = e.Deferred(function(e) {
                    var i = t.$watch(F.path, function(t) {
                        t !== n && (i(), e.resolve())
                    })
                }).promise(), S.push(I);
                return e.when.apply(null, S).then(v), n
            }
            return _ && !b ? (M = t.$root || t, R = function() {
                var e = t.$watch(_, function(t) {
                    t !== n && (e(), i.removeAttr(r.$attr.kNgDelay), _ = null, T(v))
                })
            }, /^\$(digest|apply)$/.test(M.$$phase) ? R() : t.$apply(R), n) : v()
        }

        function o(i, r, o, a, s) {
            function l(e, r) {
                var o = t.copy(i.$eval(r));
                o === n ? p.push({
                    option: e,
                    path: r
                }) : c[e] = o
            }
            var c, d, u, h, f = a.replace(/^kendo/, ""),
                p = [],
                m = o.kOptions || o.options,
                g = i.$eval(m);
            return m && g === n && p.push({
                option: "options",
                path: m
            }), c = t.extend({}, o.defaultOptions, g), d = s.widget.prototype.options, u = s.widget.prototype.events, e.each(o, function(e, t) {
                var n, i, r, o;
                "source" !== e && "kDataSource" !== e && "kScopeField" !== e && "scopeField" !== e && (n = "data" + e.charAt(0).toUpperCase() + e.slice(1), 0 === e.indexOf("on") && (i = e.replace(/^on./, function(e) {
                    return e.charAt(2).toLowerCase()
                }), u.indexOf(i) > -1 && (c[i] = t)), d.hasOwnProperty(n) ? l(n, t) : d.hasOwnProperty(e) && !M[e] ? l(e, t) : I[e] || (r = e.match(/^k(On)?([A-Z].*)/), r && (o = r[2].charAt(0).toLowerCase() + r[2].slice(1), r[1] && "kOnLabel" != e ? c[o] = t : ("kOnLabel" == e && (o = "onLabel"), l(o, t)))))
            }), h = o.kDataSource || o.source, h && (c.dataSource = F(i, r, f, h)), c.$angular = [i], {
                options: c,
                unresolved: p
            }
        }

        function a(e, t, i, r) {
            return kendo.ui.PanelBar && e instanceof kendo.ui.PanelBar || kendo.ui.Menu && e instanceof kendo.ui.Menu ? (A.warn("k-ng-disabled specified on a widget that does not have the enable() method: " + e.options.name), n) : (t.$watch(r, function(t, n) {
                t != n && e.enable(!t)
            }), n)
        }

        function s(e, t, i, r) {
            return "function" != typeof e.readonly ? (A.warn("k-ng-readonly specified on a widget that does not have the readonly() method: " + e.options.name), n) : (t.$watch(r, function(t, n) {
                t != n && e.readonly(t)
            }), n)
        }

        function l(e, t, n, i, r) {
            if (n[r]) {
                var o = S(n[r]).assign;
                if (!o) throw Error(r + " attribute used but expression in it is not assignable: " + n[i]);
                o(t, e)
            }
        }

        function c(e) {
            return /checkbox|radio/i.test(e.attr("type")) ? e.prop("checked") : e.val()
        }

        function d(e) {
            return R.test(e[0].tagName)
        }

        function u(e, t, i, r, o) {
            var a, s, l, u;
            e.value && (s = !1, a = d(i) ? function() {
                return c(i)
            } : function() {
                return e.value()
            }, r.$render = function() {
                var i = r.$viewValue;
                i === n && (i = r.$modelValue), i === n && (i = null), s = !0, setTimeout(function() {
                    if (s = !1, e) {
                        var n = t[e.element.attr("k-ng-model")];
                        n && (i = n), e.options.autoBind !== !1 || e.listView.bound() ? e.value(i) : i && e.value(i)
                    }
                }, 0)
            }, d(i) && i.on("change", function() {
                s = !0
            }), l = function(e) {
                return function() {
                    var n;
                    s || (e && o && (n = o.$pristine), r.$setViewValue(a()), e && (r.$setPristine(), n && o.$setPristine()), w(t))
                }
            }, e.first("change", l(!1)), kendo.ui.AutoComplete && e instanceof kendo.ui.AutoComplete || e.first("dataBound", l(!0)), u = a(), isNaN(r.$viewValue) || u == r.$viewValue || (r.$isEmpty(r.$viewValue) ? null != u && "" !== u && u != r.$viewValue && r.$setViewValue(u) : e.value(r.$viewValue)), r.$setPristine())
        }

        function h(t, i, r) {
            var o, a, s, l, c, d, u, h, f;
            return "function" != typeof t.value ? (A.warn("k-ng-model specified on a widget that does not have the value() method: " + t.options.name), n) : (o = e(t.element).parents("form"), a = i[o.attr("name")], s = S(r), l = s.assign, c = !1, d = kendo.ui.MultiSelect && t instanceof kendo.ui.MultiSelect, u = function(e) {
                return d ? e.length : 0
            }, h = u(s(i)), t.$angular_setLogicValue(s(i)), f = function(e, i) {
                e === n && (e = null), c || e == i && u(e) == h || (h = u(e), t.$angular_setLogicValue(e))
            }, d ? i.$watchCollection(r, f) : i.$watch(r, f), t.first("change", function() {
                c = !0, a && a.$pristine && a.$setDirty(), w(i, function() {
                    l(i, t.$angular_getLogicValue()), h = u(s(i))
                }), c = !1
            }), n)
        }

        function f(e, t) {
            var n = e.$on("$destroy", function() {
                n(), t && (kendo.destroy(t.element), t = null)
            });
            return n
        }

        function p(t, n) {
            function i() {
                a.disconnect()
            }

            function r() {
                a.observe(e(n)[0], {
                    attributes: !0
                })
            }
            var o, a;
            window.MutationObserver && t.wrapper && (o = [].slice.call(e(n)[0].classList), a = new MutationObserver(function(n) {
                i(), t && (n.forEach(function(n) {
                    var i, r = e(t.wrapper)[0];
                    switch (n.attributeName) {
                        case "class":
                            i = [].slice.call(n.target.classList), i.forEach(function(e) {
                                o.indexOf(e) < 0 && (r.classList.add(e), kendo.ui.ComboBox && t instanceof kendo.ui.ComboBox && t.input[0].classList.add(e))
                            }), o.forEach(function(e) {
                                i.indexOf(e) < 0 && (r.classList.remove(e), kendo.ui.ComboBox && t instanceof kendo.ui.ComboBox && t.input[0].classList.remove(e))
                            }), o = i;
                            break;
                        case "disabled":
                            "function" != typeof t.enable || t.element.attr("readonly") || t.enable(!e(n.target).attr("disabled"));
                            break;
                        case "readonly":
                            "function" != typeof t.readonly || t.element.attr("disabled") || t.readonly(!!e(n.target).attr("readonly"))
                    }
                }), r())
            }), r(), t.first("destroy", i))
        }

        function m(t, n, i, r, o, a, s) {
            var l = n.$watch(o, function(o, c) {
                var d, u, h, f, p;
                t._muteRebind || o === c || (l(), s._cleanUp && s._cleanUp(), d = H[t.options.name], d && d.forEach(function(t) {
                    var i = n.$eval(s["k" + t]);
                    i && r.append(e(i).attr(kendo.toHyphens("k" + t), ""))
                }), u = e(t.wrapper)[0], h = e(t.element)[0], f = "Upload" === t.options.name, f && (i = e(h)), p = i.injector().get("$compile"), t._destroy(), a && a(), t = null, h && (u && u.parentNode.replaceChild(h, u), e(i).replaceWith(r)), p(r)(n))
            }, !0);
            w(n)
        }

        function g(e, t) {
            return function(n, i) {
                return e.call(t, n, i)
            }
        }

        function v(e, t) {
            this[e] = kendo.stringify(t)
        }

        function _(e, n) {
            function i(e, t) {
                x.directive(e, ["directiveFactory", function(n) {
                    return n.create(t, e)
                }])
            }
            var r, o, a, s, l = n ? "Mobile" : "";
            l += e.fn.options.name, r = l, o = "kendo" + l.charAt(0) + l.substr(1).toLowerCase(), l = "kendo" + l, a = l.replace(/([A-Z])/g, "-$1"), -1 == z.indexOf(l.replace("kendo", "")) && (s = l === o ? [l] : [l, o], t.forEach(s, function(e) {
                x.directive(e, function() {
                    return {
                        restrict: "E",
                        replace: !0,
                        template: function(e, t) {
                            var n = P[r] || "div",
                                i = t.kScopeField || t.scopeField;
                            return "<" + n + " " + a + (i ? '="' + i + '"' : "") + ">" + e.html() + "</" + n + ">"
                        }
                    }
                })
            })), B.indexOf(l.replace("kendo", "")) > -1 || (i(l, l), o != l && i(o, l))
        }

        function b(t) {
            return t = e(t), kendo.widgetInstance(t, kendo.ui) || kendo.widgetInstance(t, kendo.mobile.ui) || kendo.widgetInstance(t, kendo.dataviz.ui)
        }

        function w(e, t) {
            var n = e.$root || e,
                i = /^\$(digest|apply)$/.test(n.$$phase);
            t ? i ? t() : n.$apply(t) : i || n.$digest()
        }

        function y(t, n) {
            t.$destroy(), n && e(n).removeData("$scope").removeData("$$kendoScope").removeData("$isolateScope").removeData("$isolateScopeNoTemplate").removeClass("ng-scope")
        }

        function k(n, i, r) {
            var o, a, s;
            if (e.isArray(n)) return t.forEach(n, function(e) {
                k(e, i, r)
            });
            if ("string" == typeof n) {
                for (o = n.split("."), a = kendo; a && o.length > 0;) a = a[o.shift()];
                if (!a) return L.push([n, i, r]), !1;
                n = a.prototype
            }
            return s = n[i], n[i] = function() {
                var e = this,
                    t = arguments;
                return r.apply({
                    self: e,
                    next: function() {
                        return s.apply(e, arguments.length > 0 ? arguments : t)
                    }
                }, t)
            }, !0
        }
        var x, C, S, T, D, A, E, F, I, M, R, P, z, B, L, H;
        t && t.injector && (x = t.module("kendo.directives", []), C = t.injector(["ng"]), S = C.get("$parse"), T = C.get("$timeout"), A = C.get("$log"), F = function() {
            var e = {
                    TreeList: "TreeListDataSource",
                    TreeView: "HierarchicalDataSource",
                    Scheduler: "SchedulerDataSource",
                    PanelBar: "$PLAIN",
                    Menu: "$PLAIN",
                    ContextMenu: "$PLAIN"
                },
                t = function(e, t) {
                    return "$PLAIN" == t ? e : kendo.data[t].create(e)
                };
            return function(n, i, r, o) {
                var a = e[r] || "DataSource",
                    s = n.$eval(o),
                    l = t(s, a);
                return n.$watch(o, function(e) {
                    var n, r = b(i);
                    r && "function" == typeof r.setDataSource && e !== s && (n = t(e, a), r.setDataSource(n), s = e)
                }), l
            }
        }(), I = {
            kDataSource: !0,
            kOptions: !0,
            kRebind: !0,
            kNgModel: !0,
            kNgDelay: !0
        }, M = {
            name: !0,
            title: !0,
            style: !0
        }, R = /^(input|select|textarea)$/i, x.factory("directiveFactory", ["$compile", function(t) {
            var n, i, o = !1;
            return D = t, i = function(t, i) {
                return {
                    restrict: "AC",
                    require: ["?ngModel", "^?form"],
                    scope: !1,
                    controller: ["$scope", "$attrs", "$element", function(e, t) {
                        this.template = g(v, t), t._cleanUp = g(function() {
                            this.template = null, t._cleanUp = null
                        }, this)
                    }],
                    link: function(a, s, l, c) {
                        var d, u = e(s),
                            h = t.replace(/([A-Z])/g, "-$1");
                        u.attr(h, u.attr("data-" + h)), u[0].removeAttribute("data-" + h), d = r(a, s, l, t, i, c), d && (n && clearTimeout(n), n = setTimeout(function() {
                            a.$emit("kendoRendered"), o || (o = !0, e("form").each(function() {
                                var t = e(this).controller("form");
                                t && t.$setPristine()
                            }))
                        }))
                    }
                }
            }, {
                create: i
            }
        }]), P = {
            Editor: "textarea",
            NumericTextBox: "input",
            DatePicker: "input",
            DateTimePicker: "input",
            TimePicker: "input",
            AutoComplete: "input",
            ColorPicker: "input",
            MaskedTextBox: "input",
            MultiSelect: "input",
            Upload: "input",
            Validator: "form",
            Button: "button",
            MobileButton: "a",
            MobileBackButton: "a",
            MobileDetailButton: "a",
            ListView: "ul",
            MobileListView: "ul",
            TreeView: "ul",
            Menu: "ul",
            ContextMenu: "ul",
            ActionSheet: "ul"
        }, z = ["MobileView", "MobileDrawer", "MobileLayout", "MobileSplitView", "MobilePane", "MobileModalView"], B = ["MobileApplication", "MobileView", "MobileModalView", "MobileLayout", "MobileActionSheet", "MobileDrawer", "MobileSplitView", "MobilePane", "MobileScrollView", "MobilePopOver"], t.forEach(["MobileNavBar", "MobileButton", "MobileBackButton", "MobileDetailButton", "MobileTabStrip", "MobileScrollView", "MobileScroller"], function(e) {
            B.push(e), e = "kendo" + e, x.directive(e, function() {
                return {
                    restrict: "A",
                    link: function(t, n, i) {
                        r(t, n, i, e, e)
                    }
                }
            })
        }), L = [], kendo.onWidgetRegistered(function(t) {
            L = e.grep(L, function(e) {
                return !k.apply(null, e)
            }), _(t.widget, "Mobile" == t.prefix)
        }), k(["ui.Widget", "mobile.ui.Widget"], "angular", function(r, o) {
            var a, s = this.self;
            return "init" == r ? (!o && E && (o = E), E = null, o && o.$angular && (s.$angular_scope = o.$angular[0], s.$angular_init(s.element, o)), n) : (a = s.$angular_scope, a && i(function() {
                var i, l, c = o(),
                    d = c.elements,
                    u = c.data;
                if (d.length > 0) switch (r) {
                    case "cleanup":
                        t.forEach(d, function(t) {
                            var n = e(t).data("$$kendoScope");
                            n && n !== a && n.$$kendoScope && y(n, t)
                        });
                        break;
                    case "compile":
                        i = s.element.injector(), l = i ? i.get("$compile") : D, t.forEach(d, function(t, i) {
                            var r, o;
                            c.scopeFrom ? r = c.scopeFrom : (o = u && u[i], o !== n ? (r = e.extend(a.$new(), o), r.$$kendoScope = !0) : r = a), e(t).data("$$kendoScope", r), l(t)(r)
                        }), w(a)
                }
            }), n)
        }), k("ui.Widget", "$angular_getLogicValue", function() {
            return this.self.value()
        }), k("ui.Widget", "$angular_setLogicValue", function(e) {
            this.self.value(e)
        }), k("ui.Select", "$angular_getLogicValue", function() {
            var e = this.self.dataItem(),
                t = this.self.options.dataValueField;
            return e ? this.self.options.valuePrimitive ? t ? e[t] : e : e.toJSON() : null
        }), k("ui.Select", "$angular_setLogicValue", function(e) {
            var t = this.self,
                i = t.options,
                r = i.dataValueField,
                o = i.text || "";
            e === n && (e = ""), r && !i.valuePrimitive && e && (o = e[i.dataTextField] || "", e = e[r || i.dataTextField]), t.options.autoBind !== !1 || t.listView.bound() ? t.value(e) : !o && e && i.valuePrimitive ? t.value(e) : t._preselect(e, o)
        }), k("ui.MultiSelect", "$angular_getLogicValue", function() {
            var t = this.self.dataItems().slice(0),
                n = this.self.options.dataValueField;
            return n && this.self.options.valuePrimitive && (t = e.map(t, function(e) {
                return e[n]
            })), t
        }), k("ui.MultiSelect", "$angular_setLogicValue", function(t) {
            var n, i, r, o;
            null == t && (t = []), n = this.self, i = n.options, r = i.dataValueField, o = t, r && !i.valuePrimitive && (t = e.map(t, function(e) {
                return e[r]
            })), i.autoBind !== !1 || i.valuePrimitive || n.listView.bound() ? n.value(t) : n._preselect(o, t)
        }), k("ui.AutoComplete", "$angular_getLogicValue", function() {
            var e, t, n, i, r, o = this.self.options,
                a = this.self.value().split(o.separator),
                s = o.valuePrimitive,
                l = this.self.dataSource.data(),
                c = [];
            for (e = 0, t = l.length; t > e; e++)
                for (n = l[e], i = o.dataTextField ? n[o.dataTextField] : n, r = 0; a.length > r; r++)
                    if (i === a[r]) {
                        c.push(s ? i : n.toJSON());
                        break
                    } return c
        }), k("ui.AutoComplete", "$angular_setLogicValue", function(t) {
            null == t && (t = []);
            var i = this.self,
                r = i.options.dataTextField;
            r && !i.options.valuePrimitive && (t = t.length !== n ? e.map(t, function(e) {
                return e[r]
            }) : t[r]), i.value(t)
        }), k("ui.Widget", "$angular_init", function(t, n) {
            var i, r, o, a, s = this.self;
            if (n && !e.isArray(n))
                for (i = s.$angular_scope, r = s.events.length; --r >= 0;) o = s.events[r], a = n[o], a && "string" == typeof a && (n[o] = s.$angular_makeEventHandler(o, i, a))
        }), k("ui.Widget", "$angular_makeEventHandler", function(e, t, n) {
            return n = S(n),
                function(e) {
                    w(t, function() {
                        n(t, {
                            kendoEvent: e
                        })
                    })
                }
        }), k(["ui.Grid", "ui.ListView", "ui.TreeView"], "$angular_makeEventHandler", function(e, n, i) {
            return "change" != e ? this.next() : (i = S(i), function(e) {
                var r, o, a, s, l, c, d, u, h, f = e.sender,
                    p = f.options,
                    m = {
                        kendoEvent: e
                    };
                for (t.isString(p.selectable) && (r = -1 !== p.selectable.indexOf("cell"), o = -1 !== p.selectable.indexOf("multiple")), a = m.selected = this.select(), s = m.data = [], l = m.columns = [], d = 0; a.length > d; d++) u = r ? a[d].parentNode : a[d], h = f.dataItem(u), r ? (t.element.inArray(h, s) < 0 && s.push(h), c = t.element(a[d]).index(), t.element.inArray(c, l) < 0 && l.push(c)) : s.push(h);
                o || (m.dataItem = m.data = s[0], m.angularDataItem = kendo.proxyModelSetters(m.dataItem), m.selected = a[0]), w(n, function() {
                    i(n, m)
                })
            })
        }), k("ui.Grid", "$angular_init", function(i, r) {
            if (this.next(), r.columns) {
                var o = e.extend({}, kendo.Template, r.templateSettings);
                t.forEach(r.columns, function(e) {
                    !e.field || e.template || e.format || e.values || e.encoded !== n && !e.encoded || (e.template = "<span ng-bind='" + kendo.expr(e.field, "dataItem") + "'>#: " + kendo.expr(e.field, o.paramName) + "#</span>")
                })
            }
        }), k("mobile.ui.ButtonGroup", "value", function(e) {
            var t = this.self;
            return null != e && (t.select(t.element.children("li.km-button").eq(e)), t.trigger("change"), t.trigger("select", {
                index: t.selectedIndex
            })), t.selectedIndex
        }), k("mobile.ui.ButtonGroup", "_select", function() {
            this.next(), this.self.trigger("change")
        }), x.directive("kendoMobileApplication", function() {
            return {
                terminal: !0,
                link: function(e, t, n) {
                    r(e, t, n, "kendoMobileApplication", "kendoMobileApplication")
                }
            }
        }).directive("kendoMobileView", function() {
            return {
                scope: !0,
                link: {
                    pre: function(e, t, n) {
                        n.defaultOptions = e.viewOptions, n._instance = r(e, t, n, "kendoMobileView", "kendoMobileView")
                    },
                    post: function(e, t, n) {
                        n._instance._layout(), n._instance._scroller()
                    }
                }
            }
        }).directive("kendoMobileDrawer", function() {
            return {
                scope: !0,
                link: {
                    pre: function(e, t, n) {
                        n.defaultOptions = e.viewOptions, n._instance = r(e, t, n, "kendoMobileDrawer", "kendoMobileDrawer")
                    },
                    post: function(e, t, n) {
                        n._instance._layout(), n._instance._scroller()
                    }
                }
            }
        }).directive("kendoMobileModalView", function() {
            return {
                scope: !0,
                link: {
                    pre: function(e, t, n) {
                        n.defaultOptions = e.viewOptions, n._instance = r(e, t, n, "kendoMobileModalView", "kendoMobileModalView")
                    },
                    post: function(e, t, n) {
                        n._instance._layout(), n._instance._scroller()
                    }
                }
            }
        }).directive("kendoMobileSplitView", function() {
            return {
                terminal: !0,
                link: {
                    pre: function(e, t, n) {
                        n.defaultOptions = e.viewOptions, n._instance = r(e, t, n, "kendoMobileSplitView", "kendoMobileSplitView")
                    },
                    post: function(e, t, n) {
                        n._instance._layout()
                    }
                }
            }
        }).directive("kendoMobilePane", function() {
            return {
                terminal: !0,
                link: {
                    pre: function(e, t, n) {
                        n.defaultOptions = e.viewOptions, r(e, t, n, "kendoMobilePane", "kendoMobilePane")
                    }
                }
            }
        }).directive("kendoMobileLayout", function() {
            return {
                link: {
                    pre: function(e, t, n) {
                        r(e, t, n, "kendoMobileLayout", "kendoMobileLayout")
                    }
                }
            }
        }).directive("kendoMobileActionSheet", function() {
            return {
                restrict: "A",
                link: function(t, n, i) {
                    n.find("a[k-action]").each(function() {
                        e(this).attr("data-" + kendo.ns + "action", e(this).attr("k-action"))
                    }), r(t, n, i, "kendoMobileActionSheet", "kendoMobileActionSheet")
                }
            }
        }).directive("kendoMobilePopOver", function() {
            return {
                terminal: !0,
                link: {
                    pre: function(e, t, n) {
                        n.defaultOptions = e.viewOptions, r(e, t, n, "kendoMobilePopOver", "kendoMobilePopOver")
                    }
                }
            }
        }).directive("kendoViewTitle", function() {
            return {
                restrict: "E",
                replace: !0,
                template: function(e) {
                    return "<span data-" + kendo.ns + "role='view-title'>" + e.html() + "</span>"
                }
            }
        }).directive("kendoMobileHeader", function() {
            return {
                restrict: "E",
                link: function(e, t) {
                    t.addClass("km-header").attr("data-role", "header")
                }
            }
        }).directive("kendoMobileFooter", function() {
            return {
                restrict: "E",
                link: function(e, t) {
                    t.addClass("km-footer").attr("data-role", "footer")
                }
            }
        }).directive("kendoMobileScrollViewPage", function() {
            return {
                restrict: "E",
                replace: !0,
                template: function(e) {
                    return "<div data-" + kendo.ns + "role='page'>" + e.html() + "</div>"
                }
            }
        }), t.forEach(["align", "icon", "rel", "transition", "actionsheetContext"], function(e) {
            var t = "k" + e.slice(0, 1).toUpperCase() + e.slice(1);
            x.directive(t, function() {
                return {
                    restrict: "A",
                    priority: 2,
                    link: function(n, i, r) {
                        i.attr(kendo.attr(kendo.toHyphens(e)), n.$eval(r[t]))
                    }
                }
            })
        }), H = {
            TreeMap: ["Template"],
            MobileListView: ["HeaderTemplate", "Template"],
            MobileScrollView: ["EmptyTemplate", "Template"],
            Grid: ["AltRowTemplate", "DetailTemplate", "RowTemplate"],
            ListView: ["EditTemplate", "Template", "AltTemplate"],
            Pager: ["SelectTemplate", "LinkTemplate"],
            PivotGrid: ["ColumnHeaderTemplate", "DataCellTemplate", "RowHeaderTemplate"],
            Scheduler: ["AllDayEventTemplate", "DateHeaderTemplate", "EventTemplate", "MajorTimeHeaderTemplate", "MinorTimeHeaderTemplate"],
            TreeView: ["Template"],
            Validator: ["ErrorTemplate"]
        }, function() {
            var e = {};
            t.forEach(H, function(n, i) {
                t.forEach(n, function(t) {
                    e[t] || (e[t] = []), e[t].push("?^^kendo" + i)
                })
            }), t.forEach(e, function(e, t) {
                var n = "k" + t,
                    i = kendo.toHyphens(n);
                x.directive(n, function() {
                    return {
                        restrict: "A",
                        require: e,
                        terminal: !0,
                        compile: function(t, r) {
                            if ("" === r[n]) {
                                t.removeAttr(i);
                                var o = t[0].outerHTML;
                                return function(t, r, a, s) {
                                    for (var l; !l && s.length;) l = s.shift();
                                    l ? (l.template(n, o), r.remove()) : A.warn(i + " without a matching parent widget found. It can be one of the following: " + e.join(", "))
                                }
                            }
                        }
                    }
                })
            })
        }())
    }(window.kendo.jQuery, window.angular), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.webcomponents.min", ["kendo.core.min"], e)
}(function() {
    return function(e, t, n) {
        function i(e, t) {
            var i = e.getAttribute(t);
            return null === i ? i = n : "null" === i ? i = null : "true" === i ? i = !0 : "false" === i ? i = !1 : p.test(i) ? i = parseFloat(i) : h.test(i) && !f.test(i) && (i = Function("return (" + i + ")")()), i
        }

        function r(e, t) {
            var n = {};
            return Object.keys(t).concat("dataSource").forEach(function(t) {
                e.hasAttribute(kendo.toHyphens(t)) && (n[t] = i(e, kendo.toHyphens(t)))
            }), n
        }

        function o(e) {
            var t = {};
            return Object.keys(e).forEach(function(n) {
                "_" != n[0] && (t[n] = e[n])
            }), t
        }

        function a(e, t) {
            var n = document.createEvent("CustomEvent");
            n.initCustomEvent(e, !1, !0, o(t)), this.dispatchEvent(n), n.defaultPrevented && t.preventDefault()
        }

        function s(e, t) {
            var n, i = Object.keys(t);
            for (n = 0; i.length >= n; n++)
                if ("function" == typeof t[i[n]]) e[i[n]] || (e[i[n]] = t[i[n]].bind(e.widget));
                else {
                    if ("options" === i[n]) continue;
                    e[i[n]] = e[i[n]] || t[i[n]]
                }
        }

        function l(t, n) {
            var i = n.prototype.options,
                o = Object.create(HTMLElement.prototype);
            Object.defineProperty(o, "options", {
                get: function() {
                    return this.widget.options
                },
                set: function(n) {
                    var i, r, o, a = this.widget;
                    n = e.extend(!0, {}, a.options, n), i = e(a.wrapper)[0], r = e(a.element)[0], a._destroy(), o = document.createElement(c[t] || "div"), i && r && (i.parentNode.replaceChild(r, i), e(r).replaceWith(o)), a.value && (n.value = a.value()), a.init(o, n), this.bindEvents()
                }
            }), o.bindEvents = function() {
                n.prototype.events.forEach(function(e) {
                    this.widget.bind(e, a.bind(this, e)), this.hasAttribute(d + e) && this.bind(e, function(t) {
                        window[this.getAttribute(d + e)].call(this, t)
                    }.bind(this))
                }.bind(this))
            }, o.attachedCallback = function() {
                var o, a = this,
                    l = document.createElement(c[t] || "div");
                e(l).append(a.childNodes), e(l).attr("class", e(a).attr("class")), e(l).attr("style", e(a).attr("style")), a.appendChild(l), a.widget = new n(l, r(a, i)), o = a.widget;
                do s(a, o); while (o = Object.getPrototypeOf(o));
                this.bindEvents()
            }, o.detachedCallback = function() {
                kendo.destroy(this.element)
            }, kendo.webComponents.push("kendo-" + t), document.registerElement("kendo-" + t, {
                prototype: o
            })
        }
        var c, d, u, h, f, p;
        kendo.support.customElements && !kendo.webComponents.length && (!t || 1 != t.version.major && !t.injector) && (c = {
            editor: "textarea",
            numerictextbox: "input",
            datepicker: "input",
            datetimepicker: "input",
            timepicker: "input",
            autocomplete: "input",
            colorpicker: "input",
            maskedtextbox: "input",
            dropdownlist: "select",
            multiselect: "select",
            upload: "input",
            validator: "form",
            button: "button",
            mobilebutton: "a",
            mobilebackbutton: "a",
            mobiledetailbutton: "a",
            listview: "ul",
            mobilelistview: "ul",
            treeview: "ul",
            menu: "ul",
            contextmenu: "ul",
            actionsheet: "ul"
        }, d = "on-", u = [], kendo.onWidgetRegistered(function(e) {
            var t = e.prefix + e.widget.prototype.options.name.toLowerCase(); - 1 === u.indexOf(t) && (u.push(t), l(t, e.widget))
        }), h = /^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/, f = /^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]*\]$/, p = /^(\+|-?)\d+(\.?)\d*$/);
    }(window.kendo.jQuery, window.angular), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.angular2.min", ["kendo.core.min", "kendo.webcomponents.min"], e)
}(function() {
    ! function(e, t) {
        var n, i;
        t && t.register && (n = this && this.__decorate || function(e, t, n, i) {
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) return Reflect.decorate(e, t, n, i);
            switch (arguments.length) {
                case 2:
                    return e.reduceRight(function(e, t) {
                        return t && t(e) || e
                    }, t);
                case 3:
                    return e.reduceRight(function(e, i) {
                        return void(i && i(t, n))
                    }, void 0);
                case 4:
                    return e.reduceRight(function(e, i) {
                        return i && i(t, n, e) || e
                    }, i)
            }
        }, i = this && this.__metadata || function(e, t) {
            return "object" == typeof Reflect && "function" == typeof Reflect.metadata ? Reflect.metadata(e, t) : void 0
        }, t.register("kendo/angular2", ["angular2/angular2"], function(t) {
            var r, o;
            return {
                setters: [function(e) {
                    r = e
                }],
                execute: function() {
                    o = function() {
                        function t(e, t) {
                            var n = this;
                            this.elementRef = t, this.onChange = function(e) {}, this.onTouched = function() {}, this.element = t.nativeElement, this.element.addEventListener("change", function() {
                                n.onChange(n.element.value())
                            }), this.element.addEventListener("spin", function() {
                                n.onChange(n.element.value())
                            }), e.valueAccessor = this, this.cd = e, e.valueAccessor = this
                        }
                        return t.prototype.writeValue = function(e) {
                            this.element.value(e)
                        }, t.prototype.registerOnChange = function(e) {
                            this.onChange = e
                        }, t.prototype.registerOnTouched = function(e) {
                            this.onTouched = e
                        }, t = n([r.Directive({
                            selector: e.webComponents.join(",")
                        }), i("design:paramtypes", [r.NgControl, r.ElementRef])], t)
                    }(), t("KendoValueAccessor", o)
                }
            }
        }))
    }(window.kendo, window.System)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.web.min", ["kendo.core.min", "kendo.router.min", "kendo.view.min", "kendo.fx.min", "kendo.dom.min", "kendo.data.odata.min", "kendo.data.xml.min", "kendo.data.min", "kendo.ooxml.min", "kendo.excel.min", "kendo.data.signalr.min", "kendo.binder.min", "kendo.drawing.min", "kendo.validator.min", "kendo.userevents.min", "kendo.draganddrop.min", "kendo.mobile.scroller.min", "kendo.groupable.min", "kendo.reorderable.min", "kendo.resizable.min", "kendo.sortable.min", "kendo.selectable.min", "kendo.button.min", "kendo.pager.min", "kendo.popup.min", "kendo.notification.min", "kendo.tooltip.min", "kendo.list.min", "kendo.calendar.min", "kendo.datepicker.min", "kendo.autocomplete.min", "kendo.dropdownlist.min", "kendo.combobox.min", "kendo.multiselect.min", "kendo.colorpicker.min", "kendo.columnmenu.min", "kendo.columnsorter.min", "kendo.grid.min", "kendo.listview.min", "kendo.filebrowser.min", "kendo.imagebrowser.min", "kendo.editor.min", "kendo.numerictextbox.min", "kendo.maskedtextbox.min", "kendo.menu.min", "kendo.editable.min", "kendo.pivot.fieldmenu.min", "kendo.filtercell.min", "kendo.panelbar.min", "kendo.progressbar.min", "kendo.responsivepanel.min", "kendo.tabstrip.min", "kendo.timepicker.min", "kendo.toolbar.min", "kendo.datetimepicker.min", "kendo.treeview.draganddrop.min", "kendo.treeview.min", "kendo.slider.min", "kendo.splitter.min", "kendo.upload.min", "kendo.window.min", "kendo.virtuallist.min", "kendo.scheduler.view.min", "kendo.scheduler.dayview.min", "kendo.scheduler.agendaview.min", "kendo.scheduler.monthview.min", "kendo.scheduler.recurrence.min", "kendo.scheduler.min", "kendo.gantt.list.min", "kendo.gantt.timeline.min", "kendo.gantt.min", "kendo.treelist.min", "kendo.pivotgrid.min", "kendo.spreadsheet.min", "kendo.pivot.configurator.min", "kendo.angular.min", "kendo.webcomponents.min", "kendo.angular2.min"], e)
}(function() {
    "bundle all";
    return window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.core.min", ["kendo.core.min", "kendo.drawing.min"], e)
}(function() {
    return function(e, t) {
        function n(e, t) {
            var n = {
                top: 0,
                right: 0,
                bottom: 0,
                left: 0
            };
            return t = t || 0, "number" == typeof e ? n[Be] = n[ze] = n[ce] = n[Te] = e : (n[Be] = e[Be] || t, n[ze] = e[ze] || t, n[ce] = e[ce] || t, n[Te] = e[Te] || t), n
        }

        function i(e, t) {
            var n = e.tickX,
                i = e.tickY,
                r = e.position,
                o = new X.Path({
                    stroke: {
                        width: t.width,
                        color: t.color
                    }
                });
            return e.vertical ? o.moveTo(n, r).lineTo(n + t.size, r) : o.moveTo(r, i).lineTo(r, i + t.size), y(o), o
        }

        function r(e, t) {
            var n = e.lineStart,
                i = e.lineEnd,
                r = e.position,
                o = new X.Path({
                    stroke: {
                        width: t.width,
                        color: t.color,
                        dashType: t.dashType
                    }
                });
            return e.vertical ? o.moveTo(n, r).lineTo(i, r) : o.moveTo(r, n).lineTo(r, i), y(o), o
        }

        function o(e, t) {
            var n, i, r, o = u(t - e, _e - 1);
            if (0 === o) {
                if (0 === t) return .1;
                o = oe.abs(t)
            }
            return n = oe.pow(10, oe.floor(oe.log(o) / oe.log(10))), i = u(o / n, _e), r = 1, r = 1.904762 > i ? .2 : 4.761904 > i ? .5 : 9.523809 > i ? 1 : 2, u(n * r, _e)
        }

        function a(e, t, n, i, r) {
            var o = r * we;
            return new We(n + (e - n) * oe.cos(o) + (t - i) * oe.sin(o), i - (e - n) * oe.sin(o) + (t - i) * oe.cos(o))
        }

        function s(t, n) {
            if (t.x1 == n.x1 && t.y1 == n.y1 && t.x2 == n.x2 && t.y2 == n.y2) return n;
            var i = oe.min(t.x1, n.x1),
                r = oe.max(t.x1, n.x1),
                o = oe.min(t.x2, n.x2),
                a = oe.max(t.x2, n.x2),
                s = oe.min(t.y1, n.y1),
                l = oe.max(t.y1, n.y1),
                c = oe.min(t.y2, n.y2),
                d = oe.max(t.y2, n.y2),
                u = [];
            return u[0] = C(r, s, o, l), u[1] = C(i, l, r, c), u[2] = C(o, l, a, c), u[3] = C(r, c, o, d), t.x1 == i && t.y1 == s || n.x1 == i && n.y1 == s ? (u[4] = C(i, s, r, l), u[5] = C(o, c, a, d)) : (u[4] = C(o, s, a, l), u[5] = C(i, c, r, d)), e.grep(u, function(e) {
                return e.height() > 0 && e.width() > 0
            })[0]
        }

        function l(e, t) {
            return -1 != ne(e, t)
        }

        function c(e, t) {
            return u(oe.ceil(e / t) * t, _e)
        }

        function d(e, t) {
            return u(oe.floor(e / t) * t, _e)
        }

        function u(e, t) {
            var n = oe.pow(10, t || 0);
            return oe.round(e * n) / n
        }

        function h(e, t) {
            return oe.log(e) / oe.log(t)
        }

        function f(e, t, n) {
            var i = u(oe.abs(e % t), _e),
                r = t * (1 - n);
            return 0 === i || i > r
        }

        function p(e, t, n) {
            return u(e + (t - e) * n, ue)
        }

        function m(e, t) {
            return e - t
        }

        function g(e, t) {
            return e.match(ye) ? W.format.apply(this, arguments) : W.toString(t, e)
        }

        function v(e, t) {
            return 0 > -e.x * t.y + e.y * t.x
        }

        function _(e, t) {
            return e && t ? e.getTime() - t.getTime() : -1
        }

        function b(e) {
            var t = e.originalEvent,
                n = 0;
            return t.wheelDelta && (n = -t.wheelDelta / 120, n = n > 0 ? oe.ceil(n) : oe.floor(n)), t.detail && (n = u(t.detail / 3)), n
        }

        function w(e) {
            if (!e || !e.indexOf || e.indexOf("&") < 0) return e;
            var t = w._element;
            return t.innerHTML = e, t.textContent || t.innerText
        }

        function y(e) {
            var t, n;
            if (!W.support.vml)
                for (t = .5, e.options.stroke && G(e.options.stroke.width) && e.options.stroke.width % 2 === 0 && (t = 0), n = 0; e.segments.length > n; n++) e.segments[n].anchor().round(0).translate(t, t);
            return e
        }

        function k(e) {
            var t, n, i = e.stops,
                r = e.innerRadius / e.radius * 100,
                o = i.length,
                a = [];
            for (t = 0; o > t; t++) n = ae({}, i[t]), n.offset = (n.offset * (100 - r) + r) / 100, a.push(n);
            return a
        }

        function x(e) {
            var t = e.origin,
                n = e.bottomRight();
            return new C(t.x, t.y, n.x, n.y)
        }
        var C, S, T, D, A, E, F, I, M, R, P, z, B, L, H, N, O, V, U, W = window.kendo,
            j = W.util,
            q = j.append,
            G = j.defined,
            $ = j.last,
            Y = j.valueOrDefault,
            K = W.dataviz,
            Q = K.geometry,
            X = K.drawing,
            J = X.util.measureText,
            Z = W.Class,
            ee = W.template,
            te = e.noop,
            ne = e.inArray,
            ie = e.isPlainObject,
            re = e.trim,
            oe = Math,
            ae = W.deepExtend,
            se = "axisLabelClick",
            le = "#000",
            ce = "bottom",
            de = "center",
            ue = 3,
            he = "clip",
            fe = "circle",
            pe = "cross",
            me = "12px sans-serif",
            ge = 400,
            ve = 7,
            _e = 10,
            be = 600,
            we = oe.PI / 180,
            ye = /\{\d+:?/,
            ke = "height",
            xe = 1e5,
            Ce = 600,
            Se = "inside",
            Te = "left",
            De = "linear",
            Ae = Number.MAX_VALUE,
            Ee = -Number.MAX_VALUE,
            Fe = "none",
            Ie = "noteClick",
            Me = "noteHover",
            Re = "outside",
            Pe = "radial",
            ze = "right",
            Be = "top",
            Le = "triangle",
            He = "width",
            Ne = "#fff",
            Oe = "x",
            Ve = "y",
            Ue = .2,
            We = function(e, n) {
                var i = this;
                return i instanceof We ? (i.x = e || 0, i.y = n || 0, t) : new We(e, n)
            };
        We.fn = We.prototype = {
            clone: function() {
                var e = this;
                return new We(e.x, e.y)
            },
            equals: function(e) {
                return e && e.x === this.x && e.y === this.y
            },
            rotate: function(e, t) {
                var n = this,
                    i = t * we,
                    r = oe.cos(i),
                    o = oe.sin(i),
                    a = e.x,
                    s = e.y,
                    l = n.x,
                    c = n.y;
                return n.x = u(a + (l - a) * r + (c - s) * o, ue), n.y = u(s + (c - s) * r - (l - a) * o, ue), n
            },
            multiply: function(e) {
                var t = this;
                return t.x *= e, t.y *= e, t
            },
            distanceTo: function(e) {
                var t = this.x - e.x,
                    n = this.y - e.y;
                return oe.sqrt(t * t + n * n)
            }
        }, We.onCircle = function(e, t, n) {
            return t *= we, new We(e.x - n * oe.cos(t), e.y - n * oe.sin(t))
        }, C = function(e, n, i, r) {
            var o = this;
            return o instanceof C ? (o.x1 = e || 0, o.x2 = i || 0, o.y1 = n || 0, o.y2 = r || 0, t) : new C(e, n, i, r)
        }, C.fn = C.prototype = {
            width: function() {
                return this.x2 - this.x1
            },
            height: function() {
                return this.y2 - this.y1
            },
            translate: function(e, t) {
                var n = this;
                return n.x1 += e, n.x2 += e, n.y1 += t, n.y2 += t, n
            },
            move: function(e, t) {
                var n = this,
                    i = n.height(),
                    r = n.width();
                return G(e) && (n.x1 = e, n.x2 = n.x1 + r), G(t) && (n.y1 = t, n.y2 = n.y1 + i), n
            },
            wrap: function(e) {
                var t = this;
                return t.x1 = oe.min(t.x1, e.x1), t.y1 = oe.min(t.y1, e.y1), t.x2 = oe.max(t.x2, e.x2), t.y2 = oe.max(t.y2, e.y2), t
            },
            wrapPoint: function(e) {
                return this.wrap(new C(e.x, e.y, e.x, e.y)), this
            },
            snapTo: function(e, t) {
                var n = this;
                return t != Oe && t || (n.x1 = e.x1, n.x2 = e.x2), t != Ve && t || (n.y1 = e.y1, n.y2 = e.y2), n
            },
            alignTo: function(e, t) {
                var n, i, r = this,
                    o = r.height(),
                    a = r.width(),
                    s = t == Be || t == ce ? Ve : Oe,
                    l = s == Ve ? o : a;
                return t === de ? (n = e.center(), i = r.center(), r.x1 += n.x - i.x, r.y1 += n.y - i.y) : r[s + 1] = t === Be || t === Te ? e[s + 1] - l : e[s + 2], r.x2 = r.x1 + a, r.y2 = r.y1 + o, r
            },
            shrink: function(e, t) {
                var n = this;
                return n.x2 -= e, n.y2 -= t, n
            },
            expand: function(e, t) {
                return this.shrink(-e, -t), this
            },
            pad: function(e) {
                var t = this,
                    i = n(e);
                return t.x1 -= i.left, t.x2 += i.right, t.y1 -= i.top, t.y2 += i.bottom, t
            },
            unpad: function(e) {
                var t = this,
                    i = n(e);
                return i.left = -i.left, i.top = -i.top, i.right = -i.right, i.bottom = -i.bottom, t.pad(i)
            },
            clone: function() {
                var e = this;
                return new C(e.x1, e.y1, e.x2, e.y2)
            },
            center: function() {
                var e = this;
                return new We(e.x1 + e.width() / 2, e.y1 + e.height() / 2)
            },
            containsPoint: function(e) {
                var t = this;
                return e.x >= t.x1 && t.x2 >= e.x && e.y >= t.y1 && t.y2 >= e.y
            },
            points: function() {
                var e = this;
                return [new We(e.x1, e.y1), new We(e.x2, e.y1), new We(e.x2, e.y2), new We(e.x1, e.y2)]
            },
            getHash: function() {
                var e = this;
                return [e.x1, e.y1, e.x2, e.y2].join(",")
            },
            overlaps: function(e) {
                return !(this.y1 > e.y2 || e.y1 > this.y2 || this.x1 > e.x2 || e.x1 > this.x2)
            },
            rotate: function(e) {
                var t = this,
                    n = t.width(),
                    i = t.height(),
                    r = t.center(),
                    o = r.x,
                    s = r.y,
                    l = a(0, 0, o, s, e),
                    c = a(n, 0, o, s, e),
                    d = a(n, i, o, s, e),
                    u = a(0, i, o, s, e);
                return n = oe.max(l.x, c.x, d.x, u.x) - oe.min(l.x, c.x, d.x, u.x), i = oe.max(l.y, c.y, d.y, u.y) - oe.min(l.y, c.y, d.y, u.y), t.x2 = t.x1 + n, t.y2 = t.y1 + i, t
            },
            toRect: function() {
                return new Q.Rect([this.x1, this.y1], [this.width(), this.height()])
            },
            hasSize: function() {
                return 0 !== this.width() && 0 !== this.height()
            },
            align: function(e, t, n) {
                var i = this,
                    r = t + 1,
                    o = t + 2,
                    a = t === Oe ? He : ke,
                    s = i[a]();
                l(n, [Te, Be]) ? (i[r] = e[r], i[o] = i[r] + s) : l(n, [ze, ce]) ? (i[o] = e[o], i[r] = i[o] - s) : n == de && (i[r] = e[r] + (e[a]() - s) / 2, i[o] = i[r] + s)
            }
        }, S = Z.extend({
            init: function(e, t, n, i, r) {
                var o = this;
                o.c = e, o.ir = t, o.r = n, o.startAngle = i, o.angle = r
            },
            clone: function() {
                var e = this;
                return new S(e.c, e.ir, e.r, e.startAngle, e.angle)
            },
            middle: function() {
                return this.startAngle + this.angle / 2
            },
            radius: function(e, t) {
                var n = this;
                return t ? n.ir = e : n.r = e, n
            },
            point: function(e, t) {
                var n = this,
                    i = e * we,
                    r = oe.cos(i),
                    o = oe.sin(i),
                    a = t ? n.ir : n.r,
                    s = u(n.c.x - r * a, ue),
                    l = u(n.c.y - o * a, ue);
                return new We(s, l)
            },
            adjacentBox: function(e, t, n) {
                var i = this.clone().expand(e),
                    r = i.middle(),
                    o = i.point(r),
                    a = t / 2,
                    s = n / 2,
                    l = o.x - a,
                    c = o.y - s,
                    d = oe.sin(r * we),
                    u = oe.cos(r * we);
                return oe.abs(d) < .9 && (l += a * -u / oe.abs(u)), oe.abs(u) < .9 && (c += s * -d / oe.abs(d)), new C(l, c, l + t, c + n)
            },
            containsPoint: function(e) {
                var t = this,
                    n = t.c,
                    i = t.ir,
                    r = t.r,
                    o = t.startAngle,
                    a = t.startAngle + t.angle,
                    s = e.x - n.x,
                    l = e.y - n.y,
                    c = new We(s, l),
                    d = t.point(o),
                    h = new We(d.x - n.x, d.y - n.y),
                    f = t.point(a),
                    p = new We(f.x - n.x, f.y - n.y),
                    m = u(s * s + l * l, ue);
                return (h.equals(c) || v(h, c)) && !v(p, c) && m >= i * i && r * r >= m
            },
            getBBox: function() {
                var e, t, n, i = this,
                    r = new C(Ae, Ae, Ee, Ee),
                    o = u(i.startAngle % 360),
                    a = u((o + i.angle) % 360),
                    s = i.ir,
                    l = [0, 90, 180, 270, o, a].sort(m),
                    c = ne(o, l),
                    d = ne(a, l);
                for (e = o == a ? l : d > c ? l.slice(c, d + 1) : [].concat(l.slice(0, d + 1), l.slice(c, l.length)), t = 0; e.length > t; t++) n = i.point(e[t]), r.wrapPoint(n), r.wrapPoint(n, s);
                return s || r.wrapPoint(i.c), r
            },
            expand: function(e) {
                return this.r += e, this
            }
        }), T = S.extend({
            init: function(e, t, n, i) {
                S.fn.init.call(this, e, 0, t, n, i)
            },
            expand: function(e) {
                return S.fn.expand.call(this, e)
            },
            clone: function() {
                var e = this;
                return new T(e.c, e.r, e.startAngle, e.angle)
            },
            radius: function(e) {
                return S.fn.radius.call(this, e)
            },
            point: function(e) {
                return S.fn.point.call(this, e)
            }
        }), D = function() {}, D.fn = D.prototype = {
            createRing: function(e, t) {
                var n, i = e.startAngle + 180,
                    r = e.angle + i,
                    o = new Q.Point(e.c.x, e.c.y),
                    a = oe.max(e.r, 0),
                    s = oe.max(e.ir, 0),
                    l = new Q.Arc(o, {
                        startAngle: i,
                        endAngle: r,
                        radiusX: a,
                        radiusY: a
                    }),
                    c = X.Path.fromArc(l, t).close();
                return s ? (l.radiusX = l.radiusY = s, n = l.pointAt(r), c.lineTo(n.x, n.y), c.arc(r, i, s, s, !0)) : c.lineTo(o.x, o.y), c
            }
        }, D.current = new D, A = Z.extend({
            init: function(e) {
                var t = this;
                t.children = [], t.options = ae({}, t.options, e)
            },
            reflow: function(e) {
                var t, n, i, r = this,
                    o = r.children;
                for (n = 0; o.length > n; n++) i = o[n], i.reflow(e), t = t ? t.wrap(i.box) : i.box.clone();
                r.box = t || e
            },
            destroy: function() {
                var e, t = this,
                    n = t.children;
                for (this.animation && this.animation.destroy(), e = 0; n.length > e; e++) n[e].destroy()
            },
            getRoot: function() {
                var e = this.parent;
                return e ? e.getRoot() : null
            },
            getChart: function() {
                var e = this.getRoot();
                return e ? e.chart : t
            },
            translateChildren: function(e, t) {
                var n, i = this,
                    r = i.children,
                    o = r.length;
                for (n = 0; o > n; n++) r[n].box.translate(e, t)
            },
            append: function() {
                q(this.children, arguments);
                for (var e = 0; e < arguments.length; e++) arguments[e].parent = this
            },
            renderVisual: function() {
                this.options.visible !== !1 && (this.createVisual(), this.addVisual(), this.renderChildren(), this.createAnimation(), this.renderComplete())
            },
            addVisual: function() {
                this.visual && (this.visual.chartElement = this, this.parent && this.parent.appendVisual(this.visual))
            },
            renderChildren: function() {
                var e, t = this.children;
                for (e = 0; t.length > e; e++) t[e].renderVisual()
            },
            createVisual: function() {
                this.visual = new K.drawing.Group({
                    zIndex: this.options.zIndex,
                    visible: Y(this.options.visible, !0)
                })
            },
            createAnimation: function() {
                this.visual && (this.animation = X.Animation.create(this.visual, this.options.animation))
            },
            appendVisual: function(e) {
                e.chartElement || (e.chartElement = this), e.options.noclip ? this.clipRoot().visual.append(e) : G(e.options.zIndex) ? this.stackRoot().stackVisual(e) : this.visual ? this.visual.append(e) : this.parent.appendVisual(e)
            },
            clipRoot: function() {
                return this.parent ? this.parent.clipRoot() : this
            },
            stackRoot: function() {
                return this.parent ? this.parent.stackRoot() : this
            },
            stackVisual: function(e) {
                var t, n, i, r = e.options.zIndex || 0,
                    o = this.visual.children;
                for (t = 0; o.length > t && (n = o[t], i = Y(n.options.zIndex, 0), !(i > r)); t++);
                this.visual.insertAt(e, t)
            },
            traverse: function(e) {
                var t, n, i = this.children;
                for (t = 0; i.length > t; t++) n = i[t], e(n), n.traverse && n.traverse(e)
            },
            closest: function(e) {
                for (var n = this, i = !1; n && !i;) i = e(n), i || (n = n.parent);
                return i ? n : t
            },
            renderComplete: e.noop,
            hasHighlight: function() {
                var e = (this.options || {}).highlight;
                return !(!this.createHighlight || e && e.visible === !1)
            },
            toggleHighlight: function(t) {
                var n, i = this,
                    r = i._highlight,
                    o = (i.options || {}).highlight,
                    a = (o || {}).visual;
                if (!r) {
                    if (n = {
                        fill: {
                            color: Ne,
                            opacity: .2
                        },
                        stroke: {
                            color: Ne,
                            width: 1,
                            opacity: .2
                        }
                    }, a) {
                        if (r = i._highlight = a(e.extend(i.highlightVisualArgs(), {
                            createVisual: function() {
                                return i.createHighlight(n)
                            },
                            sender: i.getChart(),
                            series: i.series,
                            dataItem: i.dataItem,
                            category: i.category,
                            value: i.value,
                            percentage: i.percentage,
                            runningTotal: i.runningTotal,
                            total: i.total
                        })), !r) return
                    } else r = i._highlight = i.createHighlight(n);
                    r.options.zIndex = i.options.zIndex, i.appendVisual(r)
                }
                r.visible(t)
            },
            createGradientOverlay: function(e, t, n) {
                var i = new X.Path(ae({
                    stroke: {
                        color: Fe
                    },
                    fill: this.createGradient(n),
                    closed: e.options.closed
                }, t));
                return i.segments.elements(e.segments.elements()), i
            },
            createGradient: function(e) {
                return this.parent ? this.parent.createGradient(e) : t
            }
        }), E = A.extend({
            init: function(e) {
                var t = this;
                t.gradients = {}, A.fn.init.call(t, e)
            },
            options: {
                width: be,
                height: ge,
                background: Ne,
                border: {
                    color: le,
                    width: 0
                },
                margin: n(5),
                zIndex: -2
            },
            reflow: function() {
                var e, t = this,
                    n = t.options,
                    i = t.children,
                    r = new C(0, 0, n.width, n.height);
                for (t.box = r.unpad(n.margin), e = 0; i.length > e; e++) i[e].reflow(r), r = s(r, i[e].box) || C()
            },
            createVisual: function() {
                this.visual = new X.Group, this.createBackground()
            },
            createBackground: function() {
                var e = this.options,
                    t = e.border || {},
                    n = this.box.clone().pad(e.margin).unpad(t.width),
                    i = X.Path.fromRect(n.toRect(), {
                        stroke: {
                            color: t.width ? t.color : "",
                            width: t.width,
                            dashType: t.dashType
                        },
                        fill: {
                            color: e.background,
                            opacity: e.opacity
                        },
                        zIndex: -10
                    });
                this.visual.append(i)
            },
            getRoot: function() {
                return this
            },
            createGradient: function(e) {
                var t, n, i = this.gradients,
                    r = j.objectKey(e),
                    o = K.Gradients[e.gradient];
                return i[r] ? t = i[r] : (n = ae({}, o, e), "linear" == o.type ? t = new X.LinearGradient(n) : (e.innerRadius && (n.stops = k(n)), t = new X.RadialGradient(n), t.supportVML = o.supportVML !== !1), i[r] = t), t
            }
        }), F = A.extend({
            options: {
                align: Te,
                vAlign: Be,
                margin: {},
                padding: {},
                border: {
                    color: le,
                    width: 0
                },
                background: "",
                shrinkToFit: !1,
                width: 0,
                height: 0,
                visible: !0
            },
            reflow: function(e) {
                function t() {
                    s.align(e, Oe, l.align), s.align(e, Ve, l.vAlign), s.paddingBox = i.clone().unpad(f).unpad(m)
                }
                var i, r, o, a, s = this,
                    l = s.options,
                    c = l.width,
                    d = l.height,
                    u = c && d,
                    h = l.shrinkToFit,
                    f = n(l.margin),
                    p = n(l.padding),
                    m = l.border.width,
                    g = s.children;
                for (r = e.clone(), u && (r.x2 = r.x1 + c, r.y2 = r.y1 + d), h && r.unpad(f).unpad(m).unpad(p), A.fn.reflow.call(s, r), i = u ? s.box = C(0, 0, c, d) : s.box, h && u ? (t(), r = s.contentBox = s.paddingBox.clone().unpad(p)) : (r = s.contentBox = i.clone(), i.pad(p).pad(m).pad(f), t()), s.translateChildren(i.x1 - r.x1 + f.left + m + p.left, i.y1 - r.y1 + f.top + m + p.top), o = 0; g.length > o; o++) a = g[o], a.reflow(a.box)
            },
            align: function(e, t, n) {
                this.box.align(e, t, n)
            },
            hasBox: function() {
                var e = this.options;
                return e.border.width || e.background
            },
            createVisual: function() {
                A.fn.createVisual.call(this);
                var e = this.options;
                e.visible && this.hasBox() && this.visual.append(X.Path.fromRect(this.paddingBox.toRect(), this.visualStyle()))
            },
            visualStyle: function() {
                var e = this,
                    t = e.options,
                    n = t.border || {};
                return {
                    stroke: {
                        width: n.width,
                        color: n.color,
                        opacity: Y(n.opacity, t.opacity),
                        dashType: n.dashType
                    },
                    fill: {
                        color: t.background,
                        opacity: t.opacity
                    },
                    cursor: t.cursor
                }
            }
        }), I = A.extend({
            init: function(e, t) {
                var n = this;
                A.fn.init.call(n, t), n.content = e, n.reflow(C())
            },
            options: {
                font: me,
                color: le,
                align: Te,
                vAlign: ""
            },
            reflow: function(e) {
                var t, n = this,
                    i = n.options;
                t = i.size = J(n.content, {
                    font: i.font
                }), n.baseline = t.baseline, n.box = C(e.x1, e.y1, e.x1 + t.width, e.y1 + t.height)
            },
            createVisual: function() {
                var e = this.options;
                this.visual = new X.Text(this.content, this.box.toRect().topLeft(), {
                    font: e.font,
                    fill: {
                        color: e.color,
                        opacity: e.opacity
                    },
                    cursor: e.cursor
                })
            }
        }), M = A.extend({
            init: function(e) {
                A.fn.init.call(this, e), this._initDirection()
            },
            _initDirection: function() {
                var e = this.options;
                e.vertical ? (this.groupAxis = Oe, this.elementAxis = Ve, this.groupSizeField = He, this.elementSizeField = ke, this.groupSpacing = e.spacing, this.elementSpacing = e.vSpacing) : (this.groupAxis = Ve, this.elementAxis = Oe, this.groupSizeField = ke, this.elementSizeField = He, this.groupSpacing = e.vSpacing, this.elementSpacing = e.spacing)
            },
            options: {
                vertical: !0,
                wrap: !0,
                vSpacing: 0,
                spacing: 0
            },
            reflow: function(e) {
                this.box = e.clone(), this.reflowChildren()
            },
            reflowChildren: function() {
                var e, t, n, i, r, o, a, s, l, c, d = this,
                    u = d.box,
                    h = d.elementAxis,
                    f = d.groupAxis,
                    p = d.elementSizeField,
                    m = d.groupSizeField,
                    g = d.groupOptions(),
                    v = g.groups,
                    _ = v.length,
                    b = u[f + 1] + d.alignStart(g.groupsSize, u[m]()),
                    w = b;
                if (_) {
                    for (a = 0; _ > a; a++) {
                        for (n = v[a], i = n.groupElements, r = i.length, e = u[h + 1], o = 0; r > o; o++) s = i[o], c = d.elementSize(s), t = w + d.alignStart(c[m], n.groupSize), l = C(), l[f + 1] = t, l[f + 2] = t + c[m], l[h + 1] = e, l[h + 2] = e + c[p], s.reflow(l), e += c[p] + d.elementSpacing;
                        w += n.groupSize + d.groupSpacing
                    }
                    u[f + 1] = b, u[f + 2] = b + g.groupsSize, u[h + 2] = u[h + 1] + g.maxGroupElementsSize
                }
            },
            alignStart: function(e, t) {
                var n = 0,
                    i = this.options.align;
                return i == ze || i == ce ? n = t - e : i == de && (n = (t - e) / 2), n
            },
            groupOptions: function() {
                var e, t, n = this,
                    i = n.box,
                    r = n.children,
                    o = r.length,
                    a = this.elementSizeField,
                    s = this.groupSizeField,
                    l = this.elementSpacing,
                    c = this.groupSpacing,
                    d = u(i[a]()),
                    h = 0,
                    f = 0,
                    p = 0,
                    m = 0,
                    g = [],
                    v = [],
                    _ = 0;
                for (h = 0; o > h; h++) t = r[h], t.box || t.reflow(i), e = this.elementSize(t), n.options.wrap && u(p + l + e[a]) > d && (g.push({
                    groupElements: v,
                    groupSize: f,
                    groupElementsSize: p
                }), _ = oe.max(_, p), m += c + f, f = 0, p = 0, v = []), f = oe.max(f, e[s]), p > 0 && (p += l), p += e[a], v.push(t);
                return g.push({
                    groupElements: v,
                    groupSize: f,
                    groupElementsSize: p
                }), _ = oe.max(_, p), m += f, {
                    groups: g,
                    groupsSize: m,
                    maxGroupElementsSize: _
                }
            },
            elementSize: function(e) {
                return {
                    width: e.box.width(),
                    height: e.box.height()
                }
            },
            createVisual: te
        }), R = F.extend({
            ROWS_SPLIT_REGEX: /\n|\\n/m,
            init: function(e, t) {
                var n = this;
                n.content = e, F.fn.init.call(n, t), n._initContainer(), n.reflow(C())
            },
            _initContainer: function() {
                var e, t, n = this,
                    i = n.options,
                    r = (n.content + "").split(n.ROWS_SPLIT_REGEX),
                    o = new M({
                        vertical: !0,
                        align: i.align,
                        wrap: !1
                    }),
                    a = ae({}, i, {
                        opacity: 1,
                        animation: null
                    });
                for (n.container = o, n.append(o), t = 0; r.length > t; t++) e = new I(re(r[t]), a), o.append(e)
            },
            reflow: function(e) {
                var t, i, r, o = this.options,
                    a = o.visual;
                this.container.options.align = o.align, a && !this._boxReflow ? (e.hasSize() || (this._boxReflow = !0, this.reflow(e), this._boxReflow = !1, e = this.box), this.visual = a(this.visualContext(e)), t = e, this.visual && (t = x(this.visual.clippedBBox() || new Q.Rect), this.visual.options.zIndex = o.zIndex, this.visual.options.noclip = o.noclip), this.box = this.contentBox = this.paddingBox = t) : (F.fn.reflow.call(this, e), o.rotation && (i = n(o.margin), r = this.box.unpad(i), this.targetBox = e, this.normalBox = r.clone(), r = this.rotate(), r.translate(i.left - i.right, i.top - i.bottom), this.rotatedBox = r.clone(), r.pad(i)))
            },
            createVisual: function() {
                var e, t = this.options;
                t.visible && (this.visual = new K.drawing.Group({
                    transform: this.rotationTransform(),
                    zIndex: t.zIndex,
                    noclip: t.noclip
                }), this.hasBox() && (e = X.Path.fromRect(this.paddingBox.toRect(), this.visualStyle()), this.visual.append(e)))
            },
            renderVisual: function() {
                this.options.visual ? (this.addVisual(), this.createAnimation()) : F.fn.renderVisual.call(this)
            },
            visualOptions: function() {
                var e = this.options;
                return {
                    background: e.background,
                    border: e.border,
                    color: e.color,
                    font: e.font,
                    margin: e.margin,
                    padding: e.padding,
                    visible: e.visible
                }
            },
            visualContext: function(e) {
                var t = this;
                return {
                    text: t.content,
                    rect: e.toRect(),
                    sender: this.getChart(),
                    options: t.visualOptions(),
                    createVisual: function() {
                        return t._boxReflow = !0, t.reflow(e), t._boxReflow = !1, t.getDefaultVisual()
                    }
                }
            },
            getDefaultVisual: function() {
                this.createVisual(), this.renderChildren();
                var e = this.visual;
                return delete this.visual, e
            },
            rotate: function() {
                var e = this.options;
                return this.box.rotate(e.rotation), this.align(this.targetBox, Oe, e.align), this.align(this.targetBox, Ve, e.vAlign), this.box
            },
            rotationTransform: function() {
                var e, t, n, i, r = this.options.rotation;
                return r ? (e = this.normalBox.center(), t = e.x, n = e.y, i = this.rotatedBox.center(), Q.transform().translate(i.x - t, i.y - n).rotate(r, [t, n])) : null
            }
        }), P = A.extend({
            init: function(e) {
                var t = this;
                A.fn.init.call(t, e), e = t.options, t.append(new R(e.text, ae({}, e, {
                    vAlign: e.position
                })))
            },
            options: {
                color: le,
                position: Be,
                align: de,
                margin: n(5),
                padding: n(5)
            },
            reflow: function(e) {
                var t = this;
                A.fn.reflow.call(t, e), t.box.snapTo(e, Oe)
            }
        }), P.buildTitle = function(e, t, n) {
            var i;
            return "string" == typeof e && (e = {
                text: e
            }), e = ae({
                visible: !0
            }, n, e), e && e.visible && e.text && (i = new P(e), t.append(i)), i
        }, z = R.extend({
            init: function(e, t, n, i, r) {
                var o = this;
                o.text = t, o.value = e, o.index = n, o.dataItem = i, R.fn.init.call(o, t, r)
            },
            visualContext: function(e) {
                var t = R.fn.visualContext.call(this, e);
                return t.value = this.value, t.dataItem = this.dataItem, t.format = this.options.format, t.culture = this.options.culture, t
            },
            click: function(t, n) {
                var i = this;
                t.trigger(se, {
                    element: e(n.target),
                    value: i.value,
                    text: i.text,
                    index: i.index,
                    dataItem: i.dataItem,
                    axis: i.parent.options
                })
            },
            rotate: function() {
                var e, t;
                return this.options.alignRotation != de ? (e = this.normalBox.toRect(), t = this.rotationTransform(), this.box = x(e.bbox(t.matrix()))) : R.fn.rotate.call(this), this.box
            },
            rotationTransform: function() {
                var e, t, n, i, r, o, a, s, l, c, d, h, f, p, m, g, v, _, b = this.options,
                    w = b.rotation;
                return w ? b.alignRotation == de ? R.fn.rotationTransform.call(this) : (e = Q.transform().rotate(w).matrix(), t = this.normalBox.toRect(), n = this.targetBox.toRect(), i = b.rotationOrigin || Be, r = i == Be || i == ce ? Oe : Ve, o = i == Be || i == ce ? Ve : Oe, a = i == Be || i == Te ? n.origin : n.bottomRight(), s = t.topLeft().transformCopy(e), l = t.topRight().transformCopy(e), c = t.bottomRight().transformCopy(e), d = t.bottomLeft().transformCopy(e), h = Q.Rect.fromPoints(s, l, c, d), f = {}, f[o] = n.origin[o] - h.origin[o], p = oe.abs(s[o] + f[o] - a[o]), m = oe.abs(l[o] + f[o] - a[o]), u(p, _e) === u(m, _e) ? (g = s, v = l) : p > m ? (g = l, v = c) : (g = s, v = d), _ = g[r] + (v[r] - g[r]) / 2, f[r] = n.center()[r] - _, Q.transform().translate(f.x, f.y).rotate(w)) : null
            }
        }), B = A.extend({
            init: function(e) {
                var t = this;
                A.fn.init.call(t, e), t.options.visible || (t.options = ae({}, t.options, {
                    labels: {
                        visible: !1
                    },
                    line: {
                        visible: !1
                    },
                    margin: 0,
                    majorTickSize: 0,
                    minorTickSize: 0
                })), t.options.minorTicks = ae({}, {
                    color: t.options.line.color,
                    width: t.options.line.width,
                    visible: t.options.minorTickType != Fe
                }, t.options.minorTicks, {
                    size: t.options.minorTickSize,
                    align: t.options.minorTickType
                }), t.options.majorTicks = ae({}, {
                    color: t.options.line.color,
                    width: t.options.line.width,
                    visible: t.options.majorTickType != Fe
                }, t.options.majorTicks, {
                    size: t.options.majorTickSize,
                    align: t.options.majorTickType
                }), this.options._deferLabels || t.createLabels(), t.createTitle(), t.createNotes()
            },
            options: {
                labels: {
                    visible: !0,
                    rotation: 0,
                    mirror: !1,
                    step: 1,
                    skip: 0
                },
                line: {
                    width: 1,
                    color: le,
                    visible: !0
                },
                title: {
                    visible: !0,
                    position: de
                },
                majorTicks: {
                    align: Re,
                    size: 4,
                    skip: 0,
                    step: 1
                },
                minorTicks: {
                    align: Re,
                    size: 3,
                    skip: 0,
                    step: 1
                },
                axisCrossingValue: 0,
                majorTickType: Re,
                minorTickType: Fe,
                majorGridLines: {
                    skip: 0,
                    step: 1
                },
                minorGridLines: {
                    visible: !1,
                    width: 1,
                    color: le,
                    skip: 0,
                    step: 1
                },
                margin: 5,
                visible: !0,
                reverse: !1,
                justified: !0,
                notes: {
                    label: {
                        text: ""
                    }
                },
                _alignLines: !0,
                _deferLabels: !1
            },
            labelsRange: function() {
                return {
                    min: this.options.labels.skip,
                    max: this.labelsCount()
                }
            },
            createLabels: function() {
                var t, n, i, r, o = this,
                    a = o.options,
                    s = a.vertical ? ze : de,
                    l = ae({}, a.labels, {
                        align: s,
                        zIndex: a.zIndex
                    }),
                    c = oe.max(1, l.step);
                if (o.children = e.grep(o.children, function(e) {
                    return !(e instanceof z)
                }), o.labels = [], l.visible)
                    for (t = o.labelsRange(), n = l.rotation, ie(n) && (l.alignRotation = n.align, l.rotation = n.angle), "auto" == l.rotation && (l.rotation = 0, a.autoRotateLabels = !0), r = t.min; t.max > r; r += c) i = o.createAxisLabel(r, l), i && (o.append(i), o.labels.push(i))
            },
            lineBox: function() {
                var e = this,
                    t = e.options,
                    n = e.box,
                    i = t.vertical,
                    r = t.labels.mirror,
                    o = r ? n.x1 : n.x2,
                    a = r ? n.y2 : n.y1,
                    s = t.line.width || 0;
                return i ? C(o, n.y1, o, n.y2 - s) : C(n.x1, a, n.x2 - s, a)
            },
            createTitle: function() {
                var e, t = this,
                    n = t.options,
                    i = ae({
                        rotation: n.vertical ? -90 : 0,
                        text: "",
                        zIndex: 1,
                        visualSize: !0
                    }, n.title);
                i.visible && i.text && (e = new R(i.text, i), t.append(e), t.title = e)
            },
            createNotes: function() {
                var e, t, n, i = this,
                    r = i.options,
                    o = r.notes,
                    a = o.data || [];
                for (i.notes = [], e = 0; a.length > e; e++) t = ae({}, o, a[e]), t.value = i.parseNoteValue(t.value), n = new L(t.value, t.label.text, null, null, null, t), n.options.visible && (G(n.options.position) ? r.vertical && !l(n.options.position, [Te, ze]) ? n.options.position = r.reverse ? Te : ze : r.vertical || l(n.options.position, [Be, ce]) || (n.options.position = r.reverse ? ce : Be) : n.options.position = r.vertical ? r.reverse ? Te : ze : r.reverse ? ce : Be, i.append(n), i.notes.push(n))
            },
            parseNoteValue: function(e) {
                return e
            },
            renderVisual: function() {
                A.fn.renderVisual.call(this), this.createPlotBands()
            },
            createVisual: function() {
                A.fn.createVisual.call(this), this.createBackground(), this.createLine()
            },
            gridLinesVisual: function() {
                var e = this._gridLines;
                return e || (e = this._gridLines = new X.Group({
                    zIndex: -2
                }), this.appendVisual(this._gridLines)), e
            },
            createTicks: function(e) {
                function t(t, n, r) {
                    var s, c = t.length;
                    if (n.visible)
                        for (s = n.skip; c > s; s += n.step) G(r) && s % r === 0 || (l.tickX = a ? o.x2 : o.x2 - n.size, l.tickY = a ? o.y1 - n.size : o.y1, l.position = t[s], e.append(i(l, n)))
                }
                var n = this,
                    r = n.options,
                    o = n.lineBox(),
                    a = r.labels.mirror,
                    s = r.majorTicks.visible ? r.majorUnit : 0,
                    l = {
                        vertical: r.vertical
                    };
                t(n.getMajorTickPositions(), r.majorTicks), t(n.getMinorTickPositions(), r.minorTicks, s / r.minorUnit)
            },
            createLine: function() {
                var e, t, n = this,
                    i = n.options,
                    r = i.line,
                    o = n.lineBox();
                r.width > 0 && r.visible && (e = new X.Path({
                    stroke: {
                        width: r.width,
                        color: r.color,
                        dashType: r.dashType
                    }
                }), e.moveTo(o.x1, o.y1).lineTo(o.x2, o.y2), i._alignLines && y(e), t = this._lineGroup = new X.Group, t.append(e), this.visual.append(t), this.createTicks(t))
            },
            getActualTickSize: function() {
                var e = this,
                    t = e.options,
                    n = 0;
                return t.majorTicks.visible && t.minorTicks.visible ? n = oe.max(t.majorTicks.size, t.minorTicks.size) : t.majorTicks.visible ? n = t.majorTicks.size : t.minorTicks.visible && (n = t.minorTicks.size), n
            },
            createBackground: function() {
                var e = this,
                    t = e.options,
                    n = t.background,
                    i = e.box;
                n && (e._backgroundPath = X.Path.fromRect(i.toRect(), {
                    fill: {
                        color: n
                    },
                    stroke: null
                }), this.visual.append(e._backgroundPath))
            },
            createPlotBands: function() {
                var t, n, i, r, o, a, s = this,
                    l = s.options,
                    c = l.plotBands || [],
                    d = l.vertical,
                    u = s.plotArea;
                0 !== c.length && (o = this._plotbandGroup = new X.Group({
                    zIndex: -1
                }), a = e.grep(s.pane.axes, function(e) {
                    return e.options.vertical !== s.options.vertical
                })[0], e.each(c, function(e, l) {
                    var c, h;
                    i = Y(l.from, Ee), r = Y(l.to, Ae), d ? (t = (a || u.axisX).lineBox(), n = s.getSlot(l.from, l.to, !0)) : (t = s.getSlot(l.from, l.to, !0), n = (a || u.axisY).lineBox()), 0 !== t.width() && 0 !== n.height() && (c = new Q.Rect([t.x1, n.y1], [t.width(), n.height()]), h = X.Path.fromRect(c, {
                        fill: {
                            color: l.color,
                            opacity: l.opacity
                        },
                        stroke: null
                    }), o.append(h))
                }), s.appendVisual(o))
            },
            createGridLines: function(e) {
                function t(e, t, i) {
                    var o, s = e.length;
                    if (t.visible)
                        for (o = t.skip; s > o; o += t.step) n = u(e[o]), l(n, m) || o % i === 0 || a && f === n || (p.position = n, g.append(r(p, t)), m.push(n))
                }
                var n, i = this,
                    o = i.options,
                    a = e.options.line.visible,
                    s = o.majorGridLines,
                    c = s.visible ? o.majorUnit : 0,
                    d = o.vertical,
                    h = e.lineBox(),
                    f = h[d ? "y1" : "x1"],
                    p = {
                        lineStart: h[d ? "x1" : "y1"],
                        lineEnd: h[d ? "x2" : "y2"],
                        vertical: d
                    },
                    m = [],
                    g = this.gridLinesVisual();
                return t(i.getMajorTickPositions(), o.majorGridLines), t(i.getMinorTickPositions(), o.minorGridLines, c / o.minorUnit), g.children
            },
            reflow: function(e) {
                var t, n, i = this,
                    r = i.options,
                    o = r.vertical,
                    a = i.labels,
                    s = a.length,
                    l = i.title,
                    c = o ? He : ke,
                    d = l ? l.box[c]() : 0,
                    u = i.getActualTickSize() + r.margin + d,
                    h = 0,
                    f = (this.getRoot() || {}).box || e,
                    p = f[c]();
                for (n = 0; s > n; n++) t = a[n].box[c](), p >= t + u && (h = oe.max(h, t));
                i.box = o ? C(e.x1, e.y1, e.x1 + h + u, e.y2) : C(e.x1, e.y1, e.x2, e.y1 + h + u), i.arrangeTitle(), i.arrangeLabels(), i.arrangeNotes()
            },
            getLabelsTickPositions: function() {
                return this.getMajorTickPositions()
            },
            labelTickIndex: function(e) {
                return e.index
            },
            arrangeLabels: function() {
                var e, t, n, i, r, o, a, s, l, c, d, u = this,
                    h = u.options,
                    f = u.labels,
                    p = !h.justified,
                    m = h.vertical,
                    g = u.lineBox(),
                    v = h.labels.mirror,
                    _ = u.getLabelsTickPositions(),
                    b = u.getActualTickSize() + h.margin;
                for (n = 0; f.length > n; n++) i = f[n], r = u.labelTickIndex(i), o = m ? i.box.height() : i.box.width(), a = _[r] - o / 2, m ? (p && (s = _[r], l = _[r + 1], c = s + (l - s) / 2, a = c - o / 2), d = g.x2, v ? (d += b, i.options.rotationOrigin = Te) : (d -= b + i.box.width(), i.options.rotationOrigin = ze), e = i.box.move(d, a)) : (p ? (s = _[r], l = _[r + 1]) : (s = a, l = a + o), t = g.y1, v ? (t -= b + i.box.height(), i.options.rotationOrigin = ce) : (t += b, i.options.rotationOrigin = Be), e = C(s, t, l, t + i.box.height())), i.reflow(e)
            },
            autoRotateLabels: function() {
                var e, t, n, i, r, o;
                if (this.options.autoRotateLabels && !this.options.vertical) {
                    for (e = this.getMajorTickPositions(), t = this.labels, o = 0; t.length > o; o++)
                        if (r = e[o + 1] - e[o], n = t[o].box, n.width() > r) {
                            if (n.height() > r) {
                                i = -90;
                                break
                            }
                            i = -45
                        } if (i) {
                        for (o = 0; t.length > o; o++) t[o].options.rotation = i, t[o].reflow(C());
                        return !0
                    }
                }
            },
            arrangeTitle: function() {
                var e = this,
                    t = e.options,
                    n = t.labels.mirror,
                    i = t.vertical,
                    r = e.title;
                r && (i ? (r.options.align = n ? ze : Te, r.options.vAlign = r.options.position) : (r.options.align = r.options.position, r.options.vAlign = n ? Be : ce), r.reflow(e.box))
            },
            arrangeNotes: function() {
                var e, t, n, i, r = this;
                for (e = 0; r.notes.length > e; e++) t = r.notes[e], i = t.options.value, G(i) ? (r.shouldRenderNote(i) ? t.show() : t.hide(), n = r.getSlot(i)) : t.hide(), t.reflow(n || r.lineBox())
            },
            alignTo: function(e) {
                var t = this,
                    n = e.lineBox(),
                    i = t.options.vertical,
                    r = i ? Ve : Oe;
                t.box.snapTo(n, r), i ? t.box.shrink(0, t.lineBox().height() - n.height()) : t.box.shrink(t.lineBox().width() - n.width(), 0), t.box[r + 1] -= t.lineBox()[r + 1] - n[r + 1], t.box[r + 2] -= t.lineBox()[r + 2] - n[r + 2]
            },
            axisLabelText: function(e, t, n) {
                var i, r = e;
                return n.template ? (i = ee(n.template), r = i({
                    value: e,
                    dataItem: t,
                    format: n.format,
                    culture: n.culture
                })) : n.format && (r = n.format.match(ye) ? W.format(n.format, e) : W.toString(e, n.format, n.culture)), r
            },
            slot: function(e, n, i) {
                var r = this.getSlot(e, n, i);
                return r ? r.toRect() : t
            },
            contentBox: function() {
                var e = this.box.clone(),
                    t = this.labels;
                return t.length && (t[0].options.visible && e.wrap(t[0].box), $(t).options.visible && e.wrap($(t).box)), e
            },
            limitRange: function(e, t, n, i, r) {
                var o, a = this.options;
                if (!(n > e && 0 > r && (!G(a.min) || n >= a.min) || t > i && r > 0 && (!G(a.max) || a.max >= i))) return n > t && r > 0 || e > i && 0 > r ? {
                    min: e,
                    max: t
                } : (o = t - e, n > e ? (e = j.limitValue(e, n, i), t = j.limitValue(e + o, n + o, i)) : t > i && (t = j.limitValue(t, n, i), e = j.limitValue(t - o, n, i - o)), {
                    min: e,
                    max: t
                })
            }
        }), L = F.extend({
            init: function(e, t, n, i, r, o) {
                var a = this;
                F.fn.init.call(a, o), a.value = e, a.text = t, a.dataItem = n, a.category = i, a.series = r, a.render()
            },
            options: {
                icon: {
                    visible: !0,
                    type: fe
                },
                label: {
                    position: Se,
                    visible: !0,
                    align: de,
                    vAlign: de
                },
                line: {
                    visible: !0
                },
                visible: !0,
                position: Be,
                zIndex: 2
            },
            hide: function() {
                this.options.visible = !1
            },
            show: function() {
                this.options.visible = !0
            },
            render: function() {
                var e, t, n, i, r = this,
                    o = r.options,
                    a = o.label,
                    s = r.text,
                    l = o.icon,
                    c = l.size,
                    d = C();
                o.visible && (G(a) && a.visible && (a.template ? (i = ee(a.template), s = i({
                    dataItem: r.dataItem,
                    category: r.category,
                    value: r.value,
                    text: s,
                    series: r.series
                })) : a.format && (s = g(a.format, s)), r.label = new R(s, ae({}, a)), a.position !== Se || G(c) || (l.type === fe ? c = oe.max(r.label.box.width(), r.label.box.height()) : (t = r.label.box.width(),
                    n = r.label.box.height()), d.wrap(r.label.box))), l.width = t || c || ve, l.height = n || c || ve, e = new H(ae({}, l)), r.marker = e, r.append(e), r.label && r.append(r.label), e.reflow(C()), r.wrapperBox = d.wrap(e.box))
            },
            reflow: function(e) {
                var t, n, i, r = this,
                    o = r.options,
                    a = e.center(),
                    s = r.wrapperBox,
                    c = o.line.length,
                    d = o.position,
                    u = r.label,
                    h = r.marker;
                o.visible && (l(d, [Te, ze]) ? d === Te ? (i = s.alignTo(e, d).translate(-c, e.center().y - s.center().y), o.line.visible && (t = [e.x1, a.y], r.linePoints = [t, [i.x2, a.y]], n = i.clone().wrapPoint(t))) : (i = s.alignTo(e, d).translate(c, e.center().y - s.center().y), o.line.visible && (t = [e.x2, a.y], r.linePoints = [t, [i.x1, a.y]], n = i.clone().wrapPoint(t))) : d === ce ? (i = s.alignTo(e, d).translate(e.center().x - s.center().x, c), o.line.visible && (t = [a.x, e.y2], r.linePoints = [t, [a.x, i.y1]], n = i.clone().wrapPoint(t))) : (i = s.alignTo(e, d).translate(e.center().x - s.center().x, -c), o.line.visible && (t = [a.x, e.y1], r.linePoints = [t, [a.x, i.y2]], n = i.clone().wrapPoint(t))), h && h.reflow(i), u && (u.reflow(i), h && (o.label.position === Re && u.box.alignTo(h.box, d), u.reflow(u.box))), r.contentBox = i, r.targetBox = e, r.box = n || i)
            },
            createVisual: function() {
                F.fn.createVisual.call(this), this.options.visible && this.createLine()
            },
            renderVisual: function() {
                var e = this,
                    t = e.options,
                    n = t.visual;
                t.visible && n ? (e.visual = n({
                    dataItem: e.dataItem,
                    category: e.category,
                    value: e.value,
                    text: e.text,
                    sender: e.getChart(),
                    series: e.series,
                    rect: e.targetBox.toRect(),
                    options: {
                        background: t.background,
                        border: t.background,
                        icon: t.icon,
                        label: t.label,
                        line: t.line,
                        position: t.position,
                        visible: t.visible
                    },
                    createVisual: function() {
                        e.createVisual(), e.renderChildren();
                        var t = e.visual;
                        return delete e.visual, t
                    }
                }), e.addVisual()) : F.fn.renderVisual.call(e)
            },
            createLine: function() {
                var e, t = this.options.line;
                this.linePoints && (e = X.Path.fromPoints(this.linePoints, {
                    stroke: {
                        color: t.color,
                        width: t.width,
                        dashType: t.dashType
                    }
                }), y(e), this.visual.append(e))
            },
            click: function(e, t) {
                var n = this.eventArgs(t);
                e.trigger(Ie, n) || t.preventDefault()
            },
            hover: function(e, t) {
                var n = this.eventArgs(t);
                e.trigger(Me, n) || t.preventDefault()
            },
            leave: function(e) {
                e._unsetActivePoint()
            },
            eventArgs: function(t) {
                var n = this,
                    i = n.options;
                return {
                    element: e(t.target),
                    text: G(i.label) ? i.label.text : "",
                    dataItem: n.dataItem,
                    series: n.series,
                    value: n.value,
                    category: n.category,
                    visual: n.visual
                }
            }
        }), H = F.extend({
            init: function(e, t) {
                this.pointData = t, F.fn.init.call(this, e)
            },
            options: {
                type: fe,
                align: de,
                vAlign: de
            },
            getElement: function() {
                var e, t, n = this,
                    i = n.options,
                    r = i.type,
                    o = i.rotation,
                    a = n.paddingBox,
                    s = a.center(),
                    l = a.width() / 2;
                if (i.visible && n.hasBox()) return t = n.visualStyle(), r === fe ? e = new X.Circle(new Q.Circle([u(a.x1 + l, ue), u(a.y1 + a.height() / 2, ue)], l), t) : r === Le ? e = X.Path.fromPoints([
                    [a.x1 + l, a.y1],
                    [a.x1, a.y2],
                    [a.x2, a.y2]
                ], t).close() : r === pe ? (e = new X.MultiPath(t), e.moveTo(a.x1, a.y1).lineTo(a.x2, a.y2), e.moveTo(a.x1, a.y2).lineTo(a.x2, a.y1)) : e = X.Path.fromRect(a.toRect(), t), o && e.transform(Q.transform().rotate(-o, [s.x, s.y])), e.options.zIndex = this.options.zIndex, e
            },
            createElement: function() {
                var e, t = this,
                    n = t.options.visual,
                    i = t.pointData || {};
                return e = n ? n({
                    value: i.value,
                    dataItem: i.dataItem,
                    sender: t.getChart(),
                    series: i.series,
                    category: i.category,
                    rect: t.paddingBox.toRect(),
                    options: t.visualOptions(),
                    createVisual: function() {
                        return t.getElement()
                    }
                }) : t.getElement()
            },
            visualOptions: function() {
                var e = this.options;
                return {
                    background: e.background,
                    border: e.border,
                    margin: e.margin,
                    padding: e.padding,
                    type: e.type,
                    size: e.width,
                    visible: e.visible
                }
            },
            createVisual: function() {
                this.visual = this.createElement()
            }
        }), N = B.extend({
            init: function(e, t, n) {
                var i = this,
                    r = i.initDefaults(e, t, n);
                B.fn.init.call(i, r)
            },
            startValue: function() {
                return 0
            },
            options: {
                type: "numeric",
                min: 0,
                max: 1,
                vertical: !0,
                majorGridLines: {
                    visible: !0,
                    width: 1,
                    color: le
                },
                labels: {
                    format: "#.####################"
                },
                zIndex: 1
            },
            initDefaults: function(e, t, n) {
                var i, r = this,
                    a = n.narrowRange,
                    s = r.autoAxisMin(e, t, a),
                    l = r.autoAxisMax(e, t, a),
                    u = o(s, l),
                    h = {
                        majorUnit: u
                    };
                return n.roundToMajorUnit !== !1 && (0 > s && f(s, u, 1 / 3) && (s -= u), l > 0 && f(l, u, 1 / 3) && (l += u)), h.min = d(s, u), h.max = c(l, u), this.totalMin = G(n.min) ? oe.min(h.min, n.min) : h.min, this.totalMax = G(n.max) ? oe.max(h.max, n.max) : h.max, this.totalMajorUnit = u, n && (i = G(n.min) || G(n.max), i && n.min === n.max && (n.min > 0 ? n.min = 0 : n.max = 1), n.majorUnit ? (h.min = d(h.min, n.majorUnit), h.max = c(h.max, n.majorUnit)) : i && (n = ae(h, n), h.majorUnit = o(n.min, n.max))), h.minorUnit = (n.majorUnit || h.majorUnit) / 5, ae(h, n)
            },
            range: function() {
                var e = this.options;
                return {
                    min: e.min,
                    max: e.max
                }
            },
            autoAxisMax: function(e, t, n) {
                var i, r;
                if (!e && !t) return 1;
                if (0 >= e && 0 >= t) {
                    if (t = e == t ? 0 : t, r = oe.abs((t - e) / t), n === !1 || !n && r > Ue) return 0;
                    i = oe.min(0, t - (e - t) / 2)
                } else e = e == t ? 0 : e, i = t;
                return i
            },
            autoAxisMin: function(e, t, n) {
                var i, r;
                if (!e && !t) return 0;
                if (e >= 0 && t >= 0) {
                    if (e = e == t ? 0 : e, r = (t - e) / t, n === !1 || !n && r > Ue) return 0;
                    i = oe.max(0, e - (t - e) / 2)
                } else t = e == t ? 0 : t, i = e;
                return i
            },
            getDivisions: function(e) {
                if (0 === e) return 1;
                var t = this.options,
                    n = t.max - t.min;
                return oe.floor(u(n / e, ue)) + 1
            },
            getTickPositions: function(e, t) {
                var n, i = this,
                    r = i.options,
                    o = r.vertical,
                    a = r.reverse,
                    s = i.lineBox(),
                    l = o ? s.height() : s.width(),
                    c = r.max - r.min,
                    d = l / c,
                    h = e * d,
                    f = 0,
                    p = i.getDivisions(e),
                    m = (o ? -1 : 1) * (a ? -1 : 1),
                    g = 1 === m ? 1 : 2,
                    v = s[(o ? Ve : Oe) + g],
                    _ = [];
                for (t && (f = t / e), n = 0; p > n; n++) n % f !== 0 && _.push(u(v, ue)), v += h * m;
                return _
            },
            getMajorTickPositions: function() {
                var e = this;
                return e.getTickPositions(e.options.majorUnit)
            },
            getMinorTickPositions: function() {
                var e = this;
                return e.getTickPositions(e.options.minorUnit)
            },
            getSlot: function(e, t, n) {
                var i, r, o = this,
                    a = o.options,
                    s = a.reverse,
                    l = a.vertical,
                    c = l ? Ve : Oe,
                    d = o.lineBox(),
                    u = d[c + (s ? 2 : 1)],
                    h = l ? d.height() : d.width(),
                    f = s ? -1 : 1,
                    p = f * (h / (a.max - a.min)),
                    m = new C(d.x1, d.y1, d.x1, d.y1);
                return G(e) || (e = t || 0), G(t) || (t = e || 0), n && (e = oe.max(oe.min(e, a.max), a.min), t = oe.max(oe.min(t, a.max), a.min)), l ? (i = a.max - oe.max(e, t), r = a.max - oe.min(e, t)) : (i = oe.min(e, t) - a.min, r = oe.max(e, t) - a.min), m[c + 1] = oe.max(oe.min(u + p * (s ? r : i), xe), -xe), m[c + 2] = oe.max(oe.min(u + p * (s ? i : r), xe), -xe), m
            },
            getValue: function(e) {
                var t, n = this,
                    i = n.options,
                    r = i.reverse,
                    o = i.vertical,
                    a = 1 * i.max,
                    s = 1 * i.min,
                    l = o ? Ve : Oe,
                    c = n.lineBox(),
                    d = c[l + (r ? 2 : 1)],
                    h = o ? c.height() : c.width(),
                    f = r ? -1 : 1,
                    p = f * (e[l] - d),
                    m = (a - s) / h,
                    g = p * m;
                return 0 > p || p > h ? null : (t = o ? a - g : s + g, u(t, _e))
            },
            translateRange: function(e) {
                var t = this,
                    n = t.options,
                    i = t.lineBox(),
                    r = n.vertical,
                    o = n.reverse,
                    a = r ? i.height() : i.width(),
                    s = n.max - n.min,
                    l = a / s,
                    c = u(e / l, _e);
                return !r && !o || r && o || (c = -c), {
                    min: n.min + c,
                    max: n.max + c
                }
            },
            scaleRange: function(e) {
                var t = this,
                    n = t.options,
                    i = -e * n.majorUnit;
                return {
                    min: n.min - i,
                    max: n.max + i
                }
            },
            labelsCount: function() {
                return this.getDivisions(this.options.majorUnit)
            },
            createAxisLabel: function(e, t) {
                var n = this,
                    i = n.options,
                    r = u(i.min + e * i.majorUnit, _e),
                    o = n.axisLabelText(r, null, t);
                return new z(r, o, e, null, t)
            },
            shouldRenderNote: function(e) {
                var t = this.range();
                return e >= t.min && t.max >= e
            },
            pan: function(e) {
                var t = this.translateRange(e);
                return this.limitRange(t.min, t.max, this.totalMin, this.totalMax)
            },
            pointsRange: function(e, t) {
                var n = this.getValue(e),
                    i = this.getValue(t),
                    r = oe.min(n, i),
                    o = oe.max(n, i);
                return {
                    min: r,
                    max: o
                }
            },
            zoomRange: function(e) {
                var n = this.scaleRange(e),
                    i = this.totalMax,
                    r = this.totalMin,
                    o = j.limitValue(n.min, r, i),
                    a = j.limitValue(n.max, r, i),
                    s = this.options.max - this.options.min;
                return this.totalMajorUnit > s || a - o >= this.totalMajorUnit ? {
                    min: o,
                    max: a
                } : t
            }
        }), O = B.extend({
            init: function(e, t, n) {
                this.options = this._initOptions(e, t, n), B.fn.init.call(this, n)
            },
            startValue: function() {
                return this.options.min
            },
            options: {
                type: "log",
                majorUnit: 10,
                minorUnit: 1,
                axisCrossingValue: 1,
                vertical: !0,
                majorGridLines: {
                    visible: !0,
                    width: 1,
                    color: le
                },
                zIndex: 1
            },
            getSlot: function(e, n, i) {
                var r, o, a = this,
                    s = a.options,
                    l = s.reverse,
                    c = s.vertical,
                    d = c ? Ve : Oe,
                    u = a.lineBox(),
                    f = u[d + (l ? 2 : 1)],
                    p = c ? u.height() : u.width(),
                    m = l ? -1 : 1,
                    g = s.majorUnit,
                    v = a.logMin,
                    _ = a.logMax,
                    b = m * (p / (_ - v)),
                    w = new C(u.x1, u.y1, u.x1, u.y1);
                return G(e) || (e = n || 1), G(n) || (n = e || 1), 0 >= e || 0 >= n ? t : (i && (e = oe.max(oe.min(e, s.max), s.min), n = oe.max(oe.min(n, s.max), s.min)), e = h(e, g), n = h(n, g), c ? (r = _ - oe.max(e, n), o = _ - oe.min(e, n)) : (r = oe.min(e, n) - v, o = oe.max(e, n) - v), w[d + 1] = f + b * (l ? o : r), w[d + 2] = f + b * (l ? r : o), w)
            },
            getValue: function(e) {
                var t, n = this,
                    i = n.options,
                    r = i.reverse,
                    o = i.vertical,
                    a = n.lineBox(),
                    s = i.majorUnit,
                    l = n.logMin,
                    c = n.logMax,
                    d = o === r ? 1 : -1,
                    h = 1 === d ? 1 : 2,
                    f = o ? a.height() : a.width(),
                    p = (c - l) / f,
                    m = o ? Ve : Oe,
                    g = a[m + h],
                    v = d * (e[m] - g),
                    _ = v * p;
                return 0 > v || v > f ? null : (t = l + _, u(oe.pow(s, t), _e))
            },
            range: function() {
                var e = this.options;
                return {
                    min: e.min,
                    max: e.max
                }
            },
            scaleRange: function(e) {
                var t = this,
                    n = t.options,
                    i = n.majorUnit,
                    r = -e;
                return {
                    min: oe.pow(i, t.logMin - r),
                    max: oe.pow(i, t.logMax + r)
                }
            },
            translateRange: function(e) {
                var t = this,
                    n = t.options,
                    i = n.majorUnit,
                    r = t.lineBox(),
                    o = n.vertical,
                    a = n.reverse,
                    s = o ? r.height() : r.width(),
                    l = s / (t.logMax - t.logMin),
                    c = u(e / l, _e);
                return !o && !a || o && a || (c = -c), {
                    min: oe.pow(i, t.logMin + c),
                    max: oe.pow(i, t.logMax + c)
                }
            },
            labelsCount: function() {
                var e = this,
                    t = oe.floor(e.logMax),
                    n = oe.floor(t - e.logMin) + 1;
                return n
            },
            getMajorTickPositions: function() {
                var e = this,
                    t = [];
                return e.traverseMajorTicksPositions(function(e) {
                    t.push(e)
                }, {
                    step: 1,
                    skip: 0
                }), t
            },
            createTicks: function(e) {
                function t(t, n) {
                    d.tickX = s ? a.x2 : a.x2 - n.size, d.tickY = s ? a.y1 - n.size : a.y1, d.position = t, e.append(i(d, n))
                }
                var n = this,
                    r = [],
                    o = n.options,
                    a = n.lineBox(),
                    s = o.labels.mirror,
                    l = o.majorTicks,
                    c = o.minorTicks,
                    d = {
                        vertical: o.vertical
                    };
                return l.visible && n.traverseMajorTicksPositions(t, l), c.visible && n.traverseMinorTicksPositions(t, c), r
            },
            createGridLines: function(e) {
                function t(e, t) {
                    l(e, u) || (d.position = e, h.append(r(d, t)), u.push(e))
                }
                var n = this,
                    i = n.options,
                    o = i.majorGridLines,
                    a = i.minorGridLines,
                    s = i.vertical,
                    c = e.lineBox(),
                    d = {
                        lineStart: c[s ? "x1" : "y1"],
                        lineEnd: c[s ? "x2" : "y2"],
                        vertical: s
                    },
                    u = [],
                    h = this.gridLinesVisual();
                return o.visible && n.traverseMajorTicksPositions(t, o), a.visible && n.traverseMinorTicksPositions(t, a), h.children
            },
            traverseMajorTicksPositions: function(e, t) {
                var n, i, r = this,
                    o = r._lineOptions(),
                    a = o.lineStart,
                    s = o.step,
                    l = r.logMin,
                    c = r.logMax;
                for (n = oe.ceil(l) + t.skip; c >= n; n += t.step) i = u(a + s * (n - l), _e), e(i, t)
            },
            traverseMinorTicksPositions: function(e, t) {
                var n, i, r, o, a, s = this,
                    l = s.options,
                    c = s._lineOptions(),
                    d = c.lineStart,
                    f = c.step,
                    p = l.majorUnit,
                    m = s.logMin,
                    g = s.logMax,
                    v = oe.floor(m),
                    _ = l.max,
                    b = l.min,
                    w = l.minorUnit;
                for (n = v; g > n; n++)
                    for (o = s._minorIntervalOptions(n), a = t.skip; w > a && (i = o.value + a * o.minorStep, !(i > _)); a += t.step) i >= b && (r = u(d + f * (h(i, p) - m), _e), e(r, t))
            },
            createAxisLabel: function(e, t) {
                var n = this,
                    i = n.options,
                    r = oe.ceil(n.logMin + e),
                    o = Math.pow(i.majorUnit, r),
                    a = n.axisLabelText(o, null, t);
                return new z(o, a, e, null, t)
            },
            shouldRenderNote: function(e) {
                var t = this.range();
                return e >= t.min && t.max >= e
            },
            _throwNegativeValuesError: function() {
                throw Error("Non positive values cannot be used for a logarithmic axis")
            },
            _initOptions: function(e, t, n) {
                var i = this,
                    r = ae({}, i.options, {
                        min: e,
                        max: t
                    }, n),
                    o = r.min,
                    a = r.max,
                    s = r.majorUnit,
                    l = this._autoMax(t, s),
                    c = this._autoMin(e, t, r);
                return 0 >= r.axisCrossingValue && i._throwNegativeValuesError(), G(n.max) ? 0 >= n.max && i._throwNegativeValuesError() : a = l, G(n.min) ? 0 >= n.min && i._throwNegativeValuesError() : o = c, this.totalMin = G(n.min) ? oe.min(c, n.min) : c, this.totalMax = G(n.max) ? oe.max(l, n.max) : l, i.logMin = u(h(o, s), _e), i.logMax = u(h(a, s), _e), r.max = a, r.min = o, r.minorUnit = n.minorUnit || u(s - 1, _e), r
            },
            _autoMin: function(e, t, n) {
                var i = e,
                    r = n.majorUnit;
                return 0 >= e ? i = 1 >= t ? oe.pow(r, -2) : 1 : n.narrowRange || (i = oe.pow(r, oe.floor(h(e, r)))), i
            },
            _autoMax: function(e, t) {
                var n, i = u(h(e, t), _e) % 1;
                return n = 0 >= e ? t : 0 !== i && (.3 > i || i > .9) ? oe.pow(t, h(e, t) + .2) : oe.pow(t, oe.ceil(h(e, t)))
            },
            pan: function(e) {
                var t = this.translateRange(e);
                return this.limitRange(t.min, t.max, this.totalMin, this.totalMax, -e)
            },
            pointsRange: function(e, t) {
                var n = this.getValue(e),
                    i = this.getValue(t),
                    r = oe.min(n, i),
                    o = oe.max(n, i);
                return {
                    min: r,
                    max: o
                }
            },
            zoomRange: function(e) {
                var n = this.options,
                    i = this.scaleRange(e),
                    r = this.totalMax,
                    o = this.totalMin,
                    a = j.limitValue(i.min, o, r),
                    s = j.limitValue(i.max, o, r),
                    l = n.majorUnit,
                    c = s > a && n.min && n.max && u(h(n.max, l) - h(n.min, l), _e) < 1,
                    d = !(n.min === o && n.max === r) && u(h(s, l) - h(a, l), _e) >= 1;
                return c || d ? {
                    min: a,
                    max: s
                } : t
            },
            _minorIntervalOptions: function(e) {
                var t = this.options.majorUnit,
                    n = oe.pow(t, e),
                    i = oe.pow(t, e + 1),
                    r = i - n,
                    o = r / this.options.minorUnit;
                return {
                    value: n,
                    minorStep: o
                }
            },
            _lineOptions: function() {
                var e = this,
                    t = e.options,
                    n = t.reverse,
                    i = t.vertical,
                    r = i ? Ve : Oe,
                    o = e.lineBox(),
                    a = i === n ? 1 : -1,
                    s = 1 === a ? 1 : 2,
                    l = i ? o.height() : o.width(),
                    c = a * (l / (e.logMax - e.logMin)),
                    d = o[r + s];
                return {
                    step: c,
                    lineStart: d,
                    lineBox: o
                }
            }
        }), K.Gradients = {
            glass: {
                type: De,
                rotation: 0,
                stops: [{
                    offset: 0,
                    color: Ne,
                    opacity: 0
                }, {
                    offset: .25,
                    color: Ne,
                    opacity: .3
                }, {
                    offset: 1,
                    color: Ne,
                    opacity: 0
                }]
            },
            sharpBevel: {
                type: Pe,
                stops: [{
                    offset: 0,
                    color: Ne,
                    opacity: .55
                }, {
                    offset: .65,
                    color: Ne,
                    opacity: 0
                }, {
                    offset: .95,
                    color: Ne,
                    opacity: .25
                }]
            },
            roundedBevel: {
                type: Pe,
                stops: [{
                    offset: .33,
                    color: Ne,
                    opacity: .06
                }, {
                    offset: .83,
                    color: Ne,
                    opacity: .2
                }, {
                    offset: .95,
                    color: Ne,
                    opacity: 0
                }]
            },
            roundedGlass: {
                type: Pe,
                supportVML: !1,
                stops: [{
                    offset: 0,
                    color: Ne,
                    opacity: 0
                }, {
                    offset: .5,
                    color: Ne,
                    opacity: .3
                }, {
                    offset: .99,
                    color: Ne,
                    opacity: 0
                }]
            },
            sharpGlass: {
                type: Pe,
                supportVML: !1,
                stops: [{
                    offset: 0,
                    color: Ne,
                    opacity: .2
                }, {
                    offset: .15,
                    color: Ne,
                    opacity: .15
                }, {
                    offset: .17,
                    color: Ne,
                    opacity: .35
                }, {
                    offset: .85,
                    color: Ne,
                    opacity: .05
                }, {
                    offset: .87,
                    color: Ne,
                    opacity: .15
                }, {
                    offset: .99,
                    color: Ne,
                    opacity: 0
                }]
            }
        }, V = {
            extend: function(e, t) {
                if (!e.exportVisual) throw Error("Mixin target has no exportVisual method defined.");
                e.exportSVG = this.exportSVG, e.exportImage = this.exportImage, e.exportPDF = this.exportPDF, t || (e.svg = this.svg, e.imageDataURL = this.imageDataURL)
            },
            exportSVG: function(e) {
                return X.exportSVG(this.exportVisual(), e)
            },
            exportImage: function(e) {
                return X.exportImage(this.exportVisual(e), e)
            },
            exportPDF: function(e) {
                return X.exportPDF(this.exportVisual(), e)
            },
            svg: function() {
                if (X.svg.Surface) return X.svg._exportGroup(this.exportVisual());
                throw Error("SVG Export failed. Unable to export instantiate kendo.drawing.svg.Surface")
            },
            imageDataURL: function() {
                var t, n, i;
                if (!W.support.canvas) return null;
                if (X.canvas.Surface) return t = e("<div />").css({
                    display: "none",
                    width: this.element.width(),
                    height: this.element.height()
                }).appendTo(document.body), n = new X.canvas.Surface(t), n.draw(this.exportVisual()), i = n._rootElement.toDataURL(), n.destroy(), t.remove(), i;
                throw Error("Image Export failed. Unable to export instantiate kendo.drawing.canvas.Surface")
            }
        }, U = function(e) {
            this.closed = e
        }, U.prototype = U.fn = {
            WEIGHT: .333,
            EXTREMUM_ALLOWED_DEVIATION: .01,
            process: function(e) {
                var t, n, i, r, o, a, s, l, c, d, u = this,
                    h = u.closed,
                    f = e.slice(0),
                    p = f.length,
                    m = [];
                if (p > 2 && (u.removeDuplicates(0, f), p = f.length), 2 > p || 2 == p && f[0].equals(f[1])) return m;
                for (t = f[0], n = f[1], i = f[2], m.push(new X.Segment(t)); t.equals(f[p - 1]);) h = !0, f.pop(), p--;
                if (2 == p) return s = u.tangent(t, n, Oe, Ve), $(m).controlOut(u.firstControlPoint(s, t, n, Oe, Ve)), m.push(new X.Segment(n, u.secondControlPoint(s, t, n, Oe, Ve))), m;
                for (h ? (t = f[p - 1], n = f[0], i = f[1], r = u.controlPoints(t, n, i), o = r[1], a = r[0]) : (s = u.tangent(t, n, Oe, Ve), o = u.firstControlPoint(s, t, n, Oe, Ve)), l = o, c = 0; p - 3 >= c; c++) u.removeDuplicates(c, f), p = f.length, p >= c + 3 && (t = f[c], n = f[c + 1], i = f[c + 2], r = u.controlPoints(t, n, i), $(m).controlOut(l), l = r[1], d = r[0], m.push(new X.Segment(n, d)));
                return h ? (t = f[p - 2], n = f[p - 1], i = f[0], r = u.controlPoints(t, n, i), $(m).controlOut(l), m.push(new X.Segment(n, r[0])), $(m).controlOut(r[1]), m.push(new X.Segment(i, a))) : (s = u.tangent(n, i, Oe, Ve), $(m).controlOut(l), m.push(new X.Segment(i, u.secondControlPoint(s, n, i, Oe, Ve)))), m
            },
            removeDuplicates: function(e, t) {
                for (; t[e].equals(t[e + 1]) || t[e + 1].equals(t[e + 2]);) t.splice(e + 1, 1)
            },
            invertAxis: function(e, t, n) {
                var i, r, o = this,
                    a = !1;
                return e.x === t.x ? a = !0 : t.x === n.x ? (n.y > t.y && t.y >= e.y || t.y > n.y && e.y >= t.y) && (a = !0) : (i = o.lineFunction(e, t), r = o.calculateFunction(i, n.x), t.y >= e.y && r >= n.y || e.y >= t.y && n.y >= r || (a = !0)), a
            },
            isLine: function(e, t, n) {
                var i = this,
                    r = i.lineFunction(e, t),
                    o = i.calculateFunction(r, n.x);
                return e.x == t.x && t.x == n.x || u(o, 1) === u(n.y, 1)
            },
            lineFunction: function(e, t) {
                var n = (t.y - e.y) / (t.x - e.x),
                    i = e.y - n * e.x;
                return [i, n]
            },
            controlPoints: function(e, t, n) {
                var i, r, o, a, s, l, c = this,
                    d = Oe,
                    u = Ve,
                    h = !1,
                    f = !1,
                    p = c.EXTREMUM_ALLOWED_DEVIATION;
                return c.isLine(e, t, n) ? i = c.tangent(e, t, Oe, Ve) : (r = {
                    x: c.isMonotonicByField(e, t, n, Oe),
                    y: c.isMonotonicByField(e, t, n, Ve)
                }, r.x && r.y ? (i = c.tangent(e, n, Oe, Ve), h = !0) : (c.invertAxis(e, t, n) && (d = Ve, u = Oe), r[d] ? i = 0 : (s = e[u] > n[u] && t[u] >= e[u] || n[u] > e[u] && e[u] >= t[u] ? c.sign((n[u] - e[u]) * (t[d] - e[d])) : -c.sign((n[d] - e[d]) * (t[u] - e[u])), i = p * s, f = !0))), a = c.secondControlPoint(i, e, t, d, u), f && (l = d, d = u, u = l), o = c.firstControlPoint(i, t, n, d, u), h && (c.restrictControlPoint(e, t, a, i), c.restrictControlPoint(t, n, o, i)), [a, o]
            },
            sign: function(e) {
                return 0 >= e ? -1 : 1
            },
            restrictControlPoint: function(e, t, n, i) {
                t.y > e.y ? n.y > t.y ? (n.x = e.x + (t.y - e.y) / i, n.y = t.y) : e.y > n.y && (n.x = t.x - (t.y - e.y) / i, n.y = e.y) : t.y > n.y ? (n.x = e.x - (e.y - t.y) / i, n.y = t.y) : n.y > e.y && (n.x = t.x + (e.y - t.y) / i, n.y = e.y)
            },
            tangent: function(e, t, n, i) {
                var r, o = t[n] - e[n],
                    a = t[i] - e[i];
                return r = 0 === o ? 0 : a / o
            },
            isMonotonicByField: function(e, t, n, i) {
                return n[i] > t[i] && t[i] > e[i] || t[i] > n[i] && e[i] > t[i]
            },
            firstControlPoint: function(e, t, n, i, r) {
                var o = this,
                    a = t[i],
                    s = n[i],
                    l = (s - a) * o.WEIGHT;
                return o.point(a + l, t[r] + l * e, i, r)
            },
            secondControlPoint: function(e, t, n, i, r) {
                var o = this,
                    a = t[i],
                    s = n[i],
                    l = (s - a) * o.WEIGHT;
                return o.point(s - l, n[r] - l * e, i, r)
            },
            point: function(e, t, n, i) {
                var r = new Q.Point;
                return r[n] = e, r[i] = t, r
            },
            calculateFunction: function(e, t) {
                var n, i = 0,
                    r = e.length;
                for (n = 0; r > n; n++) i += Math.pow(t, n) * e[n];
                return i
            }
        }, w._element = document.createElement("span"), ae(W.dataviz, {
            AXIS_LABEL_CLICK: se,
            COORD_PRECISION: ue,
            DEFAULT_PRECISION: _e,
            DEFAULT_WIDTH: be,
            DEFAULT_HEIGHT: ge,
            DEFAULT_FONT: me,
            INITIAL_ANIMATION_DURATION: Ce,
            NOTE_CLICK: Ie,
            NOTE_HOVER: Me,
            CLIP: he,
            Axis: B,
            AxisLabel: z,
            Box2D: C,
            BoxElement: F,
            ChartElement: A,
            CurveProcessor: U,
            ExportMixin: V,
            FloatElement: M,
            LogarithmicAxis: O,
            Note: L,
            NumericAxis: N,
            Point2D: We,
            Ring: S,
            RootElement: E,
            Sector: T,
            ShapeBuilder: D,
            ShapeElement: H,
            Text: I,
            TextBox: R,
            Title: P,
            alignPathToPixel: y,
            autoFormat: g,
            autoMajorUnit: o,
            boxDiff: s,
            dateComparer: _,
            decodeEntities: w,
            getSpacing: n,
            inArray: l,
            interpolateValue: p,
            mwDelta: b,
            rectToBox: x,
            rotatePoint: a,
            round: u,
            ceil: c,
            floor: d
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.themes.min", ["kendo.dataviz.core.min"], e)
}(function() {
    return function(e) {
        function t(t, n) {
            return e.map(t, function(e, t) {
                return [
                    [e, n[t]]
                ]
            })
        }
        var n = window.kendo,
            i = n.dataviz.ui,
            r = n.deepExtend,
            o = 1.5,
            a = .4,
            s = "#000",
            l = "Arial,Helvetica,sans-serif",
            c = "11px " + l,
            d = "12px " + l,
            u = "16px " + l,
            h = "#fff",
            f = {
                title: {
                    font: u
                },
                legend: {
                    labels: {
                        font: d
                    }
                },
                seriesDefaults: {
                    visible: !0,
                    labels: {
                        font: c
                    },
                    donut: {
                        margin: 1
                    },
                    line: {
                        width: 2
                    },
                    vericalLine: {
                        width: 2
                    },
                    scatterLine: {
                        width: 1
                    },
                    area: {
                        opacity: .4,
                        markers: {
                            visible: !1,
                            size: 6
                        },
                        highlight: {
                            markers: {
                                border: {
                                    color: "#fff",
                                    opacity: 1,
                                    width: 1
                                }
                            }
                        },
                        line: {
                            opacity: 1,
                            width: 0
                        }
                    },
                    verticalArea: {
                        opacity: .4,
                        markers: {
                            visible: !1,
                            size: 6
                        },
                        line: {
                            opacity: 1,
                            width: 0
                        }
                    },
                    radarLine: {
                        width: 2,
                        markers: {
                            visible: !1
                        }
                    },
                    radarArea: {
                        opacity: .5,
                        markers: {
                            visible: !1,
                            size: 6
                        },
                        line: {
                            opacity: 1,
                            width: 0
                        }
                    },
                    candlestick: {
                        line: {
                            width: 1,
                            color: s
                        },
                        border: {
                            width: 1,
                            _brightness: .8
                        },
                        gap: 1,
                        spacing: .3,
                        downColor: h,
                        highlight: {
                            line: {
                                width: 2
                            },
                            border: {
                                width: 2,
                                opacity: 1
                            }
                        }
                    },
                    ohlc: {
                        line: {
                            width: 1
                        },
                        gap: 1,
                        spacing: .3,
                        highlight: {
                            line: {
                                width: 3,
                                opacity: 1
                            }
                        }
                    },
                    bubble: {
                        opacity: .6,
                        border: {
                            width: 0
                        },
                        labels: {
                            background: "transparent"
                        }
                    },
                    bar: {
                        gap: o,
                        spacing: a
                    },
                    column: {
                        gap: o,
                        spacing: a
                    },
                    rangeColumn: {
                        gap: o,
                        spacing: a
                    },
                    rangeBar: {
                        gap: o,
                        spacing: a
                    },
                    waterfall: {
                        gap: .5,
                        spacing: a,
                        line: {
                            width: 1,
                            color: s
                        }
                    },
                    horizontalWaterfall: {
                        gap: .5,
                        spacing: a,
                        line: {
                            width: 1,
                            color: s
                        }
                    },
                    bullet: {
                        gap: o,
                        spacing: a,
                        target: {
                            color: "#ff0000"
                        }
                    },
                    verticalBullet: {
                        gap: o,
                        spacing: a,
                        target: {
                            color: "#ff0000"
                        }
                    },
                    boxPlot: {
                        outliersField: "",
                        meanField: "",
                        whiskers: {
                            width: 1,
                            color: s
                        },
                        mean: {
                            width: 1,
                            color: s
                        },
                        median: {
                            width: 1,
                            color: s
                        },
                        border: {
                            width: 1,
                            _brightness: .8
                        },
                        gap: 1,
                        spacing: .3,
                        downColor: h,
                        highlight: {
                            whiskers: {
                                width: 2
                            },
                            border: {
                                width: 2,
                                opacity: 1
                            }
                        }
                    },
                    funnel: {
                        labels: {
                            color: "",
                            background: ""
                        }
                    },
                    notes: {
                        icon: {
                            border: {
                                width: 1
                            }
                        },
                        label: {
                            padding: 3,
                            font: d
                        },
                        line: {
                            length: 10,
                            width: 1
                        },
                        visible: !0
                    }
                },
                categoryAxis: {
                    majorGridLines: {
                        visible: !0
                    }
                },
                axisDefaults: {
                    labels: {
                        font: d
                    },
                    title: {
                        font: u,
                        margin: 5
                    },
                    crosshair: {
                        tooltip: {
                            font: d
                        }
                    },
                    notes: {
                        icon: {
                            size: 7,
                            border: {
                                width: 1
                            }
                        },
                        label: {
                            padding: 3,
                            font: d
                        },
                        line: {
                            length: 10,
                            width: 1
                        },
                        visible: !0
                    }
                },
                tooltip: {
                    font: d
                },
                navigator: {
                    pane: {
                        height: 90,
                        margin: {
                            top: 10
                        }
                    }
                }
            },
            p = {
                scale: {
                    labels: {
                        font: d
                    }
                }
            },
            m = {
                shapeDefaults: {
                    hover: {
                        opacity: .2
                    },
                    stroke: {
                        width: 0
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            width: 7,
                            height: 7
                        }
                    }
                },
                selectable: {
                    stroke: {
                        width: 1,
                        dashType: "dot"
                    }
                },
                connectionDefaults: {
                    stroke: {
                        width: 2
                    },
                    selection: {
                        handles: {
                            width: 8,
                            height: 8
                        }
                    },
                    editable: {
                        tools: ["edit", "delete"]
                    }
                }
            },
            g = i.themes,
            v = i.registerTheme = function(e, t) {
                var n, i = {};
                i.chart = r({}, f, t.chart), i.gauge = r({}, p, t.gauge), i.diagram = r({}, m, t.diagram), i.treeMap = r({}, t.treeMap), n = i.chart.seriesDefaults, n.verticalLine = r({}, n.line), n.verticalArea = r({}, n.area), n.polarArea = r({}, n.radarArea), n.polarLine = r({}, n.radarLine), g[e] = i
            };
        v("black", {
            chart: {
                title: {
                    color: h
                },
                legend: {
                    labels: {
                        color: h
                    },
                    inactiveItems: {
                        labels: {
                            color: "#919191"
                        },
                        markers: {
                            color: "#919191"
                        }
                    }
                },
                seriesDefaults: {
                    labels: {
                        color: h
                    },
                    errorBars: {
                        color: h
                    },
                    notes: {
                        icon: {
                            background: "#3b3b3b",
                            border: {
                                color: "#8e8e8e"
                            }
                        },
                        label: {
                            color: h
                        },
                        line: {
                            color: "#8e8e8e"
                        }
                    },
                    pie: {
                        overlay: {
                            gradient: "sharpBevel"
                        }
                    },
                    donut: {
                        overlay: {
                            gradient: "sharpGlass"
                        }
                    },
                    line: {
                        markers: {
                            background: "#3d3d3d"
                        }
                    },
                    scatter: {
                        markers: {
                            background: "#3d3d3d"
                        }
                    },
                    scatterLine: {
                        markers: {
                            background: "#3d3d3d"
                        }
                    },
                    waterfall: {
                        line: {
                            color: "#8e8e8e"
                        }
                    },
                    horizontalWaterfall: {
                        line: {
                            color: "#8e8e8e"
                        }
                    },
                    candlestick: {
                        downColor: "#555",
                        line: {
                            color: h
                        },
                        border: {
                            _brightness: 1.5,
                            opacity: 1
                        },
                        highlight: {
                            border: {
                                color: h,
                                opacity: .2
                            }
                        }
                    },
                    ohlc: {
                        line: {
                            color: h
                        }
                    }
                },
                chartArea: {
                    background: "#3d3d3d"
                },
                seriesColors: ["#0081da", "#3aafff", "#99c900", "#ffeb3d", "#b20753", "#ff4195"],
                axisDefaults: {
                    line: {
                        color: "#8e8e8e"
                    },
                    labels: {
                        color: h
                    },
                    majorGridLines: {
                        color: "#545454"
                    },
                    minorGridLines: {
                        color: "#454545"
                    },
                    title: {
                        color: h
                    },
                    crosshair: {
                        color: "#8e8e8e"
                    },
                    notes: {
                        icon: {
                            background: "#3b3b3b",
                            border: {
                                color: "#8e8e8e"
                            }
                        },
                        label: {
                            color: h
                        },
                        line: {
                            color: "#8e8e8e"
                        }
                    }
                }
            },
            gauge: {
                pointer: {
                    color: "#0070e4"
                },
                scale: {
                    rangePlaceholderColor: "#1d1d1d",
                    labels: {
                        color: h
                    },
                    minorTicks: {
                        color: h
                    },
                    majorTicks: {
                        color: h
                    },
                    line: {
                        color: h
                    }
                }
            },
            diagram: {
                shapeDefaults: {
                    fill: {
                        color: "#0066cc"
                    },
                    connectorDefaults: {
                        fill: {
                            color: h
                        },
                        stroke: {
                            color: "#384049"
                        },
                        hover: {
                            fill: {
                                color: "#3d3d3d"
                            },
                            stroke: {
                                color: "#efefef"
                            }
                        }
                    },
                    content: {
                        color: h
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            fill: {
                                color: "#3d3d3d"
                            },
                            stroke: {
                                color: h
                            },
                            hover: {
                                fill: {
                                    color: h
                                },
                                stroke: {
                                    color: h
                                }
                            }
                        }
                    },
                    rotate: {
                        thumb: {
                            stroke: {
                                color: h
                            },
                            fill: {
                                color: h
                            }
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: h
                    }
                },
                connectionDefaults: {
                    stroke: {
                        color: h
                    },
                    content: {
                        color: h
                    },
                    selection: {
                        handles: {
                            fill: {
                                color: "#3d3d3d"
                            },
                            stroke: {
                                color: "#efefef"
                            }
                        }
                    }
                }
            },
            treeMap: {
                colors: [
                    ["#0081da", "#314b5c"],
                    ["#3aafff", "#3c5464"],
                    ["#99c900", "#4f5931"],
                    ["#ffeb3d", "#64603d"],
                    ["#b20753", "#543241"],
                    ["#ff4195", "#643e4f"]
                ]
            }
        }), v("blueopal", {
            chart: {
                title: {
                    color: "#293135"
                },
                legend: {
                    labels: {
                        color: "#293135"
                    },
                    inactiveItems: {
                        labels: {
                            color: "#27A5BA"
                        },
                        markers: {
                            color: "#27A5BA"
                        }
                    }
                },
                seriesDefaults: {
                    labels: {
                        color: s,
                        background: h,
                        opacity: .5
                    },
                    errorBars: {
                        color: "#293135"
                    },
                    candlestick: {
                        downColor: "#c4d0d5",
                        line: {
                            color: "#9aabb2"
                        }
                    },
                    waterfall: {
                        line: {
                            color: "#9aabb2"
                        }
                    },
                    horizontalWaterfall: {
                        line: {
                            color: "#9aabb2"
                        }
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#9aabb2"
                            }
                        },
                        label: {
                            color: "#293135"
                        },
                        line: {
                            color: "#9aabb2"
                        }
                    }
                },
                seriesColors: ["#0069a5", "#0098ee", "#7bd2f6", "#ffb800", "#ff8517", "#e34a00"],
                axisDefaults: {
                    line: {
                        color: "#9aabb2"
                    },
                    labels: {
                        color: "#293135"
                    },
                    majorGridLines: {
                        color: "#c4d0d5"
                    },
                    minorGridLines: {
                        color: "#edf1f2"
                    },
                    title: {
                        color: "#293135"
                    },
                    crosshair: {
                        color: "#9aabb2"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#9aabb2"
                            }
                        },
                        label: {
                            color: "#293135"
                        },
                        line: {
                            color: "#9aabb2"
                        }
                    }
                }
            },
            gauge: {
                pointer: {
                    color: "#005c83"
                },
                scale: {
                    rangePlaceholderColor: "#daecf4",
                    labels: {
                        color: "#293135"
                    },
                    minorTicks: {
                        color: "#293135"
                    },
                    majorTicks: {
                        color: "#293135"
                    },
                    line: {
                        color: "#293135"
                    }
                }
            },
            diagram: {
                shapeDefaults: {
                    fill: {
                        color: "#7ec6e3"
                    },
                    connectorDefaults: {
                        fill: {
                            color: "#003f59"
                        },
                        stroke: {
                            color: h
                        },
                        hover: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#003f59"
                            }
                        }
                    },
                    content: {
                        color: "#293135"
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#003f59"
                            },
                            hover: {
                                fill: {
                                    color: "#003f59"
                                },
                                stroke: {
                                    color: "#003f59"
                                }
                            }
                        }
                    },
                    rotate: {
                        thumb: {
                            stroke: {
                                color: "#003f59"
                            },
                            fill: {
                                color: "#003f59"
                            }
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: "#003f59"
                    }
                },
                connectionDefaults: {
                    stroke: {
                        color: "#003f59"
                    },
                    content: {
                        color: "#293135"
                    },
                    selection: {
                        handles: {
                            fill: {
                                color: "#3d3d3d"
                            },
                            stroke: {
                                color: "#efefef"
                            }
                        }
                    }
                }
            },
            treeMap: {
                colors: [
                    ["#0069a5", "#bad7e7"],
                    ["#0098ee", "#b9e0f5"],
                    ["#7bd2f6", "#ceeaf6"],
                    ["#ffb800", "#e6e3c4"],
                    ["#ff8517", "#e4d8c8"],
                    ["#e34a00", "#ddccc2"]
                ]
            }
        }), v("highcontrast", {
            chart: {
                title: {
                    color: "#ffffff"
                },
                legend: {
                    labels: {
                        color: "#ffffff"
                    },
                    inactiveItems: {
                        labels: {
                            color: "#66465B"
                        },
                        markers: {
                            color: "#66465B"
                        }
                    }
                },
                seriesDefaults: {
                    labels: {
                        color: "#ffffff"
                    },
                    errorBars: {
                        color: "#ffffff"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#ffffff"
                            }
                        },
                        label: {
                            color: "#ffffff"
                        },
                        line: {
                            color: "#ffffff"
                        }
                    },
                    pie: {
                        overlay: {
                            gradient: "sharpGlass"
                        }
                    },
                    donut: {
                        overlay: {
                            gradient: "sharpGlass"
                        }
                    },
                    line: {
                        markers: {
                            background: "#2c232b"
                        }
                    },
                    scatter: {
                        markers: {
                            background: "#2c232b"
                        }
                    },
                    scatterLine: {
                        markers: {
                            background: "#2c232b"
                        }
                    },
                    area: {
                        opacity: .5
                    },
                    waterfall: {
                        line: {
                            color: "#ffffff"
                        }
                    },
                    horizontalWaterfall: {
                        line: {
                            color: "#ffffff"
                        }
                    },
                    candlestick: {
                        downColor: "#664e62",
                        line: {
                            color: "#ffffff"
                        },
                        border: {
                            _brightness: 1.5,
                            opacity: 1
                        },
                        highlight: {
                            border: {
                                color: "#ffffff",
                                opacity: 1
                            }
                        }
                    },
                    ohlc: {
                        line: {
                            color: "#ffffff"
                        }
                    }
                },
                chartArea: {
                    background: "#2c232b"
                },
                seriesColors: ["#a7008f", "#ffb800", "#3aafff", "#99c900", "#b20753", "#ff4195"],
                axisDefaults: {
                    line: {
                        color: "#ffffff"
                    },
                    labels: {
                        color: "#ffffff"
                    },
                    majorGridLines: {
                        color: "#664e62"
                    },
                    minorGridLines: {
                        color: "#4f394b"
                    },
                    title: {
                        color: "#ffffff"
                    },
                    crosshair: {
                        color: "#ffffff"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#ffffff"
                            }
                        },
                        label: {
                            color: "#ffffff"
                        },
                        line: {
                            color: "#ffffff"
                        }
                    }
                }
            },
            gauge: {
                pointer: {
                    color: "#a7008f"
                },
                scale: {
                    rangePlaceholderColor: "#2c232b",
                    labels: {
                        color: "#ffffff"
                    },
                    minorTicks: {
                        color: "#2c232b"
                    },
                    majorTicks: {
                        color: "#664e62"
                    },
                    line: {
                        color: "#ffffff"
                    }
                }
            },
            diagram: {
                shapeDefaults: {
                    fill: {
                        color: "#a7018f"
                    },
                    connectorDefaults: {
                        fill: {
                            color: h
                        },
                        stroke: {
                            color: "#2c232b"
                        },
                        hover: {
                            fill: {
                                color: "#2c232b"
                            },
                            stroke: {
                                color: h
                            }
                        }
                    },
                    content: {
                        color: h
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            fill: {
                                color: "#2c232b"
                            },
                            stroke: {
                                color: h
                            },
                            hover: {
                                fill: {
                                    color: h
                                },
                                stroke: {
                                    color: h
                                }
                            }
                        }
                    },
                    rotate: {
                        thumb: {
                            stroke: {
                                color: h
                            },
                            fill: {
                                color: h
                            }
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: h
                    }
                },
                connectionDefaults: {
                    stroke: {
                        color: h
                    },
                    content: {
                        color: h
                    },
                    selection: {
                        handles: {
                            fill: {
                                color: "#2c232b"
                            },
                            stroke: {
                                color: h
                            }
                        }
                    }
                }
            },
            treeMap: {
                colors: [
                    ["#a7008f", "#451c3f"],
                    ["#ffb800", "#564122"],
                    ["#3aafff", "#2f3f55"],
                    ["#99c900", "#424422"],
                    ["#b20753", "#471d33"],
                    ["#ff4195", "#562940"]
                ]
            }
        }), v("default", {
            chart: {
                title: {
                    color: "#8e8e8e"
                },
                legend: {
                    labels: {
                        color: "#232323"
                    },
                    inactiveItems: {
                        labels: {
                            color: "#919191"
                        },
                        markers: {
                            color: "#919191"
                        }
                    }
                },
                seriesDefaults: {
                    labels: {
                        color: s,
                        background: h,
                        opacity: .5
                    },
                    errorBars: {
                        color: "#232323"
                    },
                    candlestick: {
                        downColor: "#dedede",
                        line: {
                            color: "#8d8d8d"
                        }
                    },
                    waterfall: {
                        line: {
                            color: "#8e8e8e"
                        }
                    },
                    horizontalWaterfall: {
                        line: {
                            color: "#8e8e8e"
                        }
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#8e8e8e"
                            }
                        },
                        label: {
                            color: "#232323"
                        },
                        line: {
                            color: "#8e8e8e"
                        }
                    }
                },
                seriesColors: ["#ff6800", "#a0a700", "#ff8d00", "#678900", "#ffb53c", "#396000"],
                axisDefaults: {
                    line: {
                        color: "#8e8e8e"
                    },
                    labels: {
                        color: "#232323"
                    },
                    minorGridLines: {
                        color: "#f0f0f0"
                    },
                    majorGridLines: {
                        color: "#dfdfdf"
                    },
                    title: {
                        color: "#232323"
                    },
                    crosshair: {
                        color: "#8e8e8e"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#8e8e8e"
                            }
                        },
                        label: {
                            color: "#232323"
                        },
                        line: {
                            color: "#8e8e8e"
                        }
                    }
                }
            },
            gauge: {
                pointer: {
                    color: "#ea7001"
                },
                scale: {
                    rangePlaceholderColor: "#dedede",
                    labels: {
                        color: "#2e2e2e"
                    },
                    minorTicks: {
                        color: "#2e2e2e"
                    },
                    majorTicks: {
                        color: "#2e2e2e"
                    },
                    line: {
                        color: "#2e2e2e"
                    }
                }
            },
            diagram: {
                shapeDefaults: {
                    fill: {
                        color: "#e15613"
                    },
                    connectorDefaults: {
                        fill: {
                            color: "#282828"
                        },
                        stroke: {
                            color: h
                        },
                        hover: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#282828"
                            }
                        }
                    },
                    content: {
                        color: "#2e2e2e"
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#282828"
                            },
                            hover: {
                                fill: {
                                    color: "#282828"
                                },
                                stroke: {
                                    color: "#282828"
                                }
                            }
                        }
                    },
                    rotate: {
                        thumb: {
                            stroke: {
                                color: "#282828"
                            },
                            fill: {
                                color: "#282828"
                            }
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: "#a7018f"
                    }
                },
                connectionDefaults: {
                    stroke: {
                        color: "#282828"
                    },
                    content: {
                        color: "#2e2e2e"
                    },
                    selection: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#282828"
                            }
                        }
                    }
                }
            },
            treeMap: {
                colors: [
                    ["#ff6800", "#edcfba"],
                    ["#a0a700", "#dadcba"],
                    ["#ff8d00", "#edd7ba"],
                    ["#678900", "#cfd6ba"],
                    ["#ffb53c", "#eddfc6"],
                    ["#396000", "#c6ceba"]
                ]
            }
        }), v("silver", {
            chart: {
                title: {
                    color: "#4e5968"
                },
                legend: {
                    labels: {
                        color: "#4e5968"
                    },
                    inactiveItems: {
                        labels: {
                            color: "#B1BCC8"
                        },
                        markers: {
                            color: "#B1BCC8"
                        }
                    }
                },
                seriesDefaults: {
                    labels: {
                        color: "#293135",
                        background: "#eaeaec",
                        opacity: .5
                    },
                    errorBars: {
                        color: "#4e5968"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#4e5968"
                            }
                        },
                        label: {
                            color: "#4e5968"
                        },
                        line: {
                            color: "#4e5968"
                        }
                    },
                    line: {
                        markers: {
                            background: "#eaeaec"
                        }
                    },
                    scatter: {
                        markers: {
                            background: "#eaeaec"
                        }
                    },
                    scatterLine: {
                        markers: {
                            background: "#eaeaec"
                        }
                    },
                    pie: {
                        connectors: {
                            color: "#A6B1C0"
                        }
                    },
                    donut: {
                        connectors: {
                            color: "#A6B1C0"
                        }
                    },
                    waterfall: {
                        line: {
                            color: "#a6b1c0"
                        }
                    },
                    horizontalWaterfall: {
                        line: {
                            color: "#a6b1c0"
                        }
                    },
                    candlestick: {
                        downColor: "#a6afbe"
                    }
                },
                chartArea: {
                    background: "#eaeaec"
                },
                seriesColors: ["#007bc3", "#76b800", "#ffae00", "#ef4c00", "#a419b7", "#430B62"],
                axisDefaults: {
                    line: {
                        color: "#a6b1c0"
                    },
                    labels: {
                        color: "#4e5968"
                    },
                    majorGridLines: {
                        color: "#dcdcdf"
                    },
                    minorGridLines: {
                        color: "#eeeeef"
                    },
                    title: {
                        color: "#4e5968"
                    },
                    crosshair: {
                        color: "#a6b1c0"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#4e5968"
                            }
                        },
                        label: {
                            color: "#4e5968"
                        },
                        line: {
                            color: "#4e5968"
                        }
                    }
                }
            },
            gauge: {
                pointer: {
                    color: "#0879c0"
                },
                scale: {
                    rangePlaceholderColor: "#f3f3f4",
                    labels: {
                        color: "#515967"
                    },
                    minorTicks: {
                        color: "#515967"
                    },
                    majorTicks: {
                        color: "#515967"
                    },
                    line: {
                        color: "#515967"
                    }
                }
            },
            diagram: {
                shapeDefaults: {
                    fill: {
                        color: "#1c82c2"
                    },
                    connectorDefaults: {
                        fill: {
                            color: "#515967"
                        },
                        stroke: {
                            color: h
                        },
                        hover: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#282828"
                            }
                        }
                    },
                    content: {
                        color: "#515967"
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#515967"
                            },
                            hover: {
                                fill: {
                                    color: "#515967"
                                },
                                stroke: {
                                    color: "#515967"
                                }
                            }
                        }
                    },
                    rotate: {
                        thumb: {
                            stroke: {
                                color: "#515967"
                            },
                            fill: {
                                color: "#515967"
                            }
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: "#515967"
                    }
                },
                connectionDefaults: {
                    stroke: {
                        color: "#515967"
                    },
                    content: {
                        color: "#515967"
                    },
                    selection: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#515967"
                            }
                        }
                    }
                }
            },
            treeMap: {
                colors: [
                    ["#007bc3", "#c2dbea"],
                    ["#76b800", "#dae7c3"],
                    ["#ffae00", "#f5e5c3"],
                    ["#ef4c00", "#f2d2c3"],
                    ["#a419b7", "#e3c7e8"],
                    ["#430b62", "#d0c5d7"]
                ]
            }
        }), v("metro", {
            chart: {
                title: {
                    color: "#777777"
                },
                legend: {
                    labels: {
                        color: "#777777"
                    },
                    inactiveItems: {
                        labels: {
                            color: "#CBCBCB"
                        },
                        markers: {
                            color: "#CBCBCB"
                        }
                    }
                },
                seriesDefaults: {
                    labels: {
                        color: s
                    },
                    errorBars: {
                        color: "#777777"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#777777"
                            }
                        },
                        label: {
                            color: "#777777"
                        },
                        line: {
                            color: "#777777"
                        }
                    },
                    candlestick: {
                        downColor: "#c7c7c7",
                        line: {
                            color: "#787878"
                        }
                    },
                    waterfall: {
                        line: {
                            color: "#c7c7c7"
                        }
                    },
                    horizontalWaterfall: {
                        line: {
                            color: "#c7c7c7"
                        }
                    },
                    overlay: {
                        gradient: "none"
                    },
                    border: {
                        _brightness: 1
                    }
                },
                seriesColors: ["#8ebc00", "#309b46", "#25a0da", "#ff6900", "#e61e26", "#d8e404", "#16aba9", "#7e51a1", "#313131", "#ed1691"],
                axisDefaults: {
                    line: {
                        color: "#c7c7c7"
                    },
                    labels: {
                        color: "#777777"
                    },
                    minorGridLines: {
                        color: "#c7c7c7"
                    },
                    majorGridLines: {
                        color: "#c7c7c7"
                    },
                    title: {
                        color: "#777777"
                    },
                    crosshair: {
                        color: "#c7c7c7"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#777777"
                            }
                        },
                        label: {
                            color: "#777777"
                        },
                        line: {
                            color: "#777777"
                        }
                    }
                }
            },
            gauge: {
                pointer: {
                    color: "#8ebc00"
                },
                scale: {
                    rangePlaceholderColor: "#e6e6e6",
                    labels: {
                        color: "#777"
                    },
                    minorTicks: {
                        color: "#777"
                    },
                    majorTicks: {
                        color: "#777"
                    },
                    line: {
                        color: "#777"
                    }
                }
            },
            diagram: {
                shapeDefaults: {
                    fill: {
                        color: "#8ebc00"
                    },
                    connectorDefaults: {
                        fill: {
                            color: s
                        },
                        stroke: {
                            color: h
                        },
                        hover: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: s
                            }
                        }
                    },
                    content: {
                        color: "#777"
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#787878"
                            },
                            hover: {
                                fill: {
                                    color: "#787878"
                                },
                                stroke: {
                                    color: "#787878"
                                }
                            }
                        }
                    },
                    rotate: {
                        thumb: {
                            stroke: {
                                color: "#787878"
                            },
                            fill: {
                                color: "#787878"
                            }
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: "#515967"
                    }
                },
                connectionDefaults: {
                    stroke: {
                        color: "#787878"
                    },
                    content: {
                        color: "#777"
                    },
                    selection: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#787878"
                            }
                        }
                    }
                }
            },
            treeMap: {
                colors: [
                    ["#8ebc00", "#e8f2cc"],
                    ["#309b46", "#d6ebda"],
                    ["#25a0da", "#d3ecf8"],
                    ["#ff6900", "#ffe1cc"],
                    ["#e61e26", "#fad2d4"],
                    ["#d8e404", "#f7facd"],
                    ["#16aba9", "#d0eeee"],
                    ["#7e51a1", "#e5dcec"],
                    ["#313131", "#d6d6d6"],
                    ["#ed1691", "#fbd0e9"]
                ]
            }
        }), v("metroblack", {
            chart: {
                title: {
                    color: "#ffffff"
                },
                legend: {
                    labels: {
                        color: "#ffffff"
                    },
                    inactiveItems: {
                        labels: {
                            color: "#797979"
                        },
                        markers: {
                            color: "#797979"
                        }
                    }
                },
                seriesDefaults: {
                    border: {
                        _brightness: 1
                    },
                    labels: {
                        color: "#ffffff"
                    },
                    errorBars: {
                        color: "#ffffff"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#cecece"
                            }
                        },
                        label: {
                            color: "#ffffff"
                        },
                        line: {
                            color: "#cecece"
                        }
                    },
                    line: {
                        markers: {
                            background: "#0e0e0e"
                        }
                    },
                    bubble: {
                        opacity: .6
                    },
                    scatter: {
                        markers: {
                            background: "#0e0e0e"
                        }
                    },
                    scatterLine: {
                        markers: {
                            background: "#0e0e0e"
                        }
                    },
                    candlestick: {
                        downColor: "#828282",
                        line: {
                            color: "#ffffff"
                        }
                    },
                    waterfall: {
                        line: {
                            color: "#cecece"
                        }
                    },
                    horizontalWaterfall: {
                        line: {
                            color: "#cecece"
                        }
                    },
                    overlay: {
                        gradient: "none"
                    }
                },
                chartArea: {
                    background: "#0e0e0e"
                },
                seriesColors: ["#00aba9", "#309b46", "#8ebc00", "#ff6900", "#e61e26", "#d8e404", "#25a0da", "#7e51a1", "#313131", "#ed1691"],
                axisDefaults: {
                    line: {
                        color: "#cecece"
                    },
                    labels: {
                        color: "#ffffff"
                    },
                    minorGridLines: {
                        color: "#2d2d2d"
                    },
                    majorGridLines: {
                        color: "#333333"
                    },
                    title: {
                        color: "#ffffff"
                    },
                    crosshair: {
                        color: "#cecece"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#cecece"
                            }
                        },
                        label: {
                            color: "#ffffff"
                        },
                        line: {
                            color: "#cecece"
                        }
                    }
                }
            },
            gauge: {
                pointer: {
                    color: "#00aba9"
                },
                scale: {
                    rangePlaceholderColor: "#2d2d2d",
                    labels: {
                        color: "#ffffff"
                    },
                    minorTicks: {
                        color: "#333333"
                    },
                    majorTicks: {
                        color: "#cecece"
                    },
                    line: {
                        color: "#cecece"
                    }
                }
            },
            diagram: {
                shapeDefaults: {
                    fill: {
                        color: "#00aba9"
                    },
                    connectorDefaults: {
                        fill: {
                            color: h
                        },
                        stroke: {
                            color: "#0e0e0e"
                        },
                        hover: {
                            fill: {
                                color: "#0e0e0e"
                            },
                            stroke: {
                                color: h
                            }
                        }
                    },
                    content: {
                        color: h
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            fill: {
                                color: "#0e0e0e"
                            },
                            stroke: {
                                color: "#787878"
                            },
                            hover: {
                                fill: {
                                    color: "#787878"
                                },
                                stroke: {
                                    color: "#787878"
                                }
                            }
                        }
                    },
                    rotate: {
                        thumb: {
                            stroke: {
                                color: h
                            },
                            fill: {
                                color: h
                            }
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: "#787878"
                    }
                },
                connectionDefaults: {
                    stroke: {
                        color: h
                    },
                    content: {
                        color: h
                    },
                    selection: {
                        handles: {
                            fill: {
                                color: "#0e0e0e"
                            },
                            stroke: {
                                color: h
                            }
                        }
                    }
                }
            },
            treeMap: {
                colors: [
                    ["#00aba9", "#0b2d2d"],
                    ["#309b46", "#152a19"],
                    ["#8ebc00", "#28310b"],
                    ["#ff6900", "#3e200b"],
                    ["#e61e26", "#391113"],
                    ["#d8e404", "#36390c"],
                    ["#25a0da", "#132b37"],
                    ["#7e51a1", "#241b2b"],
                    ["#313131", "#151515"],
                    ["#ed1691", "#3b1028"]
                ]
            }
        }), v("moonlight", {
            chart: {
                title: {
                    color: "#ffffff"
                },
                legend: {
                    labels: {
                        color: "#ffffff"
                    },
                    inactiveItems: {
                        labels: {
                            color: "#A1A7AB"
                        },
                        markers: {
                            color: "#A1A7AB"
                        }
                    }
                },
                seriesDefaults: {
                    labels: {
                        color: "#ffffff"
                    },
                    errorBars: {
                        color: "#ffffff"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#8c909e"
                            }
                        },
                        label: {
                            color: "#ffffff"
                        },
                        line: {
                            color: "#8c909e"
                        }
                    },
                    pie: {
                        overlay: {
                            gradient: "sharpBevel"
                        }
                    },
                    donut: {
                        overlay: {
                            gradient: "sharpGlass"
                        }
                    },
                    line: {
                        markers: {
                            background: "#212a33"
                        }
                    },
                    bubble: {
                        opacity: .6
                    },
                    scatter: {
                        markers: {
                            background: "#212a33"
                        }
                    },
                    scatterLine: {
                        markers: {
                            background: "#212a33"
                        }
                    },
                    area: {
                        opacity: .3
                    },
                    candlestick: {
                        downColor: "#757d87",
                        line: {
                            color: "#ea9d06"
                        },
                        border: {
                            _brightness: 1.5,
                            opacity: 1
                        },
                        highlight: {
                            border: {
                                color: h,
                                opacity: .2
                            }
                        }
                    },
                    waterfall: {
                        line: {
                            color: "#8c909e"
                        }
                    },
                    horizontalWaterfall: {
                        line: {
                            color: "#8c909e"
                        }
                    },
                    ohlc: {
                        line: {
                            color: "#ea9d06"
                        }
                    }
                },
                chartArea: {
                    background: "#212a33"
                },
                seriesColors: ["#ffca08", "#ff710f", "#ed2e24", "#ff9f03", "#e13c02", "#a00201"],
                axisDefaults: {
                    line: {
                        color: "#8c909e"
                    },
                    minorTicks: {
                        color: "#8c909e"
                    },
                    majorTicks: {
                        color: "#8c909e"
                    },
                    labels: {
                        color: "#ffffff"
                    },
                    majorGridLines: {
                        color: "#3e424d"
                    },
                    minorGridLines: {
                        color: "#2f3640"
                    },
                    title: {
                        color: "#ffffff"
                    },
                    crosshair: {
                        color: "#8c909e"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#8c909e"
                            }
                        },
                        label: {
                            color: "#ffffff"
                        },
                        line: {
                            color: "#8c909e"
                        }
                    }
                }
            },
            gauge: {
                pointer: {
                    color: "#f4af03"
                },
                scale: {
                    rangePlaceholderColor: "#2f3640",
                    labels: {
                        color: h
                    },
                    minorTicks: {
                        color: "#8c909e"
                    },
                    majorTicks: {
                        color: "#8c909e"
                    },
                    line: {
                        color: "#8c909e"
                    }
                }
            },
            diagram: {
                shapeDefaults: {
                    fill: {
                        color: "#f3ae03"
                    },
                    connectorDefaults: {
                        fill: {
                            color: h
                        },
                        stroke: {
                            color: "#414550"
                        },
                        hover: {
                            fill: {
                                color: "#414550"
                            },
                            stroke: {
                                color: h
                            }
                        }
                    },
                    content: {
                        color: h
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            fill: {
                                color: "#414550"
                            },
                            stroke: {
                                color: h
                            },
                            hover: {
                                fill: {
                                    color: h
                                },
                                stroke: {
                                    color: h
                                }
                            }
                        }
                    },
                    rotate: {
                        thumb: {
                            stroke: {
                                color: h
                            },
                            fill: {
                                color: h
                            }
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: h
                    }
                },
                connectionDefaults: {
                    stroke: {
                        color: h
                    },
                    content: {
                        color: h
                    },
                    selection: {
                        handles: {
                            fill: {
                                color: "#414550"
                            },
                            stroke: {
                                color: h
                            }
                        }
                    }
                }
            },
            treeMap: {
                colors: [
                    ["#ffca08", "#4e4b2b"],
                    ["#ff710f", "#4e392d"],
                    ["#ed2e24", "#4b2c31"],
                    ["#ff9f03", "#4e422a"],
                    ["#e13c02", "#482e2a"],
                    ["#a00201", "#3b232a"]
                ]
            }
        }), v("uniform", {
            chart: {
                title: {
                    color: "#686868"
                },
                legend: {
                    labels: {
                        color: "#686868"
                    },
                    inactiveItems: {
                        labels: {
                            color: "#B6B6B6"
                        },
                        markers: {
                            color: "#B6B6B6"
                        }
                    }
                },
                seriesDefaults: {
                    labels: {
                        color: "#686868"
                    },
                    errorBars: {
                        color: "#686868"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#9e9e9e"
                            }
                        },
                        label: {
                            color: "#686868"
                        },
                        line: {
                            color: "#9e9e9e"
                        }
                    },
                    pie: {
                        overlay: {
                            gradient: "sharpBevel"
                        }
                    },
                    donut: {
                        overlay: {
                            gradient: "sharpGlass"
                        }
                    },
                    line: {
                        markers: {
                            background: "#ffffff"
                        }
                    },
                    bubble: {
                        opacity: .6
                    },
                    scatter: {
                        markers: {
                            background: "#ffffff"
                        }
                    },
                    scatterLine: {
                        markers: {
                            background: "#ffffff"
                        }
                    },
                    area: {
                        opacity: .3
                    },
                    candlestick: {
                        downColor: "#cccccc",
                        line: {
                            color: "#cccccc"
                        },
                        border: {
                            _brightness: 1.5,
                            opacity: 1
                        },
                        highlight: {
                            border: {
                                color: "#cccccc",
                                opacity: .2
                            }
                        }
                    },
                    waterfall: {
                        line: {
                            color: "#9e9e9e"
                        }
                    },
                    horizontalWaterfall: {
                        line: {
                            color: "#9e9e9e"
                        }
                    },
                    ohlc: {
                        line: {
                            color: "#cccccc"
                        }
                    }
                },
                chartArea: {
                    background: "#ffffff"
                },
                seriesColors: ["#527aa3", "#6f91b3", "#8ca7c2", "#a8bdd1", "#c5d3e0", "#e2e9f0"],
                axisDefaults: {
                    line: {
                        color: "#9e9e9e"
                    },
                    minorTicks: {
                        color: "#aaaaaa"
                    },
                    majorTicks: {
                        color: "#888888"
                    },
                    labels: {
                        color: "#686868"
                    },
                    majorGridLines: {
                        color: "#dadada"
                    },
                    minorGridLines: {
                        color: "#e7e7e7"
                    },
                    title: {
                        color: "#686868"
                    },
                    crosshair: {
                        color: "#9e9e9e"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#9e9e9e"
                            }
                        },
                        label: {
                            color: "#686868"
                        },
                        line: {
                            color: "#9e9e9e"
                        }
                    }
                }
            },
            gauge: {
                pointer: {
                    color: "#527aa3"
                },
                scale: {
                    rangePlaceholderColor: "#e7e7e7",
                    labels: {
                        color: "#686868"
                    },
                    minorTicks: {
                        color: "#aaaaaa"
                    },
                    majorTicks: {
                        color: "#888888"
                    },
                    line: {
                        color: "#9e9e9e"
                    }
                }
            },
            diagram: {
                shapeDefaults: {
                    fill: {
                        color: "#d1d1d1"
                    },
                    connectorDefaults: {
                        fill: {
                            color: "#686868"
                        },
                        stroke: {
                            color: h
                        },
                        hover: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#686868"
                            }
                        }
                    },
                    content: {
                        color: "#686868"
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#686868"
                            },
                            hover: {
                                fill: {
                                    color: "#686868"
                                },
                                stroke: {
                                    color: "#686868"
                                }
                            }
                        }
                    },
                    rotate: {
                        thumb: {
                            stroke: {
                                color: "#686868"
                            },
                            fill: {
                                color: "#686868"
                            }
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: "#686868"
                    }
                },
                connectionDefaults: {
                    stroke: {
                        color: "#686868"
                    },
                    content: {
                        color: "#686868"
                    },
                    selection: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#686868"
                            }
                        }
                    }
                }
            },
            treeMap: {
                colors: [
                    ["#527aa3", "#d0d8e1"],
                    ["#6f91b3", "#d6dde4"],
                    ["#8ca7c2", "#dce1e7"],
                    ["#a8bdd1", "#e2e6ea"],
                    ["#c5d3e0", "#e7eaed"],
                    ["#e2e9f0", "#edeff0"]
                ]
            }
        }), v("bootstrap", {
            chart: {
                title: {
                    color: "#333333"
                },
                legend: {
                    labels: {
                        color: "#333333"
                    },
                    inactiveItems: {
                        labels: {
                            color: "#999999"
                        },
                        markers: {
                            color: "#9A9A9A"
                        }
                    }
                },
                seriesDefaults: {
                    labels: {
                        color: "#333333"
                    },
                    overlay: {
                        gradient: "none"
                    },
                    errorBars: {
                        color: "#343434"
                    },
                    notes: {
                        icon: {
                            background: "#000000",
                            border: {
                                color: "#000000"
                            }
                        },
                        label: {
                            color: "#333333"
                        },
                        line: {
                            color: "#000000"
                        }
                    },
                    pie: {
                        overlay: {
                            gradient: "none"
                        }
                    },
                    donut: {
                        overlay: {
                            gradient: "none"
                        }
                    },
                    line: {
                        markers: {
                            background: "#ffffff"
                        }
                    },
                    bubble: {
                        opacity: .6
                    },
                    scatter: {
                        markers: {
                            background: "#ffffff"
                        }
                    },
                    scatterLine: {
                        markers: {
                            background: "#ffffff"
                        }
                    },
                    area: {
                        opacity: .8
                    },
                    candlestick: {
                        downColor: "#d0d0d0",
                        line: {
                            color: "#333333"
                        },
                        border: {
                            _brightness: 1.5,
                            opacity: 1
                        },
                        highlight: {
                            border: {
                                color: "#b8b8b8",
                                opacity: .2
                            }
                        }
                    },
                    waterfall: {
                        line: {
                            color: "#cccccc"
                        }
                    },
                    horizontalWaterfall: {
                        line: {
                            color: "#cccccc"
                        }
                    },
                    ohlc: {
                        line: {
                            color: "#333333"
                        }
                    }
                },
                chartArea: {
                    background: "#ffffff"
                },
                seriesColors: ["#428bca", "#5bc0de", "#5cb85c", "#f2b661", "#e67d4a", "#da3b36"],
                axisDefaults: {
                    line: {
                        color: "#cccccc"
                    },
                    minorTicks: {
                        color: "#ebebeb"
                    },
                    majorTicks: {
                        color: "#cccccc"
                    },
                    labels: {
                        color: "#333333"
                    },
                    majorGridLines: {
                        color: "#cccccc"
                    },
                    minorGridLines: {
                        color: "#ebebeb"
                    },
                    title: {
                        color: "#333333"
                    },
                    crosshair: {
                        color: "#000000"
                    },
                    notes: {
                        icon: {
                            background: "#000000",
                            border: {
                                color: "#000000"
                            }
                        },
                        label: {
                            color: "#ffffff"
                        },
                        line: {
                            color: "#000000"
                        }
                    }
                }
            },
            gauge: {
                pointer: {
                    color: "#428bca"
                },
                scale: {
                    rangePlaceholderColor: "#cccccc",
                    labels: {
                        color: "#333333"
                    },
                    minorTicks: {
                        color: "#ebebeb"
                    },
                    majorTicks: {
                        color: "#cccccc"
                    },
                    line: {
                        color: "#cccccc"
                    }
                }
            },
            diagram: {
                shapeDefaults: {
                    fill: {
                        color: "#428bca"
                    },
                    connectorDefaults: {
                        fill: {
                            color: "#333333"
                        },
                        stroke: {
                            color: h
                        },
                        hover: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#333333"
                            }
                        }
                    },
                    content: {
                        color: "#333333"
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#333333"
                            },
                            hover: {
                                fill: {
                                    color: "#333333"
                                },
                                stroke: {
                                    color: "#333333"
                                }
                            }
                        }
                    },
                    rotate: {
                        thumb: {
                            stroke: {
                                color: "#333333"
                            },
                            fill: {
                                color: "#333333"
                            }
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: "#333333"
                    }
                },
                connectionDefaults: {
                    stroke: {
                        color: "#c4c4c4"
                    },
                    content: {
                        color: "#333333"
                    },
                    selection: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#333333"
                            }
                        },
                        stroke: {
                            color: "#333333"
                        }
                    }
                }
            },
            treeMap: {
                colors: [
                    ["#428bca", "#d1e0ec"],
                    ["#5bc0de", "#d6eaf0"],
                    ["#5cb85c", "#d6e9d6"],
                    ["#5cb85c", "#f4e8d7"],
                    ["#e67d4a", "#f2ddd3"],
                    ["#da3b36", "#f0d0cf"]
                ]
            }
        }), v("flat", {
            chart: {
                title: {
                    color: "#4c5356"
                },
                legend: {
                    labels: {
                        color: "#4c5356"
                    },
                    inactiveItems: {
                        labels: {
                            color: "#CBCBCB"
                        },
                        markers: {
                            color: "#CBCBCB"
                        }
                    }
                },
                seriesDefaults: {
                    labels: {
                        color: "#4c5356"
                    },
                    errorBars: {
                        color: "#4c5356"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#cdcdcd"
                            }
                        },
                        label: {
                            color: "#4c5356"
                        },
                        line: {
                            color: "#cdcdcd"
                        }
                    },
                    candlestick: {
                        downColor: "#c7c7c7",
                        line: {
                            color: "#787878"
                        }
                    },
                    area: {
                        opacity: .9
                    },
                    waterfall: {
                        line: {
                            color: "#cdcdcd"
                        }
                    },
                    horizontalWaterfall: {
                        line: {
                            color: "#cdcdcd"
                        }
                    },
                    overlay: {
                        gradient: "none"
                    },
                    border: {
                        _brightness: 1
                    }
                },
                seriesColors: ["#10c4b2", "#ff7663", "#ffb74f", "#a2df53", "#1c9ec4", "#ff63a5", "#1cc47b"],
                axisDefaults: {
                    line: {
                        color: "#cdcdcd"
                    },
                    labels: {
                        color: "#4c5356"
                    },
                    minorGridLines: {
                        color: "#cdcdcd"
                    },
                    majorGridLines: {
                        color: "#cdcdcd"
                    },
                    title: {
                        color: "#4c5356"
                    },
                    crosshair: {
                        color: "#cdcdcd"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#cdcdcd"
                            }
                        },
                        label: {
                            color: "#4c5356"
                        },
                        line: {
                            color: "#cdcdcd"
                        }
                    }
                }
            },
            gauge: {
                pointer: {
                    color: "#10c4b2"
                },
                scale: {
                    rangePlaceholderColor: "#cdcdcd",
                    labels: {
                        color: "#4c5356"
                    },
                    minorTicks: {
                        color: "#4c5356"
                    },
                    majorTicks: {
                        color: "#4c5356"
                    },
                    line: {
                        color: "#4c5356"
                    }
                }
            },
            diagram: {
                shapeDefaults: {
                    fill: {
                        color: "#10c4b2"
                    },
                    connectorDefaults: {
                        fill: {
                            color: "#363940"
                        },
                        stroke: {
                            color: h
                        },
                        hover: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#363940"
                            }
                        }
                    },
                    content: {
                        color: "#4c5356"
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#363940"
                            },
                            hover: {
                                fill: {
                                    color: "#363940"
                                },
                                stroke: {
                                    color: "#363940"
                                }
                            }
                        }
                    },
                    rotate: {
                        thumb: {
                            stroke: {
                                color: "#363940"
                            },
                            fill: {
                                color: "#363940"
                            }
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: "#363940"
                    }
                },
                connectionDefaults: {
                    stroke: {
                        color: "#cdcdcd"
                    },
                    content: {
                        color: "#4c5356"
                    },
                    selection: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#363940"
                            }
                        },
                        stroke: {
                            color: "#363940"
                        }
                    }
                }
            },
            treeMap: {
                colors: [
                    ["#10c4b2", "#cff3f0"],
                    ["#ff7663", "#ffe4e0"],
                    ["#ffb74f", "#fff1dc"],
                    ["#a2df53", "#ecf9dd"],
                    ["#1c9ec4", "#d2ecf3"],
                    ["#ff63a5", "#ffe0ed"],
                    ["#1cc47b", "#d2f3e5"]
                ]
            }
        }), v("material", {
            chart: {
                title: {
                    color: "#444444"
                },
                legend: {
                    labels: {
                        color: "#444444"
                    },
                    inactiveItems: {
                        labels: {
                            color: "#CBCBCB"
                        },
                        markers: {
                            color: "#CBCBCB"
                        }
                    }
                },
                seriesDefaults: {
                    labels: {
                        color: "#444444"
                    },
                    errorBars: {
                        color: "#444444"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#e5e5e5"
                            }
                        },
                        label: {
                            color: "#444444"
                        },
                        line: {
                            color: "#e5e5e5"
                        }
                    },
                    candlestick: {
                        downColor: "#c7c7c7",
                        line: {
                            color: "#787878"
                        }
                    },
                    area: {
                        opacity: .9
                    },
                    waterfall: {
                        line: {
                            color: "#e5e5e5"
                        }
                    },
                    horizontalWaterfall: {
                        line: {
                            color: "#e5e5e5"
                        }
                    },
                    overlay: {
                        gradient: "none"
                    },
                    border: {
                        _brightness: 1
                    }
                },
                seriesColors: ["#3f51b5", "#03a9f4", "#4caf50", "#f9ce1d", "#ff9800", "#ff5722"],
                axisDefaults: {
                    line: {
                        color: "#e5e5e5"
                    },
                    labels: {
                        color: "#444444"
                    },
                    minorGridLines: {
                        color: "#e5e5e5"
                    },
                    majorGridLines: {
                        color: "#e5e5e5"
                    },
                    title: {
                        color: "#444444"
                    },
                    crosshair: {
                        color: "#7f7f7f"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#e5e5e5"
                            }
                        },
                        label: {
                            color: "#444444"
                        },
                        line: {
                            color: "#e5e5e5"
                        }
                    }
                }
            },
            gauge: {
                pointer: {
                    color: "#3f51b5"
                },
                scale: {
                    rangePlaceholderColor: "#e5e5e5",
                    labels: {
                        color: "#444444"
                    },
                    minorTicks: {
                        color: "#444444"
                    },
                    majorTicks: {
                        color: "#444444"
                    },
                    line: {
                        color: "#444444"
                    }
                }
            },
            diagram: {
                shapeDefaults: {
                    fill: {
                        color: "#3f51b5"
                    },
                    connectorDefaults: {
                        fill: {
                            color: "#7f7f7f"
                        },
                        stroke: {
                            color: h
                        },
                        hover: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#7f7f7f"
                            }
                        }
                    },
                    content: {
                        color: "#444444"
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#444444"
                            },
                            hover: {
                                fill: {
                                    color: "#444444"
                                },
                                stroke: {
                                    color: "#444444"
                                }
                            }
                        }
                    },
                    rotate: {
                        thumb: {
                            stroke: {
                                color: "#444444"
                            },
                            fill: {
                                color: "#444444"
                            }
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: "#444444"
                    }
                },
                connectionDefaults: {
                    stroke: {
                        color: "#7f7f7f"
                    },
                    content: {
                        color: "#444444"
                    },
                    selection: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#444444"
                            }
                        },
                        stroke: {
                            color: "#444444"
                        }
                    }
                }
            },
            treeMap: {
                colors: [
                    ["#3f51b5", "#cff3f0"],
                    ["#03a9f4", "#e5f6fe"],
                    ["#4caf50", "#edf7ed"],
                    ["#f9ce1d", "#fefae8"],
                    ["#ff9800", "#fff4e5"],
                    ["#ff5722", "#ffeee8"]
                ]
            }
        }), v("materialblack", {
            chart: {
                title: {
                    color: "#fff"
                },
                legend: {
                    labels: {
                        color: "#fff"
                    },
                    inactiveItems: {
                        labels: {
                            color: "#CBCBCB"
                        },
                        markers: {
                            color: "#CBCBCB"
                        }
                    }
                },
                seriesDefaults: {
                    labels: {
                        color: "#fff"
                    },
                    errorBars: {
                        color: "#fff"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#e5e5e5"
                            }
                        },
                        label: {
                            color: "#fff"
                        },
                        line: {
                            color: "#e5e5e5"
                        }
                    },
                    candlestick: {
                        downColor: "#c7c7c7",
                        line: {
                            color: "#787878"
                        }
                    },
                    area: {
                        opacity: .9
                    },
                    waterfall: {
                        line: {
                            color: "#4d4d4d"
                        }
                    },
                    horizontalWaterfall: {
                        line: {
                            color: "#4d4d4d"
                        }
                    },
                    overlay: {
                        gradient: "none"
                    },
                    border: {
                        _brightness: 1
                    }
                },
                chartArea: {
                    background: "#1c1c1c"
                },
                seriesColors: ["#3f51b5", "#03a9f4", "#4caf50", "#f9ce1d", "#ff9800", "#ff5722"],
                axisDefaults: {
                    line: {
                        color: "#4d4d4d"
                    },
                    labels: {
                        color: "#fff"
                    },
                    minorGridLines: {
                        color: "#4d4d4d"
                    },
                    majorGridLines: {
                        color: "#4d4d4d"
                    },
                    title: {
                        color: "#fff"
                    },
                    crosshair: {
                        color: "#7f7f7f"
                    },
                    notes: {
                        icon: {
                            background: "transparent",
                            border: {
                                color: "#4d4d4d"
                            }
                        },
                        label: {
                            color: "#fff"
                        },
                        line: {
                            color: "#4d4d4d"
                        }
                    }
                }
            },
            gauge: {
                pointer: {
                    color: "#3f51b5"
                },
                scale: {
                    rangePlaceholderColor: "#4d4d4d",
                    labels: {
                        color: "#fff"
                    },
                    minorTicks: {
                        color: "#fff"
                    },
                    majorTicks: {
                        color: "#fff"
                    },
                    line: {
                        color: "#fff"
                    }
                }
            },
            diagram: {
                shapeDefaults: {
                    fill: {
                        color: "#3f51b5"
                    },
                    connectorDefaults: {
                        fill: {
                            color: "#7f7f7f"
                        },
                        stroke: {
                            color: h
                        },
                        hover: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#7f7f7f"
                            }
                        }
                    },
                    content: {
                        color: "#fff"
                    }
                },
                editable: {
                    resize: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#fff"
                            },
                            hover: {
                                fill: {
                                    color: "#fff"
                                },
                                stroke: {
                                    color: "#fff"
                                }
                            }
                        }
                    },
                    rotate: {
                        thumb: {
                            stroke: {
                                color: "#fff"
                            },
                            fill: {
                                color: "#fff"
                            }
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: "#fff"
                    }
                },
                connectionDefaults: {
                    stroke: {
                        color: "#7f7f7f"
                    },
                    content: {
                        color: "#fff"
                    },
                    selection: {
                        handles: {
                            fill: {
                                color: h
                            },
                            stroke: {
                                color: "#fff"
                            }
                        },
                        stroke: {
                            color: "#fff"
                        }
                    }
                }
            },
            treeMap: {
                colors: [
                    ["#3f51b5", "#cff3f0"],
                    ["#03a9f4", "#e5f6fe"],
                    ["#4caf50", "#edf7ed"],
                    ["#f9ce1d", "#fefae8"],
                    ["#ff9800", "#fff4e5"],
                    ["#ff5722", "#ffeee8"]
                ]
            }
        }),
            function() {
                function e() {
                    return {
                        icon: {
                            background: "#007cc0",
                            border: {
                                color: "#007cc0"
                            }
                        },
                        label: {
                            color: "#ffffff"
                        },
                        line: {
                            color: o
                        }
                    }
                }
                var n = "#333333",
                    i = "#7f7f7f",
                    r = "#bdbdbd",
                    o = "#c8c8c8",
                    a = "#dddddd",
                    s = ["#008fd3", "#99d101", "#f39b02", "#f05662", "#c03c53", "#acacac"],
                    l = ["#cbe8f5", "#eaf5cb", "#fceacc", "#fbdcdf", "#f2d7dc", "#eeeeee"],
                    c = s[0],
                    d = h;
                v("fiori", {
                    chart: {
                        title: {
                            color: n
                        },
                        legend: {
                            labels: {
                                color: n
                            },
                            inactiveItems: {
                                labels: {
                                    color: i
                                },
                                markers: {
                                    color: i
                                }
                            }
                        },
                        seriesDefaults: {
                            labels: {
                                color: n
                            },
                            errorBars: {
                                color: n
                            },
                            notes: e(),
                            candlestick: {
                                downColor: o,
                                line: {
                                    color: r
                                }
                            },
                            area: {
                                opacity: .8
                            },
                            waterfall: {
                                line: {
                                    color: o
                                }
                            },
                            horizontalWaterfall: {
                                line: {
                                    color: o
                                }
                            },
                            overlay: {
                                gradient: "none"
                            },
                            border: {
                                _brightness: 1
                            }
                        },
                        seriesColors: s,
                        axisDefaults: {
                            line: {
                                color: o
                            },
                            labels: {
                                color: n
                            },
                            minorGridLines: {
                                color: a
                            },
                            majorGridLines: {
                                color: o
                            },
                            title: {
                                color: n
                            },
                            crosshair: {
                                color: i
                            },
                            notes: e()
                        }
                    },
                    gauge: {
                        pointer: {
                            color: c
                        },
                        scale: {
                            rangePlaceholderColor: o,
                            labels: {
                                color: n
                            },
                            minorTicks: {
                                color: n
                            },
                            majorTicks: {
                                color: n
                            },
                            line: {
                                color: n
                            }
                        }
                    },
                    diagram: {
                        shapeDefaults: {
                            fill: {
                                color: c
                            },
                            connectorDefaults: {
                                fill: {
                                    color: n
                                },
                                stroke: {
                                    color: d
                                },
                                hover: {
                                    fill: {
                                        color: d
                                    },
                                    stroke: {
                                        color: n
                                    }
                                }
                            },
                            content: {
                                color: n
                            }
                        },
                        editable: {
                            resize: {
                                handles: {
                                    fill: {
                                        color: d
                                    },
                                    stroke: {
                                        color: r
                                    },
                                    hover: {
                                        fill: {
                                            color: r
                                        },
                                        stroke: {
                                            color: r
                                        }
                                    }
                                }
                            },
                            rotate: {
                                thumb: {
                                    stroke: {
                                        color: r
                                    },
                                    fill: {
                                        color: r
                                    }
                                }
                            }
                        },
                        selectable: {
                            stroke: {
                                color: r
                            }
                        },
                        connectionDefaults: {
                            stroke: {
                                color: r
                            },
                            content: {
                                color: r
                            },
                            selection: {
                                handles: {
                                    fill: {
                                        color: d
                                    },
                                    stroke: {
                                        color: r
                                    }
                                },
                                stroke: {
                                    color: r
                                }
                            }
                        }
                    },
                    treeMap: {
                        colors: t(s, l)
                    }
                })
            }(),
            function() {
                function e() {
                    return {
                        icon: {
                            background: "#00b0ff",
                            border: {
                                color: "#00b0ff"
                            }
                        },
                        label: {
                            color: "#ffffff"
                        },
                        line: {
                            color: o
                        }
                    }
                }
                var n = "#4e4e4e",
                    i = "#7f7f7f",
                    r = "#bdbdbd",
                    o = "#c8c8c8",
                    a = "#e5e5e5",
                    s = ["#0072c6", "#5db2ff", "#008a17", "#82ba00", "#ff8f32", "#ac193d"],
                    l = ["#cbe2f3", "#deeffe", "#cbe7d0", "#e5f0cb", "#fee8d5", "#eed0d7"],
                    c = s[0],
                    d = h;
                v("office365", {
                    chart: {
                        title: {
                            color: n
                        },
                        legend: {
                            labels: {
                                color: n
                            },
                            inactiveItems: {
                                labels: {
                                    color: i
                                },
                                markers: {
                                    color: i
                                }
                            }
                        },
                        seriesDefaults: {
                            labels: {
                                color: n
                            },
                            errorBars: {
                                color: n
                            },
                            notes: e(),
                            candlestick: {
                                downColor: o,
                                line: {
                                    color: r
                                }
                            },
                            area: {
                                opacity: .8
                            },
                            waterfall: {
                                line: {
                                    color: o
                                }
                            },
                            horizontalWaterfall: {
                                line: {
                                    color: o
                                }
                            },
                            overlay: {
                                gradient: "none"
                            },
                            border: {
                                _brightness: 1
                            }
                        },
                        seriesColors: s,
                        axisDefaults: {
                            line: {
                                color: o
                            },
                            labels: {
                                color: n
                            },
                            minorGridLines: {
                                color: a
                            },
                            majorGridLines: {
                                color: o
                            },
                            title: {
                                color: n
                            },
                            crosshair: {
                                color: i
                            },
                            notes: e()
                        }
                    },
                    gauge: {
                        pointer: {
                            color: c
                        },
                        scale: {
                            rangePlaceholderColor: o,
                            labels: {
                                color: n
                            },
                            minorTicks: {
                                color: n
                            },
                            majorTicks: {
                                color: n
                            },
                            line: {
                                color: n
                            }
                        }
                    },
                    diagram: {
                        shapeDefaults: {
                            fill: {
                                color: c
                            },
                            connectorDefaults: {
                                fill: {
                                    color: n
                                },
                                stroke: {
                                    color: d
                                },
                                hover: {
                                    fill: {
                                        color: d
                                    },
                                    stroke: {
                                        color: n
                                    }
                                }
                            },
                            content: {
                                color: n
                            }
                        },
                        editable: {
                            resize: {
                                handles: {
                                    fill: {
                                        color: d
                                    },
                                    stroke: {
                                        color: r
                                    },
                                    hover: {
                                        fill: {
                                            color: r
                                        },
                                        stroke: {
                                            color: r
                                        }
                                    }
                                }
                            },
                            rotate: {
                                thumb: {
                                    stroke: {
                                        color: r
                                    },
                                    fill: {
                                        color: r
                                    }
                                }
                            }
                        },
                        selectable: {
                            stroke: {
                                color: r
                            }
                        },
                        connectionDefaults: {
                            stroke: {
                                color: r
                            },
                            content: {
                                color: r
                            },
                            selection: {
                                handles: {
                                    fill: {
                                        color: d
                                    },
                                    stroke: {
                                        color: r
                                    }
                                },
                                stroke: {
                                    color: r
                                }
                            }
                        }
                    },
                    treeMap: {
                        colors: t(s, l)
                    }
                })
            }(),
            function() {
                function e() {
                    return {
                        icon: {
                            background: "#007cc0",
                            border: {
                                color: "#007cc0"
                            }
                        },
                        label: {
                            color: "#ffffff"
                        },
                        line: {
                            color: o
                        }
                    }
                }
                var n = "#32364c",
                    i = "#7f7f7f",
                    r = "#bdbdbd",
                    o = "#dfe0e1",
                    a = "#dfe0e1",
                    s = ["#ff4350", "#ff9ea5", "#00acc1", "#80deea", "#ffbf46", "#ffd78c"],
                    l = ["#ffd9dc", "#ffeced", "#cceef3", "#e6f8fb", "#fff2da", "#fff7e8"],
                    c = s[0],
                    d = h;
                v("nova", {
                    chart: {
                        title: {
                            color: n
                        },
                        legend: {
                            labels: {
                                color: n
                            },
                            inactiveItems: {
                                labels: {
                                    color: i
                                },
                                markers: {
                                    color: i
                                }
                            }
                        },
                        seriesDefaults: {
                            labels: {
                                color: n
                            },
                            errorBars: {
                                color: n
                            },
                            notes: e(),
                            candlestick: {
                                downColor: o,
                                line: {
                                    color: r
                                }
                            },
                            area: {
                                opacity: .8
                            },
                            waterfall: {
                                line: {
                                    color: o
                                }
                            },
                            horizontalWaterfall: {
                                line: {
                                    color: o
                                }
                            },
                            overlay: {
                                gradient: "none"
                            },
                            border: {
                                _brightness: 1
                            }
                        },
                        seriesColors: s,
                        axisDefaults: {
                            line: {
                                color: o
                            },
                            labels: {
                                color: n
                            },
                            minorGridLines: {
                                color: a
                            },
                            majorGridLines: {
                                color: o
                            },
                            title: {
                                color: n
                            },
                            crosshair: {
                                color: n
                            },
                            notes: e()
                        }
                    },
                    gauge: {
                        pointer: {
                            color: c
                        },
                        scale: {
                            rangePlaceholderColor: o,
                            labels: {
                                color: n
                            },
                            minorTicks: {
                                color: n
                            },
                            majorTicks: {
                                color: n
                            },
                            line: {
                                color: n
                            }
                        }
                    },
                    diagram: {
                        shapeDefaults: {
                            fill: {
                                color: c
                            },
                            connectorDefaults: {
                                fill: {
                                    color: n
                                },
                                stroke: {
                                    color: d
                                },
                                hover: {
                                    fill: {
                                        color: d
                                    },
                                    stroke: {
                                        color: n
                                    }
                                }
                            },
                            content: {
                                color: n
                            }
                        },
                        editable: {
                            resize: {
                                handles: {
                                    fill: {
                                        color: d
                                    },
                                    stroke: {
                                        color: r
                                    },
                                    hover: {
                                        fill: {
                                            color: r
                                        },
                                        stroke: {
                                            color: r
                                        }
                                    }
                                }
                            },
                            rotate: {
                                thumb: {
                                    stroke: {
                                        color: r
                                    },
                                    fill: {
                                        color: r
                                    }
                                }
                            }
                        },
                        selectable: {
                            stroke: {
                                color: r
                            }
                        },
                        connectionDefaults: {
                            stroke: {
                                color: r
                            },
                            content: {
                                color: r
                            },
                            selection: {
                                handles: {
                                    fill: {
                                        color: d
                                    },
                                    stroke: {
                                        color: r
                                    }
                                },
                                stroke: {
                                    color: r
                                }
                            }
                        }
                    },
                    treeMap: {
                        colors: t(s, l)
                    }
                })
            }()
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.chart.min", ["kendo.color.min", "kendo.data.min", "kendo.dataviz.core.min", "kendo.dataviz.themes.min", "kendo.drawing.min", "kendo.userevents.min"], e)
}(function() {
    return function(e, t) {
        function n() {
            return this
        }

        function i() {
            this._defaults = {}
        }

        function r(e, t, n, i) {
            var r, o, a = (i.x - n.x) * (e.y - n.y) - (i.y - n.y) * (e.x - n.x),
                s = (i.y - n.y) * (t.x - e.x) - (i.x - n.x) * (t.y - e.y);
            return 0 !== s && (o = a / s, r = new nn(e.x + o * (t.x - e.x), e.y + o * (t.y - e.y))), r
        }

        function o(e, t) {
            var n, i, r, o = e.series,
                s = o.length,
                l = e.seriesDefaults,
                c = Ot({}, e.seriesDefaults),
                d = t ? Ot({}, t.seriesDefaults) : {},
                u = Ot({}, d);
            for (a(c), a(u), n = 0; s > n; n++) i = o[n].type || e.seriesDefaults.type, r = Ot({
                data: []
            }, u, d[i], {
                tooltip: e.tooltip
            }, c, l[i]), o[n]._defaults = r, o[n] = Ot({}, r, o[n])
        }

        function a(e) {
            delete e.bar, delete e.column, delete e.rangeColumn, delete e.line, delete e.verticalLine, delete e.pie, delete e.donut, delete e.area, delete e.verticalArea, delete e.scatter, delete e.scatterLine, delete e.bubble, delete e.candlestick, delete e.ohlc, delete e.boxPlot, delete e.bullet, delete e.verticalBullet, delete e.polarArea, delete e.polarLine, delete e.radarArea, delete e.radarLine, delete e.waterfall
        }

        function s(e) {
            var t, n, i, r, o = e.series,
                a = e.seriesColors || [];
            for (t = 0; o.length > t; t++) n = o[t], i = a[t % a.length], n.color = n.color || i, r = n._defaults, r && (r.color = r.color || i)
        }

        function l(e) {
            var t;
            Dt([$n, Xr, ro, oo], function() {
                t = this + "Axes", e[t] && (e[this + "Axis"] = e[t], delete e[t])
            })
        }

        function c(t, n) {
            var i = (n || {}).axisDefaults || {};
            Dt([$n, Xr, ro, oo], function() {
                var n = this + "Axis",
                    r = [].concat(t[n]),
                    o = t.axisDefaults || {};
                r = e.map(r, function(e) {
                    var t = (e || {}).color,
                        r = Ot({}, i, i[n], o, o[n], {
                            line: {
                                color: t
                            },
                            labels: {
                                color: t
                            },
                            title: {
                                color: t
                            }
                        }, e);
                    return delete r[n], r
                }), t[n] = r.length > 1 ? r : r[0]
            })
        }

        function d(e) {
            var t, n = e.length,
                i = 0;
            for (t = 0; n > t; t++) i = It.max(i, e[t].data.length);
            return i
        }

        function u(e) {
            return e * e
        }

        function h(e, t) {
            if (null === t) return t;
            var n = Vt(e, !0);
            return n(t)
        }

        function f(e, t) {
            if (null === t) return t;
            var n = "_date_" + e,
                i = t[n];
            return i || (i = p(Vt(e, !0)(t)), t[n] = i), i
        }

        function p(e) {
            var t, n;
            if (e instanceof Date) t = e;
            else if (typeof e === Pr) t = zt.parseDate(e) || new Date(e);
            else if (e)
                if (At(e))
                    for (t = [], n = 0; e.length > n; n++) t.push(p(e[n]));
                else t = new Date(e);
            return t
        }

        function m(e) {
            return At(e) ? Ft(e, m) : e ? p(e).getTime() : t
        }

        function g(e, t, n, i) {
            var r, o = e;
            return e && (e = p(e), r = e.getHours(), n === ao ? (o = new Date(e.getFullYear() + t, 0, 1), zt.date.adjustDST(o, 0)) : n === Qi ? (o = new Date(e.getFullYear(), e.getMonth() + t, 1), zt.date.adjustDST(o, r)) : n === no ? (o = g(v(e, i), 7 * t, si), zt.date.adjustDST(o, r)) : n === si ? (o = new Date(e.getFullYear(), e.getMonth(), e.getDate() + t), zt.date.adjustDST(o, r)) : n === Ii ? o = k(new Date(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours()), t * Hr) : n === Ki ? (o = k(e, t * Lr), o.getSeconds() > 0 && o.setSeconds(0)) : n === xr && (o = k(e, t * Br)), o.getMilliseconds() > 0 && o.setMilliseconds(0)), o
        }

        function v(e, t) {
            var n = e.getDay(),
                i = 0;
            if (!isNaN(n))
                for (t = t || 0; n !== t;) 0 === n ? n = 6 : n--, i++;
            return k(e, -i * Nr)
        }

        function _(e, t, n) {
            return e = p(e), g(e, 0, t, n)
        }

        function b(e, t, n) {
            return e = p(e), e && _(e, t, n).getTime() === e.getTime() ? e : g(e, 1, t, n)
        }

        function w(e, t) {
            var n = e.getTime() - t,
                i = e.getTimezoneOffset() - t.getTimezoneOffset();
            return n - (i * n > 0 ? i * Lr : 0)
        }

        function y(e, t) {
            var n = e.getTime() - t,
                i = e.getTimezoneOffset() - t.getTimezoneOffset();
            return n - i * Lr
        }

        function k(e, t) {
            var n = e.getTimezoneOffset(),
                i = new Date(e.getTime() + t),
                r = i.getTimezoneOffset() - n;
            return new Date(i.getTime() + (t * r > 0 ? r * Lr : 0))
        }

        function x(e, t, n) {
            var i;
            return i = n === ao ? t.getFullYear() - e.getFullYear() : n === Qi ? 12 * x(e, t, ao) + t.getMonth() - e.getMonth() : It.floor(n === si ? w(t, e) / Nr : w(t, e) / Wr[n])
        }

        function C(e, t, n, i) {
            var r, o = p(e),
                a = p(t);
            return r = n == Qi ? o.getMonth() - a.getMonth() + 12 * (o.getFullYear() - a.getFullYear()) + S(o, new Date(o.getFullYear(), o.getMonth()), si) / new Date(o.getFullYear(), o.getMonth() + 1, 0).getDate() : n == ao ? o.getFullYear() - a.getFullYear() + C(o, new Date(o.getFullYear(), 0), Qi, 1) / 12 : n == si || n == no ? S(o, a, n) : w(o, t) / Wr[n], r / i
        }

        function S(e, t, n) {
            return y(e, t) / Wr[n]
        }

        function T(e) {
            return 1 === e.length ? e[0] : e
        }

        function D(e) {
            var t, n, i, r = e.length;
            if (r > 0)
                for (n = 0; r > n; n++) i = e[n].contentBox(), t ? t.wrap(i) : t = i.clone();
            return t || $t()
        }

        function A(e, t) {
            return e && t ? e.toLowerCase() === t.toLowerCase() : e === t
        }

        function E(e, t) {
            return e && t ? m(e) === m(t) : e === t
        }

        function F(e, t) {
            null !== t && e.push(t)
        }

        function I(e, t) {
            for (var n, i, r = 0, o = t.length - 1; o >= r;)
                if (n = It.floor((r + o) / 2), i = t[n], e > i) r = n + 1;
                else {
                    if (!(i > e)) {
                        for (; E(t[n - 1], e);) n--;
                        return n
                    }
                    o = n - 1
                } return e >= t[n] ? n : n - 1
        }

        function M(e) {
            return "number" == typeof e && !isNaN(e)
        }

        function R(e) {
            var t, n, i = e.length,
                r = 0;
            for (t = 0; i > t; t++) n = e[t], M(n) && r++;
            return r
        }

        function P(e) {
            return R(e) === e.length
        }

        function z(e) {
            var t, n, i, r = {};
            for (t = 0; e.length > t; t++) n = e[t], i = n.options.name, i && (r[i] = n.range());
            return r
        }

        function B(e, t, n, i) {
            var r, o, a, s, l, c = !1;
            if (n = n || {}, a = n.excluded = n.excluded || [], s = n.defaults = n.defaults || {}, l = n.depth = n.depth || 0, !(l > qi)) {
                for (r in e) !pn(r, n.excluded) && e.hasOwnProperty(r) && (o = e[r], Ut(o) ? (c = !0, i || (e[r] = Dn(o(t), s[r]))) : typeof o === lr && (i || (n.defaults = s[r]), n.depth++, c = B(o, t, n, i) || c, n.depth--));
                return c
            }
        }

        function L(e, n) {
            var i, r, o, a = [],
                s = e.groupNameTemplate,
                l = n.length;
            if (0 === l) return o = Ot({}, e), o.visibleInLegend = !1, [o];
            for (wn(s) ? (zt.logToConsole("'groupNameTemplate' is obsolete and will be removed in future versions. Specify the group name template as 'series.name'"), s && (i = Wt(s))) : (i = Wt(e.name || ""), 0 === i._slotCount && (i = Wt(wn(e.name) ? "#= group.value #: #= series.name #" : "#= group.value #"))), r = 0; l > r; r++) o = Ot({}, e), Ut(o.color) || (o.color = t), o._groupIx = r, a.push(o), i && (o.name = i({
                series: o,
                group: n[r]
            }));
            return a
        }

        function H(e, t) {
            var n, i, r = [];
            for (t = [].concat(t), n = 0; e.length > n; n++) i = e[n], pn(i.type, t) && r.push(i);
            return r
        }

        function N(t, n) {
            if (t instanceof Date) {
                for (var i = 0, r = n.length; r > i; i++)
                    if (E(n[i], t)) return i;
                return -1
            }
            return e.inArray(t, n)
        }

        function O(e, t) {
            t = t || hn;
            for (var n = 1, i = e.length; i > n; n++)
                if (t(e[n], e[n - 1]) < 0) {
                    e.sort(t);
                    break
                } return e
        }

        function V(e, t) {
            var n, i = O(e, t),
                r = i.length,
                o = r > 0 ? [i[0]] : [];
            for (t = t || hn, n = 1; r > n; n++) 0 !== t(i[n], yn(o)) && o.push(i[n]);
            return o
        }

        function U(e, t) {
            var n = e.type,
                i = t instanceof Date;
            return !n && i || A(n, ai)
        }

        function W(e) {
            var t, n, i, r, o = [],
                a = e.length;
            for (t = 0; a > t; t++)
                for (n = e[t], r = n.length, i = 0; r > i; i++) o[i] = o[i] || [], o[i].push(n[i]);
            return o
        }

        function j(e, t) {
            if (e.indexOf(".") > -1)
                for (var n, i = e.split("."), r = ""; i.length > 1;) r += i.shift(), n = zt.getter(r)(t) || {}, zt.setter(r)(t, n), r += "."
        }

        function q(e) {
            var t, n, i, r = e.data,
                o = 0;
            for (t = 0; r.length > t; t++) n = ne.current.bindPoint(e, t), i = n.valueFields.value, typeof i === Pr && (i = parseFloat(i)), M(i) && n.fields.visible !== !1 && (o += It.abs(i));
            return o
        }

        function G(e) {
            var t = e.overlay;
            return t && t.gradient && "none" != t.gradient
        }

        function $(e) {
            for (var t = 0; e.length > t; t++)
                if (wn(e[t].zIndex)) return !0
        }

        function Y() {
            this._defaultPrevented = !0
        }

        function K(e, t) {
            if (e)
                for (var n = 0; e.length > n; n++)
                    if (e[n].category === t) return [e[n]]
        }

        function Q(e) {
            return wn(e) && null !== e
        }

        function X(e) {
            var t, n, i = {};
            for (n = 0; e.length > n; n++) t = e[n], t.axis.options.name && (i[t.axis.options.name] = {
                min: t.range.min,
                max: t.range.max
            });
            return i
        }

        function J(e, t) {
            var n = (t || "").toLowerCase(),
                i = "none" == n && !(e.ctrlKey || e.shiftKey || e.altKey) || e[n + "Key"];
            return i
        }

        function Z(e, t) {
            var n = [];
            ee(e, n), zt.util.loadFonts(n, t)
        }

        function ee(e, t, n) {
            var i = 5;
            n = n || {
                depth: 0
            }, !e || n.depth > i || !document.fonts || Object.keys(e).forEach(function(i) {
                var r = e[i];
                "dataSource" !== i && "$" !== i[0] && r && ("font" === i ? t.push(r) : "object" == typeof r && (n.depth++, ee(r, t, n), n.depth--))
            })
        }
        var te, ne, ie, re, oe, ae, se, le, ce, de, ue, he, fe, pe, me, ge, ve, _e, be, we, ye, ke, xe, Ce, Se, Te, De, Ae, Ee, Fe, Ie, Me, Re, Pe, ze, Be, Le, He, Ne, Oe, Ve, Ue, We, je, qe, Ge, $e, Ye, Ke, Qe, Xe, Je, Ze, et, tt, nt, it, rt, ot, at, st, lt, ct, dt, ut, ht, ft, pt, mt, gt, vt, _t, bt, wt, yt, kt, xt, Ct, St, Tt, Dt = e.each,
            At = e.isArray,
            Et = e.isPlainObject,
            Ft = e.map,
            It = Math,
            Mt = e.noop,
            Rt = e.extend,
            Pt = e.proxy,
            zt = window.kendo,
            Bt = zt.Class,
            Lt = zt.Observable,
            Ht = zt.data.DataSource,
            Nt = zt.ui.Widget,
            Ot = zt.deepExtend,
            Vt = zt.getter,
            Ut = zt.isFunction,
            Wt = zt.template,
            jt = zt.dataviz,
            qt = jt.Axis,
            Gt = jt.AxisLabel,
            $t = jt.Box2D,
            Yt = jt.BoxElement,
            Kt = jt.ChartElement,
            Qt = zt.drawing.Color,
            Xt = jt.CurveProcessor,
            Jt = jt.FloatElement,
            Zt = jt.Note,
            en = jt.LogarithmicAxis,
            tn = jt.NumericAxis,
            nn = jt.Point2D,
            rn = jt.RootElement,
            on = jt.Ring,
            an = jt.ShapeElement,
            sn = jt.ShapeBuilder,
            ln = jt.TextBox,
            cn = jt.Title,
            dn = jt.alignPathToPixel,
            un = jt.autoFormat,
            hn = jt.dateComparer,
            fn = jt.getSpacing,
            pn = jt.inArray,
            mn = jt.interpolateValue,
            gn = jt.mwDelta,
            vn = jt.round,
            _n = zt.util,
            bn = _n.append,
            wn = _n.defined,
            yn = _n.last,
            kn = _n.limitValue,
            xn = _n.sparseArrayLimits,
            Cn = _n.sparseArrayMin,
            Sn = _n.sparseArrayMax,
            Tn = _n.renderTemplate,
            Dn = _n.valueOrDefault,
            An = jt.geometry,
            En = jt.drawing,
            Fn = ".kendoChart",
            In = "above",
            Mn = "area",
            Rn = "auto",
            Pn = "fit",
            zn = jt.AXIS_LABEL_CLICK,
            Bn = "bar",
            Ln = 6,
            Hn = .8,
            Nn = "below",
            On = "#000",
            Vn = "both",
            Un = "bottom",
            Wn = "boxPlot",
            jn = "bubble",
            qn = "bullet",
            Gn = "candlestick",
            $n = "category",
            Yn = "center",
            Kn = "change",
            Qn = "circle",
            Xn = "contextmenu" + Fn,
            Jn = jt.CLIP,
            Zn = "color",
            ei = "column",
            ti = jt.COORD_PRECISION,
            ni = "cross",
            ii = "k-",
            ri = "custom",
            oi = "dataBound",
            ai = "date",
            si = "days",
            li = jt.DEFAULT_FONT,
            ci = jt.DEFAULT_HEIGHT,
            di = jt.DEFAULT_PRECISION,
            ui = jt.DEFAULT_WIDTH,
            hi = 4,
            fi = "donut",
            pi = 50,
            mi = "drag",
            gi = "dragEnd",
            vi = "dragStart",
            _i = "errorLow",
            bi = "errorHigh",
            wi = "xErrorLow",
            yi = "xErrorHigh",
            ki = "yErrorLow",
            xi = "yErrorHigh",
            Ci = "fadeIn",
            Si = "first",
            Ti = "from",
            Di = "funnel",
            Ai = "glass",
            Ei = "horizontal",
            Fi = "horizontalWaterfall",
            Ii = "hours",
            Mi = jt.INITIAL_ANIMATION_DURATION,
            Ri = "insideBase",
            Pi = "insideEnd",
            zi = "interpolate",
            Bi = "leave",
            Li = "left",
            Hi = "legendItemClick",
            Ni = "legendItemHover",
            Oi = "line",
            Vi = 8,
            Ui = "linear",
            Wi = "log",
            ji = "max",
            qi = 5,
            Gi = Number.MAX_VALUE,
            $i = "min",
            Yi = -Number.MAX_VALUE,
            Ki = "minutes",
            Qi = "months",
            Xi = "mouseleave" + Fn,
            Ji = "mousemove.tracking",
            Zi = "mouseover" + Fn,
            er = "mouseout" + Fn,
            tr = "mousemove" + Fn,
            nr = 20,
            ir = 150,
            rr = "DOMMouseScroll" + Fn + " mousewheel" + Fn,
            or = jt.NOTE_CLICK,
            ar = jt.NOTE_HOVER,
            sr = "noteText",
            lr = "object",
            cr = "ohlc",
            dr = "outsideEnd",
            ur = "pie",
            hr = 70,
            fr = "plotAreaClick",
            pr = "pointer",
            mr = "rangeBar",
            gr = "rangeColumn",
            vr = "render",
            _r = "right",
            br = "roundedBevel",
            wr = "roundedGlass",
            yr = "scatter",
            kr = "scatterLine",
            xr = "seconds",
            Cr = "selectStart",
            Sr = "select",
            Tr = "selectEnd",
            Dr = "seriesClick",
            Ar = "seriesHover",
            Er = .001,
            Fr = "step",
            Ir = "smooth",
            Mr = "stderr",
            Rr = "stddev",
            Pr = "string",
            zr = "summary",
            Br = 1e3,
            Lr = 60 * Br,
            Hr = 60 * Lr,
            Nr = 24 * Hr,
            Or = 7 * Nr,
            Vr = 31 * Nr,
            Ur = 365 * Nr,
            Wr = {
                years: Ur,
                months: Vr,
                weeks: Or,
                days: Nr,
                hours: Hr,
                minutes: Lr,
                seconds: Br
            },
            jr = "to",
            qr = "top",
            Gr = 150,
            $r = 5,
            Yr = 100,
            Kr = 100,
            Qr = "chart-tooltip-inverse",
            Xr = "value",
            Jr = "verticalArea",
            Zr = "verticalBullet",
            eo = "verticalLine",
            to = "waterfall",
            no = "weeks",
            io = "#fff",
            ro = "x",
            oo = "y",
            ao = "years",
            so = "zero",
            lo = 3,
            co = "zoomStart",
            uo = "zoom",
            ho = "zoomEnd",
            fo = [xr, Ki, Ii, si, no, Qi, ao],
            po = [Bn, ei, cr, Gn, Wn, qn, gr, mr, to, Fi],
            mo = {
                seconds: "HH:mm:ss",
                minutes: "HH:mm",
                hours: "HH:mm",
                days: "M/d",
                weeks: "M/d",
                months: "MMM 'yy",
                years: "yyyy"
            },
            go = Nt.extend({
                init: function(e, n) {
                    var i, r, o = this;
                    zt.destroy(e), Nt.fn.init.call(o, e), o.element.addClass(ii + this.options.name.toLowerCase()).css("position", "relative"), n && (r = n.dataSource, n.dataSource = t), i = Ot({}, o.options, n), o._originalOptions = Ot({}, i), o._initTheme(i), o._initSurface(), o.bind(o.events, o.options), o.wrapper = o.element, n && (n.dataSource = r), o._initDataSource(n), zt.notify(o, jt.ui)
                },
                _initTheme: function(n) {
                    var i, r = this,
                        o = jt.ui.themes || {},
                        a = n.theme,
                        c = o[a] || o[a.toLowerCase()],
                        d = a && c ? c.chart : {},
                        u = [],
                        h = n.series || [];
                    for (i = 0; h.length > i; i++) u.push(e.extend({}, h[i]));
                    n.series = u, l(n), r._applyDefaults(n, d), null === n.seriesColors && (n.seriesColors = t), r.options = Ot({}, d, n), s(r.options)
                },
                _initDataSource: function(e) {
                    var t = this,
                        n = (e || {}).dataSource;
                    t._dataChangeHandler = Pt(t._onDataChanged, t), t.dataSource = Ht.create(n).bind(Kn, t._dataChangeHandler), t._bindCategories(), n && (t._hasDataSource = !0), Z(e, function() {
                        t._redraw(), t._attachEvents()
                    }), n && t.options.autoBind && t.dataSource.fetch()
                },
                setDataSource: function(e) {
                    var t = this;
                    t.dataSource.unbind(Kn, t._dataChangeHandler), t.dataSource = e = Ht.create(e), t._hasDataSource = !0, t._hasData = !1, e.bind(Kn, t._dataChangeHandler), t.options.autoBind && e.fetch()
                },
                events: [oi, Dr, Ar, zn, Hi, Ni, fr, vi, mi, gi, co, uo, ho, Cr, Sr, Tr, or, ar, vr],
                items: function() {
                    return e()
                },
                options: {
                    name: "Chart",
                    renderAs: "",
                    theme: "default",
                    chartArea: {},
                    legend: {
                        visible: !0,
                        labels: {}
                    },
                    categoryAxis: {},
                    autoBind: !0,
                    seriesDefaults: {
                        type: ei,
                        data: [],
                        highlight: {
                            visible: !0
                        },
                        labels: {},
                        negativeValues: {
                            visible: !1
                        }
                    },
                    series: [],
                    seriesColors: null,
                    tooltip: {
                        visible: !1
                    },
                    transitions: !0,
                    valueAxis: {},
                    plotArea: {},
                    title: {},
                    xAxis: {},
                    yAxis: {},
                    panes: [{}],
                    pannable: !1,
                    zoomable: !1
                },
                refresh: function() {
                    var e = this;
                    e._applyDefaults(e.options), s(e.options), e._bindSeries(), e._bindCategories(), e.trigger(oi), e._redraw()
                },
                getSize: function() {
                    return zt.dimensions(this.element)
                },
                _resize: function() {
                    var e = this.options.transitions;
                    this.options.transitions = !1, this._redraw(), this.options.transitions = e
                },
                redraw: function(e) {
                    var t, n, i = this;
                    i._applyDefaults(i.options), s(i.options), e ? (n = i._model._plotArea, t = n.findPane(e), n.redraw(t)) : i._redraw()
                },
                getAxis: function(e) {
                    var t, n = this._plotArea.axes;
                    for (t = 0; n.length > t; t++)
                        if (n[t].options.name === e) return new Tt(n[t])
                },
                toggleHighlight: function(e, t) {
                    var n, i, r, o, a = this._plotArea,
                        s = this._highlight,
                        l = (a.srcSeries || a.series || [])[0];
                    if (Et(t) ? (n = t.series, i = t.category) : n = i = t, r = l.type === fi ? K(a.pointsBySeriesName(n), i) : l.type === ur || l.type === Di ? K((a.charts[0] || {}).points, i) : a.pointsBySeriesName(n))
                        for (o = 0; r.length > o; o++) s.togglePointHighlight(r[o], e)
                },
                _initSurface: function() {
                    var e = this.surface,
                        t = this._surfaceWrap(),
                        n = this.options.chartArea;
                    n.width && t.css("width", n.width), n.height && t.css("height", n.height), e && e.options.type === this.options.renderAs ? (this.surface.clear(), this.surface.resize()) : (e && e.destroy(), this.surface = En.Surface.create(t, {
                        type: this.options.renderAs
                    }))
                },
                _surfaceWrap: function() {
                    return this.element
                },
                _redraw: function() {
                    var e, t = this,
                        n = t._getModel();
                    t._destroyView(), t._model = n, t._plotArea = n._plotArea, n.renderVisual(), this.options.transitions !== !1 && n.traverse(function(e) {
                        e.animation && e.animation.setup()
                    }), t._initSurface(), t.surface.draw(n.visual), this.options.transitions !== !1 && n.traverse(function(e) {
                        e.animation && e.animation.play()
                    }), t._tooltip = t._createTooltip(), t._highlight = new pt(e), t._setupSelection(), t._createPannable(), t._createZoomSelection(), t._createMousewheelZoom(), t._hasDataSource && !t._hasData && t.options.autoBind || t.trigger(vr)
                },
                exportVisual: function(e) {
                    var t, n, i, r;
                    return e && (e.width || e.height) ? (n = this.options.chartArea, i = this._originalOptions.chartArea, Ot(n, e), r = this._getModel(), n.width = i.width, n.height = i.height, r.renderVisual(), t = r.visual) : t = this.surface.exportVisual(), t
                },
                _sharedTooltip: function() {
                    var e = this,
                        t = e.options;
                    return e._plotArea instanceof st && t.tooltip.shared;
                },
                _createPannable: function() {
                    var e = this.options;
                    e.pannable !== !1 && (this._pannable = new kt(this._plotArea, e.pannable))
                },
                _createZoomSelection: function() {
                    var e = this.options.zoomable,
                        t = (e || {}).selection;
                    e !== !1 && t !== !1 && (this._zoomSelection = new xt(this, t))
                },
                _createMousewheelZoom: function() {
                    var e = this.options.zoomable,
                        t = (e || {}).mousewheel;
                    e !== !1 && t !== !1 && (this._mousewheelZoom = new Ct(this, t))
                },
                _createTooltip: function() {
                    var e, t = this,
                        n = t.options,
                        i = t.element;
                    return e = t._sharedTooltip() ? new vt(i, t._plotArea, n.tooltip) : new gt(i, n.tooltip), e.bind(Bi, Pt(t._tooltipleave, t)), e
                },
                _tooltipleave: function() {
                    var e = this,
                        t = e._plotArea,
                        n = e._highlight;
                    t.hideCrosshairs(), n.hide()
                },
                _applyDefaults: function(e, t) {
                    c(e, t), o(e, t)
                },
                _getModel: function() {
                    var e, t = this,
                        n = t.options,
                        i = new rn(t._modelOptions());
                    return i.chart = t, cn.buildTitle(n.title, i), e = i._plotArea = t._createPlotArea(), n.legend.visible && i.append(new ae(e.options.legend)), i.append(e), i.reflow(), i
                },
                _modelOptions: function() {
                    var e = this,
                        t = e.options,
                        n = e.element,
                        i = It.floor(n.height()),
                        r = It.floor(n.width());
                    return e._size = null, Ot({
                        width: r || ui,
                        height: i || ci,
                        transitions: t.transitions
                    }, t.chartArea)
                },
                _createPlotArea: function(e) {
                    var t = this,
                        n = t.options;
                    return te.current.create(e ? [] : n.series, n)
                },
                _setupSelection: function() {
                    var e, t, n, i, r, o, a = this,
                        s = a._plotArea,
                        l = s.axes,
                        c = a._selections = [];
                    for (a._selectStartHandler || (a._selectStartHandler = Pt(a._selectStart, a), a._selectHandler = Pt(a._select, a), a._selectEndHandler = Pt(a._selectEnd, a)), t = 0; l.length > t; t++) n = l[t], o = n.options, n instanceof se && o.select && !o.vertical && (i = 0, r = o.categories.length - 1, n instanceof le && (i = o.categories[i], r = o.categories[r]), o.justified || (n instanceof le ? r = g(r, 1, o.baseUnit, o.weekStartDay) : r++), e = new yt(a, n, Ot({
                        min: i,
                        max: r
                    }, o.select)), e.bind(Cr, a._selectStartHandler), e.bind(Sr, a._selectHandler), e.bind(Tr, a._selectEndHandler), c.push(e))
                },
                _selectStart: function(e) {
                    return this.trigger(Cr, e)
                },
                _select: function(e) {
                    return this.trigger(Sr, e)
                },
                _selectEnd: function(e) {
                    return this.trigger(Tr, e)
                },
                _attachEvents: function() {
                    var e = this,
                        t = e.element;
                    t.on(Xn, Pt(e._click, e)), t.on(Zi, Pt(e._mouseover, e)), t.on(er, Pt(e._mouseout, e)), t.on(rr, Pt(e._mousewheel, e)), t.on(Xi, Pt(e._mouseleave, e)), e._mousemove = zt.throttle(Pt(e._mousemove, e), nr), e._shouldAttachMouseMove() && t.on(tr, e._mousemove), zt.UserEvents && (e._userEvents = new zt.UserEvents(t, {
                        global: !0,
                        filter: ":not(.k-selector)",
                        multiTouch: !1,
                        fastTap: !0,
                        tap: Pt(e._tap, e),
                        start: Pt(e._start, e),
                        move: Pt(e._move, e),
                        end: Pt(e._end, e)
                    }))
                },
                _mouseout: function(e) {
                    var t = this,
                        n = t._getChartElement(e);
                    n && n.leave && n.leave(t, e)
                },
                _start: function(e) {
                    var t = this,
                        n = t._events;
                    wn(n[vi] || n[mi] || n[gi]) && t._startNavigation(e, vi), t._pannable && t._pannable.start(e), t._zoomSelection && t._zoomSelection.start(e) && this.trigger(co, {
                        axisRanges: z(this._plotArea.axes),
                        originalEvent: e
                    })
                },
                _move: function(e) {
                    var t, n, i, r, o, a, s = this,
                        l = s._navState,
                        c = s._pannable,
                        d = {};
                    if (c) e.preventDefault(), d = c.move(e), d && !s.trigger(mi, {
                        axisRanges: d,
                        originalEvent: e
                    }) && c.pan();
                    else if (l) {
                        for (e.preventDefault(), t = l.axes, n = 0; t.length > n; n++) i = t[n], r = i.options.name, r && (o = i.options.vertical ? e.y : e.x, a = o.startLocation - o.location, 0 !== a && (d[i.options.name] = i.translateRange(a)));
                        l.axisRanges = d, s.trigger(mi, {
                            axisRanges: d,
                            originalEvent: e
                        })
                    }
                    s._zoomSelection && s._zoomSelection.move(e)
                },
                _end: function(e) {
                    if (this._endNavigation(e, gi), this._zoomSelection) {
                        var t = this._zoomSelection.end(e);
                        t && !this.trigger(uo, {
                            axisRanges: t,
                            originalEvent: e
                        }) && (this._zoomSelection.zoom(), this.trigger(ho, {
                            axisRanges: t,
                            originalEvent: e
                        }))
                    }
                    this._pannable && this._pannable.end(e)
                },
                _mousewheel: function(e) {
                    var t, n, i, r, o, a, s, l = this,
                        c = e.originalEvent,
                        d = gn(e),
                        u = l._navState,
                        h = {},
                        f = l._mousewheelZoom;
                    if (f) s = {
                        delta: d,
                        axisRanges: z(this._plotArea.axes),
                        originalEvent: e
                    }, l.trigger(co, s) || (e.preventDefault(), s.axisRanges = h = f.updateRanges(d), h && !l.trigger(uo, s) && (f.zoom(), l.trigger(ho, s)));
                    else if (u || (t = l._startNavigation(c, co), t || (u = l._navState)), u) {
                        for (n = u.totalDelta || d, u.totalDelta = n + d, i = l._navState.axes, r = 0; i.length > r; r++) o = i[r], a = o.options.name, a && (h[a] = o.scaleRange(-n));
                        l.trigger(uo, {
                            delta: d,
                            axisRanges: h,
                            originalEvent: e
                        }), l._mwTimeout && clearTimeout(l._mwTimeout), l._mwTimeout = setTimeout(function() {
                            l._endNavigation(e, ho)
                        }, ir)
                    }
                },
                _startNavigation: function(e, t) {
                    var n, i, r, o = this,
                        a = o._eventCoordinates(e),
                        s = o._model._plotArea,
                        l = s.findPointPane(a),
                        c = s.axes.slice(0),
                        d = !1;
                    if (l) {
                        for (n = 0; c.length > n; n++)
                            if (i = c[n], i.box.containsPoint(a)) {
                                d = !0;
                                break
                            }! d && s.backgroundBox().containsPoint(a) && (r = o.trigger(t, {
                            axisRanges: z(c),
                            originalEvent: e
                        }), r ? o._userEvents.cancel() : (o._suppressHover = !0, o._unsetActivePoint(), o._navState = {
                            pane: l,
                            axes: c
                        }))
                    }
                },
                _endNavigation: function(e, t) {
                    var n = this;
                    n._navState && (n.trigger(t, {
                        axisRanges: n._navState.axisRanges,
                        originalEvent: e
                    }), n._suppressHover = !1, n._navState = null)
                },
                _getChartElement: function(e, n) {
                    var i, r = this.surface.eventTarget(e);
                    if (r) {
                        for (; r && !i;) i = r.chartElement, r = r.parent;
                        return i ? (i.aliasFor && (i = i.aliasFor(e, this._eventCoordinates(e))), n && (i = i.closest(n)), i) : t
                    }
                },
                _eventCoordinates: function(e) {
                    var t = this,
                        n = wn((e.x || {}).client),
                        i = n ? e.x.client : e.clientX,
                        r = n ? e.y.client : e.clientY;
                    return t._toModelCoordinates(i, r)
                },
                _toModelCoordinates: function(t, n) {
                    var i = this.element,
                        r = i.offset(),
                        o = parseInt(i.css("paddingLeft"), 10),
                        a = parseInt(i.css("paddingTop"), 10),
                        s = e(window);
                    return new nn(t - r.left - o + s.scrollLeft(), n - r.top - a + s.scrollTop())
                },
                _tap: function(e) {
                    var t = this,
                        n = t._getChartElement(e);
                    t._activePoint === n ? t._click(e) : (t._startHover(e) || t._unsetActivePoint(), t._click(e))
                },
                _click: function(e) {
                    for (var t = this, n = t._getChartElement(e); n;) n.click && n.click(t, e), n = n.parent
                },
                _startHover: function(e) {
                    var n, i = this,
                        r = i._getChartElement(e),
                        o = i._tooltip,
                        a = i._highlight,
                        s = i.options.tooltip;
                    if (!i._suppressHover && a && !a.isHighlighted(r) && !i._sharedTooltip()) return n = i._getChartElement(e, function(e) {
                        return e.hover
                    }), n && !n.hover(i, e) ? (i._activePoint = n, s = Ot({}, s, n.options.tooltip), s.visible && o.show(n), a.show(n), n.tooltipTracking) : t
                },
                _mouseover: function(t) {
                    var n = this;
                    n._startHover(t) && e(document).on(Ji, Pt(n._mouseMoveTracking, n))
                },
                _mouseMoveTracking: function(t) {
                    var n, i, r = this,
                        o = r.options,
                        a = r._tooltip,
                        s = r._highlight,
                        l = r._eventCoordinates(t),
                        c = r._activePoint;
                    r._plotArea.box.containsPoint(l) ? c && c.tooltipTracking && c.series && c.parent.getNearestPoint && (i = c.parent.getNearestPoint(l.x, l.y, c.seriesIx), i && i != c && (i.hover(r, t), r._activePoint = i, n = Ot({}, o.tooltip, c.options.tooltip), n.visible && a.show(i), s.show(i))) : (e(document).off(Ji), r._unsetActivePoint())
                },
                _mousemove: function(e) {
                    var t = this._eventCoordinates(e);
                    this._trackCrosshairs(t), this._sharedTooltip() && this._trackSharedTooltip(t, e)
                },
                _trackCrosshairs: function(e) {
                    var t, n, i = this._plotArea.crosshairs;
                    for (t = 0; i.length > t; t++) n = i[t], n.box.containsPoint(e) ? n.showAt(e) : n.hide()
                },
                _trackSharedTooltip: function(t, n) {
                    var i, r, o, a, s = this,
                        l = s.options,
                        c = s._plotArea,
                        d = c.categoryAxis,
                        u = s._tooltip,
                        h = l.tooltip,
                        f = s._highlight;
                    c.box.containsPoint(t) && (i = d.pointCategoryIndex(t), i !== s._tooltipCategoryIx && (r = c.pointsByCategoryIndex(i), o = e.map(r, function(e) {
                        return e.eventArgs(n)
                    }), a = o[0] || {}, a.categoryPoints = o, r.length > 0 && !this.trigger(Ar, a) ? (h.visible && u.showAt(r, t), f.show(r)) : u.hide(), s._tooltipCategoryIx = i))
                },
                _mouseleave: function(t) {
                    var n = this,
                        i = n._plotArea,
                        r = n._tooltip,
                        o = n._highlight,
                        a = t.relatedTarget;
                    a && e(a).closest(r.element).length || (n._mousemove.cancel(), i.hideCrosshairs(), o.hide(), setTimeout(Pt(r.hide, r), Kr), n._tooltipCategoryIx = null)
                },
                _unsetActivePoint: function() {
                    var e = this,
                        t = e._tooltip,
                        n = e._highlight;
                    e._activePoint = null, t && t.hide(), n && n.hide()
                },
                _onDataChanged: function() {
                    var e, t, n = this,
                        i = n.options,
                        r = n._sourceSeries || i.series,
                        o = r.length,
                        a = n.dataSource.view(),
                        l = (n.dataSource.group() || []).length > 0,
                        c = [];
                    for (e = 0; o > e; e++) t = r[e], n._isBindable(t) && l ? bn(c, L(t, a)) : c.push(t || []);
                    n._sourceSeries = r, i.series = c, s(n.options), n._bindSeries(), n._bindCategories(), n._hasData = !0, n._deferRedraw()
                },
                _deferRedraw: function() {
                    var e = this;
                    zt.support.vml ? (e._clearRedrawTimeout(), e._redrawTimeout = setTimeout(function() {
                        e.surface && (e.trigger(oi), e._redraw())
                    }, 0)) : (e.trigger(oi), e._redraw())
                },
                _clearRedrawTimeout: function() {
                    this._redrawTimeout && (clearInterval(this._redrawTimeout), this._redrawTimeout = null)
                },
                _bindSeries: function() {
                    var e, t, n, i, r = this,
                        o = r.dataSource.view(),
                        a = r.options.series,
                        s = a.length;
                    for (e = 0; s > e; e++) t = a[e], r._isBindable(t) && (n = t._groupIx, i = wn(n) ? (o[n] || {}).items : o, t.autoBind !== !1 && (t.data = i))
                },
                _bindCategories: function() {
                    var e, t, n = this,
                        i = n.dataSource.view() || [],
                        r = (n.dataSource.group() || []).length > 0,
                        o = i,
                        a = n.options,
                        s = [].concat(a.categoryAxis);
                    for (r && i.length && (o = i[0].items), e = 0; s.length > e; e++) t = s[e], t.autoBind !== !1 && n._bindCategoryAxis(t, o, e)
                },
                _bindCategoryAxis: function(e, t, n) {
                    var i, r, o, a = (t || []).length;
                    if (e.field)
                        for (e.categories = [], i = 0; a > i; i++) o = t[i], r = h(e.field, o), 0 === i ? (e.categories = [r], e.dataItems = [o]) : (e.categories.push(r), e.dataItems.push(o));
                    else this._bindCategoryAxisFromSeries(e, n)
                },
                _bindCategoryAxisFromSeries: function(e, t) {
                    var n, i, r, o, a, s, l, c, d, u, p, m = this,
                        g = [],
                        v = m.options.series,
                        _ = v.length,
                        b = {};
                    for (i = 0; _ > i; i++)
                        if (r = v[i], o = r.categoryAxis === e.name || !r.categoryAxis && 0 === t, a = r.data, l = a.length, r.categoryField && o && l > 0)
                            for (p = U(e, h(r.categoryField, a[0])), u = p ? f : h, s = 0; l > s; s++) c = a[s], d = u(r.categoryField, c), (p || !b[d]) && (g.push([d, c]), p || (b[d] = !0));
                    g.length > 0 && (p && (g = V(g, function(e, t) {
                        return hn(e[0], t[0])
                    })), n = W(g), e.categories = n[0], e.dataItems = n[1])
                },
                _isBindable: function(e) {
                    var t, n, i = ne.current.valueFields(e),
                        r = !0;
                    for (n = 0; i.length > n; n++)
                        if (t = i[n], t === Xr ? t = "field" : t += "Field", !wn(e[t])) {
                            r = !1;
                            break
                        } return r
                },
                _legendItemClick: function(e, t) {
                    var n, i, r, o = this,
                        a = o._plotArea,
                        s = (a.srcSeries || a.series)[e],
                        l = (o._sourceSeries || [])[e] || s;
                    pn(s.type, [ur, fi, Di]) ? (r = l.data[t], i = wn(r.visible) ? !r.visible : !1, r.visible = i) : (i = !l.visible, l.visible = i, s.visible = i), o.options.transitions && (o.options.transitions = !1, n = !0), o.redraw(), n && (o.options.transitions = !0)
                },
                _legendItemHover: function(e, t) {
                    var n, i, r = this,
                        o = r._plotArea,
                        a = r._highlight,
                        s = (o.srcSeries || o.series)[e];
                    n = pn(s.type, [ur, fi, Di]) ? t : e, i = o.pointsBySeriesIndex(n), a.show(i)
                },
                _shouldAttachMouseMove: function() {
                    var e = this;
                    return e._plotArea.crosshairs.length || e._tooltip && e._sharedTooltip()
                },
                setOptions: function(n) {
                    var i = this,
                        r = n.dataSource;
                    n.dataSource = t, i._originalOptions = Ot(i._originalOptions, n), i.options = Ot({}, i._originalOptions), i._sourceSeries = null, e(document).off(tr), Nt.fn._setEvents.call(i, n), i._initTheme(i.options), r && i.setDataSource(r), i._hasDataSource ? i._onDataChanged() : (i._bindCategories(), i.redraw()), i._shouldAttachMouseMove() && i.element.on(tr, i._mousemove)
                },
                destroy: function() {
                    var t = this,
                        n = t.dataSource;
                    t.element.off(Fn), n && n.unbind(Kn, t._dataChangeHandler), e(document).off(Ji), t._userEvents && t._userEvents.destroy(), t._destroyView(), t.surface.destroy(), t.surface = null, t._clearRedrawTimeout(), Nt.fn.destroy.call(t)
                },
                _destroyView: function() {
                    var e = this,
                        t = e._model,
                        n = e._selections;
                    if (t && (t.destroy(), e._model = null), n)
                        for (; n.length > 0;) n.shift().destroy();
                    e._unsetActivePoint(), e._tooltip && e._tooltip.destroy(), e._highlight && e._highlight.destroy(), e._zoomSelection && e._zoomSelection.destroy()
                }
            });
        jt.ExportMixin.extend(go.fn), zt.PDFMixin && zt.PDFMixin.extend(go.fn), te = Bt.extend({
            init: function() {
                this._registry = []
            },
            register: function(e, t) {
                this._registry.push({
                    type: e,
                    seriesTypes: t
                })
            },
            create: function(e, t) {
                var n, i, r, o = this._registry,
                    a = o[0];
                for (n = 0; o.length > n; n++)
                    if (i = o[n], r = H(e, i.seriesTypes), r.length > 0) {
                        a = i;
                        break
                    } return new a.type(r, t)
            }
        }), te.current = new te, ne = Bt.extend({
            init: function() {
                this._valueFields = {}, this._otherFields = {}, this._nullValue = {}, this._undefinedValue = {}
            },
            register: function(e, n, i) {
                var r, o, a = this;
                for (n = n || [Xr], r = 0; e.length > r; r++) o = e[r], a._valueFields[o] = n, a._otherFields[o] = i, a._nullValue[o] = a._makeValue(n, null), a._undefinedValue[o] = a._makeValue(n, t)
            },
            canonicalFields: function(e) {
                return this.valueFields(e).concat(this.otherFields(e))
            },
            valueFields: function(e) {
                return this._valueFields[e.type] || [Xr]
            },
            otherFields: function(e) {
                return this._otherFields[e.type] || [Xr]
            },
            bindPoint: function(e, t, n) {
                var i, r, o, a, s, l = this,
                    c = e.data,
                    d = wn(n) ? n : c[t],
                    u = {
                        valueFields: {
                            value: d
                        }
                    },
                    h = l.valueFields(e),
                    f = l._otherFields[e.type];
                return null === d ? s = l._nullValue[e.type] : wn(d) ? At(d) ? (r = d.slice(h.length), s = l._bindFromArray(d, h), i = l._bindFromArray(r, f)) : typeof d === lr && (o = l.sourceFields(e, h), a = l.sourceFields(e, f), s = l._bindFromObject(d, h, o), i = l._bindFromObject(d, f, a)) : s = l._undefinedValue[e.type], wn(s) && (1 === h.length ? u.valueFields.value = s[h[0]] : u.valueFields = s), u.fields = i || {}, u
            },
            _makeValue: function(e, t) {
                var n, i, r = {},
                    o = e.length;
                for (n = 0; o > n; n++) i = e[n], r[i] = t;
                return r
            },
            _bindFromArray: function(e, t) {
                var n, i, r = {};
                if (t)
                    for (i = It.min(t.length, e.length), n = 0; i > n; n++) r[t[n]] = e[n];
                return r
            },
            _bindFromObject: function(e, t, n) {
                var i, r, o, a, s = {};
                if (t)
                    for (r = t.length, n = n || t, i = 0; r > i; i++) o = t[i], a = n[i], s[o] = h(a, e);
                return s
            },
            sourceFields: function(e, t) {
                var n, i, r, o, a;
                if (t)
                    for (i = t.length, o = [], n = 0; i > n; n++) r = t[n], a = r === Xr ? "field" : r + "Field", o.push(e[a] || r);
                return o
            }
        }), ne.current = new ne, ie = Kt.extend({
            init: function(e, t) {
                var n = this;
                Kt.fn.init.call(n, t), this.textBox = new ln(e, n.options), n.append(this.textBox)
            },
            options: {
                position: dr,
                margin: fn(3),
                padding: fn(4),
                color: On,
                background: "",
                border: {
                    width: 1,
                    color: ""
                },
                aboveAxis: !0,
                vertical: !1,
                animation: {
                    type: Ci,
                    delay: Mi
                },
                zIndex: 2
            },
            createVisual: function() {
                this.textBox.options.noclip = this.options.noclip
            },
            reflow: function(e) {
                var t = this,
                    n = t.options,
                    i = n.vertical,
                    r = n.aboveAxis,
                    o = t.children[0],
                    a = o.box,
                    s = o.options.padding;
                o.options.align = i ? Yn : Li, o.options.vAlign = i ? qr : Yn, n.position == Pi ? i ? (o.options.vAlign = qr, !r && a.height() < e.height() && (o.options.vAlign = Un)) : o.options.align = r ? _r : Li : n.position == Yn ? (o.options.vAlign = Yn, o.options.align = Yn) : n.position == Ri ? i ? o.options.vAlign = r ? Un : qr : o.options.align = r ? Li : _r : n.position == dr && (i ? e = r ? new $t(e.x1, e.y1 - a.height(), e.x2, e.y1) : new $t(e.x1, e.y2, e.x2, e.y2 + a.height()) : (o.options.align = Yn, e = r ? new $t(e.x2, e.y1, e.x2 + a.width(), e.y2) : new $t(e.x1 - a.width(), e.y1, e.x1, e.y2))), n.rotation || (i ? s.left = s.right = (e.width() - o.contentBox.width()) / 2 : s.top = s.bottom = (e.height() - o.contentBox.height()) / 2), o.reflow(e)
            },
            alignToClipBox: function(e) {
                var t, n = this,
                    i = n.options.vertical,
                    r = i ? oo : ro,
                    o = r + "1",
                    a = r + "2",
                    s = n.children[0],
                    l = n.parent.box;
                (e[o] > l[o] || l[a] > e[a]) && (t = s.paddingBox.clone(), t[o] = It.max(l[o], e[o]), t[a] = It.min(l[a], e[a]), this.reflow(t))
            }
        }), re = Yt.extend({
            init: function(e) {
                var t = this;
                Yt.fn.init.call(t, e), t.createContainer(), t.createMarker(), t.createLabel()
            },
            createContainer: function() {
                var e = this;
                e.container = new Jt({
                    vertical: !1,
                    wrap: !1,
                    align: Yn
                }), e.append(e.container)
            },
            createMarker: function() {
                this.container.append(new an(this.markerOptions()))
            },
            markerOptions: function() {
                var e = this.options,
                    t = e.markerColor;
                return Ot({}, e.markers, {
                    background: t,
                    border: {
                        color: t
                    }
                })
            },
            createLabel: function() {
                var e = this,
                    t = e.options,
                    n = Ot({}, t.labels);
                e.container.append(new ln(t.text, n))
            },
            renderComplete: function() {
                var e, t;
                Kt.fn.renderComplete.call(this), e = this.options.cursor || {}, t = this._itemOverlay = En.Path.fromRect(this.container.box.toRect(), {
                    fill: {
                        color: io,
                        opacity: 0
                    },
                    stroke: null,
                    cursor: e.style || e
                }), this.appendVisual(t)
            },
            click: function(e, t) {
                var n = this.eventArgs(t);
                e.trigger(Hi, n) || (t.preventDefault(), e._legendItemClick(n.seriesIndex, n.pointIndex))
            },
            hover: function(e, t) {
                var n = this.eventArgs(t);
                return e.trigger(Ni, n) || (t.preventDefault(), e._legendItemHover(n.seriesIndex, n.pointIndex)), !0
            },
            leave: function(e) {
                e._unsetActivePoint()
            },
            eventArgs: function(t) {
                var n = this.options;
                return {
                    element: e(t.target),
                    text: n.text,
                    series: n.series,
                    seriesIndex: n.series.index,
                    pointIndex: n.pointIndex
                }
            },
            renderVisual: function() {
                var e = this,
                    t = e.options,
                    n = t.visual;
                n ? (e.visual = n({
                    active: t.active,
                    series: t.series,
                    pointIndex: t.pointIndex,
                    options: {
                        markers: e.markerOptions(),
                        labels: t.labels
                    },
                    createVisual: function() {
                        e.createVisual(), e.renderChildren(), e.renderComplete();
                        var t = e.visual;
                        return delete e.visual, t
                    }
                }), this.addVisual()) : Kt.fn.renderVisual.call(e)
            }
        }), oe = Kt.extend({
            render: function() {
                var e, t, n = this.children,
                    i = this.options,
                    r = i.vertical;
                for (this.visual = new En.Layout(null, {
                    spacing: r ? 0 : i.spacing,
                    lineSpacing: r ? i.spacing : 0,
                    orientation: r ? "vertical" : "horizontal"
                }), t = 0; n.length > t; t++) e = n[t], e.reflow(new $t), e.renderVisual()
            },
            reflow: function(e) {
                this.visual.rect(e.toRect()), this.visual.reflow();
                var t = this.visual.clippedBBox();
                this.box = t ? jt.rectToBox(t) : new $t
            },
            renderVisual: function() {
                this.addVisual()
            },
            createVisual: Mt
        }), ae = Kt.extend({
            init: function(e) {
                var t = this;
                Kt.fn.init.call(t, e), pn(t.options.position, [qr, _r, Un, Li, ri]) || (t.options.position = _r), t.createContainer(), t.createItems()
            },
            options: {
                position: _r,
                items: [],
                labels: {
                    margin: {
                        left: 6
                    }
                },
                offsetX: 0,
                offsetY: 0,
                margin: fn(5),
                padding: fn(5),
                border: {
                    color: On,
                    width: 0
                },
                item: {
                    cursor: pr
                },
                spacing: 6,
                background: "",
                zIndex: 1,
                markers: {
                    border: {
                        width: 1
                    },
                    width: 7,
                    height: 7,
                    type: "rect",
                    align: Li,
                    vAlign: Yn
                }
            },
            createContainer: function() {
                var e = this,
                    t = e.options,
                    n = t.align,
                    i = t.position,
                    r = i,
                    o = Yn;
                i == ri ? r = Li : pn(i, [qr, Un]) ? (r = "start" == n ? Li : "end" == n ? _r : Yn, o = i) : n && ("start" == n ? o = qr : "end" == n && (o = Un)), e.container = new Yt({
                    margin: t.margin,
                    padding: t.padding,
                    background: t.background,
                    border: t.border,
                    vAlign: o,
                    align: r,
                    zIndex: t.zIndex,
                    shrinkToFit: !0
                }), e.append(e.container)
            },
            createItems: function() {
                var e, t, n, i = this,
                    r = i.options,
                    o = r.items,
                    a = o.length,
                    s = i.isVertical();
                for (e = new oe({
                    vertical: s,
                    spacing: r.spacing
                }), r.reverse && (o = o.slice(0).reverse()), t = 0; a > t; t++) n = o[t], e.append(new re(Ot({}, {
                    markers: r.markers,
                    labels: r.labels
                }, r.item, n)));
                e.render(), i.container.append(e)
            },
            isVertical: function() {
                var e = this,
                    t = e.options,
                    n = t.orientation,
                    i = t.position,
                    r = i == ri && n != Ei || (wn(n) ? n != Ei : pn(i, [Li, _r]));
                return r
            },
            hasItems: function() {
                return this.container.children[0].children.length > 0
            },
            reflow: function(e) {
                var n = this,
                    i = n.options;
                return e = e.clone(), n.hasItems() ? (i.position === ri ? (n.containerCustomReflow(e), n.box = e) : n.containerReflow(e), t) : (n.box = e, t)
            },
            containerReflow: function(e) {
                var t, n = this,
                    i = n.options,
                    r = i.position,
                    o = r == qr || r == Un ? ro : oo,
                    a = e.clone(),
                    s = n.container,
                    l = i.width,
                    c = i.height,
                    d = n.isVertical(),
                    u = e.clone();
                (r == Li || r == _r) && (a.y1 = u.y1 = 0), d && c ? (a.y2 = a.y1 + c, a.align(u, oo, s.options.vAlign)) : !d && l && (a.x2 = a.x1 + l, a.align(u, ro, s.options.align)), s.reflow(a), a = s.box, t = a.clone(), (i.offsetX || i.offsetY) && (a.translate(i.offsetX, i.offsetY), n.container.reflow(a)), t[o + 1] = e[o + 1], t[o + 2] = e[o + 2], n.box = t
            },
            containerCustomReflow: function(e) {
                var t = this,
                    n = t.options,
                    i = n.offsetX,
                    r = n.offsetY,
                    o = t.container,
                    a = n.width,
                    s = n.height,
                    l = t.isVertical(),
                    c = e.clone();
                l && s ? c.y2 = c.y1 + s : !l && a && (c.x2 = c.x1 + a), o.reflow(c), c = o.box, o.reflow($t(i, r, i + c.width(), r + c.height()))
            },
            renderVisual: function() {
                this.hasItems() && Kt.fn.renderVisual.call(this)
            }
        }), se = qt.extend({
            init: function(e) {
                var t = this;
                e = e || {}, this._initFields(), this._initCategories(e), qt.fn.init.call(t, e)
            },
            _initFields: function() {
                this._ticks = {}, this.outOfRangeMin = 0, this.outOfRangeMax = 0
            },
            _initCategories: function(e) {
                var t, n, i = (e.categories || []).slice(0),
                    r = wn(e.min),
                    o = wn(e.max);
                e.categories = i, (r || o) && i.length && (e.srcCategories = e.categories, t = r ? It.floor(e.min) : 0, n = o ? e.justified ? It.floor(e.max) + 1 : It.ceil(e.max) : i.length, e.categories = e.categories.slice(t, n))
            },
            options: {
                type: $n,
                categories: [],
                vertical: !1,
                majorGridLines: {
                    visible: !1,
                    width: 1,
                    color: On
                },
                labels: {
                    zIndex: 1
                },
                justified: !1
            },
            rangeIndices: function() {
                var e, t = this.options,
                    n = t.categories.length || 1,
                    i = M(t.min) ? t.min % 1 : 0;
                return e = M(t.max) && t.max % 1 !== 0 && t.max < this.totalRange().max ? n - (1 - t.max % 1) : n - (t.justified ? 1 : 0), {
                    min: i,
                    max: e
                }
            },
            totalRangeIndices: function(e) {
                var t, n, i = this.options,
                    r = M(i.min) ? i.min : 0;
                return t = M(i.max) ? i.max : M(i.min) ? r + i.categories.length : (i.srcCategories || i.categories).length - (i.justified ? 1 : 0) || 1, e && (n = this.totalRange(), r = kn(r, 0, n.max), t = kn(t, 0, n.max)), {
                    min: r,
                    max: t
                }
            },
            range: function() {
                var e = this.options;
                return {
                    min: M(e.min) ? e.min : 0,
                    max: M(e.max) ? e.max : e.categories.length
                }
            },
            totalRange: function() {
                var e = this.options;
                return {
                    min: 0,
                    max: It.max(this._seriesMax || 0, (e.srcCategories || e.categories).length) - (e.justified ? 1 : 0)
                }
            },
            getScale: function() {
                var e = this.rangeIndices(),
                    t = e.min,
                    n = e.max,
                    i = this.lineBox(),
                    r = this.options.vertical ? i.height() : i.width(),
                    o = r / (n - t || 1);
                return o * (this.options.reverse ? -1 : 1)
            },
            getTickPositions: function(e) {
                for (var t = this, n = t.options, i = n.vertical, r = t.lineBox(), o = n.reverse, a = t.getScale(), s = t.rangeIndices(), l = s.min, c = s.max, d = l % 1 !== 0 ? It.floor(l / 1) + e : l, u = r[(i ? oo : ro) + (o ? 2 : 1)], h = []; c >= d;) h.push(u + vn(a * (d - l), ti)), d += e;
                return h
            },
            getLabelsTickPositions: function() {
                var e = this.getMajorTickPositions().slice(0),
                    t = this.rangeIndices(),
                    n = this.getScale(),
                    i = this.lineBox(),
                    r = this.options,
                    o = r.vertical ? oo : ro,
                    a = r.reverse ? 2 : 1,
                    s = r.reverse ? 1 : 2;
                return t.min % 1 !== 0 && e.unshift(i[o + a] - n * (t.min % 1)), t.max % 1 !== 0 && e.push(i[o + s] + n * (1 - t.max % 1)), e
            },
            labelTickIndex: function(e) {
                var t = e.index,
                    n = this.rangeIndices();
                return n.min > 0 && (t -= It.floor(n.min)), t
            },
            arrangeLabels: function() {
                qt.fn.arrangeLabels.call(this), this.hideOutOfRangeLabels()
            },
            hideOutOfRangeLabels: function() {
                var e = this.box,
                    t = this.labels,
                    n = this.options.vertical ? oo : ro,
                    i = e[n + 1],
                    r = e[n + 2],
                    o = t[0],
                    a = yn(t);
                t.length && ((o.box[n + 1] > r || i > o.box[n + 2]) && (o.options.visible = !1), (a.box[n + 1] > r || i > a.box[n + 2]) && (a.options.visible = !1))
            },
            getMajorTickPositions: function() {
                return this.getTicks().majorTicks
            },
            getMinorTickPositions: function() {
                return this.getTicks().minorTicks
            },
            getTicks: function() {
                var e, t = this,
                    n = t._ticks,
                    i = t.options,
                    r = t.rangeIndices(),
                    o = i.reverse,
                    a = i.justified,
                    s = t.lineBox();
                return e = s.getHash() + r.min + "," + r.max + o + a, n._hash !== e && (n._hash = e, n.majorTicks = t.getTickPositions(1), n.minorTicks = t.getTickPositions(.5)), n
            },
            getSlot: function(e, t, n) {
                var i, r, o = this,
                    a = o.options,
                    s = a.reverse,
                    l = a.justified,
                    c = a.vertical ? oo : ro,
                    d = o.lineBox(),
                    u = o.rangeIndices(),
                    h = u.min,
                    f = this.getScale(),
                    p = d[c + (s ? 2 : 1)],
                    m = d.clone(),
                    g = !wn(t);
                return e = Dn(e, 0), t = Dn(t, e), t = It.max(t - 1, e), t = It.max(e, t), i = p + (e - h) * f, r = p + (t + 1 - h) * f, g && l && (r = i), n && (i = kn(i, d[c + 1], d[c + 2]), r = kn(r, d[c + 1], d[c + 2])), m[c + 1] = s ? r : i, m[c + 2] = s ? i : r, m
            },
            pointCategoryIndex: function(e) {
                var t, n, i, r = this,
                    o = r.options,
                    a = o.reverse,
                    s = o.justified,
                    l = o.vertical ? oo : ro,
                    c = r.lineBox(),
                    d = r.rangeIndices(),
                    u = a ? d.max : d.min,
                    h = this.getScale(),
                    f = c[l + 1],
                    p = c[l + 2],
                    m = e[l];
                return f > m || m > p ? null : (t = m - f, n = t / h, n = u + n, i = n % 1, s ? n = It.round(n) : 0 === i && n > 0 && n--, It.floor(n))
            },
            getCategory: function(e) {
                var t = this.pointCategoryIndex(e);
                return null === t ? null : this.options.categories[t]
            },
            categoryIndex: function(e) {
                var t = this.options,
                    n = N(e, t.srcCategories || t.categories);
                return n - It.floor(t.min || 0)
            },
            translateRange: function(e) {
                var t = this,
                    n = t.options,
                    i = t.lineBox(),
                    r = n.vertical ? i.height() : i.width(),
                    o = n.categories.length,
                    a = r / o,
                    s = vn(e / a, di);
                return {
                    min: s,
                    max: o + s
                }
            },
            zoomRange: function(e) {
                var n = this.totalRangeIndices(),
                    i = this.totalRange(),
                    r = i.max,
                    o = i.min,
                    a = kn(n.min + e, o, r),
                    s = kn(n.max - e, o, r);
                return s - a > 0 ? {
                    min: a,
                    max: s
                } : t
            },
            scaleRange: function(e) {
                var t = this,
                    n = t.options,
                    i = n.categories.length,
                    r = e * i;
                return {
                    min: -r,
                    max: i + r
                }
            },
            labelsCount: function() {
                var e = this.labelsRange();
                return e.max - e.min
            },
            labelsRange: function() {
                var e, t = this.options,
                    n = t.labels,
                    i = t.justified,
                    r = this.totalRangeIndices(!0),
                    o = r.min,
                    a = r.max,
                    s = It.floor(o);
                return i ? (o = It.ceil(o), a = It.floor(a)) : (o = It.floor(o), a = It.ceil(a)), e = o > n.skip ? n.skip + n.step * It.ceil((o - n.skip) / n.step) : n.skip, {
                    min: e - s,
                    max: (t.categories.length ? a + (i ? 1 : 0) : 0) - s
                }
            },
            createAxisLabel: function(e, t) {
                var n = this,
                    i = n.options,
                    r = i.dataItems ? i.dataItems[e] : null,
                    o = Dn(i.categories[e], ""),
                    a = n.axisLabelText(o, r, t);
                return new Gt(o, a, e, r, t)
            },
            shouldRenderNote: function(e) {
                var t = this.options.categories;
                return t.length && t.length > e && e >= 0
            },
            pan: function(e) {
                var t = this.totalRangeIndices(!0),
                    n = this.getScale(),
                    i = vn(e / n, di),
                    r = this.totalRange(),
                    o = t.min + i,
                    a = t.max + i;
                return this.limitRange(o, a, 0, r.max, i)
            },
            pointsRange: function(e, t) {
                var n = this,
                    i = n.options,
                    r = i.reverse,
                    o = i.vertical ? oo : ro,
                    a = n.lineBox(),
                    s = n.totalRangeIndices(!0),
                    l = this.getScale(),
                    c = a[o + (r ? 2 : 1)],
                    d = e[o] - c,
                    u = t[o] - c,
                    h = s.min + d / l,
                    f = s.min + u / l;
                return {
                    min: It.min(h, f),
                    max: It.max(h, f)
                }
            }
        }), le = se.extend({
            init: function(e) {
                var t, n, i = this;
                e = e || {}, e = Ot({
                    roundToBaseUnit: !0
                }, e, {
                    categories: p(e.categories),
                    min: p(e.min),
                    max: p(e.max)
                }), e.userSetBaseUnit = e.userSetBaseUnit || e.baseUnit, e.userSetBaseUnitStep = e.userSetBaseUnitStep || e.baseUnitStep, e.categories && e.categories.length > 0 ? (t = (e.baseUnit || "").toLowerCase(), n = t !== Pn && !pn(t, fo), n && (e.baseUnit = i.defaultBaseUnit(e)), (t === Pn || e.baseUnitStep === Rn) && i.autoBaseUnit(e), this._groupsStart = g(e.categories[0], 0, e.baseUnit, e.weekStartDay), i.groupCategories(e)) : e.baseUnit = e.baseUnit || si, this._initFields(), qt.fn.init.call(i, e)
            },
            options: {
                type: ai,
                labels: {
                    dateFormats: mo
                },
                autoBaseUnitSteps: {
                    seconds: [1, 2, 5, 15, 30],
                    minutes: [1, 2, 5, 15, 30],
                    hours: [1, 2, 3],
                    days: [1, 2, 3],
                    weeks: [1, 2],
                    months: [1, 2, 3, 6],
                    years: [1, 2, 3, 5, 10, 25, 50]
                },
                maxDateGroups: 10
            },
            shouldRenderNote: function(e) {
                var t = this,
                    n = t.range(),
                    i = t.options.categories || [];
                return hn(e, n.min) >= 0 && hn(e, n.max) <= 0 && i.length
            },
            parseNoteValue: function(e) {
                return p(e)
            },
            translateRange: function(e) {
                var t, n, i = this,
                    r = i.options,
                    o = r.baseUnit,
                    a = r.weekStartDay,
                    s = i.lineBox(),
                    l = r.vertical ? s.height() : s.width(),
                    c = i.range(),
                    d = l / (c.max - c.min),
                    u = vn(e / d, di);
                return c.min && c.max && (t = k(r.min || c.min, u), n = k(r.max || c.max, u), c = {
                    min: g(t, 0, o, a),
                    max: g(n, 0, o, a)
                }), c
            },
            scaleRange: function(e) {
                var t, n = this,
                    i = It.abs(e),
                    r = n.range(),
                    o = r.min,
                    a = r.max;
                if (r.min && r.max) {
                    for (; i--;) r = w(o, a), t = It.round(.1 * r), 0 > e ? (o = k(o, t), a = k(a, -t)) : (o = k(o, -t), a = k(a, t));
                    r = {
                        min: o,
                        max: a
                    }
                }
                return r
            },
            defaultBaseUnit: function(e) {
                var t, n, i, r, o, a = e.categories,
                    s = wn(a) ? a.length : 0,
                    l = Gi;
                for (t = 0; s > t; t++) n = a[t], n && r && (i = y(n, r), i > 0 && (l = It.min(l, i), o = l >= Ur ? ao : l >= Vr - 3 * Nr ? Qi : l >= Or ? no : l >= Nr ? si : l >= Hr ? Ii : l >= Lr ? Ki : xr)), r = n;
                return o || si
            },
            _categoryRange: function(e) {
                var t = e._range;
                return t || (t = e._range = xn(e)), t
            },
            totalRange: function() {
                return {
                    min: 0,
                    max: this.options.categories.length
                }
            },
            rangeIndices: function() {
                var e = this.options,
                    t = e.baseUnit,
                    n = e.baseUnitStep || 1,
                    i = e.categories,
                    r = this.categoriesRange(),
                    o = p(e.min || r.min),
                    a = p(e.max || r.max),
                    s = 0,
                    l = 0;
                return i.length && (s = C(o, i[0], t, n), l = C(a, i[0], t, n), e.roundToBaseUnit && (s = It.floor(s), l = e.justified ? It.floor(l) : It.ceil(l))), {
                    min: s,
                    max: l
                }
            },
            labelsRange: function() {
                var e = this.options,
                    t = e.labels,
                    n = this.rangeIndices(),
                    i = It.floor(n.min),
                    r = It.ceil(n.max);
                return {
                    min: i + t.skip,
                    max: e.categories.length ? r + (e.justified ? 1 : 0) : 0
                }
            },
            categoriesRange: function() {
                var e = this.options,
                    t = this._categoryRange(e.srcCategories || e.categories),
                    n = p(t.max);
                return !e.justified && E(n, this._roundToTotalStep(n, e, !1)) && (n = this._roundToTotalStep(n, e, !0, !0)), {
                    min: p(t.min),
                    max: n
                }
            },
            currentRange: function() {
                var e = this.options,
                    t = e.roundToBaseUnit !== !1,
                    n = this.categoriesRange(),
                    i = e.min,
                    r = e.max;
                return i || (i = t ? this._roundToTotalStep(n.min, e, !1) : n.min), r || (r = t ? this._roundToTotalStep(n.max, e, !e.justified) : n.max), {
                    min: i,
                    max: r
                }
            },
            datesRange: function() {
                var e = this._categoryRange(this.options.srcCategories || this.options.categories);
                return {
                    min: p(e.min),
                    max: p(e.max)
                }
            },
            pan: function(e) {
                var n, i, r, o = this,
                    a = o.options,
                    s = a.baseUnit,
                    l = o.lineBox(),
                    c = a.vertical ? l.height() : l.width(),
                    d = this.currentRange(),
                    u = this.totalLimits(),
                    h = d.min,
                    f = d.max,
                    g = c / (f - h),
                    v = vn(e / g, di);
                return i = k(h, v), r = k(f, v), n = this.limitRange(m(i), m(r), m(u.min), m(u.max), v), n ? (n.min = p(n.min), n.max = p(n.max), n.baseUnit = s, n.baseUnitStep = a.baseUnitStep || 1, n.userSetBaseUnit = a.userSetBaseUnit, n.userSetBaseUnitStep = a.userSetBaseUnitStep, n) : t
            },
            pointsRange: function(e, t) {
                var n = se.fn.pointsRange.call(this, e, t),
                    i = this.currentRange(),
                    r = this.rangeIndices(),
                    o = w(i.max, i.min) / (r.max - r.min),
                    a = this.options,
                    s = k(i.min, n.min * o),
                    l = k(i.min, n.max * o);
                return {
                    min: s,
                    max: l,
                    baseUnit: a.userSetBaseUnit,
                    baseUnitStep: a.userSetBaseUnitStep
                }
            },
            zoomRange: function(e) {
                var n, i, r, o, a, s, l, c, d, u = this.options,
                    h = this.totalLimits(),
                    f = this.currentRange(),
                    m = u.baseUnit,
                    v = u.baseUnitStep || 1,
                    _ = u.weekStartDay,
                    b = f.max,
                    y = f.min,
                    x = g(y, e * v, m, _),
                    C = g(b, -e * v, m, _);
                if (u.userSetBaseUnit == Pn)
                    if (n = u.autoBaseUnitSteps, i = u.maxDateGroups, r = N(m, fo), a = w(C, x), s = yn(n[m]) * i * Wr[m], l = w(b, y), Wr[m] > a && m !== xr) m = fo[r - 1], o = yn(n[m]), c = (l - (i - 1) * o * Wr[m]) / 2, x = k(y, c), C = k(b, -c);
                    else if (a > s && m !== ao) {
                        d = 0;
                        do {
                            r++, m = fo[r], d = 0, c = 2 * Wr[m];
                            do o = n[m][d], d++; while (n[m].length > d && l > c * o)
                        } while (m !== ao && l > c * o);
                        c = (c * o - l) / 2, c > 0 && (x = k(y, -c), C = k(b, c), x = k(x, kn(C, h.min, h.max) - C), C = k(C, kn(x, h.min, h.max) - x))
                    }
                return x = p(kn(x, h.min, h.max)), C = p(kn(C, h.min, h.max)), w(C, x) > 0 ? {
                    min: x,
                    max: C,
                    baseUnit: u.userSetBaseUnit,
                    baseUnitStep: u.userSetBaseUnitStep
                } : t
            },
            totalLimits: function() {
                var e = this.options,
                    t = this.datesRange(),
                    n = this._roundToTotalStep(p(t.min), e, !1),
                    i = t.max;
                return e.justified || (i = this._roundToTotalStep(i, e, !0, E(i, this._roundToTotalStep(i, e, !1)))), {
                    min: n,
                    max: i
                }
            },
            range: function(e) {
                e = e || this.options;
                var t = e.categories,
                    n = e.baseUnit === Pn,
                    i = n ? fo[0] : e.baseUnit,
                    r = e.baseUnitStep || 1,
                    o = {
                        baseUnit: i,
                        baseUnitStep: r,
                        weekStartDay: e.weekStartDay
                    },
                    a = this._categoryRange(t),
                    s = p(e.min || a.min),
                    l = p(e.max || a.max);
                return {
                    min: this._roundToTotalStep(s, o, !1),
                    max: this._roundToTotalStep(l, o, !0, !0)
                }
            },
            autoBaseUnit: function(e) {
                for (var t, n, i, r = this, o = this._categoryRange(e.categories), a = p(e.min || o.min), s = p(e.max || o.max), l = e.baseUnit === Pn, c = 0, d = l ? fo[c++] : e.baseUnit, u = s - a, h = u / Wr[d], f = h, m = e.maxDateGroups || r.options.maxDateGroups, g = Ot({}, r.options.autoBaseUnitSteps, e.autoBaseUnitSteps); !n || h >= m;)
                    if (t = t || g[d].slice(0), i = t.shift()) n = i, h = f / n;
                    else {
                        if (d === yn(fo)) {
                            n = It.ceil(f / m);
                            break
                        }
                        if (!l) {
                            h > m && (n = It.ceil(f / m));
                            break
                        }
                        d = fo[c++] || yn(fo), f = u / Wr[d], t = null
                    } e.baseUnitStep = n, e.baseUnit = d
            },
            _timeScale: function() {
                var e, t, n, i = this,
                    r = i.range(),
                    o = i.options,
                    a = i.lineBox(),
                    s = o.vertical,
                    l = s ? a.height() : a.width();
                return o.justified && o._collapse !== !1 ? (t = this._categoryRange(o.categories), n = m(t.max), e = p(n) - r.min) : e = r.max - r.min, l / e
            },
            groupCategories: function(e) {
                var t, n, i = this,
                    r = e.categories,
                    o = p(Sn(r)),
                    a = e.baseUnit,
                    s = e.baseUnitStep || 1,
                    l = i.range(e),
                    c = l.max,
                    d = [];
                for (t = l.min; c > t && (d.push(t), n = g(t, s, a, e.weekStartDay), !(n > o) || e.max); t = n);
                e.srcCategories = r, e.categories = d
            },
            _roundToTotalStep: function(e, t, n, i) {
                var r, o, a, s, l;
                return t = t || this.options, r = t.baseUnit, o = t.baseUnitStep || 1, a = this._groupsStart, a ? (s = C(e, a, r, o), l = n ? It.ceil(s) : It.floor(s), i && l++, g(a, l * o, r, t.weekStartDay)) : g(e, n ? o : 0, r, t.weekStartDay)
            },
            createAxisLabel: function(e, n) {
                var i, r, o = this.options,
                    a = o.dataItems ? o.dataItems[e] : null,
                    s = o.categories[e],
                    l = o.baseUnit,
                    c = !0,
                    d = n.dateFormats[l];
                return o.justified ? (i = _(s, l, o.weekStartDay), c = E(i, s)) : o.roundToBaseUnit || (c = !E(this.range().max, s)), c && (n.format = n.format || d, r = this.axisLabelText(s, a, n)) ? new Gt(s, r, e, a, n) : t
            },
            categoryIndex: function(e) {
                var t = this,
                    n = t.options,
                    i = n.categories,
                    r = -1;
                return i.length && (r = It.floor(C(p(e), i[0], n.baseUnit, n.baseUnitStep || 1))), r
            },
            getSlot: function(e, t, n) {
                var i = this;
                return typeof e === lr && (e = i.categoryIndex(e)), typeof t === lr && (t = i.categoryIndex(t)), se.fn.getSlot.call(i, e, t, n)
            }
        }), ce = qt.extend({
            init: function(e, t, n) {
                var i = this;
                n = n || {}, Ot(n, {
                    min: p(n.min),
                    max: p(n.max),
                    axisCrossingValue: p(n.axisCrossingValues || n.axisCrossingValue)
                }), n = i.applyDefaults(p(e), p(t), n), qt.fn.init.call(i, n)
            },
            options: {
                type: ai,
                majorGridLines: {
                    visible: !0,
                    width: 1,
                    color: On
                },
                labels: {
                    dateFormats: mo
                }
            },
            applyDefaults: function(e, n, i) {
                var r = this,
                    o = i.min || e,
                    a = i.max || n,
                    s = i.baseUnit || (a && o ? r.timeUnits(y(a, o)) : Ii),
                    l = Wr[s],
                    c = _(m(o) - 1, s) || p(a),
                    d = b(m(a) + 1, s),
                    u = i.majorUnit ? i.majorUnit : t,
                    h = u || jt.ceil(jt.autoMajorUnit(c.getTime(), d.getTime()), l) / l,
                    f = x(c, d, s),
                    v = jt.ceil(f, h),
                    w = v - f,
                    k = It.floor(w / 2),
                    C = w - k;
                return i.baseUnit || delete i.baseUnit, i.baseUnit = i.baseUnit || s, i.min = i.min || g(c, -k, s), i.max = i.max || g(d, C, s), i.minorUnit = i.minorUnit || h / 5, i.majorUnit = h, this.totalMin = m(_(m(e) - 1, s)), this.totalMax = m(b(m(n) + 1, s)), i
            },
            range: function() {
                var e = this.options;
                return {
                    min: e.min,
                    max: e.max
                }
            },
            getDivisions: function(e) {
                var t = this.options;
                return It.floor(x(t.min, t.max, t.baseUnit) / e + 1)
            },
            getTickPositions: function(e) {
                var t, n, i, r = this.options,
                    o = r.vertical,
                    a = r.reverse,
                    s = this.lineBox(),
                    l = (o ? -1 : 1) * (a ? -1 : 1),
                    c = 1 === l ? 1 : 2,
                    d = s[(o ? oo : ro) + c],
                    u = this.getDivisions(e),
                    h = w(r.max, r.min),
                    f = o ? s.height() : s.width(),
                    p = f / h,
                    m = [d];
                for (t = 1; u > t; t++) n = g(r.min, t * e, r.baseUnit), i = d + w(n, r.min) * p * l, m.push(vn(i, ti));
                return m
            },
            getMajorTickPositions: function() {
                var e = this;
                return e.getTickPositions(e.options.majorUnit)
            },
            getMinorTickPositions: function() {
                var e = this;
                return e.getTickPositions(e.options.minorUnit)
            },
            getSlot: function(e, t, n) {
                return tn.fn.getSlot.call(this, p(e), p(t), n)
            },
            getValue: function(e) {
                var t = tn.fn.getValue.call(this, e);
                return null !== t ? p(t) : null
            },
            labelsCount: function() {
                return this.getDivisions(this.options.majorUnit)
            },
            createAxisLabel: function(e, t) {
                var n, i, r = this.options,
                    o = e * r.majorUnit,
                    a = r.min;
                return o > 0 && (a = g(a, o, r.baseUnit)), n = t.dateFormats[r.baseUnit], t.format = t.format || n, i = this.axisLabelText(a, null, t),
                    new Gt(a, i, e, null, t)
            },
            timeUnits: function(e) {
                var t = Ii;
                return e >= Ur ? t = ao : e >= Vr ? t = Qi : e >= Or ? t = no : e >= Nr && (t = si), t
            },
            translateRange: function(e, t) {
                var n = this,
                    i = n.options,
                    r = i.baseUnit,
                    o = i.weekStartDay,
                    a = n.lineBox(),
                    s = i.vertical ? a.height() : a.width(),
                    l = n.range(),
                    c = s / w(l.max, l.min),
                    d = vn(e / c, di),
                    u = k(i.min, d),
                    h = k(i.max, d);
                return t || (u = g(u, 0, r, o), h = g(h, 0, r, o)), {
                    min: u,
                    max: h
                }
            },
            scaleRange: function(e) {
                for (var t, n, i = this, r = i.options, o = It.abs(e), a = r.min, s = r.max; o--;) t = w(a, s), n = It.round(.1 * t), 0 > e ? (a = k(a, n), s = k(s, -n)) : (a = k(a, -n), s = k(s, n));
                return {
                    min: a,
                    max: s
                }
            },
            shouldRenderNote: function(e) {
                var t = this.range();
                return hn(e, t.min) >= 0 && hn(e, t.max) <= 0
            },
            pan: function(e) {
                var n = this.translateRange(e, !0),
                    i = this.limitRange(m(n.min), m(n.max), this.totalMin, this.totalMax);
                return i ? {
                    min: p(i.min),
                    max: p(i.max)
                } : t
            },
            pointsRange: function(e, t) {
                var n = this.getValue(e),
                    i = this.getValue(t),
                    r = It.min(n, i),
                    o = It.max(n, i);
                return {
                    min: p(r),
                    max: p(o)
                }
            },
            zoomRange: function(e) {
                var t = this.scaleRange(e),
                    n = p(kn(m(t.min), this.totalMin, this.totalMax)),
                    i = p(kn(m(t.max), this.totalMin, this.totalMax));
                return {
                    min: n,
                    max: i
                }
            }
        }), de = Kt.extend({
            options: {
                vertical: !1,
                gap: 0,
                spacing: 0
            },
            reflow: function(e) {
                var t, n, i = this,
                    r = i.options,
                    o = r.vertical,
                    a = o ? oo : ro,
                    s = i.children,
                    l = r.gap,
                    c = r.spacing,
                    d = s.length,
                    u = d + l + c * (d - 1),
                    h = (o ? e.height() : e.width()) / u,
                    f = e[a + 1] + h * (l / 2);
                for (n = 0; d > n; n++) t = (s[n].box || e).clone(), t[a + 1] = f, t[a + 2] = f + h, s[n].reflow(t), d - 1 > n && (f += h * c), f += h
            }
        }), ue = Kt.extend({
            options: {
                vertical: !0
            },
            reflow: function(e) {
                var t, n, i, r = this.options,
                    o = r.vertical,
                    a = o ? ro : oo,
                    s = this.children,
                    l = this.box = new $t,
                    c = s.length;
                for (t = 0; c > t; t++) n = s[t], n.visible !== !1 && (i = n.box.clone(), i.snapTo(e, a), 0 === t && (l = this.box = i.clone()), n.reflow(i), l.wrap(i))
            }
        }), he = {
            click: function(e, t) {
                return e.trigger(Dr, this.eventArgs(t))
            },
            hover: function(e, t) {
                return e.trigger(Ar, this.eventArgs(t))
            },
            eventArgs: function(t) {
                return {
                    value: this.value,
                    percentage: this.percentage,
                    category: this.category,
                    series: this.series,
                    dataItem: this.dataItem,
                    runningTotal: this.runningTotal,
                    total: this.total,
                    element: e((t || {}).target),
                    originalEvent: t,
                    point: this
                }
            }
        }, fe = {
            createNote: function() {
                var e = this,
                    t = e.options.notes,
                    n = e.noteText || t.label.text;
                t.visible !== !1 && wn(n) && null !== n && (e.note = new Zt(e.value, n, e.dataItem, e.category, e.series, e.options.notes), e.append(e.note))
            }
        }, pe = Kt.extend({
            init: function(e, t) {
                var n = this;
                Kt.fn.init.call(n), n.options = t, n.color = t.color || io, n.aboveAxis = Dn(n.options.aboveAxis, !0), n.value = e
            },
            defaults: {
                border: {
                    width: 1
                },
                vertical: !0,
                overlay: {
                    gradient: Ai
                },
                labels: {
                    visible: !1,
                    format: "{0}"
                },
                opacity: 1,
                notes: {
                    label: {}
                }
            },
            render: function() {
                this._rendered || (this._rendered = !0, this.createLabel(), this.createNote(), this.errorBar && this.append(this.errorBar))
            },
            createLabel: function() {
                var e, t, n = this.options,
                    i = n.labels;
                i.visible && (i.template ? (t = Wt(i.template), e = t({
                    dataItem: this.dataItem,
                    category: this.category,
                    value: this.value,
                    percentage: this.percentage,
                    runningTotal: this.runningTotal,
                    total: this.total,
                    series: this.series
                })) : e = this.formatValue(i.format), this.label = new ie(e, Ot({
                    vertical: n.vertical
                }, n.labels)), this.append(this.label))
            },
            formatValue: function(e) {
                return this.owner.formatPointValue(this, e)
            },
            reflow: function(e) {
                var t, n, i;
                if (this.render(), t = this, n = t.label, t.box = e, n && (n.options.aboveAxis = t.aboveAxis, n.reflow(e)), t.note && t.note.reflow(e), t.errorBars)
                    for (i = 0; t.errorBars.length > i; i++) t.errorBars[i].reflow(e)
            },
            createVisual: function() {
                var e, t = this,
                    n = t.box,
                    i = t.options,
                    r = i.visual;
                t.visible !== !1 && (Kt.fn.createVisual.call(t), r ? (e = this.rectVisual = r({
                    category: t.category,
                    dataItem: t.dataItem,
                    value: t.value,
                    sender: t.getChart(),
                    series: t.series,
                    percentage: t.percentage,
                    runningTotal: t.runningTotal,
                    total: t.total,
                    rect: n.toRect(),
                    createVisual: function() {
                        var e = new En.Group;
                        return t.createRect(e), e
                    },
                    options: i
                }), e && t.visual.append(e)) : n.width() > 0 && n.height() > 0 && t.createRect(t.visual))
            },
            createRect: function(e) {
                var n, i, r, o, a = this.options,
                    s = a.border,
                    l = wn(s.opacity) ? s.opacity : a.opacity,
                    c = this.box.toRect();
                c.size.width = Math.round(c.size.width), n = this.rectVisual = En.Path.fromRect(c, {
                    fill: {
                        color: this.color,
                        opacity: a.opacity
                    },
                    stroke: {
                        color: this.getBorderColor(),
                        width: s.width,
                        opacity: l,
                        dashType: s.dashType
                    }
                }), i = this.box.width(), r = this.box.height(), o = a.vertical ? i : r, o > Ln && (dn(n), (1 > i || 1 > r) && (n.options.stroke.lineJoin = "round")), e.append(n), G(a) && e.append(this.createGradientOverlay(n, {
                    baseColor: this.color
                }, Ot({
                    end: a.vertical ? t : [0, 1]
                }, a.overlay)))
            },
            createHighlight: function(e) {
                var t = En.Path.fromRect(this.box.toRect(), e);
                return dn(t)
            },
            highlightVisual: function() {
                return this.rectVisual
            },
            highlightVisualArgs: function() {
                return {
                    options: this.options,
                    rect: this.box.toRect(),
                    visual: this.rectVisual
                }
            },
            getBorderColor: function() {
                var e = this,
                    t = e.options,
                    n = e.color,
                    i = t.border,
                    r = i.color,
                    o = i._brightness || Hn;
                return wn(r) || (r = new Qt(n).brightness(o).toHex()), r
            },
            tooltipAnchor: function(e, t) {
                var n, i, r, o, a = this,
                    s = a.options,
                    l = a.box,
                    c = s.vertical,
                    d = a.aboveAxis,
                    u = a.owner.pane.clipBox() || l;
                return c ? (n = It.min(l.x2, u.x2) + $r, i = d ? It.max(l.y1, u.y1) : It.min(l.y2, u.y2) - t) : (r = It.max(l.x1, u.x1), o = It.min(l.x2, u.x2), s.isStacked ? (n = d ? o - e : r, i = It.max(l.y1, u.y1) - t - $r) : (n = d ? o + $r : r - e - $r, i = It.max(l.y1, u.y1))), new nn(n, i)
            },
            overlapsBox: function(e) {
                return this.box.overlaps(e)
            }
        }), Ot(pe.fn, he), Ot(pe.fn, fe), me = En.Animation.extend({
            options: {
                duration: Mi
            },
            setup: function() {
                var e, t, n = this.element,
                    i = this.options,
                    r = n.bbox();
                r ? (this.origin = i.origin, e = i.vertical ? oo : ro, t = this.fromScale = new An.Point(1, 1), t[e] = Er, n.transform(An.transform().scale(t.x, t.y))) : this.abort()
            },
            step: function(e) {
                var t = mn(this.fromScale.x, 1, e),
                    n = mn(this.fromScale.y, 1, e);
                this.element.transform(An.transform().scale(t, n, this.origin))
            },
            abort: function() {
                En.Animation.fn.abort.call(this), this.element.transform(null)
            }
        }), En.AnimationFactory.current.register(Bn, me), ge = En.Animation.extend({
            options: {
                duration: 200,
                easing: Ui
            },
            setup: function() {
                this.fadeTo = this.element.opacity(), this.element.opacity(0)
            },
            step: function(e) {
                this.element.opacity(e * this.fadeTo)
            }
        }), En.AnimationFactory.current.register(Ci, ge), ve = function(e, t, n) {
            var i = this;
            i.initGlobalRanges(e, t, n)
        }, ve.prototype = ve.fn = {
            percentRegex: /percent(?:\w*)\((\d+)\)/,
            standardDeviationRegex: RegExp("^" + Rr + "(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),
            initGlobalRanges: function(e, t, n) {
                var i, r, o, a, s, l = this,
                    c = t.data,
                    d = l.standardDeviationRegex.exec(e);
                d ? (l.valueGetter = l.createValueGetter(t, n), i = l.getAverage(c), r = l.getStandardDeviation(c, i, !1), o = d[1] ? parseFloat(d[1]) : 1, a = {
                    low: i.value - r * o,
                    high: i.value + r * o
                }, l.globalRange = function() {
                    return a
                }) : e.indexOf && e.indexOf(Mr) >= 0 && (l.valueGetter = l.createValueGetter(t, n), s = l.getStandardError(c, l.getAverage(c)), l.globalRange = function(e) {
                    return {
                        low: e - s,
                        high: e + s
                    }
                })
            },
            createValueGetter: function(e, t) {
                var n, i, r, o = e.data,
                    a = ne.current,
                    s = a.valueFields(e),
                    l = wn(o[0]) ? o[0] : {};
                return At(l) ? (n = t ? N(t, s) : 0, r = Vt("[" + n + "]")) : M(l) ? r = Vt() : typeof l === lr && (i = a.sourceFields(e, s), r = Vt(i[N(t, s)])), r
            },
            getErrorRange: function(e, t) {
                var n, i, r, o, a = this;
                if (wn(t)) {
                    if (a.globalRange) return a.globalRange(e);
                    if (At(t)) n = e - t[0], i = e + t[1];
                    else if (M(r = parseFloat(t))) n = e - r, i = e + r;
                    else {
                        if (!(r = a.percentRegex.exec(t))) throw Error("Invalid ErrorBar value: " + t);
                        o = e * (parseFloat(r[1]) / 100), n = e - It.abs(o), i = e + It.abs(o)
                    }
                    return {
                        low: n,
                        high: i
                    }
                }
            },
            getStandardError: function(e, t) {
                return this.getStandardDeviation(e, t, !0) / It.sqrt(t.count)
            },
            getStandardDeviation: function(e, t, n) {
                var i, r, o = 0,
                    a = e.length,
                    s = n ? t.count - 1 : t.count;
                for (r = 0; a > r; r++) i = this.valueGetter(e[r]), M(i) && (o += It.pow(i - t.value, 2));
                return It.sqrt(o / s)
            },
            getAverage: function(e) {
                var t, n, i = 0,
                    r = 0,
                    o = e.length;
                for (n = 0; o > n; n++) t = this.valueGetter(e[n]), M(t) && (i += t, r++);
                return {
                    value: i / r,
                    count: r
                }
            }
        }, _e = Kt.extend({
            init: function(e, t) {
                var n = this;
                Kt.fn.init.call(n, t), n.plotArea = e, n.categoryAxis = e.seriesCategoryAxis(t.series[0]), n.valueAxisRanges = {}, n.points = [], n.categoryPoints = [], n.seriesPoints = [], n.seriesOptions = [], n._evalSeries = [], n.render()
            },
            options: {
                series: [],
                invertAxes: !1,
                isStacked: !1,
                clip: !0
            },
            render: function() {
                var e = this;
                e.traverseDataPoints(Pt(e.addValue, e))
            },
            pointOptions: function(e, t) {
                var n, i = this.seriesOptions[t];
                return i || (n = this.pointType().fn.defaults, this.seriesOptions[t] = i = Ot({}, n, {
                    vertical: !this.options.invertAxes
                }, e)), i
            },
            plotValue: function(e) {
                var t, n, i, r, o, a, s, l;
                if (!e) return 0;
                if (this.options.isStacked100 && M(e.value)) {
                    for (t = e.categoryIx, n = this.categoryPoints[t], i = 0, r = [], o = 0; n.length > o; o++)
                        if (a = n[o]) {
                            if (s = e.series.stack, l = a.series.stack, s && l && s.group !== l.group) continue;
                            M(a.value) && (i += It.abs(a.value), r.push(It.abs(a.value)))
                        } if (i > 0) return e.value / i
                }
                return e.value
            },
            plotRange: function(e, t) {
                var n, i, r, o, a, s, l, c, d, u, h, f, p = e.categoryIx,
                    m = this.categoryPoints[p];
                if (this.options.isStacked) {
                    for (t = t || 0, n = this.plotValue(e), i = n >= 0, r = t, o = !1, a = 0; m.length > a && (s = m[a], e !== s); a++) {
                        if (l = e.series.stack, c = s.series.stack, l && c) {
                            if (typeof l === Pr && l !== c) continue;
                            if (l.group && l.group !== c.group) continue
                        }
                        d = this.plotValue(s), (d >= 0 && i || 0 > d && !i) && (r += d, n += d, o = !0, this.options.isStacked100 && (n = It.min(n, 1)))
                    }
                    return o && (r -= t), [r, n]
                }
                return u = e.series, h = this.seriesValueAxis(u), f = this.categoryAxisCrossingValue(h), [f, e.value || f]
            },
            stackLimits: function(e, t) {
                var n, i, r, o, a, s = Gi,
                    l = Yi;
                for (n = 0; this.categoryPoints.length > n; n++)
                    if (i = this.categoryPoints[n])
                        for (r = 0; i.length > r; r++) o = i[r], o && (o.series.stack === t || o.series.axis === e) && (a = this.plotRange(o, 0)[1], wn(a) && isFinite(a) && (l = It.max(l, a), s = It.min(s, a)));
                return {
                    min: s,
                    max: l
                }
            },
            updateStackRange: function() {
                var e, t, n, i, r, o, a = this,
                    s = a.options.series,
                    l = a.options.isStacked,
                    c = {};
                if (l)
                    for (t = 0; s.length > t; t++) n = s[t], i = n.axis, r = i + n.stack, e = c[r], e || (e = a.stackLimits(i, n.stack), o = a.errorTotals, o && (o.negative.length && (e.min = It.min(e.min, Cn(o.negative))), o.positive.length && (e.max = It.max(e.max, Sn(o.positive)))), e.min !== Gi || e.max !== Yi ? c[r] = e : e = null), e && (a.valueAxisRanges[i] = e)
            },
            addErrorBar: function(e, t, n) {
                var i, r = this,
                    o = e.value,
                    a = e.series,
                    s = e.seriesIx,
                    l = e.options.errorBars,
                    c = t.fields[_i],
                    d = t.fields[bi];
                M(c) && M(d) ? i = {
                    low: c,
                    high: d
                } : l && wn(l.value) && (r.seriesErrorRanges = r.seriesErrorRanges || [], r.seriesErrorRanges[s] = r.seriesErrorRanges[s] || new ve(l.value, a, Xr), i = r.seriesErrorRanges[s].getErrorRange(o, l.value)), i && (e.low = i.low, e.high = i.high, r.addPointErrorBar(e, n))
            },
            addPointErrorBar: function(e, t) {
                var n, i, r, o = this,
                    a = e.series,
                    s = e.low,
                    l = e.high,
                    c = !o.options.invertAxes,
                    d = e.options.errorBars;
                o.options.isStacked ? (i = o.stackedErrorRange(e, t), s = i.low, l = i.high) : (r = {
                    categoryIx: t,
                    series: a
                }, o.updateRange({
                    value: s
                }, r), o.updateRange({
                    value: l
                }, r)), n = new Te(s, l, c, o, a, d), e.errorBars = [n], e.append(n)
            },
            stackedErrorRange: function(e, t) {
                var n = this,
                    i = n.plotRange(e, 0)[1] - e.value,
                    r = e.low + i,
                    o = e.high + i;
                return n.errorTotals = n.errorTotals || {
                    positive: [],
                    negative: []
                }, 0 > r && (n.errorTotals.negative[t] = It.min(n.errorTotals.negative[t] || 0, r)), o > 0 && (n.errorTotals.positive[t] = It.max(n.errorTotals.positive[t] || 0, o)), {
                    low: r,
                    high: o
                }
            },
            addValue: function(t, n) {
                var i, r, o = this,
                    a = n.categoryIx,
                    s = n.series,
                    l = n.seriesIx,
                    c = o.categoryPoints[a];
                c || (o.categoryPoints[a] = c = []), i = o.seriesPoints[l], i || (o.seriesPoints[l] = i = []), r = o.createPoint(t, n), r && (e.extend(r, n), r.owner = o, r.dataItem = s.data[a], r.noteText = t.fields.noteText, o.addErrorBar(r, t, a)), o.points.push(r), i.push(r), c.push(r), o.updateRange(t.valueFields, n)
            },
            evalPointOptions: function(e, t, n, i, r, o) {
                var a = {
                        defaults: r._defaults,
                        excluded: ["data", "aggregate", "_events", "tooltip", "template", "visual", "toggle", "_outOfRangeMinPoint", "_outOfRangeMaxPoint"]
                    },
                    s = this._evalSeries[o];
                return wn(s) || (this._evalSeries[o] = s = B(e, {}, a, !0)), s && (e = Ot({}, e), B(e, {
                    value: t,
                    category: n,
                    index: i,
                    series: r,
                    dataItem: r.data[i]
                }, a)), e
            },
            updateRange: function(e, t) {
                var n = this,
                    i = t.series.axis,
                    r = e.value,
                    o = n.valueAxisRanges[i];
                isFinite(r) && null !== r && (o = n.valueAxisRanges[i] = o || {
                    min: Gi,
                    max: Yi
                }, o.min = It.min(o.min, r), o.max = It.max(o.max, r))
            },
            seriesValueAxis: function(e) {
                var t = this.plotArea,
                    n = e.axis,
                    i = n ? t.namedValueAxes[n] : t.valueAxis;
                if (!i) throw Error("Unable to locate value axis with name " + n);
                return i
            },
            reflow: function(e) {
                var t, n, i, r = this,
                    o = 0,
                    a = r.categorySlots = [],
                    s = r.points,
                    l = r.categoryAxis;
                r.traverseDataPoints(function(e, c) {
                    var d, u, h, f, p = c.categoryIx,
                        m = c.series;
                    t = r.pointValue(e), n = r.seriesValueAxis(m), i = s[o++], d = a[p], d || (a[p] = d = r.categorySlot(l, p, n)), i && (u = r.plotRange(i, n.startValue()), h = n.getSlot(u[0], u[1], !r.options.clip), h ? (f = r.pointSlot(d, h), i.aboveAxis = r.aboveAxis(i, n), r.options.isStacked100 && (i.percentage = r.plotValue(i)), r.reflowPoint(i, f)) : i.visible = !1)
                }), r.reflowCategories(a), r.box = e
            },
            aboveAxis: function(e, t) {
                var n = this.categoryAxisCrossingValue(t),
                    i = e.value;
                return t.options.reverse ? n > i : i >= n
            },
            categoryAxisCrossingValue: function(e) {
                var t = this.categoryAxis,
                    n = e.options,
                    i = [].concat(n.axisCrossingValues || n.axisCrossingValue);
                return i[t.axisIndex || 0] || 0
            },
            reflowPoint: function(e, t) {
                e.reflow(t)
            },
            reflowCategories: function() {},
            pointSlot: function(e, t) {
                var n = this,
                    i = n.options,
                    r = i.invertAxes,
                    o = r ? t : e,
                    a = r ? e : t;
                return new $t(o.x1, a.y1, o.x2, a.y2)
            },
            categorySlot: function(e, t) {
                return e.getSlot(t)
            },
            traverseDataPoints: function(e) {
                var t, n, i, r, o, a = this,
                    s = a.options,
                    l = s.series,
                    c = a.categoryAxis.options.categories || [],
                    u = d(l),
                    h = l.length;
                for (n = 0; h > n; n++) this._outOfRangeCallback(l[n], "_outOfRangeMinPoint", n, e);
                for (t = 0; u > t; t++)
                    for (n = 0; h > n; n++) o = l[n], r = c[t], i = this._bindPoint(o, n, t), e(i, {
                        category: r,
                        categoryIx: t,
                        series: o,
                        seriesIx: n
                    });
                for (n = 0; h > n; n++) this._outOfRangeCallback(l[n], "_outOfRangeMaxPoint", n, e)
            },
            _outOfRangeCallback: function(e, t, n, i) {
                var r, o, a = e[t];
                a && (r = a.categoryIx, o = this._bindPoint(e, n, r, a.item), i(o, {
                    category: a.category,
                    categoryIx: r,
                    series: e,
                    seriesIx: n
                }))
            },
            _bindPoint: function(e, t, n, i) {
                var r, o;
                return this._bindCache || (this._bindCache = []), r = this._bindCache[t], r || (r = this._bindCache[t] = []), o = r[n], o || (o = r[n] = ne.current.bindPoint(e, n, i)), o
            },
            formatPointValue: function(e, t) {
                return null === e.value ? "" : un(t, e.value)
            },
            pointValue: function(e) {
                return e.valueFields.value
            }
        }), be = _e.extend({
            options: {
                animation: {
                    type: Bn
                }
            },
            render: function() {
                var e = this;
                _e.fn.render.apply(e), e.updateStackRange()
            },
            pointType: function() {
                return pe
            },
            clusterType: function() {
                return de
            },
            stackType: function() {
                return ue
            },
            stackLimits: function(e, t) {
                var n = _e.fn.stackLimits.call(this, e, t);
                return n
            },
            createPoint: function(e, t) {
                var n, i, r, o, a = this,
                    s = t.categoryIx,
                    l = t.category,
                    c = t.series,
                    d = t.seriesIx,
                    u = a.pointValue(e),
                    h = a.options,
                    f = a.children,
                    p = a.options.isStacked,
                    m = a.pointType(),
                    g = a.clusterType(),
                    v = this.pointOptions(c, d),
                    _ = v.labels;
                return p && _.position == dr && (_.position = Pi), v.isStacked = p, r = e.fields.color || c.color, 0 > u && v.negativeColor && (r = v.negativeColor), v = a.evalPointOptions(v, u, l, s, c, d), zt.isFunction(c.color) && (r = v.color), n = new m(u, v), n.color = r, i = f[s], i || (i = new g({
                    vertical: h.invertAxes,
                    gap: h.gap,
                    spacing: h.spacing
                }), a.append(i)), p ? (o = a.getStackWrap(c, i), o.append(n)) : i.append(n), n
            },
            getStackWrap: function(e, t) {
                var n, i, r, o = e.stack,
                    a = o ? o.group || o : o,
                    s = t.children;
                if (typeof a === Pr) {
                    for (i = 0; s.length > i; i++)
                        if (s[i]._stackGroup === a) {
                            n = s[i];
                            break
                        }
                } else n = s[0];
                return n || (r = this.stackType(), n = new r({
                    vertical: !this.options.invertAxes
                }), n._stackGroup = a, t.append(n)), n
            },
            categorySlot: function(e, t, n) {
                var i, r, o = this,
                    a = o.options,
                    s = e.getSlot(t),
                    l = n.startValue();
                return a.isStacked && (r = n.getSlot(l, l, !0), i = a.invertAxes ? ro : oo, s[i + 1] = s[i + 2] = r[i + 1]), s
            },
            reflowCategories: function(e) {
                var t, n = this,
                    i = n.children,
                    r = i.length;
                for (t = 0; r > t; t++) i[t].reflow(e[t])
            },
            createAnimation: function() {
                this._setAnimationOptions(), Kt.fn.createAnimation.call(this), $(this.options.series) && this._setChildrenAnimation()
            },
            _setChildrenAnimation: function() {
                var e, t, n, i = this.points;
                for (n = 0; i.length > n; n++) e = i[n], t = e.visual, t && wn(t.options.zIndex) && (e.options.animation = this.options.animation, e.createAnimation())
            },
            _setAnimationOptions: function() {
                var e, t, n = this.options,
                    i = n.animation || {};
                this.options.isStacked ? (t = this.seriesValueAxis(n.series[0]), e = t.getSlot(t.startValue())) : e = this.categoryAxis.getSlot(0), i.origin = new An.Point(e.x1, e.y1), i.vertical = !n.invertAxes
            }
        }), we = pe.extend({
            defaults: {
                labels: {
                    format: "{0} - {1}"
                },
                tooltip: {
                    format: "{1}"
                }
            },
            createLabel: function() {
                var e = this.options.labels,
                    t = Ot({}, e, e.from),
                    n = Ot({}, e, e.to);
                t.visible && (this.labelFrom = this._createLabel(t), this.append(this.labelFrom)), n.visible && (this.labelTo = this._createLabel(n), this.append(this.labelTo))
            },
            _createLabel: function(e) {
                var t, n;
                return e.template ? (n = Wt(e.template), t = n({
                    dataItem: this.dataItem,
                    category: this.category,
                    value: this.value,
                    percentage: this.percentage,
                    runningTotal: this.runningTotal,
                    total: this.total,
                    series: this.series
                })) : t = this.formatValue(e.format), new ie(t, Ot({
                    vertical: this.options.vertical
                }, e))
            },
            reflow: function(e) {
                this.render();
                var t = this,
                    n = t.labelFrom,
                    i = t.labelTo;
                t.box = e, n && (n.options.aboveAxis = t.value.from > t.value.to, n.reflow(e)), i && (i.options.aboveAxis = t.value.to > t.value.from, i.reflow(e)), t.note && t.note.reflow(e)
            }
        }), ye = be.extend({
            pointType: function() {
                return we
            },
            pointValue: function(e) {
                return e.valueFields
            },
            formatPointValue: function(e, t) {
                return null === e.value.from && null === e.value.to ? "" : un(t, e.value.from, e.value.to)
            },
            plotLimits: _e.fn.plotLimits,
            plotRange: function(e) {
                return e ? [e.value.from, e.value.to] : 0
            },
            updateRange: function(e, t) {
                var n = this,
                    i = t.series.axis,
                    r = e.from,
                    o = e.to,
                    a = n.valueAxisRanges[i];
                null !== e && M(r) && M(o) && (a = n.valueAxisRanges[i] = a || {
                    min: Gi,
                    max: Yi
                }, a.min = It.min(a.min, r), a.max = It.max(a.max, r), a.min = It.min(a.min, o), a.max = It.max(a.max, o))
            },
            aboveAxis: function(e) {
                var t = e.value;
                return t.to > t.from
            }
        }), ke = _e.extend({
            init: function(e, t) {
                var n = this;
                n.wrapData(t), _e.fn.init.call(n, e, t)
            },
            options: {
                animation: {
                    type: Bn
                }
            },
            wrapData: function(e) {
                var t, n, i, r = e.series;
                for (t = 0; r.length > t; t++) i = r[t], n = i.data, n && !At(n[0]) && typeof n[0] != lr && (i.data = [n])
            },
            reflowCategories: function(e) {
                var t, n = this,
                    i = n.children,
                    r = i.length;
                for (t = 0; r > t; t++) i[t].reflow(e[t])
            },
            plotRange: function(e) {
                var t = e.series,
                    n = this.seriesValueAxis(t),
                    i = this.categoryAxisCrossingValue(n);
                return [i, e.value.current || i]
            },
            createPoint: function(e, t) {
                var n, i, r = this,
                    o = t.categoryIx,
                    a = t.category,
                    s = t.series,
                    l = t.seriesIx,
                    c = e.valueFields,
                    d = r.options,
                    u = r.children,
                    h = Ot({
                        vertical: !d.invertAxes,
                        overlay: s.overlay,
                        categoryIx: o,
                        invertAxes: d.invertAxes
                    }, s),
                    f = e.fields.color || s.color;
                return h = r.evalPointOptions(h, c, a, o, s, l), zt.isFunction(s.color) && (f = h.color), n = new xe(c, h), n.color = f, i = u[o], i || (i = new de({
                    vertical: d.invertAxes,
                    gap: d.gap,
                    spacing: d.spacing
                }), r.append(i)), i.append(n), n
            },
            updateRange: function(e, t) {
                var n = this,
                    i = t.series.axis,
                    r = e.current,
                    o = e.target,
                    a = n.valueAxisRanges[i];
                wn(r) && !isNaN(r) && wn(o && !isNaN(o)) && (a = n.valueAxisRanges[i] = a || {
                    min: Gi,
                    max: Yi
                }, a.min = It.min.apply(It, [a.min, r, o]), a.max = It.max.apply(It, [a.max, r, o]))
            },
            formatPointValue: function(e, t) {
                return un(t, e.value.current, e.value.target)
            },
            pointValue: function(e) {
                return e.valueFields.current
            },
            aboveAxis: function(e) {
                var t = e.value.current;
                return t > 0
            },
            createAnimation: function() {
                var e, t, n = this.points;
                for (this._setAnimationOptions(), t = 0; n.length > t; t++) e = n[t], e.options.animation = this.options.animation, e.createAnimation()
            },
            _setAnimationOptions: be.fn._setAnimationOptions
        }), xe = Kt.extend({
            init: function(e, t) {
                var n = this;
                Kt.fn.init.call(n, t), n.aboveAxis = n.options.aboveAxis, n.color = t.color || io, n.value = e
            },
            options: {
                border: {
                    width: 1
                },
                vertical: !1,
                opacity: 1,
                target: {
                    shape: "",
                    border: {
                        width: 0,
                        color: "green"
                    },
                    line: {
                        width: 2
                    }
                },
                tooltip: {
                    format: "Current: {0}</br>Target: {1}"
                }
            },
            render: function() {
                var e = this,
                    t = e.options;
                e._rendered || (e._rendered = !0, wn(e.value.target) && (e.target = new Ce({
                    type: t.target.shape,
                    background: t.target.color || e.color,
                    opacity: t.opacity,
                    zIndex: t.zIndex,
                    border: t.target.border,
                    vAlign: qr,
                    align: _r
                }), e.append(e.target)), e.createNote())
            },
            reflow: function(e) {
                this.render();
                var t, n = this,
                    i = n.options,
                    r = n.owner,
                    o = n.target,
                    a = i.invertAxes,
                    s = r.seriesValueAxis(n.options),
                    l = r.categorySlot(r.categoryAxis, i.categoryIx, s),
                    c = s.getSlot(n.value.target),
                    d = a ? c : l,
                    u = a ? l : c;
                o && (t = new $t(d.x1, u.y1, d.x2, u.y2), o.options.height = a ? t.height() : i.target.line.width, o.options.width = a ? i.target.line.width : t.width(), o.reflow(t)), n.note && n.note.reflow(e), n.box = e
            },
            createVisual: function() {
                var e, t;
                Kt.fn.createVisual.call(this), e = this.options, t = En.Path.fromRect(this.box.toRect(), {
                    fill: {
                        color: this.color,
                        opacity: e.opacity
                    },
                    stroke: null
                }), e.border.width > 0 && t.options.set("stroke", {
                    color: e.border.color || this.color,
                    width: e.border.width,
                    dashType: e.border.dashType,
                    opacity: Dn(e.border.opacity, e.opacity)
                }), this.bodyVisual = t, dn(t), this.visual.append(t)
            },
            createAnimation: function() {
                this.bodyVisual && (this.animation = En.Animation.create(this.bodyVisual, this.options.animation))
            },
            tooltipAnchor: pe.fn.tooltipAnchor,
            createHighlight: function(e) {
                return En.Path.fromRect(this.box.toRect(), e)
            },
            highlightVisual: function() {
                return this.bodyVisual
            },
            highlightVisualArgs: function() {
                return {
                    rect: this.box.toRect(),
                    visual: this.bodyVisual,
                    options: this.options
                }
            },
            formatValue: function(e) {
                var t = this;
                return t.owner.formatPointValue(t, e)
            }
        }), Ot(xe.fn, he), Ot(xe.fn, fe), Ce = an.extend(), Ot(Ce.fn, he), Se = Kt.extend({
            init: function(e, t, n, i, r, o) {
                var a = this;
                a.low = e, a.high = t, a.isVertical = n, a.chart = i, a.series = r, Kt.fn.init.call(a, o)
            },
            options: {
                animation: {
                    type: Ci,
                    delay: Mi
                },
                endCaps: !0,
                line: {
                    width: 1
                },
                zIndex: 1
            },
            getAxis: function() {},
            reflow: function(e) {
                var t, n = this,
                    i = n.options.endCaps,
                    r = n.isVertical,
                    o = n.getAxis(),
                    a = o.getSlot(n.low, n.high),
                    s = e.center(),
                    l = n.getCapsWidth(e, r),
                    c = r ? s.x : s.y,
                    d = c - l,
                    u = c + l;
                r ? (t = [nn(s.x, a.y1), nn(s.x, a.y2)], i && t.push(nn(d, a.y1), nn(u, a.y1), nn(d, a.y2), nn(u, a.y2)), n.box = $t(d, a.y1, u, a.y2)) : (t = [nn(a.x1, s.y), nn(a.x2, s.y)], i && t.push(nn(a.x1, d), nn(a.x1, u), nn(a.x2, d), nn(a.x2, u)), n.box = $t(a.x1, d, a.x2, u)), n.linePoints = t
            },
            getCapsWidth: function(e, t) {
                var n = t ? e.width() : e.height(),
                    i = It.min(It.floor(n / 2), hi) || hi;
                return i
            },
            createVisual: function() {
                var e = this,
                    t = e.options,
                    n = t.visual;
                n ? e.visual = n({
                    low: e.low,
                    high: e.high,
                    rect: e.box.toRect(),
                    sender: e.getChart(),
                    options: {
                        endCaps: t.endCaps,
                        color: t.color,
                        line: t.line
                    },
                    createVisual: function() {
                        e.createDefaultVisual();
                        var t = e.visual;
                        return delete e.visual, t
                    }
                }) : e.createDefaultVisual()
            },
            createDefaultVisual: function() {
                var e, t, n = this,
                    i = n.options,
                    r = {
                        stroke: {
                            color: i.color,
                            width: i.line.width,
                            dashType: i.line.dashType
                        }
                    },
                    o = n.linePoints;
                for (Kt.fn.createVisual.call(this), e = 0; o.length > e; e += 2) t = new En.Path(r).moveTo(o[e].x, o[e].y).lineTo(o[e + 1].x, o[e + 1].y), this.visual.append(t)
            }
        }), Te = Se.extend({
            getAxis: function() {
                var e = this,
                    t = e.chart,
                    n = e.series,
                    i = t.seriesValueAxis(n);
                return i
            }
        }), De = Se.extend({
            getAxis: function() {
                var e = this,
                    t = e.chart,
                    n = e.series,
                    i = t.seriesAxes(n),
                    r = e.isVertical ? i.y : i.x;
                return r
            }
        }), Ae = Kt.extend({
            init: function(e, t) {
                var n = this;
                Kt.fn.init.call(n), n.value = e, n.options = t, n.aboveAxis = Dn(n.options.aboveAxis, !0), n.tooltipTracking = !0
            },
            defaults: {
                vertical: !0,
                markers: {
                    visible: !0,
                    background: io,
                    size: Vi,
                    type: Qn,
                    border: {
                        width: 2
                    },
                    opacity: 1
                },
                labels: {
                    visible: !1,
                    position: In,
                    margin: fn(3),
                    padding: fn(4),
                    animation: {
                        type: Ci,
                        delay: Mi
                    }
                },
                notes: {
                    label: {}
                },
                highlight: {
                    markers: {
                        border: {}
                    }
                }
            },
            render: function() {
                var e, t = this,
                    n = t.options,
                    i = n.markers,
                    r = n.labels,
                    o = t.value;
                t._rendered || (t._rendered = !0, i.visible && i.size && (t.marker = t.createMarker(), t.append(t.marker)), r.visible && (r.template ? (e = Wt(r.template), o = e({
                    dataItem: t.dataItem,
                    category: t.category,
                    value: t.value,
                    percentage: t.percentage,
                    series: t.series
                })) : r.format && (o = t.formatValue(r.format)), t.label = new ln(o, Ot({
                    align: Yn,
                    vAlign: Yn,
                    margin: {
                        left: 5,
                        right: 5
                    },
                    zIndex: Dn(r.zIndex, this.series.zIndex)
                }, r)), t.append(t.label)), t.createNote(), t.errorBar && t.append(t.errorBar))
            },
            markerBorder: function() {
                var e = this.options.markers,
                    t = e.background,
                    n = Ot({
                        color: this.color
                    }, e.border);
                return wn(n.color) || (n.color = new Qt(t).brightness(Hn).toHex()), n
            },
            createVisual: Mt,
            createMarker: function() {
                var e = this.options.markers,
                    t = new an({
                        type: e.type,
                        width: e.size,
                        height: e.size,
                        rotation: e.rotation,
                        background: e.background,
                        border: this.markerBorder(),
                        opacity: e.opacity,
                        zIndex: Dn(e.zIndex, this.series.zIndex),
                        animation: e.animation,
                        visual: e.visual
                    }, {
                        dataItem: this.dataItem,
                        value: this.value,
                        series: this.series,
                        category: this.category
                    });
                return t
            },
            markerBox: function() {
                return this.marker || (this.marker = this.createMarker(), this.marker.reflow(this._childBox)), this.marker.box
            },
            reflow: function(e) {
                var t, n, i, r, o = this,
                    a = o.options,
                    s = a.vertical,
                    l = o.aboveAxis;
                if (o.render(), o.box = e, t = e.clone(), s ? l ? t.y1 -= t.height() : t.y2 += t.height() : l ? t.x1 += t.width() : t.x2 -= t.width(), o._childBox = t, o.marker && o.marker.reflow(t), o.reflowLabel(t), o.errorBars)
                    for (i = 0; o.errorBars.length > i; i++) o.errorBars[i].reflow(t);
                o.note && (r = o.markerBox(), a.markers.visible && a.markers.size || (n = r.center(), r = $t(n.x, n.y, n.x, n.y)), o.note.reflow(r))
            },
            reflowLabel: function(e) {
                var t = this,
                    n = t.options,
                    i = t.label,
                    r = n.labels.position;
                i && (r = r === In ? qr : r, r = r === Nn ? Un : r, i.reflow(e), i.box.alignTo(t.markerBox(), r), i.reflow(i.box))
            },
            createHighlight: function() {
                var e = this.options.highlight,
                    t = e.markers,
                    n = this.markerBorder().color,
                    i = this.options.markers,
                    r = new an({
                        type: i.type,
                        width: i.size,
                        height: i.size,
                        rotation: i.rotation,
                        background: t.color || n,
                        border: {
                            color: t.border.color,
                            width: t.border.width,
                            opacity: Dn(t.border.opacity, 1)
                        },
                        opacity: Dn(t.opacity, 1)
                    });
                return r.reflow(this._childBox), r.getElement()
            },
            highlightVisual: function() {
                return (this.marker || {}).visual
            },
            highlightVisualArgs: function() {
                var e, t, n, i, r, o = this.marker;
                return o ? (t = o.paddingBox.toRect(), e = o.visual) : (n = this.options.markers.size, i = n / 2, r = this.box.center(), t = new An.Rect([r.x - i, r.y - i], [n, n])), {
                    options: this.options,
                    rect: t,
                    visual: e
                }
            },
            tooltipAnchor: function(e, n) {
                var i = this,
                    r = i.markerBox(),
                    o = i.aboveAxis,
                    a = r.x2 + $r,
                    s = o ? r.y1 - n : r.y2,
                    l = i.owner.pane.clipBox(),
                    c = !l || l.overlaps(r);
                return c ? nn(a, s) : t
            },
            formatValue: function(e) {
                var t = this;
                return t.owner.formatPointValue(t, e)
            },
            overlapsBox: function(e) {
                var t = this.markerBox();
                return t.overlaps(e)
            }
        }), Ot(Ae.fn, he), Ot(Ae.fn, fe), Ee = Ae.extend({
            init: function(e, t) {
                var n = this;
                Ae.fn.init.call(n, e, t), n.category = e.category
            },
            defaults: {
                labels: {
                    position: Yn
                },
                highlight: {
                    opacity: 1,
                    border: {
                        width: 1,
                        opacity: 1
                    }
                }
            },
            createHighlight: function() {
                var e = this.options.highlight,
                    t = e.border,
                    n = this.options.markers,
                    i = this.box.center(),
                    r = n.size / 2 - t.width / 2,
                    o = new En.Circle(new An.Circle([i.x, i.y], r), {
                        stroke: {
                            color: t.color || new Qt(n.background).brightness(Hn).toHex(),
                            width: t.width,
                            opacity: t.opacity
                        },
                        fill: {
                            color: n.background,
                            opacity: e.opacity
                        }
                    });
                return o
            }
        }), Fe = Kt.extend({
            init: function(e, t, n) {
                var i = this;
                Kt.fn.init.call(i), i.linePoints = e, i.series = t, i.seriesIx = n
            },
            options: {
                closed: !1
            },
            points: function(e) {
                var t, n, i = this,
                    r = i.linePoints.concat(e || []),
                    o = [];
                for (t = 0, n = r.length; n > t; t++) r[t].visible !== !1 && o.push(r[t]._childBox.toRect().center());
                return o
            },
            createVisual: function() {
                var e, t = this.options,
                    n = this.series,
                    i = n._defaults,
                    r = n.color;
                Ut(r) && i && (r = i.color), e = En.Path.fromPoints(this.points(), {
                    stroke: {
                        color: r,
                        width: n.width,
                        opacity: n.opacity,
                        dashType: n.dashType
                    },
                    zIndex: n.zIndex
                }), t.closed && e.close(), this.visual = e
            },
            aliasFor: function(e, t) {
                var n = this,
                    i = n.seriesIx;
                return n.parent.getNearestPoint(t.x, t.y, i)
            }
        }), Ie = {
            renderSegments: function() {
                var e, t, n, i, r, o, a, s, l = this,
                    c = l.options,
                    d = c.series,
                    u = l.seriesPoints,
                    h = u.length;
                for (this._segments = [], t = 0; h > t; t++) {
                    for (e = d[t], n = l.sortPoints(u[t]), a = n.length, i = [], o = 0; a > o; o++) r = n[o], r ? i.push(r) : l.seriesMissingValues(e) !== zi && (i.length > 1 && (s = l.createSegment(i, e, t, s), this._addSegment(s)), i = []);
                    i.length > 1 && (s = l.createSegment(i, e, t, s), this._addSegment(s))
                }
                this.children.unshift.apply(this.children, this._segments)
            },
            _addSegment: function(e) {
                this._segments.push(e), e.parent = this
            },
            sortPoints: function(e) {
                return e
            },
            seriesMissingValues: function(e) {
                var t = e.missingValues,
                    n = !t && this.options.isStacked;
                return n ? so : t || zi
            },
            getNearestPoint: function(e, t, n) {
                var i, r, o, a, s, l = new nn(e, t),
                    c = this.seriesPoints[n],
                    d = Gi;
                for (r = 0; c.length > r; r++) o = c[r], o && wn(o.value) && null !== o.value && o.visible !== !1 && (a = o.box, s = a.center().distanceTo(l), d > s && (i = o, d = s));
                return i
            }
        }, Me = {
            createAnimation: function() {
                var e, t, n = this.getRoot();
                n && (n.options || {}).transitions !== !1 && (e = n.box, t = En.Path.fromRect(e.toRect()), this.visual.clip(t), this.animation = new Pe(t, {
                    box: e
                }), $(this.options.series) && this._setChildrenAnimation(t))
            },
            _setChildrenAnimation: function(e) {
                var t, n, i = this.animationPoints();
                for (n = 0; i.length > n; n++) t = i[n], t && t.visual && wn(t.visual.options.zIndex) && t.visual.clip(e)
            }
        }, Re = _e.extend({
            render: function() {
                var e = this;
                _e.fn.render.apply(e), e.updateStackRange(), e.renderSegments()
            },
            pointType: function() {
                return Ae
            },
            createPoint: function(e, t) {
                var n, i, r, o = this,
                    a = t.categoryIx,
                    s = t.category,
                    l = t.series,
                    c = t.seriesIx,
                    d = e.valueFields.value,
                    u = o.seriesMissingValues(l);
                if (!wn(d) || null === d) {
                    if (u !== so) return null;
                    d = 0
                }
                return i = this.pointOptions(l, c), i = o.evalPointOptions(i, d, s, a, l, c), r = e.fields.color || l.color, zt.isFunction(l.color) && (r = i.color), n = new Ae(d, i), n.color = r, o.append(n), n
            },
            plotRange: function(e) {
                var t, n, i, r, o = this.plotValue(e);
                if (this.options.isStacked)
                    for (t = e.categoryIx, n = this.categoryPoints[t], i = 0; n.length > i && (r = n[i], e !== r); i++) o += this.plotValue(r);
                return [o, o]
            },
            createSegment: function(e, t, n) {
                var i, r = t.style;
                return new(i = r === Fr ? ze : r === Ir ? Be : Fe)(e, t, n)
            },
            animationPoints: function() {
                var e, t = this.points,
                    n = [];
                for (e = 0; t.length > e; e++) n.push((t[e] || {}).marker);
                return n.concat(this._segments)
            }
        }), Ot(Re.fn, Ie, Me), Pe = En.Animation.extend({
            options: {
                duration: Mi
            },
            setup: function() {
                this._setEnd(this.options.box.x1)
            },
            step: function(e) {
                var t = this.options.box;
                this._setEnd(mn(t.x1, t.x2, e))
            },
            _setEnd: function(e) {
                var t = this.element,
                    n = t.segments,
                    i = n[1].anchor(),
                    r = n[2].anchor();
                t.suspend(), i.setX(e), t.resume(), r.setX(e)
            }
        }), En.AnimationFactory.current.register(Jn, Pe), ze = Fe.extend({
            points: function(e) {
                var t, n = this;
                return t = n.calculateStepPoints(n.linePoints), e && e.length && (t = t.concat(n.calculateStepPoints(e).reverse())), t
            },
            calculateStepPoints: function(e) {
                var t, n, i, r, o, a = this,
                    s = a.parent,
                    l = s.plotArea,
                    c = l.seriesCategoryAxis(a.series),
                    d = s.seriesMissingValues(a.series) === zi,
                    u = e.length,
                    h = c.options.reverse,
                    f = c.options.vertical,
                    p = h ? 2 : 1,
                    m = h ? 1 : 2,
                    g = [];
                for (i = 1; u > i; i++) t = e[i - 1], n = e[i], r = t.markerBox().center(), o = n.markerBox().center(), c.options.justified ? (g.push(new An.Point(r.x, r.y)), g.push(f ? new An.Point(r.x, o.y) : new An.Point(o.x, r.y)), g.push(new An.Point(o.x, o.y))) : f ? (g.push(new An.Point(r.x, t.box[oo + p])), g.push(new An.Point(r.x, t.box[oo + m])), d && g.push(new An.Point(r.x, n.box[oo + p])), g.push(new An.Point(o.x, n.box[oo + p])), g.push(new An.Point(o.x, n.box[oo + m]))) : (g.push(new An.Point(t.box[ro + p], r.y)), g.push(new An.Point(t.box[ro + m], r.y)), d && g.push(new An.Point(n.box[ro + p], r.y)), g.push(new An.Point(n.box[ro + p], o.y)), g.push(new An.Point(n.box[ro + m], o.y)));
                return g || []
            }
        }), Be = Fe.extend({
            createVisual: function() {
                var e, t, n, i = this.series,
                    r = i._defaults,
                    o = i.color;
                Ut(o) && r && (o = r.color), e = new Xt(this.options.closed), t = e.process(this.points()), n = new En.Path({
                    stroke: {
                        color: o,
                        width: i.width,
                        opacity: i.opacity,
                        dashType: i.dashType
                    },
                    zIndex: i.zIndex
                }), n.segments.push.apply(n.segments, t), this.visual = n
            }
        }), Le = {
            points: function() {
                var e, t, n = this,
                    i = n.parent,
                    r = i.plotArea,
                    o = i.options.invertAxes,
                    a = i.seriesValueAxis(n.series),
                    s = a.lineBox(),
                    l = r.seriesCategoryAxis(n.series),
                    c = l.lineBox(),
                    d = o ? c.x1 : c.y1,
                    u = n.stackPoints,
                    h = n._linePoints(u),
                    f = o ? ro : oo;
                return d = kn(d, s[f + 1], s[f + 2]), !n.stackPoints && h.length > 1 && (e = h[0], t = yn(h), o ? (h.unshift(new An.Point(d, e.y)), h.push(new An.Point(d, t.y))) : (h.unshift(new An.Point(e.x, d)), h.push(new An.Point(t.x, d)))), h
            },
            createVisual: function() {
                var e = this.series,
                    t = e._defaults,
                    n = e.color;
                Ut(n) && t && (n = t.color), this.visual = new En.Group({
                    zIndex: e.zIndex
                }), this.createArea(n), this.createLine(n)
            },
            createLine: function(e) {
                var t, n = this.series,
                    i = Ot({
                        color: e,
                        opacity: n.opacity
                    }, n.line);
                i.visible !== !1 && i.width > 0 && (t = En.Path.fromPoints(this._linePoints(), {
                    stroke: {
                        color: i.color,
                        width: i.width,
                        opacity: i.opacity,
                        dashType: i.dashType,
                        lineCap: "butt"
                    }
                }), this.visual.append(t))
            },
            createArea: function(e) {
                var t = this.series,
                    n = En.Path.fromPoints(this.points(), {
                        fill: {
                            color: e,
                            opacity: t.opacity
                        },
                        stroke: null
                    });
                this.visual.append(n)
            }
        }, He = Fe.extend({
            init: function(e, t, n, i) {
                var r = this;
                r.stackPoints = t, Fe.fn.init.call(r, e, n, i)
            },
            _linePoints: Fe.fn.points
        }), Ot(He.fn, Le), Ne = Re.extend({
            createSegment: function(e, t, n, i) {
                var r, o, a, s = this,
                    l = s.options,
                    c = l.isStacked,
                    d = (t.line || {}).style;
                return c && n > 0 && i && (a = this.seriesMissingValues(t), r = "gap" != a ? i.linePoints : this._gapStackPoints(e, n, d), d !== Fr && (r = r.slice(0).reverse())), d === Ir ? new Oe(e, i, c, t, n) : new(o = d === Fr ? Ve : He)(e, r, t, n)
            },
            reflow: function(e) {
                var t, n, i, r;
                if (Re.fn.reflow.call(this, e), t = this._stackPoints)
                    for (r = 0; t.length > r; r++) n = t[r], i = this.categoryAxis.getSlot(n.categoryIx), n.reflow(i)
            },
            _gapStackPoints: function(e, t, n) {
                var i, r, o, a, s = this.seriesPoints,
                    l = e[0].categoryIx,
                    c = l + e.length,
                    d = [];
                for (this._stackPoints = this._stackPoints || [], a = l; c > a; a++) {
                    i = t;
                    do i--, r = s[i][a]; while (i > 0 && !r);
                    r ? (n !== Fr && a > l && !s[i][a - 1] && d.push(this._previousSegmentPoint(a, a - 1, i)),
                        d.push(r), n !== Fr && c > a + 1 && !s[i][a + 1] && d.push(this._previousSegmentPoint(a, a + 1, i))) : (o = this._createGapStackPoint(a), this._stackPoints.push(o), d.push(o))
                }
                return d
            },
            _previousSegmentPoint: function(e, t, n) {
                for (var i, r = this.seriesPoints; n > 0 && !i;) n--, i = r[n][t];
                return i ? i = r[n][e] : (i = this._createGapStackPoint(e), this._stackPoints.push(i)), i
            },
            _createGapStackPoint: function(e) {
                var t = this.pointOptions({}, 0),
                    n = new Ae(0, t);
                return n.categoryIx = e, n.series = {}, n
            },
            seriesMissingValues: function(e) {
                return e.missingValues || so
            }
        }), Oe = He.extend({
            init: function(e, t, n, i, r) {
                var o = this;
                o.prevSegment = t, o.isStacked = n, Fe.fn.init.call(o, e, i, r)
            },
            strokeSegments: function() {
                var e, t, n = this._strokeSegments;
                return n || (e = new Xt(this.options.closed), t = Fe.fn.points.call(this), n = this._strokeSegments = e.process(t)), n
            },
            createVisual: function() {
                var e = this.series,
                    t = e._defaults,
                    n = e.color;
                Ut(n) && t && (n = t.color), this.visual = new En.Group({
                    zIndex: e.zIndex
                }), this.createFill({
                    fill: {
                        color: n,
                        opacity: e.opacity
                    },
                    stroke: null
                }), this.createStroke({
                    stroke: Ot({
                        color: n,
                        opacity: e.opacity,
                        lineCap: "butt"
                    }, e.line)
                })
            },
            createFill: function(t) {
                var n, i, r, o, a, s = this.strokeSegments(),
                    l = s.slice(0),
                    c = this.prevSegment;
                this.isStacked && c && (n = c.strokeSegments(), i = yn(n).anchor(), l.push(new En.Segment(i, i, yn(s).anchor())), r = e.map(n, function(e) {
                    return new En.Segment(e.anchor(), e.controlOut(), e.controlIn())
                }).reverse(), bn(l, r), o = l[0].anchor(), l.push(new En.Segment(o, o, yn(r).anchor()))), a = new En.Path(t), a.segments.push.apply(a.segments, l), this.closeFill(a), this.visual.append(a)
            },
            closeFill: function(e) {
                var t = this,
                    n = t.parent,
                    i = t.prevSegment,
                    r = n.plotArea,
                    o = n.options.invertAxes,
                    a = n.seriesValueAxis(t.series),
                    s = a.lineBox(),
                    l = r.seriesCategoryAxis(t.series),
                    c = l.lineBox(),
                    d = o ? c.x1 : c.y1,
                    u = o ? ro : oo,
                    h = t.strokeSegments(),
                    f = h[0].anchor(),
                    p = yn(h).anchor();
                d = kn(d, s[u + 1], s[u + 2]), n.options.isStacked && i || !(h.length > 1) || (o ? e.lineTo(d, p.y).lineTo(d, f.y) : e.lineTo(p.x, d).lineTo(f.x, d))
            },
            createStroke: function(e) {
                if (e.stroke.width > 0) {
                    var t = new En.Path(e);
                    t.segments.push.apply(t.segments, this.strokeSegments()), this.visual.append(t)
                }
            }
        }), Ve = ze.extend({
            init: function(e, t, n, i) {
                var r = this;
                r.stackPoints = t, ze.fn.init.call(r, e, n, i)
            },
            _linePoints: ze.fn.points
        }), Ot(Ve.fn, Le), Ue = Kt.extend({
            init: function(e, t) {
                var n = this;
                Kt.fn.init.call(n, t), n.plotArea = e, n.xAxisRanges = {}, n.yAxisRanges = {}, n.points = [], n.seriesPoints = [], n.seriesOptions = [], n._evalSeries = [], n.render()
            },
            options: {
                series: [],
                tooltip: {
                    format: "{0}, {1}"
                },
                labels: {
                    format: "{0}, {1}"
                },
                clip: !0
            },
            render: function() {
                var e = this;
                e.traverseDataPoints(Pt(e.addValue, e))
            },
            addErrorBar: function(e, t, n) {
                var i, r = this,
                    o = e.value[t],
                    a = t + "Value",
                    s = t + "ErrorLow",
                    l = t + "ErrorHigh",
                    c = n.seriesIx,
                    d = n.series,
                    u = e.options.errorBars,
                    h = n[s],
                    f = n[l];
                M(o) && (M(h) && M(f) && (i = {
                    low: h,
                    high: f
                }), u && wn(u[a]) && (r.seriesErrorRanges = r.seriesErrorRanges || {
                    x: [],
                    y: []
                }, r.seriesErrorRanges[t][c] = r.seriesErrorRanges[t][c] || new ve(u[a], d, t), i = r.seriesErrorRanges[t][c].getErrorRange(o, u[a])), i && r.addPointErrorBar(i, e, t))
            },
            addPointErrorBar: function(e, t, n) {
                var i, r = this,
                    o = e.low,
                    a = e.high,
                    s = t.series,
                    l = n === oo,
                    c = t.options.errorBars,
                    d = {};
                t[n + "Low"] = o, t[n + "High"] = a, t.errorBars = t.errorBars || [], i = new De(o, a, l, r, s, c), t.errorBars.push(i), t.append(i), d[n] = o, r.updateRange(d, s), d[n] = a, r.updateRange(d, s)
            },
            addValue: function(e, t) {
                var n, i = this,
                    r = e.x,
                    o = e.y,
                    a = t.seriesIx,
                    s = this.options.series[a],
                    l = this.seriesMissingValues(s),
                    c = i.seriesPoints[a];
                Q(r) && Q(o) || (e = this.createMissingValue(e, l)), e && (n = i.createPoint(e, t), n && (Rt(n, t), i.addErrorBar(n, ro, t), i.addErrorBar(n, oo, t)), i.updateRange(e, t.series)), i.points.push(n), c.push(n)
            },
            seriesMissingValues: function(e) {
                return e.missingValues
            },
            createMissingValue: Mt,
            updateRange: function(e, t) {
                var n = this,
                    i = e.x,
                    r = e.y,
                    o = t.xAxis,
                    a = t.yAxis,
                    s = n.xAxisRanges[o],
                    l = n.yAxisRanges[a];
                Q(i) && (s = n.xAxisRanges[o] = s || {
                    min: Gi,
                    max: Yi
                }, typeof i === Pr && (i = p(i)), s.min = It.min(s.min, i), s.max = It.max(s.max, i)), Q(r) && (l = n.yAxisRanges[a] = l || {
                    min: Gi,
                    max: Yi
                }, typeof r === Pr && (r = p(r)), l.min = It.min(l.min, r), l.max = It.max(l.max, r))
            },
            evalPointOptions: function(e, t, n) {
                var i = n.series,
                    r = n.seriesIx,
                    o = {
                        defaults: i._defaults,
                        excluded: ["data", "tooltip", "tempate", "visual", "toggle", "_outOfRangeMinPoint", "_outOfRangeMaxPoint"]
                    },
                    a = this._evalSeries[r];
                return wn(a) || (this._evalSeries[r] = a = B(e, {}, o, !0)), a && (e = Ot({}, e), B(e, {
                    value: t,
                    series: i,
                    dataItem: n.dataItem
                }, o)), e
            },
            pointType: function() {
                return Ae
            },
            pointOptions: function(e, t) {
                var n, i = this.seriesOptions[t];
                return i || (n = this.pointType().fn.defaults, this.seriesOptions[t] = i = Ot({}, n, {
                    markers: {
                        opacity: e.opacity
                    },
                    tooltip: {
                        format: this.options.tooltip.format
                    },
                    labels: {
                        format: this.options.labels.format
                    }
                }, e)), i
            },
            createPoint: function(e, t) {
                var n, i = this,
                    r = t.series,
                    o = this.pointOptions(r, t.seriesIx),
                    a = t.color || r.color;
                return o = i.evalPointOptions(o, e, t), zt.isFunction(r.color) && (a = o.color), n = new Ae(e, o), n.color = a, i.append(n), n
            },
            seriesAxes: function(e) {
                var t = this.plotArea,
                    n = e.xAxis,
                    i = n ? t.namedXAxes[n] : t.axisX,
                    r = e.yAxis,
                    o = r ? t.namedYAxes[r] : t.axisY;
                if (!i) throw Error("Unable to locate X axis with name " + n);
                if (!o) throw Error("Unable to locate Y axis with name " + r);
                return {
                    x: i,
                    y: o
                }
            },
            reflow: function(e) {
                var t, n, i = this,
                    r = i.points,
                    o = 0,
                    a = !i.options.clip;
                i.traverseDataPoints(function(e, s) {
                    t = r[o++], n = i.seriesAxes(s.series);
                    var l, c = n.x.getSlot(e.x, e.x, a),
                        d = n.y.getSlot(e.y, e.y, a);
                    t && (c && d ? (l = i.pointSlot(c, d), t.reflow(l)) : t.visible = !1)
                }), i.box = e
            },
            pointSlot: function(e, t) {
                return new $t(e.x1, t.y1, e.x2, t.y2)
            },
            traverseDataPoints: function(e) {
                var t, n, i, r, o, a, s, l = this,
                    c = l.options,
                    d = c.series,
                    u = l.seriesPoints;
                for (n = 0; d.length > n; n++)
                    for (i = d[n], r = u[n], r || (u[n] = []), t = 0; i.data.length > t; t++) o = this._bindPoint(i, n, t), a = o.valueFields, s = o.fields, e(a, Ot({
                        pointIx: t,
                        series: i,
                        seriesIx: n,
                        dataItem: i.data[t],
                        owner: l
                    }, s))
            },
            _bindPoint: _e.fn._bindPoint,
            formatPointValue: function(e, t) {
                var n = e.value;
                return un(t, n.x, n.y)
            },
            animationPoints: function() {
                var e, t = this.points,
                    n = [];
                for (e = 0; t.length > e; e++) n.push((t[e] || {}).marker);
                return n
            }
        }), Ot(Ue.fn, Me), We = Ue.extend({
            render: function() {
                var e = this;
                Ue.fn.render.call(e), e.renderSegments()
            },
            createSegment: function(e, t, n) {
                var i, r = t.style;
                return new(i = r === Ir ? Be : Fe)(e, t, n)
            },
            animationPoints: function() {
                var e = Ue.fn.animationPoints.call(this);
                return e.concat(this._segments)
            },
            createMissingValue: function(e, t) {
                if (t === so) {
                    var n = {
                        x: e.x,
                        y: e.y
                    };
                    return Q(n.x) || (n.x = 0), Q(n.y) || (n.y = 0), n
                }
            }
        }), Ot(We.fn, Ie), je = Ue.extend({
            init: function(e, t) {
                this._maxSize = Yi, Ue.fn.init.call(this, e, t)
            },
            options: {
                tooltip: {
                    format: "{3}"
                },
                labels: {
                    format: "{3}"
                }
            },
            addValue: function(e, t) {
                null !== e.size && (e.size > 0 || 0 > e.size && t.series.negativeValues.visible) ? (this._maxSize = It.max(this._maxSize, It.abs(e.size)), Ue.fn.addValue.call(this, e, t)) : (this.points.push(null), this.seriesPoints[t.seriesIx].push(null))
            },
            reflow: function(e) {
                var t = this;
                t.updateBubblesSize(e), Ue.fn.reflow.call(t, e)
            },
            pointType: function() {
                return Ee
            },
            createPoint: function(e, t) {
                var n, i, r = this,
                    o = t.series,
                    a = o.data.length,
                    s = t.pointIx * (Mi / a),
                    l = {
                        delay: s,
                        duration: Mi - s,
                        type: jn
                    },
                    c = t.color || o.color;
                return 0 > e.size && o.negativeValues.visible && (c = Dn(o.negativeValues.color, c)), i = Ot({
                    labels: {
                        animation: {
                            delay: s,
                            duration: Mi - s
                        }
                    }
                }, this.pointOptions(o, t.seriesIx), {
                    markers: {
                        type: Qn,
                        border: o.border,
                        opacity: o.opacity,
                        animation: l
                    }
                }), i = r.evalPointOptions(i, e, t), zt.isFunction(o.color) && (c = i.color), i.markers.background = c, n = new Ee(e, i), n.color = c, r.append(n), n
            },
            updateBubblesSize: function(e) {
                var t, n, i, r, o, a, s, l, c, d, u, h, f, p, m, g, v, _ = this,
                    b = _.options,
                    w = b.series,
                    y = It.min(e.width(), e.height());
                for (t = 0; w.length > t; t++)
                    for (i = w[t], r = _.seriesPoints[t], o = i.minSize || It.max(.02 * y, 10), a = i.maxSize || .2 * y, s = o / 2, l = a / 2, c = It.PI * s * s, d = It.PI * l * l, u = d - c, h = u / _._maxSize, n = 0; r.length > n; n++) f = r[n], f && (p = It.abs(f.value.size) * h, m = It.sqrt((c + p) / It.PI), g = Dn(f.options.zIndex, 0), v = g + (1 - m / l), Ot(f.options, {
                        zIndex: v,
                        markers: {
                            size: 2 * m,
                            zIndex: v
                        },
                        labels: {
                            zIndex: v + 1
                        }
                    }))
            },
            formatPointValue: function(e, t) {
                var n = e.value;
                return un(t, n.x, n.y, n.size, e.category)
            },
            createAnimation: Mt,
            createVisual: Mt
        }), qe = Kt.extend({
            init: function(e, t) {
                Kt.fn.init.call(this, t), this.value = e
            },
            options: {
                border: {
                    _brightness: .8
                },
                line: {
                    width: 2
                },
                overlay: {
                    gradient: Ai
                },
                tooltip: {
                    format: "<table style='text-align: left;'><th colspan='2'>{4:d}</th><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"
                },
                highlight: {
                    opacity: 1,
                    border: {
                        width: 1,
                        opacity: 1
                    },
                    line: {
                        width: 1,
                        opacity: 1
                    }
                },
                notes: {
                    visible: !0,
                    label: {}
                }
            },
            reflow: function(e) {
                var t, n, i, r = this,
                    o = r.options,
                    a = r.owner,
                    s = r.value,
                    l = a.seriesValueAxis(o),
                    c = [];
                n = l.getSlot(s.open, s.close), i = l.getSlot(s.low, s.high), n.x1 = i.x1 = e.x1, n.x2 = i.x2 = e.x2, r.realBody = n, t = i.center().x, c.push([
                    [t, i.y1],
                    [t, n.y1]
                ]), c.push([
                    [t, n.y2],
                    [t, i.y2]
                ]), r.lines = c, r.box = i.clone().wrap(n), r._rendered || (r._rendered = !0, r.createNote()), r.reflowNote()
            },
            reflowNote: function() {
                var e = this;
                e.note && e.note.reflow(e.box)
            },
            createVisual: function() {
                Kt.fn.createVisual.call(this), this._mainVisual = this.mainVisual(this.options), this.visual.append(this._mainVisual), this.createOverlay()
            },
            mainVisual: function(e) {
                var t = new En.Group;
                return this.createBody(t, e), this.createLines(t, e), t
            },
            createBody: function(e, t) {
                var n = En.Path.fromRect(this.realBody.toRect(), {
                    fill: {
                        color: this.color,
                        opacity: t.opacity
                    },
                    stroke: null
                });
                t.border.width > 0 && n.options.set("stroke", {
                    color: this.getBorderColor(),
                    width: t.border.width,
                    dashType: t.border.dashType,
                    opacity: Dn(t.border.opacity, t.opacity)
                }), dn(n), e.append(n), G(t) && e.append(this.createGradientOverlay(n, {
                    baseColor: this.color
                }, Ot({}, t.overlay)))
            },
            createLines: function(e, t) {
                this.drawLines(e, t, this.lines, t.line)
            },
            drawLines: function(e, t, n, i) {
                var r, o, a;
                if (n)
                    for (r = {
                        stroke: {
                            color: i.color || this.color,
                            opacity: Dn(i.opacity, t.opacity),
                            width: i.width,
                            dashType: i.dashType,
                            lineCap: "butt"
                        }
                    }, o = 0; n.length > o; o++) a = En.Path.fromPoints(n[o], r), dn(a), e.append(a)
            },
            getBorderColor: function() {
                var e = this,
                    t = e.options,
                    n = t.border,
                    i = n.color;
                return wn(i) || (i = new Qt(e.color).brightness(n._brightness).toHex()), i
            },
            createOverlay: function() {
                var e = En.Path.fromRect(this.box.toRect(), {
                    fill: {
                        color: io,
                        opacity: 0
                    },
                    stroke: null
                });
                this.visual.append(e)
            },
            createHighlight: function() {
                var e, t = this.options.highlight,
                    n = this.color;
                return this.color = t.color || this.color, e = this.mainVisual(Ot({}, this.options, {
                    line: {
                        color: this.getBorderColor()
                    }
                }, t)), this.color = n, e
            },
            highlightVisual: function() {
                return this._mainVisual
            },
            highlightVisualArgs: function() {
                return {
                    options: this.options,
                    rect: this.box.toRect(),
                    visual: this._mainVisual
                }
            },
            tooltipAnchor: function() {
                var e = this,
                    t = e.box,
                    n = e.owner.pane.clipBox() || t;
                return new nn(t.x2 + $r, It.max(t.y1, n.y1) + $r)
            },
            formatValue: function(e) {
                var t = this;
                return t.owner.formatPointValue(t, e)
            },
            overlapsBox: function(e) {
                return this.box.overlaps(e)
            }
        }), Ot(qe.fn, he), Ot(qe.fn, fe), Ge = _e.extend({
            options: {},
            reflowCategories: function(e) {
                var t, n = this,
                    i = n.children,
                    r = i.length;
                for (t = 0; r > t; t++) i[t].reflow(e[t])
            },
            addValue: function(e, t) {
                var n, i, r = this,
                    o = t.categoryIx,
                    a = t.category,
                    s = t.series,
                    l = t.seriesIx,
                    c = r.options,
                    d = e.valueFields,
                    u = r.children,
                    h = r.splitValue(d),
                    f = P(h),
                    p = r.categoryPoints[o],
                    m = s.data[o];
                p || (r.categoryPoints[o] = p = []), f && (n = r.createPoint(e, t)), i = u[o], i || (i = new de({
                    vertical: c.invertAxes,
                    gap: c.gap,
                    spacing: c.spacing
                }), r.append(i)), n && (r.updateRange(d, t), i.append(n), n.categoryIx = o, n.category = a, n.series = s, n.seriesIx = l, n.owner = r, n.dataItem = m, n.noteText = e.fields.noteText), r.points.push(n), p.push(n)
            },
            pointType: function() {
                return qe
            },
            createPoint: function(e, t) {
                var n, i = this,
                    r = t.categoryIx,
                    o = t.category,
                    a = t.series,
                    s = t.seriesIx,
                    l = e.valueFields,
                    c = Ot({}, a),
                    d = i.pointType(),
                    u = e.fields.color || a.color;
                return c = i.evalPointOptions(c, l, o, r, a, s), a.type == Gn && l.open > l.close && (u = e.fields.downColor || a.downColor || a.color), zt.isFunction(a.color) && (u = c.color), n = new d(l, c), n.color = u, n
            },
            splitValue: function(e) {
                return [e.low, e.open, e.close, e.high]
            },
            updateRange: function(e, t) {
                var n = this,
                    i = t.series.axis,
                    r = n.valueAxisRanges[i],
                    o = n.splitValue(e);
                r = n.valueAxisRanges[i] = r || {
                    min: Gi,
                    max: Yi
                }, r = n.valueAxisRanges[i] = {
                    min: It.min.apply(It, o.concat([r.min])),
                    max: It.max.apply(It, o.concat([r.max]))
                }
            },
            formatPointValue: function(e, t) {
                var n = e.value;
                return un(t, n.open, n.high, n.low, n.close, e.category)
            },
            animationPoints: function() {
                return this.points
            }
        }), Ot(Ge.fn, Me), $e = qe.extend({
            reflow: function(e) {
                var t, n, i, r, o = this,
                    a = o.options,
                    s = o.owner,
                    l = o.value,
                    c = s.seriesValueAxis(a),
                    d = [],
                    u = [],
                    h = [];
                r = c.getSlot(l.low, l.high), n = c.getSlot(l.open, l.open), i = c.getSlot(l.close, l.close), n.x1 = i.x1 = r.x1 = e.x1, n.x2 = i.x2 = r.x2 = e.x2, t = r.center().x, d.push([n.x1, n.y1]), d.push([t, n.y1]), u.push([t, i.y1]), u.push([i.x2, i.y1]), h.push([t, r.y1]), h.push([t, r.y2]), o.lines = [d, u, h], o.box = r.clone().wrap(n.clone().wrap(i)), o.reflowNote()
            },
            createBody: e.noop
        }), Ye = Ge.extend({
            pointType: function() {
                return $e
            }
        }), Ke = Ge.extend({
            addValue: function(e, t) {
                var n, i, r = this,
                    o = t.categoryIx,
                    a = t.category,
                    s = t.series,
                    l = t.seriesIx,
                    c = r.options,
                    d = r.children,
                    u = e.valueFields,
                    h = r.splitValue(u),
                    f = P(h),
                    p = r.categoryPoints[o],
                    m = s.data[o];
                p || (r.categoryPoints[o] = p = []), f && (n = r.createPoint(e, t)), i = d[o], i || (i = new de({
                    vertical: c.invertAxes,
                    gap: c.gap,
                    spacing: c.spacing
                }), r.append(i)), n && (r.updateRange(u, t), i.append(n), n.categoryIx = o, n.category = a, n.series = s, n.seriesIx = l, n.owner = r, n.dataItem = m), r.points.push(n), p.push(n)
            },
            pointType: function() {
                return Qe
            },
            splitValue: function(e) {
                return [e.lower, e.q1, e.median, e.q3, e.upper]
            },
            updateRange: function(e, t) {
                var n = this,
                    i = t.series.axis,
                    r = n.valueAxisRanges[i],
                    o = n.splitValue(e).concat(n.filterOutliers(e.outliers));
                wn(e.mean) && (o = o.concat(e.mean)), r = n.valueAxisRanges[i] = r || {
                    min: Gi,
                    max: Yi
                }, r = n.valueAxisRanges[i] = {
                    min: It.min.apply(It, o.concat([r.min])),
                    max: It.max.apply(It, o.concat([r.max]))
                }
            },
            formatPointValue: function(e, t) {
                var n = e.value;
                return un(t, n.lower, n.q1, n.median, n.q3, n.upper, n.mean, e.category)
            },
            filterOutliers: function(e) {
                var t, n, i = (e || []).length,
                    r = [];
                for (t = 0; i > t; t++) n = e[t], wn(n) && F(r, n);
                return r
            }
        }), Qe = qe.extend({
            init: function(e, t) {
                var n = this;
                Kt.fn.init.call(n, t), n.value = e, n.createNote()
            },
            options: {
                border: {
                    _brightness: .8
                },
                line: {
                    width: 2
                },
                mean: {
                    width: 2,
                    dashType: "dash"
                },
                overlay: {
                    gradient: Ai
                },
                tooltip: {
                    format: "<table style='text-align: left;'><th colspan='2'>{6:d}</th><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"
                },
                highlight: {
                    opacity: 1,
                    border: {
                        width: 1,
                        opacity: 1
                    },
                    line: {
                        width: 1,
                        opacity: 1
                    }
                },
                notes: {
                    visible: !0,
                    label: {}
                },
                outliers: {
                    visible: !0,
                    size: Vi,
                    type: ni,
                    background: io,
                    border: {
                        width: 2,
                        opacity: 1
                    },
                    opacity: 0
                },
                extremes: {
                    visible: !0,
                    size: Vi,
                    type: Qn,
                    background: io,
                    border: {
                        width: 2,
                        opacity: 1
                    },
                    opacity: 0
                }
            },
            reflow: function(e) {
                var t, n, i, r, o, a = this,
                    s = a.options,
                    l = a.owner,
                    c = a.value,
                    d = l.seriesValueAxis(s);
                i = d.getSlot(c.q1, c.q3), a.boxSlot = i, n = d.getSlot(c.lower, c.upper), r = d.getSlot(c.median), i.x1 = n.x1 = e.x1, i.x2 = n.x2 = e.x2, a.realBody = i, c.mean && (o = d.getSlot(c.mean), a.meanPoints = [
                    [
                        [e.x1, o.y1],
                        [e.x2, o.y1]
                    ]
                ]), t = n.center().x, a.whiskerPoints = [
                    [
                        [t - 5, n.y1],
                        [t + 5, n.y1],
                        [t, n.y1],
                        [t, i.y1]
                    ],
                    [
                        [t - 5, n.y2],
                        [t + 5, n.y2],
                        [t, n.y2],
                        [t, i.y2]
                    ]
                ], a.medianPoints = [
                    [
                        [e.x1, r.y1],
                        [e.x2, r.y1]
                    ]
                ], a.box = n.clone().wrap(i), a.reflowNote()
            },
            renderOutliers: function(e) {
                var t, n, i, r, o = this,
                    a = e.markers || {},
                    s = o.value,
                    l = s.outliers || [],
                    c = 3 * It.abs(s.q3 - s.q1),
                    d = [];
                for (r = 0; l.length > r; r++) i = l[r], a = s.q3 + c > i && i > s.q1 - c ? e.outliers : e.extremes, t = Ot({}, a.border), wn(t.color) || (t.color = wn(o.color) ? o.color : new Qt(a.background).brightness(Hn).toHex()), n = new an({
                    type: a.type,
                    width: a.size,
                    height: a.size,
                    rotation: a.rotation,
                    background: a.background,
                    border: t,
                    opacity: a.opacity
                }), n.value = i, d.push(n);
                return this.reflowOutliers(d), d
            },
            reflowOutliers: function(e) {
                var t, n, i, r = this.owner.seriesValueAxis(this.options),
                    o = this.box.center().x;
                for (t = 0; e.length > t; t++) n = e[t].value, i = r.getSlot(n).move(o), this.box = this.box.wrap(i), e[t].reflow(i)
            },
            mainVisual: function(e) {
                var t, n, i = qe.fn.mainVisual.call(this, e),
                    r = this.renderOutliers(e);
                for (t = 0; r.length > t; t++) n = r[t].getElement(), n && i.append(n);
                return i
            },
            createLines: function(e, t) {
                this.drawLines(e, t, this.whiskerPoints, t.line), this.drawLines(e, t, this.medianPoints, t.median), this.drawLines(e, t, this.meanPoints, t.mean)
            },
            getBorderColor: function() {
                return this.color ? this.color : qe.getBorderColor.call(this)
            }
        }), Ot(Qe.fn, he), Xe = Kt.extend({
            init: function(e, t, n) {
                var i = this;
                i.value = e, i.sector = t, Kt.fn.init.call(i, n)
            },
            options: {
                color: io,
                overlay: {
                    gradient: br
                },
                border: {
                    width: .5
                },
                labels: {
                    visible: !1,
                    distance: 35,
                    font: li,
                    margin: fn(.5),
                    align: Qn,
                    zIndex: 1,
                    position: dr
                },
                animation: {
                    type: ur
                },
                highlight: {
                    visible: !0,
                    border: {
                        width: 1
                    }
                },
                visible: !0
            },
            render: function() {
                var e, t = this,
                    n = t.options,
                    i = n.labels,
                    r = t.value;
                t._rendered || t.visible === !1 || (t._rendered = !0, i.template ? (e = Wt(i.template), r = e({
                    dataItem: t.dataItem,
                    category: t.category,
                    value: t.value,
                    series: t.series,
                    percentage: t.percentage
                })) : i.format && (r = un(i.format, r)), i.visible && r && (t.label = new ln(r, Ot({}, i, {
                    align: Yn,
                    vAlign: "",
                    animation: {
                        type: Ci,
                        delay: t.animationDelay
                    }
                })), t.append(t.label)))
            },
            reflow: function(e) {
                var t = this;
                t.render(), t.box = e, t.reflowLabel()
            },
            reflowLabel: function() {
                var e, t, n, i, r = this,
                    o = r.sector.clone(),
                    a = r.options,
                    s = r.label,
                    l = a.labels,
                    c = l.distance,
                    d = o.middle();
                s && (i = s.box.height(), n = s.box.width(), l.position == Yn ? (o.r = It.abs((o.r - i) / 2) + i, e = o.point(d), s.reflow($t(e.x, e.y - i / 2, e.x, e.y))) : l.position == Pi ? (o.r = o.r - i / 2, e = o.point(d), s.reflow($t(e.x, e.y - i / 2, e.x, e.y))) : (e = o.clone().expand(c).point(d), e.x >= o.c.x ? (t = e.x + n, s.orientation = _r) : (t = e.x - n, s.orientation = Li), s.reflow($t(t, e.y - i, e.x, e.y))))
            },
            createVisual: function() {
                var e, t, n = this,
                    i = n.sector,
                    r = n.options;
                Kt.fn.createVisual.call(this), n.value && (r.visual ? (e = (i.startAngle + 180) % 360, t = r.visual({
                    category: n.category,
                    dataItem: n.dataItem,
                    value: n.value,
                    series: n.series,
                    percentage: n.percentage,
                    center: new An.Point(i.c.x, i.c.y),
                    radius: i.r,
                    innerRadius: i.ir,
                    startAngle: e,
                    endAngle: e + i.angle,
                    options: r,
                    createVisual: function() {
                        var e = new En.Group;
                        return n.createSegmentVisual(e), e
                    }
                }), t && n.visual.append(t)) : n.createSegmentVisual(n.visual))
            },
            createSegmentVisual: function(e) {
                var t, n = this,
                    i = n.sector,
                    r = n.options,
                    o = r.border || {},
                    a = o.width > 0 ? {
                        stroke: {
                            color: o.color,
                            width: o.width,
                            opacity: o.opacity,
                            dashType: o.dashType
                        }
                    } : {},
                    s = r.color,
                    l = {
                        color: s,
                        opacity: r.opacity
                    };
                t = n.createSegment(i, Ot({
                    fill: l,
                    stroke: {
                        opacity: r.opacity
                    },
                    zIndex: r.zIndex
                }, a)), e.append(t), G(r) && e.append(this.createGradientOverlay(t, {
                    baseColor: s,
                    fallbackFill: l
                }, Ot({
                    center: [i.c.x, i.c.y],
                    innerRadius: i.ir,
                    radius: i.r,
                    userSpace: !0
                }, r.overlay)))
            },
            createSegment: function(e, t) {
                return t.singleSegment ? new En.Circle(new An.Circle(new An.Point(e.c.x, e.c.y), e.r), t) : sn.current.createRing(e, t)
            },
            createAnimation: function() {
                var e = this.options,
                    t = this.sector.c;
                Ot(e, {
                    animation: {
                        center: [t.x, t.y],
                        delay: this.animationDelay
                    }
                }), Kt.fn.createAnimation.call(this)
            },
            createHighlight: function(e) {
                var t = this,
                    n = t.options.highlight || {},
                    i = n.border || {};
                return t.createSegment(t.sector, Ot({}, e, {
                    fill: {
                        color: n.color,
                        opacity: n.opacity
                    },
                    stroke: {
                        opacity: i.opacity,
                        width: i.width,
                        color: i.color
                    }
                }))
            },
            highlightVisual: function() {
                return this.visual.children[0]
            },
            highlightVisualArgs: function() {
                var e = this.sector;
                return {
                    options: this.options,
                    radius: e.r,
                    innerRadius: e.ir,
                    center: new An.Point(e.c.x, e.c.y),
                    startAngle: e.startAngle,
                    endAngle: e.angle + e.startAngle,
                    visual: this.visual
                }
            },
            tooltipAnchor: function(e, t) {
                var n = this,
                    i = n.sector.adjacentBox($r, e, t);
                return new nn(i.x1, i.y1)
            },
            formatValue: function(e) {
                var t = this;
                return t.owner.formatPointValue(t, e)
            }
        }), Ot(Xe.fn, he), Je = {
            createLegendItem: function(e, t, n) {
                var i, r, o, a, s, l = this,
                    c = l.options.legend || {},
                    d = c.labels || {},
                    u = c.inactiveItems || {},
                    h = u.labels || {};
                n && n.visibleInLegend !== !1 && (s = n.visible !== !1, i = n.category || "", r = s ? d.template : h.template || d.template, r && (i = Wt(r)({
                    text: i,
                    series: n.series,
                    dataItem: n.dataItem,
                    percentage: n.percentage,
                    value: e
                })), s ? (a = {}, o = t.color) : (a = {
                    color: h.color,
                    font: h.font
                }, o = (u.markers || {}).color), i && l.legendItems.push({
                    pointIndex: n.index,
                    text: i,
                    series: n.series,
                    markerColor: o,
                    labels: a
                }))
            }
        }, Ze = Kt.extend({
            init: function(e, t) {
                var n = this;
                Kt.fn.init.call(n, t), n.plotArea = e, n.points = [], n.legendItems = [], n.render()
            },
            options: {
                startAngle: 90,
                connectors: {
                    width: 1,
                    color: "#939393",
                    padding: 4
                },
                inactiveItems: {
                    markers: {},
                    labels: {}
                }
            },
            render: function() {
                var e = this;
                e.traverseDataPoints(Pt(e.addValue, e))
            },
            traverseDataPoints: function(e) {
                var t, n, i, r, o, a, s, l, c, d, u, h, f, p = this,
                    m = p.options,
                    g = p.plotArea.options.seriesColors || [],
                    v = g.length,
                    _ = m.series,
                    b = _.length,
                    w = 0;
                for (r = 0; b > r; r++) {
                    for (t = _[r], a = t.data, u = q(t), s = 360 / u, h = wn(t.startAngle) ? t.startAngle : m.startAngle, r != b - 1 && t.labels.position == dr && (t.labels.position = Yn), f = 0; a.length > f; f++) n = ne.current.bindPoint(t, f), l = n.valueFields.value, c = It.abs(l), i = n.fields, o = c * s, d = 1 != a.length && !!i.explode, Ut(t.color) || (t.color = i.color || g[f % v]), e(l, new on(null, 0, 0, h, o), {
                        owner: p,
                        category: i.category || "",
                        index: w,
                        series: t,
                        seriesIx: r,
                        dataItem: a[f],
                        percentage: 0 !== u ? c / u : 0,
                        explode: d,
                        visibleInLegend: i.visibleInLegend,
                        visible: i.visible,
                        zIndex: b - r,
                        animationDelay: p.animationDelay(f, r, b)
                    }), n.fields.visible !== !1 && (h += o), w++;
                    w = 0
                }
            },
            evalSegmentOptions: function(e, t, n) {
                var i = n.series;
                B(e, {
                    value: t,
                    series: i,
                    dataItem: n.dataItem,
                    category: n.category,
                    percentage: n.percentage
                }, {
                    defaults: i._defaults,
                    excluded: ["data", "template", "visual", "toggle"]
                })
            },
            addValue: function(e, t, n) {
                var i, r = this,
                    o = Ot({}, n.series, {
                        index: n.index
                    });
                r.evalSegmentOptions(o, e, n), r.createLegendItem(e, o, n), n.visible !== !1 && (i = new Xe(e, t, o), Rt(i, n), r.append(i), r.points.push(i))
            },
            reflow: function(e) {
                var t, n, i, r, o, a, s, l, c = this,
                    d = c.options,
                    u = e.clone(),
                    h = 5,
                    f = It.min(u.width(), u.height()),
                    p = f / 2,
                    m = f - .85 * f,
                    g = Dn(d.padding, m),
                    v = $t(u.x1, u.y1, u.x1 + f, u.y1 + f),
                    _ = v.center(),
                    b = c.seriesConfigs || [],
                    w = u.center(),
                    y = c.points,
                    k = y.length,
                    x = d.series.length,
                    C = [],
                    S = [];
                for (g = g > p - h ? p - h : g, v.translate(w.x - _.x, w.y - _.y), a = p - g, l = nn(a + v.x1 + g, a + v.y1 + g), s = 0; k > s; s++) r = y[s], o = r.sector, o.r = a, o.c = l, n = r.seriesIx, b.length && (t = b[n], o.ir = t.ir, o.r = t.r), n == x - 1 && r.explode && (o.c = o.clone().radius(.15 * o.r).point(o.middle())), r.reflow(v), i = r.label, i && i.options.position === dr && n == x - 1 && (i.orientation === _r ? S.push(i) : C.push(i));
                C.length > 0 && (C.sort(c.labelComparator(!0)), c.leftLabelsReflow(C)), S.length > 0 && (S.sort(c.labelComparator(!1)), c.rightLabelsReflow(S)), c.box = v
            },
            leftLabelsReflow: function(e) {
                var t = this,
                    n = t.distanceBetweenLabels(e);
                t.distributeLabels(n, e)
            },
            rightLabelsReflow: function(e) {
                var t = this,
                    n = t.distanceBetweenLabels(e);
                t.distributeLabels(n, e)
            },
            distanceBetweenLabels: function(e) {
                var t, n, i, r = this,
                    o = r.points,
                    a = o[o.length - 1],
                    s = a.sector,
                    l = e[0].box,
                    c = e.length - 1,
                    d = s.r + a.options.labels.distance,
                    u = [];
                for (n = vn(l.y1 - (s.c.y - d - l.height() - l.height() / 2)), u.push(n), i = 0; c > i; i++) l = e[i].box, t = e[i + 1].box, n = vn(t.y1 - l.y2), u.push(n);
                return n = vn(s.c.y + d - e[c].box.y2 - e[c].box.height() / 2), u.push(n), u
            },
            distributeLabels: function(e, t) {
                var n, i, r, o, a = this,
                    s = e.length;
                for (o = 0; s > o; o++)
                    for (i = r = o, n = -e[o]; n > 0 && (i >= 0 || s > r);) n = a._takeDistance(e, o, --i, n), n = a._takeDistance(e, o, ++r, n);
                a.reflowLabels(e, t)
            },
            _takeDistance: function(e, t, n, i) {
                if (e[n] > 0) {
                    var r = It.min(e[n], i);
                    i -= r, e[n] -= r, e[t] += r
                }
                return i
            },
            reflowLabels: function(e, t) {
                var n, i, r, o, a = this,
                    s = a.points,
                    l = s[s.length - 1],
                    c = l.sector,
                    d = t.length,
                    u = l.options.labels,
                    h = u.distance,
                    f = c.c.y - (c.r + h) - t[0].box.height();
                for (e[0] += 2, o = 0; d > o; o++) n = t[o], f += e[o], r = n.box, i = a.hAlignLabel(r.x2, c.clone().expand(h), f, f + r.height(), n.orientation == _r), n.orientation == _r ? (u.align !== Qn && (i = c.r + c.c.x + h), n.reflow($t(i + r.width(), f, i, f))) : (u.align !== Qn && (i = c.c.x - c.r - h), n.reflow($t(i - r.width(), f, i, f))), f += r.height()
            },
            createVisual: function() {
                var e, t, n, i, o, a, s, l, c, d, u, h, f, p, m = this,
                    g = m.options,
                    v = g.connectors,
                    _ = m.points,
                    b = _.length,
                    w = 4;
                for (Kt.fn.createVisual.call(this), this._connectorLines = [], s = 0; b > s; s++) i = _[s], t = i.sector, n = t.middle(), a = i.label, o = {
                    seriesId: i.seriesIx
                }, a && (e = new En.Path({
                    stroke: {
                        color: v.color,
                        width: v.width
                    },
                    animation: {
                        type: Ci,
                        delay: i.animationDelay
                    }
                }), a.options.position === dr && 0 !== i.value && (l = a.box, c = t.c, d = t.point(n), u = nn(l.x1, l.center().y), d = t.clone().expand(v.padding).point(n), e.moveTo(d.x, d.y), a.orientation == _r ? (f = nn(l.x1 - v.padding, l.center().y), p = r(c, d, u, f), u = nn(f.x - w, f.y), p = p || u, p.x = It.min(p.x, u.x), m.pointInCircle(p, t.c, t.r + w) || t.c.x > p.x ? (h = t.c.x + t.r + w, i.options.labels.align !== ei ? u.x > h ? e.lineTo(h, d.y) : e.lineTo(d.x + 2 * w, d.y) : e.lineTo(h, d.y), e.lineTo(u.x, f.y)) : (p.y = f.y, e.lineTo(p.x, p.y))) : (f = nn(l.x2 + v.padding, l.center().y), p = r(c, d, u, f), u = nn(f.x + w, f.y), p = p || u, p.x = It.max(p.x, u.x), m.pointInCircle(p, t.c, t.r + w) || p.x > t.c.x ? (h = t.c.x - t.r - w, i.options.labels.align !== ei ? h > u.x ? e.lineTo(h, d.y) : e.lineTo(d.x - 2 * w, d.y) : e.lineTo(h, d.y), e.lineTo(u.x, f.y)) : (p.y = f.y, e.lineTo(p.x, p.y))), e.lineTo(f.x, f.y), this._connectorLines.push(e), this.visual.append(e)))
            },
            labelComparator: function(e) {
                return e = e ? -1 : 1,
                    function(t, n) {
                        return t = (t.parent.sector.middle() + 270) % 360, n = (n.parent.sector.middle() + 270) % 360, (t - n) * e
                    }
            },
            hAlignLabel: function(e, t, n, i, r) {
                var o = t.c.x,
                    a = t.c.y,
                    s = t.r,
                    l = It.min(It.abs(a - n), It.abs(a - i));
                return l > s ? e : o + It.sqrt(s * s - l * l) * (r ? 1 : -1)
            },
            pointInCircle: function(e, t, n) {
                return u(t.x - e.x) + u(t.y - e.y) < u(n)
            },
            formatPointValue: function(e, t) {
                return un(t, e.value)
            },
            animationDelay: function(e) {
                return e * hr
            }
        }), Ot(Ze.fn, Je), et = Xe.extend({
            options: {
                overlay: {
                    gradient: wr
                },
                labels: {
                    position: Yn
                },
                animation: {
                    type: ur
                }
            },
            reflowLabel: function() {
                var e, t, n = this,
                    i = n.sector.clone(),
                    r = n.options,
                    o = n.label,
                    a = r.labels,
                    s = i.middle();
                o && (t = o.box.height(), a.position == Yn ? (i.r -= (i.r - i.ir) / 2, e = i.point(s), o.reflow(new $t(e.x, e.y - t / 2, e.x, e.y))) : Xe.fn.reflowLabel.call(n))
            },
            createSegment: function(e, t) {
                return sn.current.createRing(e, t)
            }
        }), Ot(et.fn, he), tt = Ze.extend({
            options: {
                startAngle: 90,
                connectors: {
                    width: 1,
                    color: "#939393",
                    padding: 4
                }
            },
            addValue: function(e, t, n) {
                var i, r = this,
                    o = Ot({}, n.series, {
                        index: n.index
                    });
                r.evalSegmentOptions(o, e, n), r.createLegendItem(e, o, n), e && n.visible !== !1 && (i = new et(e, t, o), Rt(i, n), r.append(i), r.points.push(i))
            },
            reflow: function(e) {
                var t, n, i, r, o, a, s = this,
                    l = s.options,
                    c = e.clone(),
                    d = 5,
                    u = It.min(c.width(), c.height()),
                    h = u / 2,
                    f = u - .85 * u,
                    p = Dn(l.padding, f),
                    m = l.series,
                    g = m.length,
                    v = 0,
                    _ = 0,
                    b = 0,
                    w = 0;
                for (s.seriesConfigs = [], p = p > h - d ? h - d : p, i = h - p, o = 0; g > o; o++) t = m[o], 0 === o && wn(t.holeSize) && (n = t.holeSize, i -= t.holeSize), wn(t.size) ? i -= t.size : v++, wn(t.margin) && o != g - 1 && (i -= t.margin);
                for (wn(n) || (w = (h - p) / (g + .75), n = .75 * w, i -= n), b = n, o = 0; g > o; o++) t = m[o], r = Dn(t.size, i / v), b += _, a = b + r, s.seriesConfigs.push({
                    ir: b,
                    r: a
                }), _ = t.margin || 0, b = a;
                Ze.fn.reflow.call(s, e)
            },
            animationDelay: function(e, t, n) {
                return e * pi + Mi * (t + 1) / (n + 1)
            }
        }), nt = be.extend({
            render: function() {
                be.fn.render.call(this), this.createSegments()
            },
            traverseDataPoints: function(e) {
                var t, n, i, r, o, a, s, l, c, u, h = this.options.series,
                    f = this.categoryAxis.options.categories || [],
                    p = d(h),
                    m = !this.options.invertAxes;
                for (t = 0; h.length > t; t++)
                    for (n = h[t], i = 0, r = 0, o = 0; p > o; o++) a = ne.current.bindPoint(n, o), s = a.valueFields.value, l = a.fields.summary, c = i, l ? "total" === l.toLowerCase() ? (a.valueFields.value = i, c = 0, u = i) : (a.valueFields.value = r, u = c - r, r = 0) : M(s) && (r += s, i += s, u = i), e(a, {
                        category: f[o],
                        categoryIx: o,
                        series: n,
                        seriesIx: t,
                        total: i,
                        runningTotal: r,
                        from: c,
                        to: u,
                        isVertical: m
                    })
            },
            updateRange: function(e, t) {
                be.fn.updateRange.call(this, {
                    value: t.to
                }, t)
            },
            aboveAxis: function(e) {
                return e.value >= 0
            },
            plotRange: function(e) {
                return [e.from, e.to]
            },
            createSegments: function() {
                var e, t, n, i, r, o, a, s = this.options.series,
                    l = this.seriesPoints,
                    c = this.segments = [];
                for (e = 0; s.length > e; e++)
                    if (t = s[e], n = l[e])
                        for (r = 0; n.length > r; r++) o = n[r], o && i && (a = new it(i, o, t), c.push(a), this.append(a)), i = o
            }
        }), it = Kt.extend({
            init: function(e, t, n) {
                var i = this;
                Kt.fn.init.call(i), i.from = e, i.to = t, i.series = n
            },
            options: {
                animation: {
                    type: Ci,
                    delay: Mi
                }
            },
            linePoints: function() {
                var e, t, n = [],
                    i = this.from,
                    r = i.box,
                    o = this.to.box;
                return i.isVertical ? (e = i.aboveAxis ? r.y1 : r.y2, n.push([r.x1, e], [o.x2, e])) : (t = i.aboveAxis ? r.x2 : r.x1, n.push([t, r.y1], [t, o.y2])), n
            },
            createVisual: function() {
                var e, t;
                Kt.fn.createVisual.call(this), e = this.series.line || {}, t = En.Path.fromPoints(this.linePoints(), {
                    stroke: {
                        color: e.color,
                        width: e.width,
                        opacity: e.opacity,
                        dashType: e.dashType
                    }
                }), dn(t), this.visual.append(t)
            }
        }), rt = Yt.extend({
            init: function(e) {
                var t = this;
                Yt.fn.init.call(t, e), e = t.options, t.id = zt.guid(), t.createTitle(), t.content = new Kt, t.chartContainer = new ot({}, t), t.append(t.content), t.axes = [], t.charts = []
            },
            options: {
                zIndex: -1,
                shrinkToFit: !0,
                title: {
                    align: Li
                },
                visible: !0
            },
            createTitle: function() {
                var e = this,
                    t = e.options.title;
                typeof t === lr && (t = Ot({}, t, {
                    align: t.position,
                    position: qr
                })), e.title = cn.buildTitle(t, e, rt.fn.options.title)
            },
            appendAxis: function(e) {
                var t = this;
                t.content.append(e), t.axes.push(e), e.pane = t
            },
            appendChart: function(e) {
                var t = this;
                t.chartContainer.parent !== t.content && t.content.append(t.chartContainer), t.charts.push(e), t.chartContainer.append(e), e.pane = t
            },
            empty: function() {
                var e, t = this,
                    n = t.parent;
                if (n) {
                    for (e = 0; t.axes.length > e; e++) n.removeAxis(t.axes[e]);
                    for (e = 0; t.charts.length > e; e++) n.removeChart(t.charts[e])
                }
                t.axes = [], t.charts = [], t.content.destroy(), t.content.children = [], t.chartContainer.children = []
            },
            reflow: function(e) {
                var t, n = this;
                yn(n.children) === n.content && (t = n.children.pop()), Yt.fn.reflow.call(n, e), t && n.children.push(t), n.title && (n.contentBox.y1 += n.title.box.height())
            },
            visualStyle: function() {
                var e = Yt.fn.visualStyle.call(this);
                return e.zIndex = -10, e
            },
            renderComplete: function() {
                this.options.visible && this.createGridLines()
            },
            stackRoot: n,
            clipRoot: n,
            createGridLines: function() {
                var e, t, n, i, r, o, a = this,
                    s = a.axes,
                    l = s.concat(a.parent.axes),
                    c = [],
                    d = [];
                for (t = 0; s.length > t; t++)
                    for (i = s[t], r = i.options.vertical, e = r ? c : d, n = 0; l.length > n; n++) 0 === e.length && (o = l[n], r !== o.options.vertical && bn(e, i.createGridLines(o)))
            },
            refresh: function() {
                this.visual.clear(), this.content.parent = null, this.content.createGradient = e.proxy(this.createGradient, this), this.content.renderVisual(), this.content.parent = this, this.title && this.visual.append(this.title.visual), this.visual.append(this.content.visual), this.renderComplete()
            },
            clipBox: function() {
                return this.chartContainer.clipBox
            }
        }), ot = Kt.extend({
            init: function(e, t) {
                var n = this;
                Kt.fn.init.call(n, e), n.pane = t
            },
            shouldClip: function() {
                var e, t = this,
                    n = t.children,
                    i = n.length;
                for (e = 0; i > e; e++)
                    if (n[e].options.clip === !0) return !0;
                return !1
            },
            _clipBox: function() {
                var e, t, n, i, r = this,
                    o = r.pane,
                    a = o.axes,
                    s = a.length,
                    l = o.box.clone();
                for (t = 0; s > t; t++) i = a[t], e = i.options.vertical ? oo : ro, n = i.lineBox(), l[e + 1] = n[e + 1], l[e + 2] = n[e + 2];
                return l
            },
            createVisual: function() {
                var e, t, n;
                this.visual = new En.Group({
                    zIndex: 0
                }), this.shouldClip() && (e = this.clipBox = this._clipBox(), t = e.toRect(), n = En.Path.fromRect(t), this.visual.clip(n), this.unclipLabels())
            },
            stackRoot: n,
            unclipLabels: function() {
                var e, t, n, i, r, o = this,
                    a = o.children,
                    s = o.clipBox;
                for (n = 0; a.length > n; n++)
                    for (e = a[n].points || {}, r = e.length, i = 0; r > i; i++) t = e[i], t && t.label && t.label.options.visible && t.overlapsBox(s) && (t.label.alignToClipBox && t.label.alignToClipBox(s), t.label.options.noclip = !0)
            },
            destroy: function() {
                Kt.fn.destroy.call(this), delete this.parent
            }
        }), at = Kt.extend({
            init: function(e, t) {
                var n = this;
                Kt.fn.init.call(n, t), n.series = e, n.initSeries(), n.charts = [], n.options.legend.items = [], n.axes = [], n.crosshairs = [], n.createPanes(), n.render(), n.createCrosshairs()
            },
            options: {
                series: [],
                plotArea: {
                    margin: {}
                },
                background: "",
                border: {
                    color: On,
                    width: 0
                },
                legend: {
                    inactiveItems: {
                        labels: {
                            color: "#919191"
                        },
                        markers: {
                            color: "#919191"
                        }
                    }
                }
            },
            initSeries: function() {
                var e, t, n = this.series;
                for (e = 0; n.length > e; e++) t = n[e], t.index = e
            },
            createPanes: function() {
                var e, t, n = this,
                    i = [],
                    r = n.options.panes || [],
                    o = It.max(r.length, 1);
                for (e = 0; o > e; e++) t = new rt(r[e]), t.paneIndex = e, i.push(t), n.append(t);
                n.panes = i
            },
            createCrosshairs: function(e) {
                var t, n, i, r, o, a = this;
                for (e = e || a.panes, t = 0; e.length > t; t++)
                    for (i = e[t], n = 0; i.axes.length > n; n++) r = i.axes[n], r.options.crosshair && r.options.crosshair.visible && (o = new _t(r, r.options.crosshair), a.crosshairs.push(o), i.content.append(o))
            },
            removeCrosshairs: function(e) {
                var t, n, i = this,
                    r = i.crosshairs,
                    o = e.axes;
                for (t = r.length - 1; t >= 0; t--)
                    for (n = 0; o.length > n; n++)
                        if (r[t].axis === o[n]) {
                            r.splice(t, 1);
                            break
                        }
            },
            hideCrosshairs: function() {
                var e, t = this.crosshairs;
                for (e = 0; t.length > e; e++) t[e].hide()
            },
            findPane: function(e) {
                var t, n, i = this,
                    r = i.panes;
                for (t = 0; r.length > t; t++)
                    if (r[t].options.name === e) {
                        n = r[t];
                        break
                    } return n || r[0]
            },
            findPointPane: function(e) {
                var t, n, i = this,
                    r = i.panes;
                for (t = 0; r.length > t; t++)
                    if (r[t].box.containsPoint(e)) {
                        n = r[t];
                        break
                    } return n
            },
            appendAxis: function(e) {
                var t = this,
                    n = t.findPane(e.options.pane);
                n.appendAxis(e), t.axes.push(e), e.plotArea = t
            },
            removeAxis: function(e) {
                var t, n, i = this,
                    r = [];
                for (t = 0; i.axes.length > t; t++) n = i.axes[t], e !== n ? r.push(n) : n.destroy();
                i.axes = r
            },
            appendChart: function(e, t) {
                var n = this;
                n.charts.push(e), t ? t.appendChart(e) : n.append(e)
            },
            removeChart: function(e) {
                var t, n, i = this,
                    r = [];
                for (t = 0; i.charts.length > t; t++) n = i.charts[t], n !== e ? r.push(n) : n.destroy();
                i.charts = r
            },
            addToLegend: function(e) {
                var t, n, i, r, o, a, s, l, c, d = e.length,
                    u = [],
                    h = this.options.legend,
                    f = h.labels || {},
                    p = h.inactiveItems || {},
                    m = p.labels || {};
                for (t = 0; d > t; t++) n = e[t], l = n.visible !== !1, n.visibleInLegend !== !1 && (i = n.name || "", c = l ? f.template : m.template || f.template, c && (i = Wt(c)({
                    text: i,
                    series: n
                })), r = n.color, s = n._defaults, Ut(r) && s && (r = s.color), l ? (o = {}, a = r) : (o = {
                    color: m.color,
                    font: m.font
                }, a = p.markers.color), i && u.push({
                    text: i,
                    labels: o,
                    markerColor: a,
                    series: n,
                    active: l
                }));
                bn(h.items, u)
            },
            groupAxes: function(e) {
                var t, n, i, r, o = [],
                    a = [];
                for (i = 0; e.length > i; i++)
                    for (t = e[i].axes, r = 0; t.length > r; r++) n = t[r], n.options.vertical ? a.push(n) : o.push(n);
                return {
                    x: o,
                    y: a,
                    any: o.concat(a)
                }
            },
            groupSeriesByPane: function() {
                var e, t, n, i = this,
                    r = i.series,
                    o = {};
                for (e = 0; r.length > e; e++) n = r[e], t = i.seriesPaneName(n), o[t] ? o[t].push(n) : o[t] = [n];
                return o
            },
            filterVisibleSeries: function(e) {
                var t, n, i = [];
                for (t = 0; e.length > t; t++) n = e[t], n.visible !== !1 && i.push(n);
                return i
            },
            reflow: function(e) {
                var t = this,
                    n = t.options.plotArea,
                    i = t.panes,
                    r = fn(n.margin);
                t.box = e.clone().unpad(r), t.reflowPanes(), t.reflowAxes(i), t.reflowCharts(i)
            },
            redraw: function(e) {
                var t, n = this;
                for (e = [].concat(e), this.initSeries(), t = 0; e.length > t; t++) n.removeCrosshairs(e[t]), e[t].empty();
                for (n.render(e), n.reflowAxes(n.panes), n.reflowCharts(e), n.createCrosshairs(e), t = 0; e.length > t; t++) e[t].refresh()
            },
            axisCrossingValues: function(e, t) {
                var n, i = e.options,
                    r = [].concat(i.axisCrossingValues || i.axisCrossingValue),
                    o = t.length - r.length,
                    a = r[0] || 0;
                for (n = 0; o > n; n++) r.push(a);
                return r
            },
            alignAxisTo: function(e, t, n, i) {
                var r = e.getSlot(n, n, !0),
                    o = e.options.reverse ? 2 : 1,
                    a = t.getSlot(i, i, !0),
                    s = t.options.reverse ? 2 : 1,
                    l = e.box.translate(a[ro + s] - r[ro + o], a[oo + s] - r[oo + o]);
                e.pane !== t.pane && l.translate(0, e.pane.box.y1 - t.pane.box.y1), e.reflow(l)
            },
            alignAxes: function(e, t) {
                var n, i, r, o, a = this,
                    s = e[0],
                    l = t[0],
                    c = a.axisCrossingValues(s, t),
                    d = a.axisCrossingValues(l, e),
                    u = {},
                    h = {},
                    f = {},
                    p = {};
                for (o = 0; t.length > o; o++) r = t[o], n = r.pane, i = n.id, a.alignAxisTo(r, s, d[o], c[o]), r.options._overlap || (vn(r.lineBox().x1) === vn(s.lineBox().x1) && (u[i] && r.reflow(r.box.alignTo(u[i].box, Li).translate(-r.options.margin, 0)), u[i] = r), vn(r.lineBox().x2) === vn(s.lineBox().x2) && (r._mirrored || (r.options.labels.mirror = !r.options.labels.mirror, r._mirrored = !0), a.alignAxisTo(r, s, d[o], c[o]), h[i] && r.reflow(r.box.alignTo(h[i].box, _r).translate(r.options.margin, 0)), h[i] = r), 0 !== o && l.pane === r.pane && (r.alignTo(l), r.reflow(r.box)));
                for (o = 0; e.length > o; o++) r = e[o], n = r.pane, i = n.id, a.alignAxisTo(r, l, c[o], d[o]), r.options._overlap || (vn(r.lineBox().y1) === vn(l.lineBox().y1) && (r._mirrored || (r.options.labels.mirror = !r.options.labels.mirror, r._mirrored = !0), a.alignAxisTo(r, l, c[o], d[o]), f[i] && r.reflow(r.box.alignTo(f[i].box, qr).translate(0, -r.options.margin)), f[i] = r), vn(r.lineBox().y2, ti) === vn(l.lineBox().y2, ti) && (p[i] && r.reflow(r.box.alignTo(p[i].box, Un).translate(0, r.options.margin)), p[i] = r), 0 !== o && (r.alignTo(s), r.reflow(r.box)))
            },
            shrinkAxisWidth: function(e) {
                var t, n, i, r = this,
                    o = r.groupAxes(e).any,
                    a = D(o),
                    s = 0;
                for (t = 0; e.length > t; t++) n = e[t], n.axes.length > 0 && (s = It.max(s, a.width() - n.contentBox.width()));
                if (0 !== s)
                    for (t = 0; o.length > t; t++) i = o[t], i.options.vertical || i.reflow(i.box.shrink(s, 0))
            },
            shrinkAxisHeight: function(e) {
                var t, n, i, r, o, a, s;
                for (t = 0; e.length > t; t++)
                    if (n = e[t], i = n.axes, r = It.max(0, D(i).height() - n.contentBox.height()), 0 !== r) {
                        for (o = 0; i.length > o; o++) a = i[o], a.options.vertical && a.reflow(a.box.shrink(0, r));
                        s = !0
                    } return s
            },
            fitAxes: function(e) {
                var t, n, i, r, o, a, s, l, c = this,
                    d = c.groupAxes(e).any,
                    u = 0;
                for (s = 0; e.length > s; s++)
                    if (o = e[s], t = o.axes, n = o.contentBox, t.length > 0)
                        for (i = D(t), u = It.max(u, n.x1 - i.x1), r = It.max(n.y1 - i.y1, n.y2 - i.y2), l = 0; t.length > l; l++) a = t[l], a.reflow(a.box.translate(0, r));
                for (s = 0; d.length > s; s++) a = d[s], a.reflow(a.box.translate(u, 0))
            },
            reflowAxes: function(e) {
                var t, n = this,
                    i = n.groupAxes(e);
                for (t = 0; e.length > t; t++) n.reflowPaneAxes(e[t]);
                i.x.length > 0 && i.y.length > 0 && (n.alignAxes(i.x, i.y), n.shrinkAxisWidth(e), n.autoRotateAxisLabels(i), n.alignAxes(i.x, i.y), n.shrinkAxisWidth(e) && n.alignAxes(i.x, i.y), n.shrinkAxisHeight(e), n.alignAxes(i.x, i.y), n.shrinkAxisHeight(e) && n.alignAxes(i.x, i.y), n.fitAxes(e))
            },
            autoRotateAxisLabels: function(e) {
                var t, n, i, r = this.axes,
                    o = this.panes;
                for (n = 0; r.length > n; n++) t = r[n], t.autoRotateLabels() && (i = !0);
                if (i) {
                    for (n = 0; o.length > n; n++) this.reflowPaneAxes(o[n]);
                    e.x.length > 0 && e.y.length > 0 && (this.alignAxes(e.x, e.y), this.shrinkAxisWidth(o))
                }
            },
            reflowPaneAxes: function(e) {
                var t, n = e.axes,
                    i = n.length;
                if (i > 0)
                    for (t = 0; i > t; t++) n[t].reflow(e.contentBox)
            },
            reflowCharts: function(e) {
                var t, n, i = this,
                    r = i.charts,
                    o = r.length,
                    a = i.box;
                for (n = 0; o > n; n++) t = r[n].pane, (!t || pn(t, e)) && r[n].reflow(a)
            },
            reflowPanes: function() {
                var e, t, n, i, r, o = this,
                    a = o.box,
                    s = o.panes,
                    l = s.length,
                    c = a.height(),
                    d = l,
                    u = 0,
                    h = a.y1;
                for (e = 0; l > e; e++) t = s[e], i = t.options.height, t.options.width = a.width(), t.options.height ? (i.indexOf && i.indexOf("%") && (r = parseInt(i, 10) / 100, t.options.height = r * a.height()), t.reflow(a.clone()), c -= t.options.height) : u++;
                for (e = 0; l > e; e++) t = s[e], t.options.height || (t.options.height = c / u);
                for (e = 0; l > e; e++) t = s[e], n = a.clone().move(a.x1, h), t.reflow(n), d--, h += t.options.height
            },
            backgroundBox: function() {
                var e, t, n, i, r, o, a = this,
                    s = a.axes,
                    l = s.length;
                for (n = 0; l > n; n++)
                    for (r = s[n], i = 0; l > i; i++) o = s[i], r.options.vertical !== o.options.vertical && (e = r.lineBox().clone().wrap(o.lineBox()), t = t ? t.wrap(e) : e);
                return t || a.box
            },
            createVisual: function() {
                var e, t, n, i, r, o;
                Kt.fn.createVisual.call(this), e = this.backgroundBox(), t = this.options.plotArea, n = t.border || {}, i = t.background, r = t.opacity, _n.isTransparent(i) && (i = io, r = 0), o = this._bgVisual = En.Path.fromRect(e.toRect(), {
                    fill: {
                        color: i,
                        opacity: r
                    },
                    stroke: {
                        color: n.width ? n.color : "",
                        width: n.width,
                        dashType: n.dashType
                    },
                    zIndex: -1
                }), this.appendVisual(o)
            },
            pointsByCategoryIndex: function(e) {
                var t, n, i, r, o, a = this.charts,
                    s = [];
                if (null !== e)
                    for (t = 0; a.length > t; t++)
                        if (o = a[t], "_navigator" !== o.pane.options.name && (i = a[t].categoryPoints[e], i && i.length))
                            for (n = 0; i.length > n; n++) r = i[n], r && wn(r.value) && null !== r.value && s.push(r);
                return s
            },
            pointsBySeriesIndex: function(e) {
                var t, n, i, r, o, a = this.charts,
                    s = [];
                for (i = 0; a.length > i; i++)
                    for (o = a[i], t = o.points, r = 0; t.length > r; r++) n = t[r], n && n.options.index === e && s.push(n);
                return s
            },
            pointsBySeriesName: function(e) {
                var t, n, i, r, o, a = this.charts,
                    s = [];
                for (i = 0; a.length > i; i++)
                    for (o = a[i], t = o.points, r = 0; t.length > r; r++) n = t[r], n && n.series.name === e && s.push(n);
                return s
            },
            paneByPoint: function(e) {
                var t, n, i = this,
                    r = i.panes;
                for (n = 0; r.length > n; n++)
                    if (t = r[n], t.box.containsPoint(e)) return t
            }
        }), st = at.extend({
            init: function(e, t) {
                var n, i, r = this;
                if (r.namedCategoryAxes = {}, r.namedValueAxes = {}, r.valueAxisRangeTracker = new lt, e.length > 0)
                    for (r.invertAxes = pn(e[0].type, [Bn, qn, eo, Jr, mr, Fi]), n = 0; e.length > n; n++)
                        if (i = e[n].stack, i && "100%" === i.type) {
                            r.stack100 = !0;
                            break
                        } at.fn.init.call(r, e, t)
            },
            options: {
                categoryAxis: {
                    categories: []
                },
                valueAxis: {}
            },
            render: function(e) {
                var t = this;
                e = e || t.panes, t.createCategoryAxes(e), t.aggregateCategories(e), t.createCategoryAxesLabels(e), t.createCharts(e), t.createValueAxes(e)
            },
            removeAxis: function(e) {
                var t = this,
                    n = e.options.name;
                at.fn.removeAxis.call(t, e), e instanceof se ? delete t.namedCategoryAxes[n] : (t.valueAxisRangeTracker.reset(n), delete t.namedValueAxes[n]), e === t.categoryAxis && delete t.categoryAxis, e === t.valueAxis && delete t.valueAxis
            },
            createCharts: function(e) {
                var t, n, i, r, o, a, s = this.groupSeriesByPane();
                for (t = 0; e.length > t; t++)
                    if (n = e[t], i = s[n.options.name || "default"] || [], this.addToLegend(i), r = this.filterVisibleSeries(i))
                        for (o = this.groupSeriesByCategoryAxis(r), a = 0; o.length > a; a++) this.createChartGroup(o[a], n)
            },
            createChartGroup: function(e, t) {
                this.createAreaChart(H(e, [Mn, Jr]), t), this.createBarChart(H(e, [ei, Bn]), t), this.createRangeBarChart(H(e, [gr, mr]), t), this.createBulletChart(H(e, [qn, Zr]), t), this.createCandlestickChart(H(e, Gn), t), this.createBoxPlotChart(H(e, Wn), t), this.createOHLCChart(H(e, cr), t), this.createWaterfallChart(H(e, [to, Fi]), t), this.createLineChart(H(e, [Oi, eo]), t)
            },
            aggregateCategories: function(e) {
                var t, n, i, r, o, a = this,
                    s = a.srcSeries || a.series,
                    l = [];
                for (t = 0; s.length > t; t++) n = s[t], i = a.seriesCategoryAxis(n), r = a.findPane(i.options.pane), o = A(i.options.type, ai), (o || n.categoryField) && pn(r, e) ? n = a.aggregateSeries(n, i) : (M(i.options.min) || M(i.options.max)) && (n = a.filterSeries(n, i)), l.push(n);
                a.srcSeries = s, a.series = l
            },
            filterSeries: function(e, t) {
                var n, i, r, o = t.totalRangeIndices(),
                    a = t.options.justified,
                    s = pn(e.type, [Oi, eo, Mn, Jr]);
                return o.min = M(t.options.min) ? It.floor(o.min) : 0, o.max = M(t.options.max) ? a ? It.floor(o.max) + 1 : It.ceil(o.max) : e.data.length, e = Ot({}, e), s && (i = o.min - 1, r = t.options.srcCategories || [], i >= 0 && e.data.length > i && (n = i, e._outOfRangeMinPoint = {
                    item: e.data[n],
                    category: r[n],
                    categoryIx: -1
                }), e.data.length > o.max && (n = o.max, e._outOfRangeMaxPoint = {
                    item: e.data[n],
                    category: r[n],
                    categoryIx: o.max - o.min
                })), t._seriesMax = It.max(t._seriesMax || 0, e.data.length), e.data = (e.data || []).slice(o.min, o.max), e
            },
            aggregateSeries: function(e, t) {
                var n, r, o, a, s, l, c, d = t.options,
                    u = A(t.options.type, ai),
                    p = d.categories,
                    m = d.srcCategories || p,
                    g = e.data,
                    v = [],
                    _ = Ot({}, e),
                    b = Ot({}, e),
                    w = d.dataItems || [],
                    y = h,
                    k = _n.MIN_NUM,
                    x = _n.MAX_NUM,
                    C = pn(e.type, [Oi, eo, Mn, Jr]);
                for (_.data = a = [], u && (y = f), n = 0; g.length > n; n++) r = e.categoryField ? y(e.categoryField, g[n]) : m[n], wn(r) && (o = t.categoryIndex(r), o >= 0 && p.length > o ? (v[o] = v[o] || [], v[o].push(n)) : C && (0 > o ? o == k ? l.points.push(n) : o > k && (k = o, l = {
                    category: r,
                    points: [n]
                }) : o >= p.length && (o == x ? c.points.push(n) : x > o && (x = o, c = {
                    category: r,
                    points: [n]
                }))));
                for (s = new St(b, ne.current, i.current), n = 0; p.length > n; n++) a[n] = s.aggregatePoints(v[n], p[n]), v[n] && (w[n] = a[n]);
                return l && a.length && (_._outOfRangeMinPoint = {
                    item: s.aggregatePoints(l.points, l.category),
                    categoryIx: k,
                    category: l.category
                }), c && a.length && (_._outOfRangeMaxPoint = {
                    item: s.aggregatePoints(c.points, c.category),
                    categoryIx: x,
                    category: c.category
                }), t.options.dataItems = w, _
            },
            appendChart: function(e, t) {
                for (var n = this, i = e.options.series, r = n.seriesCategoryAxis(i[0]), o = r.options.categories, a = It.max(0, d(i) - o.length); a--;) o.push("");
                n.valueAxisRangeTracker.update(e.valueAxisRanges), at.fn.appendChart.call(n, e, t)
            },
            seriesPaneName: function(t) {
                var n = this,
                    i = n.options,
                    r = t.axis,
                    o = [].concat(i.valueAxis),
                    a = e.grep(o, function(e) {
                        return e.name === r
                    })[0],
                    s = i.panes || [{}],
                    l = (s[0] || {}).name || "default",
                    c = (a || {}).pane || l;
                return c
            },
            seriesCategoryAxis: function(e) {
                var t = this,
                    n = e.categoryAxis,
                    i = n ? t.namedCategoryAxes[n] : t.categoryAxis;
                if (!i) throw Error("Unable to locate category axis with name " + n);
                return i
            },
            stackableChartOptions: function(e, t) {
                var n, i = e.stack,
                    r = i && "100%" === i.type;
                return wn(t.options.clip) ? n = t.options.clip : r && (n = !1), {
                    isStacked: i,
                    isStacked100: r,
                    clip: n
                }
            },
            groupSeriesByCategoryAxis: function(n) {
                function i(t, i) {
                    return e.grep(n, function(e) {
                        return 0 === i && !e.categoryAxis || e.categoryAxis == t
                    })
                }
                var r, o, a, s = {},
                    l = e.map(n, function(e) {
                        var n = e.categoryAxis || "$$default$$";
                        return s.hasOwnProperty(n) ? t : (s[n] = !0, n)
                    }),
                    c = [];
                for (r = 0; l.length > r; r++) o = l[r], a = i(o, r), 0 !== a.length && c.push(a);
                return c
            },
            createBarChart: function(e, t) {
                if (0 !== e.length) {
                    var n = this,
                        i = e[0],
                        r = new be(n, Rt({
                            series: e,
                            invertAxes: n.invertAxes,
                            gap: i.gap,
                            spacing: i.spacing
                        }, n.stackableChartOptions(i, t)));
                    n.appendChart(r, t)
                }
            },
            createRangeBarChart: function(e, t) {
                if (0 !== e.length) {
                    var n = this,
                        i = e[0],
                        r = new ye(n, {
                            series: e,
                            invertAxes: n.invertAxes,
                            gap: i.gap,
                            spacing: i.spacing
                        });
                    n.appendChart(r, t)
                }
            },
            createBulletChart: function(e, t) {
                if (0 !== e.length) {
                    var n = this,
                        i = e[0],
                        r = new ke(n, {
                            series: e,
                            invertAxes: n.invertAxes,
                            gap: i.gap,
                            spacing: i.spacing,
                            clip: t.options.clip
                        });
                    n.appendChart(r, t)
                }
            },
            createLineChart: function(e, t) {
                if (0 !== e.length) {
                    var n = this,
                        i = e[0],
                        r = new Re(n, Rt({
                            invertAxes: n.invertAxes,
                            series: e
                        }, n.stackableChartOptions(i, t)));
                    n.appendChart(r, t)
                }
            },
            createAreaChart: function(e, t) {
                if (0 !== e.length) {
                    var n = this,
                        i = e[0],
                        r = new Ne(n, Rt({
                            invertAxes: n.invertAxes,
                            series: e
                        }, n.stackableChartOptions(i, t)));
                    n.appendChart(r, t)
                }
            },
            createOHLCChart: function(e, t) {
                if (0 !== e.length) {
                    var n = this,
                        i = e[0],
                        r = new Ye(n, {
                            invertAxes: n.invertAxes,
                            gap: i.gap,
                            series: e,
                            spacing: i.spacing,
                            clip: t.options.clip
                        });
                    n.appendChart(r, t)
                }
            },
            createCandlestickChart: function(e, t) {
                if (0 !== e.length) {
                    var n = this,
                        i = e[0],
                        r = new Ge(n, {
                            invertAxes: n.invertAxes,
                            gap: i.gap,
                            series: e,
                            spacing: i.spacing,
                            clip: t.options.clip
                        });
                    n.appendChart(r, t)
                }
            },
            createBoxPlotChart: function(e, t) {
                if (0 !== e.length) {
                    var n = this,
                        i = e[0],
                        r = new Ke(n, {
                            invertAxes: n.invertAxes,
                            gap: i.gap,
                            series: e,
                            spacing: i.spacing,
                            clip: t.options.clip
                        });
                    n.appendChart(r, t)
                }
            },
            createWaterfallChart: function(e, t) {
                if (0 !== e.length) {
                    var n = this,
                        i = e[0],
                        r = new nt(n, {
                            series: e,
                            invertAxes: n.invertAxes,
                            gap: i.gap,
                            spacing: i.spacing
                        });
                    n.appendChart(r, t)
                }
            },
            axisRequiresRounding: function(e, t) {
                var n, i, r, o, a = this,
                    s = H(a.series, po);
                for (n = 0; a.series.length > n; n++) r = a.series[n], (r.type === Oi || r.type === Mn) && (o = r.line, o && o.style === Fr && s.push(r));
                for (n = 0; s.length > n; n++)
                    if (i = s[n].categoryAxis || "", i === e || !i && 0 === t) return !0
            },
            aggregatedAxis: function(e, t) {
                var n, i, r = this,
                    o = r.series;
                for (n = 0; o.length > n; n++)
                    if (i = o[n].categoryAxis || "", (i === e || !i && 0 === t) && o[n].categoryField) return !0
            },
            createCategoryAxesLabels: function() {
                var e, t = this.axes;
                for (e = 0; t.length > e; e++) t[e] instanceof se && t[e].createLabels()
            },
            createCategoryAxes: function(e) {
                var t, n, i, r, o, a, s, l, c = this,
                    d = c.invertAxes,
                    u = [].concat(c.options.categoryAxis),
                    h = [];
                for (t = 0; u.length > t; t++)
                    if (n = u[t], i = c.findPane(n.pane), pn(i, e)) {
                        if (a = n.name, r = n.categories || [], o = n.type || "", n = Ot({
                            vertical: d,
                            axisCrossingValue: d ? Gi : 0,
                            _deferLabels: !0
                        }, n), wn(n.justified) || (n.justified = c.isJustified()), c.axisRequiresRounding(a, t) && (n.justified = !1), s = U(n, r[0]) ? new le(n) : new se(n), a) {
                            if (c.namedCategoryAxes[a]) throw Error("Category axis with name " + a + " is already defined");
                            c.namedCategoryAxes[a] = s
                        }
                        s.axisIndex = t, h.push(s), c.appendAxis(s)
                    } l = c.categoryAxis || h[0], c.categoryAxis = l, d ? c.axisY = l : c.axisX = l
            },
            isJustified: function() {
                var e, t, n = this,
                    i = n.series;
                for (e = 0; i.length > e; e++)
                    if (t = i[e], !pn(t.type, [Mn, Jr])) return !1;
                return !0
            },
            createValueAxes: function(e) {
                var t, n, i, r, o, a, s, l, c, d = this,
                    u = d.valueAxisRangeTracker,
                    h = u.query(),
                    f = [].concat(d.options.valueAxis),
                    p = d.invertAxes,
                    m = {
                        vertical: !p
                    },
                    g = [];
                for (d.stack100 && (m.roundToMajorUnit = !1, m.labels = {
                    format: "P0"
                }), c = 0; f.length > c; c++)
                    if (t = f[c], n = d.findPane(t.pane), pn(n, e)) {
                        if (l = t.name, s = A(t.type, Wi) ? {
                            min: .1,
                            max: 1
                        } : {
                            min: 0,
                            max: 1
                        }, o = u.query(l) || h || s, 0 === c && o && h && (o.min = It.min(o.min, h.min), o.max = It.max(o.max, h.max)), a = A(t.type, Wi) ? en : tn, i = new a(o.min, o.max, Ot({}, m, t)), l) {
                            if (d.namedValueAxes[l]) throw Error("Value axis with name " + l + " is already defined");
                            d.namedValueAxes[l] = i
                        }
                        i.axisIndex = c, g.push(i), d.appendAxis(i)
                    } r = d.valueAxis || g[0], d.valueAxis = r, p ? d.axisX = r : d.axisY = r
            },
            click: function(t, n) {
                var i, r, o, a = this,
                    s = t._eventCoordinates(n),
                    l = new nn(s.x, s.y),
                    c = a.pointPane(l),
                    d = [],
                    u = [];
                if (c) {
                    for (i = c.axes, r = 0; i.length > r; r++) o = i[r], o.getValue ? F(u, o.getValue(l)) : F(d, o.getCategory(l));
                    0 === d.length && F(d, a.categoryAxis.getCategory(l)), d.length > 0 && u.length > 0 && t.trigger(fr, {
                        element: e(n.target),
                        originalEvent: n,
                        category: T(d),
                        value: T(u)
                    })
                }
            },
            pointPane: function(e) {
                var t, n, i = this,
                    r = i.panes;
                for (n = 0; r.length > n; n++)
                    if (t = r[n], t.contentBox.containsPoint(e)) return t
            },
            updateAxisOptions: function(e, t) {
                var n = [].concat(e instanceof se ? this.options.categoryAxis : this.options.valueAxis);
                Ot(n[e.axisIndex], t)
            }
        }), lt = Bt.extend({
            init: function() {
                var e = this;
                e.axisRanges = {}
            },
            update: function(e) {
                var t, n, i, r = this,
                    o = r.axisRanges;
                for (i in e) t = o[i], n = e[i], o[i] = t = t || {
                    min: Gi,
                    max: Yi
                }, t.min = It.min(t.min, n.min), t.max = It.max(t.max, n.max)
            },
            reset: function(e) {
                this.axisRanges[e] = t
            },
            query: function(e) {
                return this.axisRanges[e]
            }
        }), ct = at.extend({
            init: function(e, t) {
                var n = this;
                n.namedXAxes = {}, n.namedYAxes = {}, n.xAxisRangeTracker = new lt, n.yAxisRangeTracker = new lt, at.fn.init.call(n, e, t)
            },
            options: {
                xAxis: {},
                yAxis: {}
            },
            render: function(e) {
                var t, n, i, r, o = this,
                    a = o.groupSeriesByPane();
                for (e = e || o.panes, t = 0; e.length > t; t++) n = e[t], i = a[n.options.name || "default"] || [], o.addToLegend(i), r = o.filterVisibleSeries(i), r && (o.createScatterChart(H(r, yr), n), o.createScatterLineChart(H(r, kr), n), o.createBubbleChart(H(r, jn), n));
                o.createAxes(e)
            },
            appendChart: function(e, t) {
                var n = this;
                n.xAxisRangeTracker.update(e.xAxisRanges), n.yAxisRangeTracker.update(e.yAxisRanges), at.fn.appendChart.call(n, e, t)
            },
            removeAxis: function(e) {
                var t = this,
                    n = e.options.name;
                at.fn.removeAxis.call(t, e), e.options.vertical ? (t.yAxisRangeTracker.reset(n), delete t.namedYAxes[n]) : (t.xAxisRangeTracker.reset(n), delete t.namedXAxes[n]), e === t.axisX && delete t.axisX, e === t.axisY && delete t.axisY
            },
            seriesPaneName: function(t) {
                var n = this,
                    i = n.options,
                    r = t.xAxis,
                    o = [].concat(i.xAxis),
                    a = e.grep(o, function(e) {
                        return e.name === r
                    })[0],
                    s = t.yAxis,
                    l = [].concat(i.yAxis),
                    c = e.grep(l, function(e) {
                        return e.name === s
                    })[0],
                    d = i.panes || [{}],
                    u = d[0].name || "default",
                    h = (a || {}).pane || (c || {}).pane || u;
                return h
            },
            createScatterChart: function(e, t) {
                var n = this;
                e.length > 0 && n.appendChart(new Ue(n, {
                    series: e,
                    clip: t.options.clip
                }), t)
            },
            createScatterLineChart: function(e, t) {
                var n = this;
                e.length > 0 && n.appendChart(new We(n, {
                    series: e,
                    clip: t.options.clip
                }), t)
            },
            createBubbleChart: function(e, t) {
                var n = this;
                e.length > 0 && n.appendChart(new je(n, {
                    series: e,
                    clip: t.options.clip
                }), t)
            },
            createXYAxis: function(e, t, n) {
                var i, r, o, a, s, l, c, d, u = this,
                    h = e.name,
                    f = t ? u.namedYAxes : u.namedXAxes,
                    p = t ? u.yAxisRangeTracker : u.xAxisRangeTracker,
                    m = Ot({}, e, {
                        vertical: t
                    }),
                    g = A(m.type, Wi),
                    v = p.query(),
                    _ = g ? {
                        min: .1,
                        max: 1
                    } : {
                        min: 0,
                        max: 1
                    },
                    b = p.query(h) || v || _,
                    w = u.series,
                    y = [m.min, m.max];
                for (o = 0; w.length > o; o++)
                    if (a = w[o], s = a[t ? "yAxis" : "xAxis"], s == m.name || 0 === n && !s) {
                        l = ne.current.bindPoint(a, 0).valueFields, y.push(l[t ? "y" : "x"]);
                        break
                    } for (0 === n && v && (b.min = It.min(b.min, v.min), b.max = It.max(b.max, v.max)), d = 0; y.length > d; d++)
                    if (y[d] instanceof Date) {
                        c = !0;
                        break
                    } if (r = A(m.type, ai) || !m.type && c ? ce : g ? en : tn, i = new r(b.min, b.max, m), h) {
                    if (f[h]) throw Error((t ? "Y" : "X") + " axis with name " + h + " is already defined");
                    f[h] = i
                }
                return u.appendAxis(i), i
            },
            createAxes: function(e) {
                var t, n = this,
                    i = n.options,
                    r = [].concat(i.xAxis),
                    o = [],
                    a = [].concat(i.yAxis),
                    s = [];
                Dt(r, function(i) {
                    t = n.findPane(this.pane), pn(t, e) && o.push(n.createXYAxis(this, !1, i))
                }), Dt(a, function(i) {
                    t = n.findPane(this.pane), pn(t, e) && s.push(n.createXYAxis(this, !0, i))
                }), n.axisX = n.axisX || o[0], n.axisY = n.axisY || s[0]
            },
            click: function(t, n) {
                var i, r, o, a, s = this,
                    l = t._eventCoordinates(n),
                    c = new nn(l.x, l.y),
                    d = s.axes,
                    u = d.length,
                    h = [],
                    f = [];
                for (i = 0; u > i; i++) r = d[i], a = r.options.vertical ? f : h, o = r.getValue(c), null !== o && a.push(o);
                h.length > 0 && f.length > 0 && t.trigger(fr, {
                    element: e(n.target),
                    originalEvent: n,
                    x: T(h),
                    y: T(f)
                })
            },
            updateAxisOptions: function(e, t) {
                var n = e.options.vertical,
                    i = this.groupAxes(this.panes),
                    r = N(e, n ? i.y : i.x),
                    o = [].concat(n ? this.options.yAxis : this.options.xAxis)[r];
                Ot(o, t)
            }
        }), dt = at.extend({
            render: function() {
                var e = this,
                    t = e.series;
                e.createPieChart(t)
            },
            createPieChart: function(e) {
                var t = this,
                    n = e[0],
                    i = new Ze(t, {
                        series: e,
                        padding: n.padding,
                        startAngle: n.startAngle,
                        connectors: n.connectors,
                        legend: t.options.legend
                    });
                t.appendChart(i)
            },
            appendChart: function(e, t) {
                at.fn.appendChart.call(this, e, t), bn(this.options.legend.items, e.legendItems)
            }
        }), ut = dt.extend({
            render: function() {
                var e = this,
                    t = e.series;
                e.createDonutChart(t)
            },
            createDonutChart: function(e) {
                var t = this,
                    n = e[0],
                    i = new tt(t, {
                        series: e,
                        padding: n.padding,
                        connectors: n.connectors,
                        legend: t.options.legend
                    });
                t.appendChart(i)
            }
        }), ht = En.Animation.extend({
            options: {
                easing: "easeOutElastic",
                duration: Mi
            },
            setup: function() {
                this.element.transform(An.transform().scale(Er, Er, this.options.center))
            },
            step: function(e) {
                this.element.transform(An.transform().scale(e, e, this.options.center))
            }
        }), En.AnimationFactory.current.register(ur, ht), ft = En.Animation.extend({
            options: {
                easing: "easeOutElastic"
            },
            setup: function() {
                var e = this.center = this.element.bbox().center();
                this.element.transform(An.transform().scale(Er, Er, e))
            },
            step: function(e) {
                this.element.transform(An.transform().scale(e, e, this.center))
            }
        }), En.AnimationFactory.current.register(jn, ft), pt = Bt.extend({
            init: function() {
                this._points = []
            },
            destroy: function() {
                this._points = []
            },
            show: function(e) {
                var t, n;
                for (e = [].concat(e), this.hide(), t = 0; e.length > t; t++) n = e[t], n && n.toggleHighlight && n.hasHighlight() && (this.togglePointHighlight(n, !0), this._points.push(n))
            },
            togglePointHighlight: function(e, t) {
                var n, i = (e.options.highlight || {}).toggle;
                i ? (n = {
                    category: e.category,
                    series: e.series,
                    dataItem: e.dataItem,
                    value: e.value,
                    preventDefault: Y,
                    visual: e.highlightVisual(),
                    show: t
                }, i(n), n._defaultPrevented || e.toggleHighlight(t)) : e.toggleHighlight(t)
            },
            hide: function() {
                for (var e = this._points; e.length;) this.togglePointHighlight(e.pop(), !1)
            },
            isHighlighted: function(e) {
                var t, n, i = this._points;
                for (t = 0; i.length > t; t++)
                    if (n = i[t], e == n) return !0;
                return !1
            }
        }), mt = Lt.extend({
            init: function(t, n) {
                var i, r, o = this;
                Lt.fn.init.call(o), o.options = Ot({}, o.options, n), o.chartElement = t, o.template = mt.template, o.template || (o.template = mt.template = Tn("<div class='" + ii + "tooltip " + ii + "chart-tooltip' style='display:none; position: absolute; font: #= d.font #;border: #= d.border.width #px solid;opacity: #= d.opacity #; filter: alpha(opacity=#= d.opacity * 100 #);'></div>")), i = fn(o.options.padding || {}, "auto"), o.element = e(o.template(o.options)).css({
                    "padding-top": i.top,
                    "padding-right": i.right,
                    "padding-bottom": i.bottom,
                    "padding-left": i.left
                }), o.move = Pt(o.move, o), o._mouseleave = Pt(o._mouseleave, o), r = zt.format("[{0}='content'],[{0}='scroller']", zt.attr("role")), o._mobileScroller = t.closest(r).data("kendoMobileScroller")
            },
            destroy: function() {
                this._clearShowTimeout(), this.element && (this.element.off(Xi).remove(), this.element = null)
            },
            options: {
                border: {
                    width: 1
                },
                opacity: 1,
                animation: {
                    duration: Gr
                }
            },
            move: function() {
                var e, t = this,
                    n = t.options,
                    i = t.element;
                t.anchor && t.element && (e = t._offset(), t.visible || i.css({
                    top: e.top,
                    left: e.left
                }), t.visible = !0, t._ensureElement(document.body), i.stop(!0, !0).show().animate({
                    left: e.left,
                    top: e.top
                }, n.animation.duration))
            },
            _clearShowTimeout: function() {
                this.showTimeout && (clearTimeout(this.showTimeout), this.showTimeout = null)
            },
            _padding: function() {
                if (!this._chartPadding) {
                    var e = this.chartElement;
                    this._chartPadding = {
                        top: parseInt(e.css("paddingTop"), 10),
                        left: parseInt(e.css("paddingLeft"), 10)
                    }
                }
                return this._chartPadding
            },
            _offset: function() {
                var t, n, i = this,
                    r = i._measure(),
                    o = i.anchor,
                    a = i._padding(),
                    s = i.chartElement.offset(),
                    l = vn(o.y + a.top + s.top),
                    c = vn(o.x + a.left + s.left),
                    d = zt.support.zoomLevel(),
                    u = e(window),
                    h = window.pageYOffset || document.documentElement.scrollTop || 0,
                    f = window.pageXOffset || document.documentElement.scrollLeft || 0,
                    p = (this._mobileScroller || {}).movable;
                return p && 1 !== p.scale ? (t = An.transform().scale(p.scale, p.scale, [p.x, p.y]), n = new An.Point(c, l).transform(t), c = n.x, l = n.y) : (l += i._fit(l - h, r.height, u.outerHeight() / d), c += i._fit(c - f, r.width, u.outerWidth() / d)), {
                    top: l,
                    left: c
                }
            },
            setStyle: function(e, t) {
                var n, i, r = e.background,
                    o = e.border.color;
                t && (n = t.color || t.options.color, r = Dn(r, n), o = Dn(o, n)), wn(e.color) || (i = new Qt(r).percBrightness(), this.element.toggleClass(ii + Qr, i > 180)), this.element.css({
                    backgroundColor: r,
                    borderColor: o,
                    font: e.font,
                    color: e.color,
                    opacity: e.opacity,
                    borderWidth: e.border.width
                })
            },
            show: function() {
                this._clearShowTimeout(), this.showTimeout = setTimeout(this.move, Yr)
            },
            hide: function() {
                var e = this;
                clearTimeout(e.showTimeout), e._hideElement(), e.visible && (e.point = null, e.visible = !1, e.index = null)
            },
            _measure: function() {
                this._ensureElement();
                var e = {
                    width: this.element.outerWidth(),
                    height: this.element.outerHeight()
                };
                return e
            },
            _ensureElement: function() {
                this.element && this.element.appendTo(document.body).on(Xi, this._mouseleave)
            },
            _mouseleave: function(t) {
                var n = t.relatedTarget,
                    i = this.chartElement[0];
                n && n !== i && !e.contains(i, n) && (this.trigger(Bi), this.hide())
            },
            _hideElement: function() {
                var e = this,
                    t = this.element;
                t && t.fadeOut({
                    always: function() {
                        e.visible || t.off(Xi).remove()
                    }
                })
            },
            _pointContent: function(e) {
                var t, n, i = this,
                    r = Ot({}, i.options, e.options.tooltip);
                return wn(e.value) && (t = "" + e.value), r.template ? (n = Wt(r.template), t = n({
                    value: e.value,
                    category: e.category,
                    series: e.series,
                    dataItem: e.dataItem,
                    percentage: e.percentage,
                    runningTotal: e.runningTotal,
                    total: e.total,
                    low: e.low,
                    high: e.high,
                    xLow: e.xLow,
                    xHigh: e.xHigh,
                    yLow: e.yLow,
                    yHigh: e.yHigh
                })) : r.format && (t = e.formatValue(r.format)), t
            },
            _pointAnchor: function(e) {
                var t = this._measure();
                return e.tooltipAnchor(t.width, t.height)
            },
            _fit: function(e, t, n) {
                var i = 0;
                return e + t > n && (i = n - (e + t)), 0 > e && (i = -e), i
            }
        }), gt = mt.extend({
            show: function(e) {
                var t = this,
                    n = Ot({}, t.options, e.options.tooltip);
                e && e.tooltipAnchor && t.element && (t.element.html(t._pointContent(e)), t.anchor = t._pointAnchor(e), t.anchor ? (t.setStyle(n, e), mt.fn.show.call(t, e)) : t.hide())
            }
        }), vt = mt.extend({
            init: function(e, t, n) {
                var i = this;
                mt.fn.init.call(i, e, n), i.plotArea = t
            },
            options: {
                sharedTemplate: "<table><th colspan='2'>#= categoryText #</th># for(var i = 0; i < points.length; i++) { ## var point = points[i]; #<tr># if(point.series.name) { # <td> #= point.series.name #:</td># } #<td>#= content(point) #</td></tr># } #</table>",
                categoryFormat: "{0:d}"
            },
            showAt: function(t, n) {
                var i, r = this,
                    o = r.options,
                    a = r.plotArea,
                    s = a.categoryAxis,
                    l = s.pointCategoryIndex(n),
                    c = s.getCategory(n),
                    d = s.getSlot(l);
                t = e.grep(t, function(e) {
                    var t = e.series.tooltip,
                        n = t && t.visible === !1;
                    return !n
                }), t.length > 0 && (i = r._content(t, c), r.element.html(i), r.anchor = r._slotAnchor(n, d), r.setStyle(o, t[0]), mt.fn.show.call(r))
            },
            _slotAnchor: function(e, t) {
                var n, i = this,
                    r = i.plotArea,
                    o = r.categoryAxis,
                    a = this._measure(),
                    s = e.y - a.height / 2;
                return n = o.options.vertical ? nn(e.x, s) : nn(t.center().x, s)
            },
            _content: function(e, t) {
                var n, i, r = this;
                return n = zt.template(r.options.sharedTemplate), i = n({
                    points: e,
                    category: t,
                    categoryText: un(r.options.categoryFormat, t),
                    content: r._pointContent
                })
            }
        }), _t = Kt.extend({
            init: function(e, t) {
                Kt.fn.init.call(this, t), this.axis = e, this.stickyMode = e instanceof se
            },
            options: {
                color: On,
                width: 1,
                zIndex: -1,
                tooltip: {
                    visible: !1
                }
            },
            showAt: function(e) {
                this.point = e, this.moveLine(), this.line.visible(!0);
                var t = this.options.tooltip;
                t.visible && (this.tooltip || (this.tooltip = new bt(this, Ot({}, t, {
                    stickyMode: this.stickyMode
                }))), this.tooltip.showAt(e))
            },
            hide: function() {
                this.line.visible(!1), this.tooltip && this.tooltip.hide()
            },
            moveLine: function() {
                var e, t, n, i = this,
                    r = i.axis,
                    o = r.options.vertical,
                    a = i.getBox(),
                    s = i.point,
                    l = o ? oo : ro;
                t = new An.Point(a.x1, a.y1), n = o ? new An.Point(a.x2, a.y1) : new An.Point(a.x1, a.y2), s && (i.stickyMode ? (e = r.getSlot(r.pointCategoryIndex(s)), t[l] = n[l] = e.center()[l]) : t[l] = n[l] = s[l]), i.box = a, this.line.moveTo(t).lineTo(n)
            },
            getBox: function() {
                var e, t, n, i = this,
                    r = i.axis,
                    o = r.pane.axes,
                    a = o.length,
                    s = r.options.vertical,
                    l = r.lineBox().clone(),
                    c = s ? ro : oo;
                for (n = 0; a > n; n++) t = o[n], t.options.vertical != s && (e ? e.wrap(t.lineBox()) : e = t.lineBox().clone());
                return l[c + 1] = e[c + 1], l[c + 2] = e[c + 2], l
            },
            createVisual: function() {
                Kt.fn.createVisual.call(this);
                var e = this.options;
                this.line = new En.Path({
                    stroke: {
                        color: e.color,
                        width: e.width,
                        opacity: e.opacity,
                        dashType: e.dashType
                    },
                    visible: !1
                }), this.moveLine(), this.visual.append(this.line)
            },
            destroy: function() {
                var e = this;
                e.tooltip && e.tooltip.destroy(), Kt.fn.destroy.call(e)
            }
        }), bt = mt.extend({
            init: function(e, t) {
                var n = this,
                    i = e.axis.getRoot().chart.element;
                n.crosshair = e, mt.fn.init.call(n, i, Ot({}, n.options, {
                    background: e.axis.plotArea.options.seriesColors[0]
                }, t)), n.setStyle(n.options)
            },
            options: {
                padding: 10
            },
            showAt: function(e) {
                var t = this,
                    n = t.element;
                n && (t.point = e, t.element.html(t.content(e)), t.anchor = t.getAnchor(), t.move())
            },
            move: function() {
                var e = this,
                    t = e.element,
                    n = e._offset();
                e._ensureElement(), t.css({
                    top: n.top,
                    left: n.left
                }).show()
            },
            content: function(e) {
                var t, n, i, r = this,
                    o = r.options,
                    a = r.crosshair.axis,
                    s = a.options;
                return n = t = a[o.stickyMode ? "getCategory" : "getValue"](e), o.template ? (i = Wt(o.template), t = i({
                    value: n
                })) : o.format ? t = un(o.format, n) : s.type === ai && (t = un(s.labels.dateFormats[s.baseUnit], n)), t
            },
            getAnchor: function() {
                var e, t = this,
                    n = t.options,
                    i = n.position,
                    r = this.crosshair,
                    o = !r.axis.options.vertical,
                    a = r.line.bbox(),
                    s = this._measure(),
                    l = s.width / 2,
                    c = s.height / 2,
                    d = n.padding;
                return e = o ? i === Un ? a.bottomLeft().translate(-l, d) : a.topLeft().translate(-l, -s.height - d) : i === Li ? a.topLeft().translate(-s.width - d, -c) : a.topRight().translate(d, -c)
            },
            hide: function() {
                this.element.hide(), this.point = null
            },
            destroy: function() {
                mt.fn.destroy.call(this), this.point = null
            }
        }), wt = {
            min: function(e) {
                var t, n, i = Gi,
                    r = e.length;
                for (t = 0; r > t; t++) n = e[t], M(n) && (i = It.min(i, n));
                return i === Gi ? e[0] : i
            },
            max: function(e) {
                var t, n, i = Yi,
                    r = e.length;
                for (t = 0; r > t; t++) n = e[t], M(n) && (i = It.max(i, n));
                return i === Yi ? e[0] : i
            },
            sum: function(e) {
                var t, n, i = e.length,
                    r = 0;
                for (t = 0; i > t; t++) n = e[t], M(n) && (r += n);
                return r
            },
            sumOrNull: function(e) {
                var t = null;
                return R(e) && (t = wt.sum(e)), t
            },
            count: function(e) {
                var t, n, i = e.length,
                    r = 0;
                for (t = 0; i > t; t++) n = e[t], null !== n && wn(n) && r++;
                return r
            },
            avg: function(e) {
                var t = e[0],
                    n = R(e);
                return n > 0 && (t = wt.sum(e) / n), t
            },
            first: function(e) {
                var t, n, i = e.length;
                for (t = 0; i > t; t++)
                    if (n = e[t], null !== n && wn(n)) return n;
                return e[0]
            }
        }, i.prototype = {
            register: function(e, t) {
                for (var n = 0; e.length > n; n++) this._defaults[e[n]] = t
            },
            query: function(e) {
                return this._defaults[e]
            }
        }, i.current = new i, yt = Lt.extend({
            init: function(t, n, i) {
                var r, o, a = this,
                    s = t.element,
                    l = n.lineBox(),
                    c = a.getValueAxis(n),
                    d = c.lineBox(),
                    u = "." + ii;
                Lt.fn.init.call(a), a.options = Ot({}, a.options, i), i = a.options, a.chart = t, a.chartElement = s, a.categoryAxis = n, a._dateAxis = a.categoryAxis instanceof le, a.valueAxis = c, a._dateAxis && Ot(i, {
                    min: p(i.min),
                    max: p(i.max),
                    from: p(i.from),
                    to: p(i.to)
                }), a.template = yt.template, a.template || (a.template = yt.template = Tn("<div class='" + ii + "selector' style='width: #= d.width #px; height: #= d.height #px; top: #= d.offset.top #px; left: #= d.offset.left #px;'><div class='" + ii + "mask'></div><div class='" + ii + "mask'></div><div class='" + ii + "selection'><div class='" + ii + "selection-bg'></div><div class='" + ii + "handle " + ii + "leftHandle'><div></div></div><div class='" + ii + "handle " + ii + "rightHandle'><div></div></div></div></div>")), o = {
                    left: parseInt(s.css("paddingLeft"), 10),
                    right: parseInt(s.css("paddingTop"), 10)
                }, a.options = Ot({}, {
                    width: l.width(),
                    height: d.height(),
                    padding: o,
                    offset: {
                        left: d.x2 + o.left,
                        top: d.y1 + o.right
                    },
                    from: i.min,
                    to: i.max
                }, i), a.options.visible && (a.wrapper = r = e(a.template(a.options)).appendTo(s), a.selection = r.find(u + "selection"), a.leftMask = r.find(u + "mask").first(), a.rightMask = r.find(u + "mask").last(), a.leftHandle = r.find(u + "leftHandle"), a.rightHandle = r.find(u + "rightHandle"), a.options.selection = {
                    border: {
                        left: parseFloat(a.selection.css("border-left-width"), 10),
                        right: parseFloat(a.selection.css("border-right-width"), 10)
                    }
                }, a.leftHandle.css("top", (a.selection.height() - a.leftHandle.height()) / 2), a.rightHandle.css("top", (a.selection.height() - a.rightHandle.height()) / 2), a.set(a._index(i.from), a._index(i.to)), a.bind(a.events, a.options), a.wrapper[0].style.cssText = a.wrapper[0].style.cssText, a.wrapper.on(rr, Pt(a._mousewheel, a)), zt.UserEvents ? a.userEvents = new zt.UserEvents(a.wrapper, {
                    global: !0,
                    stopPropagation: !0,
                    multiTouch: !0,
                    fastTap: !0,
                    start: Pt(a._start, a),
                    move: Pt(a._move, a),
                    end: Pt(a._end, a),
                    tap: Pt(a._tap, a),
                    gesturestart: Pt(a._gesturechange, a),
                    gesturechange: Pt(a._gesturechange, a)
                }) : a.leftHandle.add(a.rightHandle).removeClass(ii + "handle"))
            },
            events: [Cr, Sr, Tr],
            options: {
                visible: !0,
                mousewheel: {
                    zoom: Vn
                },
                min: Yi,
                max: Gi
            },
            destroy: function() {
                var e = this,
                    t = e.userEvents;
                t && t.destroy(), clearTimeout(e._mwTimeout), e._state = null, e.wrapper.remove()
            },
            _rangeEventArgs: function(e) {
                var t = this;
                return {
                    axis: t.categoryAxis.options,
                    from: t._value(e.from),
                    to: t._value(e.to)
                }
            },
            _start: function(t) {
                var n, i = this,
                    r = i.options,
                    o = e(t.event.target);
                !i._state && o && (i.chart._unsetActivePoint(), i._state = {
                    moveTarget: o.parents(".k-handle").add(o).first(),
                    startLocation: t.x ? t.x.location : 0,
                    range: {
                        from: i._index(r.from),
                        to: i._index(r.to)
                    }
                }, n = i._rangeEventArgs({
                    from: i._index(r.from),
                    to: i._index(r.to)
                }), i.trigger(Cr, n) && (i.userEvents.cancel(), i._state = null))
            },
            _move: function(e) {
                if (this._state) {
                    var t = this,
                        n = t._state,
                        i = t.options,
                        r = t.categoryAxis.options.categories,
                        o = t._index(i.from),
                        a = t._index(i.to),
                        s = t._index(i.min),
                        l = t._index(i.max),
                        c = n.startLocation - e.x.location,
                        d = n.range,
                        u = {
                            from: d.from,
                            to: d.to
                        },
                        h = d.to - d.from,
                        f = n.moveTarget,
                        p = t.wrapper.width() / (r.length - 1),
                        m = It.round(c / p);
                    f && (e.preventDefault(), f.is(".k-selection, .k-selection-bg") ? (d.from = It.min(It.max(s, o - m), l - h), d.to = It.min(d.from + h, l)) : f.is(".k-leftHandle") ? (d.from = It.min(It.max(s, o - m), l - 1), d.to = It.max(d.from + 1, d.to)) : f.is(".k-rightHandle") && (d.to = It.min(It.max(s + 1, a - m), l), d.from = It.min(d.to - 1, d.from)), (d.from !== u.from || d.to !== u.to) && (t.move(d.from, d.to), t.trigger(Sr, t._rangeEventArgs(d))))
                }
            },
            _end: function() {
                var e = this,
                    t = e._state.range;
                delete e._state, e.set(t.from, t.to), e.trigger(Tr, e._rangeEventArgs(t))
            },
            _gesturechange: function(e) {
                if (this._state) {
                    var t = this,
                        n = t.chart,
                        i = t._state,
                        r = t.options,
                        o = t.categoryAxis,
                        a = i.range,
                        s = n._toModelCoordinates(e.touches[0].x.location).x,
                        l = n._toModelCoordinates(e.touches[1].x.location).x,
                        c = It.min(s, l),
                        d = It.max(s, l);
                    e.preventDefault(), i.moveTarget = null, a.from = o.pointCategoryIndex(new jt.Point2D(c)) || r.min, a.to = o.pointCategoryIndex(new jt.Point2D(d)) || r.max, t.move(a.from, a.to)
                }
            },
            _tap: function(e) {
                var t = this,
                    n = t.options,
                    i = t.chart._eventCoordinates(e),
                    r = t.categoryAxis,
                    o = r.pointCategoryIndex(new jt.Point2D(i.x, r.box.y1)),
                    a = t._index(n.from),
                    s = t._index(n.to),
                    l = t._index(n.min),
                    c = t._index(n.max),
                    d = s - a,
                    u = a + d / 2,
                    h = It.round(u - o),
                    f = {},
                    p = 3 === e.event.which;
                t._state || p || (e.preventDefault(), t.chart._unsetActivePoint(), r.options.justified || h--, f.from = It.min(It.max(l, a - h), c - d), f.to = It.min(f.from + d, c), t._start(e), t._state && (t._state.range = f, t.trigger(Sr, t._rangeEventArgs(f)), t._end()))
            },
            _mousewheel: function(e) {
                var t, n = this,
                    i = n.options,
                    r = gn(e);
                n._start({
                    event: {
                        target: n.selection
                    }
                }), n._state && (t = n._state.range, e.preventDefault(), e.stopPropagation(), It.abs(r) > 1 && (r *= lo), i.mousewheel.reverse && (r *= -1), n.expand(r) && n.trigger(Sr, {
                    axis: n.categoryAxis.options,
                    delta: r,
                    originalEvent: e,
                    from: n._value(t.from),
                    to: n._value(t.to)
                }), n._mwTimeout && clearTimeout(n._mwTimeout), n._mwTimeout = setTimeout(function() {
                    n._end()
                }, ir))
            },
            _index: function(e) {
                var t = this,
                    n = t.categoryAxis,
                    i = n.options.categories,
                    r = e;
                return e instanceof Date && (r = I(e, i), !n.options.justified && e > yn(i) && (r += 1)), r
            },
            _value: function(e) {
                var t = this,
                    n = this.categoryAxis,
                    i = n.options.categories,
                    r = e;
                return t._dateAxis && (r = e > i.length - 1 ? t.options.max : i[e]), r
            },
            _slot: function(e) {
                var t = this.categoryAxis,
                    n = this._index(e);
                return t.getSlot(n, n, !0)
            },
            move: function(e, t) {
                var n, i, r, o, a = this,
                    s = a.options,
                    l = s.offset,
                    c = s.padding,
                    d = s.selection.border;
                r = a._slot(e), n = vn(r.x1 - l.left + c.left), a.leftMask.width(n), a.selection.css("left", n), r = a._slot(t), i = vn(s.width - (r.x1 - l.left + c.left)), a.rightMask.width(i), o = s.width - i, o != s.width && (o += d.right), a.rightMask.css("left", o), a.selection.width(It.max(s.width - (n + i) - d.right, 0))
            },
            set: function(e, t) {
                var n = this,
                    i = n.options,
                    r = n._index(i.min),
                    o = n._index(i.max);
                e = kn(n._index(e), r, o), t = kn(n._index(t), e + 1, o), i.visible && n.move(e, t), i.from = n._value(e), i.to = n._value(t)
            },
            expand: function(e) {
                var n = this,
                    i = n.options,
                    r = n._index(i.min),
                    o = n._index(i.max),
                    a = i.mousewheel.zoom,
                    s = n._index(i.from),
                    l = n._index(i.to),
                    c = {
                        from: s,
                        to: l
                    },
                    d = Ot({}, c);
                return n._state && (c = n._state.range), a !== _r && (c.from = kn(kn(s - e, 0, l - 1), r, o)), a !== Li && (c.to = kn(kn(l + e, c.from + 1, o), r, o)), c.from !== d.from || c.to !== d.to ? (n.set(c.from, c.to), !0) : t
            },
            getValueAxis: function(e) {
                var t, n, i = e.pane.axes,
                    r = i.length;
                for (t = 0; r > t; t++)
                    if (n = i[t], n.options.vertical !== e.options.vertical) return n
            }
        }), kt = Bt.extend({
            init: function(e, t) {
                this.plotArea = e, this.options = Ot({}, this.options, t)
            },
            options: {
                key: "none",
                lock: "none"
            },
            start: function(e) {
                this._active = J(e.event, this.options.key)
            },
            move: function(e) {
                if (this._active) {
                    var t = this.axisRanges = this._panAxes(e, ro).concat(this._panAxes(e, oo));
                    if (t.length) return this.axisRanges = t, X(t)
                }
            },
            end: function() {
                this._active = !1
            },
            pan: function() {
                var e, t, n = this.plotArea,
                    i = this.axisRanges;
                if (i.length) {
                    for (t = 0; i.length > t; t++) e = i[t], n.updateAxisOptions(e.axis, e.range);
                    n.redraw(n.panes)
                }
            },
            _panAxes: function(e, t) {
                var n, i, r, o, a = this.plotArea,
                    s = -e[t].delta,
                    l = (this.options.lock || "").toLowerCase(),
                    c = [];
                if (0 !== s && (l || "").toLowerCase() != t)
                    for (n = a.axes, o = 0; n.length > o; o++) i = n[o], (t == ro && !i.options.vertical || t == oo && i.options.vertical) && (r = i.pan(s), r && (r.limitRange = !0, c.push({
                        axis: i,
                        range: r
                    })));
                return c
            }
        }), xt = Bt.extend({
            init: function(t, n) {
                this.chart = t, this.options = Ot({}, this.options, n), this._marquee = e("<div class='k-marquee'><div class='k-marquee-color'></div></div>")
            },
            options: {
                key: "shift",
                lock: "none"
            },
            start: function(e) {
                var t, n, i, r, o;
                return J(e.event, this.options.key) && (t = this.chart, n = t._toModelCoordinates(e.x.client, e.y.client), i = this._zoomPane = t._plotArea.paneByPoint(n), i && i.clipBox()) ? (r = i.clipBox().clone(), o = this._elementOffset(), r.translate(o.left, o.top), this._zoomPaneClipBox = r, this._marquee.appendTo(document.body).css({
                    left: e.x.client + 1,
                    top: e.y.client + 1,
                    width: 0,
                    height: 0
                }), !0) : !1
            },
            _elementOffset: function() {
                var e = this.chart.element,
                    t = e.offset();
                return {
                    left: parseInt(e.css("paddingTop"), 10) + t.left,
                    top: parseInt(e.css("paddingLeft"), 10) + t.top
                }
            },
            move: function(e) {
                var t, n = this._zoomPane;
                n && (t = this._selectionPosition(e), this._marquee.css(t))
            },
            end: function(e) {
                var n, i, r, o, a = this._zoomPane;
                return a ? (n = this._elementOffset(), i = this._selectionPosition(e), i.left -= n.left, i.top -= n.top, r = {
                    x: i.left,
                    y: i.top
                }, o = {
                    x: i.left + i.width,
                    y: i.top + i.height
                }, this._updateAxisRanges(r, o), this._marquee.remove(), delete this._zoomPane, X(this.axisRanges)) : t
            },
            zoom: function() {
                var e, t, n, i = this.axisRanges;
                if (i && i.length) {
                    for (e = this.chart._plotArea, n = 0; i.length > n; n++) t = i[n], e.updateAxisOptions(t.axis, t.range);
                    e.redraw(e.panes)
                }
            },
            destroy: function() {
                this._marquee.remove(), delete this._marquee
            },
            _updateAxisRanges: function(e, t) {
                var n, i, r, o, a = (this.options.lock || "").toLowerCase(),
                    s = [],
                    l = this._zoomPane.axes;
                for (r = 0; l.length > r; r++) n = l[r], i = n.options.vertical, a == ro && !i || a === oo && i || (o = n.pointsRange(e, t), s.push({
                    axis: n,
                    range: o
                }));
                this.axisRanges = s
            },
            _selectionPosition: function(e) {
                var t = (this.options.lock || "").toLowerCase(),
                    n = It.min(e.x.startLocation, e.x.location),
                    i = It.min(e.y.startLocation, e.y.location),
                    r = It.abs(e.x.initialDelta),
                    o = It.abs(e.y.initialDelta),
                    a = this._zoomPaneClipBox;
                return t == ro && (n = a.x1, r = a.width()), t == oo && (i = a.y1, o = a.height()), e.x.location > a.x2 && (r = a.x2 - e.x.startLocation), a.x1 > e.x.location && (r = e.x.startLocation - a.x1), e.y.location > a.y2 && (o = a.y2 - e.y.startLocation), a.y1 > e.y.location && (o = e.y.startLocation - a.y1), {
                    left: It.max(n, a.x1),
                    top: It.max(i, a.y1),
                    width: r,
                    height: o
                }
            }
        }), Ct = Bt.extend({
            init: function(e, t) {
                this.chart = e, this.options = Ot({}, this.options, t)
            },
            updateRanges: function(e) {
                var t, n, i, r, o = (this.options.lock || "").toLowerCase(),
                    a = [],
                    s = this.chart._plotArea.axes;
                for (i = 0; s.length > i; i++) t = s[i], n = t.options.vertical, o == ro && !n || o === oo && n || (r = t.zoomRange(-e), r && a.push({
                    axis: t,
                    range: r
                }));
                return this.axisRanges = a, X(a)
            },
            zoom: function() {
                var e, t, n, i = this.axisRanges;
                if (i && i.length) {
                    for (e = this.chart._plotArea, n = 0; i.length > n; n++) t = i[n], e.updateAxisOptions(t.axis, t.range);
                    e.redraw(e.panes)
                }
            }
        }), St = function(e, t, n) {
            var i, r, o, a = this,
                s = t.canonicalFields(e),
                l = t.valueFields(e),
                c = t.sourceFields(e, s),
                d = a._seriesFields = [],
                u = n.query(e.type),
                h = e.aggregate || u;
            for (a._series = e, a._binder = t, i = 0; s.length > i; i++) {
                if (r = s[i], typeof h === lr) o = h[r];
                else {
                    if (0 !== i && !pn(r, l)) break;
                    o = h
                }
                o && d.push({
                    canonicalName: r,
                    name: c[i],
                    transform: Ut(o) ? o : wt[o]
                })
            }
        }, St.prototype = {
            aggregatePoints: function(e, t) {
                var n, i, r, o, a, s = this,
                    l = s._bindPoints(e || []),
                    c = s._series,
                    d = s._seriesFields,
                    u = l.dataItems[0],
                    h = {};
                for (!u || M(u) || At(u) || (a = function() {}, a.prototype = u, h = new a), n = 0; d.length > n; n++) {
                    if (i = d[n], r = s._bindField(l.values, i.canonicalName), o = i.transform(r, c, l.dataItems, t), !(null === o || typeof o !== lr || wn(o.length) || o instanceof Date)) {
                        h = o;
                        break
                    }
                    wn(o) && (j(i.name, h), zt.setter(i.name)(h, o))
                }
                return h
            },
            _bindPoints: function(e) {
                var t, n, i = this,
                    r = i._binder,
                    o = i._series,
                    a = [],
                    s = [];
                for (t = 0; e.length > t; t++) n = e[t], a.push(r.bindPoint(o, n)), s.push(o.data[n]);
                return {
                    values: a,
                    dataItems: s
                }
            },
            _bindField: function(e, t) {
                var n, i, r, o, a = [],
                    s = e.length;
                for (n = 0; s > n; n++) i = e[n], o = i.valueFields, r = wn(o[t]) ? o[t] : i.fields[t], a.push(r);
                return a
            }
        }, Tt = Bt.extend({
            init: function(e) {
                this._axis = e
            },
            slot: function(e, t, n) {
                return wn(n) || (n = !0), this._axis.slot(e, t, n)
            },
            range: function() {
                return this._axis.range()
            }
        }), Rt(e.easing, {
            easeOutElastic: function(e, t, n, i) {
                var r = 1.70158,
                    o = 0,
                    a = i;
                return 0 === e ? n : 1 === e ? n + i : (o || (o = .5), a < It.abs(i) ? (a = i, r = o / 4) : r = o / (2 * It.PI) * It.asin(i / a), a * It.pow(2, -10 * e) * It.sin((1 * e - r) * (1.1 * It.PI) / o) + i + n)
            }
        }), jt.ui.plugin(go), te.current.register(st, [Bn, ei, Oi, eo, Mn, Jr, Gn, cr, qn, Zr, Wn, gr, mr, to, Fi]), te.current.register(ct, [yr, kr, jn]), te.current.register(dt, [ur]), te.current.register(ut, [fi]), ne.current.register([Bn, ei, Oi, eo, Mn, Jr], [Xr], [$n, Zn, sr, _i, bi]), ne.current.register([gr, mr], [Ti, jr], [$n, Zn, sr]), ne.current.register([to, Fi], [Xr], [$n, Zn, sr, zr]), i.current.register([Bn, ei, Oi, eo, Mn, Jr, to, Fi], {
            value: ji,
            color: Si,
            noteText: Si,
            errorLow: $i,
            errorHigh: ji
        }), i.current.register([gr, mr], {
            from: $i,
            to: ji,
            color: Si,
            noteText: Si
        }), ne.current.register([yr, kr, jn], [ro, oo], [Zn, sr, wi, yi, ki, xi]), ne.current.register([jn], [ro, oo, "size"], [Zn, $n, sr]), ne.current.register([Gn, cr], ["open", "high", "low", "close"], [$n, Zn, "downColor", sr]), i.current.register([Gn, cr], {
            open: ji,
            high: ji,
            low: $i,
            close: ji,
            color: Si,
            downColor: Si,
            noteText: Si
        }), ne.current.register([Wn], ["lower", "q1", "median", "q3", "upper", "mean", "outliers"], [$n, Zn, sr]), i.current.register([Wn], {
            lower: ji,
            q1: ji,
            median: ji,
            q3: ji,
            upper: ji,
            mean: ji,
            outliers: Si,
            color: Si,
            noteText: Si
        }), ne.current.register([qn, Zr], ["current", "target"], [$n, Zn, "visibleInLegend", sr]), i.current.register([qn, Zr], {
            current: ji,
            target: ji,
            color: Si,
            noteText: Si
        }), ne.current.register([ur, fi], [Xr], [$n, Zn, "explode", "visibleInLegend", "visible"]), Ot(jt, {
            EQUALLY_SPACED_SERIES: po,
            Aggregates: wt,
            AreaChart: Ne,
            AreaSegment: He,
            AxisGroupRangeTracker: lt,
            Bar: pe,
            BarChart: be,
            BarLabel: ie,
            BubbleChart: je,
            Bullet: xe,
            BulletChart: ke,
            CandlestickChart: Ge,
            Candlestick: qe,
            CategoricalChart: _e,
            CategoricalErrorBar: Te,
            CategoricalPlotArea: st,
            CategoryAxis: se,
            ChartAxis: Tt,
            ChartContainer: ot,
            ClipAnimation: Pe,
            ClusterLayout: de,
            Crosshair: _t,
            CrosshairTooltip: bt,
            DateCategoryAxis: le,
            DateValueAxis: ce,
            DefaultAggregates: i,
            DonutChart: tt,
            DonutPlotArea: ut,
            DonutSegment: et,
            ErrorBarBase: Se,
            ErrorRangeCalculator: ve,
            Highlight: pt,
            SharedTooltip: vt,
            Legend: ae,
            LegendItem: re,
            LegendLayout: oe,
            LineChart: Re,
            LinePoint: Ae,
            LineSegment: Fe,
            Pane: rt,
            PieAnimation: ht,
            PieChart: Ze,
            PieChartMixin: Je,
            PiePlotArea: dt,
            PieSegment: Xe,
            PlotAreaBase: at,
            PlotAreaFactory: te,
            PointEventsMixin: he,
            RangeBar: we,
            RangeBarChart: ye,
            ScatterChart: Ue,
            ScatterErrorBar: De,
            ScatterLineChart: We,
            Selection: yt,
            SeriesAggregator: St,
            SeriesBinder: ne,
            ShapeElement: an,
            SplineSegment: Be,
            SplineAreaSegment: Oe,
            StackWrap: ue,
            Tooltip: gt,
            OHLCChart: Ye,
            OHLCPoint: $e,
            WaterfallChart: nt,
            WaterfallSegment: it,
            XYPlotArea: ct,
            MousewheelZoom: Ct,
            ZoomSelection: xt,
            Pannable: kt,
            addDuration: g,
            areNumbers: P,
            axisGroupBox: D,
            categoriesCount: d,
            ceilDate: b,
            countNumbers: R,
            duration: x,
            ensureTree: j,
            indexOf: N,
            isNumber: M,
            floorDate: _,
            filterSeriesByType: H,
            hasValue: Q,
            lteDateIndex: I,
            evalOptions: B,
            seriesTotal: q,
            singleItemOrArray: T,
            sortDates: O,
            startOfWeek: v,
            transpose: W,
            toDate: p,
            toTime: m,
            uniqueDates: V
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.chart.polar.min", ["kendo.dataviz.chart.min", "kendo.drawing.min"], e)
}(function() {
    return function(e, t) {
        function n(e, t) {
            return e.value.x - t.value.x
        }

        function i(e, t) {
            return 180 - C.abs(C.abs(e - t) - 180)
        }
        var r, o, a, s, l, c, d, u, h, f, p, m, g, v, _, b, w, y, k, x, C = Math,
            S = window.kendo,
            T = S.deepExtend,
            D = S.util,
            A = D.append,
            E = S.drawing,
            F = S.geometry,
            I = S.dataviz,
            M = I.AreaSegment,
            R = I.Axis,
            P = I.AxisGroupRangeTracker,
            z = I.BarChart,
            B = I.Box2D,
            L = I.CategoryAxis,
            H = I.CategoricalChart,
            N = I.CategoricalPlotArea,
            O = I.ChartElement,
            V = I.CurveProcessor,
            U = I.DonutSegment,
            W = I.LineChart,
            j = I.LineSegment,
            q = I.LogarithmicAxis,
            G = I.NumericAxis,
            $ = I.PlotAreaBase,
            Y = I.PlotAreaFactory,
            K = I.Point2D,
            Q = I.Ring,
            X = I.ScatterChart,
            J = I.ScatterLineChart,
            Z = I.SeriesBinder,
            ee = I.ShapeBuilder,
            te = I.SplineSegment,
            ne = I.SplineAreaSegment,
            ie = I.getSpacing,
            re = I.filterSeriesByType,
            oe = D.limitValue,
            ae = I.round,
            se = "arc",
            le = "#000",
            ce = I.COORD_PRECISION,
            de = .15,
            ue = C.PI / 180,
            he = "gap",
            fe = "interpolate",
            pe = "log",
            me = "plotAreaClick",
            ge = "polarArea",
            ve = "polarLine",
            _e = "polarScatter",
            be = "radarArea",
            we = "radarColumn",
            ye = "radarLine",
            ke = "smooth",
            xe = "x",
            Ce = "y",
            Se = "zero",
            Te = [ge, ve, _e],
            De = [be, we, ye],
            Ae = {
                createGridLines: function(e) {
                    var t, n, i = this,
                        r = i.options,
                        o = C.abs(i.box.center().y - e.lineBox().y1),
                        a = !1,
                        s = [];
                    return r.majorGridLines.visible && (t = i.majorGridLineAngles(e), a = !0, s = i.renderMajorGridLines(t, o, r.majorGridLines)), r.minorGridLines.visible && (n = i.minorGridLineAngles(e, a), A(s, i.renderMinorGridLines(n, o, r.minorGridLines, e, a))), s
                },
                renderMajorGridLines: function(e, t, n) {
                    return this.renderGridLines(e, t, n)
                },
                renderMinorGridLines: function(e, t, n, i, r) {
                    var o = this.radiusCallback && this.radiusCallback(t, i, r);
                    return this.renderGridLines(e, t, n, o)
                },
                renderGridLines: function(e, t, n, i) {
                    var r, o, a = {
                            stroke: {
                                width: n.width,
                                color: n.color,
                                dashType: n.dashType
                            }
                        },
                        s = this.box.center(),
                        l = new F.Circle([s.x, s.y], t),
                        c = this.gridLinesVisual();
                    for (r = 0; e.length > r; r++) o = new E.Path(a), i && (l.radius = i(e[r])), o.moveTo(l.center).lineTo(l.pointAt(e[r])), c.append(o);
                    return c.children
                },
                gridLineAngles: function(n, i, r, o, a) {
                    var s = this,
                        l = s.intervals(i, r, o, a),
                        c = n.options,
                        d = c.visible && (c.line || {}).visible !== !1;
                    return e.map(l, function(e) {
                        var n = s.intervalAngle(e);
                        return d && 90 === n ? t : n
                    })
                }
            },
            Ee = L.extend({
                options: {
                    startAngle: 90,
                    labels: {
                        margin: ie(10)
                    },
                    majorGridLines: {
                        visible: !0
                    },
                    justified: !0
                },
                range: function() {
                    return {
                        min: 0,
                        max: this.options.categories.length
                    }
                },
                reflow: function(e) {
                    this.box = e, this.reflowLabels()
                },
                lineBox: function() {
                    return this.box
                },
                reflowLabels: function() {
                    var e, t, n = this,
                        i = n.options.labels,
                        r = i.skip || 0,
                        o = i.step || 1,
                        a = new B,
                        s = n.labels;
                    for (t = 0; s.length > t; t++) s[t].reflow(a), e = s[t].box, s[t].reflow(n.getSlot(r + t * o).adjacentBox(0, e.width(), e.height()))
                },
                intervals: function(e, t, n, i) {
                    var r, o = this,
                        a = o.options,
                        s = a.categories.length,
                        l = 0,
                        c = s / e || 1,
                        d = 360 / c,
                        u = [];
                    for (t = t || 0, n = n || 1, r = t; c > r; r += n) l = a.reverse ? 360 - r * d : r * d, l = ae(l, ce) % 360, i && I.inArray(l, i) || u.push(l);
                    return u
                },
                majorIntervals: function() {
                    return this.intervals(1)
                },
                minorIntervals: function() {
                    return this.intervals(.5)
                },
                intervalAngle: function(e) {
                    return (360 + e + this.options.startAngle) % 360
                },
                majorAngles: function() {
                    return e.map(this.majorIntervals(), e.proxy(this.intervalAngle, this))
                },
                createLine: function() {
                    return []
                },
                majorGridLineAngles: function(e) {
                    var t = this.options.majorGridLines;
                    return this.gridLineAngles(e, 1, t.skip, t.step)
                },
                minorGridLineAngles: function(e, t) {
                    var n = this.options,
                        i = n.minorGridLines,
                        r = n.majorGridLines,
                        o = t ? this.intervals(1, r.skip, r.step) : null;
                    return this.gridLineAngles(e, .5, i.skip, i.step, o)
                },
                radiusCallback: function(e, n, i) {
                    var r, o, a, s;
                    return n.options.type !== se ? (r = 360 / (2 * this.options.categories.length), o = C.cos(r * ue) * e, a = this.majorAngles(), s = function(t) {
                        return !i && I.inArray(t, a) ? e : o
                    }) : t
                },
                createPlotBands: function() {
                    var e, t, n, i, r, o, a, s = this,
                        l = s.options,
                        c = l.plotBands || [],
                        d = this._plotbandGroup = new E.Group({
                            zIndex: -1
                        });
                    for (e = 0; c.length > e; e++) t = c[e], n = s.plotBandSlot(t), i = s.getSlot(t.from), r = t.from - C.floor(t.from), n.startAngle += r * i.angle, o = C.ceil(t.to) - t.to, n.angle -= (o + r) * i.angle, a = ee.current.createRing(n, {
                        fill: {
                            color: t.color,
                            opacity: t.opacity
                        },
                        stroke: {
                            opacity: t.opacity
                        }
                    }), d.append(a);
                    s.appendVisual(d)
                },
                plotBandSlot: function(e) {
                    return this.getSlot(e.from, e.to - 1)
                },
                getSlot: function(e, t) {
                    var n, i, r, o = this,
                        a = o.options,
                        s = a.justified,
                        l = o.box,
                        c = o.majorAngles(),
                        d = c.length,
                        u = 360 / d;
                    return a.reverse && !s && (e = (e + 1) % d), e = oe(C.floor(e), 0, d - 1), i = c[e], s && (i -= u / 2, 0 > i && (i += 360)), t = oe(C.ceil(t || e), e, d - 1), n = t - e + 1, r = u * n, new Q(l.center(), 0, l.height() / 2, i, r)
                },
                slot: function(e, t) {
                    var n = this.getSlot(e, t),
                        i = n.startAngle + 180,
                        r = i + n.angle;
                    return new F.Arc([n.c.x, n.c.y], {
                        startAngle: i,
                        endAngle: r,
                        radiusX: n.r,
                        radiusY: n.r
                    })
                },
                pointCategoryIndex: function(e) {
                    var t, n, i = this,
                        r = null,
                        o = i.options.categories.length;
                    for (t = 0; o > t; t++)
                        if (n = i.getSlot(t), n.containsPoint(e)) {
                            r = t;
                            break
                        } return r
                }
            });
        T(Ee.fn, Ae), r = {
            options: {
                majorGridLines: {
                    visible: !0
                }
            },
            createPlotBands: function() {
                var e, t, n, i, r, o, a = this,
                    s = a.options,
                    l = s.plotBands || [],
                    c = s.majorGridLines.type,
                    d = a.plotArea.polarAxis,
                    u = d.majorAngles(),
                    h = d.box.center(),
                    f = this._plotbandGroup = new E.Group({
                        zIndex: -1
                    });
                for (e = 0; l.length > e; e++) t = l[e], n = {
                    fill: {
                        color: t.color,
                        opacity: t.opacity
                    },
                    stroke: {
                        opacity: t.opacity
                    }
                }, i = a.getSlot(t.from, t.to, !0), r = new Q(h, h.y - i.y2, h.y - i.y1, 0, 360), o = c === se ? ee.current.createRing(r, n) : E.Path.fromPoints(a.plotBandPoints(r, u), n).close(), f.append(o);
                a.appendVisual(f)
            },
            plotBandPoints: function(e, t) {
                var n, i = [],
                    r = [],
                    o = [e.c.x, e.c.y],
                    a = new F.Circle(o, e.ir),
                    s = new F.Circle(o, e.r);
                for (n = 0; t.length > n; n++) i.push(a.pointAt(t[n])), r.push(s.pointAt(t[n]));
                return i.reverse(), i.push(i[0]), r.push(r[0]), r.concat(i)
            },
            createGridLines: function(e) {
                var t, n = this,
                    i = n.options,
                    r = n.radarMajorGridLinePositions(),
                    o = e.majorAngles(),
                    a = e.box.center(),
                    s = [];
                return i.majorGridLines.visible && (s = n.renderGridLines(a, r, o, i.majorGridLines)), i.minorGridLines.visible && (t = n.radarMinorGridLinePositions(), A(s, n.renderGridLines(a, t, o, i.minorGridLines))), s
            },
            renderGridLines: function(e, t, n, i) {
                var r, o, a, s, l, c = {
                        stroke: {
                            width: i.width,
                            color: i.color,
                            dashType: i.dashType
                        }
                    },
                    d = this.gridLinesVisual();
                for (o = 0; t.length > o; o++)
                    if (r = e.y - t[o], r > 0)
                        if (s = new F.Circle([e.x, e.y], r), i.type === se) d.append(new E.Circle(s, c));
                        else {
                            for (l = new E.Path(c), a = 0; n.length > a; a++) l.lineTo(s.pointAt(n[a]));
                            l.close(), d.append(l)
                        } return d.children
            },
            getValue: function(e) {
                var t, n, r, o, a, s, l, c = this,
                    d = c.options,
                    u = c.lineBox(),
                    h = c.plotArea.polarAxis,
                    f = h.majorAngles(),
                    p = h.box.center(),
                    m = e.distanceTo(p),
                    g = m;
                return d.majorGridLines.type !== se && f.length > 1 && (t = e.x - p.x, n = e.y - p.y, r = (C.atan2(n, t) / ue + 540) % 360, f.sort(function(e, t) {
                    return i(e, r) - i(t, r)
                }), o = i(f[0], f[1]) / 2, a = i(r, f[0]), s = 90 - o, l = 180 - a - s, g = m * (C.sin(l * ue) / C.sin(s * ue))), c.axisType().fn.getValue.call(c, new K(u.x1, u.y2 - g))
            }
        }, o = G.extend({
            radarMajorGridLinePositions: function() {
                return this.getTickPositions(this.options.majorUnit)
            },
            radarMinorGridLinePositions: function() {
                var e = this,
                    t = e.options,
                    n = 0;
                return t.majorGridLines.visible && (n = t.majorUnit), e.getTickPositions(t.minorUnit, n)
            },
            axisType: function() {
                return G
            }
        }), T(o.fn, r), a = q.extend({
            radarMajorGridLinePositions: function() {
                var e = this,
                    t = [];
                return e.traverseMajorTicksPositions(function(e) {
                    t.push(e)
                }, e.options.majorGridLines), t
            },
            radarMinorGridLinePositions: function() {
                var e = this,
                    t = [];
                return e.traverseMinorTicksPositions(function(e) {
                    t.push(e)
                }, e.options.minorGridLines), t
            },
            axisType: function() {
                return q
            }
        }), T(a.fn, r), s = R.extend({
            init: function(e) {
                var t = this;
                R.fn.init.call(t, e), e = t.options, e.minorUnit = e.minorUnit || t.options.majorUnit / 2
            },
            options: {
                type: "polar",
                startAngle: 0,
                reverse: !1,
                majorUnit: 60,
                min: 0,
                max: 360,
                labels: {
                    margin: ie(10)
                },
                majorGridLines: {
                    color: le,
                    visible: !0,
                    width: 1
                },
                minorGridLines: {
                    color: "#aaa"
                }
            },
            getDivisions: function(e) {
                return G.fn.getDivisions.call(this, e) - 1
            },
            reflow: function(e) {
                this.box = e, this.reflowLabels()
            },
            reflowLabels: function() {
                var e, t, n = this,
                    i = n.options,
                    r = i.labels,
                    o = r.skip || 0,
                    a = r.step || 1,
                    s = new B,
                    l = n.intervals(i.majorUnit, o, a),
                    c = n.labels;
                for (t = 0; c.length > t; t++) c[t].reflow(s), e = c[t].box, c[t].reflow(n.getSlot(l[t]).adjacentBox(0, e.width(), e.height()))
            },
            lineBox: function() {
                return this.box
            },
            intervals: function(e, t, n, i) {
                var r, o, a = this,
                    s = a.options,
                    l = a.getDivisions(e),
                    c = s.min,
                    d = [];
                for (t = t || 0, n = n || 1, o = t; l > o; o += n) r = (360 + c + o * e) % 360, i && I.inArray(r, i) || d.push(r);
                return d
            },
            majorIntervals: function() {
                return this.intervals(this.options.majorUnit)
            },
            minorIntervals: function() {
                return this.intervals(this.options.minorUnit)
            },
            intervalAngle: function(e) {
                return (540 - e - this.options.startAngle) % 360
            },
            majorAngles: Ee.fn.majorAngles,
            createLine: function() {
                return []
            },
            majorGridLineAngles: function(e) {
                var t = this.options.majorGridLines;
                return this.gridLineAngles(e, this.options.majorUnit, t.skip, t.step)
            },
            minorGridLineAngles: function(e, t) {
                var n = this.options,
                    i = n.minorGridLines,
                    r = n.majorGridLines,
                    o = t ? this.intervals(n.majorUnit, r.skip, r.step) : null;
                return this.gridLineAngles(e, this.options.minorUnit, i.skip, i.step, o)
            },
            createPlotBands: Ee.fn.createPlotBands,
            plotBandSlot: function(e) {
                return this.getSlot(e.from, e.to)
            },
            getSlot: function(e, t) {
                var n, i = this,
                    r = i.options,
                    o = r.startAngle,
                    a = i.box;
                return e = oe(e, r.min, r.max), t = oe(t || e, e, r.max), r.reverse && (e *= -1, t *= -1), e = (540 - e - o) % 360, t = (540 - t - o) % 360, e > t && (n = e, e = t, t = n), new Q(a.center(), 0, a.height() / 2, e, t - e)
            },
            slot: function(e, t) {
                var n, i, r, o, a = this.options,
                    s = 360 - a.startAngle,
                    l = this.getSlot(e, t);
                return I.util.defined(t) || (t = e), r = C.min(e, t), o = C.max(e, t), a.reverse ? (n = r, i = o) : (n = 360 - o, i = 360 - r), n = (n + s) % 360, i = (i + s) % 360, new F.Arc([l.c.x, l.c.y], {
                    startAngle: n,
                    endAngle: i,
                    radiusX: l.r,
                    radiusY: l.r
                })
            },
            getValue: function(e) {
                var t = this,
                    n = t.options,
                    i = t.box.center(),
                    r = e.x - i.x,
                    o = e.y - i.y,
                    a = C.round(C.atan2(o, r) / ue),
                    s = n.startAngle;
                return n.reverse || (a *= -1, s *= -1), (a + s + 360) % 360
            },
            range: G.fn.range,
            labelsCount: G.fn.labelsCount,
            createAxisLabel: G.fn.createAxisLabel
        }), T(s.fn, Ae), l = O.extend({
            options: {
                gap: 1,
                spacing: 0
            },
            reflow: function(e) {
                var t, n, i = this,
                    r = i.options,
                    o = i.children,
                    a = r.gap,
                    s = r.spacing,
                    l = o.length,
                    c = l + a + s * (l - 1),
                    d = e.angle / c,
                    u = e.startAngle + d * (a / 2);
                for (n = 0; l > n; n++) t = e.clone(), t.startAngle = u, t.angle = d, o[n].sector && (t.r = o[n].sector.r), o[n].reflow(t), o[n].sector = t, u += d + d * s
            }
        }), c = O.extend({
            reflow: function(e) {
                var t, n, i = this,
                    r = i.options.isReversed,
                    o = i.children,
                    a = o.length,
                    s = r ? a - 1 : 0,
                    l = r ? -1 : 1;
                for (i.box = new B, n = s; n >= 0 && a > n; n += l) t = o[n].sector, t.startAngle = e.startAngle, t.angle = e.angle
            }
        }), d = U.extend({
            init: function(e, t) {
                U.fn.init.call(this, e, null, t)
            },
            options: {
                overlay: {
                    gradient: null
                },
                labels: {
                    distance: 10
                }
            }
        }), u = z.extend({
            pointType: function() {
                return d
            },
            clusterType: function() {
                return l
            },
            stackType: function() {
                return c
            },
            categorySlot: function(e, t) {
                return e.getSlot(t)
            },
            pointSlot: function(e, t) {
                var n = e.clone(),
                    i = e.c.y;
                return n.r = i - t.y1, n.ir = i - t.y2, n
            },
            reflow: H.fn.reflow,
            reflowPoint: function(e, t) {
                e.sector = t, e.reflow()
            },
            options: {
                clip: !1,
                animation: {
                    type: "pie"
                }
            },
            createAnimation: function() {
                this.options.animation.center = this.box.toRect().center(), z.fn.createAnimation.call(this)
            }
        }), h = W.extend({
            options: {
                clip: !1
            },
            pointSlot: function(e, t) {
                var n = e.c.y - t.y1,
                    i = K.onCircle(e.c, e.middle(), n);
                return new B(i.x, i.y, i.x, i.y)
            },
            createSegment: function(e, t, n) {
                var i, r, o = t.style;
                return r = o == ke ? te : j, i = new r(e, t, n), e.length === t.data.length && (i.options.closed = !0), i
            }
        }), f = M.extend({
            points: function() {
                return j.fn.points.call(this, this.stackPoints)
            }
        }), p = ne.extend({
            closeFill: e.noop
        }), m = h.extend({
            createSegment: function(e, t, n, i) {
                var r, o, a = this,
                    s = a.options,
                    l = s.isStacked,
                    c = (t.line || {}).style;
                return c === ke ? (o = new p(e, i, l, t, n), o.options.closed = !0) : (l && n > 0 && i && (r = i.linePoints.slice(0).reverse()), e.push(e[0]), o = new f(e, r, t, n)), o
            },
            seriesMissingValues: function(e) {
                return e.missingValues || Se
            }
        }), g = X.extend({
            pointSlot: function(e, t) {
                var n = e.c.y - t.y1,
                    i = K.onCircle(e.c, e.startAngle, n);
                return new B(i.x, i.y, i.x, i.y)
            },
            options: {
                clip: !1
            }
        }), v = J.extend({
            pointSlot: g.fn.pointSlot,
            options: {
                clip: !1
            }
        }), _ = M.extend({
            points: function() {
                var e = this,
                    t = e.parent,
                    n = t.plotArea,
                    i = n.polarAxis,
                    r = i.box.center(),
                    o = e.stackPoints,
                    a = j.fn.points.call(e, o);
                return a.unshift([r.x, r.y]), a.push([r.x, r.y]), a
            }
        }), b = ne.extend({
            closeFill: function(e) {
                var t = this._polarAxisCenter();
                e.lineTo(t.x, t.y)
            },
            _polarAxisCenter: function() {
                var e = this.parent,
                    t = e.plotArea,
                    n = t.polarAxis,
                    i = n.box.center();
                return i
            },
            strokeSegments: function() {
                var e, t, n, i = this._strokeSegments;
                return i || (e = this._polarAxisCenter(), t = new V(!1), n = j.fn.points.call(this), n.push(e), i = this._strokeSegments = t.process(n), i.pop()), i
            }
        }), w = v.extend({
            createSegment: function(e, t, n) {
                var i, r = (t.line || {}).style;
                return i = r == ke ? new b(e, null, !1, t, n) : new _(e, [], t, n)
            },
            createMissingValue: function(e, t) {
                var n;
                return I.hasValue(e.x) && t != fe && (n = {
                    x: e.x,
                    y: e.y
                }, t == Se && (n.y = 0)), n
            },
            seriesMissingValues: function(e) {
                return e.missingValues || Se
            },
            _hasMissingValuesGap: function() {
                var e, t = this.options.series;
                for (e = 0; t.length > e; e++)
                    if (this.seriesMissingValues(t[e]) === he) return !0
            },
            sortPoints: function(e) {
                var t, i, r;
                if (e.sort(n), this._hasMissingValuesGap())
                    for (r = 0; e.length > r; r++) i = e[r], i && (t = i.value, I.hasValue(t.y) || this.seriesMissingValues(i.series) !== he || delete e[r]);
                return e
            }
        }), y = $.extend({
            init: function(e, t) {
                var n = this;
                n.valueAxisRangeTracker = new P, $.fn.init.call(n, e, t)
            },
            render: function() {
                var e = this;
                e.addToLegend(e.series), e.createPolarAxis(), e.createCharts(), e.createValueAxis()
            },
            alignAxes: function() {
                var e = this.valueAxis,
                    t = e.range(),
                    n = e.options.reverse ? t.max : t.min,
                    i = e.getSlot(n),
                    r = this.polarAxis.getSlot(0).c,
                    o = e.box.translate(r.x - i.x1, r.y - i.y1);
                e.reflow(o)
            },
            createValueAxis: function() {
                var e, t, n, i, r = this,
                    s = r.valueAxisRangeTracker,
                    l = s.query(),
                    c = r.valueAxisOptions({
                        roundToMajorUnit: !1,
                        zIndex: -1
                    });
                c.type === pe ? (n = a, i = {
                    min: .1,
                    max: 1
                }) : (n = o, i = {
                    min: 0,
                    max: 1
                }), e = s.query(name) || l || i, e && l && (e.min = C.min(e.min, l.min), e.max = C.max(e.max, l.max)), t = new n(e.min, e.max, c), r.valueAxis = t, r.appendAxis(t)
            },
            reflowAxes: function() {
                var e, t = this,
                    n = t.options.plotArea,
                    i = t.valueAxis,
                    r = t.polarAxis,
                    o = t.box,
                    a = C.min(o.width(), o.height()) * de,
                    s = ie(n.padding || {}, a),
                    l = o.clone().unpad(s),
                    c = l.clone().shrink(0, l.height() / 2);
                r.reflow(l), i.reflow(c), e = i.lineBox().height() - i.box.height(), i.reflow(i.box.unpad({
                    top: e
                })), t.axisBox = l, t.alignAxes(l)
            },
            backgroundBox: function() {
                return this.box
            }
        }), k = y.extend({
            options: {
                categoryAxis: {
                    categories: []
                },
                valueAxis: {}
            },
            createPolarAxis: function() {
                var e, t = this;
                e = new Ee(t.options.categoryAxis), t.polarAxis = e, t.categoryAxis = e, t.appendAxis(e), t.aggregateCategories()
            },
            valueAxisOptions: function(e) {
                var t = this;
                return t._hasBarCharts && T(e, {
                    majorGridLines: {
                        type: se
                    },
                    minorGridLines: {
                        type: se
                    }
                }), t._isStacked100 && T(e, {
                    roundToMajorUnit: !1,
                    labels: {
                        format: "P0"
                    }
                }), T(e, t.options.valueAxis)
            },
            appendChart: N.fn.appendChart,
            aggregateSeries: N.fn.aggregateSeries,
            aggregateCategories: function() {
                N.fn.aggregateCategories.call(this, this.panes)
            },
            filterSeries: function(e) {
                return e
            },
            createCharts: function() {
                var e = this,
                    t = e.filterVisibleSeries(e.series),
                    n = e.panes[0];
                e.createAreaChart(re(t, [be]), n), e.createLineChart(re(t, [ye]), n), e.createBarChart(re(t, [we]), n)
            },
            chartOptions: function(e) {
                var t, n, i = {
                        series: e
                    },
                    r = e[0];
                return r && (t = this.filterVisibleSeries(e), n = r.stack, i.isStacked = n && t.length > 1, i.isStacked100 = n && "100%" === n.type && t.length > 1, i.isStacked100 && (this._isStacked100 = !0)), i
            },
            createAreaChart: function(e, t) {
                if (0 !== e.length) {
                    var n = new m(this, this.chartOptions(e));
                    this.appendChart(n, t)
                }
            },
            createLineChart: function(e, t) {
                if (0 !== e.length) {
                    var n = new h(this, this.chartOptions(e));
                    this.appendChart(n, t)
                }
            },
            createBarChart: function(e, t) {
                var n, i, r;
                0 !== e.length && (n = e[0], i = this.chartOptions(e), i.gap = n.gap, i.spacing = n.spacing, r = new u(this, i), this.appendChart(r, t), this._hasBarCharts = !0)
            },
            seriesCategoryAxis: function() {
                return this.categoryAxis
            },
            click: function(t, n) {
                var i, r, o = this,
                    a = t._eventCoordinates(n),
                    s = new K(a.x, a.y);
                i = o.categoryAxis.getCategory(s), r = o.valueAxis.getValue(s), null !== i && null !== r && t.trigger(me, {
                    element: e(n.target),
                    category: i,
                    value: r
                })
            },
            createCrosshairs: e.noop
        }), x = y.extend({
            options: {
                xAxis: {},
                yAxis: {}
            },
            createPolarAxis: function() {
                var e, t = this;
                e = new s(t.options.xAxis), t.polarAxis = e, t.axisX = e, t.appendAxis(e)
            },
            valueAxisOptions: function(e) {
                var t = this;
                return T(e, {
                    majorGridLines: {
                        type: se
                    },
                    minorGridLines: {
                        type: se
                    }
                }, t.options.yAxis)
            },
            createValueAxis: function() {
                var e = this;
                y.fn.createValueAxis.call(e), e.axisY = e.valueAxis
            },
            appendChart: function(e, t) {
                var n = this;
                n.valueAxisRangeTracker.update(e.yAxisRanges), $.fn.appendChart.call(n, e, t)
            },
            createCharts: function() {
                var e = this,
                    t = e.filterVisibleSeries(e.series),
                    n = e.panes[0];
                e.createLineChart(re(t, [ve]), n), e.createScatterChart(re(t, [_e]), n), e.createAreaChart(re(t, [ge]), n)
            },
            createLineChart: function(e, t) {
                if (0 !== e.length) {
                    var n = this,
                        i = new v(n, {
                            series: e
                        });
                    n.appendChart(i, t)
                }
            },
            createScatterChart: function(e, t) {
                if (0 !== e.length) {
                    var n = this,
                        i = new g(n, {
                            series: e
                        });
                    n.appendChart(i, t)
                }
            },
            createAreaChart: function(e, t) {
                if (0 !== e.length) {
                    var n = this,
                        i = new w(n, {
                            series: e
                        });
                    n.appendChart(i, t)
                }
            },
            click: function(t, n) {
                var i, r, o = this,
                    a = t._eventCoordinates(n),
                    s = new K(a.x, a.y);
                i = o.axisX.getValue(s), r = o.axisY.getValue(s), null !== i && null !== r && t.trigger(me, {
                    element: e(n.target),
                    x: i,
                    y: r
                })
            },
            createCrosshairs: e.noop
        }), Y.current.register(x, Te), Y.current.register(k, De), Z.current.register(Te, [xe, Ce], ["color"]), Z.current.register(De, ["value"], ["color"]), I.DefaultAggregates.current.register(De, {
            value: "max",
            color: "first"
        }), T(I, {
            PolarAreaChart: w,
            PolarAxis: s,
            PolarLineChart: v,
            PolarPlotArea: x,
            RadarAreaChart: m,
            RadarBarChart: u,
            RadarCategoryAxis: Ee,
            RadarClusterLayout: l,
            RadarLineChart: h,
            RadarNumericAxis: o,
            RadarPlotArea: k,
            SplinePolarAreaSegment: b,
            SplineRadarAreaSegment: p,
            RadarStackLayout: c
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.chart.funnel.min", ["kendo.dataviz.chart.min", "kendo.drawing.min"], e)
}(function() {
    return function(e, t) {
        var n, i = window.kendo,
            r = i.deepExtend,
            o = e.extend,
            a = i.isFunction,
            s = i.template,
            l = i.util,
            c = l.append,
            d = i.drawing,
            u = i.geometry,
            h = i.dataviz,
            f = i.drawing.Color,
            p = h.ChartElement,
            m = h.PieChartMixin,
            g = h.PlotAreaBase,
            v = h.PlotAreaFactory,
            _ = h.Point2D,
            b = h.Box2D,
            w = h.SeriesBinder,
            y = h.TextBox,
            k = h.autoFormat,
            x = h.evalOptions,
            C = l.limitValue,
            S = h.seriesTotal,
            T = "category",
            D = "color",
            A = "funnel",
            E = "value",
            F = "black",
            I = "white",
            M = g.extend({
                render: function() {
                    var e = this,
                        t = e.series;
                    e.createFunnelChart(t)
                },
                createFunnelChart: function(e) {
                    var t = this,
                        n = e[0],
                        i = new R(t, {
                            series: e,
                            legend: t.options.legend,
                            neckRatio: n.neckRatio,
                            dynamicHeight: n.dynamicHeight,
                            dynamicSlope: n.dynamicSlope,
                            segmentSpacing: n.segmentSpacing,
                            highlight: n.highlight
                        });
                    t.appendChart(i)
                },
                appendChart: function(e, t) {
                    g.fn.appendChart.call(this, e, t), c(this.options.legend.items, e.legendItems)
                }
            }),
            R = p.extend({
                init: function(e, t) {
                    var n = this;
                    p.fn.init.call(n, t), n.plotArea = e, n.points = [], n.labels = [], n.legendItems = [], n.render()
                },
                options: {
                    neckRatio: .3,
                    width: 300,
                    dynamicSlope: !1,
                    dynamicHeight: !0,
                    segmentSpacing: 0,
                    labels: {
                        visible: !1,
                        align: "center",
                        position: "center"
                    }
                },
                formatPointValue: function(e, t) {
                    return k(t, e.value)
                },
                render: function() {
                    var e, n, i, o, s, l, c, d = this,
                        u = d.options,
                        h = d.plotArea.options.seriesColors || [],
                        f = h.length,
                        p = u.series[0],
                        m = p.data;
                    if (m)
                        for (i = S(p), s = 0; m.length > s; s++) e = w.current.bindPoint(p, s), o = e.valueFields.value, null !== o && o !== t && (n = e.fields, a(p.color) || (p.color = n.color || h[s % f]), n = r({
                            index: s,
                            owner: d,
                            series: p,
                            category: n.category,
                            dataItem: m[s],
                            percentage: Math.abs(o) / i,
                            visibleInLegend: n.visibleInLegend,
                            visible: n.visible
                        }, n), l = d.createSegment(o, n), c = d.createLabel(o, n), l && c && l.append(c))
                },
                evalSegmentOptions: function(e, t, n) {
                    var i = n.series;
                    x(e, {
                        value: t,
                        series: i,
                        dataItem: n.dataItem,
                        index: n.index
                    }, {
                        defaults: i._defaults,
                        excluded: ["data", "toggle", "visual"]
                    })
                },
                createSegment: function(e, i) {
                    var a, s = this,
                        l = r({}, i.series);
                    return s.evalSegmentOptions(l, e, i), s.createLegendItem(e, l, i), i.visible !== !1 ? (a = new n(e, l, i), o(a, i), s.append(a), s.points.push(a), a) : t
                },
                createLabel: function(e, n) {
                    var i, o, a, l = this,
                        c = n.series,
                        d = n.dataItem,
                        u = r({}, l.options.labels, c.labels),
                        h = e;
                    return u.visible ? (u.template ? (o = s(u.template), h = o({
                        dataItem: d,
                        value: e,
                        percentage: n.percentage,
                        category: n.category,
                        series: c
                    })) : u.format && (h = k(u.format, h)), u.color || "center" !== u.align || (a = new f(c.color).percBrightness(), u.color = a > 180 ? F : I), l.evalSegmentOptions(u, e, n), i = new y(h, r({
                        vAlign: u.position
                    }, u)), l.labels.push(i), i) : t
                },
                labelPadding: function() {
                    var e, t, n, i, r = this.labels,
                        o = {
                            left: 0,
                            right: 0
                        };
                    for (i = 0; r.length > i; i++) e = r[i], t = e.options.align, "center" !== t && (n = r[i].box.width(), "left" === t ? o.left = Math.max(o.left, n) : o.right = Math.max(o.right, n));
                    return o
                },
                reflow: function(t) {
                    var n, i, r, o, a, s, l, c, d, h, f, p, m = this,
                        g = m.options,
                        v = m.points,
                        _ = v.length,
                        b = 1 >= g.neckRatio,
                        w = t.clone().unpad(m.labelPadding()),
                        y = w.width(),
                        k = 0,
                        x = b ? 0 : (y - y / g.neckRatio) / 2,
                        S = g.segmentSpacing,
                        T = g.dynamicSlope,
                        D = w.height() - S * (_ - 1),
                        A = b ? g.neckRatio * y : y;
                    if (_) {
                        if (T)
                            for (l = v[0], c = l, e.each(v, function(e, t) {
                                t.percentage > c.percentage && (c = t)
                            }), r = l.percentage / c.percentage * y, x = (y - r) / 2, n = 0; _ > n; n++) a = v[n].percentage, d = v[n + 1], h = d ? d.percentage : a, o = v[n].points = [], i = g.dynamicHeight ? D * a : D / _, s = a ? (y - r * (h / a)) / 2 : h ? 0 : y / 2, s = C(s, 0, y), o.push(new u.Point(w.x1 + x, w.y1 + k)), o.push(new u.Point(w.x1 + y - x, w.y1 + k)), o.push(new u.Point(w.x1 + y - s, w.y1 + i + k)), o.push(new u.Point(w.x1 + s, w.y1 + i + k)), x = s, k += i + S, r = C(y - 2 * s, 0, y);
                        else
                            for (f = b ? y : y - 2 * x, p = (f - A) / 2, n = 0; _ > n; n++) o = v[n].points = [], a = v[n].percentage, s = g.dynamicHeight ? p * a : p / _, i = g.dynamicHeight ? D * a : D / _, o.push(new u.Point(w.x1 + x, w.y1 + k)), o.push(new u.Point(w.x1 + y - x, w.y1 + k)), o.push(new u.Point(w.x1 + y - x - s, w.y1 + i + k)), o.push(new u.Point(w.x1 + x + s, w.y1 + i + k)), x += s, k += i + S;
                        for (n = 0; _ > n; n++) v[n].reflow(t)
                    }
                }
            });
        r(R.fn, m), n = p.extend({
            init: function(e, t, n) {
                var i = this;
                p.fn.init.call(i, t), i.value = e, i.options.index = n.index
            },
            options: {
                color: I,
                border: {
                    width: 1
                }
            },
            reflow: function(e) {
                var t = this,
                    n = t.points,
                    i = t.children[0];
                t.box = new b(n[0].x, n[0].y, n[1].x, n[2].y), i && i.reflow(new b(e.x1, n[0].y, e.x2, n[2].y))
            },
            createVisual: function() {
                var e, t = this,
                    n = t.options;
                p.fn.createVisual.call(this), e = n.visual ? n.visual({
                    category: t.category,
                    dataItem: t.dataItem,
                    value: t.value,
                    series: t.series,
                    percentage: t.percentage,
                    points: t.points,
                    options: n,
                    createVisual: function() {
                        return t.createPath()
                    }
                }) : t.createPath(), e && this.visual.append(e)
            },
            createPath: function() {
                var e = this.options,
                    t = e.border,
                    n = d.Path.fromPoints(this.points, {
                        fill: {
                            color: e.color,
                            opacity: e.opacity
                        },
                        stroke: {
                            color: t.color,
                            opacity: t.opacity,
                            width: t.width
                        }
                    }).close();
                return n
            },
            createHighlight: function(e) {
                return d.Path.fromPoints(this.points, e)
            },
            highlightVisual: function() {
                return this.visual.children[0]
            },
            highlightVisualArgs: function() {
                var e = d.Path.fromPoints(this.points).close();
                return {
                    options: this.options,
                    path: e
                }
            },
            highlightOverlay: function(e, t) {
                var n, i, r, a = this.options,
                    s = a.highlight || {};
                if (s.visible !== !1) return n = s.border || {}, i = o({}, t, {
                    fill: s.color,
                    stroke: n.color,
                    strokeOpacity: n.opacity,
                    strokeWidth: n.width,
                    fillOpacity: s.opacity
                }), r = e.createPolyline(this.points, !0, i)
            },
            tooltipAnchor: function(e) {
                var t = this.box;
                return new _(t.center().x - e / 2, t.y1)
            },
            formatValue: function(e) {
                var t = this;
                return t.owner.formatPointValue(t, e)
            }
        }), r(n.fn, h.PointEventsMixin), v.current.register(M, [A]), w.current.register([A], [E], [T, D, "visibleInLegend", "visible"]), r(h, {
            FunnelChart: R,
            FunnelSegment: n
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.gauge.min", ["kendo.dataviz.core.min", "kendo.drawing.min", "kendo.dataviz.themes.min"], e)
}(function() {
    return function(e, t) {
        function n(e, t) {
            var n = e.box,
                i = e.children[0].box,
                o = t.border || {},
                a = t.background || "",
                s = new A,
                l = E.fromRect(new F([n.x1, n.y1], [n.width(), n.height()]), {
                    stroke: {}
                }),
                c = new I(e.text, new D(i.x1, i.y1), {
                    font: t.font,
                    fill: {
                        color: t.color
                    }
                }),
                d = r(c.bbox().clone(), t.padding),
                u = E.fromRect(d, {
                    stroke: {
                        color: o.width ? o.color : "",
                        width: o.width,
                        dashType: o.dashType,
                        lineJoin: "round",
                        lineCap: "round"
                    },
                    fill: {
                        color: a
                    }
                });
            return s.append(l), s.append(u), s.append(c), s
        }

        function i(e, t, n) {
            var i = w(e.from) ? e.from : V,
                r = w(e.to) ? e.to : O;
            return e.from = l.max(l.min(r, i), t), e.to = l.min(l.max(r, i), n), e
        }

        function r(e, t) {
            var n = e.getOrigin(),
                i = e.getSize(),
                r = x(t);
            return e.setOrigin([n.x - r.left, n.y - r.top]), e.setSize([i.width + (r.left + r.right), i.height + (r.top + r.bottom)]), e
        }

        function o(e, t) {
            var n = x(t);
            return n.left = -n.left, n.top = -n.top, n.right = -n.right, n.bottom = -n.bottom, r(e, n)
        }
        var a, s, l = Math,
            c = window.kendo,
            d = c.util,
            u = c.ui.Widget,
            h = c.deepExtend,
            f = c.dataviz,
            p = f.autoMajorUnit,
            m = f.ChartElement,
            g = f.NumericAxis,
            v = f.Axis,
            _ = f.Box2D,
            b = c.Class,
            w = d.defined,
            y = d.isNumber,
            k = f.interpolateValue,
            x = f.getSpacing,
            C = f.round,
            S = f.geometry,
            T = f.drawing,
            D = S.Point,
            A = T.Group,
            E = T.Path,
            F = S.Rect,
            I = T.Text,
            M = 150,
            R = 250,
            P = "arrow",
            z = "arrowPointer",
            B = "barPointer",
            L = "#000",
            H = .05,
            N = f.COORD_PRECISION,
            O = Number.MAX_VALUE,
            V = -Number.MAX_VALUE,
            U = 200,
            W = .5,
            j = 200,
            q = 60,
            G = 60,
            $ = 5,
            Y = l.PI / 180,
            K = 180,
            Q = "inside",
            X = "linear",
            J = "needle",
            Z = "outside",
            ee = "radialPointer",
            te = "x",
            ne = "y",
            ie = b.extend({
                init: function(e, t) {
                    var n = this,
                        i = e.options;
                    m.fn.init.call(n, t), t = n.options, t.fill = t.color, n.scale = e, t.value = w(t.value) ? l.min(l.max(t.value, i.min), i.max) : i.min
                },
                options: {
                    color: L
                },
                value: function(e) {
                    var n = this,
                        i = n.options,
                        r = i.value,
                        o = n.scale.options;
                    return 0 === arguments.length ? r : (i._oldValue = i._oldValue !== t ? i.value : o.min, i.value = l.min(l.max(e, o.min), o.max), n.elements && n.repaint(), t)
                }
            }),
            re = ie.extend({
                options: {
                    shape: J,
                    cap: {
                        size: H
                    },
                    arrow: {
                        width: 16,
                        height: 14
                    },
                    animation: {
                        type: ee,
                        duration: M
                    }
                },
                setRadius: function(e) {
                    var t = this;
                    e && (t.elements.clear(), t.render(t.parent, t.center, e))
                },
                setAngle: function(e) {
                    this.elements.transform(S.transform().rotate(e, this.center))
                },
                repaint: function() {
                    var e = this,
                        t = e.scale,
                        n = e.options,
                        i = t.slotAngle(n._oldValue),
                        r = t.slotAngle(n.value);
                    n.animation.transitions === !1 ? e.setAngle(r) : new fe(e.elements, h(n.animation, {
                        oldAngle: i,
                        newAngle: r
                    })).play()
                },
                render: function() {
                    var e = this,
                        t = e.scale,
                        n = t.arc.center,
                        i = e.options,
                        r = new A;
                    return i.animation !== !1 && h(i.animation, {
                        startAngle: 0,
                        center: n,
                        reverse: t.options.reverse
                    }), i.shape === J ? r.append(e._renderNeedle(), e._renderCap()) : r.append(e._renderArrow()), e.elements = r, e.setAngle(Y), r
                },
                reflow: function(e) {
                    var t = this,
                        n = t.center = e.center,
                        i = t.radius = e.getRadiusX(),
                        r = t.capSize = Math.round(i * t.options.cap.size);
                    t.bbox = F.fromPoints(new D(n.x - r, n.y - r), new D(n.x + r, n.y + r))
                },
                _renderNeedle: function() {
                    var e = this,
                        t = e.options,
                        n = e.scale.options.minorTicks.size,
                        i = e.center,
                        r = t.color,
                        o = new E({
                            fill: {
                                color: r
                            },
                            stroke: {
                                color: r,
                                width: W
                            }
                        });
                    return o.moveTo(i.x + e.radius - n, i.y).lineTo(i.x, i.y - e.capSize / 2).lineTo(i.x, i.y + e.capSize / 2).close(), o
                },
                _renderCap: function() {
                    var e = this,
                        t = e.options,
                        n = t.cap.color || t.color,
                        i = new S.Circle(e.center, e.capSize),
                        r = new T.Circle(i, {
                            fill: {
                                color: n
                            },
                            stroke: {
                                color: n
                            }
                        });
                    return r
                }
            }),
            oe = g.extend({
                init: function(e) {
                    var t = this;
                    t.options = h({}, t.options, e), t.options.majorUnit = t.options.majorUnit || p(t.options.min, t.options.max), t.options.minorUnit = t.options.minorUnit || t.options.majorUnit / 10, v.fn.init.call(t, t.options)
                },
                options: {
                    min: 0,
                    max: 100,
                    majorTicks: {
                        size: 15,
                        align: Q,
                        color: L,
                        width: W,
                        visible: !0
                    },
                    minorTicks: {
                        size: 10,
                        align: Q,
                        color: L,
                        width: W,
                        visible: !0
                    },
                    startAngle: -30,
                    endAngle: 210,
                    labels: {
                        position: Q,
                        padding: 2
                    }
                },
                render: function(e, t) {
                    var n = this,
                        i = n.renderArc(e, t);
                    n.bbox = i.bbox(), n.labelElements = n.renderLabels(), n.ticks = n.renderTicks(), n.ranges = n.renderRanges()
                },
                reflow: function(e) {
                    var n = this,
                        i = e.center(),
                        r = l.min(e.height(), e.width()) / 2;
                    return n.bbox === t ? n.render(i, r) : (n.bbox = n.arc.bbox(), n.radius(n.arc.getRadiusX()), n.repositionRanges(), n.renderLabels(), t)
                },
                slotAngle: function(e) {
                    var t, n = this.options,
                        i = n.startAngle,
                        r = n.reverse,
                        o = n.endAngle - i,
                        a = n.min,
                        s = n.max;
                    return t = r ? n.endAngle - (e - a) / (s - a) * o : (e - a) / (s - a) * o + i, t + K
                },
                renderLabels: function() {
                    var e, i, r, o, a, s, c, d, u, h, p, m, g, v, _ = this,
                        b = _.options,
                        w = b.majorTicks.size,
                        y = _.arc.clone(),
                        k = y.getRadiusX(),
                        x = _.tickAngles(y, b.majorUnit),
                        C = _.labels,
                        T = C.length,
                        E = b.labels,
                        I = E.padding,
                        M = .05 * k,
                        R = b.rangeSize = b.rangeSize || .1 * k,
                        P = b.ranges || [],
                        z = new A;
                    for (_.options.rangeDistance !== t ? M = _.options.rangeDistance : _.options.rangeDistance = M, E.position === Q && (k -= w, P.length && _.labelElements === t && (k -= R + M), y.setRadiusX(k).setRadiusY(k)), c = 0; T > c; c++) a = C[c], e = a.box.width() / 2, i = a.box.height() / 2, o = x[c], r = (o - K) * Y, h = E.position === Q, s = y.pointAt(o), d = s.x + l.cos(r) * (e + I) * (h ? 1 : -1), u = s.y + l.sin(r) * (i + I) * (h ? 1 : -1), a.reflow(new f.Box2D(d - e, u - i, d + e, u + i)), m = new D(a.box.x1, a.box.y1), _.labelElements === t ? (p = n(a, b.labels), z.append(p)) : (p = _.labelElements.children[c], g = p.bbox().origin, v = p.transform() || S.transform(), v.translate(m.x - g.x, m.y - g.y), p.transform(v)), _.bbox = F.union(_.bbox, p.bbox());
                    return z
                },
                repositionRanges: function() {
                    var e, t, n, i = this,
                        r = i.ranges.children,
                        o = i.options.rangeSize,
                        a = i.options.rangeDistance;
                    if (r.length > 0) {
                        for (e = i.getRangeRadius(), i.options.labels.position === Q && (e += o + a), t = e + o / 2, n = 0; r.length > n; n++) r[n]._geometry.setRadiusX(t).setRadiusY(t);
                        i.bbox = F.union(i.bbox, i.ranges.bbox())
                    }
                },
                renderRanges: function() {
                    var e, t, n, i, r, o, a = this,
                        s = a.arc,
                        l = new A,
                        c = a.rangeSegments(),
                        d = c.length,
                        u = a.options.reverse,
                        h = a.options.rangeSize,
                        f = a.options.rangeDistance;
                    if (d)
                        for (i = a.getRangeRadius(), a.radius(a.radius() - h - f), o = 0; d > o; o++) n = c[o], e = a.slotAngle(n[u ? "to" : "from"]), t = a.slotAngle(n[u ? "from" : "to"]), t - e !== 0 && (r = new S.Arc(s.center, {
                            radiusX: i + h / 2,
                            radiusY: i + h / 2,
                            startAngle: e,
                            endAngle: t
                        }), l.append(new T.Arc(r, {
                            stroke: {
                                width: h,
                                color: n.color,
                                opacity: n.opacity
                            }
                        })));
                    return l
                },
                rangeSegments: function() {
                    function e(e, t, n, i) {
                        return {
                            from: e,
                            to: t,
                            color: n,
                            opacity: i
                        }
                    }
                    var t, n, r, o, a, s = this,
                        l = s.options,
                        c = l.ranges || [],
                        d = c.length,
                        u = l.rangePlaceholderColor,
                        h = [],
                        f = l.min,
                        p = l.max;
                    if (d)
                        for (h.push(e(f, p, u)), o = 0; d > o; o++)
                            for (t = i(c[o], f, p), n = h.length, a = 0; n > a; a++)
                                if (r = h[a], t.from >= r.from && r.to >= t.from) {
                                    h.push(e(t.from, t.to, t.color, t.opacity)), t.to >= r.from && r.to >= t.to && h.push(e(t.to, r.to, u, t.opacity)), r.to = t.from;
                                    break
                                } return h
                },
                getRangeRadius: function() {
                    var e, t = this,
                        n = t.options,
                        i = n.majorTicks.size,
                        r = n.rangeSize,
                        o = n.rangeDistance,
                        a = t.arc;
                    return e = n.labels.position === Z ? a.getRadiusX() - i - o - r : a.getRadiusX() - r
                },
                renderArc: function(e, t) {
                    var n = this,
                        i = n.options,
                        r = n.arc = new S.Arc(e, {
                            radiusX: t,
                            radiusY: t,
                            startAngle: i.startAngle + K,
                            endAngle: i.endAngle + K
                        });
                    return r
                },
                renderTicks: function() {
                    function e(e, t, n, i) {
                        var r, o, a, s = new A,
                            l = e.center,
                            c = e.getRadiusX(),
                            d = i.visible;
                        if (d)
                            for (r = 0; t.length > r; r++) o = e.pointAt(t[r]), a = new D(l.x + c - i.size, l.y).rotate(t[r], l), s.append(new E({
                                stroke: {
                                    color: i.color,
                                    width: i.width
                                }
                            }).moveTo(o).lineTo(a));
                        return s
                    }
                    var t = this,
                        n = t.arc,
                        i = t.options,
                        r = i.labels.position,
                        o = new A,
                        a = i.majorTicks.size,
                        s = i.minorTicks.size,
                        l = n.clone(),
                        c = l.getRadiusX();
                    return t.majorTickAngles = t.tickAngles(n, i.majorUnit), t.majorTicks = e(l, t.majorTickAngles, i.majorUnit, i.majorTicks), o.append(t.majorTicks), t._tickDifference = a - s, r === Z && l.setRadiusX(c - a + s).setRadiusY(c - a + s), t.minorTickAngles = t.normalizeTickAngles(t.tickAngles(n, i.minorUnit)), t.minorTicks = e(l, t.minorTickAngles, i.minorUnit, i.minorTicks, i.majorUnit), o.append(t.minorTicks), o
                },
                normalizeTickAngles: function(e) {
                    var t, n = this,
                        i = n.options,
                        r = i.majorUnit / i.minorUnit;
                    for (t = e.length - 1; t >= 0; t--) t % r === 0 && e.splice(t, 1);
                    return e
                },
                tickAngles: function(e, t) {
                    var n, i = this,
                        r = i.options,
                        o = r.reverse,
                        a = r.max - r.min,
                        s = e.endAngle - e.startAngle,
                        l = e.startAngle,
                        c = a / t,
                        d = s / c,
                        u = [];
                    for (o && (l += s, d = -d), n = 0; c > n; n++) u.push(C(l, N)), l += d;
                    return C(l) <= e.endAngle && u.push(l), u
                },
                radius: function(e) {
                    var n = this;
                    return e ? (n.arc.setRadiusX(e).setRadiusY(e), n.repositionTicks(n.majorTicks.children, n.majorTickAngles), n.repositionTicks(n.minorTicks.children, n.minorTickAngles, !0), t) : n.arc.getRadiusX()
                },
                repositionTicks: function(e, t, n) {
                    var i, r, o, a, s, l = this,
                        c = n ? l._tickDifference || 0 : 0,
                        d = l.arc,
                        u = d.getRadiusX();
                    for (n && l.options.labels.position === Z && 0 !== c && (d = l.arc.clone(), d.setRadiusX(u - c).setRadiusY(u - c)), i = 0; e.length > i; i++) r = d.pointAt(t[i]), o = e[i].segments, a = r.x - o[0].anchor().x, s = r.y - o[0].anchor().y, e[i].transform((new S.Transformation).translate(a, s))
                }
            }),
            ae = u.extend({
                init: function(t, n) {
                    var i, r, o, a, s, l = this,
                        d = f.ui.themes || {};
                    if (c.destroy(t), e(t).empty(), u.fn.init.call(l, t), l.wrapper = l.element, l._originalOptions = h({}, n), i = h({}, l.options, n), o = i.theme, a = d[o] || d[o.toLowerCase()], r = o && a ? a.gauge : {}, l.options = h({}, r, i), e.isArray(i.pointer))
                        for (s = 0; i.pointer.length > s; s++) l.options.pointer[s] = h({}, r.pointer, i.pointer[s]);
                    l.element.addClass("k-gauge"), l.surface = l._createSurface(), l.redraw()
                },
                options: {
                    plotArea: {},
                    theme: "default",
                    renderAs: "",
                    pointer: {},
                    scale: {},
                    gaugeArea: {}
                },
                destroy: function() {
                    this.surface.destroy(), u.fn.destroy.call(this)
                },
                value: function(e) {
                    var n = this,
                        i = n.pointers[0];
                    return 0 === arguments.length ? i.value() : (i.value(e), n._setValueOptions(e), t)
                },
                _draw: function() {
                    var e = this.surface;
                    e.clear(), e.draw(this._visuals)
                },
                exportVisual: function() {
                    return this._visuals
                },
                allValues: function(t) {
                    var n, i = this,
                        r = i.pointers,
                        o = [];
                    if (0 === arguments.length) {
                        for (n = 0; r.length > n; n++) o.push(r[n].value());
                        return o
                    }
                    if (e.isArray(t))
                        for (n = 0; t.length > n; n++) y(t[n]) && r[n].value(t[n]);
                    i._setValueOptions(t)
                },
                _setValueOptions: function(e) {
                    var t, n = [].concat(this.options.pointer);
                    for (e = [].concat(e), t = 0; e.length > t; t++) n[t].value = e[t]
                },
                _resize: function() {
                    var e, t = this,
                        n = t.options.transitions;
                    for (t.options.transitions = !1, e = 0; t.pointers.length > e; e++) t.pointers[e].options.animation.transitions = !1;
                    for (t.redraw(), t.options.transitions = n, e = 0; t.pointers.length > e; e++) t.pointers[e].options.animation.transitions = n
                },
                redraw: function() {
                    var e, t = this,
                        n = h(t._getSize(), t.options.gaugeArea),
                        i = new F([0, 0], [n.width, n.height]);
                    t.surface.clear(), t.gaugeArea = t._createGaugeArea(), t.surface.element.css({
                        width: n.width,
                        height: n.height
                    }), t._createModel(), e = o(i.bbox(), t._gaugeAreaMargin), t.reflow(e)
                },
                _createGaugeArea: function() {
                    var e, t = this,
                        n = t.options.gaugeArea,
                        i = t.surface.size(),
                        r = n.border || {},
                        a = new F([0, 0], [i.width, i.height]);
                    return t._gaugeAreaMargin = n.margin || $, r.width > 0 && (a = o(a, r.width)), e = E.fromRect(a, {
                        stroke: {
                            color: r.width ? r.color : "",
                            width: r.width,
                            dashType: r.dashType,
                            lineJoin: "round",
                            lineCap: "round"
                        },
                        fill: {
                            color: n.background
                        }
                    })
                },
                _createSurface: function() {
                    var t, n = this,
                        i = n.options,
                        r = n._getSize();
                    return r = i.gaugeArea ? h(r, i.gaugeArea) : r, t = e("<div></div>").appendTo(n.element).css({
                        width: r.width,
                        height: r.height
                    }), new T.Surface.create(t, {
                        type: i.renderAs
                    })
                },
                getSize: function() {
                    return this._getSize()
                },
                _getSize: function() {
                    var e = this,
                        t = e.element,
                        n = t.width(),
                        i = t.height();
                    return n || (n = j), i || (i = U), {
                        width: n,
                        height: i
                    }
                }
            }),
            se = ae.extend({
                init: function(e, t) {
                    var n = this;
                    ae.fn.init.call(n, e, t), c.notify(n, f.ui)
                },
                options: {
                    name: "RadialGauge",
                    transitions: !0,
                    gaugeArea: {
                        background: ""
                    }
                },
                reflow: function(e) {
                    var t, n = this,
                        i = n.pointers;
                    for (n.scale.reflow(e), n._initialPlotArea = n.scale.bbox, t = 0; i.length > t; t++) i[t].reflow(n.scale.arc), n._initialPlotArea = F.union(n._initialPlotArea, i[t].bbox);
                    n.fitScale(e), n.alignScale(e), n._buildVisual(n.gaugeArea, i, n.scale), n._draw()
                },
                _buildVisual: function(e, t, n) {
                    var i, r, o = new A;
                    for (o.append(e), o.append(n.ticks), o.append(n.ranges), r = 0; t.length > r; r++) i = t[r], i.render(), o.append(i.elements), i.value(i.options.value);
                    o.append(n.labelElements), this._visuals = o
                },
                fitScale: function(e) {
                    for (var t, n, i, r, o, a = this, s = a.scale, c = s.arc, d = a._initialPlotArea, u = l.abs(a.getDiff(d, e)), h = C(u, N), f = C(-u, N), p = 0, m = 0; !(!(m++ < 100) || (p = o === i ? p + 1 : 0, p > 5) || h != r && (t = a.getPlotBox(h, e, c), t >= 0 && 2 >= t) || f != r && (i = a.getPlotBox(f, e, c), i >= 0 && 2 >= i) || (r = t > 0 && i > 0 ? 2 * h : 0 > t && 0 > i ? 2 * f : C((h + f) / 2 || 1, N), n = a.getPlotBox(r, e, c), n >= 0 && 2 >= n));) o = i, n > 0 ? (f = r, i = n) : (h = r, t = n)
                },
                getPlotBox: function(e, t, n) {
                    var i, r = this,
                        o = r.scale,
                        a = r.pointers,
                        s = n.getRadiusX();
                    for (n = n.clone(), n.setRadiusX(s + e).setRadiusY(s + e), o.arc = n, o.reflow(t), r.plotBbox = o.bbox, i = 0; a.length > i; i++) a[i].reflow(n), r.plotBbox = F.union(r.plotBbox, a[i].bbox);
                    return r.getDiff(r.plotBbox, t)
                },
                getDiff: function(e, t) {
                    return l.min(t.width() - e.width(), t.height() - e.height())
                },
                alignScale: function(e) {
                    var t, n = this,
                        i = n.plotBbox.center(),
                        r = e.center(),
                        o = i.x - r.x,
                        a = i.y - r.y,
                        s = n.scale,
                        l = n.pointers;
                    for (s.arc.center.x -= o, s.arc.center.y -= a, s.reflow(e), t = 0; l.length > t; t++) l[t].reflow(s.arc), n.plotBbox = F.union(s.bbox, l[t].bbox)
                },
                _createModel: function() {
                    var t, n, i = this,
                        r = i.options,
                        o = r.pointer,
                        a = i.scale = new oe(r.scale);
                    for (i.pointers = [], o = e.isArray(o) ? o : [o], n = 0; o.length > n; n++) t = new re(a, h({}, o[n], {
                        animation: {
                            transitions: r.transitions
                        }
                    })), i.pointers.push(t)
                }
            }),
            le = ae.extend({
                init: function(e, t) {
                    var n = this;
                    ae.fn.init.call(n, e, t), c.notify(n, f.ui)
                },
                options: {
                    name: "LinearGauge",
                    transitions: !0,
                    gaugeArea: {
                        background: ""
                    },
                    scale: {
                        vertical: !0
                    }
                },
                reflow: function(e) {
                    var t, n = this,
                        i = n.pointers,
                        r = e.origin.x,
                        o = e.origin.y,
                        a = new f.Box2D(r, r, r + e.width(), o + e.height());
                    for (n.scale.reflow(a), t = 0; i.length > t; t++) i[t].reflow();
                    n.bbox = n._getBox(a), n._alignElements(), n._shrinkElements(), n._buildVisual(), n._draw()
                },
                _buildVisual: function() {
                    var e, t, n = this,
                        i = new A,
                        r = n.scale.render(),
                        o = n.pointers;
                    for (i.append(n.gaugeArea), i.append(r), t = 0; o.length > t; t++) e = o[t], i.append(e.render()), e.value(e.options.value);
                    n._visuals = i
                },
                _createModel: function() {
                    var t, n, i, r = this,
                        o = r.options,
                        a = o.pointer,
                        s = r.scale = new ce(o.scale);
                    for (r.pointers = [], a = e.isArray(a) ? a : [a], i = 0; a.length > i; i++) n = h({}, a[i], {
                        animation: {
                            transitions: o.transitions
                        }
                    }), t = n.shape === P ? new ue(s, n) : new he(s, n), r.pointers.push(t)
                },
                _getSize: function() {
                    var e = this,
                        t = e.element,
                        n = t.width(),
                        i = t.height(),
                        r = e.options.scale.vertical;
                    return n || (n = r ? q : j), i || (i = r ? U : G), {
                        width: n,
                        height: i
                    }
                },
                _getBox: function(e) {
                    var t, n, i = this,
                        r = i.scale,
                        o = i.pointers,
                        a = e.center(),
                        s = o[0].box.clone().wrap(r.box);
                    for (n = 0; o.length > n; n++) s.wrap(o[n].box.clone());
                    return r.options.vertical ? (t = s.width() / 2, s = new _(a.x - t, e.y1, a.x + t, e.y2)) : (t = s.height() / 2, s = new _(e.x1, a.y - t, e.x2, a.y + t)), s
                },
                _alignElements: function() {
                    var e, t, n = this,
                        i = n.scale,
                        r = n.pointers,
                        o = i.box,
                        a = r[0].box.clone().wrap(i.box),
                        s = n.bbox;
                    for (t = 0; r.length > t; t++) a.wrap(r[t].box.clone());
                    for (i.options.vertical ? (e = s.center().x - a.center().x, i.reflow(new _(o.x1 + e, s.y1, o.x2 + e, s.y2))) : (e = s.center().y - a.center().y, i.reflow(new _(s.x1, o.y1 + e, s.x2, o.y2 + e))), t = 0; r.length > t; t++) r[t].reflow(n.bbox)
                },
                _shrinkElements: function() {
                    var e, t = this,
                        n = t.scale,
                        i = t.pointers,
                        r = n.box.clone(),
                        o = n.options.vertical ? "y" : "x",
                        a = i[0].box;
                    for (e = 0; i.length > e; e++) a.wrap(i[e].box.clone());
                    for (r[o + 1] += l.max(r[o + 1] - a[o + 1], 0), r[o + 2] -= l.max(a[o + 2] - r[o + 2], 0), n.reflow(r), e = 0; i.length > e; e++) i[e].reflow(t.bbox)
                }
            }),
            ce = g.extend({
                init: function(e) {
                    var t = this;
                    t.options = h({}, t.options, e), t.options = h({}, t.options, {
                        labels: {
                            mirror: t.options.mirror
                        }
                    }), t.options.majorUnit = t.options.majorUnit || p(t.options.min, t.options.max), v.fn.init.call(t, t.options), t.options.minorUnit = t.options.minorUnit || t.options.majorUnit / 10
                },
                options: {
                    min: 0,
                    max: 50,
                    majorTicks: {
                        size: 15,
                        align: Q,
                        color: L,
                        width: W,
                        visible: !0
                    },
                    minorTicks: {
                        size: 10,
                        align: Q,
                        color: L,
                        width: W,
                        visible: !0
                    },
                    line: {
                        width: W
                    },
                    labels: {
                        position: Q,
                        padding: 2
                    },
                    mirror: !1,
                    _alignLines: !1
                },
                render: function() {
                    var e = this,
                        t = e.elements = new A,
                        n = e.renderLabels(),
                        i = e.renderLine(),
                        r = e.renderTicks(),
                        o = e.renderRanges();
                    return t.append(i, n, r, o), t
                },
                renderRanges: function() {
                    var e, t, n, r, o, a = this,
                        s = a.options,
                        l = s.min,
                        c = s.max,
                        d = s.ranges || [],
                        u = s.vertical,
                        h = s.labels.mirror,
                        f = new A,
                        p = d.length,
                        m = s.rangeSize || s.minorTicks.size / 2;
                    if (p)
                        for (o = 0; p > o; o++) e = i(d[o], l, c), t = a.getSlot(e.from, e.to), n = u ? a.lineBox() : t, r = u ? t : a.lineBox(), u ? n.x1 -= m * (h ? -1 : 1) : r.y2 += m * (h ? -1 : 1), f.append(E.fromRect(new F([n.x1, r.y1], [n.x2 - n.x1, r.y2 - r.y1]), {
                            fill: {
                                color: e.color,
                                opacity: e.opacity
                            },
                            stroke: {}
                        }));
                    return f
                },
                renderLabels: function() {
                    var e, t = this,
                        i = t.options,
                        r = t.labels,
                        o = new A;
                    for (e = 0; r.length > e; e++) o.append(n(r[e], i.labels));
                    return o
                },
                renderLine: function() {
                    var e, t = this,
                        n = t.options,
                        i = n.line,
                        r = t.lineBox(),
                        o = new A;
                    return i.width > 0 && i.visible && (e = new E({
                        stroke: {
                            color: i.color,
                            dashType: i.dashType,
                            width: i.width
                        }
                    }), e.moveTo(r.x1, r.y1).lineTo(r.x2, r.y2), o.append(e)), o
                },
                renderTicks: function() {
                    function e(e, i) {
                        var a, l = e.length;
                        if (i.visible)
                            for (a = i.skip; l > a; a += i.step) a % i.skipUnit !== 0 && (s.tickX = o ? r.x2 : r.x2 - i.size, s.tickY = o ? r.y1 - i.size : r.y1, s.position = e[a], n.append(t.renderAxisTick(s, i)))
                    }
                    var t = this,
                        n = new A,
                        i = t.options,
                        r = t.lineBox(),
                        o = i.labels.mirror,
                        a = i.majorTicks.visible ? i.majorUnit : 0,
                        s = {
                            _alignLines: i._alignLines,
                            vertical: i.vertical
                        };
                    return e(t.getMajorTickPositions(), i.majorTicks), e(t.getMinorTickPositions(), h({}, {
                        skipUnit: a / i.minorUnit
                    }, i.minorTicks)), n
                },
                renderAxisTick: function(e, t) {
                    var n, i, r, o = e.tickX,
                        a = e.tickY,
                        s = e.position;
                    return e.vertical ? (n = new D(o, s), i = new D(o + t.size, s)) : (n = new D(s, a), i = new D(s, a + t.size)), r = new E({
                        stroke: {
                            color: t.color,
                            width: t.width
                        }
                    }).moveTo(n).lineTo(i)
                }
            }),
            de = ie.extend({
                init: function(e, t) {
                    var n = this;
                    ie.fn.init.call(n, e, t), n.options = h({
                        track: {
                            visible: w(t.track)
                        }
                    }, n.options)
                },
                options: {
                    shape: B,
                    track: {
                        border: {
                            width: 1
                        }
                    },
                    color: L,
                    border: {
                        width: 1
                    },
                    opacity: 1,
                    margin: x(3),
                    animation: {
                        type: B
                    },
                    visible: !0
                },
                reflow: function() {
                    var e, t, n, i = this,
                        r = i.options,
                        o = i.scale,
                        a = o.lineBox(),
                        s = r.track.size || r.size,
                        l = r.size / 2,
                        c = o.options.mirror,
                        d = x(r.margin),
                        u = o.options.vertical,
                        h = u ? d[c ? "left" : "right"] : d[c ? "bottom" : "top"];
                    h = c ? -h : h, u ? (n = new _(a.x1 + h, a.y1, a.x1 + h, a.y2), c ? n.x1 -= s : n.x2 += s, r.shape !== B && (t = new _(a.x2 + h, a.y1 - l, a.x2 + h, a.y2 + l), e = t)) : (n = new _(a.x1, a.y1 - h, a.x2, a.y1 - h), c ? n.y2 += s : n.y1 -= s, r.shape !== B && (t = new _(a.x1 - l, a.y1 - h, a.x2 + l, a.y1 - h), e = t)), i.trackBox = n, i.pointerRangeBox = t, i.box = e || n.clone().pad(r.border.width)
                },
                getElementOptions: function() {
                    var e = this.options;
                    return {
                        fill: {
                            color: e.color,
                            opacity: e.opacity
                        },
                        stroke: w(e.border) ? {
                            color: e.border.width ? e.border.color || e.color : "",
                            width: e.border.width,
                            dashType: e.border.dashType,
                            opacity: e.opacity
                        } : null
                    }
                },
                _margin: function() {
                    var e = this,
                        t = e.options,
                        n = e.scale,
                        i = n.options.mirror,
                        r = x(t.margin),
                        o = n.options.vertical,
                        a = o ? r[i ? "left" : "right"] : r[i ? "bottom" : "top"];
                    return a
                }
            }),
            ue = de.extend({
                init: function(e, n) {
                    de.fn.init.call(this, e, n), this.options.size === t && (this.options.size = .6 * this.scale.options.majorTicks.size)
                },
                pointerShape: function() {
                    var e, t, n = this,
                        i = n.options,
                        r = n.scale,
                        o = i.size,
                        a = r.options.vertical,
                        s = o / 2,
                        l = r.options.mirror ? -1 : 1,
                        c = r.options.reverse;
                    return a ? (e = c ? "y2" : "y1", t = [new D(0, 0 - s), new D(0 - l * o, 0), new D(0, 0 + s)]) : (e = c ? "x1" : "x2", t = [new D(0 - s, 0), new D(0, 0 + l * o), new D(0 + s, 0)]), t
                },
                repaint: function() {
                    var e = this,
                        t = e.scale,
                        n = e.options,
                        i = new a(e.elements, h(n.animation, {
                            vertical: t.options.vertical,
                            mirror: t.options.mirror,
                            margin: e._margin(n.margin),
                            from: t.getSlot(n._oldValue),
                            to: t.getSlot(n.value)
                        }));
                    n.animation.transitions === !1 && (i.options.duration = 0), i.setup(), i.play()
                },
                render: function() {
                    var e, t = this,
                        n = t.options,
                        i = new A,
                        r = t.scale,
                        o = t.getElementOptions(),
                        a = t.pointerShape(n.value);
                    return n.animation.type = z, i = new E({
                        stroke: o.stroke,
                        fill: o.fill
                    }).moveTo(a[0]).lineTo(a[1]).lineTo(a[2]).close(), e = r.getSlot(n.value), i.transform(S.transform().translate(e.x1, e.y1)), t.elements = i, i
                }
            }),
            he = de.extend({
                init: function(e, n) {
                    de.fn.init.call(this, e, n), this.options.size === t && (this.options.size = .3 * this.scale.options.majorTicks.size)
                },
                pointerShape: function(e) {
                    var t, n, i, r = this,
                        o = r.options,
                        a = r.scale,
                        s = a.options.vertical,
                        l = a.options.mirror,
                        c = l == s ? -1 : 1,
                        d = o.size * c,
                        u = a.getSlot(a.options.min),
                        h = a.getSlot(e),
                        f = s ? ne : te,
                        p = s ? te : ne,
                        m = r._margin() * c,
                        g = new D;
                    return g[f] = u[f + "1"], g[p] = u[p + "1"], t = new D, t[f] = h[f + "1"], t[p] = h[p + "1"], s ? (g.translate(m, 0), t.translate(m, 0)) : (g.translate(0, m), t.translate(0, m)), n = t.clone(), i = g.clone(), s ? (n.translate(d, 0), i.translate(d, 0)) : (n.translate(0, d), i.translate(0, d)), [g, t, n, i]
                },
                repaint: function() {
                    var e, t = this,
                        n = t.scale,
                        i = t.options,
                        r = t.pointerShape(i.value),
                        o = t.elements.children[0],
                        a = t.pointerShape(i._oldValue);
                    o.moveTo(r[0]).lineTo(r[1]).lineTo(r[2]).lineTo(r[3]).close(), e = new s(o, h(i.animation, {
                        reverse: n.options.reverse,
                        vertical: n.options.vertical,
                        oldPoints: [a[1], a[2]],
                        newPoints: [r[1], r[2]]
                    })), i.animation.transitions === !1 && (e.options.duration = 0), e.setup(), e.play()
                },
                render: function() {
                    var e = this,
                        t = new A,
                        n = e.getElementOptions(),
                        i = new E({
                            stroke: n.stroke,
                            fill: n.fill
                        });
                    return t.append(i), e.elements = t, t
                }
            }),
            fe = T.Animation.extend({
                init: function(e, t) {
                    T.Animation.fn.init.call(this, e, t), t = this.options, t.duration = l.max(l.abs(t.newAngle - t.oldAngle) / t.duration * 1e3, 1)
                },
                options: {
                    easing: X,
                    duration: M
                },
                step: function(e) {
                    var t = this,
                        n = t.options,
                        i = k(n.oldAngle, n.newAngle, e);
                    t.element.transform(S.transform().rotate(i, n.center))
                }
            });
        T.AnimationFactory.current.register(ee, fe), a = T.Animation.extend({
            options: {
                easing: X,
                duration: R
            },
            setup: function() {
                var e, t, n = this.options,
                    i = n.margin,
                    r = n.from,
                    o = n.to,
                    a = n.vertical ? "x1" : "y1";
                n.mirror == n.vertical ? (r[a] -= i, o[a] -= i) : (r[a] += i, o[a] += i), e = this.fromScale = new D(r.x1, r.y1), t = this.toScale = new D(o.x1, o.y1), 0 !== n.duration && (n.duration = l.max(e.distanceTo(t) / n.duration * 1e3, 1))
            },
            step: function(e) {
                var t = k(this.fromScale.x, this.toScale.x, e),
                    n = k(this.fromScale.y, this.toScale.y, e);
                this.element.transform(S.transform().translate(t, n))
            }
        }), T.AnimationFactory.current.register(z, a), s = T.Animation.extend({
            options: {
                easing: X,
                speed: R
            },
            setup: function() {
                var e = this.options,
                    t = e.newPoints,
                    n = e.oldPoints,
                    i = this.axis = e.vertical ? ne : te,
                    r = this.to = t[0][i],
                    o = this.from = n[0][i];
                0 !== e.duration && (e.duration = l.max(l.abs(r - o) / e.speed * 1e3, 1)), this._set(o)
            },
            step: function(e) {
                var t = k(this.from, this.to, e);
                this._set(t)
            },
            _set: function(e) {
                var t = "set" + this.axis.toUpperCase(),
                    n = this.options.newPoints;
                n[0][t](e), n[1][t](e)
            }
        }), T.AnimationFactory.current.register(B, s), f.ui.plugin(se), f.ui.plugin(le), f.ExportMixin.extend(ae.fn), h(f, {
            Gauge: ae,
            RadialPointer: re,
            LinearPointer: de,
            ArrowLinearPointer: ue,
            BarLinearPointer: he,
            LinearScale: ce,
            RadialScale: oe,
            LinearGauge: le,
            RadialGauge: se
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.barcode.min", ["kendo.dataviz.core.min", "kendo.drawing.min"], e)
}(function() {
    return function(e, t) {
        function n(e, t, n) {
            return e.substring(t, t + n)
        }
        var i, r, o, a, s, l, c = window.kendo,
            d = c.ui.Widget,
            u = e.extend,
            h = c.deepExtend,
            f = e.inArray,
            p = e.isPlainObject,
            m = c.drawing,
            g = c.geometry,
            v = c.util,
            _ = v.defined,
            b = c.dataviz,
            w = b.Box2D,
            y = b.TextBox,
            k = 300,
            x = 100,
            C = 10,
            S = /^\d+$/,
            T = /^[a-z0-9]+$/i,
            D = "Character '{0}' is not valid for symbology {1}",
            A = c.Class.extend({
                init: function(e) {
                    this.setOptions(e)
                },
                setOptions: function(e) {
                    var t = this;
                    t.options = u({}, t.options, e), t.quietZoneLength = t.options.addQuietZone ? 2 * t.options.quietZoneLength : 0
                },
                encode: function(e, t, n) {
                    var i = this;
                    return _(e) && (e += ""), i.initValue(e, t, n), i.options.addQuietZone && i.addQuietZone(), i.addData(), i.options.addQuietZone && i.addQuietZone(), {
                        baseUnit: i.baseUnit,
                        pattern: i.pattern
                    }
                },
                options: {
                    quietZoneLength: C,
                    addQuietZone: !0,
                    addCheckSum: !0
                },
                initValue: function() {},
                addQuietZone: function() {
                    this.pattern.push(this.options.quietZoneLength || C)
                },
                addData: function() {},
                invalidCharacterError: function(e) {
                    throw Error(c.format(D, e, this.name))
                }
            }),
            E = {},
            F = A.extend({
                minBaseUnitLength: .7,
                addData: function() {
                    var e, t = this,
                        n = t.value;
                    for (t.addStart(), e = 0; n.length > e; e++) t.addCharacter(n.charAt(e));
                    t.options.addCheckSum && t.pushCheckSum(), t.addStop(), t.prepareValues()
                },
                addCharacter: function(e) {
                    var t = this,
                        n = t.characterMap[e];
                    n || t.invalidCharacterError(e), t.addBase(n)
                },
                addBase: function() {}
            }),
            I = {
                addCharacter: function(e) {
                    var t = this;
                    t.characterMap[e] ? t.addBase(t.characterMap[e]) : e.charCodeAt(0) > 127 ? t.invalidCharacterError(e) : t.addExtended(e.charCodeAt(0))
                },
                addExtended: function(e) {
                    var n, i, r, o = this;
                    for (i = 0; o.extendedMappings.length > i; i++)
                        if (n = o.extendedMappings[i].call(o, e)) {
                            for (r = 0; n.length > r; r++) o.addBase(n[r]);
                            return o.dataLength += n.length - 1, t
                        }
                },
                extendedMappings: [function(e) {
                    if (e >= 97 && 122 >= e) {
                        var t = this;
                        return [t.characterMap[t.shiftCharacters[0]], t.characterMap[String.fromCharCode(e - 32)]]
                    }
                }, function(e) {
                    if (e >= 33 && 58 >= e) {
                        var t = this;
                        return [t.characterMap[t.shiftCharacters[1]], t.characterMap[String.fromCharCode(e + 32)]]
                    }
                }, function(e) {
                    if (e >= 1 && 26 >= e) {
                        var t = this;
                        return [t.characterMap[t.shiftCharacters[2]], t.characterMap[String.fromCharCode(e + 64)]]
                    }
                }, function(e) {
                    var t, n, i, r = this;
                    if (r.specialAsciiCodes[e])
                        for (t = [], i = 0; r.specialAsciiCodes[e].length > i; i++) t.push(r.characterMap[r.shiftCharacters[3]]), t.push(r.characterMap[r.specialAsciiCodes[e][i]]);
                    else n = 6 * Math.floor(e / 32) + (e - 27) % 32 + 64, t = [r.characterMap[r.shiftCharacters[3]], r.characterMap[String.fromCharCode(n)]];
                    return t
                }],
                specialAsciiCodes: {
                    0: ["U"],
                    64: ["V"],
                    96: ["W"],
                    127: ["T", "X", "Y", "Z"]
                },
                shiftValuesAsciiCodes: {
                    39: 36,
                    40: 47,
                    41: 43,
                    42: 37
                },
                characterMap: {
                    "+": !1,
                    "/": !1,
                    $: !1,
                    "%": !1
                },
                shiftCharacters: ["SHIFT0", "SHIFT1", "SHIFT2", "SHIFT3"]
            };
        E.code39 = F.extend({
            name: "Code 39",
            checkSumMod: 43,
            minRatio: 2.5,
            maxRatio: 3,
            gapWidth: 1,
            splitCharacter: "|",
            initValue: function(e, t, n) {
                var i = this;
                i.width = t, i.height = n, i.value = e, i.dataLength = e.length, i.pattern = [], i.patternString = ""
            },
            prepareValues: function() {
                var e, t, n = this,
                    i = n.minBaseUnitLength,
                    r = n.maxRatio,
                    o = n.minRatio,
                    a = Math.max(.15 * n.width, 24);
                if (a > n.height) throw Error("Insufficient Height. The minimum height for value: " + n.value + " is: " + a);
                for (;
                    (e = n.getBaseUnit(r)) < i && r > o;) r = parseFloat((r - .1).toFixed(1));
                if (i > e) throw t = Math.ceil(n.getBaseWidth(o) * i), Error("Insufficient width. The minimum width for value: " + n.value + " is: " + t);
                n.ratio = r, n.baseUnit = e, n.patternString = n.patternString.substring(0, n.patternString.length - 1), n.pattern = n.pattern.concat(n.patternString.replace(/ratio/g, r).split(n.splitCharacter))
            },
            getBaseUnit: function(e) {
                return this.width / this.getBaseWidth(e)
            },
            getBaseWidth: function(e) {
                var t = this,
                    n = 3 * (e + 2);
                return t.quietZoneLength + n * (t.dataLength + 2) + t.gapWidth * (t.dataLength + 1)
            },
            addStart: function() {
                var e = this;
                e.addPattern(e.characterMap.START.pattern), e.addCharacterGap()
            },
            addBase: function(e) {
                this.addPattern(e.pattern), this.addCharacterGap()
            },
            addStop: function() {
                this.addPattern(this.characterMap.START.pattern)
            },
            addPattern: function(e) {
                for (var t = 0; e.length > t; t++) this.patternString += this.patternMappings[e.charAt(t)]
            },
            addCharacterGap: function() {
                var e = this;
                e.patternString += e.gapWidth + e.splitCharacter
            },
            patternMappings: {
                b: "1|",
                w: "1|",
                B: "ratio|",
                W: "ratio|"
            },
            characterMap: {
                0: {
                    pattern: "bwbWBwBwb",
                    value: 0
                },
                1: {
                    pattern: "BwbWbwbwB",
                    value: 1
                },
                2: {
                    pattern: "bwBWbwbwB",
                    value: 2
                },
                3: {
                    pattern: "BwBWbwbwb",
                    value: 3
                },
                4: {
                    pattern: "bwbWBwbwB",
                    value: 4
                },
                5: {
                    pattern: "BwbWBwbwb",
                    value: 5
                },
                6: {
                    pattern: "bwBWBwbwb",
                    value: 6
                },
                7: {
                    pattern: "bwbWbwBwB",
                    value: 7
                },
                8: {
                    pattern: "BwbWbwBwb",
                    value: 8
                },
                9: {
                    pattern: "bwBWbwBwb",
                    value: 9
                },
                A: {
                    pattern: "BwbwbWbwB",
                    value: 10
                },
                B: {
                    pattern: "bwBwbWbwB",
                    value: 11
                },
                C: {
                    pattern: "BwBwbWbwb",
                    value: 12
                },
                D: {
                    pattern: "bwbwBWbwB",
                    value: 13
                },
                E: {
                    pattern: "BwbwBWbwb",
                    value: 14
                },
                F: {
                    pattern: "bwBwBWbwb",
                    value: 15
                },
                G: {
                    pattern: "bwbwbWBwB",
                    value: 16
                },
                H: {
                    pattern: "BwbwbWBwb",
                    value: 17
                },
                I: {
                    pattern: "bwBwbWBwb",
                    value: 18
                },
                J: {
                    pattern: "bwbwBWBwb",
                    value: 19
                },
                K: {
                    pattern: "BwbwbwbWB",
                    value: 20
                },
                L: {
                    pattern: "bwBwbwbWB",
                    value: 21
                },
                M: {
                    pattern: "BwBwbwbWb",
                    value: 22
                },
                N: {
                    pattern: "bwbwBwbWB",
                    value: 23
                },
                O: {
                    pattern: "BwbwBwbWb",
                    value: 24
                },
                P: {
                    pattern: "bwBwBwbWb",
                    value: 25
                },
                Q: {
                    pattern: "bwbwbwBWB",
                    value: 26
                },
                R: {
                    pattern: "BwbwbwBWb",
                    value: 27
                },
                S: {
                    pattern: "bwBwbwBWb",
                    value: 28
                },
                T: {
                    pattern: "bwbwBwBWb",
                    value: 29
                },
                U: {
                    pattern: "BWbwbwbwB",
                    value: 30
                },
                V: {
                    pattern: "bWBwbwbwB",
                    value: 31
                },
                W: {
                    pattern: "BWBwbwbwb",
                    value: 32
                },
                X: {
                    pattern: "bWbwBwbwB",
                    value: 33
                },
                Y: {
                    pattern: "BWbwBwbwb",
                    value: 34
                },
                Z: {
                    pattern: "bWBwBwbwb",
                    value: 35
                },
                "-": {
                    pattern: "bWbwbwBwB",
                    value: 36
                },
                ".": {
                    pattern: "BWbwbwBwb",
                    value: 37
                },
                " ": {
                    pattern: "bWBwbwBwb",
                    value: 38
                },
                $: {
                    pattern: "bWbWbWbwb",
                    value: 39
                },
                "/": {
                    pattern: "bWbWbwbWb",
                    value: 40
                },
                "+": {
                    pattern: "bWbwbWbWb",
                    value: 41
                },
                "%": {
                    pattern: "bwbWbWbWb",
                    value: 42
                },
                START: {
                    pattern: "bWbwBwBwb"
                }
            },
            options: {
                addCheckSum: !1
            }
        }), E.code39extended = E.code39.extend(h({}, I, {
            name: "Code 39 extended",
            characterMap: {
                SHIFT0: {
                    pattern: "bWbwbWbWb",
                    value: 41
                },
                SHIFT1: {
                    pattern: "bWbWbwbWb",
                    value: 40
                },
                SHIFT2: {
                    pattern: "bWbWbWbwb",
                    value: 39
                },
                SHIFT3: {
                    pattern: "bwbWbWbWb",
                    value: 42
                }
            }
        })), E.code93 = F.extend({
            name: "Code 93",
            cCheckSumTotal: 20,
            kCheckSumTotal: 15,
            checkSumMod: 47,
            initValue: function(e, t, n) {
                var i = this;
                i.value = e, i.width = t, i.height = n, i.pattern = [], i.values = [], i.dataLength = e.length
            },
            prepareValues: function() {
                var e = this,
                    t = Math.max(.15 * e.width, 24);
                if (t > e.height) throw Error("Insufficient Height");
                if (e.setBaseUnit(), e.minBaseUnitLength > e.baseUnit) throw Error("Insufficient Width")
            },
            setBaseUnit: function() {
                var e = this,
                    t = 2;
                e.baseUnit = e.width / (9 * (e.dataLength + 2 + t) + e.quietZoneLength + 1)
            },
            addStart: function() {
                var e = this.characterMap.START.pattern;
                this.addPattern(e)
            },
            addStop: function() {
                var e = this;
                e.addStart(), e.pattern.push(e.characterMap.TERMINATION_BAR)
            },
            addBase: function(e) {
                this.addPattern(e.pattern), this.values.push(e.value)
            },
            pushCheckSum: function() {
                var e, t, n = this,
                    i = n._getCheckValues();
                for (n.checksum = i.join(""), t = 0; i.length > t; t++) e = n.characterMap[n._findCharacterByValue(i[t])], n.addPattern(e.pattern)
            },
            _getCheckValues: function() {
                var e, t, n, i = this,
                    r = i.values,
                    o = r.length,
                    a = 0;
                for (n = o - 1; n >= 0; n--) a += i.weightedValue(r[n], o - n, i.cCheckSumTotal);
                for (e = a % i.checkSumMod, a = i.weightedValue(e, 1, i.kCheckSumTotal), n = o - 1; n >= 0; n--) a += i.weightedValue(r[n], o - n + 1, i.kCheckSumTotal);
                return t = a % i.checkSumMod, [e, t]
            },
            _findCharacterByValue: function(e) {
                for (var t in this.characterMap)
                    if (this.characterMap[t].value === e) return t
            },
            weightedValue: function(e, t, n) {
                return (t % n || n) * e
            },
            addPattern: function(e) {
                var t, n;
                for (n = 0; e.length > n; n++) t = parseInt(e.charAt(n), 10), this.pattern.push(t)
            },
            characterMap: {
                0: {
                    pattern: "131112",
                    value: 0
                },
                1: {
                    pattern: "111213",
                    value: 1
                },
                2: {
                    pattern: "111312",
                    value: 2
                },
                3: {
                    pattern: "111411",
                    value: 3
                },
                4: {
                    pattern: "121113",
                    value: 4
                },
                5: {
                    pattern: "121212",
                    value: 5
                },
                6: {
                    pattern: "121311",
                    value: 6
                },
                7: {
                    pattern: "111114",
                    value: 7
                },
                8: {
                    pattern: "131211",
                    value: 8
                },
                9: {
                    pattern: "141111",
                    value: 9
                },
                A: {
                    pattern: "211113",
                    value: 10
                },
                B: {
                    pattern: "211212",
                    value: 11
                },
                C: {
                    pattern: "211311",
                    value: 12
                },
                D: {
                    pattern: "221112",
                    value: 13
                },
                E: {
                    pattern: "221211",
                    value: 14
                },
                F: {
                    pattern: "231111",
                    value: 15
                },
                G: {
                    pattern: "112113",
                    value: 16
                },
                H: {
                    pattern: "112212",
                    value: 17
                },
                I: {
                    pattern: "112311",
                    value: 18
                },
                J: {
                    pattern: "122112",
                    value: 19
                },
                K: {
                    pattern: "132111",
                    value: 20
                },
                L: {
                    pattern: "111123",
                    value: 21
                },
                M: {
                    pattern: "111222",
                    value: 22
                },
                N: {
                    pattern: "111321",
                    value: 23
                },
                O: {
                    pattern: "121122",
                    value: 24
                },
                P: {
                    pattern: "131121",
                    value: 25
                },
                Q: {
                    pattern: "212112",
                    value: 26
                },
                R: {
                    pattern: "212211",
                    value: 27
                },
                S: {
                    pattern: "211122",
                    value: 28
                },
                T: {
                    pattern: "211221",
                    value: 29
                },
                U: {
                    pattern: "221121",
                    value: 30
                },
                V: {
                    pattern: "222111",
                    value: 31
                },
                W: {
                    pattern: "112122",
                    value: 32
                },
                X: {
                    pattern: "112221",
                    value: 33
                },
                Y: {
                    pattern: "122121",
                    value: 34
                },
                Z: {
                    pattern: "123111",
                    value: 35
                },
                "-": {
                    pattern: "121131",
                    value: 36
                },
                ".": {
                    pattern: "311112",
                    value: 37
                },
                " ": {
                    pattern: "311211",
                    value: 38
                },
                $: {
                    pattern: "321111",
                    value: 39
                },
                "/": {
                    pattern: "112131",
                    value: 40
                },
                "+": {
                    pattern: "113121",
                    value: 41
                },
                "%": {
                    pattern: "211131",
                    value: 42
                },
                SHIFT0: {
                    pattern: "122211",
                    value: 46
                },
                SHIFT1: {
                    pattern: "311121",
                    value: 45
                },
                SHIFT2: {
                    pattern: "121221",
                    value: 43
                },
                SHIFT3: {
                    pattern: "312111",
                    value: 44
                },
                START: {
                    pattern: "111141"
                },
                TERMINATION_BAR: "1"
            }
        }), E.code93extended = E.code93.extend(h({}, I, {
            name: "Code 93 extended",
            pushCheckSum: function() {
                var e, t, n = this,
                    i = n._getCheckValues();
                for (n.checksum = i.join(""), t = 0; i.length > t; t++) e = i[t], n.shiftValuesAsciiCodes[e] ? n.addExtended(n.shiftValuesAsciiCodes[e]) : n.addPattern(n.characterMap[n._findCharacterByValue(e)].pattern)
            }
        })), i = c.Class.extend({
            init: function(e) {
                this.encoding = e;
            },
            addStart: function() {},
            is: function() {},
            move: function() {},
            pushState: function() {}
        }), r = i.extend({
            FNC4: "FNC4",
            init: function(e, t) {
                var n = this;
                n.encoding = e, n.states = t, n._initMoves(t)
            },
            addStart: function() {
                this.encoding.addPattern(this.START)
            },
            is: function(e, t) {
                var n = e.charCodeAt(t);
                return this.isCode(n)
            },
            move: function(e) {
                for (var t = this, n = 0; !t._moves[n].call(t, e) && t._moves.length > n;) n++
            },
            pushState: function(e) {
                var t, n, i = this,
                    r = i.states,
                    o = e.value,
                    a = o.length;
                for (f("C", r) >= 0 && (n = o.substr(e.index).match(/\d{4,}/g), n && (a = o.indexOf(n[0], e.index)));
                     (t = e.value.charCodeAt(e.index)) >= 0 && i.isCode(t) && a > e.index;) i.encoding.addPattern(i.getValue(t)), e.index++
            },
            _initMoves: function(e) {
                var t = this;
                t._moves = [], f(t.FNC4, e) >= 0 && t._moves.push(t._moveFNC), f(t.shiftKey, e) >= 0 && t._moves.push(t._shiftState), t._moves.push(t._moveState)
            },
            _moveFNC: function(e) {
                return e.fnc ? (e.fnc = !1, e.previousState == this.key) : t
            },
            _shiftState: function(e) {
                var n = this;
                return e.previousState == n.shiftKey && (e.index + 1 >= e.value.length || n.encoding[n.shiftKey].is(e.value, e.index + 1)) ? (n.encoding.addPattern(n.SHIFT), e.shifted = !0, !0) : t
            },
            _moveState: function() {
                return this.encoding.addPattern(this.MOVE), !0
            },
            SHIFT: 98
        }), o = {}, o.A = r.extend({
            key: "A",
            shiftKey: "B",
            isCode: function(e) {
                return e >= 0 && 96 > e
            },
            getValue: function(e) {
                return 32 > e ? e + 64 : e - 32
            },
            MOVE: 101,
            START: 103
        }), o.B = r.extend({
            key: "B",
            shiftKey: "A",
            isCode: function(e) {
                return e >= 32 && 128 > e
            },
            getValue: function(e) {
                return e - 32
            },
            MOVE: 100,
            START: 104
        }), o.C = i.extend({
            key: "C",
            addStart: function() {
                this.encoding.addPattern(this.START)
            },
            is: function(e, t) {
                var i = n(e, t, 4);
                return (e.length >= t + 4 || 2 == e.length) && S.test(i)
            },
            move: function() {
                this.encoding.addPattern(this.MOVE)
            },
            pushState: function(e) {
                for (var t;
                     (t = n(e.value, e.index, 2)) && S.test(t) && 2 == t.length;) this.encoding.addPattern(parseInt(t, 10)), e.index += 2
            },
            getValue: function(e) {
                return e
            },
            MOVE: 99,
            START: 105
        }), o.FNC4 = i.extend({
            key: "FNC4",
            dependentStates: ["A", "B"],
            init: function(e, t) {
                this.encoding = e, this._initSubStates(t)
            },
            addStart: function(e) {
                var t = e.value.charCodeAt(0) - 128,
                    n = this._getSubState(t);
                this.encoding[n].addStart()
            },
            is: function(e, t) {
                var n = e.charCodeAt(t);
                return this.isCode(n)
            },
            isCode: function(e) {
                return e >= 128 && 256 > e
            },
            pushState: function(e) {
                var t, n = this,
                    i = n._initSubState(e),
                    r = n.encoding,
                    o = i.value.length;
                if (e.index += o, 3 > o)
                    for (; o > i.index; i.index++) t = i.value.charCodeAt(i.index), i.state = n._getSubState(t), i.previousState != i.state && (i.previousState = i.state, r[i.state].move(i)), r.addPattern(r[i.state].MOVE), r.addPattern(r[i.state].getValue(t));
                else i.state != i.previousState && r[i.state].move(i), n._pushStart(i), r.pushData(i, n.subStates), e.value.length > e.index && n._pushStart(i);
                e.fnc = !0, e.state = i.state
            },
            _pushStart: function(e) {
                var t = this;
                t.encoding.addPattern(t.encoding[e.state].MOVE), t.encoding.addPattern(t.encoding[e.state].MOVE)
            },
            _initSubState: function(e) {
                var t = this,
                    n = {
                        value: t._getAll(e.value, e.index),
                        index: 0
                    };
                return n.state = t._getSubState(n.value.charCodeAt(0)), n.previousState = e.previousState == t.key ? n.state : e.previousState, n
            },
            _initSubStates: function(e) {
                var t, n = this;
                for (n.subStates = [], t = 0; e.length > t; t++) f(e[t], n.dependentStates) >= 0 && n.subStates.push(e[t])
            },
            _getSubState: function(e) {
                var t, n = this;
                for (t = 0; n.subStates.length > t; t++)
                    if (n.encoding[n.subStates[t]].isCode(e)) return n.subStates[t]
            },
            _getAll: function(e, t) {
                for (var n, i = "";
                     (n = e.charCodeAt(t++)) && this.isCode(n);) i += String.fromCharCode(n - 128);
                return i
            }
        }), o.FNC1 = i.extend({
            key: "FNC1",
            startState: "C",
            dependentStates: ["C", "B"],
            startAI: "(",
            endAI: ")",
            init: function(e, t) {
                this.encoding = e, this.states = t
            },
            addStart: function() {
                this.encoding[this.startState].addStart()
            },
            is: function() {
                return f(this.key, this.states) >= 0
            },
            pushState: function(e) {
                var t, n, i, r = this,
                    o = r.encoding,
                    a = e.value.replace(/\s/g, ""),
                    s = RegExp("[" + r.startAI + r.endAI + "]", "g"),
                    l = e.index,
                    c = {
                        state: r.startState
                    };
                for (o.addPattern(r.START);;) {
                    if (c.index = 0, i = a.charAt(l) === r.startAI ? 2 : 0, t = i > 0 ? r.getBySeparator(a, l) : r.getByLength(a, l), t.ai.length) n = l + i + t.id.length + t.ai.length;
                    else if (n = a.indexOf(r.startAI, l + 1), 0 > n) {
                        if (a.length > l + t.ai.max + t.id.length + i) throw Error("Separators are required after variable length identifiers");
                        n = a.length
                    }
                    if (c.value = a.substring(l, n).replace(s, ""), r.validate(t, c.value), o.pushData(c, r.dependentStates), n >= a.length) break;
                    l = n, c.state != r.startState && (o[r.startState].move(c), c.state = r.startState), t.ai.length || o.addPattern(r.START)
                }
                e.index = e.value.length
            },
            validate: function(e, t) {
                var n = t.substr(e.id.length),
                    i = e.ai;
                if (!i.type && !S.test(n)) throw Error("Application identifier " + e.id + " is numeric only but contains non numeric character(s).");
                if ("alphanumeric" == i.type && !T.test(n)) throw Error("Application identifier " + e.id + " is alphanumeric only but contains non alphanumeric character(s).");
                if (i.length && i.length !== n.length) throw Error("Application identifier " + e.id + " must be " + i.length + " characters long.");
                if (i.min && i.min > n.length) throw Error("Application identifier " + e.id + " must be at least " + i.min + " characters long.");
                if (i.max && n.length > i.max) throw Error("Application identifier " + e.id + " must be at most " + i.max + " characters long.")
            },
            getByLength: function(e, t) {
                var i, r, o, a = this;
                for (o = 2; 4 >= o; o++)
                    if (i = n(e, t, o), r = a.getAI(i) || a.getAI(i.substring(0, i.length - 1))) return {
                        id: i,
                        ai: r
                    };
                a.unsupportedAIError(i)
            },
            unsupportedAIError: function(e) {
                throw Error(c.format("'{0}' is not a supported Application Identifier"), e)
            },
            getBySeparator: function(e, t) {
                var n = this,
                    i = e.indexOf(n.startAI, t),
                    r = e.indexOf(n.endAI, i),
                    o = e.substring(i + 1, r),
                    a = n.getAI(o) || n.getAI(o.substr(o.length - 1));
                return a || n.unsupportedAIError(o), {
                    ai: a,
                    id: o
                }
            },
            getAI: function(e) {
                var t, n, i, r = this.applicationIdentifiers,
                    o = r.multiKey;
                if (r[e]) return r[e];
                for (t = 0; o.length > t; t++) {
                    if (o[t].ids && f(e, o[t].ids) >= 0) return o[t].type;
                    if (o[t].ranges)
                        for (n = o[t].ranges, i = 0; n.length > i; i++)
                            if (e >= n[i][0] && n[i][1] >= e) return o[t].type
                }
            },
            applicationIdentifiers: {
                22: {
                    max: 29,
                    type: "alphanumeric"
                },
                402: {
                    length: 17
                },
                7004: {
                    max: 4,
                    type: "alphanumeric"
                },
                242: {
                    max: 6,
                    type: "alphanumeric"
                },
                8020: {
                    max: 25,
                    type: "alphanumeric"
                },
                703: {
                    min: 3,
                    max: 30,
                    type: "alphanumeric"
                },
                8008: {
                    min: 8,
                    max: 12,
                    type: "alphanumeric"
                },
                253: {
                    min: 13,
                    max: 17,
                    type: "alphanumeric"
                },
                8003: {
                    min: 14,
                    max: 30,
                    type: "alphanumeric"
                },
                multiKey: [{
                    ids: ["15", "17", "8005", "8100"],
                    ranges: [
                        [11, 13],
                        [310, 316],
                        [320, 336],
                        [340, 369]
                    ],
                    type: {
                        length: 6
                    }
                }, {
                    ids: ["240", "241", "250", "251", "400", "401", "403", "7002", "8004", "8007", "8110"],
                    ranges: [
                        [-9]
                    ],
                    type: {
                        max: 30,
                        type: "alphanumeric"
                    }
                }, {
                    ids: ["7001"],
                    ranges: [
                        [410, 414]
                    ],
                    type: {
                        length: 13
                    }
                }, {
                    ids: ["10", "21", "254", "420", "8002"],
                    type: {
                        max: 20,
                        type: "alphanumeric"
                    }
                }, {
                    ids: ["00", "8006", "8017", "8018"],
                    type: {
                        length: 18
                    }
                }, {
                    ids: ["01", "02", "8001"],
                    type: {
                        length: 14
                    }
                }, {
                    ids: ["422"],
                    ranges: [
                        [424, 426]
                    ],
                    type: {
                        length: 3
                    }
                }, {
                    ids: ["20", "8102"],
                    type: {
                        length: 2
                    }
                }, {
                    ids: ["30", "37"],
                    type: {
                        max: 8,
                        type: "alphanumeric"
                    }
                }, {
                    ids: ["390", "392"],
                    type: {
                        max: 15,
                        type: "alphanumeric"
                    }
                }, {
                    ids: ["421", "423"],
                    type: {
                        min: 3,
                        max: 15,
                        type: "alphanumeric"
                    }
                }, {
                    ids: ["391", "393"],
                    type: {
                        min: 3,
                        max: 18,
                        type: "alphanumeric"
                    }
                }, {
                    ids: ["7003", "8101"],
                    type: {
                        length: 10
                    }
                }]
            },
            START: 102
        }), a = A.extend({
            init: function(e) {
                A.fn.init.call(this, e), this._initStates()
            },
            _initStates: function() {
                var e, t = this;
                for (e = 0; t.states.length > e; e++) t[t.states[e]] = new o[t.states[e]](t, t.states)
            },
            initValue: function(e, t, n) {
                var i = this;
                i.pattern = [], i.value = e, i.width = t, i.height = n, i.checkSum = 0, i.totalUnits = 0, i.index = 0, i.position = 1
            },
            addData: function() {
                var e = this,
                    t = {
                        value: e.value,
                        index: 0,
                        state: ""
                    };
                0 !== e.value.length && (t.state = t.previousState = e.getNextState(t, e.states), e.addStart(t), e.pushData(t, e.states), e.addCheckSum(), e.addStop(), e.setBaseUnit())
            },
            pushData: function(e, t) {
                for (var n, i = this;;) {
                    if (i[e.state].pushState(e), e.index >= e.value.length) break;
                    e.shifted ? (n = e.state, e.state = e.previousState, e.previousState = n, e.shifted = !1) : (e.previousState = e.state, e.state = i.getNextState(e, t), i[e.state].move(e))
                }
            },
            addStart: function(e) {
                this[e.state].addStart(e), this.position = 1
            },
            addCheckSum: function() {
                var e = this;
                e.checksum = e.checkSum % 103, e.addPattern(e.checksum)
            },
            addStop: function() {
                this.addPattern(this.STOP)
            },
            setBaseUnit: function() {
                var e = this;
                e.baseUnit = e.width / (e.totalUnits + e.quietZoneLength)
            },
            addPattern: function(e) {
                var t, n, i = this,
                    r = "" + i.characterMap[e];
                for (n = 0; r.length > n; n++) t = parseInt(r.charAt(n), 10), i.pattern.push(t), i.totalUnits += t;
                i.checkSum += e * i.position++
            },
            getNextState: function(e, t) {
                for (var n = 0; t.length > n; n++)
                    if (this[t[n]].is(e.value, e.index)) return t[n];
                this.invalidCharacterError(e.value.charAt(e.index))
            },
            characterMap: [212222, 222122, 222221, 121223, 121322, 131222, 122213, 122312, 132212, 221213, 221312, 231212, 112232, 122132, 122231, 113222, 123122, 123221, 223211, 221132, 221231, 213212, 223112, 312131, 311222, 321122, 321221, 312212, 322112, 322211, 212123, 212321, 232121, 111323, 131123, 131321, 112313, 132113, 132311, 211313, 231113, 231311, 112133, 112331, 132131, 113123, 113321, 133121, 313121, 211331, 231131, 213113, 213311, 213131, 311123, 311321, 331121, 312113, 312311, 332111, 314111, 221411, 431111, 111224, 111422, 121124, 121421, 141122, 141221, 112214, 112412, 122114, 122411, 142112, 142211, 241211, 221114, 413111, 241112, 134111, 111242, 121142, 121241, 114212, 124112, 124211, 411212, 421112, 421211, 212141, 214121, 412121, 111143, 111341, 131141, 114113, 114311, 411113, 411311, 113141, 114131, 311141, 411131, 211412, 211214, 211232, 2331112],
            STOP: 106
        }), E.code128a = a.extend({
            name: "Code 128 A",
            states: ["A"]
        }), E.code128b = a.extend({
            name: "Code 128 B",
            states: ["B"]
        }), E.code128c = a.extend({
            name: "Code 128 C",
            states: ["C"]
        }), E.code128 = a.extend({
            name: "Code 128",
            states: ["C", "B", "A", "FNC4"]
        }), E["gs1-128"] = a.extend({
            name: "Code GS1-128",
            states: ["FNC1", "C", "B"]
        }), s = A.extend({
            initValue: function(e, t) {
                var n = this;
                n.pattern = [], n.value = e, n.checkSumLength = 0, n.width = t
            },
            setBaseUnit: function() {
                var e = this,
                    t = 7;
                e.baseUnit = e.width / (12 * (e.value.length + e.checkSumLength) + e.quietZoneLength + t)
            },
            addData: function() {
                var e, t = this,
                    n = t.value;
                for (t.addPattern(t.START), e = 0; n.length > e; e++) t.addCharacter(n.charAt(e));
                t.options.addCheckSum && t.addCheckSum(), t.addPattern(t.STOP), t.setBaseUnit()
            },
            addCharacter: function(e) {
                var t = this,
                    n = t.characterMap[e];
                n || t.invalidCharacterError(e), t.addPattern(n)
            },
            addPattern: function(e) {
                for (var t = 0; e.length > t; t++) this.pattern.push(parseInt(e.charAt(t), 10))
            },
            addCheckSum: function() {
                var e, t = this,
                    n = t.checkSums[t.checkSumType],
                    i = n.call(t.checkSums, t.value);
                for (t.checksum = i.join(""), e = 0; i.length > e; e++) t.checkSumLength++, t.addPattern(t.characterMap[i[e]])
            },
            checkSums: {
                Modulo10: function(e) {
                    var t, n, i, r = [0, ""],
                        o = e.length % 2;
                    for (t = 0; e.length > t; t++) r[(t + o) % 2] += parseInt(e.charAt(t), 10);
                    for (i = r[0], n = "" + 2 * r[1], t = 0; n.length > t; t++) i += parseInt(n.charAt(t), 10);
                    return [(10 - i % 10) % 10]
                },
                Modulo11: function(e) {
                    var t, n, i, r = 0,
                        o = 11,
                        a = e.length;
                    for (i = 0; a > i; i++) t = ((a - i) % 6 || 6) + 1, r += t * e.charAt(i);
                    return n = (o - r % o) % o, 10 != n ? [n] : [1, 0]
                },
                Modulo11Modulo10: function(e) {
                    var t, n = this.Modulo11(e);
                    return t = e + n[0], n.concat(this.Modulo10(t))
                },
                Modulo10Modulo10: function(e) {
                    var t, n = this.Modulo10(e);
                    return t = e + n[0], n.concat(this.Modulo10(t))
                }
            },
            characterMap: ["12121212", "12121221", "12122112", "12122121", "12211212", "12211221", "12212112", "12212121", "21121212", "21121221"],
            START: "21",
            STOP: "121",
            checkSumType: ""
        }), E.msimod10 = s.extend({
            name: "MSI Modulo10",
            checkSumType: "Modulo10"
        }), E.msimod11 = s.extend({
            name: "MSI Modulo11",
            checkSumType: "Modulo11"
        }), E.msimod1110 = s.extend({
            name: "MSI Modulo11 Modulo10",
            checkSumType: "Modulo11Modulo10"
        }), E.msimod1010 = s.extend({
            name: "MSI Modulo10 Modulo10",
            checkSumType: "Modulo10Modulo10"
        }), E.code11 = A.extend({
            name: "Code 11",
            cCheckSumTotal: 10,
            kCheckSumTotal: 9,
            kCheckSumMinLength: 10,
            checkSumMod: 11,
            DASH_VALUE: 10,
            DASH: "-",
            START: "112211",
            STOP: "11221",
            initValue: function(e, t) {
                var n = this;
                n.pattern = [], n.value = e, n.width = t, n.totalUnits = 0
            },
            addData: function() {
                var e, t = this,
                    n = t.value;
                for (t.addPattern(t.START), e = 0; n.length > e; e++) t.addCharacter(n.charAt(e));
                t.options.addCheckSum && t.addCheckSum(), t.addPattern(t.STOP), t.setBaseUnit()
            },
            setBaseUnit: function() {
                var e = this;
                e.baseUnit = e.width / (e.totalUnits + e.quietZoneLength)
            },
            addCheckSum: function() {
                var e, t = this,
                    n = t.value,
                    i = n.length,
                    r = t.getWeightedSum(n, i, t.cCheckSumTotal) % t.checkSumMod;
                t.checksum = r + "", t.addPattern(t.characterMap[r]), i++, i >= t.kCheckSumMinLength && (e = (r + t.getWeightedSum(n, i, t.kCheckSumTotal)) % t.checkSumMod, t.checksum += e, t.addPattern(t.characterMap[e]))
            },
            getWeightedSum: function(e, t, n) {
                var i, r = 0;
                for (i = 0; e.length > i; i++) r += this.weightedValue(this.getValue(e.charAt(i)), t, i, n);
                return r
            },
            weightedValue: function(e, t, n, i) {
                var r = (t - n) % i || i;
                return r * e
            },
            getValue: function(e) {
                var t = this;
                return isNaN(e) ? (e !== t.DASH && t.invalidCharacterError(e), t.DASH_VALUE) : parseInt(e, 10)
            },
            addCharacter: function(e) {
                var t = this,
                    n = t.getValue(e),
                    i = t.characterMap[n];
                t.addPattern(i)
            },
            addPattern: function(e) {
                var t, n;
                for (n = 0; e.length > n; n++) t = parseInt(e.charAt(n), 10), this.pattern.push(t), this.totalUnits += t
            },
            characterMap: ["111121", "211121", "121121", "221111", "112121", "212111", "122111", "111221", "211211", "211111", "112111"],
            options: {
                addCheckSum: !0
            }
        }), E.postnet = A.extend({
            name: "Postnet",
            START: "2",
            VALID_CODE_LENGTHS: [5, 9, 11],
            DIGIT_SEPARATOR: "-",
            initValue: function(e, t, n) {
                var i = this;
                i.height = n, i.width = t, i.baseHeight = n / 2, i.value = e.replace(RegExp(i.DIGIT_SEPARATOR, "g"), ""), i.pattern = [], i.validate(i.value), i.checkSum = 0, i.setBaseUnit()
            },
            addData: function() {
                var e, t = this,
                    n = t.value;
                for (t.addPattern(t.START), e = 0; n.length > e; e++) t.addCharacter(n.charAt(e));
                t.options.addCheckSum && t.addCheckSum(), t.addPattern(t.START), t.pattern.pop()
            },
            addCharacter: function(e) {
                var t = this,
                    n = t.characterMap[e];
                t.checkSum += parseInt(e, 10), t.addPattern(n)
            },
            addCheckSum: function() {
                var e = this;
                e.checksum = (10 - e.checkSum % 10) % 10, e.addCharacter(e.checksum)
            },
            setBaseUnit: function() {
                var e = this,
                    t = 3;
                e.baseUnit = e.width / (10 * (e.value.length + 1) + t + e.quietZoneLength)
            },
            validate: function(e) {
                var t = this;
                if (S.test(e) || t.invalidCharacterError(e.match(/[^0-9]/)[0]), f(e.length, t.VALID_CODE_LENGTHS) < 0) throw Error("Invalid value length. Valid lengths for the Postnet symbology are " + t.VALID_CODE_LENGTHS.join(","))
            },
            addPattern: function(e) {
                var t, n, i = this;
                for (n = 0; e.length > n; n++) t = i.height - i.baseHeight * e.charAt(n), i.pattern.push({
                    width: 1,
                    y1: t,
                    y2: i.height
                }), i.pattern.push(1)
            },
            characterMap: ["22111", "11122", "11212", "11221", "12112", "12121", "12211", "21112", "21121", "21211"]
        }), E.ean13 = A.extend({
            initValue: function(e, t, n) {
                if (e += "", 12 != e.length || /\D/.test(e)) throw Error('The value of the "EAN13" encoding should be 12 symbols');
                var i = this;
                i.pattern = [], i.options.height = n, i.baseUnit = t / (95 + i.quietZoneLength), i.value = e, i.checksum = i.calculateChecksum(), i.leftKey = e[0], i.leftPart = e.substr(1, 6), i.rightPart = e.substr(7) + i.checksum
            },
            addData: function() {
                var e = this;
                e.addPieces(e.characterMap.start), e.addSide(e.leftPart, e.leftKey), e.addPieces(e.characterMap.middle), e.addSide(e.rightPart), e.addPieces(e.characterMap.start)
            },
            addSide: function(e, t) {
                var n, i = this;
                for (n = 0; e.length > n; n++) t && parseInt(i.keyTable[t].charAt(n), 10) ? i.addPieces(Array.prototype.slice.call(i.characterMap.digits[e.charAt(n)]).reverse(), !0) : i.addPieces(i.characterMap.digits[e.charAt(n)], !0)
            },
            addPieces: function(e, t) {
                var n, i = this;
                for (n = 0; e.length > n; n++) i.pattern.push(t ? {
                    y1: 0,
                    y2: .95 * i.options.height,
                    width: e[n]
                } : e[n])
            },
            calculateChecksum: function() {
                var e, t, n = 0,
                    i = 0,
                    r = this.value.split("").reverse().join("");
                for (e = 0; r.length > e; e++) e % 2 ? i += parseInt(r.charAt(e), 10) : n += parseInt(r.charAt(e), 10);
                return t = (10 - (3 * n + i) % 10) % 10
            },
            keyTable: ["000000", "001011", "001101", "001110", "010011", "011001", "011100", "010101", "010110", "011010"],
            characterMap: {
                digits: [
                    [3, 2, 1, 1],
                    [2, 2, 2, 1],
                    [2, 1, 2, 2],
                    [1, 4, 1, 1],
                    [1, 1, 3, 2],
                    [1, 2, 3, 1],
                    [1, 1, 1, 4],
                    [1, 3, 1, 2],
                    [1, 2, 1, 3],
                    [3, 1, 1, 2]
                ],
                start: [1, 1, 1],
                middle: [1, 1, 1, 1, 1]
            }
        }), E.ean8 = E.ean13.extend({
            initValue: function(e, t, n) {
                var i = this;
                if (7 != e.length || /\D/.test(e)) throw Error("Invalid value provided");
                i.value = e, i.options.height = n, i.checksum = i.calculateChecksum(i.value), i.leftPart = i.value.substr(0, 4), i.rightPart = i.value.substr(4) + i.checksum, i.pattern = [], i.baseUnit = t / (67 + i.quietZoneLength)
            }
        }), l = d.extend({
            init: function(t, n) {
                var i = this;
                d.fn.init.call(i, t, n), i.element = e(t), i.wrapper = i.element, i.element.addClass("k-barcode").css("display", "block"), i.surfaceWrap = e("<div />").css("position", "relative").appendTo(this.element), i.surface = m.Surface.create(i.surfaceWrap, {
                    type: i.options.renderAs
                }), i.setOptions(n)
            },
            setOptions: function(e) {
                var t = this;
                if (t.type = (e.type || t.options.type).toLowerCase(), "upca" == t.type && (t.type = "ean13", e.value = "0" + e.value), "upce" == t.type && (t.type = "ean8", e.value = "0" + e.value), !E[t.type]) throw Error("Encoding " + t.type + "is not supported.");
                t.encoding = new E[t.type], t.options = u(!0, t.options, e), _(e.value) && t.redraw()
            },
            redraw: function() {
                var e = this._getSize();
                this.surface.clear(), this.surface.setSize({
                    width: e.width,
                    height: e.height
                }), this.createVisual(), this.surface.draw(this.visual)
            },
            getSize: function() {
                return c.dimensions(this.element)
            },
            _resize: function() {
                this.redraw()
            },
            createVisual: function() {
                this.visual = this._render()
            },
            _render: function() {
                var e, t, n, i = this,
                    r = i.options,
                    o = r.value,
                    a = r.text,
                    s = b.getSpacing(a.margin),
                    l = i._getSize(),
                    c = r.border || {},
                    d = i.encoding,
                    u = w(0, 0, l.width, l.height).unpad(c.width).unpad(r.padding),
                    h = u.height(),
                    f = new m.Group;
                return i.contentBox = u, f.append(i._getBackground(l)), a.visible && (n = m.util.measureText(o, {
                    font: a.font
                }).height, h -= n + s.top + s.bottom), e = d.encode(o, u.width(), h), a.visible && (t = o, r.checksum && _(d.checksum) && (t += " " + d.checksum), f.append(i._getText(t))), i.barHeight = h, this._bandsGroup = this._getBands(e.pattern, e.baseUnit), f.append(this._bandsGroup), f
            },
            exportVisual: function() {
                return this._render()
            },
            _getSize: function() {
                var e = this,
                    t = e.element,
                    n = new g.Size(k, x);
                return t.width() > 0 && (n.width = t.width()), t.height() > 0 && (n.height = t.height()), e.options.width && (n.width = e.options.width), e.options.height && (n.height = e.options.height), n
            },
            value: function(e) {
                var n = this;
                return _(e) ? (n.options.value = e + "", n.redraw(), t) : n.options.value
            },
            _getBands: function(e, t) {
                var n, i, r, o, a, s = this,
                    l = s.contentBox,
                    c = l.x1,
                    d = new m.Group;
                for (r = 0; e.length > r; r++) i = p(e[r]) ? e[r] : {
                    width: e[r],
                    y1: 0,
                    y2: s.barHeight
                }, n = i.width * t, r % 2 && (o = g.Rect.fromPoints(new g.Point(c, i.y1 + l.y1), new g.Point(c + n, i.y2 + l.y1)), a = m.Path.fromRect(o, {
                    fill: {
                        color: s.options.color
                    },
                    stroke: null
                }), d.append(a)), c += n;
                return d
            },
            _getBackground: function(e) {
                var t = this,
                    n = t.options,
                    i = n.border || {},
                    r = w(0, 0, e.width, e.height).unpad(i.width / 2),
                    o = m.Path.fromRect(r.toRect(), {
                        fill: {
                            color: n.background
                        },
                        stroke: {
                            color: i.width ? i.color : "",
                            width: i.width,
                            dashType: i.dashType
                        }
                    });
                return o
            },
            _getText: function(e) {
                var t = this,
                    n = t.options.text,
                    i = t._textbox = new y(e, {
                        font: n.font,
                        color: n.color,
                        align: "center",
                        vAlign: "bottom",
                        margin: n.margin
                    });
                return i.reflow(t.contentBox), i.renderVisual(), i.visual
            },
            options: {
                name: "Barcode",
                renderAs: "svg",
                value: "",
                type: "code39",
                checksum: !1,
                width: 0,
                height: 0,
                color: "black",
                background: "white",
                text: {
                    visible: !0,
                    font: "16px Consolas, Monaco, Sans Mono, monospace, sans-serif",
                    color: "black",
                    margin: {
                        top: 0,
                        bottom: 0,
                        left: 0,
                        right: 0
                    }
                },
                border: {
                    width: 0,
                    dashType: "solid",
                    color: "black"
                },
                padding: {
                    top: 0,
                    bottom: 0,
                    left: 0,
                    right: 0
                }
            }
        }), b.ExportMixin.extend(l.fn), b.ui.plugin(l), c.deepExtend(b, {
            encodings: E,
            Encoding: A
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.qrcode.min", ["kendo.dataviz.core.min", "kendo.drawing.min"], e)
}(function() {
    return function(e, t) {
        function n(e) {
            return parseInt(e, 2)
        }

        function i(e, t) {
            var n = (+e).toString(2);
            return t > n.length && (n = Array(t - n.length + 1).join(0) + n), n
        }

        function r(e, t) {
            for (var n = [], i = 0; e.length > i;) n.push(e.substring(i, i + t)), i += t;
            return n
        }

        function o(e, t, n, i) {
            for (var r = 0; e.length > r; r++) e[r][n][i] = t
        }

        function a(e, t, n, i) {
            for (var r = 0; ve.length > r; r++) e[r][n][i] = ve[r](n, i) ? 1 ^ t : parseInt(t, 10)
        }

        function s() {
            var e, t;
            for (t = 1; 255 > t; t++) e = 2 * oe[t - 1], e > 255 && (e = 285 ^ e), oe[t] = e, re[e] = t;
            e = 2 * oe[t - 1] ^ 285, oe[t] = e, oe[-1] = 0
        }

        function l() {
            var e, t, n, i = 68;
            for (e = 2; i >= e; e++) t = ae[e - 1], n = [e, 0], ae[e] = w(t, n)
        }

        function c(e, n) {
            var i = [],
                r = e.length - 1;
            do i[r] = oe[(e[r] + n) % 255], r--; while (e[r] !== t);
            return i
        }

        function d(e, t) {
            return parseInt(e.charAt(t), 10)
        }

        function u(e, t, n, i, r) {
            t[e][i] = (t[e][i] << 1 ^ r) % 128, t[e][i] == ge && (n[e] += 40)
        }

        function h(e, t, n, i, r, o) {
            n[e][o] == i ? r[e][o]++ : (n[e][o] = i, r[e][o] >= 5 && (t[e] += 3 + r[e][o] - 5), r[e][o] = 1)
        }

        function f(e, t) {
            var n = Math.floor(e / t * 100),
                i = n % 5,
                r = Math.abs(n - i - 50),
                o = Math.abs(n + 5 - i - 50),
                a = 10 * Math.min(r / 5, o / 5);
            return a
        }
        var p, m, g, v, _, b, w, y, k, x, C, S, T, D, A, E, F, I, M, R, P, z, B, L, H, N, O, V, U, W, j, q, G, $, Y = window.kendo,
            K = e.extend,
            Q = Y.drawing,
            X = Y.dataviz,
            J = Y.ui.Widget,
            Z = X.Box2D,
            ee = "0000",
            te = "numeric",
            ne = "alphanumeric",
            ie = "byte",
            re = {
                1: 0
            },
            oe = {
                0: 1
            },
            ae = [
                [1, 0],
                [1, 25, 0]
            ],
            se = {
                15: 20,
                16: 20,
                18: 24,
                19: 24,
                22: 20,
                24: 22,
                26: 24,
                28: 20,
                30: 20,
                31: 24,
                32: 28,
                33: 24,
                36: 18,
                37: 22,
                39: 20,
                40: 24
            },
            le = [{
                L: {
                    groups: [
                        [1, 19]
                    ],
                    totalDataCodewords: 19,
                    errorCodewordsPerBlock: 7
                },
                M: {
                    groups: [
                        [1, 16]
                    ],
                    totalDataCodewords: 16,
                    errorCodewordsPerBlock: 10
                },
                Q: {
                    groups: [
                        [1, 13]
                    ],
                    totalDataCodewords: 13,
                    errorCodewordsPerBlock: 13
                },
                H: {
                    groups: [
                        [1, 9]
                    ],
                    totalDataCodewords: 9,
                    errorCodewordsPerBlock: 17
                }
            }, {
                L: {
                    groups: [
                        [1, 34]
                    ],
                    totalDataCodewords: 34,
                    errorCodewordsPerBlock: 10
                },
                M: {
                    groups: [
                        [1, 28]
                    ],
                    totalDataCodewords: 28,
                    errorCodewordsPerBlock: 16
                },
                Q: {
                    groups: [
                        [1, 22]
                    ],
                    totalDataCodewords: 22,
                    errorCodewordsPerBlock: 22
                },
                H: {
                    groups: [
                        [1, 16]
                    ],
                    totalDataCodewords: 16,
                    errorCodewordsPerBlock: 28
                }
            }, {
                L: {
                    groups: [
                        [1, 55]
                    ],
                    totalDataCodewords: 55,
                    errorCodewordsPerBlock: 15
                },
                M: {
                    groups: [
                        [1, 44]
                    ],
                    totalDataCodewords: 44,
                    errorCodewordsPerBlock: 26
                },
                Q: {
                    groups: [
                        [2, 17]
                    ],
                    totalDataCodewords: 34,
                    errorCodewordsPerBlock: 18
                },
                H: {
                    groups: [
                        [2, 13]
                    ],
                    totalDataCodewords: 26,
                    errorCodewordsPerBlock: 22
                }
            }, {
                L: {
                    groups: [
                        [1, 80]
                    ],
                    totalDataCodewords: 80,
                    errorCodewordsPerBlock: 20
                },
                M: {
                    groups: [
                        [2, 32]
                    ],
                    totalDataCodewords: 64,
                    errorCodewordsPerBlock: 18
                },
                Q: {
                    groups: [
                        [2, 24]
                    ],
                    totalDataCodewords: 48,
                    errorCodewordsPerBlock: 26
                },
                H: {
                    groups: [
                        [4, 9]
                    ],
                    totalDataCodewords: 36,
                    errorCodewordsPerBlock: 16
                }
            }, {
                L: {
                    groups: [
                        [1, 108]
                    ],
                    totalDataCodewords: 108,
                    errorCodewordsPerBlock: 26
                },
                M: {
                    groups: [
                        [2, 43]
                    ],
                    totalDataCodewords: 86,
                    errorCodewordsPerBlock: 24
                },
                Q: {
                    groups: [
                        [2, 15],
                        [2, 16]
                    ],
                    totalDataCodewords: 62,
                    errorCodewordsPerBlock: 18
                },
                H: {
                    groups: [
                        [2, 11],
                        [2, 12]
                    ],
                    totalDataCodewords: 46,
                    errorCodewordsPerBlock: 22
                }
            }, {
                L: {
                    groups: [
                        [2, 68]
                    ],
                    totalDataCodewords: 136,
                    errorCodewordsPerBlock: 18
                },
                M: {
                    groups: [
                        [4, 27]
                    ],
                    totalDataCodewords: 108,
                    errorCodewordsPerBlock: 16
                },
                Q: {
                    groups: [
                        [4, 19]
                    ],
                    totalDataCodewords: 76,
                    errorCodewordsPerBlock: 24
                },
                H: {
                    groups: [
                        [4, 15]
                    ],
                    totalDataCodewords: 60,
                    errorCodewordsPerBlock: 28
                }
            }, {
                L: {
                    groups: [
                        [2, 78]
                    ],
                    totalDataCodewords: 156,
                    errorCodewordsPerBlock: 20
                },
                M: {
                    groups: [
                        [4, 31]
                    ],
                    totalDataCodewords: 124,
                    errorCodewordsPerBlock: 18
                },
                Q: {
                    groups: [
                        [2, 14],
                        [4, 15]
                    ],
                    totalDataCodewords: 88,
                    errorCodewordsPerBlock: 18
                },
                H: {
                    groups: [
                        [4, 13],
                        [1, 14]
                    ],
                    totalDataCodewords: 66,
                    errorCodewordsPerBlock: 26
                }
            }, {
                L: {
                    groups: [
                        [2, 97]
                    ],
                    totalDataCodewords: 194,
                    errorCodewordsPerBlock: 24
                },
                M: {
                    groups: [
                        [2, 38],
                        [2, 39]
                    ],
                    totalDataCodewords: 154,
                    errorCodewordsPerBlock: 22
                },
                Q: {
                    groups: [
                        [4, 18],
                        [2, 19]
                    ],
                    totalDataCodewords: 110,
                    errorCodewordsPerBlock: 22
                },
                H: {
                    groups: [
                        [4, 14],
                        [2, 15]
                    ],
                    totalDataCodewords: 86,
                    errorCodewordsPerBlock: 26
                }
            }, {
                L: {
                    groups: [
                        [2, 116]
                    ],
                    totalDataCodewords: 232,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [3, 36],
                        [2, 37]
                    ],
                    totalDataCodewords: 182,
                    errorCodewordsPerBlock: 22
                },
                Q: {
                    groups: [
                        [4, 16],
                        [4, 17]
                    ],
                    totalDataCodewords: 132,
                    errorCodewordsPerBlock: 20
                },
                H: {
                    groups: [
                        [4, 12],
                        [4, 13]
                    ],
                    totalDataCodewords: 100,
                    errorCodewordsPerBlock: 24
                }
            }, {
                L: {
                    groups: [
                        [2, 68],
                        [2, 69]
                    ],
                    totalDataCodewords: 274,
                    errorCodewordsPerBlock: 18
                },
                M: {
                    groups: [
                        [4, 43],
                        [1, 44]
                    ],
                    totalDataCodewords: 216,
                    errorCodewordsPerBlock: 26
                },
                Q: {
                    groups: [
                        [6, 19],
                        [2, 20]
                    ],
                    totalDataCodewords: 154,
                    errorCodewordsPerBlock: 24
                },
                H: {
                    groups: [
                        [6, 15],
                        [2, 16]
                    ],
                    totalDataCodewords: 122,
                    errorCodewordsPerBlock: 28
                }
            }, {
                L: {
                    groups: [
                        [4, 81]
                    ],
                    totalDataCodewords: 324,
                    errorCodewordsPerBlock: 20
                },
                M: {
                    groups: [
                        [1, 50],
                        [4, 51]
                    ],
                    totalDataCodewords: 254,
                    errorCodewordsPerBlock: 30
                },
                Q: {
                    groups: [
                        [4, 22],
                        [4, 23]
                    ],
                    totalDataCodewords: 180,
                    errorCodewordsPerBlock: 28
                },
                H: {
                    groups: [
                        [3, 12],
                        [8, 13]
                    ],
                    totalDataCodewords: 140,
                    errorCodewordsPerBlock: 24
                }
            }, {
                L: {
                    groups: [
                        [2, 92],
                        [2, 93]
                    ],
                    totalDataCodewords: 370,
                    errorCodewordsPerBlock: 24
                },
                M: {
                    groups: [
                        [6, 36],
                        [2, 37]
                    ],
                    totalDataCodewords: 290,
                    errorCodewordsPerBlock: 22
                },
                Q: {
                    groups: [
                        [4, 20],
                        [6, 21]
                    ],
                    totalDataCodewords: 206,
                    errorCodewordsPerBlock: 26
                },
                H: {
                    groups: [
                        [7, 14],
                        [4, 15]
                    ],
                    totalDataCodewords: 158,
                    errorCodewordsPerBlock: 28
                }
            }, {
                L: {
                    groups: [
                        [4, 107]
                    ],
                    totalDataCodewords: 428,
                    errorCodewordsPerBlock: 26
                },
                M: {
                    groups: [
                        [8, 37],
                        [1, 38]
                    ],
                    totalDataCodewords: 334,
                    errorCodewordsPerBlock: 22
                },
                Q: {
                    groups: [
                        [8, 20],
                        [4, 21]
                    ],
                    totalDataCodewords: 244,
                    errorCodewordsPerBlock: 24
                },
                H: {
                    groups: [
                        [12, 11],
                        [4, 12]
                    ],
                    totalDataCodewords: 180,
                    errorCodewordsPerBlock: 22
                }
            }, {
                L: {
                    groups: [
                        [3, 115],
                        [1, 116]
                    ],
                    totalDataCodewords: 461,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [4, 40],
                        [5, 41]
                    ],
                    totalDataCodewords: 365,
                    errorCodewordsPerBlock: 24
                },
                Q: {
                    groups: [
                        [11, 16],
                        [5, 17]
                    ],
                    totalDataCodewords: 261,
                    errorCodewordsPerBlock: 20
                },
                H: {
                    groups: [
                        [11, 12],
                        [5, 13]
                    ],
                    totalDataCodewords: 197,
                    errorCodewordsPerBlock: 24
                }
            }, {
                L: {
                    groups: [
                        [5, 87],
                        [1, 88]
                    ],
                    totalDataCodewords: 523,
                    errorCodewordsPerBlock: 22
                },
                M: {
                    groups: [
                        [5, 41],
                        [5, 42]
                    ],
                    totalDataCodewords: 415,
                    errorCodewordsPerBlock: 24
                },
                Q: {
                    groups: [
                        [5, 24],
                        [7, 25]
                    ],
                    totalDataCodewords: 295,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [11, 12],
                        [7, 13]
                    ],
                    totalDataCodewords: 223,
                    errorCodewordsPerBlock: 24
                }
            }, {
                L: {
                    groups: [
                        [5, 98],
                        [1, 99]
                    ],
                    totalDataCodewords: 589,
                    errorCodewordsPerBlock: 24
                },
                M: {
                    groups: [
                        [7, 45],
                        [3, 46]
                    ],
                    totalDataCodewords: 453,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [15, 19],
                        [2, 20]
                    ],
                    totalDataCodewords: 325,
                    errorCodewordsPerBlock: 24
                },
                H: {
                    groups: [
                        [3, 15],
                        [13, 16]
                    ],
                    totalDataCodewords: 253,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [1, 107],
                        [5, 108]
                    ],
                    totalDataCodewords: 647,
                    errorCodewordsPerBlock: 28
                },
                M: {
                    groups: [
                        [10, 46],
                        [1, 47]
                    ],
                    totalDataCodewords: 507,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [1, 22],
                        [15, 23]
                    ],
                    totalDataCodewords: 367,
                    errorCodewordsPerBlock: 28
                },
                H: {
                    groups: [
                        [2, 14],
                        [17, 15]
                    ],
                    totalDataCodewords: 283,
                    errorCodewordsPerBlock: 28
                }
            }, {
                L: {
                    groups: [
                        [5, 120],
                        [1, 121]
                    ],
                    totalDataCodewords: 721,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [9, 43],
                        [4, 44]
                    ],
                    totalDataCodewords: 563,
                    errorCodewordsPerBlock: 26
                },
                Q: {
                    groups: [
                        [17, 22],
                        [1, 23]
                    ],
                    totalDataCodewords: 397,
                    errorCodewordsPerBlock: 28
                },
                H: {
                    groups: [
                        [2, 14],
                        [19, 15]
                    ],
                    totalDataCodewords: 313,
                    errorCodewordsPerBlock: 28
                }
            }, {
                L: {
                    groups: [
                        [3, 113],
                        [4, 114]
                    ],
                    totalDataCodewords: 795,
                    errorCodewordsPerBlock: 28
                },
                M: {
                    groups: [
                        [3, 44],
                        [11, 45]
                    ],
                    totalDataCodewords: 627,
                    errorCodewordsPerBlock: 26
                },
                Q: {
                    groups: [
                        [17, 21],
                        [4, 22]
                    ],
                    totalDataCodewords: 445,
                    errorCodewordsPerBlock: 26
                },
                H: {
                    groups: [
                        [9, 13],
                        [16, 14]
                    ],
                    totalDataCodewords: 341,
                    errorCodewordsPerBlock: 26
                }
            }, {
                L: {
                    groups: [
                        [3, 107],
                        [5, 108]
                    ],
                    totalDataCodewords: 861,
                    errorCodewordsPerBlock: 28
                },
                M: {
                    groups: [
                        [3, 41],
                        [13, 42]
                    ],
                    totalDataCodewords: 669,
                    errorCodewordsPerBlock: 26
                },
                Q: {
                    groups: [
                        [15, 24],
                        [5, 25]
                    ],
                    totalDataCodewords: 485,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [15, 15],
                        [10, 16]
                    ],
                    totalDataCodewords: 385,
                    errorCodewordsPerBlock: 28
                }
            }, {
                L: {
                    groups: [
                        [4, 116],
                        [4, 117]
                    ],
                    totalDataCodewords: 932,
                    errorCodewordsPerBlock: 28
                },
                M: {
                    groups: [
                        [17, 42]
                    ],
                    totalDataCodewords: 714,
                    errorCodewordsPerBlock: 26
                },
                Q: {
                    groups: [
                        [17, 22],
                        [6, 23]
                    ],
                    totalDataCodewords: 512,
                    errorCodewordsPerBlock: 28
                },
                H: {
                    groups: [
                        [19, 16],
                        [6, 17]
                    ],
                    totalDataCodewords: 406,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [2, 111],
                        [7, 112]
                    ],
                    totalDataCodewords: 1006,
                    errorCodewordsPerBlock: 28
                },
                M: {
                    groups: [
                        [17, 46]
                    ],
                    totalDataCodewords: 782,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [7, 24],
                        [16, 25]
                    ],
                    totalDataCodewords: 568,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [34, 13]
                    ],
                    totalDataCodewords: 442,
                    errorCodewordsPerBlock: 24
                }
            }, {
                L: {
                    groups: [
                        [4, 121],
                        [5, 122]
                    ],
                    totalDataCodewords: 1094,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [4, 47],
                        [14, 48]
                    ],
                    totalDataCodewords: 860,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [11, 24],
                        [14, 25]
                    ],
                    totalDataCodewords: 614,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [16, 15],
                        [14, 16]
                    ],
                    totalDataCodewords: 464,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [6, 117],
                        [4, 118]
                    ],
                    totalDataCodewords: 1174,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [6, 45],
                        [14, 46]
                    ],
                    totalDataCodewords: 914,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [11, 24],
                        [16, 25]
                    ],
                    totalDataCodewords: 664,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [30, 16],
                        [2, 17]
                    ],
                    totalDataCodewords: 514,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [8, 106],
                        [4, 107]
                    ],
                    totalDataCodewords: 1276,
                    errorCodewordsPerBlock: 26
                },
                M: {
                    groups: [
                        [8, 47],
                        [13, 48]
                    ],
                    totalDataCodewords: 1e3,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [7, 24],
                        [22, 25]
                    ],
                    totalDataCodewords: 718,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [22, 15],
                        [13, 16]
                    ],
                    totalDataCodewords: 538,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [10, 114],
                        [2, 115]
                    ],
                    totalDataCodewords: 1370,
                    errorCodewordsPerBlock: 28
                },
                M: {
                    groups: [
                        [19, 46],
                        [4, 47]
                    ],
                    totalDataCodewords: 1062,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [28, 22],
                        [6, 23]
                    ],
                    totalDataCodewords: 754,
                    errorCodewordsPerBlock: 28
                },
                H: {
                    groups: [
                        [33, 16],
                        [4, 17]
                    ],
                    totalDataCodewords: 596,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [8, 122],
                        [4, 123]
                    ],
                    totalDataCodewords: 1468,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [22, 45],
                        [3, 46]
                    ],
                    totalDataCodewords: 1128,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [8, 23],
                        [26, 24]
                    ],
                    totalDataCodewords: 808,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [12, 15],
                        [28, 16]
                    ],
                    totalDataCodewords: 628,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [3, 117],
                        [10, 118]
                    ],
                    totalDataCodewords: 1531,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [3, 45],
                        [23, 46]
                    ],
                    totalDataCodewords: 1193,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [4, 24],
                        [31, 25]
                    ],
                    totalDataCodewords: 871,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [11, 15],
                        [31, 16]
                    ],
                    totalDataCodewords: 661,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [7, 116],
                        [7, 117]
                    ],
                    totalDataCodewords: 1631,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [21, 45],
                        [7, 46]
                    ],
                    totalDataCodewords: 1267,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [1, 23],
                        [37, 24]
                    ],
                    totalDataCodewords: 911,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [19, 15],
                        [26, 16]
                    ],
                    totalDataCodewords: 701,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [5, 115],
                        [10, 116]
                    ],
                    totalDataCodewords: 1735,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [19, 47],
                        [10, 48]
                    ],
                    totalDataCodewords: 1373,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [15, 24],
                        [25, 25]
                    ],
                    totalDataCodewords: 985,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [23, 15],
                        [25, 16]
                    ],
                    totalDataCodewords: 745,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [13, 115],
                        [3, 116]
                    ],
                    totalDataCodewords: 1843,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [2, 46],
                        [29, 47]
                    ],
                    totalDataCodewords: 1455,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [42, 24],
                        [1, 25]
                    ],
                    totalDataCodewords: 1033,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [23, 15],
                        [28, 16]
                    ],
                    totalDataCodewords: 793,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [17, 115]
                    ],
                    totalDataCodewords: 1955,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [10, 46],
                        [23, 47]
                    ],
                    totalDataCodewords: 1541,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [10, 24],
                        [35, 25]
                    ],
                    totalDataCodewords: 1115,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [19, 15],
                        [35, 16]
                    ],
                    totalDataCodewords: 845,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [17, 115],
                        [1, 116]
                    ],
                    totalDataCodewords: 2071,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [14, 46],
                        [21, 47]
                    ],
                    totalDataCodewords: 1631,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [29, 24],
                        [19, 25]
                    ],
                    totalDataCodewords: 1171,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [11, 15],
                        [46, 16]
                    ],
                    totalDataCodewords: 901,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [13, 115],
                        [6, 116]
                    ],
                    totalDataCodewords: 2191,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [14, 46],
                        [23, 47]
                    ],
                    totalDataCodewords: 1725,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [44, 24],
                        [7, 25]
                    ],
                    totalDataCodewords: 1231,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [59, 16],
                        [1, 17]
                    ],
                    totalDataCodewords: 961,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [12, 121],
                        [7, 122]
                    ],
                    totalDataCodewords: 2306,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [12, 47],
                        [26, 48]
                    ],
                    totalDataCodewords: 1812,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [39, 24],
                        [14, 25]
                    ],
                    totalDataCodewords: 1286,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [22, 15],
                        [41, 16]
                    ],
                    totalDataCodewords: 986,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [6, 121],
                        [14, 122]
                    ],
                    totalDataCodewords: 2434,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [6, 47],
                        [34, 48]
                    ],
                    totalDataCodewords: 1914,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [46, 24],
                        [10, 25]
                    ],
                    totalDataCodewords: 1354,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [2, 15],
                        [64, 16]
                    ],
                    totalDataCodewords: 1054,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [17, 122],
                        [4, 123]
                    ],
                    totalDataCodewords: 2566,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [29, 46],
                        [14, 47]
                    ],
                    totalDataCodewords: 1992,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [49, 24],
                        [10, 25]
                    ],
                    totalDataCodewords: 1426,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [24, 15],
                        [46, 16]
                    ],
                    totalDataCodewords: 1096,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [4, 122],
                        [18, 123]
                    ],
                    totalDataCodewords: 2702,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [13, 46],
                        [32, 47]
                    ],
                    totalDataCodewords: 2102,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [48, 24],
                        [14, 25]
                    ],
                    totalDataCodewords: 1502,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [42, 15],
                        [32, 16]
                    ],
                    totalDataCodewords: 1142,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [20, 117],
                        [4, 118]
                    ],
                    totalDataCodewords: 2812,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [40, 47],
                        [7, 48]
                    ],
                    totalDataCodewords: 2216,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [43, 24],
                        [22, 25]
                    ],
                    totalDataCodewords: 1582,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [10, 15],
                        [67, 16]
                    ],
                    totalDataCodewords: 1222,
                    errorCodewordsPerBlock: 30
                }
            }, {
                L: {
                    groups: [
                        [19, 118],
                        [6, 119]
                    ],
                    totalDataCodewords: 2956,
                    errorCodewordsPerBlock: 30
                },
                M: {
                    groups: [
                        [18, 47],
                        [31, 48]
                    ],
                    totalDataCodewords: 2334,
                    errorCodewordsPerBlock: 28
                },
                Q: {
                    groups: [
                        [34, 24],
                        [34, 25]
                    ],
                    totalDataCodewords: 1666,
                    errorCodewordsPerBlock: 30
                },
                H: {
                    groups: [
                        [20, 15],
                        [61, 16]
                    ],
                    totalDataCodewords: 1276,
                    errorCodewordsPerBlock: 30
                }
            }],
            ce = [1, 0, 1, 1, 1],
            de = [1, 0, 1],
            ue = {
                L: "01",
                M: "00",
                Q: "11",
                H: "10"
            },
            he = "101010000010010",
            fe = "10100110111",
            pe = "1111100100101",
            me = ["11101100", "00010001"],
            ge = 93,
            ve = [function(e, t) {
                return (e + t) % 2 === 0
            }, function(e) {
                return e % 2 === 0
            }, function(e, t) {
                return t % 3 === 0
            }, function(e, t) {
                return (e + t) % 3 === 0
            }, function(e, t) {
                return (Math.floor(e / 2) + Math.floor(t / 3)) % 2 === 0
            }, function(e, t) {
                return e * t % 2 + e * t % 3 === 0
            }, function(e, t) {
                return (e * t % 2 + e * t % 3) % 2 === 0
            }, function(e, t) {
                return ((e + t) % 2 + e * t % 3) % 2 === 0
            }],
            _e = /^\d+/,
            be = "A-Z0-9 $%*+./:-",
            we = "A-Z $%*+./:-",
            ye = RegExp("^[" + we + "]+"),
            ke = RegExp("^[" + be + "]+"),
            xe = RegExp("^[^" + be + "]+"),
            Ce = 8,
            Se = 5,
            Te = 8,
            De = 17,
            Ae = 9,
            Ee = 16,
            Fe = Math.round,
            Ie = Y.Class.extend({
                getVersionIndex: function(e) {
                    return 10 > e ? 0 : e > 26 ? 2 : 1
                },
                getBitsCharacterCount: function(e) {
                    var t = this;
                    return t.bitsInCharacterCount[t.getVersionIndex(e || 40)]
                },
                getModeCountString: function(e, t) {
                    var n = this;
                    return n.modeIndicator + i(e, n.getBitsCharacterCount(t))
                },
                encode: function() {},
                getStringBitsLength: function() {},
                getValue: function() {},
                modeIndicator: "",
                bitsInCharacterCount: []
            }),
            Me = {};
        Me[te] = Ie.extend({
            bitsInCharacterCount: [10, 12, 14],
            modeIndicator: "0001",
            getValue: function(e) {
                return parseInt(e, 10)
            },
            encode: function(e, t) {
                var n, o = this,
                    a = r(e, 3),
                    s = o.getModeCountString(e.length, t);
                for (n = 0; a.length - 1 > n; n++) s += i(a[n], 10);
                return s + i(a[n], 1 + 3 * a[n].length)
            },
            getStringBitsLength: function(e, t) {
                var n = e % 3;
                return 4 + this.getBitsCharacterCount(t) + 10 * Math.floor(e / 3) + 3 * n + (0 === n ? 0 : 1)
            }
        }), Me[ne] = Ie.extend({
            characters: {
                0: 0,
                1: 1,
                2: 2,
                3: 3,
                4: 4,
                5: 5,
                6: 6,
                7: 7,
                8: 8,
                9: 9,
                A: 10,
                B: 11,
                C: 12,
                D: 13,
                E: 14,
                F: 15,
                G: 16,
                H: 17,
                I: 18,
                J: 19,
                K: 20,
                L: 21,
                M: 22,
                N: 23,
                O: 24,
                P: 25,
                Q: 26,
                R: 27,
                S: 28,
                T: 29,
                U: 30,
                V: 31,
                W: 32,
                X: 33,
                Y: 34,
                Z: 35,
                " ": 36,
                $: 37,
                "%": 38,
                "*": 39,
                "+": 40,
                "-": 41,
                ".": 42,
                "/": 43,
                ":": 44
            },
            bitsInCharacterCount: [9, 11, 13],
            modeIndicator: "0010",
            getValue: function(e) {
                return this.characters[e]
            },
            encode: function(e, t) {
                var n, o, a = this,
                    s = r(e, 2),
                    l = a.getModeCountString(e.length, t);
                for (o = 0; s.length - 1 > o; o++) n = 45 * a.getValue(s[o].charAt(0)) + a.getValue(s[o].charAt(1)), l += i(n, 11);
                return n = 2 == s[o].length ? 45 * a.getValue(s[o].charAt(0)) + a.getValue(s[o].charAt(1)) : a.getValue(s[o].charAt(0)), l + i(n, 1 + 5 * s[o].length)
            },
            getStringBitsLength: function(e, t) {
                return 4 + this.getBitsCharacterCount(t) + 11 * Math.floor(e / 2) + 6 * (e % 2)
            }
        }), Me[ie] = Ie.extend({
            bitsInCharacterCount: [8, 16, 16],
            modeIndicator: "0100",
            getValue: function(e) {
                var t = e.charCodeAt(0);
                if (127 >= t || t >= 160 && 255 >= t) return t;
                throw Error("Unsupported character: " + e)
            },
            encode: function(e, t) {
                var n, r = this,
                    o = r.getModeCountString(e.length, t);
                for (n = 0; e.length > n; n++) o += i(r.getValue(e.charAt(n)), 8);
                return o
            },
            getStringBitsLength: function(e, t) {
                return 4 + this.getBitsCharacterCount(t) + 8 * e
            }
        }), p = {};
        for (m in Me) p[m] = new Me[m];
        g = function(e) {
            var n = this,
                i = e.length - 1,
                r = e.length - 1,
                o = r,
                a = -1,
                s = 0;
            n.move = function() {
                i += a * s, s ^= 1, r = o - s
            }, n.getNextCell = function() {
                for (; e[i][r] !== t;) n.move(), (0 > i || i >= e.length) && (a = -a, o -= 8 != o ? 2 : 3, r = o, i = 0 > a ? e.length - 1 : 0);
                return {
                    row: i,
                    column: r
                }
            }, n.getNextRemainderCell = function() {
                return n.move(), e[i][r] === t ? {
                    row: i,
                    column: r
                } : t
            }
        }, v = function(e, t) {
            var n, i, r, o, s, l, c = new g(e[0]);
            for (o = 0; t.length > o; o++)
                for (n = t[o], i = 0; n.length > 0;) {
                    for (s = 0; n.length > s; s++)
                        for (l = 0; 8 > l; l++) r = c.getNextCell(), a(e, n[s][i].charAt(l), r.row, r.column);
                    for (i++; n[0] && i == n[0].length;) n.splice(0, 1)
                }
            for (; r = c.getNextRemainderCell();) a(e, 0, r.row, r.column)
        }, _ = function(e, t) {
            for (var n = 8 * t, i = 0, r = 0; n > e.length && ee.length > i;) e += ee.charAt(i++);
            for (e.length % 8 !== 0 && (e += Array(9 - e.length % 8).join("0")); n > e.length;) e += me[r], r ^= 1;
            return e
        }, b = function(e, t) {
            var n, i = [],
                r = e.length - 2;
            for (n = r; n >= 0; n--) i[n] = e[n] ^ t[n];
            return i
        }, w = function(e, n) {
            var i, r, o = [];
            for (i = 0; e.length > i; i++)
                for (r = 0; n.length > r; r++) o[i + r] = o[i + r] === t ? (e[i] + (n[r] >= 0 ? n[r] : 0)) % 255 : re[oe[o[i + r]] ^ oe[(e[i] + n[r]) % 255]];
            return o
        }, s(), l(), y = function(e, t) {
            var n, r, o = ae[t - 1],
                a = Array(t).concat(e),
                s = Array(a.length - o.length).concat(o),
                l = e.length,
                d = [];
            for (r = 0; l > r; r++) n = c(s, re[a[a.length - 1]]), s.splice(0, 1), a = b(n, a);
            for (r = a.length - 1; r >= 0; r--) d[t - 1 - r] = i(a[r], 8);
            return d
        }, k = function(e, t) {
            var i, r, o, a, s, l, c, d, u = 0,
                h = [],
                f = [],
                p = t.groups;
            for (l = 0; p.length > l; l++)
                for (o = p[l][0], c = 0; o > c; c++) {
                    for (r = p[l][1], i = [], a = [], d = 1; r >= d; d++) s = e.substring(u, u + 8), i.push(s), a[r - d] = n(s), u += 8;
                    h.push(i), f.push(y(a, t.errorCodewordsPerBlock))
                }
            return [h, f]
        }, x = function(e, t, n, i, r) {
            var o, a, s = _e.exec(e),
                l = s ? s[0] : "",
                c = ye.exec(e),
                d = c ? c[0] : "",
                u = ke.exec(e),
                h = u ? u[0] : "";
            return l && (l.length >= t || e.length == l.length || l.length >= n && !ke.test(e.charAt(l.length))) ? (o = te, a = l) : h && (e.length == h.length || h.length >= i || r == ne) ? (o = ne, a = l || d) : (o = ie, a = h ? h + xe.exec(e.substring(h.length))[0] : xe.exec(e)[0]), {
                mode: o,
                modeString: a
            }
        }, C = function(e) {
            var t, n, i = [],
                r = 0;
            for (i.push(x(e, Ce, Se, Te, t)), t = i[0].mode, e = e.substr(i[0].modeString.length); e.length > 0;) n = x(e, De, Ae, Ee, t), n.mode != t ? (t = n.mode, i.push(n), r++) : i[r].modeString += n.modeString, e = e.substr(n.modeString.length);
            return i
        }, S = function(e) {
            var t, n, i = 0;
            for (n = 0; e.length > n; n++) t = p[e[n].mode], i += t.getStringBitsLength(e[n].modeString.length);
            return Math.ceil(i / 8)
        }, T = function(e, t) {
            var n = 0,
                i = le.length - 1,
                r = Math.floor(le.length / 2);
            do le[r][t].totalDataCodewords > e ? i = r : n = r, r = n + Math.floor((i - n) / 2); while (i - n > 1);
            return le[n][t].totalDataCodewords >= e ? r + 1 : i + 1
        }, D = function(e, t) {
            var n, i, r = "";
            for (i = 0; e.length > i; i++) n = p[e[i].mode], r += n.encode(e[i].modeString, t);
            return r
        }, A = function(e) {
            var t, i, r = n(e),
                o = "";
            if (0 === r) return "101010000010010";
            for (t = E(n(e), fe, 15), i = 0; t.length > i; i++) o += t.charAt(i) ^ he.charAt(i);
            return o
        }, E = function(e, t, r) {
            var o = n(t),
                a = t.length - 1,
                s = e << a,
                l = r - a,
                c = i(e, l),
                d = F(s, o);
            return d = c + i(d, a)
        }, F = function(e, t) {
            var n = t.toString(2).length,
                i = e.toString(2).length;
            do e ^= t << i - n, i = e.toString(2).length; while (i >= n);
            return e
        }, I = function(e) {
            var t, n, i = [],
                r = 17 + 4 * e;
            for (t = 0; ve.length > t; t++)
                for (i[t] = Array(r), n = 0; r > n; n++) i[t][n] = Array(r);
            return i
        }, M = function(e, t) {
            var n, i, r = e[0],
                a = 0,
                s = t.length;
            for (n = 0, i = 8; 8 >= n; n++) 6 !== n && o(e, d(t, s - 1 - a++), n, i);
            for (n = 8, i = 7; i >= 0; i--) 6 !== i && o(e, d(t, s - 1 - a++), n, i);
            for (a = 0, i = r.length - 1, n = 8; i >= r.length - 8; i--) o(e, d(t, s - 1 - a++), n, i);
            for (o(e, 1, r.length - 8, 8), n = r.length - 7, i = 8; r.length > n; n++) o(e, d(t, s - 1 - a++), n, i)
        }, R = function(e) {
            return E(e, pe, 18)
        }, P = function(e, t) {
            var n, i, r, a, s = e[0],
                l = s.length,
                c = 0,
                u = l - 11,
                h = l - 11,
                f = 0;
            for (a = 0; t.length > a; a++) n = Math.floor(a / 3), i = a % 3, r = d(t, t.length - a - 1), o(e, r, c + n, u + i), o(e, r, h + i, f + n)
        }, z = function(e, t, n, i) {
            var r, a, s, l = t.length + 2,
                c = t.length + 1;
            for (a = 0; t.length > a; a++)
                for (s = a; l - a > s; s++) r = t[a], o(e, r, n + s, i + a), o(e, r, n + a, i + s), o(e, r, n + c - s, i + c - a), o(e, r, n + c - a, i + c - s)
        }, B = function(e, t, n, i) {
            var r = n,
                a = i,
                s = e[0];
            do o(e, 0, r, i), o(e, 0, n, a), r += t[0], a += t[1]; while (r >= 0 && s.length > r)
        }, L = function(e) {
            var t = e[0].length;
            z(e, ce, 0, 0), B(e, [-1, -1], 7, 7), z(e, ce, t - 7, 0), B(e, [1, -1], t - 8, 7), z(e, ce, 0, t - 7), B(e, [-1, 1], 7, t - 8)
        }, H = function(e, n) {
            var i, r, o, a, s, l, c, d, u;
            if (!(2 > n)) {
                for (i = e[0], r = i.length, o = Math.floor(n / 7), a = [6], c = 0, (s = se[n]) ? l = (r - 13 - s) / o : s = l = (r - 13) / (o + 1), a.push(a[c++] + s); r > a[c] + l;) a.push(a[c++] + l);
                for (d = 0; a.length > d; d++)
                    for (u = 0; a.length > u; u++) i[a[d]][a[u]] === t && z(e, de, a[d] - 2, a[u] - 2)
            }
        }, N = function(e) {
            var t, n = 6,
                i = 6,
                r = 1,
                a = e[0].length;
            for (t = 8; a - 8 > t; t++) o(e, r, n, t), o(e, r, t, i), r ^= 1
        }, O = function(e) {
            var t, n, i, r, o, a, s, l = [],
                c = [],
                d = [],
                p = [],
                m = [],
                g = 0,
                v = 1,
                _ = e[0].length;
            for (n = 0; e.length > n; n++) l[n] = 0, d[n] = 0, m[n] = [0, 0], p[n] = [0, 0], c[n] = [];
            for (n = 0; _ > n; n++)
                for (i = 0; _ > i; i++)
                    for (r = 0; e.length > r; r++) t = e[r], d[r] += parseInt(t[n][i], 10), c[r][g] === t[n][i] && _ > n + 1 && i - 1 >= 0 && t[n + 1][i] == c[r][g] && t[n + 1][i - 1] == c[r][g] && (l[r] += 3), u(r, p, l, g, t[n][i]), u(r, p, l, v, t[i][n]), h(r, l, c, t[n][i], m, g), h(r, l, c, t[i][n], m, v);
            for (o = _ * _, s = Number.MAX_VALUE, n = 0; l.length > n; n++) l[n] += f(d[n], o), s > l[n] && (s = l[n], a = n);
            return a
        }, V = function(e, t) {
            this.dataString = e, this.version = t
        }, U = function() {
            this.getEncodingResult = function(e, t) {
                var n = C(e),
                    i = S(n),
                    r = T(i, t),
                    o = D(n, r);
                return new V(o, r)
            }
        }, W = function() {
            this.mode = p[this.encodingMode]
        }, W.fn = W.prototype = {
            encodingMode: ie,
            utfBOM: "111011111011101110111111",
            initialModeCountStringLength: 20,
            getEncodingResult: function(e, t) {
                var n = this,
                    i = n.encode(e),
                    r = n.getDataCodewordsCount(i),
                    o = T(r, t),
                    a = n.mode.getModeCountString(i.length / 8, o) + i;
                return new V(a, o)
            },
            getDataCodewordsCount: function(e) {
                var t = this,
                    n = e.length,
                    i = Math.ceil((t.initialModeCountStringLength + n) / 8);
                return i
            },
            encode: function(e) {
                var t, n = this,
                    i = n.utfBOM;
                for (t = 0; e.length > t; t++) i += n.encodeCharacter(e.charCodeAt(t));
                return i
            },
            encodeCharacter: function(e) {
                var t, n, r = this.getBytesCount(e),
                    o = r - 1,
                    a = "";
                if (1 == r) a = i(e, 8);
                else {
                    for (t = 8 - r, n = 0; o > n; n++) a = i(e >> 6 * n & 63 | 128, 8) + a;
                    a = (e >> 6 * o | 255 >> t << t).toString(2) + a
                }
                return a
            },
            getBytesCount: function(e) {
                var t, n = this.ranges;
                for (t = 0; n.length > t; t++)
                    if (n[t] > e) return t + 1
            },
            ranges: [128, 2048, 65536, 2097152, 67108864]
        }, j = function(e) {
            return e && e.toLowerCase().indexOf("utf_8") >= 0 ? new W : new U
        }, q = function(e, t, n) {
            var r, o, a, s = new j(n),
                l = s.getEncodingResult(e, t),
                c = l.version,
                d = le[c - 1][t],
                u = _(l.dataString, d.totalDataCodewords),
                h = k(u, d),
                f = I(c);
            return L(f), H(f, c), N(f), c >= 7 && P(f, i(0, 18)), M(f, i(0, 15)), v(f, h), r = O(f), o = f[r], c >= 7 && P([o], R(c)), a = ue[t] + i(r, 3), M([o], A(a)), o
        }, G = {
            DEFAULT_SIZE: 200,
            QUIET_ZONE_LENGTH: 4,
            DEFAULT_ERROR_CORRECTION_LEVEL: "L",
            DEFAULT_BACKGROUND: "#fff",
            DEFAULT_DARK_MODULE_COLOR: "#000",
            MIN_BASE_UNIT_SIZE: 1
        }, $ = J.extend({
            init: function(t, n) {
                var i = this;
                J.fn.init.call(i, t, n), i.element = e(t), i.wrapper = i.element, i.element.addClass("k-qrcode"), i.surfaceWrap = e("<div />").css("position", "relative").appendTo(this.element), i.surface = Q.Surface.create(i.surfaceWrap, {
                    type: i.options.renderAs
                }), i.setOptions(n)
            },
            redraw: function() {
                var e = this._getSize();
                this.surfaceWrap.css({
                    width: e,
                    height: e
                }), this.surface.clear(), this.createVisual(), this.surface.draw(this.visual)
            },
            getSize: function() {
                return Y.dimensions(this.element)
            },
            _resize: function() {
                this.redraw()
            },
            createVisual: function() {
                this.visual = this._render()
            },
            exportVisual: function() {
                return this._render()
            },
            _render: function() {
                var e, t, n, i, r, o, a, s = this,
                    l = s._value,
                    c = s.options.border || {},
                    d = s.options.padding || 0,
                    u = c.width || 0;
                return c.width = u, a = new Q.Group, l && (n = q(l, s.options.errorCorrection, s.options.encoding), i = s._getSize(), o = i - 2 * (u + d), e = s._calculateBaseUnit(o, n.length), r = n.length * e, t = u + d + (o - r) / 2, a.append(s._renderBackground(i, c)), a.append(s._renderMatrix(n, e, t))), a
            },
            _getSize: function() {
                var e, t, n, i = this;
                return i.options.size ? e = parseInt(i.options.size, 10) : (t = i.element, n = Math.min(t.width(), t.height()), e = n > 0 ? n : G.DEFAULT_SIZE), e
            },
            _calculateBaseUnit: function(e, t) {
                var n = Math.floor(e / t);
                if (G.MIN_BASE_UNIT_SIZE > n) throw Error("Insufficient size.");
                return n * t >= e && n - 1 >= G.MIN_BASE_UNIT_SIZE && n--, n
            },
            _renderMatrix: function(e, t, n) {
                var i, r, o, a, s, l, c, d, u = new Q.MultiPath({
                    fill: {
                        color: this.options.color
                    },
                    stroke: null
                });
                for (i = 0; e.length > i; i++)
                    for (r = n + i * t, o = 0; e.length > o;) {
                        for (; 0 === e[i][o] && e.length > o;) o++;
                        if (e.length > o) {
                            for (a = o; 1 == e[i][o];) o++;
                            s = Fe(n + a * t), l = Fe(r), c = Fe(n + o * t), d = Fe(r + t), u.moveTo(s, l).lineTo(s, d).lineTo(c, d).lineTo(c, l).close()
                        }
                    }
                return u
            },
            _renderBackground: function(e, t) {
                var n = Z(0, 0, e, e).unpad(t.width / 2);
                return Q.Path.fromRect(n.toRect(), {
                    fill: {
                        color: this.options.background
                    },
                    stroke: {
                        color: t.color,
                        width: t.width
                    }
                })
            },
            setOptions: function(e) {
                var n = this;
                e = e || {}, n.options = K(n.options, e), e.value !== t && (n._value = n.options.value + ""), n.redraw()
            },
            value: function(e) {
                var n = this;
                return e === t ? n._value : (n._value = e + "", n.redraw(), t)
            },
            options: {
                name: "QRCode",
                renderAs: "svg",
                encoding: "ISO_8859_1",
                value: "",
                errorCorrection: G.DEFAULT_ERROR_CORRECTION_LEVEL,
                background: G.DEFAULT_BACKGROUND,
                color: G.DEFAULT_DARK_MODULE_COLOR,
                size: "",
                padding: 0,
                border: {
                    color: "",
                    width: 0
                }
            }
        }), X.ExportMixin.extend($.fn), X.ui.plugin($), Y.deepExtend(X, {
            QRCode: $,
            QRCodeDefaults: G,
            QRCodeFunctions: {
                FreeCellVisitor: g,
                fillData: v,
                padDataString: _,
                generateErrorCodewords: y,
                xorPolynomials: b,
                getBlocks: k,
                multiplyPolynomials: w,
                chooseMode: x,
                getModes: C,
                getDataCodewordsCount: S,
                getVersion: T,
                getDataString: D,
                encodeFormatInformation: A,
                encodeBCH: E,
                dividePolynomials: F,
                initMatrices: I,
                addFormatInformation: M,
                encodeVersionInformation: R,
                addVersionInformation: P,
                addCentricPattern: z,
                addFinderSeparator: B,
                addFinderPatterns: L,
                addAlignmentPatterns: H,
                addTimingFunctions: N,
                scoreMaskMatrixes: O,
                encodeData: q,
                UTF8Encoder: W
            },
            QRCodeFields: {
                modes: p,
                powersOfTwo: re,
                powersOfTwoResult: oe,
                generatorPolynomials: ae
            }
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.stock.min", ["kendo.dataviz.chart.min"], e)
}(function() {
    return function(e, t) {
        function n() {}

        function i(e) {
            return n.prototype = e, new n
        }
        var r, o = window.kendo,
            a = o.Class,
            s = o.Observable,
            l = o.deepExtend,
            c = Math,
            d = e.proxy,
            u = o.util,
            h = u.last,
            f = u.renderTemplate,
            p = o.dataviz,
            m = u.defined,
            g = p.filterSeriesByType,
            v = o.template,
            _ = p.ui.Chart,
            b = p.Selection,
            w = p.addDuration,
            y = u.limitValue,
            k = p.lteDateIndex,
            x = p.toDate,
            C = p.toTime,
            S = 28,
            T = "change",
            D = "k-",
            A = "drag",
            E = "dragEnd",
            F = "_navigator",
            I = F,
            M = p.EQUALLY_SPACED_SERIES,
            R = 3,
            P = "zoom",
            z = "zoomEnd",
            B = _.extend({
                init: function(t, n) {
                    e(t).addClass(D + "chart"), _.fn.init.call(this, t, n)
                },
                _applyDefaults: function(e, t) {
                    var n = this,
                        i = n.element.width() || p.DEFAULT_WIDTH,
                        r = {
                            seriesDefaults: {
                                categoryField: e.dateField
                            },
                            axisDefaults: {
                                categoryAxis: {
                                    name: "default",
                                    majorGridLines: {
                                        visible: !1
                                    },
                                    labels: {
                                        step: 2
                                    },
                                    majorTicks: {
                                        visible: !1
                                    },
                                    maxDateGroups: c.floor(i / S)
                                }
                            }
                        };
                    t && (t = l({}, t, r)), n._navigator || L.setup(e, t), _.fn._applyDefaults.call(n, e, t)
                },
                _initDataSource: function(e) {
                    var t, n, i = e || {},
                        r = i.dataSource,
                        o = r && r.serverFiltering,
                        a = [].concat(i.categoryAxis)[0],
                        s = i.navigator || {},
                        c = s.select,
                        d = c && c.from && c.to;
                    o && d && (t = [].concat(r.filter || []), n = new p.DateCategoryAxis(l({
                        baseUnit: "fit"
                    }, a, {
                        categories: [c.from, c.to]
                    })), r.filter = L.buildFilter(n.range().min, c.to).concat(t)), _.fn._initDataSource.call(this, e)
                },
                options: {
                    name: "StockChart",
                    dateField: "date",
                    axisDefaults: {
                        categoryAxis: {
                            type: "date",
                            baseUnit: "fit",
                            justified: !0
                        },
                        valueAxis: {
                            narrowRange: !0,
                            labels: {
                                format: "C"
                            }
                        }
                    },
                    navigator: {
                        select: {},
                        seriesDefaults: {
                            markers: {
                                visible: !1
                            },
                            tooltip: {
                                visible: !0,
                                template: "#= kendo.toString(category, 'd') #"
                            },
                            line: {
                                width: 2
                            }
                        },
                        hint: {},
                        visible: !0
                    },
                    tooltip: {
                        visible: !0
                    },
                    legend: {
                        visible: !1
                    }
                },
                _resize: function() {
                    var e = this.options.transitions;
                    this.options.transitions = !1, this._fullRedraw(), this.options.transitions = e
                },
                _redraw: function() {
                    var e = this,
                        t = e._navigator;
                    !this._dirty() && t && t.dataSource ? t.redrawSlaves() : e._fullRedraw()
                },
                _dirty: function() {
                    var t = this.options,
                        n = [].concat(t.series, t.navigator.series),
                        i = e.grep(n, function(e) {
                            return e && e.visible
                        }).length,
                        r = this._seriesCount !== i;
                    return this._seriesCount = i, r
                },
                _fullRedraw: function() {
                    var e = this,
                        t = e._navigator;
                    t || (t = e._navigator = new L(e)), t._setRange(), _.fn._redraw.call(e), t._initSelection()
                },
                _onDataChanged: function() {
                    var e = this;
                    _.fn._onDataChanged.call(e), e._dataBound = !0
                },
                _bindCategoryAxis: function(e, t, n) {
                    var i, r = this,
                        o = r.options.categoryAxis,
                        a = o.length;
                    if (_.fn._bindCategoryAxis.apply(this, arguments), e.name === I)
                        for (; a > n;) i = o[n++], i.pane == F && (i.categories = e.categories)
                },
                _trackSharedTooltip: function(e) {
                    var t = this,
                        n = t._plotArea,
                        i = n.paneByPoint(e);
                    i && i.options.name === F ? t._unsetActivePoint() : _.fn._trackSharedTooltip.call(t, e)
                },
                destroy: function() {
                    var e = this;
                    e._navigator.destroy(), _.fn.destroy.call(e)
                }
            }),
            L = s.extend({
                init: function(e) {
                    var t = this;
                    t.chart = e, t.options = l({}, t.options, e.options.navigator), t._initDataSource(), m(t.options.hint.visible) || (t.options.hint.visible = t.options.visible), e.bind(A, d(t._drag, t)), e.bind(E, d(t._dragEnd, t)), e.bind(P, d(t._zoom, t)), e.bind(z, d(t._zoomEnd, t))
                },
                options: {},
                _initDataSource: function() {
                    var e = this,
                        t = e.options,
                        n = t.autoBind,
                        i = t.dataSource;
                    m(n) || (n = e.chart.options.autoBind), e._dataChangedHandler = d(e._onDataChanged, e), i && (e.dataSource = o.data.DataSource.create(i).bind(T, e._dataChangedHandler), n && e.dataSource.fetch())
                },
                _onDataChanged: function() {
                    var e, t, n, i, r, o = this,
                        a = o.chart,
                        s = a.options.series,
                        l = s.length,
                        c = a.options.categoryAxis,
                        d = c.length,
                        u = o.dataSource.view();
                    for (e = 0; l > e; e++) n = s[e], n.axis == I && a._isBindable(n) && (n.data = u);
                    for (t = 0; d > t; t++) i = c[t], i.pane == F && (i.name == I ? (a._bindCategoryAxis(i, u, t), r = i.categories) : i.categories = r);
                    a._model && (o.redraw(), o.filterAxes(), (!a.options.dataSource || a.options.dataSource && a._dataBound) && o.redrawSlaves())
                },
                destroy: function() {
                    var e = this,
                        t = e.dataSource;
                    t && t.unbind(T, e._dataChangeHandler), e.selection && e.selection.destroy()
                },
                redraw: function() {
                    this._redrawSelf(), this._initSelection()
                },
                _initSelection: function() {
                    var t = this,
                        n = t.chart,
                        o = t.options,
                        a = t.mainAxis(),
                        s = i(a),
                        l = a.range(),
                        c = l.min,
                        d = l.max,
                        u = a.options.categories,
                        h = t.options.select,
                        f = t.selection,
                        p = x(h.from),
                        m = x(h.to);
                    0 !== u.length && (f && (f.destroy(), f.wrapper.remove()), s.box = a.box, f = t.selection = new b(n, s, {
                        min: c,
                        max: d,
                        from: p,
                        to: m,
                        selectStart: e.proxy(t._selectStart, t),
                        select: e.proxy(t._select, t),
                        selectEnd: e.proxy(t._selectEnd, t),
                        mousewheel: {
                            zoom: "left"
                        }
                    }), o.hint.visible && (t.hint = new r(n.element, {
                        min: c,
                        max: d,
                        template: o.hint.template,
                        format: o.hint.format
                    })))
                },
                _setRange: function() {
                    var e, t = this.chart._createPlotArea(!0),
                        n = t.namedCategoryAxes[I],
                        i = n.options,
                        r = n.range(),
                        o = r.min,
                        a = w(r.max, i.baseUnitStep, i.baseUnit),
                        s = this.options.select || {},
                        l = x(s.from) || o;
                    o > l && (l = o), e = x(s.to) || a, e > a && (e = a), this.options.select = {
                        from: l,
                        to: e
                    }, this.filterAxes()
                },
                _redrawSelf: function(e) {
                    var t = this.chart._plotArea;
                    t && t.redraw(h(t.panes), e)
                },
                redrawSlaves: function() {
                    var e = this,
                        t = e.chart,
                        n = t._plotArea,
                        i = n.panes.slice(0, -1);
                    n.srcSeries = t.options.series, n.redraw(i)
                },
                _drag: function(e) {
                    var t, n, i, r = this,
                        o = r.chart,
                        a = o._eventCoordinates(e.originalEvent),
                        s = r.mainAxis(),
                        l = s.datesRange(),
                        c = s.pane.box.containsPoint(a),
                        d = o._plotArea.categoryAxis,
                        u = e.axisRanges[d.options.name],
                        h = r.options.select,
                        f = r.selection;
                    u && !c && f && (t = h.from && h.to ? C(h.to) - C(h.from) : C(f.options.to) - C(f.options.from), n = x(y(C(u.min), l.min, C(l.max) - t)), i = x(y(C(n) + t, C(l.min) + t, l.max)), r.options.select = {
                        from: n,
                        to: i
                    }, r._liveDrag() && (r.filterAxes(), r.redrawSlaves()), f.set(n, i), r.showHint(n, i))
                },
                _dragEnd: function() {
                    var e = this;
                    e.filterAxes(), e.filterDataSource(), e.redrawSlaves(), e.hint && e.hint.hide()
                },
                _liveDrag: function() {
                    var e = o.support,
                        t = e.touch,
                        n = e.browser,
                        i = n.mozilla,
                        r = n.msie && 9 > n.version;
                    return !t && !i && !r
                },
                readSelection: function() {
                    var e = this,
                        t = e.selection,
                        n = t.options,
                        i = e.options.select;
                    i.from = n.from, i.to = n.to
                },
                filterAxes: function() {
                    var e, t, n = this,
                        i = n.options.select || {},
                        r = n.chart,
                        o = r.options.categoryAxis,
                        a = i.from,
                        s = i.to;
                    for (e = 0; o.length > e; e++) t = o[e], t.pane !== F && (t.min = x(a), t.max = x(s))
                },
                filterDataSource: function() {
                    var e, t = this,
                        n = t.options.select || {},
                        i = t.chart,
                        r = i.dataSource,
                        o = r && r.options.serverFiltering;
                    t.dataSource && o && (e = new p.DateCategoryAxis(l({
                        baseUnit: "fit"
                    }, i.options.categoryAxis[0], {
                        categories: [n.from, n.to]
                    })).options, r.filter(L.buildFilter(w(e.min, -e.baseUnitStep, e.baseUnit), w(e.max, e.baseUnitStep, e.baseUnit))))
                },
                _zoom: function(e) {
                    var t, n, i = this,
                        r = i.chart,
                        a = e.delta,
                        s = r._plotArea.categoryAxis,
                        l = i.options.select,
                        d = i.selection,
                        u = i.mainAxis().options.categories;
                    d && (t = k(d.options.from, u), n = k(d.options.to, u), e.originalEvent.preventDefault(), c.abs(a) > 1 && (a *= R), n - t > 1 ? (d.expand(a), i.readSelection()) : (s.options.min = l.from, l.from = s.scaleRange(-e.delta).min), o.support.touch || (i.filterAxes(), i.redrawSlaves()), d.set(l.from, l.to), i.showHint(i.options.select.from, i.options.select.to))
                },
                _zoomEnd: function(e) {
                    this._dragEnd(e)
                },
                showHint: function(e, t) {
                    var n = this,
                        i = n.chart,
                        r = i._plotArea;
                    n.hint && n.hint.show(e, t, r.backgroundBox())
                },
                _selectStart: function(e) {
                    var t = this.chart;
                    t._selectStart.call(t, e)
                },
                _select: function(e) {
                    var t = this,
                        n = t.chart;
                    t.showHint(e.from, e.to), n._select.call(n, e)
                },
                _selectEnd: function(e) {
                    var t = this,
                        n = t.chart;
                    t.hint && t.hint.hide(), t.readSelection(), t.filterAxes(), t.filterDataSource(), t.redrawSlaves(), n._selectEnd.call(n, e)
                },
                mainAxis: function() {
                    var e = this.chart._plotArea;
                    return e ? e.namedCategoryAxes[I] : t
                }
            });
        L.setup = function(e, t) {
            e = e || {}, t = t || {};
            var n = l({}, t.navigator, e.navigator),
                i = e.panes = [].concat(e.panes),
                r = l({}, n.pane, {
                    name: F
                });
            n.visible || (r.visible = !1, r.height = .1), i.push(r), L.attachAxes(e, n), L.attachSeries(e, n, t)
        }, L.attachAxes = function(e, t) {
            var n = t.series || [],
                i = e.categoryAxis = [].concat(e.categoryAxis),
                r = e.valueAxis = [].concat(e.valueAxis),
                o = g(n, M),
                a = 0 === o.length,
                s = l({
                    type: "date",
                    pane: F,
                    roundToBaseUnit: !a,
                    justified: a,
                    _collapse: !1,
                    majorTicks: {
                        visible: !0
                    },
                    tooltip: {
                        visible: !1
                    },
                    labels: {
                        step: 1
                    },
                    autoBind: !t.dataSource,
                    autoBaseUnitSteps: {
                        minutes: [1],
                        hours: [1, 2],
                        days: [1, 2],
                        weeks: [],
                        months: [1],
                        years: [1]
                    },
                    _overlap: !1
                }),
                c = t.categoryAxis;
            i.push(l({}, s, {
                maxDateGroups: 200
            }, c, {
                name: I,
                baseUnit: "fit",
                baseUnitStep: "auto",
                labels: {
                    visible: !1
                },
                majorTicks: {
                    visible: !1
                }
            }), l({}, s, c, {
                name: I + "_labels",
                maxDateGroups: 20,
                baseUnitStep: "auto",
                plotBands: [],
                autoBaseUnitSteps: {
                    minutes: []
                }
            }), l({}, s, c, {
                name: I + "_ticks",
                maxDateGroups: 200,
                majorTicks: {
                    width: .5
                },
                plotBands: [],
                labels: {
                    visible: !1,
                    mirror: !0
                }
            })), r.push(l({
                name: I,
                pane: F,
                majorGridLines: {
                    visible: !1
                },
                visible: !1
            }, t.valueAxis))
        }, L.attachSeries = function(e, t, n) {
            var i, r = e.series = e.series || [],
                o = [].concat(t.series || []),
                a = n.seriesColors,
                s = t.seriesDefaults;
            for (i = 0; o.length > i; i++) r.push(l({
                color: a[i % a.length],
                categoryField: t.dateField,
                visibleInLegend: !1,
                tooltip: {
                    visible: !1
                }
            }, s, o[i], {
                axis: I,
                categoryAxis: I,
                autoBind: !t.dataSource
            }))
        }, L.buildFilter = function(e, t) {
            return [{
                field: "Date",
                operator: "gte",
                value: x(e)
            }, {
                field: "Date",
                operator: "lt",
                value: x(t)
            }]
        }, r = a.extend({
            init: function(t, n) {
                var i = this;
                i.options = l({}, i.options, n), i.container = t, i.chartPadding = {
                    top: parseInt(t.css("paddingTop"), 10),
                    left: parseInt(t.css("paddingLeft"), 10)
                }, i.template = i.template, i.template || (i.template = i.template = f("<div class='" + D + "navigator-hint' style='display: none; position: absolute; top: 1px; left: 1px;'><div class='" + D + "tooltip " + D + "chart-tooltip'>&nbsp;</div><div class='" + D + "scroll' /></div>")), i.element = e(i.template()).appendTo(t)
            },
            options: {
                format: "{0:d} - {1:d}",
                hideDelay: 500
            },
            show: function(e, t, n) {
                var i, r = this,
                    a = x(C(e) + C(t - e) / 2),
                    s = r.options,
                    l = o.format(r.options.format, e, t),
                    c = r.element.find("." + D + "tooltip"),
                    d = r.element.find("." + D + "scroll"),
                    u = .4 * n.width(),
                    h = n.center().x - u,
                    f = n.center().x,
                    p = f - h,
                    m = s.max - s.min,
                    g = p / m,
                    _ = a - s.min;
                r._hideTimeout && clearTimeout(r._hideTimeout), r._visible || (r.element.stop(!1, !0).css("visibility", "hidden").show(), r._visible = !0), s.template && (i = v(s.template), l = i({
                    from: e,
                    to: t
                })), c.html(l).css({
                    left: n.center().x - c.outerWidth() / 2,
                    top: n.y1
                }), d.css({
                    width: u,
                    left: h + _ * g,
                    top: n.y1 + parseInt(c.css("margin-top"), 10) + parseInt(c.css("border-top-width"), 10) + c.height() / 2
                }), r.element.css("visibility", "visible")
            },
            hide: function() {
                var e = this;
                e._hideTimeout && clearTimeout(e._hideTimeout), e._hideTimeout = setTimeout(function() {
                    e._visible = !1, e.element.fadeOut("slow")
                }, e.options.hideDelay)
            }
        }), p.ui.plugin(B), l(p, {
            Navigator: L
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.sparkline.min", ["kendo.dataviz.chart.min"], e)
}(function() {
    return function(e, t) {
        function n(e) {
            return "number" == typeof e ? [e] : e
        }
        var i = window.kendo,
            r = i.dataviz,
            o = r.ui.Chart,
            a = i.data.ObservableArray,
            s = r.SharedTooltip,
            l = i.deepExtend,
            c = e.isArray,
            d = e.proxy,
            u = r.inArray,
            h = Math,
            f = "k-",
            p = 150,
            m = 150,
            g = "bar",
            v = "bullet",
            _ = "pie",
            b = "leave",
            w = [g, v],
            y = o.extend({
                init: function(t, i) {
                    var r = this,
                        s = r.stage = e("<span />"),
                        d = i || {};
                    t = e(t).addClass(f + "sparkline").empty().append(s), r._initialWidth = h.floor(t.width()), d = n(d), (c(d) || d instanceof a) && (d = {
                        seriesDefaults: {
                            data: d
                        }
                    }), d.series || (d.series = [{
                        data: n(d.data)
                    }]), l(d, {
                        seriesDefaults: {
                            type: d.type
                        }
                    }), (u(d.series[0].type, w) || u(d.seriesDefaults.type, w)) && (d = l({}, {
                        categoryAxis: {
                            crosshair: {
                                visible: !1
                            }
                        }
                    }, d)), o.fn.init.call(r, t, d)
                },
                options: {
                    name: "Sparkline",
                    chartArea: {
                        margin: 2
                    },
                    axisDefaults: {
                        visible: !1,
                        majorGridLines: {
                            visible: !1
                        },
                        valueAxis: {
                            narrowRange: !0
                        }
                    },
                    seriesDefaults: {
                        type: "line",
                        area: {
                            line: {
                                width: .5
                            }
                        },
                        bar: {
                            stack: !0
                        },
                        padding: 2,
                        width: .5,
                        overlay: {
                            gradient: null
                        },
                        highlight: {
                            visible: !1
                        },
                        border: {
                            width: 0
                        },
                        markers: {
                            size: 2,
                            visible: !1
                        }
                    },
                    tooltip: {
                        visible: !0,
                        shared: !0
                    },
                    categoryAxis: {
                        crosshair: {
                            visible: !0,
                            tooltip: {
                                visible: !1
                            }
                        }
                    },
                    legend: {
                        visible: !1
                    },
                    transitions: !1,
                    pointWidth: 5,
                    panes: [{
                        clip: !1
                    }]
                },
                _modelOptions: function() {
                    var t, n, i = this,
                        r = i.options,
                        o = i._initialWidth,
                        a = i.stage;
                    return i.stage.children().hide(), n = e("<span>&nbsp;</span>"), i.stage.append(n), t = l({
                        width: o ? o : i._autoWidth(),
                        height: a.height(),
                        transitions: r.transitions
                    }, r.chartArea, {
                        inline: !0,
                        align: !1
                    }), a.css({
                        width: t.width,
                        height: t.height
                    }), n.remove(), i.stage.children().show(), i.surface.resize(), t
                },
                _createTooltip: function() {
                    var e, t = this,
                        n = t.options,
                        i = t.element;
                    return e = t._sharedTooltip() ? new k(i, t._plotArea, n.tooltip) : o.fn._createTooltip.call(t), e.bind(b, d(t._tooltipleave, t)), e
                },
                _surfaceWrap: function() {
                    return this.stage
                },
                _autoWidth: function() {
                    var e, t, n, i = this,
                        o = i.options,
                        a = r.getSpacing(o.chartArea.margin),
                        s = o.series,
                        l = i.dataSource.total(),
                        c = 0;
                    for (t = 0; s.length > t; t++) {
                        if (n = s[t], n.type === g) return p;
                        if (n.type === v) return m;
                        if (n.type === _) return i.stage.height();
                        n.data && (c = h.max(c, n.data.length))
                    }
                    return e = h.max(l, c) * o.pointWidth, e > 0 && (e += a.left + a.right), e
                }
            }),
            k = s.extend({
                options: {
                    animation: {
                        duration: 0
                    }
                },
                _anchor: function(e, t) {
                    var n = s.fn._anchor.call(this, e, t),
                        i = this._measure();
                    return n.y = -i.height - this.options.offset, n
                },
                _hideElement: function() {
                    this.element && this.element.hide().remove()
                }
            });
        r.ui.plugin(y), l(r, {
            SparklineSharedTooltip: k
        })
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/map/location.min", ["kendo.drawing.min"], e)
}(function() {
    ! function(e, t) {
        var n, i = Math,
            r = i.abs,
            o = i.atan,
            a = i.atan2,
            s = i.cos,
            l = i.max,
            c = i.min,
            d = i.sin,
            u = i.tan,
            h = window.kendo,
            f = h.Class,
            p = h.dataviz,
            m = h.deepExtend,
            g = h.util,
            v = g.defined,
            _ = g.deg,
            b = g.rad,
            w = g.round,
            y = g.sqr,
            k = g.valueOrDefault,
            x = f.extend({
                init: function(e, t) {
                    1 === arguments.length ? (this.lat = e[0], this.lng = e[1]) : (this.lat = e, this.lng = t)
                },
                DISTANCE_ITERATIONS: 100,
                DISTANCE_CONVERGENCE: 1e-12,
                DISTANCE_PRECISION: 2,
                FORMAT: "{0:N6},{1:N6}",
                toArray: function() {
                    return [this.lat, this.lng]
                },
                equals: function(e) {
                    return e && e.lat === this.lat && e.lng === this.lng
                },
                clone: function() {
                    return new x(this.lat, this.lng)
                },
                round: function(e) {
                    return this.lng = w(this.lng, e), this.lat = w(this.lat, e), this
                },
                wrap: function() {
                    return this.lng = this.lng % 180, this.lat = this.lat % 90, this
                },
                distanceTo: function(e, t) {
                    return this.greatCircleTo(e, t).distance
                },
                destination: function(e, t, n) {
                    var r, o, l, c, u;
                    return t = b(t), n = n || p.map.datums.WGS84, r = b(this.lat), o = b(this.lng), l = e / h.dataviz.map.datums.WGS84.a, c = i.asin(d(r) * s(l) + s(r) * d(l) * s(t)), u = o + a(d(t) * d(l) * s(r), s(l) - d(r) * d(c)), new x(_(c), _(u))
                },
                greatCircleTo: function(e, t) {
                    var n, l, c, h, f, m, g, v, k, C, S, T, D, A, E, F, I, M, R, P, z, B, L, H, N, O, V, U, W;
                    if (e = x.create(e), t = t || p.map.datums.WGS84, !e || this.clone().round(8).equals(e.clone().round(8))) return {
                        distance: 0,
                        azimuthFrom: 0,
                        azimuthTo: 0
                    };
                    for (n = t.a, l = t.b, c = t.f, h = b(e.lng - this.lng), f = o((1 - c) * u(b(this.lat))), m = d(f), g = s(f), v = o((1 - c) * u(b(e.lat))), k = d(v), C = s(v), S = h, D = this.DISTANCE_ITERATIONS, A = !1; !A && D-- > 0;) E = d(S), F = s(S), I = i.sqrt(y(C * E) + y(g * k - m * C * F)), R = m * k + g * C * F, z = a(I, R), B = g * C * E / I, M = 1 - y(B), P = 0, 0 !== M && (P = R - 2 * m * k / M), T = S, L = c / 16 * M * (4 + c * (4 - 3 * M)), S = h + (1 - L) * c * B * (z + L * I * (P + L * R * (-1 + 2 * y(P)))), A = r(S - T) <= this.DISTANCE_CONVERGENCE;
                    return H = M * (y(n) - y(l)) / y(l), N = 1 + H / 16384 * (4096 + H * (-768 + H * (320 - 175 * H))), O = H / 1024 * (256 + H * (-128 + H * (74 - 47 * H))), V = O * I * (P + O / 4 * (R * (-1 + 2 * y(P)) - O / 6 * P * (-3 + 4 * y(I)) * (-3 + 4 * y(P)))), U = a(C * E, g * k - m * C * F), W = a(g * E, -m * C + g * k * F), {
                        distance: w(l * N * (z - V), this.DISTANCE_PRECISION),
                        azimuthFrom: _(U),
                        azimuthTo: _(W)
                    }
                }
            });
        x.fn.toString = function() {
            return h.format(this.FORMAT, this.lat, this.lng)
        }, x.fromLngLat = function(e) {
            return new x(e[1], e[0])
        }, x.fromLatLng = function(e) {
            return new x(e[0], e[1])
        }, x.create = function(e, n) {
            return v(e) ? e instanceof x ? e.clone() : 1 === arguments.length && 2 === e.length ? x.fromLatLng(e) : new x(e, n) : t
        }, n = f.extend({
            init: function(e, t) {
                e = x.create(e), t = x.create(t), e.lng + 180 > t.lng + 180 && t.lat + 90 > e.lat + 90 ? (this.se = e, this.nw = t) : (this.se = t, this.nw = e)
            },
            contains: function(e) {
                var t = this.nw,
                    n = this.se,
                    i = k(e.lng, e[1]),
                    r = k(e.lat, e[0]);
                return e && i + 180 >= t.lng + 180 && n.lng + 180 >= i + 180 && r + 90 >= n.lat + 90 && t.lat + 90 >= r + 90
            },
            center: function() {
                var e = this.nw,
                    t = this.se,
                    n = e.lng + (t.lng - e.lng) / 2,
                    i = e.lat + (t.lat - e.lat) / 2;
                return new x(i, n)
            },
            containsAny: function(e) {
                var t, n = !1;
                for (t = 0; e.length > t; t++) n = n || this.contains(e[t]);
                return n
            },
            include: function(e) {
                var t = this.nw,
                    n = this.se,
                    i = k(e.lng, e[1]),
                    r = k(e.lat, e[0]);
                t.lng = c(t.lng, i), t.lat = l(t.lat, r), n.lng = l(n.lng, i), n.lat = c(n.lat, r)
            },
            includeAll: function(e) {
                for (var t = 0; e.length > t; t++) this.include(e[t])
            },
            edges: function() {
                var e = this.nw,
                    t = this.se;
                return {
                    nw: this.nw,
                    ne: new x(e.lat, t.lng),
                    se: this.se,
                    sw: new x(t.lat, e.lng)
                }
            },
            toArray: function() {
                var e = this.nw,
                    t = this.se;
                return [e, new x(e.lat, t.lng), t, new x(t.lat, e.lng)]
            },
            overlaps: function(e) {
                return this.containsAny(e.toArray()) || e.containsAny(this.toArray())
            }
        }), n.World = new n([90, -180], [-90, 180]), n.create = function(e, i) {
            return e instanceof n ? e : e && i ? new n(e, i) : e && 4 === e.length && !i ? new n([e[0], e[1]], [e[2], e[3]]) : t
        }, m(p, {
            map: {
                Extent: n,
                Location: x
            }
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/map/attribution.min", ["kendo.drawing.min"], e)
}(function() {
    ! function() {
        var e = window.kendo,
            t = e.ui.Widget,
            n = e.template,
            i = e.util.valueOrDefault,
            r = e.util.defined,
            o = t.extend({
                init: function(e, n) {
                    t.fn.init.call(this, e, n), this._initOptions(n), this.items = [], this.element.addClass("k-widget k-attribution")
                },
                options: {
                    name: "Attribution",
                    separator: "&nbsp;|&nbsp;",
                    itemTemplate: "#= text #"
                },
                filter: function(e, t) {
                    this._extent = e, this._zoom = t, this._render()
                },
                add: function(e) {
                    r(e) && ("string" == typeof e && (e = {
                        text: e
                    }), this.items.push(e), this._render())
                },
                remove: function(e) {
                    var t, n, i = [];
                    for (t = 0; this.items.length > t; t++) n = this.items[t], n.text !== e && i.push(n);
                    this.items = i, this._render()
                },
                clear: function() {
                    this.items = [], this.element.empty()
                },
                _render: function() {
                    var e, t, i, r = [],
                        o = n(this.options.itemTemplate);
                    for (e = 0; this.items.length > e; e++) t = this.items[e], i = this._itemText(t), "" !== i && r.push(o({
                        text: i
                    }));
                    r.length > 0 ? this.element.empty().append(r.join(this.options.separator)).show() : this.element.hide()
                },
                _itemText: function(e) {
                    var t = "",
                        n = this._inZoomLevel(e.minZoom, e.maxZoom),
                        i = this._inArea(e.extent);
                    return n && i && (t += e.text), t
                },
                _inZoomLevel: function(e, t) {
                    var n = !0;
                    return e = i(e, -Number.MAX_VALUE), t = i(t, Number.MAX_VALUE), n = this._zoom > e && t > this._zoom
                },
                _inArea: function(e) {
                    var t = !0;
                    return e && (t = e.contains(this._extent)), t
                }
            });
        e.dataviz.ui.plugin(o)
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/map/navigator.min", ["kendo.core.min"], e)
}(function() {
    ! function(e) {
        function t(e) {
            return n.format('<button class="k-button k-navigator-{0}"><span class="k-icon k-i-arrow-{0}"/></button>', e)
        }
        var n = window.kendo,
            i = n.ui.Widget,
            r = n.keys,
            o = e.proxy,
            a = ".kendoNavigator",
            s = t("n") + t("e") + t("s") + t("w"),
            l = i.extend({
                init: function(e, t) {
                    i.fn.init.call(this, e, t), this._initOptions(t), this.element.addClass("k-widget k-header k-shadow k-navigator").append(s).on("click" + a, ".k-button", o(this, "_click"));
                    var r = this.element.parent().closest("[" + n.attr("role") + "]");
                    this._keyroot = r.length > 0 ? r : this.element, this._tabindex(this._keyroot), this._keydown = o(this._keydown, this), this._keyroot.on("keydown", this._keydown)
                },
                options: {
                    name: "Navigator",
                    panStep: 1
                },
                events: ["pan"],
                dispose: function() {
                    this._keyroot.off("keydown", this._keydown)
                },
                _pan: function(e, t) {
                    var n = this.options.panStep;
                    this.trigger("pan", {
                        x: e * n,
                        y: t * n
                    })
                },
                _click: function(t) {
                    var n = 0,
                        i = 0,
                        r = e(t.currentTarget);
                    r.is(".k-navigator-n") ? i = 1 : r.is(".k-navigator-s") ? i = -1 : r.is(".k-navigator-e") ? n = 1 : r.is(".k-navigator-w") && (n = -1), this._pan(n, i), t.preventDefault()
                },
                _keydown: function(e) {
                    switch (e.which) {
                        case r.UP:
                            this._pan(0, 1), e.preventDefault();
                            break;
                        case r.DOWN:
                            this._pan(0, -1), e.preventDefault();
                            break;
                        case r.RIGHT:
                            this._pan(1, 0), e.preventDefault();
                            break;
                        case r.LEFT:
                            this._pan(-1, 0), e.preventDefault()
                    }
                }
            });
        n.dataviz.ui.plugin(l)
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/map/zoom.min", ["kendo.core.min"], e)
}(function() {
    ! function(e) {
        function t(e, t) {
            return n.format('<button class="k-button k-zoom-{0}" title="zoom-{0}">{1}</button>', e, t)
        }
        var n = window.kendo,
            i = n.ui.Widget,
            r = n.keys,
            o = e.proxy,
            a = ".kendoZoomControl",
            s = t("in", "+") + t("out", "-"),
            l = 187,
            c = 189,
            d = 61,
            u = 173,
            h = i.extend({
                init: function(e, t) {
                    i.fn.init.call(this, e, t), this._initOptions(t), this.element.addClass("k-widget k-zoom-control k-button-wrap k-buttons-horizontal").append(s).on("click" + a, ".k-button", o(this, "_click"));
                    var r = this.element.parent().closest("[" + n.attr("role") + "]");
                    this._keyroot = r.length > 0 ? r : this.element, this._tabindex(this._keyroot), this._keydown = o(this._keydown, this), this._keyroot.on("keydown", this._keydown)
                },
                options: {
                    name: "ZoomControl",
                    zoomStep: 1
                },
                events: ["change"],
                _change: function(e) {
                    var t = this.options.zoomStep;
                    this.trigger("change", {
                        delta: e * t
                    })
                },
                _click: function(t) {
                    var n = e(t.currentTarget),
                        i = 1;
                    n.is(".k-zoom-out") && (i = -1), this._change(i), t.preventDefault()
                },
                _keydown: function(e) {
                    switch (e.which) {
                        case r.NUMPAD_PLUS:
                        case l:
                        case d:
                            this._change(1);
                            break;
                        case r.NUMPAD_MINUS:
                        case c:
                        case u:
                            this._change(-1)
                    }
                }
            });
        n.dataviz.ui.plugin(h)
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/map/crs.min", ["dataviz/map/location.min", "kendo.drawing.min"], e)
}(function() {
    ! function(e, t) {
        var n = Math,
            i = n.atan,
            r = n.exp,
            o = n.pow,
            a = n.sin,
            s = n.log,
            l = n.tan,
            c = window.kendo,
            d = c.Class,
            u = c.dataviz,
            h = c.deepExtend,
            f = c.geometry,
            p = f.Point,
            m = u.map,
            g = m.Location,
            v = c.util,
            _ = v.rad,
            b = v.deg,
            w = v.limitValue,
            y = n.PI,
            k = y / 2,
            x = y / 4,
            C = y / 180,
            S = {
                a: 6378137,
                b: 6356752.314245179,
                f: .0033528106647474805,
                e: .08181919084262149
            },
            T = d.extend({
                init: function(e) {
                    this._initOptions(e)
                },
                MAX_LNG: 180,
                MAX_LAT: 85.0840590501,
                INVERSE_ITERATIONS: 15,
                INVERSE_CONVERGENCE: 1e-12,
                options: {
                    centralMeridian: 0,
                    datum: S
                },
                forward: function(e, t) {
                    var n = this,
                        i = n.options,
                        r = i.datum,
                        o = r.a,
                        a = i.centralMeridian,
                        s = w(e.lat, -n.MAX_LAT, n.MAX_LAT),
                        l = t ? w(e.lng, -n.MAX_LNG, n.MAX_LNG) : e.lng,
                        c = _(l - a) * o,
                        d = n._projectLat(s);
                    return new p(c, d)
                },
                _projectLat: function(e) {
                    var t = this.options.datum,
                        n = t.e,
                        i = t.a,
                        r = _(e),
                        c = l(x + r / 2),
                        d = n * a(r),
                        u = o((1 - d) / (1 + d), n / 2);
                    return i * s(c * u)
                },
                inverse: function(e, t) {
                    var n = this,
                        i = n.options,
                        r = i.datum,
                        o = r.a,
                        a = i.centralMeridian,
                        s = e.x / (C * o) + a,
                        l = w(n._inverseY(e.y), -n.MAX_LAT, n.MAX_LAT);
                    return t && (s = w(s, -n.MAX_LNG, n.MAX_LNG)), new g(l, s)
                },
                _inverseY: function(e) {
                    var t, s, l, c, d = this,
                        u = d.options.datum,
                        h = u.a,
                        f = u.e,
                        p = f / 2,
                        m = r(-e / h),
                        g = k - 2 * i(m);
                    for (t = 0; d.INVERSE_ITERATIONS >= t && (s = f * a(g), l = o((1 - s) / (1 + s), p), c = k - 2 * i(m * l) - g, g += c, !(n.abs(c) <= d.INVERSE_CONVERGENCE)); t++);
                    return b(g)
                }
            }),
            D = T.extend({
                MAX_LAT: 85.0511287798,
                _projectLat: function(e) {
                    var t = this.options.datum.a,
                        n = _(e),
                        i = l(x + n / 2);
                    return t * s(i)
                },
                _inverseY: function(e) {
                    var t = this.options.datum.a,
                        n = r(-e / t);
                    return b(k - 2 * i(n))
                }
            }),
            A = d.extend({
                forward: function(e) {
                    return new p(e.lng, e.lat)
                },
                inverse: function(e) {
                    return new g(e.y, e.x)
                }
            }),
            E = d.extend({
                init: function() {
                    var e = this,
                        t = e._proj = new D,
                        n = this.c = 2 * y * t.options.datum.a;
                    this._tm = f.transform().translate(.5, .5).scale(1 / n, -1 / n), this._itm = f.transform().scale(n, -n).translate(-.5, -.5)
                },
                toPoint: function(e, t, n) {
                    var i = this._proj.forward(e, n);
                    return i.transform(this._tm).scale(t || 1)
                },
                toLocation: function(e, t, n) {
                    return e = e.clone().scale(1 / (t || 1)).transform(this._itm), this._proj.inverse(e, n)
                }
            }),
            F = d.extend({
                init: function() {
                    this._proj = new T
                },
                toPoint: function(e) {
                    return this._proj.forward(e)
                },
                toLocation: function(e) {
                    return this._proj.inverse(e)
                }
            }),
            I = d.extend({
                init: function() {
                    this._proj = new A
                },
                toPoint: function(e) {
                    return this._proj.forward(e)
                },
                toLocation: function(e) {
                    return this._proj.inverse(e)
                }
            });
        h(u, {
            map: {
                crs: {
                    EPSG3395: F,
                    EPSG3857: E,
                    EPSG4326: I
                },
                datums: {
                    WGS84: S
                },
                projections: {
                    Equirectangular: A,
                    Mercator: T,
                    SphericalMercator: D
                }
            }
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/map/layers/base.min", ["kendo.core.min", "dataviz/map/location.min"], e)
}(function() {
    ! function(e, t) {
        var n = e.proxy,
            i = window.kendo,
            r = i.Class,
            o = i.dataviz,
            a = i.deepExtend,
            s = o.map.Extent,
            l = i.util,
            c = l.defined,
            d = r.extend({
                init: function(t, i) {
                    this._initOptions(i), this.map = t, this.element = e("<div class='k-layer'></div>").css({
                        zIndex: this.options.zIndex,
                        opacity: this.options.opacity
                    }).appendTo(t.scrollElement), this._beforeReset = n(this._beforeReset, this), this._reset = n(this._reset, this), this._resize = n(this._resize, this), this._panEnd = n(this._panEnd, this), this._activate(), this._updateAttribution()
                },
                destroy: function() {
                    this._deactivate()
                },
                show: function() {
                    this.reset(), this._activate(), this._applyExtent(!0)
                },
                hide: function() {
                    this._deactivate(), this._setVisibility(!1)
                },
                reset: function() {
                    this._beforeReset(), this._reset()
                },
                _reset: function() {
                    this._applyExtent()
                },
                _beforeReset: e.noop,
                _resize: e.noop,
                _panEnd: function() {
                    this._applyExtent()
                },
                _applyExtent: function() {
                    var e = this.options,
                        t = this.map.zoom(),
                        n = !c(e.minZoom) || t >= e.minZoom,
                        i = !c(e.maxZoom) || e.maxZoom >= t,
                        r = s.create(e.extent),
                        o = !r || r.overlaps(this.map.extent());
                    this._setVisibility(n && i && o)
                },
                _setVisibility: function(e) {
                    this.element.css("display", e ? "" : "none")
                },
                _activate: function() {
                    var e = this.map;
                    e.bind("beforeReset", this._beforeReset), e.bind("reset", this._reset), e.bind("resize", this._resize), e.bind("panEnd", this._panEnd)
                },
                _deactivate: function() {
                    var e = this.map;
                    e.unbind("beforeReset", this._beforeReset), e.unbind("reset", this._reset), e.unbind("resize", this._resize), e.unbind("panEnd", this._panEnd)
                },
                _updateAttribution: function() {
                    var e = this.map.attribution;
                    e && e.add(this.options.attribution)
                }
            });
        a(o, {
            map: {
                layers: {
                    Layer: d
                }
            }
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/map/layers/shape.min", ["dataviz/map/layers/base.min", "dataviz/map/location.min"], e)
}(function() {
    ! function(e, t) {
        var n = e.proxy,
            i = window.kendo,
            r = i.Class,
            o = i.data.DataSource,
            a = i.dataviz,
            s = i.deepExtend,
            l = i.util.last,
            c = i.util.defined,
            d = i.geometry,
            u = i.drawing,
            h = u.Group,
            f = a.map,
            p = f.Location,
            m = f.layers.Layer,
            g = m.extend({
                init: function(e, t) {
                    m.fn.init.call(this, e, t), this.surface = u.Surface.create(this.element, {
                        width: e.scrollElement.width(),
                        height: e.scrollElement.height()
                    }), this._initRoot(), this.movable = new i.ui.Movable(this.surface.element), this._markers = [], this._click = this._handler("shapeClick"), this.surface.bind("click", this._click), this._mouseenter = this._handler("shapeMouseEnter"), this.surface.bind("mouseenter", this._mouseenter), this._mouseleave = this._handler("shapeMouseLeave"), this.surface.bind("mouseleave", this._mouseleave), this._initDataSource()
                },
                options: {
                    autoBind: !0
                },
                destroy: function() {
                    m.fn.destroy.call(this), this.surface.destroy(), this.dataSource.unbind("change", this._dataChange)
                },
                setDataSource: function(e) {
                    this.dataSource && this.dataSource.unbind("change", this._dataChange), this.dataSource = i.data.DataSource.create(e), this.dataSource.bind("change", this._dataChange), this.options.autoBind && this.dataSource.fetch()
                },
                _reset: function() {
                    m.fn._reset.call(this), this._translateSurface(), this._data && this._load(this._data)
                },
                _initRoot: function() {
                    this._root = new h, this.surface.draw(this._root)
                },
                _beforeReset: function() {
                    this.surface.clear(), this._initRoot()
                },
                _resize: function() {
                    this.surface.size(this.map.size())
                },
                _initDataSource: function() {
                    var e = this.options.dataSource;
                    this._dataChange = n(this._dataChange, this), this.dataSource = o.create(e).bind("change", this._dataChange), e && this.options.autoBind && this.dataSource.fetch()
                },
                _dataChange: function(e) {
                    this._data = e.sender.view(), this._load(this._data)
                },
                _load: function(e) {
                    var t, n, i;
                    for (this._clearMarkers(), this._loader || (this._loader = new v(this.map, this.options.style, this)), t = new h, n = 0; e.length > n; n++) i = this._loader.parse(e[n]), i && t.append(i);
                    this._root.clear(), this._root.append(t)
                },
                shapeCreated: function(e) {
                    var t, n = !1;
                    return e instanceof u.Circle && (n = c(this._createMarker(e))), n || (t = {
                        layer: this,
                        shape: e
                    }, n = this.map.trigger("shapeCreated", t)), n
                },
                _createMarker: function(e) {
                    var t = this.map.markers.bind({
                        location: e.location
                    }, e.dataItem);
                    return t && this._markers.push(t), t
                },
                _clearMarkers: function() {
                    for (var e = 0; this._markers.length > e; e++) this.map.markers.remove(this._markers[e]);
                    this._markers = []
                },
                _panEnd: function(e) {
                    m.fn._panEnd.call(this, e), this._translateSurface()
                },
                _translateSurface: function() {
                    var e = this.map,
                        t = e.locationToView(e.extent().nw);
                    this.surface.translate && (this.surface.translate(t), this.movable.moveTo({
                        x: t.x,
                        y: t.y
                    }))
                },
                _handler: function(e) {
                    var t = this;
                    return function(n) {
                        if (n.element) {
                            var i = {
                                layer: t,
                                shape: n.element,
                                originalEvent: n.originalEvent
                            };
                            t.map.trigger(e, i)
                        }
                    }
                }
            }),
            v = r.extend({
                init: function(e, t, n) {
                    this.observer = n, this.locator = e, this.style = t
                },
                parse: function(e) {
                    var t = new h;
                    return "Feature" === e.type ? this._loadGeometryTo(t, e.geometry, e) : this._loadGeometryTo(t, e, e), 2 > t.children.length && (t = t.children[0]), t
                },
                _shapeCreated: function(e) {
                    var t = !1;
                    return this.observer && this.observer.shapeCreated && (t = this.observer.shapeCreated(e)), t
                },
                _loadGeometryTo: function(e, t, n) {
                    var i, r, o = t.coordinates;
                    switch (t.type) {
                        case "LineString":
                            r = this._loadPolygon(e, [o], n), this._setLineFill(r);
                            break;
                        case "MultiLineString":
                            for (i = 0; o.length > i; i++) r = this._loadPolygon(e, [o[i]], n), this._setLineFill(r);
                            break;
                        case "Polygon":
                            this._loadPolygon(e, o, n);
                            break;
                        case "MultiPolygon":
                            for (i = 0; o.length > i; i++) this._loadPolygon(e, o[i], n);
                            break;
                        case "Point":
                            this._loadPoint(e, o, n);
                            break;
                        case "MultiPoint":
                            for (i = 0; o.length > i; i++) this._loadPoint(e, o[i], n)
                    }
                },
                _setLineFill: function(e) {
                    var t = e.segments;
                    (4 > t.length || !t[0].anchor().equals(l(t).anchor())) && (e.options.fill = null)
                },
                _loadShape: function(e, t) {
                    return this._shapeCreated(t) || e.append(t), t
                },
                _loadPolygon: function(e, t, n) {
                    var i = this._buildPolygon(t);
                    return i.dataItem = n, this._loadShape(e, i)
                },
                _buildPolygon: function(e) {
                    var t, n, i, r = e.length > 1 ? u.MultiPath : u.Path,
                        o = new r(this.style);
                    for (t = 0; e.length > t; t++)
                        for (n = 0; e[t].length > n; n++) i = this.locator.locationToView(p.fromLngLat(e[t][n])), 0 === n ? o.moveTo(i.x, i.y) : o.lineTo(i.x, i.y);
                    return o
                },
                _loadPoint: function(e, t, n) {
                    var i = p.fromLngLat(t),
                        r = this.locator.locationToView(i),
                        o = new d.Circle(r, 10),
                        a = new u.Circle(o, this.style);
                    return a.dataItem = n, a.location = i, this._loadShape(e, a)
                }
            });
        s(i.data, {
            schemas: {
                geojson: {
                    type: "json",
                    data: function(e) {
                        return "FeatureCollection" === e.type ? e.features : "GeometryCollection" === e.type ? e.geometries : e
                    }
                }
            },
            transports: {
                geojson: {
                    read: {
                        dataType: "json"
                    }
                }
            }
        }), s(a, {
            map: {
                layers: {
                    shape: g,
                    ShapeLayer: g
                },
                GeoJSONLoader: v
            }
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/map/layers/bubble.min", ["dataviz/map/layers/shape.min"], e)
}(function() {
    ! function(e, t) {
        var n = window.kendo,
            i = n.getter,
            r = n.dataviz,
            o = n.deepExtend,
            a = n.util,
            s = a.defined,
            l = n.geometry,
            c = n.drawing,
            d = r.map,
            u = d.Location,
            h = d.layers.ShapeLayer,
            f = h.extend({
                options: {
                    autoBind: !0,
                    locationField: "location",
                    valueField: "value",
                    minSize: 0,
                    maxSize: 100,
                    scale: "sqrt",
                    symbol: "circle"
                },
                _load: function(e) {
                    var t, n, r, o, a, l, c, d, h, f, p;
                    if (this.surface.clear(), 0 !== e.length)
                        for (t = this.options, n = i(t.valueField), e = e.slice(0), e.sort(function(e, t) {
                            return n(t) - n(e)
                        }), r = this._scaleType(), a = 0; e.length > a; a++) l = e[a], c = i(t.locationField)(l), d = i(t.valueField)(l), s(c) && s(d) && (o || (o = new r([0, d], [t.minSize, t.maxSize])), c = u.create(c), h = this.map.locationToView(c), f = o.map(d), p = this._createSymbol({
                            center: h,
                            size: f,
                            style: t.style,
                            dataItem: l,
                            location: c
                        }), p.dataItem = l, p.location = c, p.value = d, this._drawSymbol(p))
                },
                _scaleType: function() {
                    var e = this.options.scale;
                    return n.isFunction(e) ? e : r.map.scales[e]
                },
                _createSymbol: function(e) {
                    var t = this.options.symbol;
                    return n.isFunction(t) || (t = r.map.symbols[t]), t(e)
                },
                _drawSymbol: function(e) {
                    var t = {
                            layer: this,
                            shape: e
                        },
                        n = this.map.trigger("shapeCreated", t);
                    n || this.surface.draw(e)
                }
            }),
            p = n.Class.extend({
                init: function(e, t) {
                    var n, i;
                    this._domain = e, this._range = t, n = Math.sqrt(e[1]) - Math.sqrt(e[0]), i = t[1] - t[0], this._ratio = i / n
                },
                map: function(e) {
                    var t = (Math.sqrt(e) - Math.sqrt(this._domain[0])) * this._ratio;
                    return this._range[0] + t
                }
            }),
            m = {
                circle: function(e) {
                    var t = new l.Circle(e.center, e.size / 2);
                    return new c.Circle(t, e.style)
                },
                square: function(e) {
                    var t = new c.Path(e.style),
                        n = e.size / 2,
                        i = e.center;
                    return t.moveTo(i.x - n, i.y - n).lineTo(i.x + n, i.y - n).lineTo(i.x + n, i.y + n).lineTo(i.x - n, i.y + n).close(), t
                }
            };
        o(r, {
            map: {
                layers: {
                    bubble: f,
                    BubbleLayer: f
                },
                scales: {
                    sqrt: p
                },
                symbols: m
            }
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/map/layers/tile.min", ["dataviz/map/layers/base.min", "dataviz/map/location.min"], e)
}(function() {
    ! function(e, t) {
        function n(e) {
            return new u(p(e.x), p(e.y))
        }
        var i = Math,
            r = e.proxy,
            o = window.kendo,
            a = o.Class,
            s = o.template,
            l = o.dataviz,
            c = o.deepExtend,
            d = o.geometry,
            u = d.Point,
            h = l.map.layers.Layer,
            f = o.util,
            p = f.round,
            m = f.renderSize,
            g = f.limitValue,
            v = h.extend({
                init: function(e, t) {
                    h.fn.init.call(this, e, t), "string" == typeof this.options.subdomains && (this.options.subdomains = this.options.subdomains.split(""));
                    var n = this._viewType();
                    this._view = new n(this.element, this.options)
                },
                destroy: function() {
                    h.fn.destroy.call(this), this._view.destroy(), this._view = null
                },
                _beforeReset: function() {
                    var e = this.map,
                        t = e.locationToLayer(e.extent().nw).round();
                    this._view.viewOrigin(t)
                },
                _reset: function() {
                    h.fn._reset.call(this), this._updateView(), this._view.reset()
                },
                _viewType: function() {
                    return _
                },
                _activate: function() {
                    h.fn._activate.call(this), o.support.mobileOS || (this._pan || (this._pan = o.throttle(r(this._render, this), 100)), this.map.bind("pan", this._pan))
                },
                _deactivate: function() {
                    h.fn._deactivate.call(this), this._pan && this.map.unbind("pan", this._pan)
                },
                _updateView: function() {
                    var e = this._view,
                        t = this.map,
                        n = t.extent(),
                        i = {
                            nw: t.locationToLayer(n.nw).round(),
                            se: t.locationToLayer(n.se).round()
                        };
                    e.center(t.locationToLayer(t.center())), e.extent(i), e.zoom(t.zoom())
                },
                _resize: function() {
                    this._render()
                },
                _panEnd: function(e) {
                    h.fn._panEnd.call(this, e), this._render()
                },
                _render: function() {
                    this._updateView(), this._view.render()
                }
            }),
            _ = a.extend({
                init: function(e, t) {
                    this.element = e, this._initOptions(t), this.pool = new w
                },
                options: {
                    tileSize: 256,
                    subdomains: ["a", "b", "c"],
                    urlTemplate: ""
                },
                center: function(e) {
                    this._center = e
                },
                extent: function(e) {
                    this._extent = e
                },
                viewOrigin: function(e) {
                    this._viewOrigin = e
                },
                zoom: function(e) {
                    this._zoom = e
                },
                pointToTileIndex: function(e) {
                    return new u(i.floor(e.x / this.options.tileSize), i.floor(e.y / this.options.tileSize))
                },
                tileCount: function() {
                    var e = this.size(),
                        t = this.pointToTileIndex(this._extent.nw),
                        n = this._extent.nw,
                        r = this.indexToPoint(t).translate(-n.x, -n.y);
                    return {
                        x: i.ceil((i.abs(r.x) + e.width) / this.options.tileSize),
                        y: i.ceil((i.abs(r.y) + e.height) / this.options.tileSize)
                    }
                },
                size: function() {
                    var e = this._extent.nw,
                        t = this._extent.se,
                        n = t.clone().translate(-e.x, -e.y);
                    return {
                        width: n.x,
                        height: n.y
                    }
                },
                indexToPoint: function(e) {
                    var t = e.x,
                        n = e.y;
                    return new u(t * this.options.tileSize, n * this.options.tileSize)
                },
                subdomainText: function() {
                    var e = this.options.subdomains;
                    return e[this.subdomainIndex++ % e.length]
                },
                destroy: function() {
                    this.element.empty(), this.pool.empty()
                },
                reset: function() {
                    this.pool.reset(), this.subdomainIndex = 0, this.render()
                },
                render: function() {
                    var e, t, n, i = this.tileCount(),
                        r = this.pointToTileIndex(this._extent.nw);
                    for (t = 0; i.x > t; t++)
                        for (n = 0; i.y > n; n++) e = this.createTile({
                            x: r.x + t,
                            y: r.y + n
                        }), e.visible || e.show()
                },
                createTile: function(e) {
                    var t = this.tileOptions(e),
                        n = this.pool.get(this._center, t);
                    return 0 === n.element.parent().length && this.element.append(n.element), n
                },
                tileOptions: function(e) {
                    var t = this.wrapIndex(e),
                        i = this.indexToPoint(e),
                        r = this._viewOrigin,
                        o = i.clone().translate(-r.x, -r.y);
                    return {
                        index: t,
                        currentIndex: e,
                        point: i,
                        offset: n(o),
                        zoom: this._zoom,
                        size: this.options.tileSize,
                        subdomain: this.subdomainText(),
                        urlTemplate: this.options.urlTemplate,
                        errorUrlTemplate: this.options.errorUrlTemplate
                    }
                },
                wrapIndex: function(e) {
                    var t = i.pow(2, this._zoom);
                    return {
                        x: this.wrapValue(e.x, t),
                        y: g(e.y, 0, t - 1)
                    }
                },
                wrapValue: function(e, t) {
                    var n = i.abs(e) % t;
                    return e = e >= 0 ? n : t - (0 === n ? t : n)
                }
            }),
            b = a.extend({
                init: function(e, t) {
                    this.id = e, this.visible = !0, this._initOptions(t), this.createElement(), this.show()
                },
                options: {
                    urlTemplate: "",
                    errorUrlTemplate: ""
                },
                createElement: function() {
                    this.element = e("<img style='position: absolute; display: block;' />").css({
                        width: this.options.size,
                        height: this.options.size
                    }).error(r(function(e) {
                        this.errorUrl() ? e.target.setAttribute("src", this.errorUrl()) : e.target.removeAttribute("src")
                    }, this))
                },
                show: function() {
                    var e, t = this.element[0];
                    t.style.top = m(this.options.offset.y), t.style.left = m(this.options.offset.x), e = this.url(), e && t.setAttribute("src", e), t.style.visibility = "visible", this.visible = !0
                },
                hide: function() {
                    this.element[0].style.visibility = "hidden", this.visible = !1
                },
                url: function() {
                    var e = s(this.options.urlTemplate);
                    return e(this.urlOptions())
                },
                errorUrl: function() {
                    var e = s(this.options.errorUrlTemplate);
                    return e(this.urlOptions())
                },
                urlOptions: function() {
                    var e = this.options;
                    return {
                        zoom: e.zoom,
                        subdomain: e.subdomain,
                        z: e.zoom,
                        x: e.index.x,
                        y: e.index.y,
                        s: e.subdomain,
                        quadkey: e.quadkey,
                        q: e.quadkey,
                        culture: e.culture,
                        c: e.culture
                    }
                },
                destroy: function() {
                    this.element && (this.element.remove(), this.element = null)
                }
            }),
            w = a.extend({
                init: function() {
                    this._items = []
                },
                options: {
                    maxSize: 100
                },
                get: function(e, t) {
                    return this._items.length >= this.options.maxSize && this._remove(e), this._create(t)
                },
                empty: function() {
                    var e, t = this._items;
                    for (e = 0; t.length > e; e++) t[e].destroy();
                    this._items = []
                },
                reset: function() {
                    var e, t = this._items;
                    for (e = 0; t.length > e; e++) t[e].hide()
                },
                _create: function(e) {
                    var t, n, i = this._items,
                        r = f.hashKey("" + e.point + ("" + e.offset) + e.zoom + e.urlTemplate);
                    for (n = 0; i.length > n; n++)
                        if (i[n].id === r) {
                            t = i[n];
                            break
                        } return t ? t.show() : (t = new b(r, e), this._items.push(t)), t
                },
                _remove: function(e) {
                    var t, n, i = this._items,
                        r = -1,
                        o = -1;
                    for (t = 0; i.length > t; t++) n = i[t].options.point.distanceTo(e), n > r && !i[t].visible && (o = t, r = n); - 1 !== o && (i[o].destroy(), i.splice(o, 1))
                }
            });
        c(l, {
            map: {
                layers: {
                    tile: v,
                    TileLayer: v,
                    ImageTile: b,
                    TilePool: w,
                    TileView: _
                }
            }
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/map/layers/bing.min", ["dataviz/map/layers/tile.min"], e)
}(function() {
    ! function(e, t) {
        var n = window.kendo,
            i = n.dataviz,
            r = n.deepExtend,
            o = n.util.defined,
            a = i.map.Extent,
            s = i.map.Location,
            l = i.map.layers.TileLayer,
            c = i.map.layers.TileView,
            d = l.extend({
                init: function(t, n) {
                    l.fn.init.call(this, t, n), this._onMetadata = e.proxy(this._onMetadata, this), this._fetchMetadata()
                },
                options: {
                    baseUrl: "//dev.virtualearth.net/REST/v1/Imagery/Metadata/",
                    imagerySet: "road"
                },
                _fetchMetadata: function() {
                    var t = this.options;
                    if (!t.key) throw Error("Bing tile layer: API key is required");
                    e.ajax({
                        url: t.baseUrl + t.imagerySet,
                        data: {
                            output: "json",
                            include: "ImageryProviders",
                            key: t.key,
                            uriScheme: this._scheme(window.location.protocol)
                        },
                        type: "get",
                        dataType: "jsonp",
                        jsonp: "jsonp",
                        success: this._onMetadata
                    })
                },
                _scheme: function(e) {
                    return "https" === e.replace(":", "") ? "https" : "http"
                },
                _onMetadata: function(e) {
                    var t, n;
                    e && e.resourceSets.length && (t = this.resource = e.resourceSets[0].resources[0], r(this._view.options, {
                        urlTemplate: t.imageUrl.replace("{subdomain}", "#= subdomain #").replace("{quadkey}", "#= quadkey #").replace("{culture}", "#= culture #"),
                        subdomains: t.imageUrlSubdomains
                    }), n = this.options, o(n.minZoom) || (n.minZoom = t.zoomMin), o(n.maxZoom) || (n.maxZoom = t.zoomMax), this._addAttribution(), "none" !== this.element.css("display") && this._reset())
                },
                _viewType: function() {
                    return u
                },
                _addAttribution: function() {
                    var e, t, n, i, r, o = this.map.attribution;
                    if (o && (e = this.resource.imageryProviders))
                        for (t = 0; e.length > t; t++)
                            for (n = e[t], i = 0; n.coverageAreas.length > i; i++) r = n.coverageAreas[i], o.add({
                                text: n.attribution,
                                minZoom: r.zoomMin,
                                maxZoom: r.zoomMax,
                                extent: new a(new s(r.bbox[2], r.bbox[1]), new s(r.bbox[0], r.bbox[3]))
                            })
                },
                imagerySet: function(e) {
                    return e ? (this.options.imagerySet = e, this.map.attribution.clear(), this._fetchMetadata(), t) : this.options.imagerySet
                }
            }),
            u = c.extend({
                options: {
                    culture: "en-US"
                },
                tileOptions: function(e) {
                    var t = c.fn.tileOptions.call(this, e);
                    return t.culture = this.options.culture, t.quadkey = this.tileQuadKey(this.wrapIndex(e)), t
                },
                tileQuadKey: function(e) {
                    var t, n, i, r = "";
                    for (i = this._zoom; i > 0; i--) t = 0, n = 1 << i - 1, 0 !== (e.x & n) && t++, 0 !== (e.y & n) && (t += 2), r += t;
                    return r
                }
            });
        r(i, {
            map: {
                layers: {
                    bing: d,
                    BingLayer: d,
                    BingView: u
                }
            }
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/map/layers/marker.min", ["dataviz/map/layers/base.min", "dataviz/map/location.min", "kendo.data.min", "kendo.tooltip.min"], e)
}(function() {
    ! function(e, t) {
        var n = document,
            i = Math,
            r = e.inArray,
            o = e.proxy,
            a = window.kendo,
            s = a.Class,
            l = a.data.DataSource,
            c = a.ui.Tooltip,
            d = a.dataviz,
            u = a.deepExtend,
            h = d.map,
            f = h.Location,
            p = h.layers.Layer,
            m = p.extend({
                init: function(e, t) {
                    p.fn.init.call(this, e, t), this._markerClick = o(this._markerClick, this), this.element.on("click", ".k-marker", this._markerClick), this.items = [], this._initDataSource()
                },
                destroy: function() {
                    p.fn.destroy.call(this), this.element.off("click", ".k-marker", this._markerClick), this.dataSource.unbind("change", this._dataChange), this.clear()
                },
                options: {
                    zIndex: 1e3,
                    autoBind: !0,
                    dataSource: {},
                    locationField: "location",
                    titleField: "title"
                },
                add: function(t) {
                    if (!e.isArray(t)) return this._addOne(t);
                    for (var n = 0; t.length > n; n++) this._addOne(t[n])
                },
                remove: function(e) {
                    e.destroy();
                    var t = r(e, this.items);
                    t > -1 && this.items.splice(t, 1)
                },
                clear: function() {
                    for (var e = 0; this.items.length > e; e++) this.items[e].destroy();
                    this.items = []
                },
                update: function(e) {
                    var t, n = e.location();
                    n && (e.showAt(this.map.locationToView(n)), t = {
                        marker: e,
                        layer: this
                    }, this.map.trigger("markerActivate", t))
                },
                _reset: function() {
                    var e, t;
                    for (p.fn._reset.call(this), e = this.items, t = 0; e.length > t; t++) this.update(e[t])
                },
                bind: function(e, n) {
                    var i, r, o = h.Marker.create(e, this.options);
                    return o.dataItem = n, i = {
                        marker: o,
                        layer: this
                    }, r = this.map.trigger("markerCreated", i), r ? t : (this.add(o), o)
                },
                setDataSource: function(e) {
                    this.dataSource && this.dataSource.unbind("change", this._dataChange), this.dataSource = a.data.DataSource.create(e), this.dataSource.bind("change", this._dataChange), this.options.autoBind && this.dataSource.fetch()
                },
                _addOne: function(e) {
                    var t = g.create(e, this.options);
                    return t.addTo(this), t
                },
                _initDataSource: function() {
                    var e = this.options.dataSource;
                    this._dataChange = o(this._dataChange, this), this.dataSource = l.create(e).bind("change", this._dataChange), e && this.options.autoBind && this.dataSource.fetch()
                },
                _dataChange: function(e) {
                    this._load(e.sender.view())
                },
                _load: function(e) {
                    var t, n, i, r;
                    for (this._data = e, this.clear(), t = a.getter(this.options.locationField), n = a.getter(this.options.titleField), i = 0; e.length > i; i++) r = e[i], this.bind({
                        location: t(r),
                        title: n(r)
                    }, r)
                },
                _markerClick: function(t) {
                    var n = {
                        marker: e(t.target).data("kendoMarker"),
                        layer: this
                    };
                    this.map.trigger("markerClick", n)
                }
            }),
            g = s.extend({
                init: function(e) {
                    this.options = e || {}
                },
                addTo: function(e) {
                    this.layer = e.markers || e, this.layer.items.push(this), this.layer.update(this)
                },
                location: function(e) {
                    return e ? (this.options.location = f.create(e).toArray(), this.layer && this.layer.update(this), this) : f.create(this.options.location)
                },
                showAt: function(e) {
                    this.render(), this.element.css({
                        left: i.round(e.x),
                        top: i.round(e.y)
                    }), this.tooltip && this.tooltip.popup && this.tooltip.popup._position()
                },
                hide: function() {
                    this.element && (this.element.remove(), this.element = null), this.tooltip && (this.tooltip.destroy(), this.tooltip = null)
                },
                destroy: function() {
                    this.layer = null, this.hide()
                },
                render: function() {
                    var t, i;
                    this.element || (t = this.options, i = this.layer, this.element = e(n.createElement("span")).addClass("k-marker k-marker-" + a.toHyphens(t.shape || "pin")).attr("title", t.title).attr(t.attributes || {}).data("kendoMarker", this).css("zIndex", t.zIndex), i && i.element.append(this.element), this.renderTooltip())
                },
                renderTooltip: function() {
                    var e, t, n = this,
                        i = n.options.title,
                        r = n.options.tooltip || {};
                    r && c && (e = r.template, e && (t = a.template(e), r.content = function(e) {
                        return e.location = n.location(), e.marker = n, t(e)
                    }), (i || r.content || r.contentUrl) && (this.tooltip = new c(this.element, r), this.tooltip.marker = this))
                }
            });
        g.create = function(e, t) {
            return e instanceof g ? e : new g(u({}, t, e))
        }, u(d, {
            map: {
                layers: {
                    marker: m,
                    MarkerLayer: m
                },
                Marker: g
            }
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/map/main.min", ["dataviz/map/crs.min", "dataviz/map/location.min"], e)
}(function() {
    ! function(e, t) {
        var n = document,
            i = Math,
            r = i.min,
            o = i.pow,
            a = e.proxy,
            s = window.kendo,
            l = s.ui.Widget,
            c = s.deepExtend,
            d = s.dataviz,
            u = d.ui,
            h = s.geometry,
            f = h.Point,
            p = d.map,
            m = p.Extent,
            g = p.Location,
            v = p.crs.EPSG3857,
            _ = s.util,
            b = _.defined,
            w = _.limitValue,
            y = _.renderPos,
            k = _.valueOrDefault,
            x = "k-",
            C = .9,
            S = .93,
            T = "DOMMouseScroll mousewheel",
            D = 5,
            A = l.extend({
                init: function(e, t) {
                    s.destroy(e), l.fn.init.call(this, e), this._initOptions(t), this.bind(this.events, t), this.crs = new v, this.element.addClass(x + this.options.name.toLowerCase()).css("position", "relative").empty().append(n.createElement("div")), this._viewOrigin = this._getOrigin(), this._initScroller(), this._initMarkers(), this._initControls(), this._initLayers(), this._reset(), this._mousewheel = a(this._mousewheel, this), this.element.bind("click", a(this._click, this)), this.element.bind(T, this._mousewheel)
                },
                options: {
                    name: "Map",
                    controls: {
                        attribution: !0,
                        navigator: {
                            panStep: 100
                        },
                        zoom: !0
                    },
                    layers: [],
                    layerDefaults: {
                        shape: {
                            style: {
                                fill: {
                                    color: "#fff"
                                },
                                stroke: {
                                    color: "#aaa",
                                    width: .5
                                }
                            }
                        },
                        bubble: {
                            style: {
                                fill: {
                                    color: "#fff",
                                    opacity: .5
                                },
                                stroke: {
                                    color: "#aaa",
                                    width: .5
                                }
                            }
                        },
                        marker: {
                            shape: "pinTarget",
                            tooltip: {
                                position: "top"
                            }
                        }
                    },
                    center: [0, 0],
                    zoom: 3,
                    minSize: 256,
                    minZoom: 1,
                    maxZoom: 19,
                    markers: [],
                    markerDefaults: {
                        shape: "pinTarget",
                        tooltip: {
                            position: "top"
                        }
                    },
                    wraparound: !0
                },
                events: ["beforeReset", "click", "reset", "pan", "panEnd", "markerActivate", "markerClick", "markerCreated", "shapeClick", "shapeCreated", "shapeMouseEnter", "shapeMouseLeave", "zoomStart", "zoomEnd"],
                destroy: function() {
                    this.scroller.destroy(), this.navigator && this.navigator.destroy(), this.attribution && this.attribution.destroy(), this.zoomControl && this.zoomControl.destroy(), this.markers.destroy();
                    for (var e = 0; this.layers.length > e; e++) this.layers[e].destroy();
                    l.fn.destroy.call(this)
                },
                zoom: function(e) {
                    var t = this.options;
                    return b(e) ? (e = i.round(w(e, t.minZoom, t.maxZoom)), t.zoom !== e && (t.zoom = e, this._reset()), this) : t.zoom
                },
                center: function(e) {
                    return e ? (this.options.center = g.create(e).toArray(), this._reset(), this) : g.create(this.options.center)
                },
                extent: function(e) {
                    return e ? (this._setExtent(e), this) : this._getExtent()
                },
                setOptions: function(e) {
                    l.fn.setOptions.call(this, e), this._reset()
                },
                locationToLayer: function(e, t) {
                    var n = !this.options.wraparound;
                    return e = g.create(e), this.crs.toPoint(e, this._layerSize(t), n)
                },
                layerToLocation: function(e, t) {
                    var n = !this.options.wraparound;
                    return e = f.create(e), this.crs.toLocation(e, this._layerSize(t), n)
                },
                locationToView: function(e) {
                    var t, n;
                    return e = g.create(e), t = this.locationToLayer(this._viewOrigin), n = this.locationToLayer(e), n.translateWith(t.scale(-1))
                },
                viewToLocation: function(e, t) {
                    var n = this.locationToLayer(this._getOrigin(), t);
                    return e = f.create(e), e = e.clone().translateWith(n), this.layerToLocation(e, t)
                },
                eventOffset: function(e) {
                    var t = this.element.offset(),
                        n = e.originalEvent || e,
                        i = k(n.pageX, n.clientX) - t.left,
                        r = k(n.pageY, n.clientY) - t.top;
                    return new h.Point(i, r)
                },
                eventToView: function(e) {
                    var t = this.eventOffset(e);
                    return this.locationToView(this.viewToLocation(t))
                },
                eventToLayer: function(e) {
                    return this.locationToLayer(this.eventToLocation(e))
                },
                eventToLocation: function(e) {
                    var t = this.eventOffset(e);
                    return this.viewToLocation(t)
                },
                viewSize: function() {
                    var e = this.element,
                        t = this._layerSize(),
                        n = e.width();
                    return this.options.wraparound || (n = r(t, n)), {
                        width: n,
                        height: r(t, e.height())
                    }
                },
                exportVisual: function() {
                    return this._reset(), !1
                },
                _setOrigin: function(e, t) {
                    var n, i = this.viewSize();
                    return e = this._origin = g.create(e), n = this.locationToLayer(e, t), n.x += i.width / 2, n.y += i.height / 2, this.options.center = this.layerToLocation(n, t).toArray(), this
                },
                _getOrigin: function(e) {
                    var t, n = this.viewSize();
                    return (e || !this._origin) && (t = this.locationToLayer(this.center()), t.x -= n.width / 2, t.y -= n.height / 2, this._origin = this.layerToLocation(t)), this._origin
                },
                _setExtent: function(e) {
                    var t, n, r, o, a, s, l;
                    for (e = m.create(e), this.center(e.center()), t = this.element.width(), n = this.element.height(), r = this.options.maxZoom; r >= this.options.minZoom && (o = this.locationToLayer(e.nw, r), a = this.locationToLayer(e.se, r), s = i.abs(a.x - o.x), l = i.abs(a.y - o.y), !(t >= s && n >= l)); r--);
                    this.zoom(r)
                },
                _getExtent: function() {
                    var e, t = this._getOrigin(),
                        n = this.locationToLayer(t),
                        i = this.viewSize();
                    return n.x += i.width, n.y += i.height, e = this.layerToLocation(n), new m(t, e)
                },
                _zoomAround: function(e, t) {
                    this._setOrigin(this.layerToLocation(e, t), t), this.zoom(t)
                },
                _initControls: function() {
                    var e = this.options.controls;
                    u.Attribution && e.attribution && this._createAttribution(e.attribution), s.support.mobileOS || (u.Navigator && e.navigator && this._createNavigator(e.navigator), u.ZoomControl && e.zoom && this._createZoomControl(e.zoom))
                },
                _createControlElement: function(t, n) {
                    var i = t.position || n,
                        r = "." + y(i).replace(" ", "."),
                        o = e(".k-map-controls" + r, this.element);
                    return 0 === o.length && (o = e("<div>").addClass("k-map-controls " + y(i)).appendTo(this.element)), e("<div>").appendTo(o)
                },
                _createAttribution: function(e) {
                    var t = this._createControlElement(e, "bottomRight");
                    this.attribution = new u.Attribution(t, e)
                },
                _createNavigator: function(e) {
                    var t = this._createControlElement(e, "topLeft"),
                        n = this.navigator = new u.Navigator(t, e);
                    this._navigatorPan = a(this._navigatorPan, this), n.bind("pan", this._navigatorPan), this._navigatorCenter = a(this._navigatorCenter, this), n.bind("center", this._navigatorCenter)
                },
                _navigatorPan: function(e) {
                    var t = this,
                        n = t.scroller,
                        i = n.scrollLeft + e.x,
                        r = n.scrollTop - e.y,
                        o = this._virtualSize,
                        a = this.element.height(),
                        s = this.element.width();
                    i = w(i, o.x.min, o.x.max - s), r = w(r, o.y.min, o.y.max - a), t.scroller.one("scroll", function(e) {
                        t._scrollEnd(e)
                    }), t.scroller.scrollTo(-i, -r)
                },
                _navigatorCenter: function() {
                    this.center(this.options.center)
                },
                _createZoomControl: function(e) {
                    var t = this._createControlElement(e, "topLeft"),
                        n = this.zoomControl = new u.ZoomControl(t, e);
                    this._zoomControlChange = a(this._zoomControlChange, this), n.bind("change", this._zoomControlChange)
                },
                _zoomControlChange: function(e) {
                    this.trigger("zoomStart", {
                        originalEvent: e
                    }) || (this.zoom(this.zoom() + e.delta), this.trigger("zoomEnd", {
                        originalEvent: e
                    }))
                },
                _initScroller: function() {
                    var e = s.support.mobileOS ? S : C,
                        t = this.options.zoomable !== !1,
                        n = this.scroller = new s.mobile.ui.Scroller(this.element.children(0), {
                            friction: e,
                            velocityMultiplier: D,
                            zoom: t,
                            mousewheelScrolling: !1
                        });
                    n.bind("scroll", a(this._scroll, this)), n.bind("scrollEnd", a(this._scrollEnd, this)), n.userEvents.bind("gesturestart", a(this._scaleStart, this)), n.userEvents.bind("gestureend", a(this._scale, this)), this.scrollElement = n.scrollElement
                },
                _initLayers: function() {
                    var e, t, n, i, r, o = this.options.layers,
                        a = this.layers = [];
                    for (e = 0; o.length > e; e++) t = o[e], n = t.type || "shape", i = this.options.layerDefaults[n], r = d.map.layers[n], a.push(new r(this, c({}, i, t)))
                },
                _initMarkers: function() {
                    this.markers = new p.layers.MarkerLayer(this, this.options.markerDefaults), this.markers.add(this.options.markers)
                },
                _scroll: function(e) {
                    var t = this.locationToLayer(this._viewOrigin).round(),
                        n = e.sender.movable,
                        i = new h.Point(n.x, n.y).scale(-1).scale(1 / n.scale);
                    t.x += i.x, t.y += i.y, this._scrollOffset = i, this._setOrigin(this.layerToLocation(t)), this.trigger("pan", {
                        originalEvent: e,
                        origin: this._getOrigin(),
                        center: this.center()
                    })
                },
                _scrollEnd: function(e) {
                    this._scrollOffset && this._panComplete() && (this._scrollOffset = null, this._panEndTS = new Date, this.trigger("panEnd", {
                        originalEvent: e,
                        origin: this._getOrigin(),
                        center: this.center()
                    }))
                },
                _panComplete: function() {
                    return new Date - (this._panEndTS || 0) > 50
                },
                _scaleStart: function(e) {
                    if (this.trigger("zoomStart", {
                        originalEvent: e
                    })) {
                        var t = e.touches[1];
                        t && t.cancel()
                    }
                },
                _scale: function(e) {
                    var t = this.scroller.movable.scale,
                        n = this._scaleToZoom(t),
                        i = new h.Point(e.center.x, e.center.y),
                        r = this.viewToLocation(i, n),
                        o = this.locationToLayer(r, n),
                        a = o.translate(-i.x, -i.y);
                    this._zoomAround(a, n), this.trigger("zoomEnd", {
                        originalEvent: e
                    })
                },
                _scaleToZoom: function(e) {
                    var t = this._layerSize() * e,
                        n = t / this.options.minSize,
                        r = i.log(n) / i.log(2);
                    return i.round(r)
                },
                _reset: function() {
                    this.attribution && this.attribution.filter(this.center(), this.zoom()), this._viewOrigin = this._getOrigin(!0), this._resetScroller(), this.trigger("beforeReset"), this.trigger("reset")
                },
                _resetScroller: function() {
                    var e, t, n, i, r = this.scroller,
                        a = r.dimensions.x,
                        s = r.dimensions.y,
                        l = this._layerSize(),
                        c = this.extent().nw,
                        d = this.locationToLayer(c).round();
                    r.movable.round = !0, r.reset(), r.userEvents.cancel(), e = this.zoom(), r.dimensions.forcedMinScale = o(2, this.options.minZoom - e), r.dimensions.maxScale = o(2, this.options.maxZoom - e), t = {
                        min: -d.x,
                        max: l - d.x
                    }, n = {
                        min: -d.y,
                        max: l - d.y
                    }, this.options.wraparound && (t.max = 20 * l, t.min = -t.max), this.options.pannable === !1 && (i = this.viewSize(), t.min = n.min = 0,
                        t.max = i.width, n.max = i.height), a.makeVirtual(), s.makeVirtual(), a.virtualSize(t.min, t.max), s.virtualSize(n.min, n.max), this._virtualSize = {
                        x: t,
                        y: n
                    }
                },
                _renderLayers: function() {
                    var e, t, n, i, r, o = this.options.layers,
                        a = this.layers = [],
                        s = this.scrollWrap;
                    for (s.empty(), e = 0; o.length > e; e++) t = o[e], n = t.type || "shape", i = this.options.layerDefaults[n], r = d.map.layers[n], a.push(new r(this, c({}, i, t)))
                },
                _layerSize: function(e) {
                    return e = k(e, this.options.zoom), this.options.minSize * o(2, e)
                },
                _click: function(e) {
                    if (this._panComplete()) {
                        var t = this.eventOffset(e);
                        this.trigger("click", {
                            originalEvent: e,
                            location: this.viewToLocation(t)
                        })
                    }
                },
                _mousewheel: function(e) {
                    var t, n, i, r, o, a, s, l;
                    e.preventDefault(), t = d.mwDelta(e) > 0 ? -1 : 1, n = this.options, i = this.zoom(), r = w(i + t, n.minZoom, n.maxZoom), n.zoomable !== !1 && r !== i && (this.trigger("zoomStart", {
                        originalEvent: e
                    }) || (o = this.eventOffset(e), a = this.viewToLocation(o), s = this.locationToLayer(a, r), l = s.translate(-o.x, -o.y), this._zoomAround(l, r), this.trigger("zoomEnd", {
                        originalEvent: e
                    })))
                }
            });
        d.ui.plugin(A)
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.map.min", ["kendo.data.min", "kendo.userevents.min", "kendo.tooltip.min", "kendo.mobile.scroller.min", "kendo.draganddrop.min", "kendo.drawing.min", "dataviz/map/location.min", "dataviz/map/attribution.min", "dataviz/map/navigator.min", "dataviz/map/zoom.min", "dataviz/map/crs.min", "dataviz/map/layers/base.min", "dataviz/map/layers/shape.min", "dataviz/map/layers/bubble.min", "dataviz/map/layers/tile.min", "dataviz/map/layers/bing.min", "dataviz/map/layers/marker.min", "dataviz/map/main.min"], e)
}(function() {}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/diagram/utils.min", ["kendo.core.min"], e)
}(function() {
    ! function(e, t) {
        function n(e, n, i) {
            function r(e) {
                for (var t = 1; e * t % 1;) t *= 10;
                return t
            }
            var o, a, s, l;
            if (t === e || t === n) return [];
            if (i && u.sign(n - e) != u.sign(i)) throw "The sign of the increment should allow to reach the stop-value.";
            if (i = i || 1, e = e || 0, n = n || e, (n - e) / i === 1 / 0) throw "Infinite range defined.";
            if (o = [], a = -1, l = r(Math.abs(i)), e *= l, n *= l, i *= l, e > n && i > 0 && (i = -i), 0 > i)
                for (;
                    (s = e + i * ++a) >= n;) o.push(s / l);
            else
                for (;
                    (s = e + i * ++a) <= n;) o.push(s / l);
            return o
        }

        function i(e, t) {
            if (e == t) return 0;
            var n = t.x - e.x,
                i = e.y - t.y,
                r = Math.atan(n / i);
            return i >= 0 ? 0 > n ? r + 2 * Math.PI : r : r + Math.PI
        }
        var r, o, a = window.kendo,
            s = a.dataviz.diagram = {},
            l = a.deepExtend,
            c = e.isArray,
            d = 1e-6,
            u = {};
        l(u, {
            isNearZero: function(e) {
                return Math.abs(e) < d
            },
            isDefined: function(e) {
                return t !== e
            },
            isUndefined: function(e) {
                return t === e || null === e
            },
            isObject: function(e) {
                return e === Object(e)
            },
            has: function(e, t) {
                return Object.hasOwnProperty.call(e, t)
            },
            isString: function(e) {
                return "[object String]" == Object.prototype.toString.call(e)
            },
            isBoolean: function(e) {
                return "[object Boolean]" == Object.prototype.toString.call(e)
            },
            isType: function(e, t) {
                return Object.prototype.toString.call(e) == "[object " + t + "]"
            },
            isNumber: function(e) {
                return !isNaN(parseFloat(e)) && isFinite(e)
            },
            isEmpty: function(e) {
                if (null === e) return !0;
                if (c(e) || u.isString(e)) return 0 === e.length;
                for (var t in e)
                    if (u.has(e, t)) return !1;
                return !0
            },
            simpleExtend: function(e, t) {
                if (u.isObject(t))
                    for (var n in t) e[n] = t[n]
            },
            initArray: function(e, t) {
                var n, i = [];
                for (n = 0; e > n; ++n) i[n] = t;
                return i
            },
            serializePoints: function(e) {
                var t, n, i = [];
                for (t = 0; e.length > t; t++) n = e[t], i.push(n.x + ";" + n.y);
                return i.join(";")
            },
            deserializePoints: function(e) {
                var t, n = e.split(";"),
                    i = [];
                if (n.length % 2 !== 0) throw "Not an array of points.";
                for (t = 0; n.length > t; t += 2) i.push(new s.Point(parseInt(n[t], 10), parseInt(n[t + 1], 10)));
                return i
            },
            randomInteger: function(e, t) {
                return parseInt(Math.floor(Math.random() * t) + e, 10)
            },
            DFT: function(e, t) {
                var n, i;
                if (t(e), e.childNodes)
                    for (n = 0; e.childNodes.length > n; n++) i = e.childNodes[n], this.DFT(i, t)
            },
            getMatrixAngle: function(e) {
                return null === e || 0 === e.d ? 0 : 180 * Math.atan2(e.b, e.d) / Math.PI
            },
            getMatrixScaling: function(e) {
                var t = Math.sqrt(e.a * e.a + e.c * e.c),
                    n = Math.sqrt(e.b * e.b + e.d * e.d);
                return [t, n]
            }
        }), u.sign = function(e) {
            return e ? 0 > e ? -1 : 1 : 0
        }, u.findAngle = function(e, t) {
            return 180 * i(e, t) / Math.PI
        }, u.forEach = function(e, t, n) {
            for (var i = 0; e.length > i; i++) t.call(n, e[i], i, e)
        }, u.any = function(e, t) {
            for (var n = 0; e.length > n; ++n)
                if (t(e[n])) return e[n];
            return null
        }, u.remove = function(e, t) {
            for (var n; - 1 !== (n = u.indexOf(e, t));) e.splice(n, 1);
            return e
        }, u.contains = function(e, t) {
            return -1 !== u.indexOf(e, t)
        }, u.indexOf = function(t, n) {
            return e.inArray(n, t)
        }, u.fold = function(e, t, n, i) {
            var r, o, a = arguments.length > 2;
            for (r = 0; e.length > r; r++) o = e[r], a ? n = t.call(i, n, o, r, e) : (n = o, a = !0);
            if (!a) throw "Reduce of empty array with no initial value";
            return n
        }, u.find = function(e, t, n) {
            var i;
            return u.any(e, function(e, r, o) {
                return t.call(n, e, r, o) ? (i = e, !0) : !1
            }), i
        }, u.first = function(e, t, n) {
            return 0 === e.length ? null : u.isUndefined(t) ? e[0] : u.find(e, t, n)
        }, u.insert = function(e, t, n) {
            return e.splice(n, 0, t), e
        }, u.all = function(e, t, n) {
            var i, r, o = !0;
            for (r = 0; e.length > r && (i = e[r], o = o && t.call(n, i, r, e), o); r++);
            return o
        }, u.clear = function(e) {
            e.splice(0, e.length)
        }, u.bisort = function(e, t, n) {
            if (u.isUndefined(e)) throw "First array is not specified.";
            if (u.isUndefined(t)) throw "Second array is not specified.";
            if (e.length != t.length) throw "The two arrays should have equal length";
            var i, r = [];
            for (i = 0; e.length > i; i++) r.push({
                x: e[i],
                y: t[i]
            });
            for (r.sort(u.isUndefined(n) ? function(e, t) {
                return e.x - t.x
            } : function(e, t) {
                return n(e.x, t.x)
            }), u.clear(e), u.clear(t), i = 0; r.length > i; i++) e.push(r[i].x), t.push(r[i].y)
        }, u.addRange = function(e, t) {
            e.push.apply(e, t)
        }, r = {
            easeInOut: function(e) {
                return -Math.cos(e * Math.PI) / 2 + .5
            }
        }, o = a.Class.extend({
            init: function() {
                this.adapters = [], this.target = 0, this.tick = 0, this.interval = 20, this.duration = 800, this.lastTime = null, this.handlers = [];
                var e = this;
                this.transition = r.easeInOut, this.timerDelegate = function() {
                    e.onTimerEvent()
                }
            },
            addAdapter: function(e) {
                this.adapters.push(e)
            },
            onComplete: function(e) {
                this.handlers.push(e)
            },
            removeHandler: function(t) {
                this.handlers = e.grep(this.handlers, function(e) {
                    return e !== t
                })
            },
            trigger: function() {
                var e = this;
                this.handlers && u.forEach(this.handlers, function(t) {
                    return t.call(null !== e.caller ? e.caller : e)
                })
            },
            onStep: function() {},
            seekTo: function(e) {
                this.seekFromTo(this.tick, e)
            },
            seekFromTo: function(e, t) {
                this.target = Math.max(0, Math.min(1, t)), this.tick = Math.max(0, Math.min(1, e)), this.lastTime = (new Date).getTime(), this.intervalId || (this.intervalId = window.setInterval(this.timerDelegate, this.interval))
            },
            stop: function() {
                this.intervalId && (window.clearInterval(this.intervalId), this.intervalId = null, this.trigger())
            },
            play: function(e) {
                0 !== this.adapters.length && (null !== e && (this.caller = e), this.initState(), this.seekFromTo(0, 1))
            },
            reverse: function() {
                this.seekFromTo(1, 0)
            },
            initState: function() {
                if (0 !== this.adapters.length)
                    for (var e = 0; this.adapters.length > e; e++) this.adapters[e].initState()
            },
            propagate: function() {
                var e, t = this.transition(this.tick);
                for (e = 0; this.adapters.length > e; e++) this.adapters[e].update(t)
            },
            onTimerEvent: function() {
                var e, t = (new Date).getTime(),
                    n = t - this.lastTime;
                this.lastTime = t, e = n / this.duration * (this.target > this.tick ? 1 : -1), Math.abs(e) >= Math.abs(this.tick - this.target) ? this.tick = this.target : this.tick += e;
                try {
                    this.propagate()
                } finally {
                    this.onStep.call(this), this.target == this.tick && this.stop()
                }
            }
        }), a.deepExtend(s, {
            init: function(e) {
                a.init(e, s.ui)
            },
            Utils: u,
            Range: n,
            Ticker: o
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/diagram/math.min", ["dataviz/diagram/utils.min", "kendo.dataviz.core.min"], e)
}(function() {
    ! function(e, t) {
        function n(e) {
            return Math.abs(e) < R
        }

        function i(e, t, i, r, o) {
            var a, s, l, c, d = (t.x - e.x) * (r.y - i.y) - (t.y - e.y) * (r.x - i.x);
            if (!n(d) && (a = (e.y - i.y) * (r.x - i.x) - (e.x - i.x) * (r.y - i.y), s = (e.y - i.y) * (t.x - e.x) - (e.x - i.x) * (t.y - e.y), l = a / d, c = s / d, !o || !(0 > l || l > 1 || 0 > c || c > 1))) return new A(e.x + l * (t.x - e.x), e.y + l * (t.y - e.y))
        }

        function r(e, t) {
            var n, i, r;
            do n = 2 * Math.random() - 1, i = 2 * Math.random() - 1, r = n * n + i * i; while (!r || r > 1);
            return e + t * n * Math.sqrt(-2 * Math.log(r) / r)
        }

        function o(e) {
            var t, n, i;
            for (D.isUndefined(e) && (e = 10), t = "", n = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", i = e; i > 0; --i) t += n.charAt(Math.round(Math.random() * (n.length - 1)));
            return t
        }
        var a, s, l, c, d, u, h, f, p, m, g, v, _, b, w, y, k = window.kendo,
            x = k.dataviz.diagram,
            C = k.Class,
            S = k.deepExtend,
            T = k.dataviz,
            D = x.Utils,
            A = T.Point2D,
            E = k.isFunction,
            F = D.contains,
            I = e.map,
            M = 3,
            R = 1e-6;
        S(A.fn, {
            plus: function(e) {
                return new A(this.x + e.x, this.y + e.y)
            },
            minus: function(e) {
                return new A(this.x - e.x, this.y - e.y)
            },
            offset: function(e) {
                return new A(this.x - e, this.y - e)
            },
            times: function(e) {
                return new A(this.x * e, this.y * e)
            },
            normalize: function() {
                return 0 === this.length() ? new A : this.times(1 / this.length())
            },
            length: function() {
                return Math.sqrt(this.x * this.x + this.y * this.y)
            },
            toString: function() {
                return "(" + this.x + "," + this.y + ")"
            },
            lengthSquared: function() {
                return this.x * this.x + this.y * this.y
            },
            middleOf: function(e, t) {
                return new A(t.x - e.x, t.y - e.y).times(.5).plus(e)
            },
            toPolar: function(e) {
                var t, n, i, r = 1;
                if (e && (r = 180 / Math.PI), t = Math.atan2(Math.abs(this.y), Math.abs(this.x)), n = Math.PI / 2, i = this.length(), 0 === this.x) {
                    if (0 === this.y) return new u(0, 0);
                    if (this.y > 0) return new u(i, r * n);
                    if (0 > this.y) return new u(i, 3 * r * n)
                } else if (this.x > 0) {
                    if (0 === this.y) return new u(i, 0);
                    if (this.y > 0) return new u(i, r * t);
                    if (0 > this.y) return new u(i, r * (4 * n - t))
                } else {
                    if (0 === this.y) return new u(i, 2 * n);
                    if (this.y > 0) return new u(i, r * (2 * n - t));
                    if (0 > this.y) return new u(i, r * (2 * n + t))
                }
            },
            isOnLine: function(e, t) {
                var n, i, r, o, a;
                return e.x > t.x && (n = t, t = e, e = n), i = new s(e.x, e.y).inflate(M, M), r = new s(t.x, t.y).inflate(M, M), i.union(r).contains(this) ? e.x === t.x || e.y === t.y ? !0 : (t.y > e.y ? (o = i.x + (r.x - i.x) * (this.y - (i.y + i.height)) / (r.y + r.height - (i.y + i.height)), a = i.x + i.width + (r.x + r.width - (i.x + i.width)) * (this.y - i.y) / (r.y - i.y)) : (o = i.x + (r.x - i.x) * (this.y - i.y) / (r.y - i.y), a = i.x + i.width + (r.x + r.width - (i.x + i.width)) * (this.y - (i.y + i.height)) / (r.y + r.height - (i.y + i.height))), this.x > o && a > this.x) : !1
            }
        }), S(A, {
            parse: function(e) {
                var n = e.slice(1, e.length - 1),
                    i = n.split(","),
                    r = parseInt(i[0], 10),
                    o = parseInt(i[1], 10);
                return isNaN(r) || isNaN(o) ? t : new A(r, o)
            }
        }), a = C.extend({
            init: function(e, t, n) {
                this.point = e, this.left = t, this.right = n
            }
        }), s = C.extend({
            init: function(e, t, n, i) {
                this.x = e || 0, this.y = t || 0, this.width = n || 0, this.height = i || 0
            },
            contains: function(e) {
                return e.x >= this.x && this.x + this.width >= e.x && e.y >= this.y && this.y + this.height >= e.y
            },
            inflate: function(e, n) {
                return n === t && (n = e), this.x -= e, this.y -= n, this.width += 2 * e + 1, this.height += 2 * n + 1, this
            },
            offset: function(e, t) {
                var n = e,
                    i = t;
                return e instanceof A && (n = e.x, i = e.y), this.x += n, this.y += i, this
            },
            union: function(e) {
                var t = Math.min(this.x, e.x),
                    n = Math.min(this.y, e.y),
                    i = Math.max(this.x + this.width, e.x + e.width),
                    r = Math.max(this.y + this.height, e.y + e.height);
                return new s(t, n, i - t, r - n)
            },
            center: function() {
                return new A(this.x + this.width / 2, this.y + this.height / 2)
            },
            top: function() {
                return new A(this.x + this.width / 2, this.y)
            },
            right: function() {
                return new A(this.x + this.width, this.y + this.height / 2)
            },
            bottom: function() {
                return new A(this.x + this.width / 2, this.y + this.height)
            },
            left: function() {
                return new A(this.x, this.y + this.height / 2)
            },
            topLeft: function() {
                return new A(this.x, this.y)
            },
            topRight: function() {
                return new A(this.x + this.width, this.y)
            },
            bottomLeft: function() {
                return new A(this.x, this.y + this.height)
            },
            bottomRight: function() {
                return new A(this.x + this.width, this.y + this.height)
            },
            clone: function() {
                return new s(this.x, this.y, this.width, this.height)
            },
            isEmpty: function() {
                return !this.width && !this.height
            },
            equals: function(e) {
                return this.x === e.x && this.y === e.y && this.width === e.width && this.height === e.height
            },
            rotatedBounds: function(e) {
                var t = this.clone(),
                    n = this.rotatedPoints(e),
                    i = n[0],
                    r = n[1],
                    o = n[2],
                    a = n[3];
                return t.x = Math.min(o.x, i.x, r.x, a.x), t.y = Math.min(o.y, i.y, r.y, a.y), t.width = Math.max(o.x, i.x, r.x, a.x) - t.x, t.height = Math.max(o.y, i.y, r.y, a.y) - t.y, t
            },
            rotatedPoints: function(e) {
                var t = this,
                    n = t.center(),
                    i = t.bottomRight().rotate(n, 360 - e),
                    r = t.topLeft().rotate(n, 360 - e),
                    o = t.topRight().rotate(n, 360 - e),
                    a = t.bottomLeft().rotate(n, 360 - e);
                return [r, o, i, a]
            },
            toString: function(e) {
                return e = e || " ", this.x + e + this.y + e + this.width + e + this.height
            },
            scale: function(e, t, n, i, r) {
                var o, a, s, l = this.topLeft(),
                    c = this.center();
                l.rotate(c, 360 - r).rotate(i, r), o = n.minus(l), a = new A(o.x * e, o.y * t), s = o.minus(a), l = l.plus(s), l.rotate(i, 360 - r).rotate(c, r), this.x = l.x, this.y = l.y, this.width *= e, this.height *= t
            },
            zoom: function(e) {
                return this.x *= e, this.y *= e, this.width *= e, this.height *= e, this
            },
            overlaps: function(e) {
                var t = this.bottomRight(),
                    n = e.bottomRight(),
                    i = !(e.x > t.x || e.y > t.y || this.x > n.x || this.y > n.y);
                return i
            }
        }), l = C.extend({
            init: function(e, t) {
                this.width = e, this.height = t
            }
        }), l.prototype.Empty = new l(0, 0), s.toRect = function(e) {
            return e instanceof s || (e = new s(e.x, e.y, e.width, e.height)), e
        }, s.empty = function() {
            return new s(0, 0, 0, 0)
        }, s.fromPoints = function(e, t) {
            if (isNaN(e.x) || isNaN(e.y) || isNaN(t.x) || isNaN(t.y)) throw "Some values are NaN.";
            return new s(Math.min(e.x, t.x), Math.min(e.y, t.y), Math.abs(e.x - t.x), Math.abs(e.y - t.y))
        }, c = {
            lines: function(e, t, n, r) {
                return i(e, t, n, r)
            },
            segments: function(e, t, n, r) {
                return i(e, t, n, r, !0)
            },
            rectWithLine: function(e, t, n) {
                return c.segments(t, n, e.topLeft(), e.topRight()) || c.segments(t, n, e.topRight(), e.bottomRight()) || c.segments(t, n, e.bottomLeft(), e.bottomRight()) || c.segments(t, n, e.topLeft(), e.bottomLeft())
            },
            rects: function(e, t, n) {
                var i, r, o = t.topLeft(),
                    a = t.topRight(),
                    s = t.bottomLeft(),
                    l = t.bottomRight(),
                    d = t.center();
                return n && (o = o.rotate(d, n), a = a.rotate(d, n), s = s.rotate(d, n), l = l.rotate(d, n)), i = e.contains(o) || e.contains(a) || e.contains(s) || e.contains(l) || c.rectWithLine(e, o, a) || c.rectWithLine(e, o, s) || c.rectWithLine(e, a, l) || c.rectWithLine(e, s, l), i || (o = e.topLeft(), a = e.topRight(), s = e.bottomLeft(), l = e.bottomRight(), n && (r = 360 - n, o = o.rotate(d, r), a = a.rotate(d, r), s = s.rotate(d, r), l = l.rotate(d, r)), i = t.contains(o) || t.contains(a) || t.contains(s) || t.contains(l)), i
            }
        }, d = C.extend({
            init: function(e) {
                this.container = s.toRect(e)
            },
            align: function(e, t) {
                var n, i = t.toLowerCase().split(" ");
                for (n = 0; i.length > n; n++) e = this._singleAlign(e, i[n]);
                return e
            },
            _singleAlign: function(e, t) {
                return E(this[t]) ? this[t](e) : e
            },
            left: function(e) {
                return this._align(e, this._left)
            },
            center: function(e) {
                return this._align(e, this._center)
            },
            right: function(e) {
                return this._align(e, this._right)
            },
            stretch: function(e) {
                return this._align(e, this._stretch)
            },
            top: function(e) {
                return this._align(e, this._top)
            },
            middle: function(e) {
                return this._align(e, this._middle)
            },
            bottom: function(e) {
                return this._align(e, this._bottom)
            },
            _left: function(e, t) {
                t.x = e.x
            },
            _center: function(e, t) {
                t.x = (e.width - t.width) / 2 || 0
            },
            _right: function(e, t) {
                t.x = e.width - t.width
            },
            _top: function(e, t) {
                t.y = e.y
            },
            _middle: function(e, t) {
                t.y = (e.height - t.height) / 2 || 0
            },
            _bottom: function(e, t) {
                t.y = e.height - t.height
            },
            _stretch: function(e, t) {
                t.x = 0, t.y = 0, t.height = e.height, t.width = e.width
            },
            _align: function(e, t) {
                return e = s.toRect(e), t(this.container, e), e
            }
        }), u = C.extend({
            init: function(e, t) {
                this.r = e, this.angle = t
            }
        }), h = C.extend({
            init: function(e, t, n, i, r, o) {
                this.a = e || 0, this.b = t || 0, this.c = n || 0, this.d = i || 0, this.e = r || 0, this.f = o || 0
            },
            plus: function(e) {
                this.a += e.a, this.b += e.b, this.c += e.c, this.d += e.d, this.e += e.e, this.f += e.f
            },
            minus: function(e) {
                this.a -= e.a, this.b -= e.b, this.c -= e.c, this.d -= e.d, this.e -= e.e, this.f -= e.f
            },
            times: function(e) {
                return new h(this.a * e.a + this.c * e.b, this.b * e.a + this.d * e.b, this.a * e.c + this.c * e.d, this.b * e.c + this.d * e.d, this.a * e.e + this.c * e.f + this.e, this.b * e.e + this.d * e.f + this.f)
            },
            apply: function(e) {
                return new A(this.a * e.x + this.c * e.y + this.e, this.b * e.x + this.d * e.y + this.f)
            },
            applyRect: function(e) {
                return s.fromPoints(this.apply(e.topLeft()), this.apply(e.bottomRight()))
            },
            toString: function() {
                return "matrix(" + this.a + " " + this.b + " " + this.c + " " + this.d + " " + this.e + " " + this.f + ")"
            }
        }), S(h, {
            fromSVGMatrix: function(e) {
                var t = new h;
                return t.a = e.a, t.b = e.b, t.c = e.c, t.d = e.d, t.e = e.e, t.f = e.f, t
            },
            fromMatrixVector: function(e) {
                var t = new h;
                return t.a = e.a, t.b = e.b, t.c = e.c, t.d = e.d, t.e = e.e, t.f = e.f, t
            },
            fromList: function(e) {
                if (6 !== e.length) throw "The given list should consist of six elements.";
                var t = new h;
                return t.a = e[0], t.b = e[1], t.c = e[2], t.d = e[3], t.e = e[4], t.f = e[5], t
            },
            translation: function(e, t) {
                var n = new h;
                return n.a = 1, n.b = 0, n.c = 0, n.d = 1, n.e = e, n.f = t, n
            },
            unit: function() {
                return new h(1, 0, 0, 1, 0, 0)
            },
            rotation: function(e, t, n) {
                var i = new h;
                return i.a = Math.cos(e * Math.PI / 180), i.b = Math.sin(e * Math.PI / 180), i.c = -i.b, i.d = i.a, i.e = t - t * i.a + n * i.b || 0, i.f = n - n * i.a - t * i.b || 0, i
            },
            scaling: function(e, t) {
                var n = new h;
                return n.a = e, n.b = 0, n.c = 0, n.d = t, n.e = 0, n.f = 0, n
            },
            parse: function(e) {
                var t, n;
                if (e) {
                    if (e = e.trim(), "matrix" === e.slice(0, 6).toLowerCase()) {
                        if (n = e.slice(7, e.length - 1).trim(), t = n.split(","), 6 === t.length) return h.fromList(I(t, function(e) {
                            return parseFloat(e)
                        }));
                        if (t = n.split(" "), 6 === t.length) return h.fromList(I(t, function(e) {
                            return parseFloat(e)
                        }))
                    }
                    if ("(" === e.slice(0, 1) && ")" === e.slice(e.length - 1) && (e = e.substr(1, e.length - 1)), e.indexOf(",") > 0 && (t = e.split(","), 6 === t.length)) return h.fromList(I(t, function(e) {
                        return parseFloat(e)
                    }));
                    if (e.indexOf(" ") > 0 && (t = e.split(" "), 6 === t.length)) return h.fromList(I(t, function(e) {
                        return parseFloat(e)
                    }))
                }
                return t
            }
        }), f = C.extend({
            init: function(e, t, n, i, r, o) {
                this.a = e || 0, this.b = t || 0, this.c = n || 0, this.d = i || 0, this.e = r || 0, this.f = o || 0
            },
            fromMatrix: function(e) {
                var t = new f;
                return t.a = e.a, t.b = e.b, t.c = e.c, t.d = e.d, t.e = e.e, t.f = e.f, t
            }
        }), p = {
            _distanceToLineSquared: function(e, t, n) {
                function i(e, t) {
                    return (e.x - t.x) * (e.x - t.x) + (e.y - t.y) * (e.y - t.y)
                }
                if (t === n) return i(e, t);
                var r = n.x - t.x,
                    o = n.y - t.y,
                    a = (e.x - t.x) * r + (e.y - t.y) * o;
                return 0 > a ? i(t, e) : (a = (n.x - e.x) * r + (n.y - e.y) * o, 0 > a ? i(n, e) : (a = (n.x - e.x) * o - (n.y - e.y) * r, a * a / (r * r + o * o)))
            },
            distanceToLine: function(e, t, n) {
                return Math.sqrt(this._distanceToLineSquared(e, t, n))
            },
            distanceToPolyline: function(e, t) {
                var n, i, r, o, a = Number.MAX_VALUE;
                if (D.isUndefined(t) || 0 === t.length) return Number.MAX_VALUE;
                for (n = 0; t.length - 1 > n; n++) i = t[n], r = t[n + 1], o = this._distanceToLineSquared(e, i, r), a > o && (a = o);
                return Math.sqrt(a)
            }
        }, m = k.Class.extend({
            init: function() {
                this._buckets = [], this.length = 0
            },
            add: function(e, t) {
                var n = this._createGetBucket(e);
                return D.isDefined(t) && (n.value = t), n
            },
            get: function(e) {
                return this._bucketExists(e) ? this._createGetBucket(e) : null
            },
            set: function(e, t) {
                this.add(e, t)
            },
            containsKey: function(e) {
                return this._bucketExists(e)
            },
            remove: function(e) {
                if (this._bucketExists(e)) {
                    var t = this._hash(e);
                    return delete this._buckets[t], this.length--, e
                }
            },
            forEach: function(e) {
                var t, n, i, r, o = this._hashes();
                for (t = 0, n = o.length; n > t; t++) i = o[t], r = this._buckets[i], D.isUndefined(r) || e(r)
            },
            clone: function() {
                var e, t, n, i, r = new m,
                    o = this._hashes();
                for (e = 0, t = o.length; t > e; e++) n = o[e], i = this._buckets[n], D.isUndefined(i) || r.add(i.key, i.value);
                return r
            },
            _hashes: function() {
                var e, t = [];
                for (e in this._buckets) this._buckets.hasOwnProperty(e) && t.push(e);
                return t
            },
            _bucketExists: function(e) {
                var t = this._hash(e);
                return D.isDefined(this._buckets[t])
            },
            _createGetBucket: function(e) {
                var t = this._hash(e),
                    n = this._buckets[t];
                return D.isUndefined(n) && (n = {
                    key: e
                }, this._buckets[t] = n, this.length++), n
            },
            _hash: function(e) {
                if (D.isNumber(e)) return e;
                if (D.isString(e)) return this._hashString(e);
                if (D.isObject(e)) return this._objectHashId(e);
                throw "Unsupported key type."
            },
            _hashString: function(e) {
                var t, n, i = 0;
                if (0 === e.length) return i;
                for (t = 0; e.length > t; t++) n = e.charCodeAt(t), i = 32 * i - i + n;
                return i
            },
            _objectHashId: function(e) {
                var t = e._hashId;
                return D.isUndefined(t) && (t = o(), e._hashId = t), t
            }
        }), g = k.Observable.extend({
            init: function(t) {
                var n, i = this;
                if (k.Observable.fn.init.call(i), this._hashTable = new m, this.length = 0, D.isDefined(t))
                    if (e.isArray(t))
                        for (n = 0; t.length > n; n++) this.add(t[n]);
                    else t.forEach(function(e, t) {
                        this.add(e, t)
                    }, this)
            },
            add: function(e, t) {
                var n = this._hashTable.get(e);
                n || (n = this._hashTable.add(e), this.length++, this.trigger("changed")), n.value = t
            },
            set: function(e, t) {
                this.add(e, t)
            },
            get: function(e) {
                var t = this._hashTable.get(e);
                if (t) return t.value;
                throw Error("Cannot find key " + e)
            },
            containsKey: function(e) {
                return this._hashTable.containsKey(e)
            },
            remove: function(e) {
                return this.containsKey(e) ? (this.trigger("changed"), this.length--, this._hashTable.remove(e)) : t
            },
            forEach: function(e, t) {
                this._hashTable.forEach(function(n) {
                    e.call(t, n.key, n.value)
                })
            },
            forEachValue: function(e, t) {
                this._hashTable.forEach(function(n) {
                    e.call(t, n.value)
                })
            },
            forEachKey: function(e, t) {
                this._hashTable.forEach(function(n) {
                    e.call(t, n.key)
                })
            },
            keys: function() {
                var e = [];
                return this.forEachKey(function(t) {
                    e.push(t)
                }), e
            }
        }), v = k.Class.extend({
            init: function() {
                this._tail = null, this._head = null, this.length = 0
            },
            enqueue: function(e) {
                var t = {
                    value: e,
                    next: null
                };
                this._head ? (this._tail.next = t, this._tail = this._tail.next) : (this._head = t, this._tail = this._head), this.length++
            },
            dequeue: function() {
                if (1 > this.length) throw Error("The queue is empty.");
                var e = this._head.value;
                return this._head = this._head.next, this.length--, e
            },
            contains: function(e) {
                for (var t = this._head; t;) {
                    if (t.value === e) return !0;
                    t = t.next
                }
                return !1
            }
        }), _ = k.Observable.extend({
            init: function(e) {
                var t = this;
                k.Observable.fn.init.call(t), this._hashTable = new m, this.length = 0, D.isDefined(e) && (e instanceof m ? e.forEach(function(e) {
                    this.add(e)
                }) : e instanceof g && e.forEach(function(e, t) {
                    this.add({
                        key: e,
                        value: t
                    })
                }, this))
            },
            contains: function(e) {
                return this._hashTable.containsKey(e)
            },
            add: function(e) {
                var t = this._hashTable.get(e);
                t || (this._hashTable.add(e, e), this.length++, this.trigger("changed"))
            },
            get: function(e) {
                return this.contains(e) ? this._hashTable.get(e).value : null
            },
            hash: function(e) {
                return this._hashTable._hash(e)
            },
            remove: function(e) {
                this.contains(e) && (this._hashTable.remove(e), this.length--, this.trigger("changed"))
            },
            forEach: function(e, t) {
                this._hashTable.forEach(function(t) {
                    e(t.value)
                }, t)
            },
            toArray: function() {
                var e = [];
                return this.forEach(function(t) {
                    e.push(t)
                }), e
            }
        }), b = k.Class.extend({
            init: function(e, t) {
                if (this.links = [], this.outgoing = [], this.incoming = [], this.weight = 1, this.id = D.isDefined(e) ? e : o(), D.isDefined(t)) {
                    this.associatedShape = t;
                    var n = t.bounds();
                    this.width = n.width, this.height = n.height, this.x = n.x, this.y = n.y
                } else this.associatedShape = null;
                this.data = null, this.type = "Node", this.shortForm = "Node '" + this.id + "'", this.isVirtual = !1
            },
            isIsolated: function() {
                return D.isEmpty(this.links)
            },
            bounds: function(e) {
                return D.isDefined(e) ? (this.x = e.x, this.y = e.y, this.width = e.width, this.height = e.height, t) : new x.Rect(this.x, this.y, this.width, this.height)
            },
            isLinkedTo: function(e) {
                var t = this;
                return D.any(t.links, function(n) {
                    return n.getComplement(t) === e
                })
            },
            getChildren: function() {
                var e, t, n, i;
                if (0 === this.outgoing.length) return [];
                for (e = [], t = 0, n = this.outgoing.length; n > t; t++) i = this.outgoing[t], e.push(i.getComplement(this));
                return e
            },
            getParents: function() {
                var e, t, n, i;
                if (0 === this.incoming.length) return [];
                for (e = [], t = 0, n = this.incoming.length; n > t; t++) i = this.incoming[t], e.push(i.getComplement(this));
                return e
            },
            clone: function() {
                var e = new b;
                return D.isDefined(this.weight) && (e.weight = this.weight), D.isDefined(this.balance) && (e.balance = this.balance), D.isDefined(this.owner) && (e.owner = this.owner), e.associatedShape = this.associatedShape, e.x = this.x, e.y = this.y, e.width = this.width, e.height = this.height, e
            },
            adjacentTo: function(e) {
                return null !== this.isLinkedTo(e)
            },
            removeLink: function(e) {
                e.source === this && (D.remove(this.links, e), D.remove(this.outgoing, e), e.source = null), e.target === this && (D.remove(this.links, e), D.remove(this.incoming, e), e.target = null)
            },
            hasLinkTo: function(e) {
                return D.any(this.outgoing, function(t) {
                    return t.target === e
                })
            },
            degree: function() {
                return this.links.length
            },
            incidentWith: function(e) {
                return F(this.links, e)
            },
            getLinksWith: function(e) {
                return D.all(this.links, function(t) {
                    return t.getComplement(this) === e
                }, this)
            },
            getNeighbors: function() {
                var e = [];
                return D.forEach(this.incoming, function(t) {
                    e.push(t.getComplement(this))
                }, this), D.forEach(this.outgoing, function(t) {
                    e.push(t.getComplement(this))
                }, this), e
            }
        }), w = k.Class.extend({
            init: function(e, t, n, i) {
                if (D.isUndefined(e)) throw "The source of the new link is not set.";
                if (D.isUndefined(t)) throw "The target of the new link is not set.";
                var r, a;
                r = D.isString(e) ? new b(e) : e, a = D.isString(t) ? new b(t) : t, this.source = r, this.target = a, this.source.links.push(this), this.target.links.push(this), this.source.outgoing.push(this), this.target.incoming.push(this), this.id = D.isDefined(n) ? n : o(), this.associatedConnection = D.isDefined(i) ? i : null, this.type = "Link", this.shortForm = "Link '" + this.source.id + "->" + this.target.id + "'"
            },
            getComplement: function(e) {
                if (this.source !== e && this.target !== e) throw "The given node is not incident with this link.";
                return this.source === e ? this.target : this.source
            },
            getCommonNode: function(e) {
                return this.source === e.source || this.source === e.target ? this.source : this.target === e.source || this.target === e.target ? this.target : null
            },
            isBridging: function(e, t) {
                return this.source === e && this.target === t || this.source === t && this.target === e
            },
            getNodes: function() {
                return [this.source, this.target]
            },
            incidentWith: function(e) {
                return this.source === e || this.target === e
            },
            adjacentTo: function(e) {
                return F(this.source.links, e) || F(this.target.links, e)
            },
            changeSource: function(e) {
                D.remove(this.source.links, this), D.remove(this.source.outgoing, this), e.links.push(this), e.outgoing.push(this), this.source = e
            },
            changeTarget: function(e) {
                D.remove(this.target.links, this), D.remove(this.target.incoming, this), e.links.push(this), e.incoming.push(this), this.target = e
            },
            changesNodes: function(e, t) {
                this.source === e ? this.changeSource(t) : this.target === e && this.changeTarget(t)
            },
            reverse: function() {
                var e = this.source,
                    t = this.target;
                return this.source = t, D.remove(e.outgoing, this), this.source.outgoing.push(this), this.target = e, D.remove(t.incoming, this), this.target.incoming.push(this), this
            },
            directTo: function(e) {
                if (this.source !== e && this.target !== e) throw "The given node is not incident with this link.";
                this.target !== e && this.reverse()
            },
            createReverseEdge: function() {
                var e = this.clone();
                return e.reverse(), e.reversed = !0, e
            },
            clone: function() {
                var e = new w(this.source, this.target);
                return e
            }
        }), y = k.Class.extend({
            init: function(e) {
                this.links = [], this.nodes = [], this._nodeMap = new g, this.diagram = null, this._root = null, D.isDefined(e) ? D.isString(e) ? this.id = e : (this.diagram = e, this.id = e.id) : this.id = o(), this.bounds = new s, this._hasCachedRelationships = !1, this.type = "Graph"
            },
            cacheRelationships: function(e) {
                var t, n, i;
                if (D.isUndefined(e) && (e = !1), !this._hasCachedRelationships || e) {
                    for (t = 0, n = this.nodes.length; n > t; t++) i = this.nodes[t], i.children = this.getChildren(i), i.parents = this.getParents(i);
                    this._hasCachedRelationships = !0
                }
            },
            assignLevels: function(e, t, n) {
                var i, r, o, a;
                if (!e) throw "Start node not specified.";
                for (D.isUndefined(t) && (t = 0), this.cacheRelationships(), D.isUndefined(n) && (n = new g, D.forEach(this.nodes, function(e) {
                    n.add(e, !1)
                })), n.set(e, !0), e.level = t, i = e.children, r = 0, o = i.length; o > r; r++) a = i[r], a && !n.get(a) && this.assignLevels(a, t + 1, n)
            },
            root: function(e) {
                if (D.isUndefined(e)) {
                    if (this._root) return this._root;
                    var t = D.first(this.nodes, function(e) {
                        return 0 === e.incoming.length
                    });
                    return t ? t : D.first(this.nodes)
                }
                this._root = e
            },
            getConnectedComponents: function() {
                var e, t, n, i, r;
                for (this.componentIndex = 0, this.setItemIndices(), e = D.initArray(this.nodes.length, -1), t = 0; this.nodes.length > t; t++) - 1 === e[t] && (this._collectConnectedNodes(e, t), this.componentIndex++);
                for (n = [], i = 0; this.componentIndex > i; ++i) n[i] = new y;
                for (i = 0; e.length > i; ++i) r = n[e[i]], r.addNodeAndOutgoings(this.nodes[i]);
                return n.sort(function(e, t) {
                    return t.nodes.length - e.nodes.length
                }), n
            },
            _collectConnectedNodes: function(e, t) {
                e[t] = this.componentIndex;
                var n = this.nodes[t];
                D.forEach(n.links, function(t) {
                    var i = t.getComplement(n),
                        r = i.index; - 1 === e[r] && this._collectConnectedNodes(e, r)
                }, this)
            },
            calcBounds: function() {
                var e, t, n, i;
                if (this.isEmpty()) return this.bounds = new s;
                for (e = null, t = 0, n = this.nodes.length; n > t; t++) i = this.nodes[t], e = e ? e.union(i.bounds()) : i.bounds();
                return this.bounds = e
            },
            getSpanningTree: function(e) {
                var t, n, i, r, o, a, s, l, c, d, u, h, f = new y,
                    p = new g;
                for (f.root = e.clone(), f.root.level = 0, f.root.id = e.id, p.add(e, f.root), e.level = 0, i = [], r = [], f._addNode(f.root), i.push(e), r.push(e), o = 1; r.length > 0;)
                    for (a = r.pop(), s = 0; a.links.length > s; s++) l = a.links[s], c = l.getComplement(a), F(i, c) || (c.level = a.level + 1, c.level + 1 > o && (o = c.level + 1), F(r, c) || r.push(c), F(i, c) || i.push(c), p.containsKey(a) ? t = p.get(a) : (t = a.clone(), t.level = a.level, t.id = a.id, p.add(a, t)), p.containsKey(c) ? n = p.get(c) : (n = c.clone(), n.level = c.level, n.id = c.id, p.add(c, n)), d = new w(t, n), f.addLink(d));
                for (u = [], h = 0; o > h; h++) u.push([]);
                return D.forEach(f.nodes, function(e) {
                    u[e.level].push(e)
                }), f.treeLevels = u, f.cacheRelationships(), f
            },
            takeRandomNode: function(t, n) {
                if (D.isUndefined(t) && (t = []), D.isUndefined(n) && (n = 4), 0 === this.nodes.length) return null;
                if (1 === this.nodes.length) return F(t, this.nodes[0]) ? null : this.nodes[0];
                var i = e.grep(this.nodes, function(e) {
                    return !F(t, e) && e.degree() <= n
                });
                return D.isEmpty(i) ? null : i[D.randomInteger(0, i.length)]
            },
            isEmpty: function() {
                return D.isEmpty(this.nodes)
            },
            isHealthy: function() {
                return D.all(this.links, function(e) {
                    return F(this.nodes, e.source) && F(this.nodes, e.target)
                }, this)
            },
            getParents: function(e) {
                if (!this.hasNode(e)) throw "The given node is not part of this graph.";
                return e.getParents()
            },
            getChildren: function(e) {
                if (!this.hasNode(e)) throw "The given node is not part of this graph.";
                return e.getChildren()
            },
            addLink: function(e, n, i) {
                var r, o, a;
                if (D.isUndefined(e)) throw "The source of the link is not defined.";
                if (D.isUndefined(n)) {
                    if (D.isDefined(e.type) && "Link" === e.type) return this.addExistingLink(e), t;
                    throw "The target of the link is not defined."
                }
                return r = this.getNode(e), D.isUndefined(r) && (r = this.addNode(e)), o = this.getNode(n), D.isUndefined(o) && (o = this.addNode(n)), a = new w(r, o), D.isDefined(i) && (a.owner = i), this.links.push(a), a
            },
            removeAllLinks: function() {
                for (; this.links.length > 0;) {
                    var e = this.links[0];
                    this.removeLink(e)
                }
            },
            addExistingLink: function(e) {
                var t, n;
                this.hasLink(e) || (this.links.push(e), this.hasNode(e.source.id) ? (t = this.getNode(e.source.id), e.changeSource(t)) : this.addNode(e.source), this.hasNode(e.target.id) ? (n = this.getNode(e.target.id), e.changeTarget(n)) : this.addNode(e.target))
            },
            hasLink: function(e) {
                if (D.isString(e)) return D.any(this.links, function(t) {
                    return t.id === e
                });
                if ("Link" === e.type) return F(this.links, e);
                throw "The given object is neither an identifier nor a Link."
            },
            getNode: function(e) {
                var n = e.id || e;
                return this._nodeMap.containsKey(n) ? this._nodeMap.get(n) : t
            },
            hasNode: function(e) {
                var t = e.id || e;
                return this._nodeMap.containsKey(t)
            },
            _addNode: function(e) {
                this.nodes.push(e), this._nodeMap.add(e.id, e)
            },
            _removeNode: function(e) {
                D.remove(this.nodes, e), this._nodeMap.remove(e.id)
            },
            removeNode: function(e) {
                var t, n, i, r, o = e;
                if (D.isString(e) && (o = this.getNode(e)), !D.isDefined(o)) throw "The identifier should be a Node or the Id (string) of a node.";
                for (t = o.links, o.links = [], n = 0, i = t.length; i > n; n++) r = t[n], this.removeLink(r);
                this._removeNode(o)
            },
            areConnected: function(e, t) {
                return D.any(this.links, function(n) {
                    return n.source == e && n.target == t || n.source == t && n.target == e
                })
            },
            removeLink: function(e) {
                D.remove(this.links, e), D.remove(e.source.outgoing, e), D.remove(e.source.links, e), D.remove(e.target.incoming, e), D.remove(e.target.links, e)
            },
            addNode: function(e, t, n) {
                var i = null;
                if (!D.isDefined(e)) throw "No Node or identifier for a new Node is given.";
                if (D.isString(e)) {
                    if (this.hasNode(e)) return this.getNode(e);
                    i = new b(e)
                } else {
                    if (this.hasNode(e)) return this.getNode(e);
                    i = e
                }
                return D.isDefined(t) && i.bounds(t), D.isDefined(n) && (i.owner = n), this._addNode(i), i
            },
            addNodeAndOutgoings: function(e) {
                this.hasNode(e) || this._addNode(e);
                var t = e.outgoing;
                e.outgoing = [], D.forEach(t, function(e) {
                    this.addExistingLink(e)
                }, this)
            },
            setItemIndices: function() {
                var e;
                for (e = 0; this.nodes.length > e; ++e) this.nodes[e].index = e;
                for (e = 0; this.links.length > e; ++e) this.links[e].index = e
            },
            clone: function(e) {
                var t, n = new y,
                    i = D.isDefined(e) && e === !0;
                return i && (n.nodeMap = new g, n.linkMap = new g), t = new g, D.forEach(this.nodes, function(e) {
                    var r = e.clone();
                    t.set(e, r), n._addNode(r), i && n.nodeMap.set(r, e)
                }), D.forEach(this.links, function(e) {
                    if (t.containsKey(e.source) && t.containsKey(e.target)) {
                        var r = n.addLink(t.get(e.source), t.get(e.target));
                        i && n.linkMap.set(r, e)
                    }
                }), n
            },
            linearize: function(e) {
                return y.Utils.linearize(this, e)
            },
            depthFirstTraversal: function(e, t) {
                var n, i;
                if (D.isUndefined(e)) throw "You need to supply a starting node.";
                if (D.isUndefined(t)) throw "You need to supply an action.";
                if (!this.hasNode(e)) throw "The given start-node is not part of this graph";
                n = this.getNode(e), i = [], this._dftIterator(n, t, i)
            },
            _dftIterator: function(e, t, n) {
                var i, r, o, a;
                for (t(e), n.push(e), i = e.getChildren(), r = 0, o = i.length; o > r; r++) a = i[r], F(n, a) || this._dftIterator(a, t, n)
            },
            breadthFirstTraversal: function(e, t) {
                var n, i, r, o, a, s, l, c;
                if (D.isUndefined(e)) throw "You need to supply a starting node.";
                if (D.isUndefined(t)) throw "You need to supply an action.";
                if (!this.hasNode(e)) throw "The given start-node is not part of this graph";
                for (n = this.getNode(e),
                         i = new v, r = [], i.enqueue(n); i.length > 0;)
                    for (o = i.dequeue(), t(o), r.push(o), a = o.getChildren(), s = 0, l = a.length; l > s; s++) c = a[s], F(r, c) || F(i, c) || i.enqueue(c)
            },
            _stronglyConnectedComponents: function(e, t, n, i, r, o, a) {
                var s, l, c, d, u;
                for (n.add(t, a), i.add(t, a), a++, o.push(t), s = t.getChildren(), c = 0, d = s.length; d > c; c++) l = s[c], n.containsKey(l) ? F(o, l) && i.add(t, Math.min(i.get(t), n.get(l))) : (this._stronglyConnectedComponents(e, l, n, i, r, o, a), i.add(t, Math.min(i.get(t), i.get(l))));
                if (i.get(t) === n.get(t)) {
                    u = [];
                    do l = o.pop(), u.push(l); while (l !== t);
                    (!e || u.length > 1) && r.push(u)
                }
            },
            findCycles: function(e) {
                var t, n, i, r, o, a, s;
                for (D.isUndefined(e) && (e = !0), t = new g, n = new g, i = [], r = [], o = 0, a = this.nodes.length; a > o; o++) s = this.nodes[o], t.containsKey(s) || this._stronglyConnectedComponents(e, s, t, n, i, r, 0);
                return i
            },
            isAcyclic: function() {
                return D.isEmpty(this.findCycles())
            },
            isSubGraph: function(e) {
                var t = e.linearize(),
                    n = this.linearize();
                return D.all(t, function(e) {
                    return F(n, e)
                })
            },
            makeAcyclic: function() {
                var e, t, n, i, r, o, a, s, l, c, d, u, h, f, p, m, v, _, b, w, y, k, x, C, S, T, A, E, F, I, M, R;
                if (this.isEmpty() || 1 >= this.nodes.length || 1 >= this.links.length) return [];
                if (2 == this.nodes.length) {
                    if (e = [], this.links.length > 1)
                        for (t = this.links[0], n = t.source, i = 0, r = this.links.length; r > i; i++) o = this.links[i], o.source != n && (a = o.reverse(), e.push(a));
                    return e
                }
                for (s = this.clone(!0), l = this.nodes.length, c = new g, d = function(e) {
                    return 0 === e.outgoing.length ? 2 - l : 0 === e.incoming.length ? l - 2 : e.outgoing.length - e.incoming.length
                }, u = function(e, t) {
                    var n = d(e, l);
                    t.containsKey(n) || t.set(n, []), t.get(n).push(e)
                }, D.forEach(s.nodes, function(e) {
                    u(e, c)
                }), h = [], f = []; s.nodes.length > 0;) {
                    if (c.containsKey(2 - l))
                        for (_ = c.get(2 - l); _.length > 0;) {
                            for (m = _.pop(), b = 0; m.links.length > b; b++) w = m.links[b], p = w.getComplement(m), v = d(p, l), D.remove(c.get(v), p), p.removeLink(w), u(p, c);
                            s._removeNode(m), f.unshift(m)
                        }
                    if (c.containsKey(l - 2))
                        for (y = c.get(l - 2); y.length > 0;) {
                            for (p = y.pop(), k = 0; p.links.length > k; k++) x = p.links[k], m = x.getComplement(p), v = d(m, l), D.remove(c.get(v), m), m.removeLink(x), u(m, c);
                            h.push(p), s._removeNode(p)
                        }
                    if (s.nodes.length > 0)
                        for (C = l - 3; C > 2 - l; C--)
                            if (c.containsKey(C) && c.get(C).length > 0) {
                                for (S = c.get(C), T = S.pop(), A = 0; T.links.length > A; A++) E = T.links[A], F = E.getComplement(T), v = d(F, l), D.remove(c.get(v), F), F.removeLink(E), u(F, c);
                                h.push(T), s._removeNode(T);
                                break
                            }
                }
                for (h = h.concat(f), I = new g, M = 0; this.nodes.length > M; M++) I.set(s.nodeMap.get(h[M]), M);
                return R = [], D.forEach(this.links, function(e) {
                    I.get(e.source) > I.get(e.target) && (e.reverse(), R.push(e))
                }), R
            }
        }), y.Predefined = {
            EightGraph: function() {
                return y.Utils.parse(["1->2", "2->3", "3->4", "4->1", "3->5", "5->6", "6->7", "7->3"])
            },
            Mindmap: function() {
                return y.Utils.parse(["0->1", "0->2", "0->3", "0->4", "0->5", "1->6", "1->7", "7->8", "2->9", "9->10", "9->11", "3->12", "12->13", "13->14", "4->15", "4->16", "15->17", "15->18", "18->19", "18->20", "14->21", "14->22", "5->23", "23->24", "23->25", "6->26"])
            },
            ThreeGraph: function() {
                return y.Utils.parse(["1->2", "2->3", "3->1"])
            },
            BinaryTree: function(e) {
                return D.isUndefined(e) && (e = 5), y.Utils.createBalancedTree(e, 2)
            },
            Linear: function(e) {
                return D.isUndefined(e) && (e = 10), y.Utils.createBalancedTree(e, 1)
            },
            Tree: function(e, t) {
                return y.Utils.createBalancedTree(e, t)
            },
            Forest: function(e, t, n) {
                return y.Utils.createBalancedForest(e, t, n)
            },
            Workflow: function() {
                return y.Utils.parse(["0->1", "1->2", "2->3", "1->4", "4->3", "3->5", "5->6", "6->3", "6->7", "5->4"])
            },
            Grid: function(e, t) {
                var n, i, r, o, a, s = new x.Graph;
                if (0 >= e && 0 >= t) return s;
                for (n = 0; e + 1 > n; n++)
                    for (i = null, r = 0; t + 1 > r; r++) o = new b("" + n + "." + r), s.addNode(o), i && s.addLink(i, o), n > 0 && (a = s.getNode("" + (n - 1) + "." + r), s.addLink(a, o)), i = o;
                return s
            }
        }, y.Utils = {
            parse: function(e) {
                var t, n, i, r, o, a = new x.Graph,
                    s = e.slice();
                for (n = 0, i = s.length; i > n; n++) {
                    if (r = s[n], D.isString(r)) {
                        if (r.indexOf("->") < 0) throw "The link should be specified as 'a->b'.";
                        if (o = r.split("->"), 2 != o.length) throw "The link should be specified as 'a->b'.";
                        t = new w(o[0], o[1]), a.addLink(t)
                    }
                    if (D.isObject(r)) {
                        if (!t) throw "Specification found before Link definition.";
                        k.deepExtend(t, r)
                    }
                }
                return a
            },
            linearize: function(e, t) {
                var n, i, r, o;
                if (D.isUndefined(e)) throw "Expected an instance of a Graph object in slot one.";
                for (D.isUndefined(t) && (t = !1), n = [], i = 0, r = e.links.length; r > i; i++) o = e.links[i], n.push(o.source.id + "->" + o.target.id), t && n.push({
                    id: o.id
                });
                return n
            },
            _addShape: function(e, t, n, i) {
                return D.isUndefined(t) && (t = new x.Point(0, 0)), D.isUndefined(n) && (n = o()), i = k.deepExtend({
                    width: 20,
                    height: 20,
                    id: n,
                    radius: 10,
                    fill: "#778899",
                    data: "circle",
                    undoable: !1,
                    x: t.x,
                    y: t.y
                }, i), e.addShape(i)
            },
            _addConnection: function(e, t, n, i) {
                return e.connect(t, n, i)
            },
            createDiagramFromGraph: function(e, t, n, i) {
                var r, o, a, l, c, d, u, h, f, p, m, g, v, _, b, w;
                if (D.isUndefined(e)) throw "The diagram surface is undefined.";
                if (D.isUndefined(t)) throw "No graph specification defined.";
                for (D.isUndefined(n) && (n = !0), D.isUndefined(i) && (i = !1), r = e.element.clientWidth || 200, o = e.element.clientHeight || 200, a = [], d = 0, u = t.nodes.length; u > d; d++) l = t.nodes[d], h = l.position, D.isUndefined(h) && (h = D.isDefined(l.x) && D.isDefined(l.y) ? new A(l.x, l.y) : new A(D.randomInteger(10, r - 20), D.randomInteger(10, o - 20))), f = {}, "0" === l.id || i && k.deepExtend(f, {
                    width: 150 * Math.random() + 20,
                    height: 80 * Math.random() + 50,
                    data: "rectangle",
                    fill: {
                        color: "#778899"
                    }
                }), c = this._addShape(e, h, l.id, f), p = c.bounds(), D.isDefined(p) && (l.x = p.x, l.y = p.y, l.width = p.width, l.height = p.height), a[l.id] = c;
                for (m = 0; t.links.length > m; m++) g = t.links[m], v = a[g.source.id], D.isUndefined(v) || (_ = a[g.target.id], D.isUndefined(_) || this._addConnection(e, v, _, {
                    id: g.id
                }));
                if (n)
                    for (b = new e.SpringLayout(e), b.layoutGraph(t, {
                        limitToView: !1
                    }), w = 0; t.nodes.length > w; w++) l = t.nodes[w], c = a[l.id], c.bounds(new s(l.x, l.y, l.width, l.height))
            },
            createBalancedTree: function(e, t) {
                var n, i, r, o, a, s, l, c, d, u;
                if (D.isUndefined(e) && (e = 3), D.isUndefined(t) && (t = 3), n = new x.Graph, i = -1, r = [], 0 >= e || 0 >= t) return n;
                for (a = new b("" + ++i), n.addNode(a), n.root = a, r.push(a), s = 0; e > s; s++) {
                    for (o = [], l = 0; r.length > l; l++)
                        for (c = r[l], d = 0; t > d; d++) u = new b("" + ++i), n.addLink(c, u), o.push(u);
                    r = o
                }
                return n
            },
            createBalancedForest: function(e, t, n) {
                var i, r, o, a, s, l, c, d, u, h, f;
                if (D.isUndefined(e) && (e = 3), D.isUndefined(t) && (t = 3), D.isUndefined(n) && (n = 5), i = new x.Graph, r = -1, o = [], 0 >= e || 0 >= t || 0 >= n) return i;
                for (s = 0; n > s; s++)
                    for (l = new b("" + ++r), i.addNode(l), o = [l], c = 0; e > c; c++) {
                        for (a = [], d = 0; o.length > d; d++)
                            for (u = o[d], h = 0; t > h; h++) f = new b("" + ++r), i.addLink(u, f), a.push(f);
                        o = a
                    }
                return i
            },
            createRandomConnectedGraph: function(e, t, n) {
                var i, r, o, a, s, l, c, d, u, h;
                if (D.isUndefined(e) && (e = 40), D.isUndefined(t) && (t = 4), D.isUndefined(n) && (n = !1), i = new x.Graph, r = -1, 0 >= e) return i;
                if (o = new b("" + ++r), i.addNode(o), 1 === e) return i;
                if (e > 1) {
                    for (a = 1; e > a && (s = i.takeRandomNode([], t), s); a++) l = i.addNode("" + a), i.addLink(s, l);
                    if (!n && e > 1)
                        for (c = D.randomInteger(1, e), d = 0; c > d; d++) u = i.takeRandomNode([], t), h = i.takeRandomNode([], t), u && h && !i.areConnected(u, h) && i.addLink(u, h);
                    return i
                }
            },
            randomDiagram: function(e, t, n, i, r) {
                var o = k.dataviz.diagram.Graph.Utils.createRandomConnectedGraph(t, n, i);
                y.Utils.createDiagramFromGraph(e, o, !1, r)
            }
        }, k.deepExtend(x, {
            init: function(e) {
                k.init(e, x.ui)
            },
            Point: A,
            Intersect: c,
            Geometry: p,
            Rect: s,
            Size: l,
            RectAlign: d,
            Matrix: h,
            MatrixVector: f,
            normalVariable: r,
            randomId: o,
            Dictionary: g,
            HashTable: m,
            Queue: v,
            Set: _,
            Node: b,
            Link: w,
            Graph: y,
            PathDefiner: a
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/diagram/svg.min", ["kendo.drawing.min", "dataviz/diagram/math.min"], e)
}(function() {
    ! function(e, t) {
        function n(e, t) {
            var n, i, r, o = this.options,
                a = !1;
            for (r = 0; t.length > r; r++) i = t[r], n = e[i], H(n) && o[i] !== n && (o[i] = n, a = !0);
            return a
        }

        function i(e) {
            return {
                x: e.x || 0,
                y: e.y || 0,
                width: e.width || 0,
                height: e.height || 0
            }
        }

        function r(e) {
            if (e) {
                var t = e;
                return N(t) && (t = {
                    color: t
                }), t.color && (t.color = o(t.color)), t
            }
        }

        function o(e) {
            var t;
            return t = e != q ? new U.Color(e).toHex() : e
        }

        function a(e, t) {
            var n = t.x - e.x,
                i = t.y - e.y,
                r = F.util.deg(Math.atan2(i, n));
            return r
        }

        function s(e, t) {
            return new U.Segment(new V.Point(e, t))
        }

        function l(e) {
            return e ? new V.Rect([e.x, e.y], [e.width, e.height]) : t
        }
        var c, d, u, h, f, p, m, g, v, _, b, w, y, k, x, C, S, T, D, A, E, F = window.kendo,
            I = F.dataviz.diagram,
            M = F.Class,
            R = F.deepExtend,
            P = I.Point,
            z = I.Rect,
            B = I.Matrix,
            L = I.Utils,
            H = L.isNumber,
            N = L.isString,
            O = I.MatrixVector,
            V = F.geometry,
            U = F.drawing,
            W = F.util.defined,
            j = e.inArray,
            q = "transparent",
            G = {
                none: "none",
                arrowStart: "ArrowStart",
                filledCircle: "FilledCircle",
                arrowEnd: "ArrowEnd"
            },
            $ = 360,
            Y = "start",
            K = "end",
            Q = "width",
            X = "height",
            J = "x",
            Z = "y";
        I.Markers = G, c = M.extend({
            init: function(e, t) {
                this.x = e, this.y = t
            },
            toMatrix: function() {
                return B.scaling(this.x, this.y)
            },
            toString: function() {
                return F.format("scale({0},{1})", this.x, this.y)
            },
            invert: function() {
                return new c(1 / this.x, 1 / this.y)
            }
        }), d = M.extend({
            init: function(e, t) {
                this.x = e, this.y = t
            },
            toMatrixVector: function() {
                return new O(0, 0, 0, 0, this.x, this.y)
            },
            toMatrix: function() {
                return B.translation(this.x, this.y)
            },
            toString: function() {
                return F.format("translate({0},{1})", this.x, this.y)
            },
            plus: function(e) {
                this.x += e.x, this.y += e.y
            },
            times: function(e) {
                this.x *= e, this.y *= e
            },
            length: function() {
                return Math.sqrt(this.x * this.x + this.y * this.y)
            },
            normalize: function() {
                0 !== this.Length && this.times(1 / this.length())
            },
            invert: function() {
                return new d(-this.x, -this.y)
            }
        }), u = M.extend({
            init: function(e, t, n) {
                this.x = t || 0, this.y = n || 0, this.angle = e
            },
            toString: function() {
                return this.x && this.y ? F.format("rotate({0},{1},{2})", this.angle, this.x, this.y) : F.format("rotate({0})", this.angle)
            },
            toMatrix: function() {
                return B.rotation(this.angle, this.x, this.y)
            },
            center: function() {
                return new P(this.x, this.y)
            },
            invert: function() {
                return new u($ - this.angle, this.x, this.y)
            }
        }), u.ZERO = new u(0), u.create = function(e) {
            return new u(e.angle, e.x, e.y)
        }, u.parse = function(e) {
            var t = e.slice(1, e.length - 1).split(","),
                n = t[0],
                i = t[1],
                r = t[2],
                o = new u(n, i, r);
            return o
        }, h = M.extend({
            init: function(e, n, i, r, o, a) {
                this.translate = new d(e, n), i !== t && r !== t && (this.scale = new c(i, r)), o !== t && (this.rotate = a ? new u(o, a.x, a.y) : new u(o))
            },
            toString: function() {
                var e = function(e) {
                    return e ? "" + e : ""
                };
                return e(this.translate) + e(this.rotate) + e(this.scale)
            },
            render: function(e) {
                e._transform = this, e._renderTransform()
            },
            toMatrix: function() {
                var e = B.unit();
                return this.translate && (e = e.times(this.translate.toMatrix())), this.rotate && (e = e.times(this.rotate.toMatrix())), this.scale && (e = e.times(this.scale.toMatrix())), e
            },
            invert: function() {
                var e, n, i = this.rotate ? this.rotate.invert() : t,
                    r = i ? i.toMatrix() : B.unit(),
                    o = this.scale ? this.scale.invert() : t,
                    a = o ? o.toMatrix() : B.unit(),
                    s = new P(-this.translate.x, -this.translate.y);
                return s = r.times(a).apply(s), e = new d(s.x, s.y), n = new h, n.translate = e, n.rotate = i, n.scale = o, n
            }
        }), f = {
            _setScale: function() {
                var e = this.options,
                    t = this._originWidth,
                    n = this._originHeight,
                    i = e.width / t,
                    r = e.height / n;
                H(i) || (i = 1), H(r) || (r = 1), this._transform.scale = new c(i, r)
            },
            _setTranslate: function() {
                var e = this.options,
                    t = e.x || 0,
                    n = e.y || 0;
                this._transform.translate = new d(t, n)
            },
            _initSize: function() {
                var e = this.options,
                    t = !1;
                e.autoSize !== !1 && (W(e.width) || W(e.height)) && (this._measure(!0), this._setScale(), t = !0), (W(e.x) || W(e.y)) && (this._setTranslate(), t = !0), t && this._renderTransform()
            },
            _updateSize: function(e) {
                var t = !1;
                return this.options.autoSize !== !1 && this._diffNumericOptions(e, [Q, X]) && (t = !0, this._measure(!0), this._setScale()), this._diffNumericOptions(e, [J, Z]) && (t = !0, this._setTranslate()), t && this._renderTransform(), t
            }
        }, p = M.extend({
            init: function(e) {
                var t = this;
                t.options = R({}, t.options, e), t.id = t.options.id, t._originSize = z.empty(), t._transform = new h
            },
            visible: function(e) {
                return this.drawingContainer().visible(e)
            },
            redraw: function(e) {
                e && e.id && (this.id = e.id)
            },
            position: function(e, n) {
                var i = this.options;
                return W(e) ? (W(n) ? (i.x = e, i.y = n) : e instanceof P && (i.x = e.x, i.y = e.y), this._transform.translate = new d(i.x, i.y), this._renderTransform(), t) : new P(i.x, i.y)
            },
            rotate: function(e, t) {
                return W(e) && (this._transform.rotate = new u(e, t.x, t.y), this._renderTransform()), this._transform.rotate || u.ZERO
            },
            drawingContainer: function() {
                return this.drawingElement
            },
            _renderTransform: function() {
                var e = this._transform.toMatrix();
                this.drawingContainer().transform(new V.Matrix(e.a, e.b, e.c, e.d, e.e, e.f))
            },
            _hover: function() {},
            _diffNumericOptions: n,
            _measure: function(e) {
                var t, n, i;
                return !this._measured || e ? (n = this._boundingBox() || new V.Rect, i = n.topLeft(), t = new z(i.x, i.y, n.width(), n.height()), this._originSize = t, this._originWidth = t.width, this._originHeight = t.height, this._measured = !0) : t = this._originSize, t
            },
            _boundingBox: function() {
                return this.drawingElement.rawBBox()
            }
        }), m = p.extend({
            init: function(e) {
                p.fn.init.call(this, e), e = this.options, e.fill = r(e.fill), e.stroke = r(e.stroke)
            },
            options: {
                stroke: {
                    color: "gray",
                    width: 1
                },
                fill: {
                    color: q
                }
            },
            fill: function(e, t) {
                this._fill({
                    color: o(e),
                    opacity: t
                })
            },
            stroke: function(e, t, n) {
                this._stroke({
                    color: o(e),
                    width: t,
                    opacity: n
                })
            },
            redraw: function(e) {
                var t, n;
                e && (t = e.stroke, n = e.fill, t && this._stroke(r(t)), n && this._fill(r(n)), p.fn.redraw.call(this, e))
            },
            _hover: function(e) {
                var t, n = this.drawingElement,
                    i = this.options,
                    o = i.hover;
                o && o.fill && (t = e ? r(o.fill) : i.fill, n.fill(t.color, t.opacity))
            },
            _stroke: function(e) {
                var t, n = this.options;
                R(n, {
                    stroke: e
                }), e = n.stroke, t = null, e.width > 0 && (t = {
                    color: e.color,
                    width: e.width,
                    opacity: e.opacity,
                    dashType: e.dashType
                }), this.drawingElement.options.set("stroke", t)
            },
            _fill: function(e) {
                var t, n, i, r = this.options;
                R(r, {
                    fill: e || {}
                }), t = r.fill, t.gradient ? (n = t.gradient, i = "radial" === n.type ? U.RadialGradient : U.LinearGradient, this.drawingElement.fill(new i(n))) : this.drawingElement.fill(t.color, t.opacity)
            }
        }), g = m.extend({
            init: function(e) {
                e = this._textColor(e), m.fn.init.call(this, e), this._font(), this._initText(), this._initSize()
            },
            options: {
                fontSize: 15,
                fontFamily: "sans-serif",
                stroke: {
                    width: 0
                },
                fill: {
                    color: "black"
                },
                autoSize: !0
            },
            _initText: function() {
                var e = this.options;
                this.drawingElement = new U.Text(W(e.text) ? e.text : "", new V.Point, {
                    font: e.font
                }), this._fill(), this._stroke()
            },
            _textColor: function(e) {
                return e && e.color && (e = R({}, e, {
                    fill: {
                        color: e.color
                    }
                })), e
            },
            _font: function() {
                var e = this.options;
                e.fontFamily && W(e.fontSize) ? e.font = e.fontSize + "px " + e.fontFamily : delete e.font
            },
            content: function(e) {
                return this.drawingElement.content(e)
            },
            redraw: function(e) {
                var t, n;
                e && (t = !1, n = this.options, e = this._textColor(e), m.fn.redraw.call(this, e), (e.fontFamily || W(e.fontSize)) && (R(n, {
                    fontFamily: e.fontFamily,
                    fontSize: e.fontSize
                }), this._font(), this.drawingElement.options.set("font", n.font), t = !0), e.text && (this.content(e.text), t = !0), !this._updateSize(e) && t && this._initSize())
            }
        }), R(g.fn, f), v = m.extend({
            init: function(e) {
                m.fn.init.call(this, e), this._initPath(), this._setPosition()
            },
            _setPosition: function() {
                var e = this.options,
                    t = e.x,
                    n = e.y;
                (W(t) || W(n)) && this.position(t || 0, n || 0)
            },
            redraw: function(e) {
                e && (m.fn.redraw.call(this, e), this._diffNumericOptions(e, [Q, X]) && this._drawPath(), this._diffNumericOptions(e, [J, Z]) && this._setPosition())
            },
            _initPath: function() {
                var e = this.options;
                this.drawingElement = new U.Path({
                    stroke: e.stroke,
                    closed: !0
                }), this._fill(), this._drawPath()
            },
            _drawPath: function() {
                var e = this.drawingElement,
                    t = i(this.options),
                    n = t.width,
                    r = t.height;
                e.segments.elements([s(0, 0), s(n, 0), s(n, r), s(0, r)])
            }
        }), _ = m.extend({
            init: function(e) {
                m.fn.init.call(this, e);
                var t = this.options.anchor;
                this.anchor = new V.Point(t.x, t.y), this.createElement()
            },
            options: {
                stroke: {
                    color: q,
                    width: 0
                },
                fill: {
                    color: "black"
                }
            },
            _transformToPath: function(e, t) {
                var n = t.transform();
                return e && n && (e = e.transformCopy(n)), e
            },
            redraw: function(e) {
                e && (e.position && (this.options.position = e.position), m.fn.redraw.call(this, e))
            }
        }), b = _.extend({
            options: {
                radius: 4,
                anchor: {
                    x: 0,
                    y: 0
                }
            },
            createElement: function() {
                var e = this.options;
                this.drawingElement = new U.Circle(new V.Circle(this.anchor, e.radius), {
                    fill: e.fill,
                    stroke: e.stroke
                })
            },
            positionMarker: function(e) {
                var t, n, i = this.options,
                    r = i.position,
                    o = e.segments;
                t = r == Y ? o[0] : o[o.length - 1], t && (n = this._transformToPath(t.anchor(), e), this.drawingElement.transform(V.transform().translate(n.x, n.y)))
            }
        }), w = _.extend({
            options: {
                path: "M 0 0 L 10 5 L 0 10 L 3 5 z",
                anchor: {
                    x: 10,
                    y: 5
                }
            },
            createElement: function() {
                var e = this.options;
                this.drawingElement = U.Path.parse(e.path, {
                    fill: e.fill,
                    stroke: e.stroke
                })
            },
            positionMarker: function(e) {
                var t, n, i = this._linePoints(e),
                    r = i.start,
                    o = i.end,
                    s = V.transform();
                r && s.rotate(a(r, o), o), o && (t = this.anchor, n = o.clone().translate(-t.x, -t.y), s.translate(n.x, n.y)), this.drawingElement.transform(s)
            },
            _linePoints: function(e) {
                var n, i, r, o, a, s = this.options,
                    l = e.segments;
                return s.position == Y ? (r = l[0], r && (i = r.anchor(), n = r.controlOut(), o = l[1], !n && o && (n = o.anchor()))) : (r = l[l.length - 1], r && (i = r.anchor(), n = r.controlIn(), a = l[l.length - 2], !n && a && (n = a.anchor()))), i ? {
                    start: this._transformToPath(n, e),
                    end: this._transformToPath(i, e)
                } : t
            }
        }), y = {
            _getPath: function(e) {
                var n = this.drawingElement;
                return n instanceof U.MultiPath && (n = e == Y ? n.paths[0] : n.paths[n.paths.length - 1]), n && n.segments.length ? n : t
            },
            _normalizeMarkerOptions: function(e) {
                var t = e.startCap,
                    n = e.endCap;
                N(t) && (e.startCap = {
                    type: t
                }), N(n) && (e.endCap = {
                    type: n
                })
            },
            _removeMarker: function(e) {
                var t = this._markers[e];
                t && (this.drawingContainer().remove(t.drawingElement), delete this._markers[e])
            },
            _createMarkers: function() {
                var e = this.options;
                this._normalizeMarkerOptions(e), this._markers = {}, this._markers[Y] = this._createMarker(e.startCap, Y), this._markers[K] = this._createMarker(e.endCap, K)
            },
            _createMarker: function(e, n) {
                var i, r, o = (e || {}).type,
                    a = this._getPath(n);
                return a ? (o == G.filledCircle ? i = b : o == G.arrowStart || o == G.arrowEnd ? i = w : this._removeMarker(n), i ? (r = new i(R({}, e, {
                    position: n
                })), r.positionMarker(a), this.drawingContainer().append(r.drawingElement), r) : t) : (this._removeMarker(n), t)
            },
            _positionMarker: function(e) {
                var t, n = this._markers[e];
                n && (t = this._getPath(e), t ? n.positionMarker(t) : this._removeMarker(e))
            },
            _capMap: {
                start: "startCap",
                end: "endCap"
            },
            _redrawMarker: function(e, t, n) {
                var i, r, o, a, s;
                return this._normalizeMarkerOptions(n), i = this.options, r = this._capMap[t], o = (i[r] || {}).type, a = n[r], s = !1, a ? (i[r] = R({}, i[r], a), a.type && o != a.type ? (this._removeMarker(t), this._markers[t] = this._createMarker(i[r], t), s = !0) : this._markers[t] && this._markers[t].redraw(a)) : e && !this._markers[t] && i[r] && (this._markers[t] = this._createMarker(i[r], t), s = !0), s
            },
            _redrawMarkers: function(e, t) {
                !this._redrawMarker(e, Y, t) && e && this._positionMarker(Y), !this._redrawMarker(e, K, t) && e && this._positionMarker(K)
            }
        }, k = m.extend({
            init: function(e) {
                m.fn.init.call(this, e), this.container = new U.Group, this._createElements(), this._initSize()
            },
            options: {
                autoSize: !0
            },
            drawingContainer: function() {
                return this.container
            },
            data: function(e) {
                var n = this.options;
                return e ? (n.data != e && (n.data = e, this._setData(e), this._initSize(), this._redrawMarkers(!0, {})), t) : n.data
            },
            redraw: function(e) {
                var t, n;
                e && (m.fn.redraw.call(this, e), t = this.options, n = e.data, W(n) && t.data != n ? (t.data = n, this._setData(n), this._updateSize(e) || this._initSize(), this._redrawMarkers(!0, e)) : (this._updateSize(e), this._redrawMarkers(!1, e)))
            },
            _createElements: function() {
                var e = this.options;
                this.drawingElement = U.Path.parse(e.data || "", {
                    stroke: e.stroke
                }), this._fill(), this.container.append(this.drawingElement), this._createMarkers()
            },
            _setData: function(e) {
                var t = this.drawingElement,
                    n = U.Path.parse(e || ""),
                    i = n.paths.slice(0);
                n.paths.elements([]), t.paths.elements(i)
            }
        }), R(k.fn, f), R(k.fn, y), x = m.extend({
            init: function(e) {
                m.fn.init.call(this, e), this.container = new U.Group, this._initPath(), this._createMarkers()
            },
            drawingContainer: function() {
                return this.container
            },
            redraw: function(e) {
                var t, n;
                e && (e = e || {}, t = e.from, n = e.to, t && (this.options.from = t), n && (this.options.to = n), t || n ? (this._drawPath(), this._redrawMarkers(!0, e)) : this._redrawMarkers(!1, e), m.fn.redraw.call(this, e))
            },
            _initPath: function() {
                var e = this.options,
                    t = this.drawingElement = new U.Path({
                        stroke: e.stroke
                    });
                this._fill(), this._drawPath(), this.container.append(t)
            },
            _drawPath: function() {
                var e = this.options,
                    t = this.drawingElement,
                    n = e.from || new P,
                    i = e.to || new P;
                t.segments.elements([s(n.x, n.y), s(i.x, i.y)])
            }
        }), R(x.fn, y), C = m.extend({
            init: function(e) {
                m.fn.init.call(this, e), this.container = new U.Group, this._initPath(), this._createMarkers()
            },
            drawingContainer: function() {
                return this.container
            },
            points: function(e) {
                var n = this.options;
                return e ? (n.points = e, this._updatePath(), t) : n.points
            },
            redraw: function(e) {
                if (e) {
                    var t = e.points;
                    m.fn.redraw.call(this, e), t && this._pointsDiffer(t) ? (this.points(t), this._redrawMarkers(!0, e)) : this._redrawMarkers(!1, e)
                }
            },
            _initPath: function() {
                var e = this.options;
                this.drawingElement = new U.Path({
                    stroke: e.stroke
                }), this._fill(), this.container.append(this.drawingElement), e.points && this._updatePath()
            },
            _pointsDiffer: function(e) {
                var t, n = this.options.points,
                    i = n.length !== e.length;
                if (!i)
                    for (t = 0; e.length > t; t++)
                        if (n[t].x !== e[t].x || n[t].y !== e[t].y) {
                            i = !0;
                            break
                        } return i
            },
            _updatePath: function() {
                var e, t, n = this.drawingElement,
                    i = this.options,
                    r = i.points,
                    o = [];
                for (t = 0; r.length > t; t++) e = r[t], o.push(s(e.x, e.y));
                n.segments.elements(o)
            },
            options: {
                points: []
            }
        }), R(C.fn, y), S = p.extend({
            init: function(e) {
                p.fn.init.call(this, e), this._initImage()
            },
            redraw: function(e) {
                e && (e.source && this.drawingElement.src(e.source), this._diffNumericOptions(e, [Q, X, J, Z]) && this.drawingElement.rect(this._rect()), p.fn.redraw.call(this, e))
            },
            _initImage: function() {
                var e = this.options,
                    t = this._rect();
                this.drawingElement = new U.Image(e.source, t, {})
            },
            _rect: function() {
                var e = i(this.options),
                    t = new V.Point(e.x, e.y),
                    n = new V.Size(e.width, e.height);
                return new V.Rect(t, n)
            }
        }), T = p.extend({
            init: function(e) {
                this.children = [], p.fn.init.call(this, e), this.drawingElement = new U.Group, this._initSize()
            },
            options: {
                autoSize: !1
            },
            append: function(e) {
                this.drawingElement.append(e.drawingContainer()), this.children.push(e), this._childrenChange = !0
            },
            remove: function(e) {
                this._remove(e) && (this._childrenChange = !0)
            },
            _remove: function(e) {
                var n = j(e, this.children);
                return n >= 0 ? (this.drawingElement.removeAt(n), this.children.splice(n, 1), !0) : t
            },
            clear: function() {
                this.drawingElement.clear(), this.children = [], this._childrenChange = !0
            },
            toFront: function(e) {
                var t, n;
                for (n = 0; e.length > n; n++) t = e[n], this._remove(t) && this.append(t)
            },
            toBack: function(e) {
                this._reorderChildren(e, 0)
            },
            toIndex: function(e, t) {
                this._reorderChildren(e, t)
            },
            _reorderChildren: function(e, t) {
                var n, i, r, o, a, s = this.drawingElement,
                    l = s.children.slice(0),
                    c = this.children,
                    d = H(t);
                for (n = 0; e.length > n; n++) a = e[n], o = a.drawingContainer(), i = j(a, c), i >= 0 && (l.splice(i, 1), c.splice(i, 1), r = d ? t : t[n], l.splice(r, 0, o), c.splice(r, 0, a));
                s.clear(), s.append.apply(s, l)
            },
            redraw: function(e) {
                e && (this._childrenChange ? (this._childrenChange = !1, this._updateSize(e) || this._initSize()) : this._updateSize(e), p.fn.redraw.call(this, e))
            },
            _boundingBox: function() {
                var e, t, n, i, r = this.children;
                for (i = 0; r.length > i; i++) t = r[i], t.visible() && t._includeInBBox !== !1 && (n = t.drawingContainer().clippedBBox(null), n && (e = e ? V.Rect.union(e, n) : n));
                return e
            }
        }), R(T.fn, f), D = T.extend({
            init: function(e, t) {
                this.children = [], p.fn.init.call(this, t), this.drawingElement = new U.Layout(l(e), t), this._initSize()
            },
            rect: function(e) {
                if (e) this.drawingElement.rect(l(e));
                else {
                    var t = this.drawingElement.rect();
                    if (t) return new z(t.origin.x, t.origin.y, t.size.width, t.size.height)
                }
            },
            reflow: function() {
                this.drawingElement.reflow()
            },
            redraw: function(e) {
                F.deepExtend(this.drawingElement.options, e), T.fn.redraw.call(this, e)
            }
        }), A = m.extend({
            init: function(e) {
                m.fn.init.call(this, e), this._initCircle(), this._initSize()
            },
            redraw: function(e) {
                if (e) {
                    var t = this.options;
                    e.center && (R(t, {
                        center: e.center
                    }), this._center.move(t.center.x, t.center.y)), this._diffNumericOptions(e, ["radius"]) && this._circle.setRadius(t.radius), this._updateSize(e), m.fn.redraw.call(this, e)
                }
            },
            _initCircle: function() {
                var e, t = this.options,
                    n = t.width,
                    i = t.height,
                    r = t.radius;
                W(r) || (W(n) || (n = i), W(i) || (i = n), t.radius = r = Math.min(n, i) / 2), e = t.center || {
                    x: r,
                    y: r
                }, this._center = new V.Point(e.x, e.y), this._circle = new V.Circle(this._center, r), this.drawingElement = new U.Circle(this._circle, {
                    stroke: t.stroke
                }), this._fill()
            }
        }), R(A.fn, f), E = M.extend({
            init: function(e, t) {
                t = t || {}, this.element = e, this.surface = U.Surface.create(e, t), F.isFunction(this.surface.translate) && (this.translate = this._translate), this.drawingElement = new U.Group, this._viewBox = new z(0, 0, t.width, t.height), this.size(this._viewBox)
            },
            bounds: function() {
                var e = this.drawingElement.clippedBBox();
                return new z(0, 0, e.width(), e.height())
            },
            size: function(e) {
                var t = this._viewBox;
                return W(e) && (t.width = e.width, t.height = e.height, this.surface.setSize(e)), {
                    width: t.width,
                    height: t.height
                }
            },
            _translate: function(e, t) {
                var n = this._viewBox;
                return W(e) && W(t) && (n.x = e, n.y = t, this.surface.translate({
                    x: e,
                    y: t
                })), {
                    x: n.x,
                    y: n.y
                }
            },
            draw: function() {
                this.surface.draw(this.drawingElement)
            },
            append: function(e) {
                return this.drawingElement.append(e.drawingContainer()), this
            },
            remove: function(e) {
                this.drawingElement.remove(e.drawingContainer())
            },
            insertBefore: function() {},
            clear: function() {
                this.drawingElement.clear()
            },
            destroy: function(t) {
                this.surface.destroy(), t && e(this.element).remove()
            }
        }), F.deepExtend(I, {
            init: function(e) {
                F.init(e, I.ui)
            },
            diffNumericOptions: n,
            Element: p,
            Scale: c,
            Translation: d,
            Rotation: u,
            Circle: A,
            Group: T,
            Rectangle: v,
            Canvas: E,
            Path: k,
            Layout: D,
            Line: x,
            MarkerBase: _,
            ArrowMarker: w,
            CircleMarker: b,
            Polyline: C,
            CompositeTransform: h,
            TextBlock: g,
            Image: S,
            VisualBase: m
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/diagram/services.min", ["kendo.drawing.min", "dataviz/diagram/svg.min"], e)
}(function() {
    ! function(e, t) {
        function n(e, t) {
            e.isSelected ? t.ctrlKey && e.select(!1) : e.diagram.select(e, {
                addToSelection: t.ctrlKey
            })
        }

        function i(e) {
            return e.ctrlKey === !1 && e.altKey === !1 && e.shiftKey === !1
        }

        function r(e, t) {
            var n = e !== !1;
            return e.key && "none" != e.key && (n = t[e.key + "Key"]), n
        }

        function o(e, t) {
            return t.charCodeAt(0) == e || t.toUpperCase().charCodeAt(0) == e
        }

        function a(e, t) {
            var n;
            return -1 == e.x && -1 == e.y ? n = t.bottomRight() : 1 == e.x && 1 == e.y ? n = t.topLeft() : -1 == e.x && 1 == e.y ? n = t.topRight() : 1 == e.x && -1 == e.y ? n = t.bottomLeft() : 0 === e.x && -1 == e.y ? n = t.bottom() : 0 === e.x && 1 == e.y ? n = t.top() : 1 == e.x && 0 === e.y ? n = t.left() : -1 == e.x && 0 === e.y && (n = t.right()), n
        }

        function s(e) {
            var t = e.options.editable;
            return t && t.drag !== !1
        }

        function l(e, t) {
            var n, i, r, o;
            for (o = 0; e.connectors.length > o; o++)
                if (n = e.connectors[o], i = n.position(), r = new G(i.x, i.y), r.inflate(ae, ae), r.contains(t)) return n
        }
        var c, d, u, h, f, p, m, g, v, _, b, w, y, k, x, C, S, T, D, A, E, F, I, M, R, P, z, B, L, H, N, O, V = window.kendo,
            U = V.dataviz,
            W = U.diagram,
            j = V.Class,
            q = W.Group,
            G = W.Rect,
            $ = W.Rectangle,
            Y = W.Utils,
            K = Y.isUndefined,
            Q = W.Point,
            X = W.Circle,
            J = W.Ticker,
            Z = V.deepExtend,
            ee = V.ui.Movable,
            te = V.support.browser,
            ne = V.util.defined,
            ie = e.inArray,
            re = e.proxy,
            oe = {
                arrow: "default",
                grip: "pointer",
                cross: "pointer",
                add: "pointer",
                move: "move",
                select: "pointer",
                south: "s-resize",
                east: "e-resize",
                west: "w-resize",
                north: "n-resize",
                rowresize: "row-resize",
                colresize: "col-resize"
            },
            ae = 10,
            se = "Auto",
            le = "Top",
            ce = "Right",
            de = "Left",
            ue = "Bottom",
            he = 10,
            fe = 10,
            pe = "dragStart",
            me = "drag",
            ge = "dragEnd",
            ve = "itemRotate",
            _e = "itemBoundsChange",
            be = 5,
            we = 5,
            ye = "mouseEnter",
            ke = "mouseLeave",
            xe = "zoomStart",
            Ce = "zoomEnd",
            Se = -2e4,
            Te = 2e4,
            De = .9,
            Ae = .93,
            Ee = 5,
            Fe = "transparent",
            Ie = "pan",
            Me = "rotated";
        W.Cursors = oe, c = V.Class.extend({
            init: function(e) {
                this.layoutState = e, this.diagram = e.diagram
            },
            initState: function() {
                function e(e, t) {
                    var n = this.diagram.getShapeById(e);
                    n && (this.subjects.push(n), this.froms.push(n.bounds().topLeft()), this.tos.push(t.topLeft()))
                }
                this.froms = [], this.tos = [], this.subjects = [], this.layoutState.nodeMap.forEach(e, this)
            },
            update: function(e) {
                if (!(0 >= this.subjects.length))
                    for (var t = 0; this.subjects.length > t; t++) this.subjects[t].position(new Q(this.froms[t].x + (this.tos[t].x - this.froms[t].x) * e, this.froms[t].y + (this.tos[t].y - this.froms[t].y) * e))
            }
        }), d = j.extend({
            init: function(e, t, n) {
                this.animate = K(n) ? !1 : n, this._initialState = e, this._finalState = t, this.title = "Diagram layout"
            },
            undo: function() {
                this.setState(this._initialState)
            },
            redo: function() {
                this.setState(this._finalState)
            },
            setState: function(e) {
                var t, n = e.diagram;
                this.animate ? (e.linkMap.forEach(function(e, t) {
                    var i = n.getShapeById(e);
                    i.visible(!1), i && i.points(t)
                }), t = new J, t.addAdapter(new c(e)), t.onComplete(function() {
                    e.linkMap.forEach(function(e) {
                        var t = n.getShapeById(e);
                        t.visible(!0)
                    })
                }), t.play()) : (e.nodeMap.forEach(function(e, t) {
                    var i = n.getShapeById(e);
                    i && i.position(t.topLeft())
                }), e.linkMap.forEach(function(e, t) {
                    var i = n.getShapeById(e);
                    i && i.points(t)
                }))
            }
        }), u = j.extend({
            init: function(e) {
                this.units = [], this.title = "Composite unit", e !== t && this.units.push(e)
            },
            add: function(e) {
                this.units.push(e)
            },
            undo: function() {
                for (var e = 0; this.units.length > e; e++) this.units[e].undo()
            },
            redo: function() {
                for (var e = 0; this.units.length > e; e++) this.units[e].redo()
            }
        }), h = j.extend({
            init: function(e, t, n) {
                this.item = e, this._redoSource = t, this._redoTarget = n, ne(t) && (this._undoSource = e.source()), ne(n) && (this._undoTarget = e.target()), this.title = "Connection Editing"
            },
            undo: function() {
                this._undoSource !== t && this.item._updateConnector(this._undoSource, "source"), this._undoTarget !== t && this.item._updateConnector(this._undoTarget, "target"), this.item.updateModel()
            },
            redo: function() {
                this._redoSource !== t && this.item._updateConnector(this._redoSource, "source"), this._redoTarget !== t && this.item._updateConnector(this._redoTarget, "target"), this.item.updateModel()
            }
        }), f = j.extend({
            init: function(e, t, n) {
                this.item = e, this._undoSource = t, this._undoTarget = n, this._redoSource = e.source(), this._redoTarget = e.target(), this.title = "Connection Editing"
            },
            undo: function() {
                this.item._updateConnector(this._undoSource, "source"), this.item._updateConnector(this._undoTarget, "target"), this.item.updateModel()
            },
            redo: function() {
                this.item._updateConnector(this._redoSource, "source"), this.item._updateConnector(this._redoTarget, "target"), this.item.updateModel()
            }
        }), p = j.extend({
            init: function(e) {
                this.connection = e, this.diagram = e.diagram, this.targetConnector = e.targetConnector, this.title = "Delete connection"
            },
            undo: function() {
                this.diagram._addConnection(this.connection, !1)
            },
            redo: function() {
                this.diagram.remove(this.connection, !1)
            }
        }), m = j.extend({
            init: function(e) {
                this.shape = e, this.diagram = e.diagram, this.title = "Deletion"
            },
            undo: function() {
                this.diagram._addShape(this.shape, !1), this.shape.select(!1)
            },
            redo: function() {
                this.shape.select(!1), this.diagram.remove(this.shape, !1)
            }
        }), g = j.extend({
            init: function(e, t, n) {
                var i, r;
                for (this.shapes = e, this.undoStates = t, this.title = "Transformation", this.redoStates = [], this.adorner = n, i = 0; this.shapes.length > i; i++) r = this.shapes[i], this.redoStates.push(r.bounds())
            },
            undo: function() {
                var e, t;
                for (e = 0; this.shapes.length > e; e++) t = this.shapes[e], t.bounds(this.undoStates[e]), t.hasOwnProperty("layout") && t.layout(t, this.redoStates[e], this.undoStates[e]), t.updateModel();
                this.adorner && (this.adorner.refreshBounds(), this.adorner.refresh())
            },
            redo: function() {
                var e, t;
                for (e = 0; this.shapes.length > e; e++) t = this.shapes[e], t.bounds(this.redoStates[e]), t.hasOwnProperty("layout") && t.layout(t, this.undoStates[e], this.redoStates[e]), t.updateModel();
                this.adorner && (this.adorner.refreshBounds(), this.adorner.refresh())
            }
        }), v = j.extend({
            init: function(e, t) {
                this.connection = e, this.diagram = t, this.title = "New connection"
            },
            undo: function() {
                this.diagram.remove(this.connection, !1)
            },
            redo: function() {
                this.diagram._addConnection(this.connection, !1)
            }
        }), _ = j.extend({
            init: function(e, t) {
                this.shape = e, this.diagram = t, this.title = "New shape"
            },
            undo: function() {
                this.diagram.deselect(), this.diagram.remove(this.shape, !1)
            },
            redo: function() {
                this.diagram._addShape(this.shape, !1)
            }
        }), b = j.extend({
            init: function(e, t, n) {
                this.initial = e, this.finalPos = t, this.diagram = n, this.title = "Pan Unit"
            },
            undo: function() {
                this.diagram.pan(this.initial)
            },
            redo: function() {
                this.diagram.pan(this.finalPos)
            }
        }), w = j.extend({
            init: function(e, t, n) {
                var i, r;
                for (this.shapes = t, this.undoRotates = n, this.title = "Rotation", this.redoRotates = [], this.redoAngle = e._angle, this.adorner = e, this.center = e._innerBounds.center(), i = 0; this.shapes.length > i; i++) r = this.shapes[i], this.redoRotates.push(r.rotate().angle)
            },
            undo: function() {
                var e, t;
                for (e = 0; this.shapes.length > e; e++) t = this.shapes[e], t.rotate(this.undoRotates[e], this.center, !1), t.hasOwnProperty("layout") && t.layout(t), t.updateModel();
                this.adorner && (this.adorner._initialize(), this.adorner.refresh())
            },
            redo: function() {
                var e, t;
                for (e = 0; this.shapes.length > e; e++) t = this.shapes[e], t.rotate(this.redoRotates[e], this.center, !1), t.hasOwnProperty("layout") && t.layout(t), t.updateModel();
                this.adorner && (this.adorner._initialize(), this.adorner.refresh())
            }
        }), y = j.extend({
            init: function(e, t, n) {
                this.diagram = e, this.indices = n, this.items = t, this.title = "Rotate Unit"
            },
            undo: function() {
                this.diagram._toIndex(this.items, this.indices)
            },
            redo: function() {
                this.diagram.toFront(this.items, !1)
            }
        }), k = j.extend({
            init: function(e, t, n) {
                this.diagram = e, this.indices = n, this.items = t, this.title = "Rotate Unit"
            },
            undo: function() {
                this.diagram._toIndex(this.items, this.indices)
            },
            redo: function() {
                this.diagram.toBack(this.items, !1)
            }
        }), x = V.Observable.extend({
            init: function(e) {
                V.Observable.fn.init.call(this, e), this.bind(this.events, e), this.stack = [], this.index = 0, this.capacity = 100
            },
            events: ["undone", "redone"],
            begin: function() {
                this.composite = new u
            },
            cancel: function() {
                this.composite = t
            },
            commit: function(e) {
                this.composite.units.length > 0 && this._restart(this.composite, e), this.composite = t
            },
            addCompositeItem: function(e) {
                this.composite ? this.composite.add(e) : this.add(e)
            },
            add: function(e, t) {
                this._restart(e, t)
            },
            pop: function() {
                this.index > 0 && (this.stack.pop(), this.index--)
            },
            count: function() {
                return this.stack.length
            },
            undo: function() {
                this.index > 0 && (this.index--, this.stack[this.index].undo(), this.trigger("undone"))
            },
            redo: function() {
                this.stack.length > 0 && this.stack.length > this.index && (this.stack[this.index].redo(), this.index++, this.trigger("redone"))
            },
            _restart: function(e, t) {
                this.stack.splice(this.index, this.stack.length - this.index), this.stack.push(e), t !== !1 ? this.redo() : this.index++, this.stack.length > this.capacity && (this.stack.splice(0, this.stack.length - this.capacity), this.index = this.capacity)
            },
            clear: function() {
                this.stack = [], this.index = 0
            }
        }), C = j.extend({
            init: function(e) {
                this.toolService = e
            },
            start: function() {},
            move: function() {},
            end: function() {},
            tryActivate: function() {
                return !1
            },
            getCursor: function() {
                return oe.arrow
            }
        }), S = C.extend({
            init: function(t) {
                var n, i, r, o, a = this,
                    s = V.support.mobileOS ? Ae : De;
                C.fn.init.call(a, t), n = a.toolService.diagram, i = n.canvas, r = n.scroller = a.scroller = e(n.scrollable).kendoMobileScroller({
                    friction: s,
                    velocityMultiplier: Ee,
                    mousewheelScrolling: !1,
                    zoom: !1,
                    scroll: re(a._move, a)
                }).data("kendoMobileScroller"), i.translate && (a.movableCanvas = new ee(i.element)), o = function(e, t, n) {
                    e.makeVirtual(), e.virtualSize(t || Se, n || Te)
                }, o(r.dimensions.x), o(r.dimensions.y), r.disable()
            },
            tryActivate: function(e, t) {
                var n = this.toolService,
                    r = n.diagram.options.pannable,
                    o = t.ctrlKey;
                return ne(r.key) && (o = r.key && "none" != r.key ? t[r.key + "Key"] && !(t.ctrlKey && ne(n.hoveredItem)) : i(t)), r !== !1 && o && !ne(n.hoveredAdorner) && !ne(n._hoveredConnector)
            },
            start: function() {
                this.scroller.enable()
            },
            move: function() {},
            _move: function(e) {
                var t = this,
                    n = t.toolService.diagram,
                    i = n.canvas,
                    r = new Q(e.scrollLeft, e.scrollTop);
                i.translate ? (n._storePan(r.times(-1)), t.movableCanvas.moveTo(r), i.translate(r.x, r.y)) : r = r.plus(n._pan.times(-1)), n.trigger(Ie, {
                    pan: r
                })
            },
            end: function() {
                this.scroller.disable()
            },
            getCursor: function() {
                return oe.move
            }
        }), T = j.extend({
            init: function(e) {
                this.toolService = e
            },
            tryActivate: function() {
                return !0
            },
            start: function(e, t) {
                var i = this.toolService,
                    o = i.diagram,
                    a = i.hoveredItem,
                    s = o.options.selectable;
                a && (r(s, t) && n(a, t), a.adorner && (this.adorner = a.adorner, this.handle = this.adorner._hitTest(e))), this.handle || (this.handle = o._resizingAdorner._hitTest(e), this.handle && (this.adorner = o._resizingAdorner)), this.adorner && (this.adorner.isDragHandle(this.handle) && o.trigger(pe, {
                    shapes: this.adorner.shapes,
                    connections: []
                }) ? (i.startPoint = e, i.end(e)) : this.adorner.start(e))
            },
            move: function(e) {
                this.adorner && (this.adorner.move(this.handle, e), this.adorner.isDragHandle(this.handle) && this.toolService.diagram.trigger(me, {
                    shapes: this.adorner.shapes,
                    connections: []
                }))
            },
            end: function(e, n) {
                var i, r = this.toolService.diagram,
                    o = this.toolService,
                    a = this.adorner;
                a && (a.isDragHandle(this.handle) && r.trigger(ge, {
                    shapes: a.shapes,
                    connections: []
                }) ? a.cancel() : (i = a.stop(), i && r.undoRedoService.add(i, !1))), o.hoveredItem && this.toolService.triggerClick({
                    item: o.hoveredItem,
                    point: e,
                    meta: n
                }), this.adorner = t, this.handle = t
            },
            getCursor: function(e) {
                return this.toolService.hoveredItem ? this.toolService.hoveredItem._getCursor(e) : oe.arrow
            }
        }), D = j.extend({
            init: function(e) {
                this.toolService = e
            },
            tryActivate: function(e, t) {
                var n = this.toolService,
                    i = r(n.diagram.options.selectable, t);
                return i && !ne(n.hoveredItem) && !ne(n.hoveredAdorner)
            },
            start: function(e) {
                var t = this.toolService.diagram;
                t.deselect(), t.selector.start(e)
            },
            move: function(e) {
                var t = this.toolService.diagram;
                t.selector.move(e)
            },
            end: function(e, t) {
                var n = this.toolService.diagram,
                    i = this.toolService.hoveredItem,
                    r = n.selector.bounds();
                i && i.isSelected || t.ctrlKey || n.deselect(), r.isEmpty() || n.selectArea(r), n.selector.end()
            },
            getCursor: function() {
                return oe.arrow
            }
        }), A = j.extend({
            init: function(e) {
                this.toolService = e, this.type = "ConnectionTool"
            },
            tryActivate: function() {
                return this.toolService._hoveredConnector
            },
            start: function(e, t) {
                var i = this.toolService.diagram,
                    r = this.toolService._hoveredConnector,
                    o = i._createConnection({}, r._c, e);
                s(o) && !i.trigger(pe, {
                    shapes: [],
                    connections: [o]
                }) && i._addConnection(o) ? (this.toolService._connectionManipulation(o, r._c.shape, !0), this.toolService._removeHover(), n(this.toolService.activeConnection, t)) : (o.source(null), this.toolService.end(e))
            },
            move: function(e) {
                var t = this.toolService,
                    n = t.activeConnection;
                return n.target(e), t.diagram.trigger(me, {
                    shapes: [],
                    connections: [n]
                }), !0
            },
            end: function(e) {
                var t, n = this.toolService,
                    i = n.diagram,
                    r = n.activeConnection,
                    o = n.hoveredItem,
                    a = n._hoveredConnector;
                r && (t = a && a._c != r.sourceConnector ? a._c : o && o instanceof W.Shape ? o.getConnector(se) || o.getConnector(e) : e, r.target(t), i.trigger(ge, {
                    shapes: [],
                    connections: [r]
                }) ? (i.remove(r, !1), i.undoRedoService.pop()) : (r.updateModel(), i._syncConnectionChanges()), n._connectionManipulation())
            },
            getCursor: function() {
                return oe.arrow
            }
        }), E = j.extend({
            init: function(e) {
                this.toolService = e, this.type = "ConnectionTool"
            },
            tryActivate: function(e, t) {
                var n = this.toolService,
                    i = n.diagram,
                    o = i.options.selectable,
                    a = n.hoveredItem,
                    s = r(o, t) && a && a.path && !(a.isSelected && t.ctrlKey);
                return s && (this._c = a), s
            },
            start: function(e, t) {
                var i, r = this._c;
                n(r, t), i = r.adorner, s(r) && i && !this.toolService.diagram.trigger(pe, {
                    shapes: [],
                    connections: [r]
                }) ? (this.handle = i._hitTest(e), i.start(e)) : (this.toolService.startPoint = e, this.toolService.end(e))
            },
            move: function(e) {
                var n = this._c.adorner;
                return s(this._c) && n ? (n.move(this.handle, e), this.toolService.diagram.trigger(me, {
                    shapes: [],
                    connections: [this._c]
                }), !0) : t
            },
            end: function(e, t) {
                var n, i = this._c,
                    r = i.adorner,
                    o = this.toolService,
                    a = o.diagram;
                r && (o.triggerClick({
                    item: i,
                    point: e,
                    meta: t
                }), s(i) && (n = r.stop(e), a.trigger(ge, {
                    shapes: [],
                    connections: [i]
                }) ? n.undo() : (a.undoRedoService.add(n, !1), i.updateModel(), a._syncConnectionChanges())))
            },
            getCursor: function() {
                return oe.move
            }
        }), F = j.extend({
            init: function(e) {
                this.diagram = e, this.tools = [new S(this), new E(this), new A(this), new D(this), new T(this)], this.activeTool = t
            },
            start: function(e, t) {
                return t = Z({}, t), this.activeTool && this.activeTool.end(e, t), this._updateHoveredItem(e), this._activateTool(e, t), this.activeTool.start(e, t), this._updateCursor(e), this.diagram.focus(), this.startPoint = e, !0
            },
            move: function(e, t) {
                t = Z({}, t);
                var n = !0;
                return this.activeTool && (n = this.activeTool.move(e, t)), n && this._updateHoveredItem(e), this._updateCursor(e), !0
            },
            end: function(e, n) {
                return n = Z({}, n), this.activeTool && this.activeTool.end(e, n), this.activeTool = t, this._updateCursor(e), !0
            },
            keyDown: function(e, t) {
                var n, i = this.diagram;
                if (t = Z({
                    ctrlKey: !1,
                    metaKey: !1,
                    altKey: !1
                }, t), !t.ctrlKey && !t.metaKey || t.altKey) {
                    if (46 === e || 8 === e) return n = this.diagram._triggerRemove(i.select()), n.length && (this.diagram.remove(n, !0), this.diagram._syncChanges(), this.diagram._destroyToolBar()), !0;
                    if (27 === e) return this._discardNewConnection(), i.deselect(), i._destroyToolBar(), !0
                } else {
                    if (o(e, "a")) return i.selectAll(), i._destroyToolBar(), !0;
                    if (o(e, "z")) return i.undo(), i._destroyToolBar(), !0;
                    if (o(e, "y")) return i.redo(), i._destroyToolBar(), !0;
                    o(e, "c") ? (i.copy(), i._destroyToolBar()) : o(e, "x") ? (i.cut(), i._destroyToolBar()) : o(e, "v") ? (i.paste(), i._destroyToolBar()) : o(e, "l") ? (i.layout(), i._destroyToolBar()) : o(e, "d") && (i._destroyToolBar(), i.copy(), i.paste())
                }
            },
            wheel: function(e, t) {
                var n = this.diagram,
                    i = t.delta,
                    r = n.zoom(),
                    o = n.options,
                    a = o.zoomRate,
                    s = {
                        point: e,
                        meta: t,
                        zoom: r
                    };
                if (!n.trigger(xe, s)) return 0 > i ? r += a : r -= a, r = V.dataviz.round(Math.max(o.zoomMin, Math.min(o.zoomMax, r)), 2), s.zoom = r, n.zoom(r, s), n.trigger(Ce, s), !0
            },
            setTool: function(e, t) {
                e.toolService = this, this.tools[t] = e
            },
            triggerClick: function(e) {
                this.startPoint.equals(e.point) && this.diagram.trigger("click", e)
            },
            _discardNewConnection: function() {
                this.newConnection && (this.diagram.remove(this.newConnection), this.newConnection = t)
            },
            _activateTool: function(e, t) {
                var n, i;
                for (n = 0; this.tools.length > n; n++)
                    if (i = this.tools[n], i.tryActivate(e, t)) {
                        this.activeTool = i;
                        break
                    }
            },
            _updateCursor: function(e) {
                var t = this.diagram.element,
                    n = this.activeTool ? this.activeTool.getCursor(e) : this.hoveredAdorner ? this.hoveredAdorner._getCursor(e) : this.hoveredItem ? this.hoveredItem._getCursor(e) : oe.arrow;
                t.css({
                    cursor: n
                }), te.msie && 7 == te.version && (t[0].style.cssText = t[0].style.cssText)
            },
            _connectionManipulation: function(e, n, i) {
                this.activeConnection = e, this.disabledShape = n, this.newConnection = i ? this.activeConnection : t
            },
            _updateHoveredItem: function(e) {
                var n = this._hitTest(e),
                    i = this.diagram;
                n == this.hoveredItem || this.disabledShape && n == this.disabledShape || (this.hoveredItem && (i.trigger(ke, {
                    item: this.hoveredItem
                }), this.hoveredItem._hover(!1)), n && n.options.enable ? (i.trigger(ye, {
                    item: n
                }), this.hoveredItem = n, this.hoveredItem._hover(!0)) : this.hoveredItem = t)
            },
            _removeHover: function() {
                this.hoveredItem && (this.hoveredItem._hover(!1), this.hoveredItem = t)
            },
            _hitTest: function(e) {
                var n, i, r, o, a = this.diagram;
                if (this._hoveredConnector && (this._hoveredConnector._hover(!1), this._hoveredConnector = t), a._connectorsAdorner._visible && (n = a._connectorsAdorner._hitTest(e))) return n;
                if (n = this.diagram._resizingAdorner._hitTest(e)) {
                    if (this.hoveredAdorner = a._resizingAdorner, 0 !== n.x || 0 !== n.y) return;
                    n = t
                } else this.hoveredAdorner = t;
                if (!this.activeTool || "ConnectionTool" !== this.activeTool.type) {
                    for (o = [], r = 0; a._selectedItems.length > r; r++) i = a._selectedItems[r], i instanceof W.Connection && o.push(i);
                    n = this._hitTestItems(o, e)
                }
                return n || this._hitTestElements(e)
            },
            _hitTestElements: function(e) {
                var t, n, i, r, o = this.diagram,
                    a = this._hitTestItems(o.shapes, e),
                    s = this._hitTestItems(o.connections, e);
                return this.activeTool && "ConnectionTool" == this.activeTool.type || !a || !s || l(a, e) || (n = o.mainLayer, i = ie(a.visual, n.children), r = ie(s.visual, n.children), t = i > r ? a : s), t || a || s
            },
            _hitTestItems: function(e, t) {
                var n, i, r;
                for (n = e.length - 1; n >= 0; n--)
                    if (i = e[n], r = i._hitTest(t)) return r
            }
        }), I = V.Class.extend({
            init: function() {}
        }), M = I.extend({
            init: function(e) {
                var t = this;
                I.fn.init.call(t), this.connection = e
            },
            hitTest: function(e) {
                var t = this.getBounds().inflate(ae);
                return t.contains(e) ? W.Geometry.distanceToPolyline(e, this.connection.allPoints()) < ae : !1
            },
            getBounds: function() {
                var e, t = this.connection.allPoints(),
                    n = t[0],
                    i = t[t.length - 1],
                    r = Math.max(n.x, i.x),
                    o = Math.min(n.x, i.x),
                    a = Math.min(n.y, i.y),
                    s = Math.max(n.y, i.y);
                for (e = 1; t.length - 1 > e; ++e) r = Math.max(r, t[e].x), o = Math.min(o, t[e].x), a = Math.min(a, t[e].y), s = Math.max(s, t[e].y);
                return new G(o, a, r - o, s - a)
            }
        }), R = M.extend({
            init: function(e) {
                var t = this;
                M.fn.init.call(t), this.connection = e
            },
            route: function() {}
        }), P = M.extend({
            SAME_SIDE_DISTANCE_RATIO: 5,
            init: function(e) {
                var t = this;
                M.fn.init.call(t), this.connection = e
            },
            routePoints: function(e, t, n, i) {
                var r;
                return r = n && i ? this._connectorPoints(e, t, n, i) : this._floatingPoints(e, t, n)
            },
            route: function() {
                var e = this.connection._resolvedSourceConnector,
                    t = this.connection._resolvedTargetConnector,
                    n = this.connection.sourcePoint(),
                    i = this.connection.targetPoint(),
                    r = this.routePoints(n, i, e, t);
                this.connection.points(r)
            },
            _connectorSides: [{
                name: "Top",
                axis: "y",
                boundsPoint: "topLeft",
                secondarySign: 1
            }, {
                name: "Left",
                axis: "x",
                boundsPoint: "topLeft",
                secondarySign: 1
            }, {
                name: "Bottom",
                axis: "y",
                boundsPoint: "bottomRight",
                secondarySign: -1
            }, {
                name: "Right",
                axis: "x",
                boundsPoint: "bottomRight",
                secondarySign: -1
            }],
            _connectorSide: function(e, t) {
                var n, i, r, o, a, s = e.position(),
                    l = e.shape.bounds(Me),
                    c = {
                        topLeft: l.topLeft(),
                        bottomRight: l.bottomRight()
                    },
                    d = this._connectorSides,
                    u = V.util.MAX_NUM;
                for (a = 0; d.length > a; a++) o = d[a], r = o.axis, n = Math.round(Math.abs(s[r] - c[o.boundsPoint][r])), u > n ? (u = n, i = o) : n === u && (s[r] - t[r]) * o.secondarySign > (s[i.axis] - t[i.axis]) * i.secondarySign && (i = o);
                return i.name
            },
            _sameSideDistance: function(e) {
                var t = e.shape.bounds(Me);
                return Math.min(t.width, t.height) / this.SAME_SIDE_DISTANCE_RATIO
            },
            _connectorPoints: function(e, t, n, i) {
                var r, o, a = this._connectorSide(n, t),
                    s = this._connectorSide(i, e),
                    l = t.x - e.x,
                    c = t.y - e.y,
                    d = this._sameSideDistance(n),
                    u = [];
                return a === le || a == ue ? s == le || s == ue ? a == s ? (o = a == le ? Math.min(e.y, t.y) - d : Math.max(e.y, t.y) + d, u = [new Q(e.x, o), new Q(t.x, o)]) : u = [new Q(e.x, e.y + c / 2), new Q(t.x, e.y + c / 2)] : u = [new Q(e.x, t.y)] : s == de || s == ce ? a == s ? (r = a == de ? Math.min(e.x, t.x) - d : Math.max(e.x, t.x) + d, u = [new Q(r, e.y), new Q(r, t.y)]) : u = [new Q(e.x + l / 2, e.y), new Q(e.x + l / 2, e.y + c)] : u = [new Q(t.x, e.y)], u
            },
            _floatingPoints: function(e, t, n) {
                var i, r, o, a = n ? this._connectorSide(n, t) : null,
                    s = this._startHorizontal(e, t, a),
                    l = [e, e, t, t],
                    c = t.x - e.x,
                    d = t.y - e.y,
                    u = l.length;
                for (o = 1; u - 1 > o; ++o) s ? o % 2 !== 0 ? (i = c / (u / 2), r = 0) : (i = 0, r = d / ((u - 1) / 2)) : o % 2 !== 0 ? (i = 0, r = d / (u / 2)) : (i = c / ((u - 1) / 2), r = 0), l[o] = new Q(l[o - 1].x + i, l[o - 1].y + r);
                return o--, l[u - 2] = s && o % 2 !== 0 || !s && o % 2 === 0 ? new Q(l[u - 1].x, l[u - 2].y) : new Q(l[u - 2].x, l[u - 1].y), [l[1], l[2]]
            },
            _startHorizontal: function(e, t, n) {
                var i;
                return i = null === n || n !== ce && n !== de ? Math.abs(e.x - t.x) > Math.abs(e.y - t.y) : !0
            }
        }), z = j.extend({
            init: function(e, t) {
                var n = this;
                n.diagram = e, n.options = Z({}, n.options, t), n.visual = new q, n.diagram._adorners.push(n)
            },
            refresh: function() {}
        }), B = z.extend({
            init: function(e, t) {
                var n, i, r, o = this;
                o.connection = e, n = o.connection.diagram, o._ts = n.toolService, z.fn.init.call(o, n, t), i = o.connection.sourcePoint(), r = o.connection.targetPoint(), o.spVisual = new X(Z(o.options.handles, {
                    center: i
                })), o.epVisual = new X(Z(o.options.handles, {
                    center: r
                })), o.visual.append(o.spVisual), o.visual.append(o.epVisual)
            },
            options: {
                handles: {}
            },
            _getCursor: function() {
                return oe.move
            },
            start: function(e) {
                switch (this.handle = this._hitTest(e), this.startPoint = e, this._initialSource = this.connection.source(), this._initialTarget = this.connection.target(), this.handle) {
                    case -1:
                        this.connection.targetConnector && this._ts._connectionManipulation(this.connection, this.connection.targetConnector.shape);
                        break;
                    case 1:
                        this.connection.sourceConnector && this._ts._connectionManipulation(this.connection, this.connection.sourceConnector.shape)
                }
            },
            move: function(e, t) {
                switch (e) {
                    case -1:
                        this.connection.source(t);
                        break;
                    case 1:
                        this.connection.target(t);
                        break;
                    default:
                        var n = t.minus(this.startPoint);
                        this.startPoint = t, this.connection.sourceConnector || this.connection.source(this.connection.sourcePoint().plus(n)), this.connection.targetConnector || this.connection.target(this.connection.targetPoint().plus(n))
                }
                return this.refresh(), !0
            },
            stop: function(e) {
                var n, i = this.diagram.toolService,
                    r = i.hoveredItem;
                return n = i._hoveredConnector ? i._hoveredConnector._c : r && r instanceof W.Shape ? r.getConnector(se) || r.getConnector(e) : e, -1 === this.handle ? this.connection.source(n) : 1 === this.handle && this.connection.target(n), this.handle = t, this._ts._connectionManipulation(), new f(this.connection, this._initialSource, this._initialTarget)
            },
            _hitTest: function(e) {
                var t = this.connection.sourcePoint(),
                    n = this.connection.targetPoint(),
                    i = this.options.handles.width / 2 + ae,
                    r = this.options.handles.height / 2 + ae,
                    o = t.distanceTo(e),
                    a = n.distanceTo(e),
                    s = new G(t.x, t.y).inflate(i, r).contains(e),
                    l = new G(n.x, n.y).inflate(i, r).contains(e),
                    c = 0;
                return s && (!l || a > o) ? c = -1 : l && (!s || o > a) && (c = 1), c
            },
            refresh: function() {
                this.spVisual.redraw({
                    center: this.diagram.modelToLayer(this.connection.sourcePoint())
                }), this.epVisual.redraw({
                    center: this.diagram.modelToLayer(this.connection.targetPoint())
                })
            }
        }), L = z.extend({
            init: function(e, t) {
                var n = this;
                z.fn.init.call(n, e, t), n._refreshHandler = function(e) {
                    e.item == n.shape && n.refresh()
                }
            },
            show: function(e) {
                var t, n, i, r = this;
                for (r._visible = !0, r.shape = e, r.diagram.bind(_e, r._refreshHandler), t = e.connectors.length, r.connectors = [], r.visual.clear(), n = 0; t > n; n++) i = new O(e.connectors[n]), r.connectors.push(i), r.visual.append(i.visual);
                r.visual.visible(!0), r.refresh()
            },
            destroy: function() {
                var e = this;
                e.diagram.unbind(_e, e._refreshHandler), e.shape = t, e._visible = t, e.visual.visible(!1)
            },
            _hitTest: function(e) {
                var t, n;
                for (n = 0; this.connectors.length > n; n++)
                    if (t = this.connectors[n], t._hitTest(e)) {
                        t._hover(!0), this.diagram.toolService._hoveredConnector = t;
                        break
                    }
            },
            refresh: function() {
                if (this.shape) {
                    var t = this.shape.bounds();
                    t = this.diagram.modelToLayer(t), this.visual.position(t.topLeft()), e.each(this.connectors, function() {
                        this.refresh()
                    })
                }
            }
        }), H = z.extend({
            init: function(e, t) {
                var n = this;
                z.fn.init.call(n, e, t), n._manipulating = !1, n.map = [], n.shapes = [], n._initSelection(), n._createHandles(), n.redraw(), n.diagram.bind("select", function(e) {
                    n._initialize(e.selected)
                }), n._refreshHandler = function() {
                    n._internalChange || (n.refreshBounds(), n.refresh())
                }, n._rotatedHandler = function() {
                    1 == n.shapes.length && (n._angle = n.shapes[0].rotate().angle), n._refreshHandler()
                }, n.diagram.bind(_e, n._refreshHandler).bind(ve, n._rotatedHandler), n.refreshBounds(), n.refresh()
            },
            options: {
                handles: {
                    fill: {
                        color: "#fff"
                    },
                    stroke: {
                        color: "#282828"
                    },
                    height: 7,
                    width: 7,
                    hover: {
                        fill: {
                            color: "#282828"
                        },
                        stroke: {
                            color: "#282828"
                        }
                    }
                },
                selectable: {
                    stroke: {
                        color: "#778899",
                        width: 1,
                        dashType: "dash"
                    },
                    fill: {
                        color: Fe
                    }
                },
                offset: 10
            },
            _initSelection: function() {
                var e = this,
                    t = e.diagram,
                    n = t.options.selectable,
                    i = Z({}, e.options.selectable, n);
                e.rect = new $(i), e.visual.append(e.rect)
            },
            _resizable: function() {
                return this.options.editable && this.options.editable.resize !== !1
            },
            _handleOptions: function() {
                return (this.options.editable.resize || {}).handles || this.options.handles
            },
            _createHandles: function() {
                var e, t, n, i;
                if (this._resizable())
                    for (e = this._handleOptions(), i = -1; 1 >= i; i++)
                        for (n = -1; 1 >= n; n++)(0 !== i || 0 !== n) && (t = new $(e), t.drawingElement._hover = re(this._hover, this), this.map.push({
                            x: i,
                            y: n,
                            visual: t
                        }), this.visual.append(t))
            },
            bounds: function(e) {
                return e ? (this._innerBounds = e.clone(), this._bounds = this.diagram.modelToLayer(e).inflate(this.options.offset, this.options.offset), t) : this._bounds
            },
            _hitTest: function(e) {
                var n, i, r, o, a = this.diagram.modelToLayer(e),
                    s = this.map.length;
                if (this._angle && (a = a.clone().rotate(this._bounds.center(), this._angle)), this._resizable())
                    for (n = 0; s > n; n++)
                        if (o = this.map[n], i = new Q(o.x, o.y), r = this._getHandleBounds(i), r.offset(this._bounds.x, this._bounds.y), r.contains(a)) return i;
                return this._bounds.contains(a) ? new Q(0, 0) : t
            },
            _getHandleBounds: function(e) {
                if (this._resizable()) {
                    var t = this._handleOptions(),
                        n = t.width,
                        i = t.height,
                        r = new G(0, 0, n, i);
                    return 0 > e.x ? r.x = -n / 2 : 0 === e.x ? r.x = Math.floor(this._bounds.width / 2) - n / 2 : e.x > 0 && (r.x = this._bounds.width + 1 - n / 2), 0 > e.y ? r.y = -i / 2 : 0 === e.y ? r.y = Math.floor(this._bounds.height / 2) - i / 2 : e.y > 0 && (r.y = this._bounds.height + 1 - i / 2), r
                }
            },
            _getCursor: function(e) {
                var t, n = this._hitTest(e);
                if (n && n.x >= -1 && 1 >= n.x && n.y >= -1 && 1 >= n.y && this._resizable()) {
                    if (t = this._angle, t && (t = 360 - t, n.rotate(new Q(0, 0), t), n = new Q(Math.round(n.x), Math.round(n.y))), -1 == n.x && -1 == n.y) return "nw-resize";
                    if (1 == n.x && 1 == n.y) return "se-resize";
                    if (-1 == n.x && 1 == n.y) return "sw-resize";
                    if (1 == n.x && -1 == n.y) return "ne-resize";
                    if (0 === n.x && -1 == n.y) return "n-resize";
                    if (0 === n.x && 1 == n.y) return "s-resize";
                    if (1 == n.x && 0 === n.y) return "e-resize";
                    if (-1 == n.x && 0 === n.y) return "w-resize"
                }
                return this._manipulating ? oe.move : oe.select
            },
            _initialize: function() {
                var e, t, n = this,
                    i = n.diagram.select();
                for (n.shapes = [], e = 0; i.length > e; e++) t = i[e], t instanceof W.Shape && (n.shapes.push(t), t._rotationOffset = new Q);
                n._angle = 1 == n.shapes.length ? n.shapes[0].rotate().angle : 0, n._startAngle = n._angle, n._rotates(), n._positions(), n.refreshBounds(), n.refresh(), n.redraw()
            },
            _rotates: function() {
                var e, t, n = this;
                for (n.initialRotates = [], e = 0; n.shapes.length > e; e++) t = n.shapes[e], n.initialRotates.push(t.rotate().angle)
            },
            _positions: function() {
                var e, t, n = this;
                for (n.initialStates = [], e = 0; n.shapes.length > e; e++) t = n.shapes[e], n.initialStates.push(t.bounds())
            },
            _hover: function(e, t) {
                if (this._resizable()) {
                    var n = this._handleOptions(),
                        i = n.hover,
                        r = n.stroke,
                        o = n.fill;
                    e && Y.isDefined(i.stroke) && (r = Z({}, r, i.stroke)), e && Y.isDefined(i.fill) && (o = i.fill), t.stroke(r.color, r.width, r.opacity), t.fill(o.color, o.opacity)
                }
            },
            start: function(e) {
                var t, n;
                for (this._sp = e, this._cp = e, this._lp = e, this._manipulating = !0, this._internalChange = !0, this.shapeStates = [], t = 0; this.shapes.length > t; t++) n = this.shapes[t], this.shapeStates.push(n.bounds())
            },
            redraw: function() {
                var e, t, n = this._resizable();
                for (e = 0; this.map.length > e; e++) t = this.map[e], t.visual.visible(n)
            },
            angle: function(e) {
                return ne(e) && (this._angle = e), this._angle
            },
            rotate: function() {
                var e, t, n = this._innerBounds.center(),
                    i = this.angle();
                for (this._internalChange = !0, e = 0; this.shapes.length > e; e++) t = this.shapes[e], i = (i + this.initialRotates[e] - this._startAngle) % 360, t.rotate(i, n);
                this.refresh()
            },
            move: function(e, n) {
                var i, r, o, l, c, d, u, h, f, p, m, g, v, _, b = new Q,
                    w = new Q,
                    y = 0;
                if (-2 === e.y && -1 === e.x) {
                    for (l = this._innerBounds.center(), this._angle = this._truncateAngle(Y.findAngle(l, n)), d = 0; this.shapes.length > d; d++) c = this.shapes[d], u = (this._angle + this.initialRotates[d] - this._startAngle) % 360, c.rotate(u, l), c.hasOwnProperty("layout") && c.layout(c), this._rotating = !0;
                    this.refresh()
                } else {
                    if (this.shouldSnap()) {
                        if (g = this._truncateDistance(n.minus(this._lp)), 0 === g.x && 0 === g.y) return this._cp = n, t;
                        i = g, this._lp = new Q(this._lp.x + g.x, this._lp.y + g.y)
                    } else i = n.minus(this._cp);
                    for (this.isDragHandle(e) ? (w = b = i, r = !0) : (this._angle && i.rotate(new Q(0, 0), this._angle), -1 == e.x ? b.x = i.x : 1 == e.x && (w.x = i.x), -1 == e.y ? b.y = i.y : 1 == e.y && (w.y = i.y)), r || (f = a(e, this._innerBounds), p = (this._innerBounds.width + i.x * e.x) / this._innerBounds.width, m = (this._innerBounds.height + i.y * e.y) / this._innerBounds.height), d = 0; this.shapes.length > d; d++) {
                        if (c = this.shapes[d], o = c.bounds(), r) {
                            if (!s(c)) continue;
                            h = this._displaceBounds(o, b, w, r)
                        } else h = o.clone(), h.scale(p, m, f, this._innerBounds.center(), c.rotate().angle), v = h.center(), v.rotate(o.center(), -this._angle), h = new G(v.x - h.width / 2, v.y - h.height / 2, h.width, h.height);
                        h.width >= c.options.minWidth && h.height >= c.options.minHeight && (_ = o, c.bounds(h), c.hasOwnProperty("layout") && c.layout(c, _, h), (_.width !== h.width || _.height !== h.height) && c.rotate(c.rotate().angle), y += 1)
                    }
                    y && (y == d ? (h = this._displaceBounds(this._innerBounds, b, w, r), this.bounds(h)) : this.refreshBounds(), this.refresh()), this._positions()
                }
                this._cp = n
            },
            isDragHandle: function(e) {
                return 0 === e.x && 0 === e.y
            },
            cancel: function() {
                var e, n = this.shapes,
                    i = this.shapeStates;
                for (e = 0; n.length > e; e++) n[e].bounds(i[e]);
                this.refreshBounds(), this.refresh(), this._manipulating = t, this._internalChange = t, this._rotating = t
            },
            _truncatePositionToGuides: function(e) {
                return this.diagram.ruler ? this.diagram.ruler.truncatePositionToGuides(e) : e
            },
            _truncateSizeToGuides: function(e) {
                return this.diagram.ruler ? this.diagram.ruler.truncateSizeToGuides(e) : e
            },
            _truncateAngle: function(e) {
                var t = this.snapOptions(),
                    n = Math.max(t.angle || fe, we);
                return t ? Math.floor(e % 360 / n) * n : e % 360
            },
            _truncateDistance: function(e) {
                var t, n;
                return e instanceof W.Point ? new W.Point(this._truncateDistance(e.x), this._truncateDistance(e.y)) : (t = this.snapOptions() || {}, n = Math.max(t.size || he, be), t ? Math.floor(e / n) * n : e)
            },
            snapOptions: function() {
                var e = this.diagram.options.editable,
                    t = ((e || {}).drag || {}).snap || {};
                return t
            },
            shouldSnap: function() {
                var e = this.diagram.options.editable,
                    t = (e || {}).drag,
                    n = (t || {}).snap;
                return e !== !1 && t !== !1 && n !== !1
            },
            _displaceBounds: function(e, t, n, i) {
                var r, o = e.topLeft().plus(t),
                    a = e.bottomRight().plus(n),
                    s = G.fromPoints(o, a);
                return i || (r = s.center(), r.rotate(e.center(), -this._angle), s = new G(r.x - s.width / 2, r.y - s.height / 2, s.width, s.height)), s
            },
            stop: function() {
                var e, n, i, r;
                if (this._cp != this._sp)
                    if (this._rotating) e = new w(this, this.shapes, this.initialRotates), this._rotating = !1;
                    else if (this._diffStates()) {
                        if (this.diagram.ruler)
                            for (n = 0; this.shapes.length > n; n++) i = this.shapes[n], r = i.bounds(), r = this._truncateSizeToGuides(this._truncatePositionToGuides(r)), i.bounds(r), this.refreshBounds(), this.refresh();
                        for (n = 0; this.shapes.length > n; n++) i = this.shapes[n], i.updateModel();
                        e = new g(this.shapes, this.shapeStates, this), this.diagram._syncShapeChanges()
                    }
                return this._manipulating = t, this._internalChange = t, this._rotating = t, e
            },
            _diffStates: function() {
                var e, t = this.shapes,
                    n = this.shapeStates;
                for (e = 0; t.length > e; e++)
                    if (!t[e].bounds().equals(n[e])) return !0;
                return !1
            },
            refreshBounds: function() {
                var e = 1 == this.shapes.length ? this.shapes[0].bounds().clone() : this.diagram.boundingBox(this.shapes, !0);
                this.bounds(e)
            },
            refresh: function() {
                var t, n, i, r, o = this;
                this.shapes.length > 0 ? (n = this.bounds(), this.visual.visible(!0), this.visual.position(n.topLeft()), e.each(this.map, function() {
                    t = o._getHandleBounds(new Q(this.x, this.y)), this.visual.position(t.topLeft())
                }), this.visual.position(n.topLeft()), i = new Q(n.width / 2, n.height / 2), this.visual.rotate(this._angle, i), this.rect.redraw({
                    width: n.width,
                    height: n.height
                }), this.rotationThumb && (r = this.options.editable.rotate.thumb, this._rotationThumbBounds = new G(n.center().x, n.y + r.y, 0, 0).inflate(r.width), this.rotationThumb.redraw({
                    x: n.width / 2 - r.width / 2
                }))) : this.visual.visible(!1)
            }
        }), N = j.extend({
            init: function(e) {
                var t = e.options.selectable;
                this.options = Z({}, this.options, t), this.visual = new $(this.options), this.diagram = e
            },
            options: {
                stroke: {
                    color: "#778899",
                    width: 1,
                    dashType: "dash"
                },
                fill: {
                    color: Fe
                }
            },
            start: function(e) {
                this._sp = this._ep = e, this.refresh(), this.diagram._adorn(this, !0)
            },
            end: function() {
                this._sp = this._ep = t, this.diagram._adorn(this, !1)
            },
            bounds: function(e) {
                return e && (this._bounds = e), this._bounds
            },
            move: function(e) {
                this._ep = e, this.refresh()
            },
            refresh: function() {
                if (this._sp) {
                    var e = G.fromPoints(this.diagram.modelToLayer(this._sp), this.diagram.modelToLayer(this._ep));
                    this.bounds(G.fromPoints(this._sp, this._ep)), this.visual.position(e.topLeft()), this.visual.redraw({
                        height: e.height + 1,
                        width: e.width + 1
                    })
                }
            }
        }), O = j.extend({
            init: function(e) {
                this.options = Z({}, e.options), this._c = e, this.visual = new X(this.options), this.refresh()
            },
            _hover: function(e) {
                var t = this.options,
                    n = t.hover,
                    i = t.stroke,
                    r = t.fill;
                e && Y.isDefined(n.stroke) && (i = Z({}, i, n.stroke)), e && Y.isDefined(n.fill) && (r = n.fill), this.visual.redraw({
                    stroke: i,
                    fill: r
                })
            },
            refresh: function() {
                var e = this._c.shape.diagram.modelToView(this._c.position()),
                    t = e.minus(this._c.shape.bounds("transformed").topLeft()),
                    n = new G(e.x, e.y, 0, 0);
                n.inflate(this.options.width / 2, this.options.height / 2), this._visualBounds = n, this.visual.redraw({
                    center: new Q(t.x, t.y)
                })
            },
            _hitTest: function(e) {
                var t = this._c.shape.diagram.modelToView(e);
                return this._visualBounds.contains(t)
            }
        }), Z(W, {
            CompositeUnit: u,
            TransformUnit: g,
            PanUndoUnit: b,
            AddShapeUnit: _,
            AddConnectionUnit: v,
            DeleteShapeUnit: m,
            DeleteConnectionUnit: p,
            ConnectionEditAdorner: B,
            ConnectionTool: A,
            ConnectorVisual: O,
            UndoRedoService: x,
            ResizingAdorner: H,
            Selector: N,
            ToolService: F,
            ConnectorsAdorner: L,
            LayoutUndoUnit: d,
            ConnectionEditUnit: h,
            ToFrontUnit: y,
            ToBackUnit: k,
            ConnectionRouterBase: I,
            PolylineRouter: R,
            CascadingRouter: P,
            SelectionTool: D,
            ScrollerTool: S,
            PointerTool: T,
            ConnectionEditTool: E,
            RotateUnit: w
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/diagram/layout.min", ["dataviz/diagram/math.min"], e)
}(function() {
    ! function(e, t) {
        var n = window.kendo,
            i = n.dataviz.diagram,
            r = i.Graph,
            o = i.Node,
            a = i.Link,
            s = n.deepExtend,
            l = i.Size,
            c = i.Rect,
            d = i.Dictionary,
            u = i.Set,
            h = i.Graph,
            f = i.Utils,
            p = i.Point,
            m = 1e-6,
            g = Math.PI / 180,
            v = f.contains,
            _ = e.grep,
            b = n.Class.extend({
                defaultOptions: {
                    type: "Tree",
                    subtype: "Down",
                    roots: null,
                    animate: !1,
                    limitToView: !1,
                    friction: .9,
                    nodeDistance: 50,
                    iterations: 300,
                    horizontalSeparation: 90,
                    verticalSeparation: 50,
                    underneathVerticalTopOffset: 15,
                    underneathHorizontalOffset: 15,
                    underneathVerticalSeparation: 15,
                    grid: {
                        width: 1500,
                        offsetX: 50,
                        offsetY: 50,
                        componentSpacingX: 20,
                        componentSpacingY: 20
                    },
                    layerSeparation: 50,
                    layeredIterations: 2,
                    startRadialAngle: 0,
                    endRadialAngle: 360,
                    radialSeparation: 150,
                    radialFirstLevelSeparation: 200,
                    keepComponentsInOneRadialLayout: !1,
                    ignoreContainers: !0,
                    layoutContainerChildren: !1,
                    ignoreInvisible: !0,
                    animateTransitions: !1
                },
                init: function() {},
                gridLayoutComponents: function(e) {
                    var t, n, i, r, o, a, s, l, c, d, u, h, m, g, v;
                    if (!e) throw "No components supplied.";
                    for (f.forEach(e, function(e) {
                        e.calcBounds()
                    }), e.sort(function(e, t) {
                        return t.bounds.width - e.bounds.width
                    }), t = this.options.grid.width, n = this.options.grid.componentSpacingX, i = this.options.grid.componentSpacingY, r = 0, o = this.options.grid.offsetX, a = this.options.grid.offsetY, s = o, l = a, d = [], u = []; e.length > 0;) {
                        for (s >= t && (s = o, l += r + i, r = 0), h = e.pop(), this.moveToOffset(h, new p(s, l)), c = 0; h.nodes.length > c; c++) u.push(h.nodes[c]);
                        for (c = 0; h.links.length > c; c++) d.push(h.links[c]);
                        m = h.bounds, g = m.height, (0 >= g || isNaN(g)) && (g = 0), v = m.width, (0 >= v || isNaN(v)) && (v = 0), g >= r && (r = g), s += v + n
                    }
                    return {
                        nodes: u,
                        links: d
                    }
                },
                moveToOffset: function(e, t) {
                    var n, i, r, o, a, s, l, d, u = e.bounds,
                        h = t.x - u.x,
                        f = t.y - u.y;
                    for (n = 0; e.nodes.length > n; n++) r = e.nodes[n], o = r.bounds(), 0 === o.width && 0 === o.height && 0 === o.x && 0 === o.y && (o = new c(0, 0, 0, 0)), o.x += h, o.y += f, r.bounds(o);
                    for (n = 0; e.links.length > n; n++)
                        if (a = e.links[n], a.points) {
                            for (s = [], l = a.points, i = 0; l.length > i; i++) d = l[i], d.x += h, d.y += f, s.push(d);
                            a.points = s
                        } return this.currentHorizontalOffset += u.width + this.options.grid.offsetX, new p(h, f)
                },
                transferOptions: function(e) {
                    this.options = n.deepExtend({}, this.defaultOptions), f.isUndefined(e) || (this.options = n.deepExtend(this.options, e || {}))
                }
            }),
            w = n.Class.extend({
                init: function(e) {
                    this.nodeMap = new d, this.shapeMap = new d, this.nodes = [], this.edges = [], this.edgeMap = new d, this.finalNodes = [], this.finalLinks = [], this.ignoredConnections = [], this.ignoredShapes = [], this.hyperMap = new d, this.hyperTree = new r, this.finalGraph = null, this.diagram = e
                },
                convert: function(e) {
                    if (f.isUndefined(this.diagram)) throw "No diagram to convert.";
                    return this.options = n.deepExtend({
                        ignoreInvisible: !0,
                        ignoreContainers: !0,
                        layoutContainerChildren: !1
                    }, e || {}), this.clear(), this._renormalizeShapes(), this._renormalizeConnections(), this.finalNodes = new d(this.nodes), this.finalLinks = new d(this.edges), this.finalGraph = new r, this.finalNodes.forEach(function(e) {
                        this.finalGraph.addNode(e)
                    }, this), this.finalLinks.forEach(function(e) {
                        this.finalGraph.addExistingLink(e)
                    }, this), this.finalGraph
                },
                mapConnection: function(e) {
                    return this.edgeMap.get(e.id)
                },
                mapShape: function(e) {
                    return this.nodeMap.get(e.id)
                },
                getEdge: function(e, t) {
                    return f.first(e.links, function(n) {
                        return n.getComplement(e) === t
                    })
                },
                clear: function() {
                    this.finalGraph = null, this.hyperTree = !this.options.ignoreContainers && this.options.layoutContainerChildren ? new h : null, this.hyperMap = !this.options.ignoreContainers && this.options.layoutContainerChildren ? new d : null, this.nodeMap = new d, this.shapeMap = new d, this.nodes = [], this.edges = [], this.edgeMap = new d, this.ignoredConnections = [], this.ignoredShapes = [], this.finalNodes = [], this.finalLinks = []
                },
                listToRoot: function(e) {
                    var t = [],
                        n = e.container;
                    if (!n) return t;
                    for (t.push(n); n.parentContainer;) n = n.parentContainer, t.push(n);
                    return t.reverse(), t
                },
                firstNonIgnorableContainer: function(e) {
                    return e.isContainer && !this._isIgnorableItem(e) ? e : e.parentContainer ? this.firstNonIgnorableContainer(e.parentContainer) : null
                },
                isContainerConnection: function(e, t) {
                    return e.isContainer && this.isDescendantOf(e, t) ? !0 : t.isContainer && this.isDescendantOf(t, e)
                },
                isDescendantOf: function(e, t) {
                    var n, i, r, o;
                    if (!e.isContainer) throw "Expecting a container.";
                    if (e === t) return !1;
                    if (v(e.children, t)) return !0;
                    for (n = [], i = 0, r = e.children.length; r > i; i++) o = e.children[i], o.isContainer && this.isDescendantOf(o, t) && n.push(o);
                    return n.length > 0
                },
                isIgnorableItem: function(e) {
                    return this.options.ignoreInvisible ? e.isCollapsed && this._isVisible(e) ? !1 : !e.isCollapsed && this._isVisible(e) ? !1 : !0 : e.isCollapsed && !this._isTop(e)
                },
                isShapeMapped: function(e) {
                    return e.isCollapsed && !this._isVisible(e) && !this._isTop(e)
                },
                leastCommonAncestor: function(e, t) {
                    var n, i, r, o, a, s;
                    if (!e) throw "Parameter should not be null.";
                    if (!t) throw "Parameter should not be null.";
                    if (!this.hyperTree) throw "No hypertree available.";
                    if (n = this.listToRoot(e), i = this.listToRoot(t), r = null, f.isEmpty(n) || f.isEmpty(i)) return this.hyperTree.root.data;
                    for (o = n[0], a = i[0], s = 0; o === a && (r = n[s], s++, !(s >= n.length || s >= i.length));) o = n[s], a = i[s];
                    return r ? _(this.hyperTree.nodes, function(e) {
                        return e.data.container === r
                    }) : this.hyperTree.root.data
                },
                _isTop: function(e) {
                    return !e.parentContainer
                },
                _isVisible: function(e) {
                    return e.visible() ? e.parentContainer ? this._isVisible(e.parentContainer) : e.visible() : !1
                },
                _isCollapsed: function(e) {
                    return e.isContainer && e.isCollapsed ? !0 : e.parentContainer && this._isCollapsed(e.parentContainer)
                },
                _renormalizeShapes: function() {
                    var e, t, n, i;
                    if (!this.options.ignoreContainers) throw "Containers are not supported yet, but stay tuned.";
                    for (e = 0, t = this.diagram.shapes.length; t > e; e++) n = this.diagram.shapes[e], this.options.ignoreInvisible && !this._isVisible(n) || n.isContainer ? this.ignoredShapes.push(n) : (i = new o(n.id, n), i.isVirtual = !1, this.nodeMap.add(n.id, i), this.nodes.push(i))
                },
                _renormalizeConnections: function() {
                    var e, t, n, i, r, o, s, l;
                    if (0 !== this.diagram.connections.length)
                        for (e = 0, t = this.diagram.connections.length; t > e; e++)
                            if (n = this.diagram.connections[e], this.isIgnorableItem(n)) this.ignoredConnections.push(n);
                            else if (i = n.sourceConnector ? n.sourceConnector.shape : null, r = n.targetConnector ? n.targetConnector.shape : null, i && r)
                                if (!v(this.ignoredShapes, i) || this.shapeMap.containsKey(i))
                                    if (!v(this.ignoredShapes, r) || this.shapeMap.containsKey(r))
                                        if (this.shapeMap.containsKey(i) && (i = this.shapeMap[i]), this.shapeMap.containsKey(r) && (r = this.shapeMap[r]), o = this.mapShape(i), s = this.mapShape(r), o === s || this.areConnectedAlready(o, s)) this.ignoredConnections.push(n);
                                        else {
                                            if (null === o || null === s) throw "A shape was not mapped to a node.";
                                            if (!this.options.ignoreContainers) throw "Containers are not supported yet, but stay tuned.";
                                            o.isVirtual || s.isVirtual ? this.ignoredConnections.push(n) : (l = new a(o, s, n.id, n), this.edgeMap.add(n.id, l), this.edges.push(l))
                                        }
                                    else this.ignoredConnections.push(n);
                                else this.ignoredConnections.push(n);
                            else this.ignoredConnections.push(n)
                },
                areConnectedAlready: function(e, t) {
                    return f.any(this.edges, function(n) {
                        return n.source === e && n.target === t || n.source === t && n.target === e
                    })
                }
            }),
            y = b.extend({
                init: function(e) {
                    var t = this;
                    if (b.fn.init.call(t), f.isUndefined(e)) throw "Diagram is not specified.";
                    this.diagram = e
                },
                layout: function(e) {
                    var t, n, r, o, a, s;
                    if (this.transferOptions(e), t = new w(this.diagram), n = t.convert(e), !n.isEmpty() && (r = n.getConnectedComponents(), !f.isEmpty(r))) {
                        for (o = 0; r.length > o; o++) a = r[o], this.layoutGraph(a, e);
                        return s = this.gridLayoutComponents(r), new i.LayoutState(this.diagram, s)
                    }
                },
                layoutGraph: function(e, t) {
                    var n, i, r;
                    for (f.isDefined(t) && this.transferOptions(t), this.graph = e, n = 9 * this.options.nodeDistance, this.temperature = n, i = this._expectedBounds(), this.width = i.width, this.height = i.height, r = 0; this.options.iterations > r; r++) this.refineStage = r >= 5 * this.options.iterations / 6, this.tick(), this.temperature = this.refineStage ? n / 30 : n * (1 - r / (2 * this.options.iterations))
                },
                tick: function() {
                    var e, t, n;
                    for (e = 0; this.graph.nodes.length > e; e++) this._repulsion(this.graph.nodes[e]);
                    for (e = 0; this.graph.links.length > e; e++) this._attraction(this.graph.links[e]);
                    for (e = 0; this.graph.nodes.length > e; e++) {
                        if (t = this.graph.nodes[e], n = Math.sqrt(t.dx * t.dx + t.dy * t.dy), 0 === n) return;
                        t.x += Math.min(n, this.temperature) * t.dx / n, t.y += Math.min(n, this.temperature) * t.dy / n, this.options.limitToView && (t.x = Math.min(this.width, Math.max(t.width / 2, t.x)), t.y = Math.min(this.height, Math.max(t.height / 2, t.y)))
                    }
                },
                _shake: function(e) {
                    var t = Math.random() * this.options.nodeDistance / 4,
                        n = 2 * Math.random() * Math.PI;
                    e.x += t * Math.cos(n), e.y -= t * Math.sin(n)
                },
                _InverseSquareForce: function(e, t, n) {
                    var i, r, o, a, s, l, c;
                    return this.refineStage ? (r = t.x - n.x, o = t.y - n.y, a = t.width / 2, s = t.height / 2, l = n.width / 2, c = n.height / 2, i = Math.pow(r, 2) / Math.pow(a + l + this.options.nodeDistance, 2) + Math.pow(o, 2) / Math.pow(s + c + this.options.nodeDistance, 2)) : i = Math.pow(e, 2) / Math.pow(this.options.nodeDistance, 2), 4 * i / 3
                },
                _SquareForce: function(e, t, n) {
                    return 1 / this._InverseSquareForce(e, t, n)
                },
                _repulsion: function(e) {
                    e.dx = 0, e.dy = 0, f.forEach(this.graph.nodes, function(t) {
                        var n, i, r, o;
                        if (t !== e) {
                            for (; e.x === t.x && e.y === t.y;) this._shake(t);
                            n = e.x - t.x, i = e.y - t.y, r = Math.sqrt(n * n + i * i), o = 2 * this._SquareForce(r, e, t), e.dx += n / r * o, e.dy += i / r * o
                        }
                    }, this)
                },
                _attraction: function(e) {
                    var t, n, i, r, o, a, s = e.target,
                        l = e.source;
                    if (l !== s) {
                        for (; l.x === s.x && l.y === s.y;) this._shake(s);
                        t = l.x - s.x, n = l.y - s.y, i = Math.sqrt(t * t + n * n), r = 5 * this._InverseSquareForce(i, l, s), o = t / i * r, a = n / i * r, s.dx += o, s.dy += a, l.dx -= o, l.dy -= a
                    }
                },
                _expectedBounds: function() {
                    var e, t, n, i, r, o = this.graph.nodes.length,
                        a = 1.5,
                        s = 4;
                    return 0 === o ? e : (e = f.fold(this.graph.nodes, function(e, t) {
                        var n = t.width * t.height;
                        return n > 0 ? e += Math.sqrt(n) : 0
                    }, 0, this), t = e / o, n = t * Math.ceil(Math.sqrt(o)), i = n * Math.sqrt(a), r = n / Math.sqrt(a), {
                        width: i * s,
                        height: r * s
                    })
                }
            }),
            k = n.Class.extend({
                init: function(e) {
                    this.center = null, this.options = e
                },
                layout: function(e, t) {
                    if (this.graph = e, this.graph.nodes && 0 !== this.graph.nodes.length) {
                        if (!v(this.graph.nodes, t)) throw "The given root is not in the graph.";
                        this.center = t, this.graph.cacheRelationships(), this.layoutSwitch()
                    }
                },
                layoutLeft: function(e) {
                    var t, n, i, r, o, a, s, c;
                    for (this.setChildrenDirection(this.center, "Left", !1), this.setChildrenLayout(this.center, "Default", !1), t = 0, n = 0, r = 0; e.length > r; r++) o = e[r], o.TreeDirection = "Left", a = this.measure(o, l.Empty), n = Math.max(n, a.Width), t += a.height + this.options.verticalSeparation;
                    for (t -= this.options.verticalSeparation, s = this.center.x - this.options.horizontalSeparation, i = this.center.y + (this.center.height - t) / 2, r = 0; e.length > r; r++) o = e[r], c = new p(s - o.Size.width, i), this.arrange(o, c), i += o.Size.height + this.options.verticalSeparation
                },
                layoutRight: function(e) {
                    var t, n, i, r, o, a, s, c;
                    for (this.setChildrenDirection(this.center, "Right", !1), this.setChildrenLayout(this.center, "Default", !1), t = 0, n = 0, r = 0; e.length > r; r++) o = e[r], o.TreeDirection = "Right", a = this.measure(o, l.Empty), n = Math.max(n, a.Width), t += a.height + this.options.verticalSeparation;
                    for (t -= this.options.verticalSeparation, s = this.center.x + this.options.horizontalSeparation + this.center.width, i = this.center.y + (this.center.height - t) / 2, r = 0; e.length > r; r++) o = e[r], c = new p(s, i), this.arrange(o, c), i += o.Size.height + this.options.verticalSeparation
                },
                layoutUp: function(e) {
                    var t, n, i, r, o, a, s;
                    for (this.setChildrenDirection(this.center, "Up", !1), this.setChildrenLayout(this.center, "Default", !1), t = 0, r = 0; e.length > r; r++) i = e[r], i.TreeDirection = "Up", o = this.measure(i, l.Empty), t += o.width + this.options.horizontalSeparation;
                    for (t -= this.options.horizontalSeparation, a = this.center.x + this.center.width / 2 - t / 2, r = 0; e.length > r; r++) i = e[r], n = this.center.y - this.options.verticalSeparation - i.Size.height, s = new p(a, n), this.arrange(i, s), a += i.Size.width + this.options.horizontalSeparation
                },
                layoutDown: function(e) {
                    var t, n, i, r, o, a, s;
                    for (this.setChildrenDirection(this.center, "Down", !1), this.setChildrenLayout(this.center, "Default", !1), i = 0, n = 0; e.length > n; n++) t = e[n], t.treeDirection = "Down", o = this.measure(t, l.Empty), i += o.width + this.options.horizontalSeparation;
                    for (i -= this.options.horizontalSeparation, a = this.center.x + this.center.width / 2 - i / 2, r = this.center.y + this.options.verticalSeparation + this.center.height, n = 0; e.length > n; n++) t = e[n], s = new p(a, r), this.arrange(t, s), a += t.Size.width + this.options.horizontalSeparation
                },
                layoutRadialTree: function() {
                    var e, t;
                    if (this.setChildrenDirection(this.center, "Radial", !1), this.setChildrenLayout(this.center, "Default", !1), this.previousRoot = null, e = this.options.startRadialAngle * g, t = this.options.endRadialAngle * g, e >= t) throw "Final angle should not be less than the start angle.";
                    this.maxDepth = 0, this.origin = new p(this.center.x, this.center.y), this.calculateAngularWidth(this.center, 0), this.maxDepth > 0 && this.radialLayout(this.center, this.options.radialFirstLevelSeparation, e, t), this.center.Angle = t - e
                },
                tipOverTree: function(e, t) {
                    var n, i, r, o, a, s, c;
                    for (f.isUndefined(t) && (t = 0), this.setChildrenDirection(this.center, "Down", !1), this.setChildrenLayout(this.center, "Default", !1), this.setChildrenLayout(this.center, "Underneath", !1, t), n = 0, o = 0; e.length > o; o++) r = e[o], r.TreeDirection = "Down", a = this.measure(r, l.Empty), n += a.width + this.options.horizontalSeparation;
                    for (n -= this.options.horizontalSeparation, n -= e[e.length - 1].width, n += e[e.length - 1].associatedShape.bounds().width, s = this.center.x + this.center.width / 2 - n / 2, i = this.center.y + this.options.verticalSeparation + this.center.height, o = 0; e.length > o; o++) r = e[o], c = new p(s, i), this.arrange(r, c), s += r.Size.width + this.options.horizontalSeparation
                },
                calculateAngularWidth: function(e, t) {
                    var n, i, r, o, a, s, l;
                    if (t > this.maxDepth && (this.maxDepth = t), n = 0, i = 1e3, r = 1e3, o = 0 === t ? 0 : Math.sqrt(i * i + r * r) / t, e.children.length > 0) {
                        for (a = 0, s = e.children.length; s > a; a++) l = e.children[a], n += this.calculateAngularWidth(l, t + 1);
                        n = Math.max(o, n)
                    } else n = o;
                    return e.sectorAngle = n, n
                },
                sortChildren: function(e) {
                    var t, n, i, r, o, a, s, l, c, d, u, h = 0;
                    if (e.parents.length > 1) throw "Node is not part of a tree.";
                    if (n = e.parents[0], n && (i = new p(n.x, n.y), r = new p(e.x, e.y), h = this.normalizeAngle(Math.atan2(i.y - r.y, i.x - r.x))), o = e.children.length, 0 === o) return null;
                    for (a = [], s = [], t = 0; o > t; ++t) l = e.children[t], c = new p(l.x, l.y), s[t] = t, a[t] = this.normalizeAngle(-h + Math.atan2(c.y - c.y, c.x - c.x));
                    for (f.bisort(a, s), d = [], u = e.children, t = 0; o > t; ++t) d.push(u[s[t]]);
                    return d
                },
                normalizeAngle: function(e) {
                    for (; e > 2 * Math.PI;) e -= 2 * Math.PI;
                    for (; 0 > e;) e += 2 * Math.PI;
                    return e
                },
                radialLayout: function(e, t, n, i) {
                    var r, o, a, s, l, c = i - n,
                        d = c / 2,
                        u = e.sectorAngle,
                        h = 0,
                        f = this.sortChildren(e);
                    for (r = 0, o = f.length; o > r; r++) a = f[r], s = a, l = s.sectorAngle / u, a.children.length > 0 && this.radialLayout(a, t + this.options.radialSeparation, n + h * c, n + (h + l) * c), this.setPolarLocation(a, t, n + h * c + l * d), s.angle = l * c, h += l
                },
                setPolarLocation: function(e, t, n) {
                    e.x = this.origin.x + t * Math.cos(n), e.y = this.origin.y + t * Math.sin(n), e.BoundingRectangle = new c(e.x, e.y, e.width, e.height)
                },
                setChildrenDirection: function(e, t, n) {
                    var i = e.treeDirection;
                    this.graph.depthFirstTraversal(e, function(e) {
                        e.treeDirection = t
                    }), n || (e.treeDirection = i)
                },
                setChildrenLayout: function(e, t, n, i) {
                    f.isUndefined(i) && (i = 0);
                    var r = e.childrenLayout;
                    i > 0 ? (this.graph.assignLevels(e), this.graph.depthFirstTraversal(e, function(e) {
                        e.level >= i + 1 && (e.childrenLayout = t)
                    })) : (this.graph.depthFirstTraversal(e, function(e) {
                        e.childrenLayout = t
                    }), n || (e.childrenLayout = r))
                },
                measure: function(e, t) {
                    var n, i, r, o, a, s, c, d = 0,
                        u = 0,
                        h = new l(0, 0);
                    if (!e) throw "";
                    if (i = e.associatedShape.bounds(), r = i.width, o = i.height, 1 !== e.parents.length) throw "Node not in a spanning tree.";
                    if (a = e.parents[0], "Undefined" === e.treeDirection && (e.treeDirection = a.treeDirection), f.isEmpty(e.children)) h = new l(Math.abs(r) < m ? 50 : r, Math.abs(o) < m ? 25 : o);
                    else if (1 === e.children.length) {
                        switch (e.treeDirection) {
                            case "Radial":
                                n = this.measure(e.children[0], t), d = r + this.options.radialSeparation * Math.cos(e.AngleToParent) + n.width, u = o + Math.abs(this.options.radialSeparation * Math.sin(e.AngleToParent)) + n.height;
                                break;
                            case "Left":
                            case "Right":
                                switch (e.childrenLayout) {
                                    case "TopAlignedWithParent":
                                        break;
                                    case "BottomAlignedWithParent":
                                        break;
                                    case "Underneath":
                                        n = this.measure(e.children[0], t), d = r + n.width + this.options.underneathHorizontalOffset, u = o + this.options.underneathVerticalTopOffset + n.height;
                                        break;
                                    case "Default":
                                        n = this.measure(e.children[0], t), d = r + this.options.horizontalSeparation + n.width, u = Math.max(o, n.height);
                                        break;
                                    default:
                                        throw "Unhandled TreeDirection in the Radial layout measuring."
                                }
                                break;
                            case "Up":
                            case "Down":
                                switch (e.childrenLayout) {
                                    case "TopAlignedWithParent":
                                    case "BottomAlignedWithParent":
                                        break;
                                    case "Underneath":
                                        n = this.measure(e.children[0], t), d = Math.max(r, n.width + this.options.underneathHorizontalOffset), u = o + this.options.underneathVerticalTopOffset + n.height;
                                        break;
                                    case "Default":
                                        n = this.measure(e.children[0], t), u = o + this.options.verticalSeparation + n.height, d = Math.max(r, n.width);
                                        break;
                                    default:
                                        throw "Unhandled TreeDirection in the Down layout measuring."
                                }
                                break;
                            default:
                                throw "Unhandled TreeDirection in the layout measuring."
                        }
                        h = new l(d, u)
                    } else {
                        switch (e.treeDirection) {
                            case "Left":
                            case "Right":
                                switch (e.childrenLayout) {
                                    case "TopAlignedWithParent":
                                    case "BottomAlignedWithParent":
                                        break;
                                    case "Underneath":
                                        for (d = r, u = o + this.options.underneathVerticalTopOffset, s = 0; e.children.length > s; s++) c = e.children[s], n = this.measure(c, t), d = Math.max(d, n.width + this.options.underneathHorizontalOffset), u += n.height + this.options.underneathVerticalSeparation;
                                        u -= this.options.underneathVerticalSeparation;
                                        break;
                                    case "Default":
                                        for (d = r, u = 0, s = 0; e.children.length > s; s++) c = e.children[s], n = this.measure(c, t), d = Math.max(d, r + this.options.horizontalSeparation + n.width), u += n.height + this.options.verticalSeparation;
                                        u -= this.options.verticalSeparation;
                                        break;
                                    default:
                                        throw "Unhandled TreeDirection in the Right layout measuring."
                                }
                                break;
                            case "Up":
                            case "Down":
                                switch (e.childrenLayout) {
                                    case "TopAlignedWithParent":
                                    case "BottomAlignedWithParent":
                                        break;
                                    case "Underneath":
                                        for (d = r, u = o + this.options.underneathVerticalTopOffset, s = 0; e.children.length > s; s++) c = e.children[s], n = this.measure(c, t), d = Math.max(d, n.width + this.options.underneathHorizontalOffset), u += n.height + this.options.underneathVerticalSeparation;
                                        u -= this.options.underneathVerticalSeparation;
                                        break;
                                    case "Default":
                                        for (d = 0, u = 0, s = 0; e.children.length > s; s++) c = e.children[s], n = this.measure(c, t), d += n.width + this.options.horizontalSeparation, u = Math.max(u, n.height + this.options.verticalSeparation + o);
                                        d -= this.options.horizontalSeparation;
                                        break;
                                    default:
                                        throw "Unhandled TreeDirection in the Down layout measuring."
                                }
                                break;
                            default:
                                throw "Unhandled TreeDirection in the layout measuring."
                        }
                        h = new l(d, u)
                    }
                    return e.SectorAngle = Math.sqrt(d * d / 4 + u * u / 4), e.Size = h, h
                },
                arrange: function(e, t) {
                    var n, i, r, o, a, s, l, d, u = e.associatedShape.bounds(),
                        h = u.width,
                        g = u.height;
                    if (f.isEmpty(e.children)) e.x = t.x, e.y = t.y, e.BoundingRectangle = new c(t.x, t.y, h, g);
                    else switch (e.treeDirection) {
                        case "Left":
                            switch (e.childrenLayout) {
                                case "TopAlignedWithParent":
                                case "BottomAlignedWithParent":
                                    break;
                                case "Underneath":
                                    for (d = t, e.x = d.x, e.y = d.y, e.BoundingRectangle = new c(e.x, e.y, e.width, e.height), l = t.y + g + this.options.underneathVerticalTopOffset, n = 0; o.children.length > n; n++) o = o.children[n], s = d.x - o.associatedShape.width - this.options.underneathHorizontalOffset, i = new p(s, l), this.arrange(o, i), l += o.Size.height + this.options.underneathVerticalSeparation;
                                    break;
                                case "Default":
                                    for (d = new p(t.x + e.Size.width - h, t.y + (e.Size.height - g) / 2), e.x = d.x, e.y = d.y, e.BoundingRectangle = new c(e.x, e.y, e.width, e.height), s = d.x - this.options.horizontalSeparation, l = t.y, n = 0; e.children.length > n; n++) o = e.children[n], i = new p(s - o.Size.width, l), this.arrange(o, i), l += o.Size.height + this.options.verticalSeparation;
                                    break;
                                default:
                                    throw "Unsupported TreeDirection"
                            }
                            break;
                        case "Right":
                            switch (e.childrenLayout) {
                                case "TopAlignedWithParent":
                                case "BottomAlignedWithParent":
                                    break;
                                case "Underneath":
                                    for (d = t, e.x = d.x, e.y = d.y, e.BoundingRectangle = new c(e.x, e.y, e.width, e.height), s = t.x + h + this.options.underneathHorizontalOffset, l = t.y + g + this.options.underneathVerticalTopOffset, n = 0; e.children.length > n; n++) o = e.children[n], i = new p(s, l), this.arrange(o, i), l += o.Size.height + this.options.underneathVerticalSeparation;
                                    break;
                                case "Default":
                                    for (d = new p(t.x, t.y + (e.Size.height - g) / 2), e.x = d.x, e.y = d.y, e.BoundingRectangle = new c(e.x, e.y, e.width, e.height), s = t.x + h + this.options.horizontalSeparation, l = t.y, n = 0; e.children.length > n; n++) o = e.children[n], i = new p(s, l), this.arrange(o, i), l += o.Size.height + this.options.verticalSeparation;
                                    break;
                                default:
                                    throw "Unsupported TreeDirection"
                            }
                            break;
                        case "Up":
                            if (d = new p(t.x + (e.Size.width - h) / 2, t.y + e.Size.height - g), e.x = d.x, e.y = d.y, e.BoundingRectangle = new c(e.x, e.y, e.width, e.height), Math.abs(d.x - t.x) < m) {
                                for (a = 0, n = 0; e.children.length > n; n++) r = e.children[n], a += r.Size.width + this.options.horizontalSeparation;
                                a -= this.options.horizontalSeparation, s = t.x + (h - a) / 2
                            } else s = t.x;
                            for (n = 0; e.children.length > n; n++) o = e.children[n], l = d.y - this.options.verticalSeparation - o.Size.height, i = new p(s, l), this.arrange(o, i), s += o.Size.width + this.options.horizontalSeparation;
                            break;
                        case "Down":
                            switch (e.childrenLayout) {
                                case "TopAlignedWithParent":
                                case "BottomAlignedWithParent":
                                    break;
                                case "Underneath":
                                    for (d = t, e.x = d.x, e.y = d.y, e.BoundingRectangle = new c(e.x, e.y, e.width, e.height), s = t.x + this.options.underneathHorizontalOffset, l = t.y + g + this.options.underneathVerticalTopOffset, n = 0; e.children.length > n; n++) o = e.children[n], i = new p(s, l), this.arrange(o, i), l += o.Size.height + this.options.underneathVerticalSeparation;
                                    break;
                                case "Default":
                                    if (d = new p(t.x + (e.Size.width - h) / 2, t.y), e.x = d.x, e.y = d.y, e.BoundingRectangle = new c(e.x, e.y, e.width, e.height), Math.abs(d.x - t.x) < m) {
                                        for (a = 0, n = 0; e.children.length > n; n++) r = e.children[n], a += r.Size.width + this.options.horizontalSeparation;
                                        a -= this.options.horizontalSeparation, s = t.x + (h - a) / 2
                                    } else s = t.x;
                                    for (n = 0; e.children.length > n; n++) o = e.children[n], l = d.y + this.options.verticalSeparation + g, i = new p(s, l), this.arrange(o, i), s += o.Size.width + this.options.horizontalSeparation;
                                    break;
                                default:
                                    throw "Unsupported TreeDirection"
                            }
                            break;
                        case "None":
                            break;
                        default:
                            throw "Unsupported TreeDirection"
                    }
                },
                layoutSwitch: function() {
                    var e, t, n, i, r, o;
                    if (this.center && !f.isEmpty(this.center.children)) switch (e = this.options.subtype, f.isUndefined(e) && (e = "Down"), o = this.center.children, e.toLowerCase()) {
                        case "radial":
                        case "radialtree":
                            this.layoutRadialTree();
                            break;
                        case "mindmaphorizontal":
                        case "mindmap":
                            t = this.center.children, 1 === this.center.children.length ? this.layoutRight(t) : (r = o.length / 2, n = _(this.center.children, function(e) {
                                return f.indexOf(o, e) < r
                            }), i = _(this.center.children, function(e) {
                                return f.indexOf(o, e) >= r
                            }), this.layoutLeft(n), this.layoutRight(i));
                            break;
                        case "mindmapvertical":
                            t = this.center.children, 1 === this.center.children.length ? this.layoutDown(t) : (r = o.length / 2, n = _(this.center.children, function(e) {
                                return f.indexOf(o, e) < r
                            }), i = _(this.center.children, function(e) {
                                return f.indexOf(o, e) >= r
                            }), this.layoutUp(n), this.layoutDown(i));
                            break;
                        case "right":
                            this.layoutRight(this.center.children);
                            break;
                        case "left":
                            this.layoutLeft(this.center.children);
                            break;
                        case "up":
                        case "bottom":
                            this.layoutUp(this.center.children);
                            break;
                        case "down":
                        case "top":
                            this.layoutDown(this.center.children);
                            break;
                        case "tipover":
                        case "tipovertree":
                            if (0 > this.options.tipOverTreeStartLevel) throw "The tip-over level should be a positive integer.";
                            this.tipOverTree(this.center.children, this.options.tipOverTreeStartLevel);
                            break;
                        case "undefined":
                        case "none":
                    }
                }
            }),
            x = b.extend({
                init: function(e) {
                    var t = this;
                    if (b.fn.init.call(t), f.isUndefined(e)) throw "No diagram specified.";
                    this.diagram = e
                },
                layout: function(e) {
                    var t, n;
                    return this.transferOptions(e), t = new w(this.diagram), this.graph = t.convert(), n = this.layoutComponents(), new i.LayoutState(this.diagram, n)
                },
                layoutComponents: function() {
                    var e, t, n, i, r, o, a, s;
                    if (!this.graph.isEmpty() && (e = this.graph.getConnectedComponents(), !f.isEmpty(e))) {
                        for (t = new k(this.options), n = [], i = 0; e.length > i; i++) {
                            if (r = e[i], o = this.getTree(r), !o) throw "Failed to find a spanning tree for the component.";
                            a = o.root, s = o.tree, t.layout(s, a), n.push(s)
                        }
                        return this.gridLayoutComponents(n)
                    }
                },
                getTree: function(e) {
                    var t, n, i, r, o, a = null;
                    if (this.options.roots && this.options.roots.length > 0)
                        for (t = 0, n = e.nodes.length; n > t; t++)
                            for (i = e.nodes[t], r = 0; this.options.roots.length > r; r++)
                                if (o = this.options.roots[r], o === i.associatedShape) {
                                    a = i;
                                    break
                                } if (!a && (a = e.root(), !a)) throw "Unable to find a root for the tree.";
                    return this.getTreeForRoot(e, a)
                },
                getTreeForRoot: function(e, t) {
                    var n = e.getSpanningTree(t);
                    return f.isUndefined(n) || n.isEmpty() ? null : {
                        tree: n,
                        root: n.root
                    }
                }
            }),
            C = b.extend({
                init: function(e) {
                    var t = this;
                    if (b.fn.init.call(t), f.isUndefined(e)) throw "Diagram is not specified.";
                    this.diagram = e
                },
                layout: function(e) {
                    var t, n, r, o, a, s;
                    if (this.transferOptions(e), t = new w(this.diagram), n = t.convert(e), !n.isEmpty() && (r = n.getConnectedComponents(), !f.isEmpty(r))) {
                        for (o = 0; r.length > o; o++) a = r[o], this.layoutGraph(a, e);
                        return s = this.gridLayoutComponents(r), new i.LayoutState(this.diagram, s)
                    }
                },
                _initRuntimeProperties: function() {
                    var e, t;
                    for (e = 0; this.graph.nodes.length > e; e++) t = this.graph.nodes[e], t.layer = -1, t.downstreamLinkCount = 0, t.upstreamLinkCount = 0, t.isVirtual = !1, t.uBaryCenter = 0, t.dBaryCenter = 0, t.upstreamPriority = 0, t.downstreamPriority = 0, t.gridPosition = 0
                },
                _prepare: function(e) {
                    var t, n, i, r, o, a, s, l, c, u, h, p = [],
                        m = new d,
                        g = 0;
                    for (f.forEach(e.nodes, function(e) {
                        0 === e.incoming.length && (m.set(e, 0), p.push(e))
                    }); p.length > 0;)
                        for (o = p.shift(), t = 0; o.outgoing.length > t; t++) i = o.outgoing[t], a = i.target, r = m.containsKey(a) ? Math.max(m.get(o) + 1, m.get(a)) : m.get(o) + 1, m.set(a, r), r > g && (g = r), v(p, a) || p.push(a);
                    for (s = m.keys(), s.sort(function(e, t) {
                        var n = m.get(e),
                            i = m.get(t);
                        return f.sign(i - n)
                    }), l = 0; s.length > l; ++l)
                        if (c = s[l], u = Number.MAX_VALUE, 0 !== c.outgoing.length) {
                            for (n = 0; c.outgoing.length > n; ++n) i = c.outgoing[n], u = Math.min(u, m.get(i.target));
                            u > 1 && m.set(c, u - 1)
                        } for (this.layers = [], t = 0; g + 1 > t; t++) h = [], h.linksTo = {}, this.layers.push(h);
                    for (m.forEach(function(e, t) {
                        e.layer = t, this.layers[t].push(e)
                    }, this), n = 0; this.layers.length > n; n++)
                        for (h = this.layers[n], t = 0; h.length > t; t++) h[t].gridPosition = t
                },
                layoutGraph: function(e, t) {
                    if (f.isUndefined(e)) throw "No graph given or graph analysis of the diagram failed.";
                    f.isDefined(t) && this.transferOptions(t), this.graph = e, e.setItemIndices();
                    var n = e.makeAcyclic();
                    this._initRuntimeProperties(), this._prepare(e, t), this._dummify(), this._optimizeCrossings(), this._swapPairs(), this.arrangeNodes(), this._moveThingsAround(), this._dedummify(), f.forEach(n, function(e) {
                        e.points && e.points.reverse()
                    })
                },
                setMinDist: function(e, t, n) {
                    var i = e.layer,
                        r = e.layerIndex;
                    this.minDistances[i][r] = n
                },
                getMinDist: function(e, t) {
                    var n, i = 0,
                        r = e.layerIndex,
                        o = t.layerIndex,
                        a = e.layer,
                        s = Math.min(r, o),
                        l = Math.max(r, o);
                    for (n = s; l > n; ++n) i += this.minDistances[a][n];
                    return i
                },
                placeLeftToRight: function(e) {
                    var t, n, i, r, o, a, s, l, c, u, h = new d;
                    for (i = 0; this.layers.length > i; ++i)
                        if (r = e[i]) {
                            for (t = 0; r.length > t; t++) n = r[t], h.containsKey(n) || this.placeLeft(n, h, i);
                            for (o = Number.POSITIVE_INFINITY, t = 0; r.length > t; t++) n = r[t], a = this.rightSibling(n), a && this.nodeLeftClass.get(a) !== i && (o = Math.min(o, h.get(a) - h.get(n) - this.getMinDist(n, a)));
                            if (o === Number.POSITIVE_INFINITY) {
                                for (s = [], t = 0; r.length > t; t++)
                                    for (n = r[t], l = [], f.addRange(l, this.upNodes.get(n)), f.addRange(l, this.downNodes.get(n)), c = 0; l.length > c; c++) u = l[c], this.nodeLeftClass.get(u) < i && s.push(h.get(u) - h.get(n));
                                s.sort(), o = 0 === s.length ? 0 : s.length % 2 === 1 ? s[this.intDiv(s.length, 2)] : (s[this.intDiv(s.length, 2) - 1] + s[this.intDiv(s.length, 2)]) / 2
                            }
                            for (t = 0; r.length > t; t++) n = r[t], h.set(n, h.get(n) + o)
                        } return h
                },
                placeRightToLeft: function(e) {
                    var t, n, i, r, o, a, s, l, c, u, h = new d;
                    for (i = 0; this.layers.length > i; ++i)
                        if (r = e[i]) {
                            for (t = 0; r.length > t; t++) n = r[t], h.containsKey(n) || this.placeRight(n, h, i);
                            for (o = Number.NEGATIVE_INFINITY, t = 0; r.length > t; t++) n = r[t], a = this.leftSibling(n), a && this.nodeRightClass.get(a) !== i && (o = Math.max(o, h.get(a) - h.get(n) + this.getMinDist(a, n)));
                            if (o === Number.NEGATIVE_INFINITY) {
                                for (s = [], t = 0; r.length > t; t++)
                                    for (n = r[t], l = [], f.addRange(l, this.upNodes.get(n)), f.addRange(l, this.downNodes.get(n)), c = 0; l.length > c; c++) u = l[c], this.nodeRightClass.get(u) < i && s.push(h.get(n) - h.get(u));
                                s.sort(), o = 0 === s.length ? 0 : s.length % 2 === 1 ? s[this.intDiv(s.length, 2)] : (s[this.intDiv(s.length, 2) - 1] + s[this.intDiv(s.length, 2)]) / 2
                            }
                            for (t = 0; r.length > t; t++) n = r[t], h.set(n, h.get(n) + o)
                        } return h
                },
                _getLeftWing: function() {
                    var e = {
                            value: null
                        },
                        t = this.computeClasses(e, 1);
                    return this.nodeLeftClass = e.value, t
                },
                _getRightWing: function() {
                    var e = {
                            value: null
                        },
                        t = this.computeClasses(e, -1);
                    return this.nodeRightClass = e.value, t
                },
                computeClasses: function(e, t) {
                    var n, i, r, o, a, s, l, c, u, h = 0,
                        f = e.value = new d;
                    for (n = 0; this.layers.length > n; ++n)
                        for (h = n, i = this.layers[n], r = 1 === t ? 0 : i.length - 1; r >= 0 && i.length > r; r += t)
                            if (o = i[r], f.containsKey(o)) h = f.get(o);
                            else if (f.set(o, h), o.isVirtual)
                                for (a = this._nodesInLink(o), s = 0; a.length > s; s++) l = a[s], f.set(l, h);
                    for (c = [], u = 0; this.layers.length > u; u++) c.push(null);
                    return f.forEach(function(e, t) {
                        null === c[t] && (c[t] = []), c[t].push(e)
                    }), c
                },
                _isVerticalLayout: function() {
                    return "up" === this.options.subtype.toLowerCase() || "down" === this.options.subtype.toLowerCase() || "vertical" === this.options.subtype.toLowerCase()
                },
                _isHorizontalLayout: function() {
                    return "right" === this.options.subtype.toLowerCase() || "left" === this.options.subtype.toLowerCase() || "horizontal" === this.options.subtype.toLowerCase()
                },
                _isIncreasingLayout: function() {
                    return "right" === this.options.subtype.toLowerCase() || "down" === this.options.subtype.toLowerCase()
                },
                _moveThingsAround: function() {
                    function e(e, t) {
                        var n, i, r = Number.MIN_VALUE;
                        for (n = 0; e.length > n; ++n) i = e[n], r = t._isVerticalLayout() ? Math.max(r, i.height) : Math.max(r, i.width);
                        return r
                    }
                    var t, n, i, r, o, a, s, l, c, u, h, p, m, g, v, _, b, w, y, k, x, C, S, T, D, A, E;
                    for (n = 0; this.layers.length > n; ++n) r = this.layers[n], r.sort(this._gridPositionComparer);
                    for (this.minDistances = [], n = 0; this.layers.length > n; ++n)
                        for (r = this.layers[n], this.minDistances[n] = [], o = 0; r.length > o; ++o) i = r[o], i.layerIndex = o, this.minDistances[n][o] = this.options.nodeDistance, r.length - 1 > o && (this.minDistances[n][o] += this._isVerticalLayout() ? (i.width + r[o + 1].width) / 2 : (i.height + r[o + 1].height) / 2);
                    for (this.downNodes = new d, this.upNodes = new d, f.forEach(this.graph.nodes, function(e) {
                        this.downNodes.set(e, []), this.upNodes.set(e, [])
                    }, this), f.forEach(this.graph.links, function(e) {
                        var t = e.source,
                            n = e.target,
                            i = null,
                            r = null;
                        t.layer > n.layer ? (i = e.source, r = e.target) : (r = e.source, i = e.target), this.downNodes.get(r).push(i), this.upNodes.get(i).push(r)
                    }, this), this.downNodes.forEachValue(function(e) {
                        e.sort(this._gridPositionComparer)
                    }, this), this.upNodes.forEachValue(function(e) {
                        e.sort(this._gridPositionComparer)
                    }, this), n = 0; this.layers.length - 1 > n; ++n)
                        for (r = this.layers[n], a = 0; r.length - 1 > a; a++)
                            if (s = r[a], s.isVirtual && (l = this.downNodes.get(s)[0], l.isVirtual))
                                for (o = a + 1; r.length > o; ++o) i = r[o], i.isVirtual && (c = this.downNodes.get(i)[0], c.isVirtual && l.gridPosition > c.gridPosition && (u = l.gridPosition, l.gridPosition = c.gridPosition, c.gridPosition = u, h = l.layerIndex, p = c.layerIndex, this.layers[n + 1][h] = c, this.layers[n + 1][p] = l, l.layerIndex = p, c.layerIndex = h));
                    for (m = this._getLeftWing(), g = this._getRightWing(), v = this.placeLeftToRight(m), _ = this.placeRightToLeft(g), b = new d, f.forEach(this.graph.nodes, function(e) {
                        b.set(e, (v.get(e) + _.get(e)) / 2)
                    }), w = new d, y = new d, n = 0; this.layers.length > n; ++n)
                        for (r = this.layers[n], k = -1, x = -1, o = 0; r.length > o; ++o) i = r[o], w.set(i, 0), y.set(i, !1), i.isVirtual && (-1 === k ? k = o : k === o - 1 ? k = o : (x = o, w.set(r[k], 0), b.get(i) - b.get(r[k]) === this.getMinDist(r[k], i) ? y.set(r[k], !0) : y.set(r[k], !1), k = o));
                    for (C = [1, -1], f.forEach(C, function(e) {
                        var n, i, r, o, a, s, l, c = 1 === e ? 0 : this.layers.length - 1;
                        for (n = c; n >= 0 && this.layers.length > n; n += e) {
                            if (i = this.layers[n], r = this._firstVirtualNode(i), o = null, a = null, -1 !== r)
                                for (o = i[r], a = [], t = 0; r > t; t++) a.push(i[t]);
                            else o = null, a = i;
                            if (a.length > 0) {
                                for (this._sequencer(b, null, o, e, a), t = 0; a.length - 1 > t; ++t) this.setMinDist(a[t], a[t + 1], b.get(a[t + 1]) - b.get(a[t]));
                                o && this.setMinDist(a[a.length - 1], o, b.get(o) - b.get(a[a.length - 1]))
                            }
                            for (; o;) {
                                if (s = this.nextVirtualNode(i, o)) {
                                    if (w.get(o) === e) {
                                        for (r = o.layerIndex, l = s.layerIndex, a = [], t = r + 1; l > t; t++) a.push(i[t]);
                                        a.length > 0 && this._sequencer(b, o, s, e, a), y.set(o, !0)
                                    }
                                } else {
                                    for (r = o.layerIndex, a = [], t = r + 1; i.length > t; t++) a.push(i[t]);
                                    if (a.length > 0) {
                                        for (this._sequencer(b, o, null, e, a), t = 0; a.length - 1 > t; ++t) this.setMinDist(a[t], a[t + 1], b.get(a[t + 1]) - b.get(a[t]));
                                        this.setMinDist(o, a[0], b.get(a[0]) - b.get(o))
                                    }
                                }
                                o = s
                            }
                            this.adjustDirections(n, e, w, y)
                        }
                    }, this), S = this._isIncreasingLayout() ? 0 : this.layers.length - 1, T = function(e, t) {
                        return t._isIncreasingLayout() ? t.layers.length > e : e >= 0
                    }, D = this._isIncreasingLayout() ? 1 : -1, A = 0, t = S; T(t, this); t += D) {
                        for (r = this.layers[t], E = e(r, this), o = 0; r.length > o; ++o) i = r[o], this._isVerticalLayout() ? (i.x = b.get(i), i.y = A + E / 2) : (i.x = A + E / 2, i.y = b.get(i));
                        A += this.options.layerSeparation + E
                    }
                },
                adjustDirections: function(e, t, n, i) {
                    var r, o, a, s, l, c, d, u, h, f, p, m, g, v;
                    if (!(0 > e + t || e + t >= this.layers.length))
                        for (r = null, o = null, a = this.layers[e + t], s = 0; a.length > s; ++s)
                            if (l = a[s], l.isVirtual && (c = this.getNeighborOnLayer(l, e), c.isVirtual)) {
                                if (r) {
                                    for (d = i.get(o), u = this.layers[e], h = o.layerIndex, f = c.layerIndex, p = h + 1; f > p; ++p) u[p].isVirtual && (d = d && i.get(u[p]));
                                    if (d)
                                        for (n.set(r, t), m = r.layerIndex, g = l.layerIndex, v = m + 1; g > v; ++v) a[v].isVirtual && n.set(a[v], t)
                                }
                                r = l, o = c
                            }
                },
                getNeighborOnLayer: function(e, t) {
                    var n = this.upNodes.get(e)[0];
                    return n.layer === t ? n : (n = this.downNodes.get(e)[0], n.layer === t ? n : null)
                },
                _sequencer: function(e, t, n, i, r) {
                    if (1 === r.length && this._sequenceSingle(e, t, n, i, r[0]), r.length > 1) {
                        var o = r.length,
                            a = this.intDiv(o, 2);
                        this._sequencer(e, t, n, i, r.slice(0, a)), this._sequencer(e, t, n, i, r.slice(a)), this.combineSequences(e, t, n, i, r)
                    }
                },
                _sequenceSingle: function(e, t, n, i, r) {
                    var o = -1 === i ? this.downNodes.get(r) : this.upNodes.get(r),
                        a = o.length;
                    0 !== a && (a % 2 === 1 ? e.set(r, e.get(o[this.intDiv(a, 2)])) : e.set(r, (e.get(o[this.intDiv(a, 2) - 1]) + e.get(o[this.intDiv(a, 2)])) / 2), t && e.set(r, Math.max(e.get(r), e.get(t) + this.getMinDist(t, r))), n && e.set(r, Math.min(e.get(r), e.get(n) - this.getMinDist(r, n))))
                },
                combineSequences: function(e, t, n, i, r) {
                    var o, a, s, l, c, d, u, h, f, p, m = r.length,
                        g = this.intDiv(m, 2),
                        v = [];
                    for (o = 0; g > o; ++o) {
                        for (a = 0, l = -1 === i ? this.downNodes.get(r[o]) : this.upNodes.get(r[o]), s = 0; l.length > s; ++s) c = l[s], e.get(c) >= e.get(r[o]) ? a++ : (a--, v.push({
                            k: e.get(c) + this.getMinDist(r[o], r[g - 1]),
                            v: 2
                        }));
                        v.push({
                            k: e.get(r[o]) + this.getMinDist(r[o], r[g - 1]),
                            v: a
                        })
                    }
                    for (t && v.push({
                        k: e.get(t) + this.getMinDist(t, r[g - 1]),
                        v: Number.MAX_VALUE
                    }), v.sort(this._positionDescendingComparer), u = [], o = g; m > o; ++o) {
                        for (a = 0, l = -1 === i ? this.downNodes.get(r[o]) : this.upNodes.get(r[o]), s = 0; l.length > s; ++s) c = l[s], e.get(c) <= e.get(r[o]) ? a++ : (a--, u.push({
                            k: e.get(c) - this.getMinDist(r[o], r[g]),
                            v: 2
                        }));
                        u.push({
                            k: e.get(r[o]) - this.getMinDist(r[o], r[g]),
                            v: a
                        })
                    }
                    for (n && u.push({
                        k: e.get(n) - this.getMinDist(n, r[g]),
                        v: Number.MAX_VALUE
                    }), u.sort(this._positionAscendingComparer), h = 0, f = 0, p = this.getMinDist(r[g - 1], r[g]); e.get(r[g]) - e.get(r[g - 1]) < p;)
                        if (f > h) {
                            if (0 === v.length) {
                                e.set(r[g - 1], e.get(r[g]) - p);
                                break
                            }
                            d = v.shift(), h += d.v, e.set(r[g - 1], d.k), e.set(r[g - 1], Math.max(e.get(r[g - 1]), e.get(r[g]) - p))
                        } else {
                            if (0 === u.length) {
                                e.set(r[g], e.get(r[g - 1]) + p);
                                break
                            }
                            d = u.shift(), f += d.v, e.set(r[g], d.k), e.set(r[g], Math.min(e.get(r[g]), e.get(r[g - 1]) + p))
                        } for (o = g - 2; o >= 0; o--) e.set(r[o], Math.min(e.get(r[o]), e.get(r[g - 1]) - this.getMinDist(r[o], r[g - 1])));
                    for (o = g + 1; m > o; o++) e.set(r[o], Math.max(e.get(r[o]), e.get(r[g]) + this.getMinDist(r[o], r[g])))
                },
                placeLeft: function(e, t, n) {
                    var i = Number.NEGATIVE_INFINITY;
                    f.forEach(this._getComposite(e), function(e) {
                        var r = this.leftSibling(e);
                        r && this.nodeLeftClass.get(r) === this.nodeLeftClass.get(e) && (t.containsKey(r) || this.placeLeft(r, t, n), i = Math.max(i, t.get(r) + this.getMinDist(r, e)))
                    }, this), i === Number.NEGATIVE_INFINITY && (i = 0), f.forEach(this._getComposite(e), function(e) {
                        t.set(e, i)
                    })
                },
                placeRight: function(e, t, n) {
                    var i = Number.POSITIVE_INFINITY;
                    f.forEach(this._getComposite(e), function(e) {
                        var r = this.rightSibling(e);
                        r && this.nodeRightClass.get(r) === this.nodeRightClass.get(e) && (t.containsKey(r) || this.placeRight(r, t, n), i = Math.min(i, t.get(r) - this.getMinDist(e, r)))
                    }, this), i === Number.POSITIVE_INFINITY && (i = 0), f.forEach(this._getComposite(e), function(e) {
                        t.set(e, i)
                    })
                },
                leftSibling: function(e) {
                    var t = this.layers[e.layer],
                        n = e.layerIndex;
                    return 0 === n ? null : t[n - 1]
                },
                rightSibling: function(e) {
                    var t = this.layers[e.layer],
                        n = e.layerIndex;
                    return n === t.length - 1 ? null : t[n + 1]
                },
                _getComposite: function(e) {
                    return e.isVirtual ? this._nodesInLink(e) : [e]
                },
                arrangeNodes: function() {
                    var e, t, n, i, r, o, a, s;
                    for (t = 0; this.layers.length > t; t++)
                        for (i = this.layers[t], n = 0; i.length > n; n++) r = i[n], r.upstreamPriority = r.upstreamLinkCount, r.downstreamPriority = r.downstreamLinkCount;
                    for (o = 2, a = 0; o > a; a++) {
                        for (e = this.layers.length - 1; e >= 1; e--) this.layoutLayer(!1, e);
                        for (e = 0; this.layers.length - 1 > e; e++) this.layoutLayer(!0, e)
                    }
                    for (s = Number.MAX_VALUE, t = 0; this.layers.length > t; t++)
                        for (i = this.layers[t], n = 0; i.length > n; n++) r = i[n], s = Math.min(s, r.gridPosition);
                    if (0 > s)
                        for (t = 0; this.layers.length > t; t++)
                            for (i = this.layers[t], n = 0; i.length > n; n++) r = i[n], r.gridPosition = r.gridPosition - s
                },
                layoutLayer: function(e, t) {
                    var n, i, r, o;
                    for (i = e ? this.layers[n = t + 1] : this.layers[n = t - 1], r = [], o = 0; i.length > o; o++) r.push(i[o]);
                    r.sort(function(e, t) {
                        var n = (e.upstreamPriority + e.downstreamPriority) / 2,
                            i = (t.upstreamPriority + t.downstreamPriority) / 2;
                        return Math.abs(n - i) < 1e-4 ? 0 : i > n ? 1 : -1
                    }), f.forEach(r, function(e) {
                        var t = e.gridPosition,
                            n = this.calcBaryCenter(e),
                            r = (e.upstreamPriority + e.downstreamPriority) / 2;
                        if (!(Math.abs(t - n) < 1e-4 || Math.abs(t - n) < .2501))
                            if (n > t)
                                for (; n > t && this.moveRight(e, i, r);) t = e.gridPosition;
                            else
                                for (; t > n && this.moveLeft(e, i, r);) t = e.gridPosition
                    }, this), n > 0 && this.calcDownData(n - 1), this.layers.length - 1 > n && this.calcUpData(n + 1)
                },
                moveRight: function(e, t, n) {
                    var i, r, o = f.indexOf(t, e);
                    return o === t.length - 1 ? (e.gridPosition = e.gridPosition + .5, !0) : (i = t[o + 1], r = (i.upstreamPriority + i.downstreamPriority) / 2, i.gridPosition > e.gridPosition + 1 ? (e.gridPosition = e.gridPosition + .5, !0) : r > n || Math.abs(r - n) < 1e-4 ? !1 : this.moveRight(i, t, n) ? (e.gridPosition = e.gridPosition + .5, !0) : !1)
                },
                moveLeft: function(e, t, n) {
                    var i, r, o = f.indexOf(t, e);
                    return 0 === o ? (e.gridPosition = e.gridPosition - .5, !0) : (i = t[o - 1], r = (i.upstreamPriority + i.downstreamPriority) / 2, e.gridPosition - 1 > i.gridPosition ? (e.gridPosition = e.gridPosition - .5, !0) : r > n || Math.abs(r - n) < 1e-4 ? !1 : this.moveLeft(i, t, n) ? (e.gridPosition = e.gridPosition - .5, !0) : !1)
                },
                mapVirtualNode: function(e, t) {
                    this.nodeToLinkMap.set(e, t), this.linkToNodeMap.containsKey(t) || this.linkToNodeMap.set(t, []), this.linkToNodeMap.get(t).push(e)
                },
                _nodesInLink: function(e) {
                    return this.linkToNodeMap.get(this.nodeToLinkMap.get(e))
                },
                _dummify: function() {
                    var e, t, n, i, r, s, l, c, u, h, p, m, g, v, _, b, w, y, k, x;
                    for (this.linkToNodeMap = new d, this.nodeToLinkMap = new d, u = this.graph.links.slice(0), h = this.layers, p = function(e, t, n) {
                        h[e].linksTo[t] = h[e].linksTo[t] || [], h[e].linksTo[t].push(n)
                    }, c = 0; u.length > c; c++)
                        if (m = u[c],
                            g = m.source, v = m.target, _ = g.layer, b = v.layer, w = g.gridPosition, y = v.gridPosition, k = (y - w) / Math.abs(b - _), x = g, _ - b > 1) {
                            for (l = _ - 1; l > b; l--) {
                                for (n = new o, n.x = g.x, n.y = g.y, n.width = g.width / 100, n.height = g.height / 100, e = h[l], t = (l - b) * k + w, t > e.length && (t = e.length), w >= h[_].length - 1 && y >= h[b].length - 1 ? t = e.length : 0 === w && 0 === y && (t = 0), n.layer = l, n.uBaryCenter = 0, n.dBaryCenter = 0, n.upstreamLinkCount = 0, n.downstreamLinkCount = 0, n.gridPosition = t, n.isVirtual = !0, f.insert(e, n, t), r = t + 1; e.length > r; r++) i = e[r], i.gridPosition = i.gridPosition + 1;
                                s = new a(x, n), s.depthOfDumminess = 0, p(l - 1, l, s), x = n, this.graph._addNode(n), this.graph.addLink(s), n.index = this.graph.nodes.length - 1, this.mapVirtualNode(n, m)
                            }
                            p(b - 1, b, s), m.changeSource(x), m.depthOfDumminess = _ - b - 1
                        } else if (-1 > _ - b) {
                            for (l = _ + 1; b > l; l++) {
                                for (n = new o, n.x = g.x, n.y = g.y, n.width = g.width / 100, n.height = g.height / 100, e = h[l], t = (l - _) * k + w, t > e.length && (t = e.length), w >= h[_].length - 1 && y >= h[b].length - 1 ? t = e.length : 0 === w && 0 === y && (t = 0), n.layer = l, n.uBaryCenter = 0, n.dBaryCenter = 0, n.upstreamLinkCount = 0, n.downstreamLinkCount = 0, n.gridPosition = t, n.isVirtual = !0, t &= t, f.insert(e, n, t), r = t + 1; e.length > r; r++) i = e[r], i.gridPosition = i.gridPosition + 1;
                                s = new a(x, n), s.depthOfDumminess = 0, p(l - 1, l, s), x = n, this.graph._addNode(n), this.graph.addLink(s), n.index = this.graph.nodes.length - 1, this.mapVirtualNode(n, m)
                            }
                            p(b - 1, b, m), m.changeSource(x), m.depthOfDumminess = b - _ - 1
                        } else p(_, b, m)
                },
                _dedummify: function() {
                    for (var e, t, n, i, r, o, a, s, l = !0; l;)
                        for (l = !1, e = 0; this.graph.links.length > e; e++)
                            if (t = this.graph.links[e], t.depthOfDumminess) {
                                for (n = [], n.unshift({
                                    x: t.target.x,
                                    y: t.target.y
                                }), n.unshift({
                                    x: t.source.x,
                                    y: t.source.y
                                }), i = t, r = t.depthOfDumminess, o = 0; r > o; o++) a = i.source, s = a.incoming[0], n.unshift({
                                    x: s.source.x,
                                    y: s.source.y
                                }), i = s;
                                t.changeSource(i.source), t.depthOfDumminess = 0, n.length > 2 ? (n.splice(0, 1), n.splice(n.length - 1), t.points = n) : t.points = [], l = !0;
                                break
                            }
                },
                _optimizeCrossings: function() {
                    for (var e, t = -1, n = 3, i = 0; 0 !== t && !(i++ > n);) {
                        for (t = 0, e = this.layers.length - 1; e >= 1; e--) t += this.optimizeLayerCrossings(!1, e);
                        for (e = 0; this.layers.length - 1 > e; e++) t += this.optimizeLayerCrossings(!0, e)
                    }
                },
                calcUpData: function(e) {
                    var t, n, i, r, o, a, s, l, c;
                    if (0 !== e) {
                        for (t = this.layers[e], o = new u, a = this.layers[e - 1], n = 0; a.length > n; n++) o.add(a[n]);
                        for (n = 0; t.length > n; n++) {
                            for (s = t[n], l = 0, c = 0, i = 0; s.incoming.length > i; i++) r = s.incoming[i], o.contains(r.source) && (c++, l += r.source.gridPosition);
                            for (i = 0; s.outgoing.length > i; i++) r = s.outgoing[i], o.contains(r.target) && (c++, l += r.target.gridPosition);
                            c > 0 ? (s.uBaryCenter = l / c, s.upstreamLinkCount = c) : (s.uBaryCenter = n, s.upstreamLinkCount = 0)
                        }
                    }
                },
                calcDownData: function(e) {
                    var t, n, i, r, o, a, s, l, c;
                    if (e !== this.layers.length - 1) {
                        for (t = this.layers[e], o = new u, a = this.layers[e + 1], n = 0; a.length > n; n++) o.add(a[n]);
                        for (n = 0; t.length > n; n++) {
                            for (s = t[n], l = 0, c = 0, i = 0; s.incoming.length > i; i++) r = s.incoming[i], o.contains(r.source) && (c++, l += r.source.gridPosition);
                            for (i = 0; s.outgoing.length > i; i++) r = s.outgoing[i], o.contains(r.target) && (c++, l += r.target.gridPosition);
                            c > 0 ? (s.dBaryCenter = l / c, s.downstreamLinkCount = c) : (s.dBaryCenter = n, s.downstreamLinkCount = 0)
                        }
                    }
                },
                optimizeLayerCrossings: function(e, t) {
                    var n, i, r, o, a, s, l, c;
                    for (i = e ? this.layers[n = t + 1] : this.layers[n = t - 1], r = i.slice(0), e ? this.calcUpData(n) : this.calcDownData(n), o = this, i.sort(function(e, t) {
                        var n, i = o.calcBaryCenter(e),
                            r = o.calcBaryCenter(t);
                        return Math.abs(i - r) < 1e-4 ? e.degree() === t.degree() ? o.compareByIndex(e, t) : e.degree() < t.degree() ? 1 : -1 : (n = 1e3 * (r - i), n > 0 ? -1 : 0 > n ? 1 : o.compareByIndex(e, t))
                    }), s = 0, a = 0; i.length > a; a++) i[a] !== r[a] && s++;
                    if (s > 0)
                        for (l = 0, a = 0; i.length > a; a++) c = i[a], c.gridPosition = l++;
                    return s
                },
                _swapPairs: function() {
                    for (var e, t, n, i, r, o, a, s, l, c, d, u, h, f, p, m, g, v = this.options.layeredIterations, _ = 0;;) {
                        if (_++ > v) break;
                        for (e = 1 >= _ % 4, t = _ % 4 === 1, n = e ? 0 : this.layers.length - 1; e ? this.layers.length - 1 >= n : n >= 0; n += e ? 1 : -1) {
                            for (i = this.layers[n], r = !1, o = !0, a = 0, s = 0; i.length - 1 > s; s++) l = 0, c = 0, d = 0, o ? (0 !== n && (l = this.countLinksCrossingBetweenTwoLayers(n - 1, n)), n !== this.layers.length - 1 && (c = this.countLinksCrossingBetweenTwoLayers(n, n + 1)), e ? l *= 2 : c *= 2, d = l + c) : d = a, 0 !== d && (u = i[s], h = i[s + 1], f = u.gridPosition, p = h.gridPosition, i[s] = h, i[s + 1] = u, u.gridPosition = p, h.gridPosition = f, l = 0, 0 !== n && (l = this.countLinksCrossingBetweenTwoLayers(n - 1, n)), c = 0, n !== this.layers.length - 1 && (c = this.countLinksCrossingBetweenTwoLayers(n, n + 1)), e ? l *= 2 : c *= 2, m = l + c, g = !1, g = t ? m >= d : m > d, g ? (u = i[s], h = i[s + 1], f = u.gridPosition, p = h.gridPosition, i[s] = h, i[s + 1] = u, u.gridPosition = p, h.gridPosition = f, a = d, o = !1) : (r = !0, o = !0));
                            r && (n !== this.layers.length - 1 && this.calcUpData(n + 1), 0 !== n && this.calcDownData(n - 1))
                        }
                    }
                },
                countLinksCrossingBetweenTwoLayers: function(e, t) {
                    var n, i, r, o, a, s, l, c, d, u, h, f, p = this.layers[e].linksTo[t],
                        m = 0,
                        g = p.length;
                    for (l = 0; g > l; l++)
                        for (n = p[l], c = l + 1; g > c; c++) i = p[c], n.target.layer === t ? (r = n.source, o = n.target) : (r = n.target, o = n.source), i.target.layer === t ? (a = i.source, s = i.target) : (a = i.target, s = i.source), d = r.gridPosition, u = o.gridPosition, h = a.gridPosition, f = s.gridPosition, 0 > (d - h) * (u - f) && m++;
                    return m
                },
                calcBaryCenter: function(e) {
                    var t = e.upstreamLinkCount,
                        n = e.downstreamLinkCount,
                        i = e.uBaryCenter,
                        r = e.dBaryCenter;
                    return t > 0 && n > 0 ? (i + r) / 2 : t > 0 ? i : n > 0 ? r : 0
                },
                _gridPositionComparer: function(e, t) {
                    return t.gridPosition > e.gridPosition ? -1 : e.gridPosition > t.gridPosition ? 1 : 0
                },
                _positionAscendingComparer: function(e, t) {
                    return t.k > e.k ? -1 : e.k > t.k ? 1 : 0
                },
                _positionDescendingComparer: function(e, t) {
                    return t.k > e.k ? 1 : e.k > t.k ? -1 : 0
                },
                _firstVirtualNode: function(e) {
                    for (var t = 0; e.length > t; t++)
                        if (e[t].isVirtual) return t;
                    return -1
                },
                compareByIndex: function(e, t) {
                    var n = e.index,
                        i = t.index;
                    return i > n ? 1 : n > i ? -1 : 0
                },
                intDiv: function(e, t) {
                    return (e - e % t) / t
                },
                nextVirtualNode: function(e, t) {
                    var n, i = t.layerIndex;
                    for (n = i + 1; e.length > n; ++n)
                        if (e[n].isVirtual) return e[n];
                    return null
                }
            }),
            S = n.Class.extend({
                init: function(e, t) {
                    if (f.isUndefined(e)) throw "No diagram given";
                    this.diagram = e, this.nodeMap = new d, this.linkMap = new d, this.capture(t ? t : e)
                },
                capture: function(e) {
                    var t, n, r, o, a, s, l, d, u;
                    if (e instanceof i.Graph) {
                        for (o = 0; e.nodes.length > o; o++) t = e.nodes[o], r = t.associatedShape, this.nodeMap.set(r.visual.id, new c(t.x, t.y, t.width, t.height));
                        for (o = 0; e.links.length > o; o++) s = e.links[o], a = s.associatedConnection, this.linkMap.set(a.visual.id, s.points())
                    } else if (e instanceof Array)
                        for (n = e, o = 0; n.length > o; o++) t = n[o], r = t.associatedShape, r && this.nodeMap.set(r.visual.id, new c(t.x, t.y, t.width, t.height));
                    else if (e.hasOwnProperty("links") && e.hasOwnProperty("nodes")) {
                        for (n = e.nodes, l = e.links, o = 0; n.length > o; o++) t = n[o], r = t.associatedShape, r && this.nodeMap.set(r.visual.id, new c(t.x, t.y, t.width, t.height));
                        for (o = 0; l.length > o; o++) s = l[o], a = s.associatedConnection, a && this.linkMap.set(a.visual.id, s.points)
                    } else {
                        for (d = this.diagram.shapes, u = this.diagram.connections, o = 0; d.length > o; o++) r = d[o], this.nodeMap.set(r.visual.id, r.bounds());
                        for (o = 0; u.length > o; o++) a = u[o], this.linkMap.set(a.visual.id, a.points())
                    }
                }
            });
        s(i, {
            init: function(e) {
                n.init(e, i.ui)
            },
            SpringLayout: y,
            TreeLayout: x,
            GraphAdapter: w,
            LayeredLayout: C,
            LayoutBase: b,
            LayoutState: S
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("dataviz/diagram/dom.min", ["kendo.data.min", "kendo.draganddrop.min", "kendo.toolbar.min", "kendo.editable.min", "kendo.window.min", "kendo.dropdownlist.min", "kendo.dataviz.core.min", "kendo.dataviz.themes.min", "dataviz/diagram/svg.min", "dataviz/diagram/services.min", "dataviz/diagram/layout.min"], e)
}(function() {
    ! function(e, t) {
        function n(e) {
            var t = e.originalEvent,
                n = 0;
            return t.wheelDelta ? (n = -t.wheelDelta / 40, n = n > 0 ? _e.ceil(n) : _e.floor(n)) : t.detail && (n = t.detail), n
        }

        function i(e) {
            return e.options.name.toLowerCase() === Fe.toLowerCase()
        }

        function r(e, t) {
            var n, r, o, a, s = ze,
                l = t.connectors;
            for (r = 0; l.length > r; r++) o = l[r], i(o) || (a = e.distanceTo(o.position()), s > a && (s = a, n = o));
            return n
        }

        function o(e, t) {
            var n, i, r, o = [],
                a = e.drawingContainer().children,
                s = a.length;
            for (n = 0; t.length > n; n++)
                for (i = t[n], r = 0; s > r; r++)
                    if (a[r] == i.drawingContainer()) {
                        o.push(r);
                        break
                    } return o
        }

        function a(e) {
            var t = {};
            return e = e || {}, fe(e.text) && null !== e.text && (t.text = e.text), fe(e.x) && null !== e.x && (t.x = e.x), fe(e.y) && null !== e.y && (t.y = e.y), fe(e.width) && null !== e.width && (t.width = e.width), fe(e.height) && null !== e.height && (t.height = e.height), fe(e.type) && null !== e.type && (t.type = e.type), t
        }

        function s(e) {
            var t = {};
            return e = e || {}, fe(e.text) && null !== e.text && (t.content = e.text), fe(e.type) && null !== e.type && (t.type = e.type), fe(e.from) && null !== e.from && (t.from = e.from), fe(e.fromConnector) && null !== e.fromConnector && (t.fromConnector = e.fromConnector), fe(e.fromX) && null !== e.fromX && (t.fromX = e.fromX), fe(e.fromY) && null !== e.fromY && (t.fromY = e.fromY), fe(e.to) && null !== e.to && (t.to = e.to), fe(e.toConnector) && null !== e.toConnector && (t.toConnector = e.toConnector), fe(e.toX) && null !== e.toX && (t.toX = e.toX), fe(e.toY) && null !== e.toY && (t.toY = e.toY), t
        }

        function l(t, n) {
            var i, r = this.dataSource.reader.model;
            r && (i = r.fn.fields.text ? "text" : r.idField, e("<input name='" + n.field + "' />").appendTo(t).kendoDropDownList({
                dataValueField: r.idField,
                dataTextField: i,
                dataSource: this.dataSource.data().toJSON(),
                optionLabel: " ",
                valuePrimitive: !0
            }))
        }

        function c(e) {
            this.dataItem = e, this.callbacks = []
        }

        function d() {
            this.items = {}
        }

        function u(e) {
            var t = e;
            return e instanceof kendo.data.Model && (t = e.toJSON(), t[e.idField] = e._defaultId), t
        }

        function h(e) {
            var t, n, i = [],
                r = [];
            for (n = 0; e.length > n; n++) t = e[n], t instanceof w ? r.push(t) : i.push(t);
            return {
                shapes: r,
                connections: i
            }
        }

        function f(e, t) {
            return e.reader.model ? new e.reader.model(t) : new kendo.data.ObservableObject(t)
        }

        function p(e, t) {
            fe(t[e]) && t.set(e, null)
        }

        function m(e, t, n) {
            var i, r;
            for (r = 0; n.length > r; r++) i = n[r], t && !fe(t[i]) && (t[i] = e[i])
        }

        function g(e) {
            var t = e.drawingContainer().clippedBBox(null);
            (0 !== t.origin.x || 0 !== t.origin.y) && e.position(-t.origin.x, -t.origin.y)
        }
        var v, _, b, w, y, k, x, C, S, T, D, A, E = kendo.dataviz,
            F = kendo.drawing,
            I = kendo.geometry,
            M = E.diagram,
            R = kendo.ui.Widget,
            P = kendo.Class,
            z = e.proxy,
            B = kendo.deepExtend,
            L = e.extend,
            H = kendo.data.HierarchicalDataSource,
            N = M.Canvas,
            O = M.Group,
            V = M.Rectangle,
            U = M.Circle,
            W = M.CompositeTransform,
            j = M.Rect,
            q = M.Path,
            G = M.DeleteShapeUnit,
            $ = M.DeleteConnectionUnit,
            Y = M.TextBlock,
            K = M.Image,
            Q = M.Point,
            X = M.Intersect,
            J = M.ConnectionEditAdorner,
            Z = M.UndoRedoService,
            ee = M.ToolService,
            te = M.Selector,
            ne = M.ResizingAdorner,
            ie = M.ConnectorsAdorner,
            re = M.Cursors,
            oe = M.Utils,
            ae = kendo.Observable,
            se = M.ToBackUnit,
            le = M.ToFrontUnit,
            ce = M.PolylineRouter,
            de = M.CascadingRouter,
            ue = oe.isUndefined,
            he = oe.isDefined,
            fe = kendo.util.defined,
            pe = e.isArray,
            me = kendo.isFunction,
            ge = oe.isString,
            ve = e.isPlainObject,
            _e = Math,
            be = ".kendoDiagram",
            we = "cascading",
            ye = "itemBoundsChange",
            ke = "change",
            xe = "click",
            Ce = "drag",
            Se = "dragEnd",
            Te = "dragStart",
            De = "mouseEnter",
            Ae = "mouseLeave",
            Ee = "error",
            Fe = "Auto",
            Ie = "Top",
            Me = "Right",
            Re = "Left",
            Pe = "Bottom",
            ze = 9007199254740992,
            Be = "select",
            Le = "itemRotate",
            He = "pan",
            Ne = "zoomStart",
            Oe = "zoomEnd",
            Ve = "none",
            Ue = 600,
            We = 600,
            je = "rectangle",
            qe = 100,
            Ge = 100,
            $e = 20,
            Ye = 20,
            Ke = 0,
            Qe = "Yellow",
            Xe = Number.MAX_VALUE,
            Je = -Number.MAX_VALUE,
            Ze = "absolute",
            et = "transformed",
            tt = "rotated",
            nt = "transparent",
            it = "width",
            rt = "height",
            ot = "x",
            at = "y",
            st = "DOMMouseScroll" + be + " mousewheel" + be,
            lt = .05,
            ct = 5,
            dt = '<a class="k-button k-button-icontext #=className#" href="\\#"><span class="#=iconClass# #=imageClass#"></span>#=text#</a>',
            ut = 5;
        M.DefaultConnectors = [{
            name: Ie
        }, {
            name: Pe
        }, {
            name: Re
        }, {
            name: Me
        }, {
            name: Fe,
            position: function(e) {
                return e.getPosition("center")
            }
        }], v = {
            cancel: {
                text: "Cancel",
                imageClass: "k-cancel",
                className: "k-diagram-cancel",
                iconClass: "k-icon"
            },
            update: {
                text: "Update",
                imageClass: "k-update",
                className: "k-diagram-update",
                iconClass: "k-icon"
            }
        }, M.shapeDefaults = function(e) {
            var t = {
                type: je,
                path: "",
                autoSize: !0,
                visual: null,
                x: Ke,
                y: Ke,
                minWidth: $e,
                minHeight: Ye,
                width: qe,
                height: Ge,
                hover: {},
                editable: {
                    connect: !0,
                    tools: []
                },
                connectors: M.DefaultConnectors,
                rotation: {
                    angle: 0
                }
            };
            return oe.simpleExtend(t, e), t
        }, _ = ae.extend({
            init: function(e) {
                var t = this;
                t.dataItem = (e || {}).dataItem, ae.fn.init.call(t), t.options = B({
                    id: M.randomId()
                }, t.options, e), t.isSelected = !1, t.visual = new O({
                    id: t.options.id,
                    autoSize: t.options.autoSize
                }), t.id = t.options.id, t._template()
            },
            options: {
                hover: {},
                cursor: re.grip,
                content: {
                    align: "center middle"
                },
                selectable: !0,
                serializable: !0,
                enable: !0
            },
            _getCursor: function(e) {
                return this.adorner ? this.adorner._getCursor(e) : this.options.cursor
            },
            visible: function(e) {
                return ue(e) ? this.visual.visible() : (this.visual.visible(e), t)
            },
            bounds: function() {},
            refresh: function() {
                this.visual.redraw()
            },
            position: function(e) {
                this.options.x = e.x, this.options.y = e.y, this.visual.position(e)
            },
            toString: function() {
                return this.options.id
            },
            serialize: function() {
                var e = B({}, {
                    options: this.options
                });
                return this.dataItem && (e.dataItem = "" + this.dataItem), e
            },
            _content: function(e) {
                var n, i, r;
                return e !== t && (n = this.options, M.Utils.isString(e) ? n.content.text = e : B(n.content, e), i = n.content, r = this._contentVisual, r ? this._updateContentVisual(i) : this._createContentVisual(i)), this.options.content.text
            },
            _createContentVisual: function(e) {
                e.text && (this._contentVisual = new Y(e), this._contentVisual._includeInBBox = !1, this.visual.append(this._contentVisual))
            },
            _updateContentVisual: function(e) {
                this._contentVisual.redraw(e)
            },
            _hitTest: function(e) {
                var t = this.bounds();
                return this.visible() && t.contains(e) && this.options.enable
            },
            _template: function() {
                var e, t, n = this;
                n.options.content.template && (e = n.dataItem || {}, t = kendo.template(n.options.content.template, {
                    paramName: "dataItem"
                }), n.options.content.text = t(e))
            },
            _canSelect: function() {
                return this.options.selectable !== !1
            },
            toJSON: function() {
                return {
                    id: this.options.id
                }
            }
        }), b = P.extend({
            init: function(e, t) {
                this.options = B({}, this.options, t), this.connections = [], this.shape = e
            },
            options: {
                width: 7,
                height: 7,
                fill: {
                    color: Qe
                },
                hover: {}
            },
            position: function() {
                return this.options.position ? this.options.position(this.shape) : this.shape.getPosition(this.options.name)
            },
            toJSON: function() {
                return {
                    shapeId: "" + this.shape,
                    connector: this.options.name
                }
            }
        }), b.parse = function(e, t) {
            var n, i, r = t.split(":"),
                o = r[0],
                a = r[1] || Fe;
            for (n = 0; e.shapes.length > n; n++)
                if (i = e.shapes[n], i.options.id == o) return i.getConnector(a.trim())
        }, w = _.extend({
            init: function(e, t) {
                var n = this;
                _.fn.init.call(n, e), this.diagram = t, this.updateOptionsFromModel(), e = n.options, n.connectors = [], n.type = e.type, n.createShapeVisual(), n.updateBounds(), n.content(n.content()), n._createConnectors()
            },
            options: M.shapeDefaults(),
            _setOptionsFromModel: function(e) {
                var t = a(e || this.dataItem);
                this.options = B({}, this.options, t), this.redrawVisual(), this.options.content && (this._template(), this.content(this.options.content))
            },
            updateOptionsFromModel: function(e, t) {
                var n, i;
                this.diagram && this.diagram._isEditable && (n = a(e || this.dataItem), e && t ? E.inArray(t, ["x", "y", "width", "height"]) ? (i = this.bounds(), i[t] = e[t], this.bounds(i)) : (this.options.visual ? this.redrawVisual() : n.type && (this.options = B({}, this.options, n), this.redrawVisual()), this.options.content && (this._template(), this.content(this.options.content))) : this.options = B({}, this.options, n))
            },
            redrawVisual: function() {
                this.visual.clear(), this._contentVisual = null, this.options.dataItem = this.dataItem, this.createShapeVisual(), this.updateBounds()
            },
            updateModel: function(e) {
                var t, n, i = this.diagram;
                i && i._isEditable && (t = this._bounds, n = this.dataItem, n && (i._suspendModelRefresh(), fe(n.x) && t.x !== n.x && n.set("x", t.x), fe(n.y) && t.y !== n.y && n.set("y", t.y), fe(n.width) && t.width !== n.width && n.set("width", t.width), fe(n.height) && t.height !== n.height && n.set("height", t.height), this.dataItem = n, i._resumeModelRefresh(), e && i._syncShapeChanges()))
            },
            updateBounds: function() {
                var e = this.visual._measure(!0),
                    t = this.options;
                this.bounds(new j(t.x, t.y, e.width, e.height)), this._rotate(), this._alignContent()
            },
            content: function(e) {
                var t = this._content(e);
                return this._alignContent(), t
            },
            _alignContent: function() {
                var e, t, n, i, r, o = this.options.content || {},
                    a = this._contentVisual;
                a && o.align && (e = this.visual._measure(), t = new M.RectAlign(e), n = a.drawingElement.bbox(null), i = new j(0, 0, n.width(), n.height()), r = t.align(i, o.align), a.position(r.topLeft()))
            },
            _createConnectors: function() {
                var e, t, n = this.options,
                    i = n.connectors.length,
                    r = n.connectorDefaults;
                for (t = 0; i > t; t++) e = new b(this, B({}, r, n.connectors[t])), this.connectors.push(e)
            },
            bounds: function(e) {
                var t, n;
                if (e)
                    if (ge(e)) switch (e) {
                        case et:
                            t = this._transformedBounds();
                            break;
                        case Ze:
                            t = this._transformedBounds(), n = this.diagram._pan, t.x += n.x, t.y += n.y;
                            break;
                        case tt:
                            t = this._rotatedBounds();
                            break;
                        default:
                            t = this._bounds
                    } else this._setBounds(e), this._triggerBoundsChange(), this.diagram && this.diagram._layouting || this.refreshConnections();
                else t = this._bounds;
                return t
            },
            _setBounds: function(e) {
                var t = this.options,
                    n = e.topLeft(),
                    i = t.x = n.x,
                    r = t.y = n.y,
                    o = t.width = _e.max(e.width, t.minWidth),
                    a = t.height = _e.max(e.height, t.minHeight);
                this._bounds = new j(i, r, o, a), this.visual.redraw({
                    x: i,
                    y: r,
                    width: o,
                    height: a
                })
            },
            position: function(e) {
                return e ? (this.bounds(new j(e.x, e.y, this._bounds.width, this._bounds.height)), t) : this._bounds.topLeft()
            },
            clone: function() {
                var e = this.serialize();
                return e.options.id = M.randomId(), this.diagram && this.diagram._isEditable && fe(this.dataItem) && (e.options.dataItem = u(this.dataItem)), new w(e.options)
            },
            select: function(e) {
                var n, i, r = this.diagram;
                return ue(e) && (e = !0), this._canSelect() && this.isSelected != e ? (n = [], i = [], this.isSelected = e, this.isSelected ? (r._selectedItems.push(this), n.push(this)) : (oe.remove(r._selectedItems, this), i.push(this)), r._internalSelection || r._selectionChanged(n, i), !0) : t
            },
            rotate: function(e, n, i) {
                var r, o, a, s, l = this.visual.rotate();
                return e !== t && (i !== !1 && this.diagram && this.diagram.undoRedoService && e !== l.angle && this.diagram.undoRedoService.add(new M.RotateUnit(this.diagram._resizingAdorner, [this], [l.angle]), !1), r = this.bounds(), o = new Q(r.width / 2, r.height / 2), n && (a = e - l.angle, s = r.center().rotate(n, 360 - a).minus(o), this._rotationOffset = this._rotationOffset.plus(s.minus(r.topLeft())), this.position(s)), this.visual.rotate(e, o), this.options.rotation.angle = e, this.diagram && this.diagram._connectorsAdorner && this.diagram._connectorsAdorner.refresh(), this.refreshConnections(), this.diagram && this.diagram.trigger(Le, {
                    item: this
                })), l
            },
            connections: function(e) {
                var t, n, i, r, o, a, s, l = [];
                for (t = 0; this.connectors.length > t; t++)
                    for (o = this.connectors[t], r = o.connections, n = 0, r; r.length > n; n++) i = r[n], "out" == e ? (a = i.source(), a.shape && a.shape == this && l.push(i)) : "in" == e ? (s = i.target(), s.shape && s.shape == this && l.push(i)) : l.push(i);
                return l
            },
            refreshConnections: function() {
                e.each(this.connections(), function() {
                    this.refresh()
                })
            },
            getConnector: function(e) {
                var t, n;
                if (!ge(e)) return e instanceof Q ? r(e, this) : this.connectors.length ? this.connectors[0] : null;
                for (e = e.toLocaleLowerCase(), t = 0; this.connectors.length > t; t++)
                    if (n = this.connectors[t], n.options.name.toLocaleLowerCase() == e) return n
            },
            getPosition: function(e) {
                var t = this.bounds(),
                    n = e.charAt(0).toLowerCase() + e.slice(1);
                return me(t[n]) ? this._transformPoint(t[n]()) : t.center()
            },
            redraw: function(e) {
                var t, n;
                e && (t = this.options, this.shapeVisual.redraw(this._visualOptions(e)), this._diffNumericOptions(e, [it, rt, ot, at]) && (this.bounds(new j(t.x, t.y, t.width, t.height)), n = !0), e.connectors && (t.connectors = e.connectors, this._updateConnectors()), t = B(t, e), (e.rotation || n) && this._rotate(), t.content && this.content(t.content))
            },
            _updateConnectors: function() {
                var e, t, n, i, r = this.connections();
                for (this.connectors = [], this._createConnectors(), i = 0; r.length > i; i++) e = r[i], t = e.source(), n = e.target(), t.shape && t.shape === this ? e.source(this.getConnector(t.options.name) || null) : n.shape && n.shape === this && e.target(this.getConnector(n.options.name) || null), e.updateModel()
            },
            _diffNumericOptions: M.diffNumericOptions,
            _visualOptions: function(e) {
                return {
                    data: e.path,
                    source: e.source,
                    hover: e.hover,
                    fill: e.fill,
                    stroke: e.stroke
                }
            },
            _triggerBoundsChange: function() {
                this.diagram && this.diagram.trigger(ye, {
                    item: this,
                    bounds: this._bounds.clone()
                })
            },
            _transformPoint: function(e) {
                var t = this.rotate(),
                    n = this.bounds(),
                    i = n.topLeft();
                return t.angle && e.rotate(t.center().plus(i), 360 - t.angle), e
            },
            _transformedBounds: function() {
                var e = this.bounds(),
                    t = e.topLeft(),
                    n = e.bottomRight();
                return j.fromPoints(this.diagram.modelToView(t), this.diagram.modelToView(n))
            },
            _rotatedBounds: function() {
                var e = this.bounds().rotatedBounds(this.rotate().angle),
                    t = e.topLeft(),
                    n = e.bottomRight();
                return j.fromPoints(t, n)
            },
            _rotate: function() {
                var e = this.options.rotation;
                e && e.angle && this.rotate(e.angle), this._rotationOffset = new Q
            },
            _hover: function(e) {
                var t = this.options,
                    n = t.hover,
                    i = t.stroke,
                    r = t.fill;
                e && he(n.stroke) && (i = B({}, i, n.stroke)), e && he(n.fill) && (r = n.fill), this.shapeVisual.redraw({
                    stroke: i,
                    fill: r
                }), t.editable && t.editable.connect && this.diagram._showConnectors(this, e)
            },
            _hitTest: function(e) {
                if (this.visible()) {
                    var t, n = this.bounds(),
                        i = this.rotate().angle;
                    if (e.isEmpty && !e.isEmpty()) return X.rects(e, n, i ? i : 0);
                    if (t = e.clone().rotate(n.center(), i), n.contains(t)) return this
                }
            },
            toJSON: function() {
                return {
                    shapeId: this.options.id
                }
            },
            createShapeVisual: function() {
                var e, t = this.options,
                    n = this._visualOptions(t),
                    i = t.visual,
                    r = (t.type + "").toLocaleLowerCase();
                n.width = t.width, n.height = t.height, me(i) ? e = i.call(this, t) : n.data ? (e = new q(n), g(e)) : e = "rectangle" == r ? new V(n) : "circle" == r ? new U(n) : "text" == r ? new Y(n) : "image" == r ? new K(n) : new q(n), this.shapeVisual = e, this.visual.append(this.shapeVisual)
            }
        }), y = _.extend({
            init: function(e, t, n) {
                var i = this;
                _.fn.init.call(i, n), this.updateOptionsFromModel(), this._initRouter(), i.path = new M.Polyline(i.options), i.path.fill(nt), i.visual.append(i.path), i._sourcePoint = i._targetPoint = new Q, i._setSource(e), i._setTarget(t), i.content(i.options.content), i.definers = [], fe(n) && n.points && i.points(n.points)
            },
            options: {
                hover: {
                    stroke: {}
                },
                startCap: Ve,
                endCap: Ve,
                points: [],
                selectable: !0,
                fromConnector: Fe,
                toConenctor: Fe
            },
            _setOptionsFromModel: function(e) {
                this.updateOptionsFromModel(e || this.dataItem)
            },
            updateOptionsFromModel: function(e) {
                var t, n, i, r;
                this.diagram && this.diagram._isEditable && (t = this.diagram._dataMap, n = s(e || this.dataItem), e ? (fe(n.from) ? (i = t[n.from], i && fe(n.fromConnector) && (i = i.getConnector(n.fromConnector)), this.source(i)) : fe(n.fromX) && fe(n.fromY) && this.source(new Q(n.fromX, n.fromY)), fe(n.to) ? (r = t[n.to], r && fe(n.toConnector) && (r = r.getConnector(n.toConnector)), this.target(r)) : fe(n.toX) && fe(n.toY) && this.target(new Q(n.toX, n.toY)), fe(n.type) && this.type() !== n.type && (this.points([]), this.type(n.type)), this.dataItem = e, this._template(), this.redraw(this.options)) : this.options = B({}, n, this.options))
            },
            updateModel: function(e) {
                if (this.diagram && this.diagram._isEditable && this.diagram.connectionsDataSource) {
                    var t = this.diagram.connectionsDataSource.getByUid(this.dataItem.uid);
                    t && (this.diagram._suspendModelRefresh(), fe(this.options.fromX) && null !== this.options.fromX ? (p("from", t), p("fromConnector", t), t.set("fromX", this.options.fromX), t.set("fromY", this.options.fromY)) : (t.set("from", this.options.from), fe(t.fromConnector) && t.set("fromConnector", this.sourceConnector ? this.sourceConnector.options.name : null), p("fromX", t), p("fromY", t)), fe(this.options.toX) && null !== this.options.toX ? (p("to", t), p("toConnector", t), t.set("toX", this.options.toX), t.set("toY", this.options.toY)) : (t.set("to", this.options.to), fe(t.toConnector) && t.set("toConnector", this.targetConnector ? this.targetConnector.options.name : null), p("toX", t), p("toY", t)), fe(this.options.type) && fe(t.type) && t.set("type", this.options.type), this.dataItem = t, this.diagram._resumeModelRefresh(), e && this.diagram._syncConnectionChanges())
                }
            },
            sourcePoint: function() {
                return this._resolvedSourceConnector ? this._resolvedSourceConnector.position() : this._sourcePoint
            },
            _setSource: function(e) {
                var n, i = e instanceof w,
                    r = this.options.fromConnector || Fe;
                (!i || e.getConnector(r)) && (e !== t && (this.from = e), this._removeFromSourceConnector(), null === e ? this.sourceConnector && (this._sourcePoint = (this._resolvedSourceConnector || this.sourceConnector).position(), this._clearSourceConnector(), this._setFromOptions(null, this._sourcePoint)) : e instanceof b ? (n = e.shape.dataItem, n && this._setFromOptions(n.id), this.sourceConnector = e, this.sourceConnector.connections.push(this)) : e instanceof Q ? (this._setFromOptions(null, e), this._sourcePoint = e, this.sourceConnector && this._clearSourceConnector()) : i && (n = e.dataItem, n && this._setFromOptions(n.id), this.sourceConnector = e.getConnector(r), this.sourceConnector.connections.push(this)))
            },
            source: function(e, t) {
                return he(e) && (t && this.diagram && this.diagram.undoRedoService.addCompositeItem(new M.ConnectionEditUnit(this, e)), this._setSource(e), this.refresh()), this.sourceConnector ? this.sourceConnector : this._sourcePoint
            },
            _setFromOptions: function(e, t) {
                this.options.from = e, t ? (this.options.fromX = t.x, this.options.fromY = t.y) : (this.options.fromX = null, this.options.fromY = null)
            },
            sourceDefiner: function(e) {
                if (!e) return this._sourceDefiner || (this._sourceDefiner = new M.PathDefiner(this.sourcePoint(), null, null)), this._sourceDefiner;
                if (!(e instanceof M.PathDefiner)) throw "The sourceDefiner needs to be a PathDefiner.";
                e.left = null, this._sourceDefiner = e, this.source(e.point)
            },
            targetPoint: function() {
                return this._resolvedTargetConnector ? this._resolvedTargetConnector.position() : this._targetPoint
            },
            _setTarget: function(e) {
                var n, i = e instanceof w,
                    r = this.options.toConnector || Fe;
                (!i || e.getConnector(r)) && (e !== t && (this.to = e), this._removeFromTargetConnector(), null === e ? this.targetConnector && (this._targetPoint = (this._resolvedTargetConnector || this.targetConnector).position(), this._clearTargetConnector(), this._setToOptions(null, this._targetPoint)) : e instanceof b ? (n = e.shape.dataItem, n && this._setToOptions(n.id), this.targetConnector = e, this.targetConnector.connections.push(this)) : e instanceof Q ? (this._setToOptions(null, e), this._targetPoint = e, this.targetConnector && this._clearTargetConnector()) : i && (n = e.dataItem, n && this._setToOptions(n.id), this.targetConnector = e.getConnector(r), this.targetConnector.connections.push(this)))
            },
            target: function(e, n) {
                return he(e) && (n && this.diagram && this.diagram.undoRedoService.addCompositeItem(new M.ConnectionEditUnit(this, t, e)), this._setTarget(e), this.refresh()), this.targetConnector ? this.targetConnector : this._targetPoint
            },
            _setToOptions: function(e, t) {
                this.options.to = e, t ? (this.options.toX = t.x, this.options.toY = t.y) : (this.options.toX = null, this.options.toY = null)
            },
            targetDefiner: function(e) {
                if (!e) return this._targetDefiner || (this._targetDefiner = new M.PathDefiner(this.targetPoint(), null, null)), this._targetDefiner;
                if (!(e instanceof M.PathDefiner)) throw "The sourceDefiner needs to be a PathDefiner.";
                e.right = null, this._targetDefiner = e, this.target(e.point)
            },
            _updateConnectors: function() {
                this._updateConnector(this.source(), "source"), this._updateConnector(this.target(), "target")
            },
            _updateConnector: function(e, t) {
                var n, i, r, o, a = this,
                    s = a.diagram;
                e instanceof b && !s.getShapeById(e.shape.id) ? (n = e.shape.dataItem, i = e.options.name, r = function() {
                    var r = s._dataMap[n.id];
                    e = r.getConnector(i), a[t](e, !1), a.updateModel()
                }, s._dataMap[n.id] ? r() : (o = s._inactiveShapeItems.getByUid(n.uid), o && s._deferredConnectionUpdates.push(o.onActivate(r)))) : a[t](e, !1)
            },
            content: function(e) {
                var t = this._content(e);
                return fe(e) && this._alignContent(), t
            },
            _createContentVisual: function(e) {
                var t;
                return me(e.visual) ? t = e.visual.call(this, e) : e.text && (t = new Y(e)), t && (this._contentVisual = t, t._includeInBBox = !1, this.visual.append(t)), t
            },
            _updateContentVisual: function(e) {
                me(e.visual) ? (this.visual.remove(this._contentVisual), this._createContentVisual(e)) : this._contentVisual.redraw(e)
            },
            _alignContent: function() {
                var e, t, n, i, r, o, a, s, l, c, d, u, h, f, p, m;
                if (this._contentVisual) {
                    for (e = ut, t = this.allPoints(), n = _e.floor(t.length / 2), i = n - 1; i > 0 && t[i].equals(t[n]);) i--, n++;
                    r = t[n], o = t[i], a = this._contentVisual._measure(), s = a.width, l = a.height, c = t.length % 2 === 0, d = o.distanceTo(r), c && t.length > 2 && d > 0 && (o.y === r.y && s > d || o.x === r.x && l > d) && (c = !1, e = 0), c ? (h = kendo.util.deg(_e.atan2(r.y - o.y, r.x - o.x)), u = new Q((r.x - o.x) / 2 + o.x, (r.y - o.y) / 2 + o.y), 90 === _e.abs(h) ? (u.x += e, u.y -= l / 2) : h % 180 === 0 ? (u.x -= s / 2, u.y -= l + e) : -90 > h || h > 0 && 90 > h ? u.y -= l : (0 > h || h > 90) && (u.x -= s, u.y -= l)) : (f = _e.floor(t.length / 2), u = t[f].clone(), o = t[f - 1], r = t[f + 1], p = u.x >= o.x && u.x >= r.x ? e : -a.width - e, m = u.y >= o.y && u.y >= r.y ? e : -a.height - e, u.x += p, u.y += m), this._contentVisual.position(u)
                }
            },
            select: function(e) {
                var n, i, r = this.diagram;
                return this._canSelect() && this.isSelected !== e ? (this.isSelected = e, n = [], i = [], this.isSelected ? (this.adorner = new J(this, this.options.selection), r._adorn(this.adorner, !0), r._selectedItems.push(this), n.push(this)) : this.adorner && (r._adorn(this.adorner, !1), oe.remove(r._selectedItems, this), this.adorner = t, i.push(this)), this.adorner && this.adorner.refresh(), r._internalSelection || r._selectionChanged(n, i), !0) : t
            },
            bounds: function(e) {
                return !e || ge(e) ? this._bounds : (this._bounds = e, t)
            },
            type: function(e) {
                var n = this.options;
                return e ? (e !== n.type && (n.type = e, this._initRouter(), this.refresh()), t) : n.type
            },
            _initRouter: function() {
                var e = (this.options.type || "").toLowerCase();
                this._router = e == we ? new de(this) : new ce(this)
            },
            points: function(e) {
                var t, n, i, r;
                if (!e) {
                    if (i = [], he(this.definers))
                        for (r = 0; this.definers.length > r; r++) i.push(this.definers[r].point);
                    return i
                }
                for (this.definers = [], t = 0; e.length > t; t++)
                    if (n = e[t], n instanceof M.Point) this.definers.push(new M.PathDefiner(n));
                    else {
                        if (!n.hasOwnProperty("x") || !n.hasOwnProperty("y")) throw "A Connection point needs to be a Point or an object with x and y properties.";
                        this.definers.push(new M.PathDefiner(new Q(n.x, n.y)))
                    }
            },
            allPoints: function() {
                var e, t = [this.sourcePoint()];
                if (this.definers)
                    for (e = 0; this.definers.length > e; e++) t.push(this.definers[e].point);
                return t.push(this.targetPoint()), t
            },
            refresh: function() {
                this._resolveConnectors(), this._refreshPath(), this._alignContent(), this.adorner && this.adorner.refresh()
            },
            _resolveConnectors: function() {
                var e, t, n, o, a = this,
                    s = a.source(),
                    l = a.target();
                s instanceof Q ? e = s : s instanceof b && (i(s) ? n = s.shape : (a._resolvedSourceConnector = s, e = s.position())), l instanceof Q ? t = l : l instanceof b && (i(l) ? o = l.shape : (a._resolvedTargetConnector = l, t = l.position())), e ? o && (a._resolvedTargetConnector = r(e, o)) : n && (t ? a._resolvedSourceConnector = r(t, n) : o && this._resolveAutoConnectors(n, o))
            },
            _resolveAutoConnectors: function(e, t) {
                var n, r, o, a, s, l, c, d, u, h, f, p, m = ze,
                    g = ze,
                    v = e.connectors;
                for (h = 0; v.length > h; h++)
                    if (d = v[h], !i(d))
                        for (a = d.position(), n = t.connectors, f = 0; n.length > f; f++) u = n[f], i(u) || (s = u.position(), p = _e.round(a.distanceTo(s)), m > p && this.diagram && this._testRoutePoints(a, s, d, u) && (m = p, r = d, o = u), g > p && (l = d, c = u, g = p));
                r && (l = r, c = o), this._resolvedSourceConnector = l, this._resolvedTargetConnector = c
            },
            _testRoutePoints: function(e, t, n, i) {
                var r, o, a, s, l, c = this._router,
                    d = !0;
                if (c instanceof de)
                    for (r = c.routePoints(e, t, n, i), r.unshift(e), r.push(t), l = 1; r.length > l; l++)
                        if (o = r[l - 1], a = r[l], s = new j(_e.min(o.x, a.x), _e.min(o.y, a.y), _e.abs(o.x - a.x), _e.abs(o.y - a.y)), s.width > 0 && (s.x++, s.width -= 2), s.height > 0 && (s.y++, s.height -= 2), !s.isEmpty() && this.diagram._shapesQuadTree.hitTestRect(s)) {
                            d = !1;
                            break
                        } return d
            },
            redraw: function(e) {
                if (e) {
                    this.options = B({}, this.options, e);
                    var t = this.options.points;
                    fe(t) && t.length > 0 && (this.points(t), this._refreshPath()), (e && e.content || e.text) && this.content(e.content), this.path.redraw({
                        fill: e.fill,
                        stroke: e.stroke,
                        startCap: e.startCap,
                        endCap: e.endCap
                    })
                }
            },
            clone: function() {
                var e = this.serialize();
                return this.diagram && this.diagram._isEditable && fe(this.dataItem) && (e.options.dataItem = u(this.dataItem)), new y(this.from, this.to, e.options)
            },
            serialize: function() {
                var e = this.from.toJSON ? this.from.toJSON : "" + this.from,
                    t = this.to.toJSON ? this.to.toJSON : "" + this.to,
                    n = B({}, {
                        options: this.options,
                        from: e,
                        to: t
                    });
                return fe(this.dataItem) && (n.dataItem = "" + this.dataItem), n.options.points = this.points(), n
            },
            _hitTest: function(e) {
                if (this.visible()) {
                    var t = new Q(e.x, e.y),
                        n = this.sourcePoint(),
                        i = this.targetPoint();
                    if (e.isEmpty && !e.isEmpty() && e.contains(n) && e.contains(i)) return this;
                    if (this._router.hitTest(t)) return this
                }
            },
            _hover: function(e) {
                var t = (this.options.stroke || {}).color;
                e && he(this.options.hover.stroke.color) && (t = this.options.hover.stroke.color), this.path.redraw({
                    stroke: {
                        color: t
                    }
                })
            },
            _refreshPath: function() {
                fe(this.path) && (this._drawPath(), this.bounds(this._router.getBounds()))
            },
            _drawPath: function() {
                var e, t, n;
                this._router && this._router.route(), e = this.sourcePoint(), t = this.targetPoint(), n = this.points(), this.path.redraw({
                    points: [e].concat(n, [t])
                })
            },
            _clearSourceConnector: function() {
                this.sourceConnector = t, this._resolvedSourceConnector = t
            },
            _clearTargetConnector: function() {
                this.targetConnector = t, this._resolvedTargetConnector = t
            },
            _removeFromSourceConnector: function() {
                this.sourceConnector && oe.remove(this.sourceConnector.connections, this)
            },
            _removeFromTargetConnector: function() {
                this.targetConnector && oe.remove(this.targetConnector.connections, this)
            },
            toJSON: function() {
                var e, t, n, i = this;
                return i.from && i.from.toJSON ? e = i.from.toJSON() : (n = i._sourcePoint, e = {
                    x: n.x,
                    y: n.y
                }), i.to && i.to.toJSON ? t = i.to.toJSON() : (n = i._targetPoint, t = {
                    x: n.x,
                    y: n.y
                }), {
                    from: e,
                    to: t
                }
            }
        }), k = R.extend({
            init: function(e, t) {
                var n = this;
                kendo.destroy(e), R.fn.init.call(n, e, t), n._initTheme(), n._initElements(), n._extendLayoutOptions(n.options), n._initDefaults(t), n._initCanvas(), n.mainLayer = new O({
                    id: "main-layer"
                }), n.canvas.append(n.mainLayer), n._shapesQuadTree = new A(n), n._pan = new Q, n._adorners = [], n.adornerLayer = new O({
                    id: "adorner-layer"
                }), n.canvas.append(n.adornerLayer), n._createHandlers(), n._initialize(), n._resizingAdorner = new ne(n, {
                    editable: n.options.editable
                }), n._connectorsAdorner = new ie(n), n._adorn(n._resizingAdorner, !0), n._adorn(n._connectorsAdorner, !0), n.selector = new te(n), n._clipboard = [], n.pauseMouseHandlers = !1, n._fetchFreshData(), n._createGlobalToolBar(), n._createOptionElements(), n.zoom(n.options.zoom), n.canvas.draw()
            },
            options: {
                name: "Diagram",
                theme: "default",
                layout: "",
                zoomRate: .1,
                zoom: 1,
                zoomMin: 0,
                zoomMax: 2,
                dataSource: {},
                draggable: !0,
                template: "",
                autoBind: !0,
                editable: {
                    rotate: {},
                    resize: {},
                    text: !0,
                    tools: [],
                    drag: {
                        snap: {
                            size: 10,
                            angle: 10
                        }
                    },
                    remove: !0
                },
                pannable: {
                    key: "ctrl"
                },
                selectable: {
                    key: "none"
                },
                tooltip: {
                    enabled: !0,
                    format: "{0}"
                },
                copy: {
                    enabled: !0,
                    offsetX: 20,
                    offsetY: 20
                },
                shapeDefaults: M.shapeDefaults({
                    undoable: !0
                }),
                connectionDefaults: {
                    editable: {
                        tools: []
                    },
                    type: we
                },
                shapes: [],
                connections: []
            },
            events: [Oe, Ne, He, Be, Le, ye, ke, xe, De, Ae, "toolBarClick", "save", "cancel", "edit", "remove", "add", "dataBound", Te, Ce, Se],
            items: function() {
                return e()
            },
            _createGlobalToolBar: function() {
                var e, t = this.options.editable;
                t && (e = t.tools, !this._isEditable || e === !1 || e && 0 !== e.length || (e = ["createShape", "undo", "redo", "rotateClockwise", "rotateAnticlockwise"]), e && e.length && (this.toolBar = new x(this, {
                    tools: e || {},
                    click: z(this._toolBarClick, this),
                    modal: !1
                }), this.toolBar.element.css({
                    textAlign: "left"
                }), this.element.prepend(this.toolBar.element), this._resize()))
            },
            createShape: function() {
                var e, t, n, i, r, o;
                (this.editor && this.editor.end() || !this.editor) && (e = this.dataSource, t = e.view() || [], n = t.length, i = f(e, {}), r = this._createShape(i, {}), this.trigger("add", {
                    shape: r
                }) || (e.insert(n, i), o = this._inactiveShapeItems.getByUid(i.uid), o.element = r, this.edit(r)))
            },
            _createShape: function(e, t) {
                t = B({}, this.options.shapeDefaults, t), t.dataItem = e;
                var n = new w(t, this);
                return n
            },
            createConnection: function() {
                var e, t, n, i, r;
                (this.editor && this.editor.end() || !this.editor) && (e = this.connectionsDataSource, t = e.view() || [], n = t.length, i = f(e, {}), r = this._createConnection(i), this.trigger("add", {
                    connection: r
                }) || (this._connectionsDataMap[i.uid] = r, e.insert(n, i), this.addConnection(r, !1), this.edit(r)))
            },
            _createConnection: function(e, t, n) {
                var i, r = B({}, this.options.connectionDefaults);
                return r.dataItem = e, i = new y(t || new Q, n || new Q, r)
            },
            editModel: function(e, t) {
                var n, i, r, o;
                if (this.cancelEdit(), r = this.options.editable, "shape" == t) n = r.shapeEditors, i = r.shapeTemplate;
                else {
                    if ("connection" != t) return;
                    o = z(l, this), n = B({}, {
                        from: o,
                        to: o
                    }, r.connectionEditors), i = r.connectionTemplate
                }
                this.editor = new S(this.element, {
                    update: z(this._update, this),
                    cancel: z(this._cancel, this),
                    model: e,
                    type: t,
                    target: this,
                    editors: n,
                    template: i
                }), this.trigger("edit", this._editArgs())
            },
            edit: function(e) {
                if (e.dataItem) {
                    var t = e instanceof w ? "shape" : "connection";
                    this.editModel(e.dataItem, t)
                }
            },
            cancelEdit: function() {
                this.editor && (this._getEditDataSource().cancelChanges(this.editor.model), this._destroyEditor())
            },
            saveEdit: function() {
                this.editor && this.editor.end() && !this.trigger("save", this._editArgs()) && this._getEditDataSource().sync()
            },
            _update: function() {
                this.editor && this.editor.end() && !this.trigger("save", this._editArgs()) && (this._getEditDataSource().sync(), this._destroyEditor())
            },
            _cancel: function() {
                var e, t;
                this.editor && !this.trigger("cancel", this._editArgs()) && (e = this.editor.model, this._getEditDataSource().cancelChanges(e), t = this._connectionsDataMap[e.uid] || this._dataMap[e.id], t && t._setOptionsFromModel(e), this._destroyEditor())
            },
            _getEditDataSource: function() {
                return "shape" === this.editor.options.type ? this.dataSource : this.connectionsDataSource
            },
            _editArgs: function() {
                var e = {
                    container: this.editor.wrapper
                };
                return e[this.editor.options.type] = this.editor.model, e
            },
            _destroyEditor: function() {
                this.editor && (this.editor.close(), this.editor = null)
            },
            _initElements: function() {
                this.wrapper = this.element.empty().css("position", "relative").attr("tabindex", 0).addClass("k-widget k-diagram"), this.scrollable = e("<div />").appendTo(this.element)
            },
            _initDefaults: function(e) {
                var t = this.options,
                    n = t.editable,
                    i = t.shapeDefaults,
                    r = t.connectionDefaults,
                    o = (e || {}).shapeDefaults;
                n === !1 ? (i.editable = !1, r.editable = !1) : (m(n, i.editable, ["drag", "remove", "connect"]), m(n, r.editable, ["drag", "remove"])), o && o.connectors && (t.shapeDefaults.connectors = o.connectors)
            },
            _initCanvas: function() {
                var t = e("<div class='k-layer'></div>").appendTo(this.scrollable)[0],
                    n = this.viewport();
                this.canvas = new N(t, {
                    width: n.width || Ue,
                    height: n.height || We
                })
            },
            _createHandlers: function() {
                var e = this,
                    t = e.element;
                t.on(st, z(e._wheel, e)), kendo.support.touch || kendo.support.mobileOS ? (e._userEvents = new kendo.UserEvents(t, {
                    multiTouch: !0,
                    tap: z(e._tap, e)
                }), e._userEvents.bind(["gesturestart", "gesturechange", "gestureend"], {
                    gesturestart: z(e._gestureStart, e),
                    gesturechange: z(e._gestureChange, e),
                    gestureend: z(e._gestureEnd, e)
                }), e.toolService = new ee(e), e.options.pannable !== !1 && e.scroller.enable()) : (e.toolService = new ee(e), this.scroller.wrapper.on("mousemove" + be, z(e._mouseMove, e)).on("mouseup" + be, z(e._mouseUp, e)).on("mousedown" + be, z(e._mouseDown, e)).on("mouseover" + be, z(e._mouseover, e)).on("mouseout" + be, z(e._mouseout, e)), t.on("keydown" + be, z(e._keydown, e))), this._syncHandler = z(e._syncChanges, e), e._resizeHandler = z(e.resize, e, !1), kendo.onResize(e._resizeHandler), this.bind(Ne, z(e._destroyToolBar, e)), this.bind(He, z(e._destroyToolBar, e))
            },
            _tap: function(e) {
                var t, n = this.toolService,
                    i = this._caculateMobilePosition(e);
                n._updateHoveredItem(i), n.hoveredItem && (t = n.hoveredItem, this.options.selectable !== !1 && (this._destroyToolBar(), t.isSelected ? t.select(!1) : this.select(t, {
                    addToSelection: !0
                }), this._createToolBar()), this.trigger("click", {
                    item: t,
                    point: i
                }))
            },
            _caculateMobilePosition: function(e) {
                return this.documentToModel(Q(e.x.location, e.y.location))
            },
            _gestureStart: function(e) {
                var t, n;
                this._destroyToolBar(), this.scroller.disable(), t = this.documentToModel(new Q(e.center.x, e.center.y)), n = {
                    point: t,
                    zoom: this.zoom()
                }, this.trigger(Ne, n) || (this._gesture = e, this._initialCenter = t)
            },
            _gestureChange: function(e) {
                var t, n, i = this._gesture,
                    r = this._initialCenter,
                    o = this.documentToView(new Q(e.center.x, e.center.y)),
                    a = e.distance / i.distance,
                    s = this._zoom,
                    l = !1;
                _e.abs(a - 1) >= lt && (this._zoom = s = this._getValidZoom(s * a), this.options.zoom = s, this._gesture = e, l = !0), t = r.times(s), n = o.minus(t), (l || this._pan.distanceTo(n) >= ct) && (this._panTransform(n), this._updateAdorners()), e.preventDefault()
            },
            _gestureEnd: function() {
                this.options.pannable !== !1 && this.scroller.enable(), this.trigger(Oe, {
                    point: this._initialCenter,
                    zoom: this.zoom()
                })
            },
            _resize: function() {
                var e = this.viewport();
                this.canvas && this.canvas.size(e), this.scrollable && this.toolBar && this.scrollable.height(e.height)
            },
            _mouseover: function(e) {
                var t = e.target._kendoNode;
                t && t.srcElement._hover && t.srcElement._hover(!0, t.srcElement)
            },
            _mouseout: function(e) {
                var t = e.target._kendoNode;
                t && t.srcElement._hover && t.srcElement._hover(!1, t.srcElement)
            },
            _initTheme: function() {
                var e = this,
                    t = E.ui.themes || {},
                    n = ((e.options || {}).theme || "").toLowerCase(),
                    i = (t[n] || {}).diagram;
                e.options = B({}, i, e.options), e.options.editable === !0 && B(e.options, {
                    editable: (i || {}).editable
                })
            },
            _createOptionElements: function() {
                var e = this.options,
                    t = e.shapes.length;
                t && this._createShapes(), e.connections.length && this._createConnections(), t && e.layout && this.layout(e.layout)
            },
            _createShapes: function() {
                var e, t, n = this,
                    i = n.options,
                    r = i.shapes;
                for (t = 0; r.length > t; t++) e = r[t], n.addShape(e)
            },
            _createConnections: function() {
                var e, t, n, i, r = this,
                    o = r.options,
                    a = o.connectionDefaults,
                    s = o.connections;
                for (i = 0; s.length > i; i++) e = s[i], t = r._findConnectionTarget(e.from), n = r._findConnectionTarget(e.to), r.connect(t, n, B({}, a, e))
            },
            _findConnectionTarget: function(e) {
                var t, n = this,
                    i = ge(e) ? e : e.shapeId || e.id;
                return i ? (t = n.getShapeById(i), e.connector && (t = t.getConnector(e.connector))) : t = new Q(e.x || 0, e.y || 0), t
            },
            destroy: function() {
                var e = this;
                R.fn.destroy.call(e), this._userEvents && this._userEvents.destroy(), kendo.unbindResize(e._resizeHandler), e.clear(), e.element.off(be), e.scroller.wrapper.off(be), e.canvas.destroy(!0), e.canvas = t, e._destroyEditor(), e.destroyScroller(), e._destroyGlobalToolBar(), e._destroyToolBar()
            },
            destroyScroller: function() {
                var e = this.scroller;
                e && (e.destroy(), e.element.remove(), this.scroller = null)
            },
            save: function() {
                var e, t, n, i = {
                    shapes: [],
                    connections: []
                };
                for (e = 0; this.shapes.length > e; e++) n = this.shapes[e], n.options.serializable && i.shapes.push(n.options);
                for (e = 0; this.connections.length > e; e++) t = this.connections[e], i.connections.push(B({}, t.options, t.toJSON()));
                return i
            },
            focus: function() {
                if (!this.element.is(kendo._activeElement())) {
                    var e, t = this.element,
                        n = t[0],
                        i = [],
                        r = [],
                        o = document.documentElement;
                    do n = n.parentNode, n.scrollHeight > n.clientHeight && (i.push(n), r.push(n.scrollTop)); while (n != o);
                    for (t.focus(), e = 0; i.length > e; e++) i[e].scrollTop = r[e]
                }
            },
            load: function(e) {
                this.clear(), this.setOptions(e), this._createShapes(), this._createConnections()
            },
            setOptions: function(e) {
                B(this.options, e)
            },
            clear: function() {
                var e = this;
                e.select(!1), e.mainLayer.clear(), e._shapesQuadTree.clear(), e._initialize()
            },
            connect: function(e, t, n) {
                var i, r;
                return this.connectionsDataSource && this._isEditable ? (r = this.connectionsDataSource.add({}), i = this._connectionsDataMap[r.uid], i.source(e), i.target(t), i.redraw(n), i.updateModel()) : (i = new y(e, t, B({}, this.options.connectionDefaults, n)), this.addConnection(i)), i
            },
            connected: function(e, t) {
                var n, i;
                for (n = 0; this.connections.length > n; n++)
                    if (i = this.connections[n], i.from == e && i.to == t) return !0;
                return !1
            },
            addConnection: function(e, t) {
                return t !== !1 && this.undoRedoService.add(new M.AddConnectionUnit(e, this), !1), e.diagram = this, e._setOptionsFromModel(), e.refresh(), this.mainLayer.append(e.visual), this.connections.push(e), this.trigger(ke, {
                    added: [e],
                    removed: []
                }), e
            },
            _addConnection: function(e, t) {
                var n, i = this.connectionsDataSource;
                if (i && this._isEditable) {
                    if (n = f(i, u(e.dataItem)), e.dataItem = n, e.updateModel(), !this.trigger("add", {
                        connection: e
                    })) return this._connectionsDataMap[n.uid] = e, i.add(n), this.addConnection(e, t), e._updateConnectors(), e
                } else if (!this.trigger("add", {
                    connection: e
                })) return this.addConnection(e, t), e._updateConnectors(), e
            },
            addShape: function(e, t) {
                var n, i = this.options.shapeDefaults;
                if (e instanceof w) n = e;
                else {
                    if (e instanceof kendo.Class) return;
                    i = B({}, i, e || {}), n = new w(i, this)
                }
                return t !== !1 && this.undoRedoService.add(new M.AddShapeUnit(n, this), !1), this.shapes.push(n), n.diagram !== this && (this._shapesQuadTree.insert(n), n.diagram = this), this.mainLayer.append(n.visual), this.trigger(ke, {
                    added: [n],
                    removed: []
                }), n
            },
            _addShape: function(e, t) {
                var n, i, r = this,
                    o = r.dataSource;
                if (o && this._isEditable) {
                    if (n = f(o, u(e.dataItem)), e.dataItem = n, e.updateModel(), !this.trigger("add", {
                        shape: e
                    })) return this.dataSource.add(n), i = this._inactiveShapeItems.getByUid(n.uid), i.element = e, i.undoable = t, e
                } else if (!this.trigger("add", {
                    shape: e
                })) return this.addShape(e, t)
            },
            remove: function(e, t) {
                var n, i, r, o;
                for (e = pe(e) ? e.slice(0) : [e], n = h(e), i = n.shapes, r = n.connections, fe(t) || (t = !0), t && this.undoRedoService.begin(), this._suspendModelRefresh(), o = i.length - 1; o >= 0; o--) this._removeItem(i[o], t, r);
                for (o = r.length - 1; o >= 0; o--) this._removeItem(r[o], t);
                this._resumeModelRefresh(), t && this.undoRedoService.commit(!1), this.trigger(ke, {
                    added: [],
                    removed: e
                })
            },
            _removeShapeDataItem: function(e) {
                this._isEditable && (this.dataSource.remove(e.dataItem), delete this._dataMap[e.dataItem.id])
            },
            _removeConnectionDataItem: function(e) {
                this._isEditable && (this.connectionsDataSource.remove(e.dataItem), delete this._connectionsDataMap[e.dataItem.uid])
            },
            _triggerRemove: function(e) {
                var t, n, i, r, o = [];
                for (r = 0; e.length > r; r++) t = e[r], i = t.options.editable, n = t instanceof w ? {
                    shape: t
                } : {
                    connection: t
                }, i && i.remove !== !1 && !this.trigger("remove", n) && o.push(t);
                return o
            },
            undo: function() {
                this.undoRedoService.undo()
            },
            redo: function() {
                this.undoRedoService.redo()
            },
            select: function(e, t) {
                if (!he(e)) return this._selectedItems;
                t = B({
                    addToSelection: !1
                }, t);
                var n, i, r = t.addToSelection,
                    o = [],
                    a = [];
                for (r || this.deselect(), this._internalSelection = !0, e instanceof Array ? o = e : e instanceof _ && (o = [e]), n = 0; o.length > n; n++) i = o[n], i.select(!0) && a.push(i);
                this._selectionChanged(a, []), this._internalSelection = !1
            },
            selectAll: function() {
                this.select(this.shapes.concat(this.connections))
            },
            selectArea: function(e) {
                var t, n, i, r;
                if (this._internalSelection = !0, r = [], e instanceof j)
                    for (n = this.shapes.concat(this.connections), t = 0; n.length > t; t++) i = n[t], e && !i._hitTest(e) || !i.options.enable || i.select(!0) && r.push(i);
                this._selectionChanged(r, []), this._internalSelection = !1
            },
            deselect: function(e) {
                this._internalSelection = !0;
                var t, n, i = [],
                    r = [];
                for (e instanceof Array ? r = e : e instanceof _ ? r.push(e) : he(e) || (r = this._selectedItems.slice(0)), n = 0; r.length > n; n++) t = r[n], t.select(!1) && i.push(t);
                this._selectionChanged([], i), this._internalSelection = !1
            },
            toFront: function(e, t) {
                var n, i, r;
                e || (e = this._selectedItems.slice()), n = this._getDiagramItems(e), !fe(t) || t ? (i = o(this.mainLayer, n.visuals), r = new le(this, e, i), this.undoRedoService.add(r)) : (this.mainLayer.toFront(n.visuals), this._fixOrdering(n, !0))
            },
            toBack: function(e, t) {
                var n, i, r;
                e || (e = this._selectedItems.slice()), n = this._getDiagramItems(e), !fe(t) || t ? (i = o(this.mainLayer, n.visuals), r = new se(this, e, i), this.undoRedoService.add(r)) : (this.mainLayer.toBack(n.visuals), this._fixOrdering(n, !1))
            },
            bringIntoView: function(e, t) {
                var n, i, r, o, a = this.viewport(),
                    s = new M.RectAlign(a);
                0 !== a.width && 0 !== a.height && (t = B({
                    animate: !1,
                    align: "center middle"
                }, t), "none" == t.align && (t.align = "center middle"), e instanceof _ ? i = e.bounds(et) : pe(e) ? i = this.boundingBox(e) : e instanceof j && (i = e.clone()), r = i.clone(), i.zoom(this._zoom), (i.width > a.width || i.height > a.height) && (this._zoom = this._getValidZoom(_e.min(a.width / r.width, a.height / r.height)), i = r.clone().zoom(this._zoom)), this._zoomMainLayer(), n = i.clone(), s.align(i, t.align), o = i.topLeft().minus(n.topLeft()), this.pan(o.times(-1), t.animate))
            },
            alignShapes: function(e) {
                var t, n, i, r, o, a, s;
                if (ue(e) && (e = "Left"), t = this.select(), 0 !== t.length) {
                    switch (e.toLowerCase()) {
                        case "left":
                        case "top":
                            n = Xe;
                            break;
                        case "right":
                        case "bottom":
                            n = Je
                    }
                    for (r = 0; t.length > r; r++)
                        if (i = t[r], i instanceof w) switch (e.toLowerCase()) {
                            case "left":
                                n = _e.min(n, i.options.x);
                                break;
                            case "top":
                                n = _e.min(n, i.options.y);
                                break;
                            case "right":
                                n = _e.max(n, i.options.x);
                                break;
                            case "bottom":
                                n = _e.max(n, i.options.y)
                        }
                    for (o = [], a = [], r = 0; t.length > r; r++)
                        if (i = t[r], i instanceof w) switch (a.push(i), o.push(i.bounds()), e.toLowerCase()) {
                            case "left":
                            case "right":
                                i.position(new Q(n, i.options.y));
                                break;
                            case "top":
                            case "bottom":
                                i.position(new Q(i.options.x, n))
                        }
                    s = new M.TransformUnit(a, o), this.undoRedoService.add(s, !1)
                }
            },
            zoom: function(e, t) {
                var n, i, r, o;
                return e && (n = t ? t.point : new M.Point(0, 0), e = this._zoom = this._getValidZoom(e), ue(n) || (n = new M.Point(_e.round(n.x), _e.round(n.y)), i = n.times(e), r = this.modelToView(n), o = r.minus(i), this._storePan(new M.Point(_e.round(o.x), _e.round(o.y)))), t && (t.zoom = e), this._panTransform(), this._updateAdorners()), this._zoom
            },
            _getPan: function(e) {
                var t = this.canvas;
                return t.translate || (e = e.plus(this._pan)), e
            },
            pan: function(e, t) {
                var n, i;
                e instanceof Q && (n = this, i = n.scroller, e = n._getPan(e), e = e.times(-1), t ? i.animatedScrollTo(e.x, e.y, function() {
                    n._updateAdorners()
                }) : (i.scrollTo(e.x, e.y), n._updateAdorners()))
            },
            viewport: function() {
                var e = this.element,
                    t = e.width(),
                    n = e.height();
                return this.toolBar && (n -= this.toolBar.element.outerHeight()), new j(0, 0, t, n)
            },
            copy: function() {
                var e, t;
                if (this.options.copy.enabled)
                    for (this._clipboard = [], this._copyOffset = 1, e = 0; this._selectedItems.length > e; e++) t = this._selectedItems[e], this._clipboard.push(t)
            },
            cut: function() {
                var e, t;
                if (this.options.copy.enabled) {
                    for (this._clipboard = [], this._copyOffset = 0, e = 0; this._selectedItems.length > e; e++) t = this._selectedItems[e], this._clipboard.push(t);
                    this.remove(this._clipboard, !0)
                }
            },
            paste: function() {
                var e, t, n, i, r, o, a, s;
                if (this._clipboard.length > 0) {
                    for (i = {}, r = h(this._clipboard), o = r.connections, a = r.shapes, s = {
                        x: this._copyOffset * this.options.copy.offsetX,
                        y: this._copyOffset * this.options.copy.offsetY
                    }, this.deselect(), n = 0; a.length > n; n++) e = a[n], t = e.clone(), i[e.id] = t, t.position(new Q(e.options.x + s.x, e.options.y + s.y)), t.diagram = this, t = this._addShape(t), t && t.select();
                    for (n = 0; o.length > n; n++) e = o[n], t = this._addConnection(e.clone()), t && (this._updateCopiedConnection(t, e, "source", i, s), this._updateCopiedConnection(t, e, "target", i, s), t.select(!0), t.updateModel());
                    this._syncChanges(), this._copyOffset += 1
                }
            },
            _updateCopiedConnection: function(e, t, n, i, r) {
                var o, a, s, l = t[n](),
                    c = this;
                l instanceof b && i[l.shape.id] ? (s = i[l.shape.id], c.getShapeById(s.id) ? e[n](s.getConnector(l.options.name)) : (a = c._inactiveShapeItems.getByUid(s.dataItem.uid), a && (o = function(t) {
                    s = c._dataMap[t.id], e[n](s.getConnector(l.options.name)), e.updateModel()
                }, c._deferredConnectionUpdates.push(a.onActivate(o))))) : e[n](new Q(t[n + "Point"]().x + r.x, t[n + "Point"]().y + r.y))
            },
            boundingBox: function(e, t) {
                var n, i, r, o = j.empty(),
                    a = he(e) ? this._getDiagramItems(e) : {
                        shapes: this.shapes
                    };
                if (a.shapes.length > 0)
                    for (i = a.shapes[0], o = i.bounds(tt), r = 1; a.shapes.length > r; r++) i = a.shapes[r], n = i.bounds(tt), t === !0 && (n.x -= i._rotationOffset.x, n.y -= i._rotationOffset.y), o = o.union(n);
                return o
            },
            _containerOffset: function() {
                var e = this.element.offset();
                return this.toolBar && (e.top += this.toolBar.element.outerHeight()), e
            },
            documentToView: function(e) {
                var t = this._containerOffset();
                return new Q(e.x - t.left, e.y - t.top)
            },
            viewToDocument: function(e) {
                var t = this._containerOffset();
                return new Q(e.x + t.left, e.y + t.top)
            },
            viewToModel: function(e) {
                return this._transformWithMatrix(e, this._matrixInvert)
            },
            modelToView: function(e) {
                return this._transformWithMatrix(e, this._matrix)
            },
            modelToLayer: function(e) {
                return this._transformWithMatrix(e, this._layerMatrix)
            },
            layerToModel: function(e) {
                return this._transformWithMatrix(e, this._layerMatrixInvert)
            },
            documentToModel: function(e) {
                var t = this.documentToView(e);
                return this.canvas.translate || (t.x = t.x + this.scroller.scrollLeft, t.y = t.y + this.scroller.scrollTop), this.viewToModel(t)
            },
            modelToDocument: function(e) {
                return this.viewToDocument(this.modelToView(e))
            },
            _transformWithMatrix: function(e, t) {
                var n, i, r = e;
                return e instanceof Q ? t && (r = t.apply(e)) : (n = this._transformWithMatrix(e.topLeft(), t), i = this._transformWithMatrix(e.bottomRight(), t), r = j.fromPoints(n, i)), r
            },
            setDataSource: function(e) {
                this.options.dataSource = e, this._dataSource(), this.options.autoBind && this.dataSource.fetch()
            },
            setConnectionsDataSource: function(e) {
                this.options.connectionsDataSource = e, this._connectionDataSource(), this.options.autoBind && this.connectionsDataSource.fetch()
            },
            layout: function(e) {
                var t, n, i, r, o;
                switch (this._layouting = !0, ue(e) && (e = this.options.layout), t = ue(e) || ue(e.type) ? "Tree" : e.type, t.toLowerCase()) {
                    case "tree":
                        n = new M.TreeLayout(this);
                        break;
                    case "layered":
                        n = new M.LayeredLayout(this);
                        break;
                    case "forcedirected":
                    case "force":
                    case "spring":
                    case "springembedder":
                        n = new M.SpringLayout(this);
                        break;
                    default:
                        throw "Layout algorithm '" + t + "' is not supported."
                }
                i = new M.LayoutState(this), r = n.layout(e), r && (o = new M.LayoutUndoUnit(i, r, e ? e.animate : null), this.undoRedoService.add(o)), this._layouting = !1, this._redrawConnections()
            },
            getShapeById: function(e) {
                var t;
                return (t = oe.first(this.shapes, function(t) {
                    return t.visual.id === e
                })) ? t : t = oe.first(this.connections, function(t) {
                    return t.visual.id === e
                })
            },
            _extendLayoutOptions: function(e) {
                e.layout && (e.layout = B(M.LayoutBase.fn.defaultOptions || {}, e.layout))
            },
            _selectionChanged: function(e, t) {
                (e.length || t.length) && this.trigger(Be, {
                    selected: e,
                    deselected: t
                })
            },
            _getValidZoom: function(e) {
                return _e.min(_e.max(e, this.options.zoomMin), this.options.zoomMax)
            },
            _panTransform: function(e) {
                var t = this,
                    n = e || t._pan;
                t.canvas.translate ? (t.scroller.scrollTo(n.x, n.y), t._zoomMainLayer()) : (t._storePan(n), t._transformMainLayer())
            },
            _finishPan: function() {
                this.trigger(He, {
                    total: this._pan,
                    delta: Number.NaN
                })
            },
            _storePan: function(e) {
                this._pan = e, this._storeViewMatrix()
            },
            _zoomMainLayer: function() {
                var e = this._zoom,
                    t = new W(0, 0, e, e);
                t.render(this.mainLayer), this._storeLayerMatrix(t), this._storeViewMatrix()
            },
            _transformMainLayer: function() {
                var e = this._pan,
                    t = this._zoom,
                    n = new W(e.x, e.y, t, t);
                n.render(this.mainLayer), this._storeLayerMatrix(n), this._storeViewMatrix()
            },
            _storeLayerMatrix: function(e) {
                this._layerMatrix = e.toMatrix(), this._layerMatrixInvert = e.invert().toMatrix()
            },
            _storeViewMatrix: function() {
                var e = this._pan,
                    t = this._zoom,
                    n = new W(e.x, e.y, t, t);
                this._matrix = n.toMatrix(), this._matrixInvert = n.invert().toMatrix()
            },
            _toIndex: function(e, t) {
                var n = this._getDiagramItems(e);
                this.mainLayer.toIndex(n.visuals, t), this._fixOrdering(n, !1)
            },
            _fixOrdering: function(e, t) {
                var n, i, r = t ? this.shapes.length - 1 : 0,
                    o = t ? this.connections.length - 1 : 0;
                for (n = 0; e.shapes.length > n; n++) i = e.shapes[n], oe.remove(this.shapes, i), oe.insert(this.shapes, i, r);
                for (n = 0; e.cons.length > n; n++) i = e.cons[n], oe.remove(this.connections, i), oe.insert(this.connections, i, o)
            },
            _getDiagramItems: function(e) {
                var t, n, i = {},
                    r = e;
                for (i.visuals = [], i.shapes = [], i.cons = [], e ? pe(e) || (r = [e]) : r = this._selectedItems.slice(), t = 0; r.length > t; t++) n = r[t], n instanceof w ? (i.shapes.push(n), i.visuals.push(n.visual)) : n instanceof y && (i.cons.push(n), i.visuals.push(n.visual));
                return i
            },
            _removeItem: function(e, t, n) {
                e.select(!1), e instanceof w ? (this._removeShapeDataItem(e), this._removeShape(e, t, n)) : e instanceof y && (this._removeConnectionDataItem(e), this._removeConnection(e, t)), this.mainLayer.remove(e.visual)
            },
            _removeShape: function(e, t, n) {
                var i, r, o, a, s = [],
                    l = [];
                for (this.toolService._removeHover(), t && this.undoRedoService.addCompositeItem(new G(e)), oe.remove(this.shapes, e), this._shapesQuadTree.remove(e), i = 0; e.connectors.length > i; i++)
                    for (o = e.connectors[i], a = 0; o.connections.length > a; a++) r = o.connections[a], n && E.inArray(r, n) || (r.sourceConnector == o ? s.push(r) : r.targetConnector == o && l.push(r));
                for (i = 0; s.length > i; i++) s[i].source(null, t), s[i].updateModel();
                for (i = 0; l.length > i; i++) l[i].target(null, t), l[i].updateModel()
            },
            _removeConnection: function(e, t) {
                e.sourceConnector && oe.remove(e.sourceConnector.connections, e), e.targetConnector && oe.remove(e.targetConnector.connections, e), t && this.undoRedoService.addCompositeItem(new $(e)), oe.remove(this.connections, e)
            },
            _removeDataItems: function(e, t) {
                var n, i, r, o;
                for (e = pe(e) ? e : [e]; e.length;)
                    if (n = e.shift(), r = this._dataMap[n.uid], r && (this._removeShapeConnections(r), this._removeItem(r, !1), delete this._dataMap[n.uid], t && n.hasChildren && n.loaded()))
                        for (i = n.children.data(), o = 0; i.length > o; o++) e.push(i[o])
            },
            _removeShapeConnections: function(e) {
                var t, n = e.connections();
                if (n)
                    for (t = 0; n.length > t; t++) this._removeItem(n[t], !1)
            },
            _addDataItem: function(e, t) {
                var n, i;
                if (fe(e)) return (n = this._dataMap[e.id]) ? n : (i = B({}, this.options.shapeDefaults), i.dataItem = e, n = new w(i, this), this.addShape(n, t !== !1), this._dataMap[e.id] = n, n)
            },
            _addDataItemByUid: function(e) {
                var t, n;
                if (fe(e)) return (t = this._dataMap[e.uid]) ? t : (n = B({}, this.options.shapeDefaults), n.dataItem = e, t = new w(n, this), this.addShape(t), this._dataMap[e.uid] = t, t)
            },
            _addDataItems: function(e, t) {
                var n, i, r, o, a;
                for (i = 0; e.length > i; i++) n = e[i], r = this._addDataItemByUid(n), o = this._addDataItemByUid(t), o && !this.connected(o, r) && (a = this.connect(o, r))
            },
            _refreshSource: function(e) {
                var t, n, i = this,
                    r = e.node,
                    o = e.action,
                    a = e.items,
                    s = i.options;
                if (!e.field) {
                    if ("remove" == o) this._removeDataItems(e.items, !0);
                    else
                        for (o && "itemloaded" !== o || this._bindingRoots || (this._bindingRoots = !0, n = !0), o || r || i.clear(), this._addDataItems(a, r), t = 0; a.length > t; t++) a[t].load();
                    s.layout && (n || "remove" == o || "add" == o) && i.layout(s.layout), n && (this.trigger("dataBound"), this._bindingRoots = !1)
                }
            },
            _mouseDown: function(e) {
                var t = this._calculatePosition(e);
                1 == e.which && this.toolService.start(t, this._meta(e)) && (this._destroyToolBar(), e.preventDefault())
            },
            _addItem: function(e) {
                e instanceof w ? this.addShape(e) : e instanceof y && this.addConnection(e)
            },
            _mouseUp: function(e) {
                var t = this._calculatePosition(e);
                1 == e.which && this.toolService.end(t, this._meta(e)) && (this._createToolBar(), e.preventDefault())
            },
            _createToolBar: function() {
                var e, t, n, i, r, o, a, s, l, c = this.toolService.diagram;
                this.singleToolBar || 1 !== c.select().length || (e = c.select()[0], e && e.options.editable !== !1 && (t = e.options.editable, n = t.tools, this._isEditable && 0 === n.length && (e instanceof w ? n = ["edit", "rotateClockwise", "rotateAnticlockwise"] : e instanceof y && (n = ["edit"]), t && t.remove !== !1 && n.push("delete")), n && n.length && (i = 20, this.singleToolBar = new x(c, {
                    tools: n,
                    click: z(this._toolBarClick, this),
                    modal: !0
                }), o = this.singleToolBar._popup.element.outerWidth(), a = this.singleToolBar._popup.element.outerHeight(), e instanceof w ? (s = this.modelToView(e.bounds(tt)), r = Q(s.x, s.y).minus(Q((o - s.width) / 2, a + i))) : e instanceof y && (l = this.modelToView(e.bounds()), r = Q(l.x, l.y).minus(Q((o - l.width - 20) / 2, a + i))), r ? (this.canvas.translate || (r = r.minus(Q(this.scroller.scrollLeft, this.scroller.scrollTop))), r = this.viewToDocument(r), r = Q(_e.max(r.x, 0), _e.max(r.y, 0)), this.singleToolBar.showAt(r)) : this._destroyToolBar())))
            },
            _toolBarClick: function(e) {
                this.trigger("toolBarClick", e), this._destroyToolBar()
            },
            _mouseMove: function(e) {
                if (!this.pauseMouseHandlers) {
                    var t = this._calculatePosition(e);
                    0 !== e.which && 1 != e.which || !this.toolService.move(t, this._meta(e)) || e.preventDefault()
                }
            },
            _keydown: function(e) {
                this.toolService.keyDown(e.keyCode, this._meta(e)) && e.preventDefault()
            },
            _wheel: function(e) {
                var t = n(e),
                    i = this._calculatePosition(e),
                    r = B(this._meta(e), {
                        delta: t
                    });
                this.toolService.wheel(i, r) && e.preventDefault()
            },
            _meta: function(e) {
                return {
                    ctrlKey: e.ctrlKey,
                    metaKey: e.metaKey,
                    altKey: e.altKey,
                    shiftKey: e.shiftKey
                }
            },
            _calculatePosition: function(e) {
                var n = e.pageX === t ? e.originalEvent : e,
                    i = new Q(n.pageX, n.pageY),
                    r = this.documentToModel(i);
                return r
            },
            _normalizePointZoom: function(e) {
                return e.times(1 / this.zoom())
            },
            _initialize: function() {
                this.shapes = [], this._selectedItems = [], this.connections = [], this._dataMap = {}, this._connectionsDataMap = {}, this._inactiveShapeItems = new d, this._deferredConnectionUpdates = [], this.undoRedoService = new Z({
                    undone: this._syncHandler,
                    redone: this._syncHandler
                }), this.id = M.randomId()
            },
            _fetchFreshData: function() {
                var e = this;
                e._dataSource(), e._isEditable && e._connectionDataSource(), e.options.autoBind && (e._isEditable ? (this._loadingShapes = !0, this._loadingConnections = !0, e.dataSource.fetch(), e.connectionsDataSource.fetch()) : e.dataSource.fetch())
            },
            _dataSource: function() {
                var e, t;
                fe(this.options.connectionsDataSource) ? (this._isEditable = !0, e = this.options.dataSource || {}, t = pe(e) ? {
                    data: e
                } : e, this.dataSource && this._shapesRefreshHandler ? this.dataSource.unbind("change", this._shapesRefreshHandler).unbind("requestStart", this._shapesRequestStartHandler).unbind("error", this._shapesErrorHandler) : (this._shapesRefreshHandler = z(this._refreshShapes, this), this._shapesRequestStartHandler = z(this._shapesRequestStart, this), this._shapesErrorHandler = z(this._error, this)), this.dataSource = kendo.data.DataSource.create(t).bind("change", this._shapesRefreshHandler).bind("requestStart", this._shapesRequestStartHandler).bind("error", this._shapesErrorHandler)) : (this._treeDataSource(), this._isEditable = !1)
            },
            _connectionDataSource: function() {
                var e, t = this.options.connectionsDataSource;
                t && (e = pe(t) ? {
                    data: t
                } : t, this.connectionsDataSource && this._connectionsRefreshHandler ? this.connectionsDataSource.unbind("change", this._connectionsRefreshHandler).unbind("requestStart", this._connectionsRequestStartHandler).unbind("error", this._connectionsErrorHandler) : (this._connectionsRefreshHandler = z(this._refreshConnections, this), this._connectionsRequestStartHandler = z(this._connectionsRequestStart, this), this._connectionsErrorHandler = z(this._connectionsError, this)), this.connectionsDataSource = kendo.data.DataSource.create(e).bind("change", this._connectionsRefreshHandler).bind("requestStart", this._connectionsRequestStartHandler).bind("error", this._connectionsErrorHandler))
            },
            _shapesRequestStart: function(e) {
                "read" == e.type && (this._loadingShapes = !0)
            },
            _connectionsRequestStart: function(e) {
                "read" == e.type && (this._loadingConnections = !0)
            },
            _error: function() {
                this._loadingShapes = !1
            },
            _connectionsError: function() {
                this._loadingConnections = !1
            },
            _refreshShapes: function(e) {
                "remove" === e.action ? this._shouldRefresh() && this._removeShapes(e.items) : "itemchange" === e.action ? this._shouldRefresh() && this._updateShapes(e.items, e.field) : "add" === e.action ? this._inactiveShapeItems.add(e.items) : "sync" === e.action ? this._syncShapes(e.items) : this.refresh()
            },
            _shouldRefresh: function() {
                return !this._suspended
            },
            _suspendModelRefresh: function() {
                this._suspended = (this._suspended || 0) + 1
            },
            _resumeModelRefresh: function() {
                this._suspended = _e.max((this._suspended || 0) - 1, 0)
            },
            refresh: function() {
                this._loadingShapes = !1, this._loadingConnections || this._rebindShapesAndConnections()
            },
            _rebindShapesAndConnections: function() {
                this.clear(), this._addShapes(this.dataSource.view()), this.connectionsDataSource && this._addConnections(this.connectionsDataSource.view(), !1), this.options.layout ? this.layout(this.options.layout) : this._redrawConnections(), this.trigger("dataBound")
            },
            refreshConnections: function() {
                this._loadingConnections = !1, this._loadingShapes || this._rebindShapesAndConnections()
            },
            _redrawConnections: function() {
                var e, t = this.connections;
                for (e = 0; t.length > e; e++) t[e].refresh()
            },
            _removeShapes: function(e) {
                var t, n, i = this._dataMap;
                for (n = 0; e.length > n; n++) t = e[n], i[t.id] && (this.remove(i[t.id], !1), i[t.id] = null)
            },
            _syncShapes: function() {
                var e = this,
                    t = e._inactiveShapeItems;
                t.forEach(function(n) {
                    var i = n.dataItem,
                        r = n.element;
                    i.isNew() || (r ? (r._setOptionsFromModel(), e.addShape(r, n.undoable), e._dataMap[i.id] = r) : e._addDataItem(i), n.activate(), t.remove(i))
                })
            },
            _updateShapes: function(e, t) {
                var n, i, r;
                for (n = 0; e.length > n; n++) i = e[n], r = this._dataMap[i.id], r && r.updateOptionsFromModel(i, t)
            },
            _addShapes: function(e) {
                for (var t = 0; e.length > t; t++) this._addDataItem(e[t], !1)
            },
            _refreshConnections: function(e) {
                "remove" === e.action ? this._shouldRefresh() && this._removeConnections(e.items) : "add" === e.action ? this._addConnections(e.items) : "sync" === e.action || ("itemchange" === e.action ? this._shouldRefresh() && this._updateConnections(e.items) : this.refreshConnections())
            },
            _removeConnections: function(e) {
                for (var t = 0; e.length > t; t++) this.remove(this._connectionsDataMap[e[t].uid], !1), this._connectionsDataMap[e[t].uid] = null
            },
            _updateConnections: function(e) {
                var t, n, i;
                for (t = 0; e.length > t; t++) n = e[t], i = this._connectionsDataMap[n.uid], i.updateOptionsFromModel(n)
            },
            _addConnections: function(e, t) {
                var n, i, r = e.length;
                for (n = 0; r > n; n++) i = e[n], this._addConnectionDataItem(i, t)
            },
            _addConnectionDataItem: function(e, t) {
                var n, i, r, o;
                this._connectionsDataMap[e.uid] || (n = this._validateConnector(e.from), fe(n) && null !== n || (n = new Q(e.fromX, e.fromY)), i = this._validateConnector(e.to), fe(i) && null !== i || (i = new Q(e.toX, e.toY)), fe(n) && fe(i) && (r = B({}, this.options.connectionDefaults), r.dataItem = e, o = new y(n, i, r), this._connectionsDataMap[e.uid] = o, this.addConnection(o, t)))
            },
            _validateConnector: function(e) {
                var t;
                return fe(e) && null !== e && (t = this._dataMap[e]), t
            },
            _treeDataSource: function() {
                var e = this,
                    t = e.options,
                    n = t.dataSource;
                n = pe(n) ? {
                    data: n
                } : n, n.fields || (n.fields = [{
                    field: "text"
                }, {
                    field: "url"
                }, {
                    field: "spriteCssClass"
                }, {
                    field: "imageUrl"
                }]), e.dataSource && e._refreshHandler && e._unbindDataSource(), e._refreshHandler = z(e._refreshSource, e), e._errorHandler = z(e._error, e), e.dataSource = H.create(n).bind(ke, e._refreshHandler).bind(Ee, e._errorHandler)
            },
            _unbindDataSource: function() {
                var e = this;
                e.dataSource.unbind(ke, e._refreshHandler).unbind(Ee, e._errorHandler)
            },
            _adorn: function(e, n) {
                n !== t && e && (n ? (this._adorners.push(e), this.adornerLayer.append(e.visual)) : (oe.remove(this._adorners, e), this.adornerLayer.remove(e.visual)))
            },
            _showConnectors: function(e, t) {
                t ? this._connectorsAdorner.show(e) : this._connectorsAdorner.destroy()
            },
            _updateAdorners: function() {
                var e, t, n = this._adorners;
                for (e = 0; n.length > e; e++) t = n[e], t.refreshBounds && t.refreshBounds(), t.refresh()
            },
            _refresh: function() {
                for (var e = 0; this.connections.length > e; e++) this.connections[e].refresh()
            },
            _destroyToolBar: function() {
                this.singleToolBar && (this.singleToolBar.hide(), this.singleToolBar.destroy(), this.singleToolBar = null)
            },
            _destroyGlobalToolBar: function() {
                this.toolBar && (this.toolBar.hide(), this.toolBar.destroy(), this.toolBar = null)
            },
            exportDOMVisual: function() {
                var e = this.canvas._viewBox,
                    t = I.transform().translate(-e.x, -e.y),
                    n = new I.Rect([0, 0], [e.width, e.height]),
                    i = F.Path.fromRect(n),
                    r = new F.Group({
                        transform: t
                    }),
                    o = new F.Group({
                        clip: i
                    }),
                    a = this.canvas.drawingElement.children[0];
                return o.append(r),
                    r.children.push(a), o
            },
            exportVisual: function() {
                var e = I.transform().scale(1 / this._zoom),
                    t = new F.Group({
                        transform: e
                    }),
                    n = this.mainLayer.drawingElement;
                return t.children.push(n), t
            },
            _syncChanges: function() {
                this._syncShapeChanges(), this._syncConnectionChanges()
            },
            _syncShapeChanges: function() {
                this.dataSource && this._isEditable && this.dataSource.sync()
            },
            _syncConnectionChanges: function() {
                var t = this;
                t.connectionsDataSource && t._isEditable && (e.when.apply(e, t._deferredConnectionUpdates).then(function() {
                    t.connectionsDataSource.sync()
                }), t.deferredConnectionUpdates = [])
            }
        }), E.ExportMixin.extend(k.fn, !0), kendo.PDFMixin && kendo.PDFMixin.extend(k.fn), x = kendo.Observable.extend({
            init: function(e, t) {
                kendo.Observable.fn.init.call(this), this.diagram = e, this.options = B({}, this.options, t), this._tools = [], this.createToolBar(), this.createTools(), this.appendTools(), this.options.modal && this.createPopup(), this.bind(this.events, t)
            },
            events: ["click"],
            createPopup: function() {
                this.container = e("<div/>").append(this.element), this._popup = this.container.kendoPopup({}).getKendoPopup()
            },
            appendTools: function() {
                var e, t;
                for (e = 0; this._tools.length > e; e++) t = this._tools[e], (t.buttons && t.buttons.length || !fe(t.buttons)) && this._toolBar.add(t)
            },
            createToolBar: function() {
                this.element = e("<div/>"), this._toolBar = this.element.kendoToolBar({
                    click: z(this.click, this),
                    resizable: !1
                }).getKendoToolBar(), this.element.css("border", "none")
            },
            createTools: function() {
                for (var e = 0; this.options.tools.length > e; e++) this.createTool(this.options.tools[e])
            },
            createTool: function(e) {
                ve(e) || (e = {
                    name: e
                });
                var t = e.name + "Tool";
                this[t] ? this[t](e) : this._tools.push(B({}, e, {
                    attributes: this._setAttributes({
                        action: e.name
                    })
                }))
            },
            showAt: function(e) {
                this._popup && this._popup.open(e.x, e.y)
            },
            hide: function() {
                this._popup && this._popup.close()
            },
            newGroup: function() {
                return {
                    type: "buttonGroup",
                    buttons: []
                }
            },
            editTool: function() {
                this._tools.push({
                    spriteCssClass: "k-icon k-i-pencil",
                    showText: "overflow",
                    type: "button",
                    text: "Edit",
                    attributes: this._setAttributes({
                        action: "edit"
                    })
                })
            },
            deleteTool: function() {
                this._tools.push({
                    spriteCssClass: "k-icon k-i-close",
                    showText: "overflow",
                    type: "button",
                    text: "Delete",
                    attributes: this._setAttributes({
                        action: "delete"
                    })
                })
            },
            rotateAnticlockwiseTool: function(e) {
                this._appendGroup("rotate"), this._rotateGroup.buttons.push({
                    spriteCssClass: "k-icon k-i-rotateccw",
                    showText: "overflow",
                    text: "RotateAnticlockwise",
                    group: "rotate",
                    attributes: this._setAttributes({
                        action: "rotateAnticlockwise",
                        step: e.step
                    })
                })
            },
            rotateClockwiseTool: function(e) {
                this._appendGroup("rotate"), this._rotateGroup.buttons.push({
                    spriteCssClass: "k-icon k-i-rotatecw",
                    attributes: this._setAttributes({
                        action: "rotateClockwise",
                        step: e.step
                    }),
                    showText: "overflow",
                    text: "RotateClockwise",
                    group: "rotate"
                })
            },
            createShapeTool: function() {
                this._appendGroup("create"), this._createGroup.buttons.push({
                    spriteCssClass: "k-icon k-i-shape",
                    showText: "overflow",
                    text: "CreateShape",
                    group: "create",
                    attributes: this._setAttributes({
                        action: "createShape"
                    })
                })
            },
            createConnectionTool: function() {
                this._appendGroup("create"), this._createGroup.buttons.push({
                    spriteCssClass: "k-icon k-i-connector",
                    showText: "overflow",
                    text: "CreateConnection",
                    group: "create",
                    attributes: this._setAttributes({
                        action: "createConnection"
                    })
                })
            },
            undoTool: function() {
                this._appendGroup("history"), this._historyGroup.buttons.push({
                    spriteCssClass: "k-icon k-i-undo",
                    showText: "overflow",
                    text: "Undo",
                    group: "history",
                    attributes: this._setAttributes({
                        action: "undo"
                    })
                })
            },
            redoTool: function() {
                this._appendGroup("history"), this._historyGroup.buttons.push({
                    spriteCssClass: "k-icon k-i-redo",
                    showText: "overflow",
                    text: "Redo",
                    group: "history",
                    attributes: this._setAttributes({
                        action: "redo"
                    })
                })
            },
            _appendGroup: function(e) {
                var t = "_" + e + "Group";
                this[t] || (this[t] = this.newGroup(), this._tools.push(this[t]))
            },
            _setAttributes: function(e) {
                var t = {};
                return e.action && (t[kendo.attr("action")] = e.action), e.step && (t[kendo.attr("step")] = e.step), t
            },
            _getAttributes: function(e) {
                var t, n = {},
                    i = e.attr(kendo.attr("action"));
                return i && (n.action = i), t = e.attr(kendo.attr("step")), t && (n.step = t), n
            },
            click: function(t) {
                var n = this._getAttributes(e(t.target)),
                    i = n.action;
                i && this[i] && this[i](n), this.trigger("click", this.eventData(i, t.target))
            },
            eventData: function(e, t) {
                var n, i, r = this.selectedElements(),
                    o = r.length,
                    a = [],
                    s = [];
                for (i = 0; o > i; i++) n = r[i], n instanceof w ? a.push(n) : s.push(n);
                return {
                    shapes: a,
                    connections: s,
                    action: e,
                    target: t
                }
            },
            "delete": function() {
                var e = this.diagram,
                    t = e._triggerRemove(this.selectedElements());
                t.length && (this.diagram.remove(t, !0), this.diagram._syncChanges())
            },
            edit: function() {
                this.diagram.edit(this.selectedElements()[0])
            },
            rotateClockwise: function(e) {
                var t = parseFloat(e.step || 90);
                this._rotate(t)
            },
            rotateAnticlockwise: function(e) {
                var t = parseFloat(e.step || 90);
                this._rotate(-t)
            },
            _rotate: function(e) {
                var t = this.diagram._resizingAdorner;
                t.angle(t.angle() + e), t.rotate()
            },
            selectedElements: function() {
                return this.diagram.select()
            },
            createShape: function() {
                this.diagram.createShape()
            },
            createConnection: function() {
                this.diagram.createConnection()
            },
            undo: function() {
                this.diagram.undo()
            },
            redo: function() {
                this.diagram.redo()
            },
            destroy: function() {
                this.diagram = null, this.element = null, this.options = null, this._toolBar && this._toolBar.destroy(), this._popup && this._popup.destroy()
            }
        }), C = kendo.Observable.extend({
            init: function(e, t) {
                kendo.Observable.fn.init.call(this), this.options = L(!0, {}, this.options, t), this.element = e, this.model = this.options.model, this.fields = this._getFields(), this._initContainer(), this.createEditable()
            },
            options: {
                editors: {}
            },
            _initContainer: function() {
                this.wrapper = this.element
            },
            createEditable: function() {
                var e = this.options;
                this.editable = new kendo.ui.Editable(this.wrapper, {
                    fields: this.fields,
                    target: e.target,
                    clearContainer: !1,
                    model: this.model
                })
            },
            _isEditable: function(e) {
                return this.model.editable && this.model.editable(e)
            },
            _getFields: function() {
                var e, t, n, i = [],
                    r = this.model.fields;
                for (e in r) t = {}, this._isEditable(e) && (n = this.options.editors[e], n && (t.editor = n), t.field = e, i.push(t));
                return i
            },
            end: function() {
                return this.editable.end()
            },
            destroy: function() {
                this.editable.destroy(), this.editable.element.find("[" + kendo.attr("container-for") + "]").empty(), this.model = this.wrapper = this.element = this.columns = this.editable = null
            }
        }), S = C.extend({
            init: function(e, t) {
                C.fn.init.call(this, e, t), this.bind(this.events, this.options), this.open()
            },
            events: ["update", "cancel"],
            options: {
                window: {
                    modal: !0,
                    resizable: !1,
                    draggable: !0,
                    title: "Edit",
                    visible: !1
                }
            },
            _initContainer: function() {
                var t, n = this;
                this.wrapper = e('<div class="k-popup-edit-form"/>').attr(kendo.attr("uid"), this.model.uid), t = "", this.options.template ? (t += this._renderTemplate(), this.fields = []) : t += this._renderFields(), t += this._renderButtons(), this.wrapper.append(e('<div class="k-edit-form-container"/>').append(t)), this.window = new kendo.ui.Window(this.wrapper.appendTo(this.element), this.options.window), this.window.bind("close", function(e) {
                    e.userTriggered && (e.sender.element.focus(), n._cancelClick(e))
                }), this._attachButtonEvents()
            },
            _renderTemplate: function() {
                var e = this.options.template;
                return "string" == typeof e && (e = window.unescape(e)), e = kendo.template(e)(this.model)
            },
            _renderFields: function() {
                var e, t, n = "";
                for (e = 0; this.fields.length > e; e++) t = this.fields[e], n += '<div class="k-edit-label"><label for="' + t.field + '">' + (t.field || "") + "</label></div>", this._isEditable(t.field) && (n += "<div " + kendo.attr("container-for") + '="' + t.field + '" class="k-edit-field"></div>');
                return n
            },
            _renderButtons: function() {
                var e = '<div class="k-edit-buttons k-state-default">';
                return e += this._createButton("update"), e += this._createButton("cancel"), e += "</div>"
            },
            _createButton: function(e) {
                return kendo.template(dt)(v[e])
            },
            _attachButtonEvents: function() {
                this._cancelClickHandler = z(this._cancelClick, this), this.window.element.on(xe + be, "a.k-diagram-cancel", this._cancelClickHandler), this._updateClickHandler = z(this._updateClick, this), this.window.element.on(xe + be, "a.k-diagram-update", this._updateClickHandler)
            },
            _updateClick: function(e) {
                e.preventDefault(), this.trigger("update")
            },
            _cancelClick: function(e) {
                e.preventDefault(), this.trigger("cancel")
            },
            open: function() {
                this.window.center().open()
            },
            close: function() {
                this.window.bind("deactivate", z(this.destroy, this)).close()
            },
            destroy: function() {
                this.window.close().destroy(), this.window.element.off(xe + be, "a.k-diagram-cancel", this._cancelClickHandler), this.window.element.off(xe + be, "a.k-diagram-update", this._updateClickHandler), this._cancelClickHandler = null, this._editUpdateClickHandler = null, this.window = null, C.fn.destroy.call(this)
            }
        }), c.fn = c.prototype = {
            onActivate: function(t) {
                var n = e.Deferred();
                return this.callbacks.push({
                    callback: t,
                    deferred: n
                }), n
            },
            activate: function() {
                var e, t, n = this.callbacks;
                for (t = 0; n.length > t; t++) e = this.callbacks[t], e.callback(this.dataItem), e.deferred.resolve();
                this.callbacks = []
            }
        }, d.fn = d.prototype = {
            add: function(e) {
                for (var t = 0; e.length > t; t++) this.items[e[t].uid] = new c(e[t])
            },
            forEach: function(e) {
                for (var t in this.items) e(this.items[t])
            },
            getByUid: function(e) {
                return this.items[e]
            },
            remove: function(e) {
                delete this.items[e.uid]
            }
        }, T = P.extend({
            init: function() {
                this.shapes = []
            },
            _add: function(e, t) {
                this.shapes.push({
                    bounds: t,
                    shape: e
                }), e._quadNode = this
            },
            insert: function(e, t) {
                this._add(e, t)
            },
            remove: function(e) {
                var t, n = this.shapes,
                    i = n.length;
                for (t = 0; i > t; t++)
                    if (n[t].shape === e) {
                        n.splice(t, 1);
                        break
                    }
            },
            hitTestRect: function(e) {
                var t, n = this.shapes,
                    i = n.length;
                for (t = 0; i > t; t++)
                    if (this._testRect(n[t].shape, e)) return !0
            },
            _testRect: function(e, t) {
                var n, i = e.rotate().angle,
                    r = e.bounds();
                return n = i ? X.rects(t, r, -i) : r.overlaps(t)
            }
        }), D = T.extend({
            init: function(e) {
                T.fn.init.call(this), this.children = [], this.rect = e
            },
            inBounds: function(e) {
                var t = this.rect,
                    n = t.bottomRight(),
                    i = e.bottomRight(),
                    r = e.x >= t.x && e.y >= t.y && n.x >= i.x && n.y >= i.y;
                return r
            },
            overlapsBounds: function(e) {
                return this.rect.overlaps(e)
            },
            insert: function(e, t) {
                var n, i = !1,
                    r = this.children,
                    o = r.length;
                if (this.inBounds(t)) {
                    if (!o && 4 > this.shapes.length) this._add(e, t);
                    else {
                        for (o || this._initChildren(), n = 0; r.length > n; n++)
                            if (r[n].insert(e, t)) {
                                i = !0;
                                break
                            } i || this._add(e, t)
                    }
                    i = !0
                }
                return i
            },
            _initChildren: function() {
                var e, t, n = this.rect,
                    i = this.children,
                    r = this.shapes,
                    o = n.center(),
                    a = n.width / 2,
                    s = n.height / 2;
                for (i.push(new D(new j(n.x, n.y, a, s)), new D(new j(o.x, n.y, a, s)), new D(new j(n.x, o.y, a, s)), new D(new j(o.x, o.y, a, s))), t = r.length - 1; t >= 0; t--)
                    for (e = 0; i.length > e; e++)
                        if (i[e].insert(r[t].shape, r[t].bounds)) {
                            r.splice(t, 1);
                            break
                        }
            },
            hitTestRect: function(e) {
                var t, n = this.children,
                    i = n.length,
                    r = !1;
                if (this.overlapsBounds(e))
                    if (T.fn.hitTestRect.call(this, e)) r = !0;
                    else
                        for (t = 0; i > t; t++)
                            if (n[t].hitTestRect(e)) {
                                r = !0;
                                break
                            } return r
            }
        }), A = P.extend({
            ROOT_SIZE: 1e3,
            init: function(e) {
                var t = z(this._boundsChange, this);
                e.bind(ye, t), e.bind(Le, t), this.initRoots()
            },
            initRoots: function() {
                this.rootMap = {}, this.root = new T
            },
            clear: function() {
                this.initRoots()
            },
            _boundsChange: function(e) {
                e.item._quadNode && e.item._quadNode.remove(e.item), this.insert(e.item)
            },
            insert: function(e) {
                var t = e.bounds(tt),
                    n = this.ROOT_SIZE,
                    i = this.getSectors(t),
                    r = i[0][0],
                    o = i[1][0];
                this.inRoot(i) ? this.root.insert(e, t) : (this.rootMap[r] || (this.rootMap[r] = {}), this.rootMap[r][o] || (this.rootMap[r][o] = new D(new j(r * n, o * n, n, n))), this.rootMap[r][o].insert(e, t))
            },
            remove: function(e) {
                e._quadNode && e._quadNode.remove(e)
            },
            inRoot: function(e) {
                return e[0].length > 1 || e[1].length > 1
            },
            getSectors: function(e) {
                var t, n, i = this.ROOT_SIZE,
                    r = e.bottomRight(),
                    o = _e.floor(r.x / i),
                    a = _e.floor(r.y / i),
                    s = [
                        [],
                        []
                    ];
                for (t = _e.floor(e.x / i); o >= t; t++) s[0].push(t);
                for (n = _e.floor(e.y / i); a >= n; n++) s[1].push(n);
                return s
            },
            hitTestRect: function(e) {
                var t, n, i, r, o, a = this.getSectors(e);
                if (this.root.hitTestRect(e)) return !0;
                for (t = 0; a[0].length > t; t++)
                    for (i = a[0][t], n = 0; a[1].length > n; n++)
                        if (r = a[1][n], o = (this.rootMap[i] || {})[r], o && o.hitTestRect(e)) return !0;
                return !1
            }
        }), E.ui.plugin(k), B(M, {
            Shape: w,
            Connection: y,
            Connector: b,
            DiagramToolBar: x,
            QuadNode: D,
            QuadRoot: T,
            ShapesQuadTree: A,
            PopupEditor: S
        })
    }(window.kendo.jQuery)
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.diagram.min", ["kendo.data.min", "kendo.draganddrop.min", "kendo.userevents.min", "kendo.mobile.scroller.min", "kendo.drawing.min", "dataviz/diagram/utils.min", "dataviz/diagram/math.min", "dataviz/diagram/svg.min", "dataviz/diagram/services.min", "dataviz/diagram/layout.min", "dataviz/diagram/dom.min"], e)
}(function() {}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.treemap.min", ["kendo.data.min", "kendo.userevents.min", "kendo.dataviz.themes.min"], e)
}(function() {
    return function(e, t) {
        function n(e, t) {
            if (null === t) return t;
            var n = k(e, !0);
            return n(t)
        }

        function i(e) {
            return typeof e !== I
        }

        function r(e, t, n) {
            var i, r, l = s(e),
                c = s(t),
                d = u(e) - u(t) < 0,
                h = [];
            for (h.push(e), i = 0; n > i; i++) r = {
                r: o(l.r, c.r, i, n, d),
                g: o(l.g, c.g, i, n, d),
                b: o(l.b, c.b, i, n, d)
            }, h.push(a(r));
            return h.push(t), h
        }

        function o(e, t, n, i, r) {
            var o, a = f.min(f.abs(e), f.abs(t)),
                s = f.max(f.abs(e), f.abs(t)),
                l = (s - a) / (i + 1),
                c = l * (n + 1);
            return o = r ? a + c : s - c
        }

        function a(e) {
            return "#" + l(e.r) + l(e.g) + l(e.b)
        }

        function s(e) {
            e = e.replace("#", "");
            var t = c(e);
            return {
                r: d(t.r),
                g: d(t.g),
                b: d(t.b)
            }
        }

        function l(e) {
            var t = f.round(e).toString(16).toUpperCase();
            return 1 === t.length && (t = "0" + t), t
        }

        function c(e) {
            var t = e.length,
                n = {};
            return 3 === t ? (n.r = e[0], n.g = e[1], n.b = e[2]) : (n.r = e.substring(0, 2), n.g = e.substring(2, 4), n.b = e.substring(4, 6)), n
        }

        function d(e) {
            return parseInt(e.toString(16), 16)
        }

        function u(e) {
            var t = 0;
            return e && (e = s(e), t = f.sqrt(.241 * e.r * e.r + .691 * e.g * e.g + .068 * e.b * e.b)), t
        }

        function h(e) {
            var t = f.pow(10, 4);
            return f.round(e * t) / t
        }
        var f = Math,
            p = e.proxy,
            m = e.isArray,
            g = window.kendo,
            v = g.Class,
            _ = g.ui.Widget,
            b = g.template,
            w = g.deepExtend,
            y = g.data.HierarchicalDataSource,
            k = g.getter,
            x = g.dataviz,
            C = ".kendoTreeMap",
            S = "change",
            T = "dataBound",
            D = "itemCreated",
            A = Number.MAX_VALUE,
            E = "mouseover" + C,
            F = "mouseleave" + C,
            I = "undefined",
            M = _.extend({
                init: function(t, n) {
                    g.destroy(t), e(t).empty(), _.fn.init.call(this, t, n), this.wrapper = this.element, this._initTheme(this.options), this.element.addClass("k-widget k-treemap"), this._setLayout(), this._originalOptions = w({}, this.options), this._initDataSource(), this._attachEvents(), g.notify(this, x.ui)
                },
                options: {
                    name: "TreeMap",
                    theme: "default",
                    autoBind: !0,
                    textField: "text",
                    valueField: "value",
                    colorField: "color"
                },
                events: [T, D],
                _initTheme: function(e) {
                    var t = this,
                        n = x.ui.themes || {},
                        i = ((e || {}).theme || "").toLowerCase(),
                        r = (n[i] || {}).treeMap;
                    t.options = w({}, r, e)
                },
                _attachEvents: function() {
                    this.element.on(E, p(this._mouseover, this)).on(F, p(this._mouseleave, this)), this._resizeHandler = p(this.resize, this, !1), g.onResize(this._resizeHandler)
                },
                _setLayout: function() {
                    "horizontal" === this.options.type ? (this._layout = new z(!1), this._view = new B(this, this.options)) : "vertical" === this.options.type ? (this._layout = new z(!0), this._view = new B(this, this.options)) : (this._layout = new R, this._view = new P(this, this.options))
                },
                _initDataSource: function() {
                    var e = this,
                        t = e.options,
                        n = t.dataSource;
                    e._dataChangeHandler = p(e._onDataChange, e), e.dataSource = y.create(n).bind(S, e._dataChangeHandler), n && e.options.autoBind && e.dataSource.fetch()
                },
                setDataSource: function(e) {
                    var t = this;
                    t.dataSource.unbind(S, t._dataChangeHandler), t.dataSource = e.bind(S, t._dataChangeHandler), e && t.options.autoBind && t.dataSource.fetch()
                },
                _onDataChange: function(e) {
                    var t, n, i, r, o = e.node,
                        a = e.items,
                        s = this.options;
                    if (o) {
                        if (a.length) {
                            for (i = this._getByUid(o.uid), i.children = [], a = new g.data.Query(a)._sortForGrouping(s.valueField, "desc"), n = 0; a.length > n; n++) t = a[n], i.children.push(this._wrapItem(t));
                            r = this._view.htmlSize(i), this._layout.compute(i.children, i.coord, r), this._setColors(i.children), this._view.render(i)
                        }
                    } else this._cleanItems(), this.element.empty(), t = this._wrapItem(a[0]), this._layout.createRoot(t, this.element.outerWidth(), this.element.outerHeight(), "vertical" === this.options.type), this._view.createRoot(t), this._root = t, this._colorIdx = 0;
                    for (n = 0; a.length > n; n++) a[n].load();
                    o && this.trigger(T, {
                        node: o
                    })
                },
                _cleanItems: function() {
                    var e = this;
                    e.angular("cleanup", function() {
                        return {
                            elements: e.element.find(".k-leaf div,.k-treemap-title,.k-treemap-title-vertical")
                        }
                    })
                },
                _setColors: function(e) {
                    var t, n, o, a, s = this.options.colors,
                        l = this._colorIdx,
                        c = s[l % s.length];
                    for (m(c) && (t = r(c[0], c[1], e.length)), o = !1, a = 0; e.length > a; a++) n = e[a], i(n.color) || (n.color = t ? t[a] : c), n.dataItem.hasChildren || (o = !0);
                    o && this._colorIdx++
                },
                _contentSize: function(e) {
                    this.view.renderHeight(e)
                },
                _wrapItem: function(e) {
                    var t = {};
                    return i(this.options.valueField) && (t.value = n(this.options.valueField, e)), i(this.options.colorField) && (t.color = n(this.options.colorField, e)), i(this.options.textField) && (t.text = n(this.options.textField, e)), t.level = e.level(), t.dataItem = e, t
                },
                _getByUid: function(e) {
                    for (var t, n = [this._root]; n.length;) {
                        if (t = n.pop(), t.dataItem.uid === e) return t;
                        t.children && (n = n.concat(t.children))
                    }
                },
                dataItem: function(t) {
                    var n = e(t).attr(g.attr("uid")),
                        i = this.dataSource;
                    return i && i.getByUid(n)
                },
                findByUid: function(e) {
                    return this.element.find(".k-treemap-tile[" + g.attr("uid") + "='" + e + "']")
                },
                _mouseover: function(t) {
                    var n = e(t.target);
                    n.hasClass("k-leaf") && (this._removeActiveState(), n.removeClass("k-state-hover").addClass("k-state-hover"))
                },
                _removeActiveState: function() {
                    this.element.find(".k-state-hover").removeClass("k-state-hover")
                },
                _mouseleave: function() {
                    this._removeActiveState()
                },
                destroy: function() {
                    _.fn.destroy.call(this), this.element.off(C), this.dataSource && this.dataSource.unbind(S, this._dataChangeHandler), this._root = null, g.unbindResize(this._resizeHandler), g.destroy(this.element)
                },
                items: function() {
                    return e()
                },
                getSize: function() {
                    return g.dimensions(this.element)
                },
                _resize: function() {
                    var e, t, n = this._root;
                    n && (e = this.element, t = e.children(), n.coord.width = e.outerWidth(), n.coord.height = e.outerHeight(), t.css({
                        width: n.coord.width,
                        height: n.coord.height
                    }), this._resizeItems(n, t))
                },
                _resizeItems: function(e, t) {
                    var n, i, r, o;
                    if (e.children && e.children.length)
                        for (n = t.children(".k-treemap-wrap").children(), this._layout.compute(e.children, e.coord, {
                            text: this._view.titleSize(e, t)
                        }), o = 0; e.children.length > o; o++) i = e.children[o], r = n.filter("[" + g.attr("uid") + "='" + i.dataItem.uid + "']"), this._view.setItemSize(i, r), this._resizeItems(i, r)
                },
                setOptions: function(e) {
                    var n = e.dataSource;
                    e.dataSource = t, this._originalOptions = w(this._originalOptions, e), this.options = w({}, this._originalOptions), this._setLayout(), this._initTheme(this.options), _.fn._setEvents.call(this, e), n && this.setDataSource(y.create(n)), this.options.autoBind && this.dataSource.fetch()
                }
            }),
            R = v.extend({
                createRoot: function(e, t, n) {
                    e.coord = {
                        width: t,
                        height: n,
                        top: 0,
                        left: 0
                    }
                },
                leaf: function(e) {
                    return !e.children
                },
                layoutChildren: function(e, t) {
                    var n, i, r, o, a = t.width * t.height,
                        s = 0,
                        l = [];
                    for (n = 0; e.length > n; n++) l[n] = parseFloat(e[n].value), s += l[n];
                    for (n = 0; l.length > n; n++) e[n].area = a * l[n] / s;
                    i = this.layoutHorizontal() ? t.height : t.width, r = [e[0]], o = e.slice(1), this.squarify(o, r, i, t)
                },
                squarify: function(e, t, n, i) {
                    this.computeDim(e, t, n, i)
                },
                computeDim: function(e, n, i, r) {
                    var o, a, s;
                    return e.length + n.length == 1 ? (o = 1 == e.length ? e : n, this.layoutLast(o, i, r), t) : (e.length >= 2 && 0 === n.length && (n = [e[0]], e = e.slice(1)), 0 === e.length ? (n.length > 0 && this.layoutRow(n, i, r), t) : (a = e[0], this.worstAspectRatio(n, i) >= this.worstAspectRatio([a].concat(n), i) ? this.computeDim(e.slice(1), n.concat([a]), i, r) : (s = this.layoutRow(n, i, r), this.computeDim(e, [], s.dim, s)), t))
                },
                layoutLast: function(e, t, n) {
                    e[0].coord = n
                },
                layoutRow: function(e, t, n) {
                    return this.layoutHorizontal() ? this.layoutV(e, t, n) : this.layoutH(e, t, n)
                },
                orientation: "h",
                layoutVertical: function() {
                    return "v" === this.orientation
                },
                layoutHorizontal: function() {
                    return "h" === this.orientation
                },
                layoutChange: function() {
                    this.orientation = this.layoutVertical() ? "h" : "v"
                },
                worstAspectRatio: function(e, t) {
                    var n, i, r, o, a;
                    if (!e || 0 === e.length) return A;
                    for (n = 0, i = 0, r = A, o = 0; e.length > o; o++) a = e[o].area, n += a, r = a > r ? r : a, i = i > a ? i : a;
                    return f.max(t * t * i / (n * n), n * n / (t * t * r))
                },
                compute: function(e, t, n) {
                    if (t.width >= t.height && this.layoutHorizontal() || this.layoutChange(), e && e.length > 0) {
                        var i = {
                            width: t.width,
                            height: t.height - n.text,
                            top: 0,
                            left: 0
                        };
                        this.layoutChildren(e, i)
                    }
                },
                layoutV: function(e, t, n) {
                    var i, r, o, a = this._totalArea(e),
                        s = 0;
                    for (t = h(a / t), i = 0; e.length > i; i++) r = h(e[i].area / t), e[i].coord = {
                        height: r,
                        width: t,
                        top: n.top + s,
                        left: n.left
                    }, s += r;
                    return o = {
                        height: n.height,
                        width: n.width - t,
                        top: n.top,
                        left: n.left + t
                    }, o.dim = f.min(o.width, o.height), o.dim != o.height && this.layoutChange(), o
                },
                layoutH: function(e, t, n) {
                    var i, r, o = this._totalArea(e),
                        a = h(o / t),
                        s = n.top,
                        l = 0;
                    for (i = 0; e.length > i; i++) e[i].coord = {
                        height: a,
                        width: h(e[i].area / a),
                        top: s,
                        left: n.left + l
                    }, l += e[i].coord.width;
                    return r = {
                        height: n.height - a,
                        width: n.width,
                        top: n.top + a,
                        left: n.left
                    }, r.dim = f.min(r.width, r.height), r.dim != r.width && this.layoutChange(), r
                },
                _totalArea: function(e) {
                    var t, n = 0;
                    for (t = 0; e.length > t; t++) n += e[t].area;
                    return n
                }
            }),
            P = v.extend({
                init: function(t, n) {
                    this.options = w({}, this.options, n), this.treeMap = t, this.element = e(t.element), this.offset = 0
                },
                titleSize: function(e, t) {
                    var n = t.children(".k-treemap-title");
                    return n.height()
                },
                htmlSize: function(e) {
                    var t, n, i = this._getByUid(e.dataItem.uid),
                        r = {
                            text: 0
                        };
                    return e.children && (this._clean(i), t = this._getText(e), t && (n = this._createTitle(e), i.append(n), this._compile(n, e.dataItem), r.text = n.height()), i.append(this._createWrap()), this.offset = (i.outerWidth() - i.innerWidth()) / 2), r
                },
                _compile: function(e, t) {
                    this.treeMap.angular("compile", function() {
                        return {
                            elements: e,
                            data: [{
                                dataItem: t
                            }]
                        }
                    })
                },
                _getByUid: function(e) {
                    return this.element.find(".k-treemap-tile[" + g.attr("uid") + "='" + e + "']")
                },
                render: function(e) {
                    var t, n, i, r, o = this._getByUid(e.dataItem.uid),
                        a = e.children;
                    if (a)
                        for (t = o.find(".k-treemap-wrap"), n = 0; a.length > n; n++) i = a[n], r = this._createLeaf(i), t.append(r), this._compile(r.children(), i.dataItem), this.treeMap.trigger(D, {
                            element: r
                        })
                },
                createRoot: function(e) {
                    var t = this._createLeaf(e);
                    this.element.append(t), this._compile(t.children(), e.dataItem), this.treeMap.trigger(D, {
                        element: t
                    })
                },
                _clean: function(e) {
                    this.treeMap.angular("cleanup", function() {
                        return {
                            elements: e.children(":not(.k-treemap-wrap)")
                        }
                    }), e.css("background-color", ""), e.removeClass("k-leaf"), e.removeClass("k-inverse"), e.empty()
                },
                _createLeaf: function(t) {
                    return this._createTile(t).css("background-color", t.color).addClass("k-leaf").toggleClass("k-inverse", this._tileColorBrightness(t) > 180).append(e("<div></div>").html(this._getText(t)))
                },
                _createTile: function(t) {
                    var n = e("<div class='k-treemap-tile'></div>");
                    return this.setItemSize(t, n), i(t.dataItem) && i(t.dataItem.uid) && n.attr(g.attr("uid"), t.dataItem.uid), n
                },
                _itemCoordinates: function(e) {
                    var t = {
                        width: e.coord.width,
                        height: e.coord.height,
                        left: e.coord.left,
                        top: e.coord.top
                    };
                    return t.width += t.left && this.offset ? 2 * this.offset : this.offset, t.height += t.top ? 2 * this.offset : this.offset, t
                },
                setItemSize: function(e, t) {
                    var n = this._itemCoordinates(e);
                    t.css({
                        width: n.width,
                        height: n.height,
                        left: n.left,
                        top: n.top
                    })
                },
                _getText: function(e) {
                    var t = e.text;
                    return this.options.template && (t = this._renderTemplate(e)), t
                },
                _renderTemplate: function(e) {
                    var t = b(this.options.template);
                    return t({
                        dataItem: e.dataItem,
                        text: e.text
                    })
                },
                _createTitle: function(t) {
                    return e("<div class='k-treemap-title'></div>").append(e("<div></div>").html(this._getText(t)))
                },
                _createWrap: function() {
                    return e("<div class='k-treemap-wrap'></div>")
                },
                _tileColorBrightness: function(e) {
                    return u(e.color)
                }
            }),
            z = v.extend({
                createRoot: function(e, t, n, i) {
                    e.coord = {
                        width: t,
                        height: n,
                        top: 0,
                        left: 0
                    }, e.vertical = i
                },
                init: function(e) {
                    this.vertical = e, this.quotient = e ? 1 : 0
                },
                compute: function(e, t, n) {
                    var i, r, o;
                    e.length > 0 && (i = t.width, r = t.height, this.vertical ? r -= n.text : i -= n.text, o = {
                        width: i,
                        height: r,
                        top: 0,
                        left: 0
                    }, this.layoutChildren(e, o))
                },
                layoutChildren: function(e, t) {
                    var n, i, r = t.width * t.height,
                        o = 0,
                        a = [];
                    for (n = 0; e.length > n; n++) i = e[n], a[n] = parseFloat(e[n].value), o += a[n], i.vertical = this.vertical;
                    for (n = 0; a.length > n; n++) e[n].area = r * a[n] / o;
                    this.sliceAndDice(e, t)
                },
                sliceAndDice: function(e, t) {
                    var n = this._totalArea(e);
                    e[0].level % 2 === this.quotient ? this.layoutHorizontal(e, t, n) : this.layoutVertical(e, t, n)
                },
                layoutHorizontal: function(e, t, n) {
                    var i, r, o, a = 0;
                    for (i = 0; e.length > i; i++) r = e[i], o = r.area / (n / t.width), r.coord = {
                        height: t.height,
                        width: o,
                        top: t.top,
                        left: t.left + a
                    }, a += o
                },
                layoutVertical: function(e, t, n) {
                    var i, r, o, a = 0;
                    for (i = 0; e.length > i; i++) r = e[i], o = r.area / (n / t.height), r.coord = {
                        height: o,
                        width: t.width,
                        top: t.top + a,
                        left: t.left
                    }, a += o
                },
                _totalArea: function(e) {
                    var t, n = 0;
                    for (t = 0; e.length > t; t++) n += e[t].area;
                    return n
                }
            }),
            B = P.extend({
                htmlSize: function(e) {
                    var t, n, i = this._getByUid(e.dataItem.uid),
                        r = {
                            text: 0,
                            offset: 0
                        };
                    return e.children && (this._clean(i), t = this._getText(e), t && (n = this._createTitle(e), i.append(n), this._compile(n, e.dataItem), r.text = e.vertical ? n.height() : n.width()), i.append(this._createWrap()), this.offset = (i.outerWidth() - i.innerWidth()) / 2), r
                },
                titleSize: function(e, t) {
                    var n;
                    return n = e.vertical ? t.children(".k-treemap-title").height() : t.children(".k-treemap-title-vertical").width()
                },
                _createTitle: function(t) {
                    var n;
                    return n = e(t.vertical ? "<div class='k-treemap-title'></div>" : "<div class='k-treemap-title-vertical'></div>"), n.append(e("<div></div>").html(this._getText(t)))
                }
            });
        x.ui.plugin(M)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.dataviz.min", ["kendo.core.min", "kendo.fx.min", "kendo.router.min", "kendo.view.min", "kendo.data.odata.min", "kendo.data.xml.min", "kendo.data.min", "kendo.data.signalr.min", "kendo.binder.min", "kendo.userevents.min", "kendo.draganddrop.min", "kendo.mobile.scroller.min", "kendo.popup.min", "kendo.tooltip.min", "kendo.drawing.min", "kendo.dataviz.core.min", "kendo.dataviz.themes.min", "kendo.dataviz.chart.min", "kendo.dataviz.chart.polar.min", "kendo.dataviz.chart.funnel.min", "kendo.dataviz.gauge.min", "kendo.dataviz.barcode.min", "kendo.dataviz.qrcode.min", "kendo.dataviz.stock.min", "kendo.dataviz.sparkline.min", "kendo.dataviz.map.min", "kendo.dataviz.diagram.min", "kendo.dataviz.treemap.min", "kendo.angular.min", "kendo.webcomponents.min", "kendo.angular2.min"], e)
}(function() {
    "bundle all";
    return window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.mobile.modalview.min", ["kendo.mobile.shim.min", "kendo.mobile.view.min"], e)
}(function() {
    return function(e, t) {
        var n = window.kendo,
            i = n.mobile.ui,
            r = i.Shim,
            o = i.Widget,
            a = "beforeOpen",
            s = "open",
            l = "close",
            c = "init",
            d = '<div class="km-modalview-wrapper" />',
            u = i.View.extend({
                init: function(e, t) {
                    var n = this;
                    o.fn.init.call(n, e, t), n._id(), n._wrap(), n._shim(), this.options.$angular || (n._layout(), n._scroller(), n._model()), n.element.css("display", ""), n.trigger(c)
                },
                events: [c, a, s, l],
                options: {
                    name: "ModalView",
                    modal: !0,
                    width: null,
                    height: null
                },
                destroy: function() {
                    o.fn.destroy.call(this), this.shim.destroy()
                },
                open: function(t) {
                    var n = this;
                    n.target = e(t), n.shim.show(), n._invokeNgController(), n.trigger("show", {
                        view: n
                    })
                },
                openFor: function(e) {
                    this.trigger(a, {
                        target: e
                    }) || (this.open(e), this.trigger(s, {
                        target: e
                    }))
                },
                close: function() {
                    this.element.is(":visible") && !this.trigger(l) && this.shim.hide()
                },
                _wrap: function() {
                    var e, t, n = this,
                        i = n.element,
                        r = n.options;
                    e = i[0].style.width || "auto", t = i[0].style.height || "auto", i.addClass("km-modalview").wrap(d), n.wrapper = i.parent().css({
                        width: r.width || e || 300,
                        height: r.height || t || 300
                    }).addClass("auto" == t ? " km-auto-height" : ""), i.css({
                        width: "",
                        height: ""
                    })
                },
                _shim: function() {
                    var e = this;
                    e.shim = new r(e.wrapper, {
                        modal: e.options.modal,
                        position: "center center",
                        align: "center center",
                        effect: "fade:in",
                        className: "km-modalview-root",
                        hide: function(t) {
                            e.trigger(l) && t.preventDefault()
                        }
                    })
                }
            });
        i.plugin(u)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.mobile.drawer.min", ["kendo.mobile.view.min", "kendo.userevents.min"], e)
}(function() {
    return function(e, t) {
        var n = window.kendo,
            i = n.mobile,
            r = n.support.mobileOS,
            o = n.effects.Transition,
            a = n.roleSelector,
            s = "x",
            l = i.ui,
            c = !(r.ios && 7 == r.majorVersion && !r.appMode),
            d = "beforeShow",
            u = "init",
            h = "show",
            f = "hide",
            p = "afterHide",
            m = {
                enable: e.noop
            },
            g = l.View.extend({
                init: function(t, r) {
                    var o, s, l, d, h;
                    if (e(t).parent().prepend(t), i.ui.Widget.fn.init.call(this, t, r), this.options.$angular || (this._layout(), this._scroller()), this._model(), o = this.element.closest(a("pane")).data("kendoMobilePane")) this.pane = o, this.pane.bind("viewShow", function(e) {
                        d._viewShow(e)
                    }), this.pane.bind("sameViewRequested", function() {
                        d.hide()
                    }), s = this.userEvents = new n.UserEvents(o.element, {
                        fastTap: !0,
                        filter: a("view splitview"),
                        allowSelection: !0
                    });
                    else {
                        if (this.currentView = m, l = e(this.options.container), !l) throw Error("The drawer needs a container configuration option set.");
                        s = this.userEvents = new n.UserEvents(l, {
                            fastTap: !0,
                            allowSelection: !0
                        }), this._attachTransition(l)
                    }
                    d = this, h = function(e) {
                        d.visible && (d.hide(), e.preventDefault())
                    }, this.options.swipeToOpen && c ? (s.bind("press", function() {
                        d.transition.cancel()
                    }), s.bind("start", function(e) {
                        d._start(e)
                    }), s.bind("move", function(e) {
                        d._update(e)
                    }), s.bind("end", function(e) {
                        d._end(e)
                    }), s.bind("tap", h)) : s.bind("press", h), this.leftPositioned = "left" === this.options.position, this.visible = !1, this.element.hide().addClass("km-drawer").addClass(this.leftPositioned ? "km-left-drawer" : "km-right-drawer"), this.trigger(u)
                },
                options: {
                    name: "Drawer",
                    position: "left",
                    views: [],
                    swipeToOpenViews: [],
                    swipeToOpen: !0,
                    title: "",
                    container: null
                },
                events: [d, f, p, u, h],
                show: function() {
                    this._activate() && this._show()
                },
                hide: function() {
                    this.currentView && (this.currentView.enable(), g.current = null, this._moveViewTo(0), this.trigger(f, {
                        view: this
                    }))
                },
                openFor: function() {
                    this.visible ? this.hide() : this.show()
                },
                destroy: function() {
                    l.View.fn.destroy.call(this), this.userEvents.destroy()
                },
                _activate: function() {
                    if (this.visible) return !0;
                    var e = this._currentViewIncludedIn(this.options.views);
                    return !e || this.trigger(d, {
                        view: this
                    }) ? !1 : (this._setAsCurrent(), this.element.show(), this.trigger(h, {
                        view: this
                    }), this._invokeNgController(), !0)
                },
                _currentViewIncludedIn: function(t) {
                    if (!this.pane || !t.length) return !0;
                    var n = this.pane.view();
                    return e.inArray(n.id.replace("#", ""), t) > -1 || e.inArray(n.element.attr("id"), t) > -1
                },
                _show: function() {
                    this.currentView.enable(!1), this.visible = !0;
                    var e = this.element.width();
                    this.leftPositioned || (e = -e), this._moveViewTo(e)
                },
                _setAsCurrent: function() {
                    g.last !== this && (g.last && g.last.element.hide(), this.element.show()), g.last = this, g.current = this
                },
                _moveViewTo: function(e) {
                    this.userEvents.cancel(), this.transition.moveTo({
                        location: e,
                        duration: 400,
                        ease: o.easeOutExpo
                    })
                },
                _viewShow: function(e) {
                    return this.currentView && this.currentView.enable(), this.currentView === e.view ? (this.hide(), t) : (this.currentView = e.view, this._attachTransition(e.view.element), t)
                },
                _attachTransition: function(e) {
                    var t = this,
                        i = this.movable,
                        r = i && i.x;
                    this.transition && (this.transition.cancel(), this.movable.moveAxis("x", 0)), i = this.movable = new n.ui.Movable(e), this.transition = new o({
                        axis: s,
                        movable: this.movable,
                        onEnd: function() {
                            0 === i[s] && (e[0].style.cssText = "", t.element.hide(), t.trigger(p), t.visible = !1)
                        }
                    }), r && (e.addClass("k-fx-hidden"), n.animationFrame(function() {
                        e.removeClass("k-fx-hidden"), t.movable.moveAxis(s, r), t.hide()
                    }))
                },
                _start: function(e) {
                    var i, r, o, a, s, l = e.sender;
                    return Math.abs(e.x.velocity) < Math.abs(e.y.velocity) || n.triggeredByInput(e.event) || !this._currentViewIncludedIn(this.options.swipeToOpenViews) ? (l.cancel(), t) : (i = this.leftPositioned, r = this.visible, o = i && r || !i && !g.current, a = !i && r || i && !g.current, s = 0 > e.x.velocity, (o && s || a && !s) && this._activate() ? (l.capture(), t) : (l.cancel(), t))
                },
                _update: function(e) {
                    var t, n = this.movable,
                        i = n.x + e.x.delta;
                    t = this.leftPositioned ? Math.min(Math.max(0, i), this.element.width()) : Math.max(Math.min(0, i), -this.element.width()), this.movable.moveAxis(s, t), e.event.preventDefault(), e.event.stopPropagation()
                },
                _end: function(e) {
                    var t, n = e.x.velocity,
                        i = Math.abs(this.movable.x) > this.element.width() / 2,
                        r = .8;
                    t = this.leftPositioned ? n > -r && (n > r || i) : r > n && (-r > n || i), t ? this._show() : this.hide()
                }
            });
        l.plugin(g)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.mobile.splitview.min", ["kendo.mobile.pane.min"], e)
}(function() {
    return function(e, t) {
        var n = window.kendo,
            i = n.mobile.ui,
            r = i.Widget,
            o = "<div class='km-expanded-pane-shim' />",
            a = i.View,
            s = a.extend({
                init: function(t, a) {
                    var s, l, c = this;
                    r.fn.init.call(c, t, a), t = c.element, e.extend(c, a), c._id(), c.options.$angular ? c._overlay() : (c._layout(), c._overlay()), c._style(), l = t.children(c._locate("modalview")), c.options.$angular ? l.each(function(t, i) {
                        n.compileMobileDirective(e(i), a.$angular[0])
                    }) : n.mobile.init(l), c.panes = [], c._paramsHistory = [], c.options.$angular ? (c.element.children(n.directiveSelector("pane")).each(function() {
                        s = n.compileMobileDirective(e(this), a.$angular[0]), c.panes.push(s)
                    }), c.element.children(n.directiveSelector("header footer")).each(function() {
                        n.compileMobileDirective(e(this), a.$angular[0]);
                    })) : c.content.children(n.roleSelector("pane")).each(function() {
                        s = n.initWidget(this, {}, i.roles), c.panes.push(s)
                    }), c.expandedPaneShim = e(o).appendTo(c.element), c._shimUserEvents = new n.UserEvents(c.expandedPaneShim, {
                        fastTap: !0,
                        tap: function() {
                            c.collapsePanes()
                        }
                    })
                },
                _locate: function(e) {
                    return this.options.$angular ? n.directiveSelector(e) : n.roleSelector(e)
                },
                options: {
                    name: "SplitView",
                    style: "horizontal"
                },
                expandPanes: function() {
                    this.element.addClass("km-expanded-splitview")
                },
                collapsePanes: function() {
                    this.element.removeClass("km-expanded-splitview")
                },
                _layout: function() {
                    var e = this,
                        t = e.element;
                    e.transition = n.attrValue(t, "transition"), n.mobile.ui.View.prototype._layout.call(this), n.mobile.init(this.header.add(this.footer)), e.element.addClass("km-splitview"), e.content.addClass("km-split-content")
                },
                _style: function() {
                    var t, n = this.options.style,
                        i = this.element;
                    n && (t = n.split(" "), e.each(t, function() {
                        i.addClass("km-split-" + this)
                    }))
                },
                showStart: function() {
                    var t = this;
                    t.element.css("display", ""), t.inited ? this._invokeNgController() : (t.inited = !0, e.each(t.panes, function() {
                        this.options.initial ? this.navigateToInitial() : this.navigate("")
                    }), t.trigger("init", {
                        view: t
                    })), t.trigger("show", {
                        view: t
                    })
                }
            });
        i.plugin(s)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.mobile.application.min", ["kendo.mobile.pane.min", "kendo.router.min"], e)
}(function() {
    return function(e, t) {
        function n(e, t) {
            var n = [];
            return p && n.push("km-on-" + p.name), n.push(e.skin ? "km-" + e.skin : "ios" == e.name && e.majorVersion > 6 ? "km-ios7" : "km-" + e.name), ("ios" == e.name && 7 > e.majorVersion || "ios" != e.name) && n.push("km-" + e.name + e.majorVersion), n.push("km-" + e.majorVersion), n.push("km-m" + (e.minorVersion ? e.minorVersion[0] : 0)), e.variant && (e.skin && e.skin === e.name || !e.skin || e.setDefaultPlatform === !1) && n.push("km-" + (e.skin ? e.skin : e.name) + "-" + e.variant), e.cordova && n.push("km-cordova"), n.push(e.appMode ? "km-app" : "km-web"), t && t.statusBarStyle && n.push("km-" + t.statusBarStyle + "-status-bar"), n.join(" ")
        }

        function i(t) {
            return "km-wp-" + (t.noVariantSet ? 0 === parseInt(e("<div style='background: Background' />").css("background-color").split(",")[1], 10) ? "dark" : "light" : t.variant + " km-wp-" + t.variant + "-force")
        }

        function r(e) {
            return p.wp ? "-kendo-landscape" == e.css("animation-name") : Math.abs(window.orientation) / 90 == 1
        }

        function o(e) {
            return r(e) ? y : v
        }

        function a(e) {
            e.parent().addBack().css("min-height", window.innerHeight)
        }

        function s() {
            e("meta[name=viewport]").remove(), z.append(x({
                height: ", width=device-width" + (r() ? ", height=" + window.innerHeight + "px" : d.mobileOS.flatVersion >= 600 && 700 > d.mobileOS.flatVersion ? ", height=" + window.innerWidth + "px" : ", height=device-height")
            }))
        }
        var l = window.kendo,
            c = l.mobile,
            d = l.support,
            u = c.ui.Widget,
            h = c.ui.Pane,
            f = "ios7",
            p = d.mobileOS,
            m = "blackberry" == p.device && p.flatVersion >= 600 && 1e3 > p.flatVersion && p.appMode,
            g = .93,
            v = "km-vertical",
            _ = "chrome" === p.browser,
            b = p.ios && p.flatVersion >= 700 && 800 > p.flatVersion && (p.appMode || _),
            w = Math.abs(window.orientation) / 90 == 1,
            y = "km-horizontal",
            k = {
                ios7: {
                    ios: !0,
                    browser: "default",
                    device: "iphone",
                    flatVersion: "700",
                    majorVersion: "7",
                    minorVersion: "0.0",
                    name: "ios",
                    tablet: !1
                },
                ios: {
                    ios: !0,
                    browser: "default",
                    device: "iphone",
                    flatVersion: "612",
                    majorVersion: "6",
                    minorVersion: "1.2",
                    name: "ios",
                    tablet: !1
                },
                android: {
                    android: !0,
                    browser: "default",
                    device: "android",
                    flatVersion: "442",
                    majorVersion: "4",
                    minorVersion: "4.2",
                    name: "android",
                    tablet: !1
                },
                blackberry: {
                    blackberry: !0,
                    browser: "default",
                    device: "blackberry",
                    flatVersion: "710",
                    majorVersion: "7",
                    minorVersion: "1.0",
                    name: "blackberry",
                    tablet: !1
                },
                meego: {
                    meego: !0,
                    browser: "default",
                    device: "meego",
                    flatVersion: "850",
                    majorVersion: "8",
                    minorVersion: "5.0",
                    name: "meego",
                    tablet: !1
                },
                wp: {
                    wp: !0,
                    browser: "default",
                    device: "wp",
                    flatVersion: "800",
                    majorVersion: "8",
                    minorVersion: "0.0",
                    name: "wp",
                    tablet: !1
                }
            },
            x = l.template('<meta content="initial-scale=#: data.scale #, maximum-scale=#: data.scale #, user-scalable=no#=data.height#" name="viewport" />', {
                usedWithBlock: !1
            }),
            C = l.template('<meta name="apple-mobile-web-app-capable" content="#= data.webAppCapable === false ? \'no\' : \'yes\' #" /> <meta name="apple-mobile-web-app-status-bar-style" content="#=data.statusBarStyle#" /> <meta name="msapplication-tap-highlight" content="no" /> ', {
                usedWithBlock: !1
            }),
            S = l.template("<style>.km-view { clip: rect(0 #= data.width #px #= data.height #px 0); }</style>", {
                usedWithBlock: !1
            }),
            T = p.android && "chrome" != p.browser || p.blackberry,
            D = l.template('<link rel="apple-touch-icon' + (p.android ? "-precomposed" : "") + '" # if(data.size) { # sizes="#=data.size#" #}# href="#=data.icon#" />', {
                usedWithBlock: !1
            }),
            A = ("iphone" == p.device || "ipod" == p.device) && 7 > p.majorVersion,
            E = ("iphone" == p.device || "ipod" == p.device) && p.majorVersion >= 7,
            F = E ? "none" : null,
            I = "mobilesafari" == p.browser ? 60 : 0,
            M = 20,
            R = e(window),
            P = window.screen,
            z = e("head"),
            B = "init",
            L = e.proxy,
            H = u.extend({
                init: function(t, n) {
                    c.application = this, e(e.proxy(this, "bootstrap", t, n))
                },
                bootstrap: function(t, n) {
                    var i, r, o;
                    t = e(t), t[0] || (t = e(document.body)), u.fn.init.call(this, t, n), this.element.removeAttr("data-" + l.ns + "role"), this._setupPlatform(), this._attachMeta(), this._setupElementClass(), this._attachHideBarHandlers(), i = e.extend({}, this.options), delete i.name, r = this, o = function() {
                        r.pane = new h(r.element, i), r.pane.navigateToInitial(), r.options.updateDocumentTitle && r._setupDocumentTitle(), r._startHistory(), r.trigger(B)
                    }, this.options.$angular ? setTimeout(o) : o()
                },
                options: {
                    name: "Application",
                    hideAddressBar: !0,
                    browserHistory: !0,
                    historyTransition: F,
                    modelScope: window,
                    statusBarStyle: "black",
                    transition: "",
                    retina: !1,
                    platform: null,
                    skin: null,
                    updateDocumentTitle: !0,
                    useNativeScrolling: !1
                },
                events: [B],
                navigate: function(e, t) {
                    this.pane.navigate(e, t)
                },
                replace: function(e, t) {
                    this.pane.replace(e, t)
                },
                scroller: function() {
                    return this.view().scroller
                },
                hideLoading: function() {
                    if (!this.pane) throw Error("The mobile application instance is not fully instantiated. Please consider activating loading in the application init event handler.");
                    this.pane.hideLoading()
                },
                showLoading: function() {
                    if (!this.pane) throw Error("The mobile application instance is not fully instantiated. Please consider activating loading in the application init event handler.");
                    this.pane.showLoading()
                },
                changeLoadingMessage: function(e) {
                    if (!this.pane) throw Error("The mobile application instance is not fully instantiated. Please consider changing the message in the application init event handler.");
                    this.pane.changeLoadingMessage(e)
                },
                view: function() {
                    return this.pane.view()
                },
                skin: function(e) {
                    var t = this;
                    return arguments.length ? (t.options.skin = e || "", t.element[0].className = "km-pane", t._setupPlatform(), t._setupElementClass(), t.options.skin) : t.options.skin
                },
                destroy: function() {
                    u.fn.destroy.call(this), this.pane.destroy(), this.router.destroy()
                },
                _setupPlatform: function() {
                    var t = this,
                        r = t.options.platform,
                        o = t.options.skin,
                        a = [],
                        s = p || k[f];
                    r && (s.setDefaultPlatform = !0, "string" == typeof r ? (a = r.split("-"), s = e.extend({
                        variant: a[1]
                    }, s, k[a[0]])) : s = r), o && (a = o.split("-"), p || (s.setDefaultPlatform = !1), s = e.extend({}, s, {
                        skin: a[0],
                        variant: a[1]
                    })), s.variant || (s.noVariantSet = !0, s.variant = "dark"), t.os = s, t.osCssClass = n(t.os, t.options), "wp" == s.name && (t.refreshBackgroundColorProxy || (t.refreshBackgroundColorProxy = e.proxy(function() {
                        (t.os.variant && t.os.skin && t.os.skin === t.os.name || !t.os.skin) && t.element.removeClass("km-wp-dark km-wp-light km-wp-dark-force km-wp-light-force").addClass(i(t.os))
                    }, t)), e(document).off("visibilitychange", t.refreshBackgroundColorProxy), e(document).off("resume", t.refreshBackgroundColorProxy), s.skin || (t.element.parent().css("overflow", "hidden"), e(document).on("visibilitychange", t.refreshBackgroundColorProxy), e(document).on("resume", t.refreshBackgroundColorProxy), t.refreshBackgroundColorProxy()))
                },
                _startHistory: function() {
                    this.options.browserHistory ? (this.router = new l.Router({
                        pushState: this.options.pushState,
                        root: this.options.root,
                        hashBang: this.options.hashBang
                    }), this.pane.bindToRouter(this.router), this.router.start()) : this.options.initial || this.pane.navigate("")
                },
                _resizeToScreenHeight: function() {
                    var t, n = e("meta[name=apple-mobile-web-app-status-bar-style]").attr("content").match(/black-translucent|hidden/),
                        i = this.element;
                    t = _ ? window.innerHeight : r(i) ? n ? w ? P.availWidth + M : P.availWidth : w ? P.availWidth : P.availWidth - M : n ? w ? P.availHeight : P.availHeight + M : w ? P.availHeight - M : P.availHeight, i.height(t)
                },
                _setupElementClass: function() {
                    var t, n = this,
                        i = n.element;
                    i.parent().addClass("km-root km-" + (n.os.tablet ? "tablet" : "phone")), i.addClass(n.osCssClass + " " + o(i)), this.options.useNativeScrolling && i.parent().addClass("km-native-scrolling"), _ && i.addClass("km-ios-chrome"), d.wpDevicePixelRatio && i.parent().css("font-size", d.wpDevicePixelRatio + "em"), this.options.retina && (i.parent().addClass("km-retina"), i.parent().css("font-size", d.devicePixelRatio * g + "em")), m && s(), n.options.useNativeScrolling ? i.parent().addClass("km-native-scrolling") : T && (t = (screen.availWidth > screen.availHeight ? screen.availWidth : screen.availHeight) + 200, e(S({
                        width: t,
                        height: t
                    })).appendTo(z)), b && n._resizeToScreenHeight(), l.onResize(function() {
                        i.removeClass("km-horizontal km-vertical").addClass(o(i)), n.options.useNativeScrolling && a(i), b && n._resizeToScreenHeight(), m && s(), l.resize(i)
                    })
                },
                _clearExistingMeta: function() {
                    z.find("meta").filter("[name|='apple-mobile-web-app'],[name|='msapplication-tap'],[name='viewport']").remove()
                },
                _attachMeta: function() {
                    var e, t = this.options,
                        n = t.icon;
                    if (this._clearExistingMeta(), m || z.prepend(x({
                        height: "",
                        scale: this.options.retina ? 1 / d.devicePixelRatio : "1.0"
                    })), z.prepend(C(t)), n) {
                        "string" == typeof n && (n = {
                            "": n
                        });
                        for (e in n) z.prepend(D({
                            icon: n[e],
                            size: e
                        }))
                    }
                    t.useNativeScrolling && a(this.element)
                },
                _attachHideBarHandlers: function() {
                    var e = this,
                        t = L(e, "_hideBar");
                    !d.mobileOS.appMode && e.options.hideAddressBar && A && !e.options.useNativeScrolling && (e._initialHeight = {}, R.on("load", t), l.onResize(function() {
                        setTimeout(window.scrollTo, 0, 0, 1)
                    }))
                },
                _setupDocumentTitle: function() {
                    var e = this,
                        n = document.title;
                    e.pane.bind("viewShow", function(e) {
                        var i = e.view.title;
                        document.title = i !== t ? i : n
                    })
                },
                _hideBar: function() {
                    var t = this,
                        n = t.element;
                    n.height(l.support.transforms.css + "calc(100% + " + I + "px)"), e(window).trigger(l.support.resize)
                }
            });
        l.mobile.Application = H, l.ui.plugin(H, l.mobile, "Mobile")
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.mobile.button.min", ["kendo.userevents.min"], e)
}(function() {
    return function(e, t) {
        function n(t, n, i) {
            e(n.target).closest(".km-button,.km-detail").toggleClass("km-state-active", i), d && t.deactivateTimeoutID && (clearTimeout(t.deactivateTimeoutID), t.deactivateTimeoutID = 0)
        }

        function i(t) {
            return e('<span class="km-badge">' + t + "</span>")
        }
        var r = window.kendo,
            o = r.mobile,
            a = o.ui,
            s = a.Widget,
            l = r.support,
            c = l.mobileOS,
            d = c.android && c.flatVersion >= 300,
            u = "click",
            h = "disabled",
            f = "km-state-disabled",
            p = s.extend({
                init: function(e, t) {
                    var i, o = this;
                    s.fn.init.call(o, e, t), i = "up" === o.options.clickOn, o._wrap(), o._style(), i || o.element.attr("data-navigate-on-press", !0), o.options.enable = o.options.enable && !o.element.attr(h), o.enable(o.options.enable), o._userEvents = new r.UserEvents(o.element, {
                        allowSelection: !i,
                        fastTap: !0,
                        press: function(e) {
                            o._activate(e)
                        },
                        release: function(e) {
                            n(o, e, !1), i || e.event.stopPropagation()
                        }
                    }), o._userEvents.bind(i ? "tap" : "press", function(e) {
                        o._release(e)
                    }), d && o.element.on("move", function(e) {
                        o._timeoutDeactivate(e)
                    })
                },
                destroy: function() {
                    s.fn.destroy.call(this), this._userEvents.destroy()
                },
                events: [u],
                options: {
                    name: "Button",
                    icon: "",
                    style: "",
                    badge: "",
                    clickOn: "up",
                    enable: !0
                },
                badge: function(e) {
                    var t = this.badgeElement = this.badgeElement || i(e).appendTo(this.element);
                    return e || 0 === e ? (t.html(e), this) : e === !1 ? (t.empty().remove(), this.badgeElement = !1, this) : t.html()
                },
                enable: function(e) {
                    var n = this.element;
                    t === e && (e = !0), this.options.enable = e, e ? n.removeAttr(h) : n.attr(h, h), n.toggleClass(f, !e)
                },
                _timeoutDeactivate: function(e) {
                    this.deactivateTimeoutID || (this.deactivateTimeoutID = setTimeout(n, 500, this, e, !1))
                },
                _activate: function(e) {
                    var t = document.activeElement,
                        i = t ? t.nodeName : "";
                    this.options.enable && (n(this, e, !0), ("INPUT" == i || "TEXTAREA" == i) && t.blur())
                },
                _release: function(n) {
                    var i = this;
                    if (!(n.which > 1)) return i.options.enable ? (i.trigger(u, {
                        target: e(n.target),
                        button: i.element
                    }) && n.preventDefault(), t) : (n.preventDefault(), t)
                },
                _style: function() {
                    var t, n = this.options.style,
                        i = this.element;
                    n && (t = n.split(" "), e.each(t, function() {
                        i.addClass("km-" + this)
                    }))
                },
                _wrap: function() {
                    var t = this,
                        n = t.options.icon,
                        r = t.options.badge,
                        o = '<span class="km-icon km-' + n,
                        a = t.element.addClass("km-button"),
                        s = a.children("span:not(.km-icon)").addClass("km-text"),
                        l = a.find("img").addClass("km-image");
                    !s[0] && a.html() && (s = a.wrapInner('<span class="km-text" />').children("span.km-text")), !l[0] && n && (s[0] || (o += " km-notext"), t.iconElement = a.prepend(e(o + '" />'))), (r || 0 === r) && (t.badgeElement = i(r).appendTo(a))
                }
            }),
            m = p.extend({
                options: {
                    name: "BackButton",
                    style: "back"
                },
                init: function(e, n) {
                    var i = this;
                    p.fn.init.call(i, e, n), t === i.element.attr("href") && i.element.attr("href", "#:back")
                }
            }),
            g = p.extend({
                options: {
                    name: "DetailButton",
                    style: ""
                },
                init: function(e, t) {
                    p.fn.init.call(this, e, t)
                },
                _style: function() {
                    var t, n = this.options.style + " detail",
                        i = this.element;
                    n && (t = n.split(" "), e.each(t, function() {
                        i.addClass("km-" + this)
                    }))
                },
                _wrap: function() {
                    var t = this,
                        n = t.options.icon,
                        i = '<span class="km-icon km-' + n,
                        r = t.element,
                        o = r.children("span"),
                        a = r.find("img").addClass("km-image");
                    !a[0] && n && (o[0] || (i += " km-notext"), r.prepend(e(i + '" />')))
                }
            });
        a.plugin(p), a.plugin(m), a.plugin(g)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.mobile.buttongroup.min", ["kendo.core.min"], e)
}(function() {
    return function(e, t) {
        function n(t) {
            return e('<span class="km-badge">' + t + "</span>")
        }
        var i = window.kendo,
            r = i.mobile.ui,
            o = r.Widget,
            a = "km-state-active",
            s = "km-state-disabled",
            l = "select",
            c = "li:not(." + a + ")",
            d = o.extend({
                init: function(e, t) {
                    var n = this;
                    o.fn.init.call(n, e, t), n.element.addClass("km-buttongroup").find("li").each(n._button), n.element.on(n.options.selectOn, c, "_select"), n._enable = !0, n.select(n.options.index), n.options.enable || (n._enable = !1, n.wrapper.addClass(s))
                },
                events: [l],
                options: {
                    name: "ButtonGroup",
                    selectOn: "down",
                    index: -1,
                    enable: !0
                },
                current: function() {
                    return this.element.find("." + a)
                },
                select: function(n) {
                    var i = this,
                        r = -1;
                    n !== t && -1 !== n && i._enable && !e(n).is("." + s) && (i.current().removeClass(a), "number" == typeof n ? (r = n, n = e(i.element[0].children[n])) : n.nodeType && (n = e(n), r = n.index()), n.addClass(a), i.selectedIndex = r)
                },
                badge: function(t, i) {
                    var r, o = this.element;
                    return isNaN(t) || (t = o.children().get(t)), t = o.find(t), r = e(t.children(".km-badge")[0] || n(i).appendTo(t)), i || 0 === i ? (r.html(i), this) : i === !1 ? (r.empty().remove(), this) : r.html()
                },
                enable: function(e) {
                    var n = this.wrapper;
                    t === e && (e = !0), e ? n.removeClass(s) : n.addClass(s), this._enable = this.options.enable = e
                },
                _button: function() {
                    var t = e(this).addClass("km-button"),
                        r = i.attrValue(t, "icon"),
                        o = i.attrValue(t, "badge"),
                        a = t.children("span"),
                        s = t.find("img").addClass("km-image");
                    a[0] || (a = t.wrapInner("<span/>").children("span")), a.addClass("km-text"), !s[0] && r && t.prepend(e('<span class="km-icon km-' + r + '"/>')), (o || 0 === o) && n(o).appendTo(t)
                },
                _select: function(e) {
                    e.which > 1 || e.isDefaultPrevented() || !this._enable || (this.select(e.currentTarget), this.trigger(l, {
                        index: this.selectedIndex
                    }))
                }
            });
        r.plugin(d)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.mobile.collapsible.min", ["kendo.core.min"], e)
}(function() {
    return function(e, t) {
        var n = window.kendo,
            i = n.mobile.ui,
            r = i.Widget,
            o = "km-collapsible",
            a = "km-collapsible-header",
            s = "km-collapsible-content",
            l = "km-collapsibleinset",
            c = "<div data-role='collapsible-header' class='" + a + "'></div>",
            d = "<div data-role='collapsible-content' class='" + s + "'></div>",
            u = "km-collapsed",
            h = "km-expanded",
            f = "km-animated",
            p = "left",
            m = "expand",
            g = "collapse",
            v = r.extend({
                init: function(t, i) {
                    var a = this,
                        s = e(t);
                    r.fn.init.call(a, s, i), s.addClass(o), a._buildHeader(), a.content = s.children().not(a.header).wrapAll(d).parent(), a._userEvents = new n.UserEvents(a.header, {
                        fastTap: !0,
                        tap: function() {
                            a.toggle()
                        }
                    }), s.addClass(a.options.collapsed ? u : h), a.options.inset && s.addClass(l), a.options.animation ? (a.content.addClass(f), a.content.height(0), a.options.collapsed && a.content.hide()) : a.options.collapsed && a.content.hide()
                },
                events: [m, g],
                options: {
                    name: "Collapsible",
                    collapsed: !0,
                    collapseIcon: "arrow-n",
                    expandIcon: "arrow-s",
                    iconPosition: p,
                    animation: !0,
                    inset: !1
                },
                destroy: function() {
                    r.fn.destroy.call(this), this._userEvents.destroy()
                },
                expand: function(e) {
                    var t = this.options.collapseIcon,
                        i = this.content,
                        r = n.support.mobileOS.ios;
                    this.trigger(m) || (t && this.header.find(".km-icon").removeClass().addClass("km-icon km-" + t), this.element.removeClass(u).addClass(h), this.options.animation && !e ? (i.off("transitionend"), i.show(), r && i.removeClass(f), i.height(this._getContentHeight()), r && i.addClass(f), n.resize(i)) : i.show())
                },
                collapse: function(e) {
                    var t = this.options.expandIcon,
                        n = this.content;
                    this.trigger(g) || (t && this.header.find(".km-icon").removeClass().addClass("km-icon km-" + t), this.element.removeClass(h).addClass(u), this.options.animation && !e ? (n.one("transitionend", function() {
                        n.hide()
                    }), n.height(0)) : n.hide())
                },
                toggle: function(e) {
                    this.isCollapsed() ? this.expand(e) : this.collapse(e)
                },
                isCollapsed: function() {
                    return this.element.hasClass(u)
                },
                resize: function() {
                    !this.isCollapsed() && this.options.animation && this.content.height(this._getContentHeight())
                },
                _buildHeader: function() {
                    var t = this.element.children(":header").wrapAll(c),
                        n = e('<span class="km-icon"/>'),
                        i = this.options.collapsed ? this.options.expandIcon : this.options.collapseIcon,
                        r = this.options.iconPosition;
                    i && (t.prepend(n), n.addClass("km-" + i)), this.header = t.parent(), this.header.addClass("km-icon-" + r)
                },
                _getContentHeight: function() {
                    var e, t = this.content.attr("style");
                    return this.content.css({
                        position: "absolute",
                        visibility: "hidden",
                        height: "auto"
                    }), e = this.content.height(), this.content.attr("style", t ? t : ""), e
                }
            });
        i.plugin(v)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.mobile.listview.min", ["kendo.data.min", "kendo.userevents.min", "kendo.mobile.button.min"], e)
}(function() {
    return function(e, t) {
        function n() {
            return this.nodeType === v.TEXT_NODE && this.nodeValue.match(U)
        }

        function i(e, t) {
            t && !e[0].querySelector(".km-icon") && e.prepend('<span class="km-icon km-' + t + '"/>')
        }

        function r(e) {
            i(e, T(e, "icon")), i(e, T(e.children(C), "icon"))
        }

        function o(e) {
            var t = e.parent(),
                r = e.add(t.children(g.roleSelector("detailbutton"))),
                o = t.contents().not(r).not(n);
            o.length || (e.addClass("km-listview-link").attr(g.attr("role"), "listview-link"), i(e, T(t, "icon")), i(e, T(e, "icon")))
        }

        function a(e) {
            if (e[0].querySelector("input[type=checkbox],input[type=radio]")) {
                var t = e.parent();
                t.contents().not(e).not(function() {
                    return 3 == this.nodeType
                })[0] || (e.addClass("km-listview-label"), e.children("[type=checkbox],[type=radio]").addClass("km-widget km-icon km-check"))
            }
        }

        function s(t, n) {
            e(t).css("transform", "translate3d(0px, " + n + "px, 0px)")
        }
        var l, c, d, u, h, f, p, m, g = window.kendo,
            v = window.Node,
            _ = g.mobile,
            b = _.ui,
            w = g.data.DataSource,
            y = b.DataBoundWidget,
            k = ".km-list > li, > li:not(.km-group-container)",
            x = ".km-listview-link, .km-listview-label",
            C = "[" + g.attr("icon") + "]",
            S = e.proxy,
            T = g.attrValue,
            D = "km-group-title",
            A = "km-state-active",
            E = '<div class="' + D + '"><div class="km-text"></div></div>',
            F = g.template('<li><div class="' + D + '"><div class="km-text">#= this.headerTemplate(data) #</div></div><ul>#= kendo.render(this.template, data.items)#</ul></li>'),
            I = '<div class="km-listview-wrapper" />',
            M = g.template('<form class="km-filter-form"><div class="km-filter-wrap"><input type="search" placeholder="#=placeholder#"/><a href="\\#" class="km-filter-reset" title="Clear"><span class="km-icon km-clear"></span><span class="km-text">Clear</span></a></div></form>'),
            R = ".kendoMobileListView",
            P = "styled",
            z = "dataBound",
            B = "dataBinding",
            L = "itemChange",
            H = "click",
            N = "change",
            O = "progress",
            V = "function",
            U = /^\s+$/,
            W = /button/,
            j = g.Class.extend({
                init: function(e) {
                    var t, n, i = e.scroller();
                    i && (this.options = e.options, this.element = e.element, this.scroller = e.scroller(), this._shouldFixHeaders(), t = this, n = function() {
                        t._cacheHeaders()
                    }, e.bind("resize", n), e.bind(P, n), e.bind(z, n), i.bind("scroll", function(e) {
                        t._fixHeader(e)
                    }))
                },
                _fixHeader: function(t) {
                    if (this.fixedHeaders) {
                        var n, i, r, o = 0,
                            a = this.scroller,
                            s = this.headers,
                            l = t.scrollTop;
                        do {
                            if (n = s[o++], !n) {
                                r = e("<div />");
                                break
                            }
                            i = n.offset, r = n.header
                        } while (i + 1 > l);
                        this.currentHeader != o && (a.fixedContainer.html(r.clone()), this.currentHeader = o)
                    }
                },
                _shouldFixHeaders: function() {
                    this.fixedHeaders = "group" === this.options.type && this.options.fixedHeaders
                },
                _cacheHeaders: function() {
                    if (this._shouldFixHeaders(), this.fixedHeaders) {
                        var t = [],
                            n = this.scroller.scrollTop;
                        this.element.find("." + D).each(function(i, r) {
                            r = e(r), t.unshift({
                                offset: r.position().top + n,
                                header: r
                            })
                        }), this.headers = t, this._fixHeader({
                            scrollTop: n
                        })
                    }
                }
            }),
            q = function() {
                return {
                    page: 1
                }
            },
            G = g.Class.extend({
                init: function(e) {
                    var t = this,
                        n = e.options,
                        i = e.scroller(),
                        r = n.pullParameters || q;
                    this.listView = e, this.scroller = i, e.bind("_dataSource", function(e) {
                        t.setDataSource(e.dataSource)
                    }), i.setOptions({
                        pullToRefresh: !0,
                        pull: function() {
                            t._pulled || (t._pulled = !0, t.dataSource.read(r.call(e, t._first)))
                        },
                        messages: {
                            pullTemplate: n.messages.pullTemplate,
                            releaseTemplate: n.messages.releaseTemplate,
                            refreshTemplate: n.messages.refreshTemplate
                        }
                    })
                },
                setDataSource: function(e) {
                    var t = this;
                    this._first = e.view()[0], this.dataSource = e, e.bind("change", function() {
                        t._change()
                    }), e.bind("error", function() {
                        t._change()
                    })
                },
                _change: function() {
                    var e, t = this.scroller,
                        n = this.dataSource;
                    this._pulled && t.pullHandled(), (this._pulled || !this._first) && (e = n.view(), e[0] && (this._first = e[0])), this._pulled = !1
                }
            }),
            $ = g.Observable.extend({
                init: function(e) {
                    var t = this;
                    g.Observable.fn.init.call(t), t.buffer = e.buffer, t.height = e.height, t.item = e.item, t.items = [], t.footer = e.footer, t.buffer.bind("reset", function() {
                        t.refresh()
                    })
                },
                refresh: function() {
                    for (var e, t, n, i, r = this.buffer, o = this.items, a = !1; o.length;) o.pop().destroy();
                    for (this.offset = r.offset, e = this.item, i = 0; r.viewSize > i; i++) {
                        if (i === r.total()) {
                            a = !0;
                            break
                        }
                        n = e(this.content(this.offset + o.length)), n.below(t), t = n, o.push(n)
                    }
                    this.itemCount = o.length, this.trigger("reset"), this._resize(), a && this.trigger("endReached")
                },
                totalHeight: function() {
                    if (!this.items[0]) return 0;
                    var e = this,
                        t = e.items,
                        n = t[0].top,
                        i = t[t.length - 1].bottom,
                        r = (i - n) / e.itemCount,
                        o = e.buffer.length - e.offset - e.itemCount;
                    return (this.footer ? this.footer.height : 0) + i + o * r
                },
                batchUpdate: function(e) {
                    var t, n, i = this.height(),
                        r = this.items,
                        o = this.offset;
                    if (r[0]) {
                        if (this.lastDirection)
                            for (; r[r.length - 1].bottom > e + 2 * i && 0 !== this.offset;) this.offset--, t = r.pop(), t.update(this.content(this.offset)), t.above(r[0]), r.unshift(t);
                        else
                            for (; e - i > r[0].top;) {
                                if (n = this.offset + this.itemCount, n === this.buffer.total()) {
                                    this.trigger("endReached");
                                    break
                                }
                                if (n === this.buffer.length) break;
                                t = r.shift(), t.update(this.content(this.offset + this.itemCount)), t.below(r[r.length - 1]), r.push(t), this.offset++
                            }
                        o !== this.offset && this._resize()
                    }
                },
                update: function(e) {
                    var t, n, i, r, o = this,
                        a = this.items,
                        s = this.height(),
                        l = this.itemCount,
                        c = s / 2,
                        d = (this.lastTop || 0) > e,
                        u = e - c,
                        h = e + s + c;
                    a[0] && (this.lastTop = e, this.lastDirection = d, d ? a[0].top > u && a[a.length - 1].bottom > h + c && this.offset > 0 && (this.offset--, t = a.pop(), n = a[0], t.update(this.content(this.offset)), a.unshift(t), t.above(n), o._resize()) : h > a[a.length - 1].bottom && u - c > a[0].top && (r = this.offset + l, r === this.buffer.total() ? this.trigger("endReached") : r !== this.buffer.length && (t = a.shift(), i = a[a.length - 1], a.push(t), t.update(this.content(this.offset + this.itemCount)), o.offset++, t.below(i), o._resize())))
                },
                content: function(e) {
                    return this.buffer.at(e)
                },
                destroy: function() {
                    this.unbind()
                },
                _resize: function() {
                    var e = this.items,
                        t = 0,
                        n = 0,
                        i = e[0],
                        r = e[e.length - 1];
                    i && (t = i.top, n = r.bottom), this.trigger("resize", {
                        top: t,
                        bottom: n
                    }), this.footer && this.footer.below(r)
                }
            });
        g.mobile.ui.VirtualList = $, l = g.Class.extend({
            init: function(t, n) {
                var i = t.append([n], !0)[0],
                    r = i.offsetHeight;
                e.extend(this, {
                    top: 0,
                    element: i,
                    listView: t,
                    height: r,
                    bottom: r
                })
            },
            update: function(e) {
                this.element = this.listView.setDataItem(this.element, e)
            },
            above: function(e) {
                e && (this.height = this.element.offsetHeight, this.top = e.top - this.height, this.bottom = e.top, s(this.element, this.top))
            },
            below: function(e) {
                e && (this.height = this.element.offsetHeight, this.top = e.bottom, this.bottom = this.top + this.height, s(this.element, this.top))
            },
            destroy: function() {
                g.destroy(this.element), e(this.element).remove()
            }
        }), c = '<div><span class="km-icon"></span><span class="km-loading-left"></span><span class="km-loading-right"></span></div>', d = g.Class.extend({
            init: function(t) {
                this.element = e('<li class="km-load-more km-scroller-refresh" style="display: none"></li>').appendTo(t.element), this._loadIcon = e(c).appendTo(this.element)
            },
            enable: function() {
                this.element.show(), this.height = this.element.outerHeight(!0)
            },
            disable: function() {
                this.element.hide(), this.height = 0
            },
            below: function(e) {
                e && (this.top = e.bottom, this.bottom = this.height + this.top, s(this.element, this.top))
            }
        }), u = d.extend({
            init: function(t, n) {
                this._loadIcon = e(c).hide(), this._loadButton = e('<a class="km-load">' + t.options.messages.loadMoreText + "</a>").hide(), this.element = e('<li class="km-load-more" style="display: none"></li>').append(this._loadIcon).append(this._loadButton).appendTo(t.element);
                var i = this;
                this._loadButton.kendoMobileButton().data("kendoMobileButton").bind("click", function() {
                    i._hideShowButton(), n.next()
                }), n.bind("resize", function() {
                    i._showLoadButton()
                }), this.height = this.element.outerHeight(!0), this.disable()
            },
            _hideShowButton: function() {
                this._loadButton.hide(), this.element.addClass("km-scroller-refresh"), this._loadIcon.css("display", "block")
            },
            _showLoadButton: function() {
                this._loadButton.show(), this.element.removeClass("km-scroller-refresh"), this._loadIcon.hide()
            }
        }), h = g.Class.extend({
            init: function(e) {
                var t = this;
                this.chromeHeight = e.wrapper.children().not(e.element).outerHeight() || 0, this.listView = e, this.scroller = e.scroller(), this.options = e.options, e.bind("_dataSource", function(e) {
                    t.setDataSource(e.dataSource, e.empty)
                }), e.bind("resize", function() {
                    t.list.items.length && (t.scroller.reset(), t.buffer.range(0), t.list.refresh())
                }), this.scroller.makeVirtual(), this.scroller.bind("scroll", function(e) {
                    t.list.update(e.scrollTop)
                }), this.scroller.bind("scrollEnd", function(e) {
                    t.list.batchUpdate(e.scrollTop)
                })
            },
            destroy: function() {
                this.list.unbind(), this.buffer.unbind()
            },
            setDataSource: function(t, n) {
                var i, r, o, a, s = this,
                    c = this.options,
                    h = this.listView,
                    f = h.scroller(),
                    p = c.loadMore;
                if (this.dataSource = t, i = t.pageSize() || c.virtualViewSize, !i && !n) throw Error("the DataSource does not have page size configured. Page Size setting is mandatory for the mobile listview virtual scrolling to work as expected.");
                this.buffer && this.buffer.destroy(), r = new g.data.Buffer(t, Math.floor(i / 2), p), o = p ? new u(h, r) : new d(h), this.list && this.list.destroy(), a = new $({
                    buffer: r,
                    footer: o,
                    item: function(e) {
                        return new l(h, e)
                    },
                    height: function() {
                        return f.height()
                    }
                }), a.bind("resize", function() {
                    s.updateScrollerSize(), h.updateSize()
                }), a.bind("reset", function() {
                    s.footer.enable()
                }), a.bind("endReached", function() {
                    o.disable(), s.updateScrollerSize()
                }), r.bind("expand", function() {
                    a.lastDirection = !1, a.batchUpdate(f.scrollTop)
                }), e.extend(this, {
                    buffer: r,
                    scroller: f,
                    list: a,
                    footer: o
                })
            },
            updateScrollerSize: function() {
                this.scroller.virtualSize(0, this.list.totalHeight() + this.chromeHeight)
            },
            refresh: function() {
                this.list.refresh()
            },
            reset: function() {
                this.buffer.range(0), this.list.refresh()
            }
        }), f = g.Class.extend({
            init: function(e) {
                var t, n = this;
                this.listView = e, this.options = e.options, t = this, this._refreshHandler = function(e) {
                    t.refresh(e)
                }, this._progressHandler = function() {
                    e.showLoading()
                }, e.bind("_dataSource", function(e) {
                    n.setDataSource(e.dataSource)
                })
            },
            destroy: function() {
                this._unbindDataSource()
            },
            reset: function() {},
            refresh: function(e) {
                var n, i, r, o, a, s, l, c = e && e.action,
                    d = e && e.items,
                    u = this.listView,
                    h = this.dataSource,
                    f = this.options.appendOnRefresh,
                    p = h.view(),
                    m = h.group(),
                    g = m && m[0];
                return "itemchange" === c ? (u._hasBindingTarget() || (n = u.findByDataItem(d)[0], n && u.setDataItem(n, d[0])), t) : (a = "add" === c && !g || f && !u._filter, s = "remove" === c && !g, a ? i = [] : s && (i = u.findByDataItem(d)), u.trigger(B, {
                    action: c || "rebind",
                    items: d,
                    removedItems: i,
                    index: e && e.index
                }) ? (this._shouldShowLoading() && u.hideLoading(), t) : ("add" !== c || g ? "remove" !== c || g ? g ? u.replaceGrouped(p) : f && !u._filter ? (r = u.prepend(p), o = p) : u.replace(p) : (r = [], u.remove(d)) : (l = p.indexOf(d[0]), l > -1 && (r = u.insertAt(d, l), o = d)), this._shouldShowLoading() && u.hideLoading(), u.trigger(z, {
                    ns: b,
                    addedItems: r,
                    addedDataItems: o
                }), t))
            },
            setDataSource: function(e) {
                this.dataSource && this._unbindDataSource(), this.dataSource = e, e.bind(N, this._refreshHandler), this._shouldShowLoading() && this.dataSource.bind(O, this._progressHandler)
            },
            _unbindDataSource: function() {
                this.dataSource.unbind(N, this._refreshHandler).unbind(O, this._progressHandler)
            },
            _shouldShowLoading: function() {
                var e = this.options;
                return !e.pullToRefresh && !e.loadMore && !e.endlessScroll
            }
        }), p = g.Class.extend({
            init: function(t) {
                var n = this,
                    i = t.options.filterable,
                    r = "change paste",
                    o = this;
                this.listView = t, this.options = i, t.element.before(M({
                    placeholder: i.placeholder || "Search..."
                })), i.autoFilter !== !1 && (r += " keyup"), this.element = t.wrapper.find(".km-search-form"), this.searchInput = t.wrapper.find("input[type=search]").closest("form").on("submit" + R, function(e) {
                    e.preventDefault()
                }).end().on("focus" + R, function() {
                    n._oldFilter = n.searchInput.val()
                }).on(r.split(" ").join(R + " ") + R, S(this._filterChange, this)), this.clearButton = t.wrapper.find(".km-filter-reset").on(H, S(this, "_clearFilter")).hide(), this._dataSourceChange = e.proxy(this._refreshInput, this), t.bind("_dataSource", function(e) {
                    e.dataSource.bind("change", o._dataSourceChange)
                })
            },
            _refreshInput: function() {
                var e = this.listView.dataSource.filter(),
                    t = this.listView._filter.searchInput;
                t.val(e && e.filters[0].field === this.listView.options.filterable.field ? e.filters[0].value : "")
            },
            _search: function(e) {
                this._filter = !0, this.clearButton[e ? "show" : "hide"](), this.listView.dataSource.filter(e)
            },
            _filterChange: function(e) {
                var t = this;
                "paste" == e.type && this.options.autoFilter !== !1 ? setTimeout(function() {
                    t._applyFilter()
                }, 1) : this._applyFilter()
            },
            _applyFilter: function() {
                var e = this.options,
                    t = this.searchInput.val(),
                    n = t.length ? {
                        field: e.field,
                        operator: e.operator || "startswith",
                        ignoreCase: e.ignoreCase,
                        value: t
                    } : null;
                t !== this._oldFilter && (this._oldFilter = t, this._search(n))
            },
            _clearFilter: function(e) {
                this.searchInput.val(""), this._search(null), e.preventDefault()
            }
        }), m = y.extend({
            init: function(t, n) {
                var i = this;
                y.fn.init.call(this, t, n), t = this.element, n = this.options, n.scrollTreshold && (n.scrollThreshold = n.scrollTreshold), t.on("down", x, "_highlight").on("move up cancel", x, "_dim"), this._userEvents = new g.UserEvents(t, {
                    fastTap: !0,
                    filter: k,
                    allowSelection: !0,
                    tap: function(e) {
                        i._click(e)
                    }
                }), t.css("-ms-touch-action", "auto"), t.wrap(I), this.wrapper = this.element.parent(), this._headerFixer = new j(this), this._itemsCache = {}, this._templates(), this.virtual = n.endlessScroll || n.loadMore, this._style(), this.options.$angular && (this.virtual || this.options.pullToRefresh) ? setTimeout(e.proxy(this, "_start")) : this._start()
            },
            _start: function() {
                var e = this.options;
                this.options.filterable && (this._filter = new p(this)), this._itemBinder = this.virtual ? new h(this) : new f(this), this.options.pullToRefresh && (this._pullToRefreshHandler = new G(this)), this.setDataSource(e.dataSource), this._enhanceItems(this.items()), g.notify(this, b)
            },
            events: [H, B, z, L],
            options: {
                name: "ListView",
                style: "",
                type: "flat",
                autoBind: !0,
                fixedHeaders: !1,
                template: "#:data#",
                headerTemplate: '<span class="km-text">#:value#</span>',
                appendOnRefresh: !1,
                loadMore: !1,
                endlessScroll: !1,
                scrollThreshold: 30,
                pullToRefresh: !1,
                messages: {
                    loadMoreText: "Press to load more",
                    pullTemplate: "Pull to refresh",
                    releaseTemplate: "Release to refresh",
                    refreshTemplate: "Refreshing"
                },
                pullOffset: 140,
                filterable: !1,
                virtualViewSize: null
            },
            refresh: function() {
                this._itemBinder.refresh()
            },
            reset: function() {
                this._itemBinder.reset()
            },
            setDataSource: function(e) {
                var t = !e;
                this.dataSource = w.create(e), this.trigger("_dataSource", {
                    dataSource: this.dataSource,
                    empty: t
                }), this.options.autoBind && !t && (this.items().remove(), this.dataSource.fetch())
            },
            destroy: function() {
                y.fn.destroy.call(this), g.destroy(this.element), this._userEvents.destroy(), this._itemBinder && this._itemBinder.destroy(),
                    this.element.unwrap(), delete this.element, delete this.wrapper, delete this._userEvents
            },
            items: function() {
                return "group" === this.options.type ? this.element.find(".km-list").children() : this.element.children().not(".km-load-more")
            },
            scroller: function() {
                return this._scrollerInstance || (this._scrollerInstance = this.element.closest(".km-scroll-wrapper").data("kendoMobileScroller")), this._scrollerInstance
            },
            showLoading: function() {
                var e = this.view();
                e && e.loader && e.loader.show()
            },
            hideLoading: function() {
                var e = this.view();
                e && e.loader && e.loader.hide()
            },
            insertAt: function(e, t, n) {
                var i = this;
                return i._renderItems(e, function(r) {
                    if (0 === t ? i.element.prepend(r) : -1 === t ? i.element.append(r) : i.items().eq(t - 1).after(r), n)
                        for (var o = 0; r.length > o; o++) i.trigger(L, {
                            item: r.eq(o),
                            data: e[o],
                            ns: b
                        })
                })
            },
            append: function(e, t) {
                return this.insertAt(e, -1, t)
            },
            prepend: function(e, t) {
                return this.insertAt(e, 0, t)
            },
            replace: function(e) {
                return this.options.type = "flat", this._angularItems("cleanup"), this.element.empty(), this._userEvents.cancel(), this._style(), this.insertAt(e, 0)
            },
            replaceGrouped: function(t) {
                this.options.type = "group", this._angularItems("cleanup"), this.element.empty();
                var n = e(g.render(this.groupTemplate, t));
                this._enhanceItems(n.children("ul").children("li")), this.element.append(n), _.init(n), this._style(), this._angularItems("compile")
            },
            remove: function(e) {
                var t = this.findByDataItem(e);
                this.angular("cleanup", function() {
                    return {
                        elements: t
                    }
                }), g.destroy(t), t.remove()
            },
            findByDataItem: function(e) {
                var t, n, i = [];
                for (t = 0, n = e.length; n > t; t++) i[t] = "[data-" + g.ns + "uid=" + e[t].uid + "]";
                return this.element.find(i.join(","))
            },
            setDataItem: function(t, n) {
                var i = this,
                    r = function(r) {
                        var o = e(r[0]);
                        g.destroy(t), i.angular("cleanup", function() {
                            return {
                                elements: [e(t)]
                            }
                        }), e(t).replaceWith(o), i.trigger(L, {
                            item: o,
                            data: n,
                            ns: b
                        })
                    };
                return this._renderItems([n], r)[0]
            },
            updateSize: function() {
                this._size = this.getSize()
            },
            _renderItems: function(t, n) {
                var i = e(g.render(this.template, t));
                return n(i), this.angular("compile", function() {
                    return {
                        elements: i,
                        data: t.map(function(e) {
                            return {
                                dataItem: e
                            }
                        })
                    }
                }), _.init(i), this._enhanceItems(i), i
            },
            _dim: function(e) {
                this._toggle(e, !1)
            },
            _highlight: function(e) {
                this._toggle(e, !0)
            },
            _toggle: function(t, n) {
                if (!(t.which > 1)) {
                    var i = e(t.currentTarget),
                        r = i.parent(),
                        o = T(i, "role") || "",
                        a = !o.match(W),
                        s = t.isDefaultPrevented();
                    a && r.toggleClass(A, n && !s)
                }
            },
            _templates: function() {
                var e = this.options.template,
                    t = this.options.headerTemplate,
                    n = ' data-uid="#=arguments[0].uid || ""#"',
                    i = {},
                    r = {};
                typeof e === V && (i.template = e, e = "#=this.template(data)#"), this.template = S(g.template("<li" + n + ">" + e + "</li>"), i), r.template = this.template, typeof t === V && (r._headerTemplate = t, t = "#=this._headerTemplate(data)#"), r.headerTemplate = g.template(t), this.groupTemplate = S(F, r)
            },
            _click: function(t) {
                if (!(t.event.which > 1 || t.event.isDefaultPrevented())) {
                    var n, i = t.target,
                        r = e(t.event.target),
                        o = r.closest(g.roleSelector("button", "detailbutton", "backbutton")),
                        a = g.widgetInstance(o, b),
                        s = i.attr(g.attr("uid"));
                    s && (n = this.dataSource.getByUid(s)), this.trigger(H, {
                        target: r,
                        item: i,
                        dataItem: n,
                        button: a
                    }) && t.preventDefault()
                }
            },
            _styleGroups: function() {
                var t = this.element.children();
                t.children("ul").addClass("km-list"), t.each(function() {
                    var t = e(this),
                        n = t.contents().first();
                    t.addClass("km-group-container"), n.is("ul") || n.is("div." + D) || n.wrap(E)
                })
            },
            _style: function() {
                var e = this.options,
                    t = "group" === e.type,
                    n = this.element,
                    i = "inset" === e.style;
                n.addClass("km-listview").toggleClass("km-list", !t).toggleClass("km-virtual-list", this.virtual).toggleClass("km-listinset", !t && i).toggleClass("km-listgroup", t && !i).toggleClass("km-listgroupinset", t && i), n.parents(".km-listview")[0] || n.closest(".km-content").toggleClass("km-insetcontent", i), t && this._styleGroups(), this.trigger(P)
            },
            _enhanceItems: function(t) {
                t.each(function() {
                    var t, n = e(this),
                        i = !1;
                    n.children().each(function() {
                        t = e(this), t.is("a") ? (o(t), i = !0) : t.is("label") && (a(t), i = !0)
                    }), i || r(n)
                })
            }
        }), b.plugin(m)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.mobile.navbar.min", ["kendo.core.min"], e)
}(function() {
    return function(e, t) {
        function n(n, i) {
            var o = i.find("[" + r.attr("align") + "=" + n + "]");
            return o[0] ? e('<div class="km-' + n + 'item" />').append(o).prependTo(i) : t
        }

        function i(t) {
            var n = t.siblings(),
                i = !!t.children("ul")[0],
                o = !!n[0] && "" === e.trim(t.text()),
                a = !(!r.mobile.application || !r.mobile.application.element.is(".km-android"));
            t.prevAll().toggleClass("km-absolute", i), t.toggleClass("km-show-title", o), t.toggleClass("km-fill-title", o && !e.trim(t.html())), t.toggleClass("km-no-title", i), t.toggleClass("km-hide-title", a && !n.children().is(":visible"))
        }
        var r = window.kendo,
            o = r.mobile,
            a = o.ui,
            s = a.Widget,
            l = s.extend({
                init: function(t, i) {
                    var r = this;
                    s.fn.init.call(r, t, i), t = r.element, r.container().bind("show", e.proxy(this, "refresh")), t.addClass("km-navbar").wrapInner(e('<div class="km-view-title km-show-title" />')), r.leftElement = n("left", t), r.rightElement = n("right", t), r.centerElement = t.find(".km-view-title")
                },
                options: {
                    name: "NavBar"
                },
                title: function(e) {
                    this.element.find(r.roleSelector("view-title")).text(e), i(this.centerElement)
                },
                refresh: function(e) {
                    var t = e.view;
                    this.title(t.options.title)
                },
                destroy: function() {
                    s.fn.destroy.call(this), r.destroy(this.element)
                }
            });
        a.plugin(l)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.mobile.scrollview.min", ["kendo.fx.min", "kendo.data.min", "kendo.draganddrop.min"], e)
}(function() {
    return function(e, t) {
        var n, i, r, o, a, s, l, c, d = window.kendo,
            u = d.mobile,
            h = u.ui,
            f = e.proxy,
            p = d.effects.Transition,
            m = d.ui.Pane,
            g = d.ui.PaneDimensions,
            v = h.DataBoundWidget,
            _ = d.data.DataSource,
            b = d.data.Buffer,
            w = d.data.BatchBuffer,
            y = Math,
            k = y.abs,
            x = y.ceil,
            C = y.round,
            S = y.max,
            T = y.min,
            D = y.floor,
            A = "change",
            E = "changing",
            F = "refresh",
            I = "km-current-page",
            M = "km-virtual-page",
            R = "function",
            P = "itemChange",
            z = "cleanup",
            B = 3,
            L = -1,
            H = 0,
            N = 1,
            O = -1,
            V = 0,
            U = 1,
            W = d.Class.extend({
                init: function(t) {
                    var n = this,
                        i = e("<ol class='km-pages'/>");
                    t.element.append(i), this._changeProxy = f(n, "_change"), this._refreshProxy = f(n, "_refresh"), t.bind(A, this._changeProxy), t.bind(F, this._refreshProxy), e.extend(n, {
                        element: i,
                        scrollView: t
                    })
                },
                items: function() {
                    return this.element.children()
                },
                _refresh: function(e) {
                    var t, n = "";
                    for (t = 0; e.pageCount > t; t++) n += "<li/>";
                    this.element.html(n), this.items().eq(e.page).addClass(I)
                },
                _change: function(e) {
                    this.items().removeClass(I).eq(e.page).addClass(I)
                },
                destroy: function() {
                    this.scrollView.unbind(A, this._changeProxy), this.scrollView.unbind(F, this._refreshProxy), this.element.remove()
                }
            });
        d.mobile.ui.ScrollViewPager = W, n = "transitionEnd", i = "dragStart", r = "dragEnd", o = d.Observable.extend({
            init: function(t, o) {
                var a, s, l, c, u, h, f = this;
                d.Observable.fn.init.call(this), this.element = t, this.container = t.parent(), a = new d.ui.Movable(f.element), s = new p({
                    axis: "x",
                    movable: a,
                    onEnd: function() {
                        f.trigger(n)
                    }
                }), l = new d.UserEvents(t, {
                    fastTap: !0,
                    start: function(e) {
                        2 * k(e.x.velocity) >= k(e.y.velocity) ? l.capture() : l.cancel(), f.trigger(i, e), s.cancel()
                    },
                    allowSelection: !0,
                    end: function(e) {
                        f.trigger(r, e)
                    }
                }), c = new g({
                    element: f.element,
                    container: f.container
                }), u = c.x, u.bind(A, function() {
                    f.trigger(A)
                }), h = new m({
                    dimensions: c,
                    userEvents: l,
                    movable: a,
                    elastic: !0
                }), e.extend(f, {
                    duration: o && o.duration || 1,
                    movable: a,
                    transition: s,
                    userEvents: l,
                    dimensions: c,
                    dimension: u,
                    pane: h
                }), this.bind([n, i, r, A], o)
            },
            size: function() {
                return {
                    width: this.dimensions.x.getSize(),
                    height: this.dimensions.y.getSize()
                }
            },
            total: function() {
                return this.dimension.getTotal()
            },
            offset: function() {
                return -this.movable.x
            },
            updateDimension: function() {
                this.dimension.update(!0)
            },
            refresh: function() {
                this.dimensions.refresh()
            },
            moveTo: function(e) {
                this.movable.moveAxis("x", -e)
            },
            transitionTo: function(e, t, n) {
                n ? this.moveTo(-e) : this.transition.moveTo({
                    location: e,
                    duration: this.duration,
                    ease: t
                })
            }
        }), d.mobile.ui.ScrollViewElasticPane = o, a = d.Observable.extend({
            init: function(e, t, n) {
                var i = this;
                d.Observable.fn.init.call(this), i.element = e, i.pane = t, i._getPages(), this.page = 0, this.pageSize = n.pageSize || 1, this.contentHeight = n.contentHeight, this.enablePager = n.enablePager, this.pagerOverlay = n.pagerOverlay
            },
            scrollTo: function(e, t) {
                this.page = e, this.pane.transitionTo(-e * this.pane.size().width, p.easeOutExpo, t)
            },
            paneMoved: function(e, t, n, i) {
                var r, o, a = this,
                    s = a.pane,
                    l = s.size().width * a.pageSize,
                    c = C,
                    d = t ? p.easeOutBack : p.easeOutExpo;
                e === O ? c = x : e === U && (c = D), o = c(s.offset() / l), r = S(a.minSnap, T(-o * l, a.maxSnap)), o != a.page && n && n({
                    currentPage: a.page,
                    nextPage: o
                }) && (r = -a.page * s.size().width), s.transitionTo(r, d, i)
            },
            updatePage: function() {
                var e = this.pane,
                    t = C(e.offset() / e.size().width);
                return t != this.page ? (this.page = t, !0) : !1
            },
            forcePageUpdate: function() {
                return this.updatePage()
            },
            resizeTo: function(e) {
                var t, n, i = this.pane,
                    r = e.width;
                this.pageElements.width(r), "100%" === this.contentHeight && (t = this.element.parent().height(), this.enablePager === !0 && (n = this.element.parent().find("ol.km-pages"), !this.pagerOverlay && n.length && (t -= n.outerHeight(!0))), this.element.css("height", t), this.pageElements.css("height", t)), i.updateDimension(), this._paged || (this.page = D(i.offset() / r)), this.scrollTo(this.page, !0), this.pageCount = x(i.total() / r), this.minSnap = -(this.pageCount - 1) * r, this.maxSnap = 0
            },
            _getPages: function() {
                this.pageElements = this.element.find(d.roleSelector("page")), this._paged = this.pageElements.length > 0
            }
        }), d.mobile.ui.ScrollViewContent = a, s = d.Observable.extend({
            init: function(e, t, n) {
                var i = this;
                d.Observable.fn.init.call(this), i.element = e, i.pane = t, i.options = n, i._templates(), i.page = n.page || 0, i.pages = [], i._initPages(), i.resizeTo(i.pane.size()), i.pane.dimension.forceEnabled()
            },
            setDataSource: function(e) {
                this.dataSource = _.create(e), this._buffer(), this._pendingPageRefresh = !1, this._pendingWidgetRefresh = !1
            },
            _viewShow: function() {
                var e = this;
                e._pendingWidgetRefresh && (setTimeout(function() {
                    e._resetPages()
                }, 0), e._pendingWidgetRefresh = !1)
            },
            _buffer: function() {
                var e = this.options.itemsPerPage;
                this.buffer && this.buffer.destroy(), this.buffer = e > 1 ? new w(this.dataSource, e) : new b(this.dataSource, 3 * e), this._resizeProxy = f(this, "_onResize"), this._resetProxy = f(this, "_onReset"), this._endReachedProxy = f(this, "_onEndReached"), this.buffer.bind({
                    resize: this._resizeProxy,
                    reset: this._resetProxy,
                    endreached: this._endReachedProxy
                })
            },
            _templates: function() {
                var e = this.options.template,
                    t = this.options.emptyTemplate,
                    n = {},
                    i = {};
                typeof e === R && (n.template = e, e = "#=this.template(data)#"), this.template = f(d.template(e), n), typeof t === R && (i.emptyTemplate = t, t = "#=this.emptyTemplate(data)#"), this.emptyTemplate = f(d.template(t), i)
            },
            _initPages: function() {
                var e, t, n = this.pages,
                    i = this.element;
                for (t = 0; B > t; t++) e = new l(i), n.push(e);
                this.pane.updateDimension()
            },
            resizeTo: function(e) {
                var t, n, i, r = this.pages,
                    o = this.pane;
                for (t = 0; r.length > t; t++) r[t].setWidth(e.width);
                "auto" === this.options.contentHeight ? this.element.css("height", this.pages[1].element.height()) : "100%" === this.options.contentHeight && (n = this.element.parent().height(), this.options.enablePager === !0 && (i = this.element.parent().find("ol.km-pages"), !this.options.pagerOverlay && i.length && (n -= i.outerHeight(!0))), this.element.css("height", n), r[0].element.css("height", n), r[1].element.css("height", n), r[2].element.css("height", n)), o.updateDimension(), this._repositionPages(), this.width = e.width
            },
            scrollTo: function(e) {
                var t, n = this.buffer;
                n.syncDataSource(), t = n.at(e), t && (this._updatePagesContent(e), this.page = e)
            },
            paneMoved: function(e, t, n, i) {
                var r, o = this,
                    a = o.pane,
                    s = a.size().width,
                    l = a.offset(),
                    c = Math.abs(l) >= s / 3,
                    u = t ? d.effects.Transition.easeOutBack : d.effects.Transition.easeOutExpo,
                    h = o.page + 2 > o.buffer.total(),
                    f = 0;
                e === U ? 0 !== o.page && (f = -1) : e !== O || h ? l > 0 && c && !h ? f = 1 : 0 > l && c && 0 !== o.page && (f = -1) : f = 1, r = o.page, f && (r = f > 0 ? r + 1 : r - 1), n && n({
                    currentPage: o.page,
                    nextPage: r
                }) && (f = 0), 0 === f ? o._cancelMove(u, i) : -1 === f ? o._moveBackward(i) : 1 === f && o._moveForward(i)
            },
            updatePage: function() {
                var e = this.pages;
                return 0 === this.pane.offset() ? !1 : (this.pane.offset() > 0 ? (e.push(this.pages.shift()), this.page++, this.setPageContent(e[2], this.page + 1)) : (e.unshift(this.pages.pop()), this.page--, this.setPageContent(e[0], this.page - 1)), this._repositionPages(), this._resetMovable(), !0)
            },
            forcePageUpdate: function() {
                var e = this.pane.offset(),
                    t = 3 * this.pane.size().width / 4;
                return k(e) > t ? this.updatePage() : !1
            },
            _resetMovable: function() {
                this.pane.moveTo(0)
            },
            _moveForward: function(e) {
                this.pane.transitionTo(-this.width, d.effects.Transition.easeOutExpo, e)
            },
            _moveBackward: function(e) {
                this.pane.transitionTo(this.width, d.effects.Transition.easeOutExpo, e)
            },
            _cancelMove: function(e, t) {
                this.pane.transitionTo(0, e, t)
            },
            _resetPages: function() {
                this.page = this.options.page || 0, this._updatePagesContent(this.page), this._repositionPages(), this.trigger("reset")
            },
            _onResize: function() {
                this.pageCount = x(this.dataSource.total() / this.options.itemsPerPage), this._pendingPageRefresh && (this._updatePagesContent(this.page), this._pendingPageRefresh = !1), this.trigger("resize")
            },
            _onReset: function() {
                this.pageCount = x(this.dataSource.total() / this.options.itemsPerPage), this._resetPages()
            },
            _onEndReached: function() {
                this._pendingPageRefresh = !0
            },
            _repositionPages: function() {
                var e = this.pages;
                e[0].position(L), e[1].position(H), e[2].position(N)
            },
            _updatePagesContent: function(e) {
                var t = this.pages,
                    n = e || 0;
                this.setPageContent(t[0], n - 1), this.setPageContent(t[1], n), this.setPageContent(t[2], n + 1)
            },
            setPageContent: function(t, n) {
                var i = this.buffer,
                    r = this.template,
                    o = this.emptyTemplate,
                    a = null;
                n >= 0 && (a = i.at(n), e.isArray(a) && !a.length && (a = null)), this.trigger(z, {
                    item: t.element
                }), t.content(null !== a ? r(a) : o({})), d.mobile.init(t.element), this.trigger(P, {
                    item: t.element,
                    data: a,
                    ns: d.mobile.ui
                })
            }
        }), d.mobile.ui.VirtualScrollViewContent = s, l = d.Class.extend({
            init: function(t) {
                this.element = e("<div class='" + M + "'></div>"), this.width = t.width(), this.element.width(this.width), t.append(this.element)
            },
            content: function(e) {
                this.element.html(e)
            },
            position: function(e) {
                this.element.css("transform", "translate3d(" + this.width * e + "px, 0, 0)")
            },
            setWidth: function(e) {
                this.width = e, this.element.width(e)
            }
        }), d.mobile.ui.VirtualPage = l, c = v.extend({
            init: function(e, t) {
                var n, i, r, l = this;
                v.fn.init.call(l, e, t), t = l.options, e = l.element, d.stripWhitespace(e[0]), e.wrapInner("<div/>").addClass("km-scrollview"), this.options.enablePager && (this.pager = new W(this), this.options.pagerOverlay && e.addClass("km-scrollview-overlay")), l.inner = e.children().first(), l.page = 0, l.inner.css("height", t.contentHeight), l.pane = new o(l.inner, {
                    duration: this.options.duration,
                    transitionEnd: f(this, "_transitionEnd"),
                    dragStart: f(this, "_dragStart"),
                    dragEnd: f(this, "_dragEnd"),
                    change: f(this, F)
                }), l.bind("resize", function() {
                    l.pane.refresh()
                }), l.page = t.page, n = 0 === this.inner.children().length, i = n ? new s(l.inner, l.pane, t) : new a(l.inner, l.pane, t), i.page = l.page, i.bind("reset", function() {
                    this._pendingPageRefresh = !1, l._syncWithContent(), l.trigger(F, {
                        pageCount: i.pageCount,
                        page: i.page
                    })
                }), i.bind("resize", function() {
                    l.trigger(F, {
                        pageCount: i.pageCount,
                        page: i.page
                    })
                }), i.bind(P, function(e) {
                    l.trigger(P, e), l.angular("compile", function() {
                        return {
                            elements: e.item,
                            data: [{
                                dataItem: e.data
                            }]
                        }
                    })
                }), i.bind(z, function(e) {
                    l.angular("cleanup", function() {
                        return {
                            elements: e.item
                        }
                    })
                }), l._content = i, l.setDataSource(t.dataSource), r = l.container(), r.nullObject ? (l.viewInit(), l.viewShow()) : r.bind("show", f(this, "viewShow")).bind("init", f(this, "viewInit"))
            },
            options: {
                name: "ScrollView",
                page: 0,
                duration: 400,
                velocityThreshold: .8,
                contentHeight: "auto",
                pageSize: 1,
                itemsPerPage: 1,
                bounceVelocityThreshold: 1.6,
                enablePager: !0,
                pagerOverlay: !1,
                autoBind: !0,
                template: "",
                emptyTemplate: ""
            },
            events: [E, A, F],
            destroy: function() {
                v.fn.destroy.call(this), d.destroy(this.element)
            },
            viewInit: function() {
                this.options.autoBind && this._content.scrollTo(this._content.page, !0)
            },
            viewShow: function() {
                this.pane.refresh()
            },
            refresh: function() {
                var e = this._content;
                e.resizeTo(this.pane.size()), this.page = e.page, this.trigger(F, {
                    pageCount: e.pageCount,
                    page: e.page
                })
            },
            content: function(e) {
                this.element.children().first().html(e), this._content._getPages(), this.pane.refresh()
            },
            value: function(e) {
                var n = this.dataSource;
                return e ? (this.scrollTo(n.indexOf(e), !0), t) : n.at(this.page)
            },
            scrollTo: function(e, t) {
                this._content.scrollTo(e, t), this._syncWithContent()
            },
            prev: function() {
                var e = this,
                    n = e.page - 1;
                e._content instanceof s ? e._content.paneMoved(U, t, function(t) {
                    return e.trigger(E, t)
                }) : n > -1 && e.scrollTo(n)
            },
            next: function() {
                var e = this,
                    n = e.page + 1;
                e._content instanceof s ? e._content.paneMoved(O, t, function(t) {
                    return e.trigger(E, t)
                }) : e._content.pageCount > n && e.scrollTo(n)
            },
            setDataSource: function(e) {
                if (this._content instanceof s) {
                    var t = !e;
                    this.dataSource = _.create(e), this._content.setDataSource(this.dataSource), this.options.autoBind && !t && this.dataSource.fetch()
                }
            },
            items: function() {
                return this.element.find("." + M)
            },
            _syncWithContent: function() {
                var e, n, i = this._content.pages,
                    r = this._content.buffer;
                this.page = this._content.page, e = r ? r.at(this.page) : t, e instanceof Array || (e = [e]), n = i ? i[1].element : t, this.trigger(A, {
                    page: this.page,
                    element: n,
                    data: e
                })
            },
            _dragStart: function() {
                this._content.forcePageUpdate() && this._syncWithContent()
            },
            _dragEnd: function(e) {
                var t = this,
                    n = e.x.velocity,
                    i = this.options.velocityThreshold,
                    r = V,
                    o = k(n) > this.options.bounceVelocityThreshold;
                n > i ? r = U : -i > n && (r = O), this._content.paneMoved(r, o, function(e) {
                    return t.trigger(E, e)
                })
            },
            _transitionEnd: function() {
                this._content.updatePage() && this._syncWithContent()
            }
        }), h.plugin(c)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.mobile.switch.min", ["kendo.fx.min", "kendo.userevents.min"], e)
}(function() {
    return function(e, t) {
        function n(e, t, n) {
            return Math.max(t, Math.min(n, e))
        }
        var i = window.kendo,
            r = i.mobile.ui,
            o = r.Widget,
            a = i.support,
            s = "change",
            l = "km-switch-on",
            c = "km-switch-off",
            d = "margin-left",
            u = "km-state-active",
            h = "km-state-disabled",
            f = "disabled",
            p = a.transitions.css + "transform",
            m = e.proxy,
            g = '<span class="km-switch km-widget">        <span class="km-switch-wrapper"><span class="km-switch-background"></span></span>         <span class="km-switch-container"><span class="km-switch-handle" >             <span class="km-switch-label-on">{0}</span>             <span class="km-switch-label-off">{1}</span>         </span>     </span>',
            v = o.extend({
                init: function(t, n) {
                    var r, a = this;
                    o.fn.init.call(a, t, n), n = a.options, a.wrapper = e(i.format(g, n.onLabel, n.offLabel)), a.handle = a.wrapper.find(".km-switch-handle"), a.background = a.wrapper.find(".km-switch-background"), a.wrapper.insertBefore(a.element).prepend(a.element), a._drag(), a.origin = parseInt(a.background.css(d), 10), a.constrain = 0, a.snapPoint = 0, t = a.element[0], t.type = "checkbox", a._animateBackground = !0, r = a.options.checked, null === r && (r = t.checked), a.check(r), a.options.enable = a.options.enable && !a.element.attr(f), a.enable(a.options.enable), a.refresh(), i.notify(a, i.mobile.ui)
                },
                refresh: function() {
                    var e = this,
                        t = e.handle.outerWidth(!0);
                    e.width = e.wrapper.width(), e.constrain = e.width - t, e.snapPoint = e.constrain / 2, "number" != typeof e.origin && (e.origin = parseInt(e.background.css(d), 10)), e.background.data("origin", e.origin), e.check(e.element[0].checked)
                },
                events: [s],
                options: {
                    name: "Switch",
                    onLabel: "on",
                    offLabel: "off",
                    checked: null,
                    enable: !0
                },
                check: function(e) {
                    var n = this,
                        i = n.element[0];
                    return e === t ? i.checked : (n._position(e ? n.constrain : 0), i.checked = e, n.wrapper.toggleClass(l, e).toggleClass(c, !e), t)
                },
                value: function() {
                    return this.check.apply(this, arguments)
                },
                destroy: function() {
                    o.fn.destroy.call(this), this.userEvents.destroy()
                },
                toggle: function() {
                    var e = this;
                    e.check(!e.element[0].checked)
                },
                enable: function(e) {
                    var n = this.element,
                        i = this.wrapper;
                    t === e && (e = !0), this.options.enable = e, e ? n.removeAttr(f) : n.attr(f, f), i.toggleClass(h, !e)
                },
                _resize: function() {
                    this.refresh()
                },
                _move: function(e) {
                    var t = this;
                    e.preventDefault(), t._position(n(t.position + e.x.delta, 0, t.width - t.handle.outerWidth(!0)))
                },
                _position: function(e) {
                    var t = this;
                    t.position = e, t.handle.css(p, "translatex(" + e + "px)"), t._animateBackground && t.background.css(d, t.origin + e)
                },
                _start: function() {
                    this.options.enable ? (this.userEvents.capture(), this.handle.addClass(u)) : this.userEvents.cancel()
                },
                _stop: function() {
                    var e = this;
                    e.handle.removeClass(u), e._toggle(e.position > e.snapPoint)
                },
                _toggle: function(e) {
                    var t, n = this,
                        r = n.handle,
                        o = n.element[0],
                        a = o.checked,
                        d = i.mobile.application && i.mobile.application.os.wp ? 100 : 200;
                    n.wrapper.toggleClass(l, e).toggleClass(c, !e), n.position = t = e * n.constrain, n._animateBackground && n.background.kendoStop(!0, !0).kendoAnimate({
                        effects: "slideMargin",
                        offset: t,
                        reset: !0,
                        reverse: !e,
                        axis: "left",
                        duration: d
                    }), r.kendoStop(!0, !0).kendoAnimate({
                        effects: "slideTo",
                        duration: d,
                        offset: t + "px,0",
                        reset: !0,
                        complete: function() {
                            a !== e && (o.checked = e, n.trigger(s, {
                                checked: e
                            }))
                        }
                    })
                },
                _drag: function() {
                    var e = this;
                    e.userEvents = new i.UserEvents(e.wrapper, {
                        fastTap: !0,
                        tap: function() {
                            e.options.enable && e._toggle(!e.element[0].checked)
                        },
                        start: m(e._start, e),
                        move: m(e._move, e),
                        end: m(e._stop, e)
                    })
                }
            });
        r.plugin(v)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.mobile.tabstrip.min", ["kendo.core.min"], e)
}(function() {
    return function(e, t) {
        function n(t) {
            return e('<span class="km-badge">' + t + "</span>")
        }
        var i = window.kendo,
            r = i.mobile.ui,
            o = r.Widget,
            a = "km-state-active",
            s = "select",
            l = o.extend({
                init: function(t, n) {
                    var i = this;
                    o.fn.init.call(i, t, n), i.container().bind("show", e.proxy(this, "refresh")), i.element.addClass("km-tabstrip").find("a").each(i._buildButton).eq(i.options.selectedIndex).addClass(a), i.element.on("down", "a", "_release")
                },
                events: [s],
                switchTo: function(t) {
                    var n, i, r = this.element.find("a"),
                        o = 0,
                        a = r.length;
                    if (!isNaN(t)) return this._setActiveItem(r.eq(t)), !0;
                    for (; a > o; o++)
                        if (n = r[o], i = n.href.replace(/(\#.+)(\?.+)$/, "$1"), -1 !== i.indexOf(t, i.length - t.length)) return this._setActiveItem(e(n)), !0;
                    return !1
                },
                switchByFullUrl: function(e) {
                    var t;
                    t = this.element.find("a[href$='" + e + "']"), this._setActiveItem(t)
                },
                clear: function() {
                    this.currentItem().removeClass(a)
                },
                currentItem: function() {
                    return this.element.children("." + a)
                },
                badge: function(t, i) {
                    var r, o = this.element;
                    return isNaN(t) || (t = o.children().get(t)), t = o.find(t), r = e(t.find(".km-badge")[0] || n(i).insertAfter(t.children(".km-icon"))), i || 0 === i ? (r.html(i), this) : i === !1 ? (r.empty().remove(), this) : r.html()
                },
                _release: function(t) {
                    if (!(t.which > 1)) {
                        var n = this,
                            i = e(t.currentTarget);
                        i[0] !== n.currentItem()[0] && (n.trigger(s, {
                            item: i
                        }) ? t.preventDefault() : n._setActiveItem(i))
                    }
                },
                _setActiveItem: function(e) {
                    e[0] && (this.clear(), e.addClass(a))
                },
                _buildButton: function() {
                    var t = e(this),
                        r = i.attrValue(t, "icon"),
                        o = i.attrValue(t, "badge"),
                        a = t.find("img"),
                        s = e('<span class="km-icon"/>');
                    t.addClass("km-button").attr(i.attr("role"), "tab").contents().not(a).wrapAll('<span class="km-text"/>'), a[0] ? a.addClass("km-image").prependTo(t) : (t.prepend(s), r && (s.addClass("km-" + r), (o || 0 === o) && n(o).insertAfter(s)))
                },
                refresh: function(e) {
                    var t = e.view.id;
                    t && !this.switchTo(e.view.id) && this.switchTo(t)
                },
                options: {
                    name: "TabStrip",
                    selectedIndex: 0,
                    enable: !0
                }
            });
        r.plugin(l)
    }(window.kendo.jQuery), window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.mobile.min", ["kendo.core.min", "kendo.fx.min", "kendo.data.odata.min", "kendo.data.xml.min", "kendo.data.min", "kendo.data.signalr.min", "kendo.binder.min", "kendo.validator.min", "kendo.router.min", "kendo.view.min", "kendo.userevents.min", "kendo.draganddrop.min", "kendo.popup.min", "kendo.touch.min", "kendo.mobile.popover.min", "kendo.mobile.loader.min", "kendo.mobile.scroller.min", "kendo.mobile.shim.min", "kendo.mobile.view.min", "kendo.mobile.modalview.min", "kendo.mobile.drawer.min", "kendo.mobile.splitview.min", "kendo.mobile.pane.min", "kendo.mobile.application.min", "kendo.mobile.actionsheet.min", "kendo.mobile.button.min", "kendo.mobile.buttongroup.min", "kendo.mobile.collapsible.min", "kendo.mobile.listview.min", "kendo.mobile.navbar.min", "kendo.mobile.scrollview.min", "kendo.mobile.switch.min", "kendo.mobile.tabstrip.min", "kendo.angular.min", "kendo.webcomponents.min", "kendo.angular2.min"], e)
}(function() {
    "bundle all";
    return window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
}),
function(e, define) {
    define("kendo.all.min", ["kendo.web.min", "kendo.dataviz.min", "kendo.mobile.min", "kendo.drawing.min", "kendo.dom.min"], e)
}(function() {
    "bundle all";
    return window.kendo
}, "function" == typeof define && define.amd ? define : function(e, t, n) {
    (n || t)()
});
//# sourceMappingURL=kendo.all.min.js.map
