var require = {
    app: {
        analytics: !1,
        copyright: "2013 by Goal.com",
        deployType: "production",
        description: "not specified",
        guid: "ad15a196-9190-490a-961e-12ed0f2bc9d7",
        id: "com.goal.app",
        name: "Goal.com",
        names: {},
        publisher: "julianfraser",
        url: "http://agencymobile.co.uk",
        version: "1.01"
    },
    has: {
        touch: function(t) {
            return !0 && "ontouchstart" in t
        },
        "js-btoa": function(t) {
            return "btoa" in t
        },
        "native-localstorage": function(t) {
            return "localStorage" in t && "setItem" in localStorage
        },
        "function-bind": function() {
            return !!Function.prototype.bind
        },
        opera: "undefined" == typeof opera || "[object Opera]" != opera.toString(),
        "ti-analytics-use-xhr": !1,
        "ti-show-errors": !1,
        "ti-instrumentation": function(t) {
            return !1
        },
        winstore_extensions: !1
    },
    locales: ["ar", "de", "en", "en-gb", "es", "es-ar", "es-cl", "es-co", "es-latin", "es-mx", "es-pe", "fa", "fr", "id", "it", "ja", "ko", "nl", "pt", "th", "tr", "vi", "zh-cn", "zh-tw"],
    packages: [{
        name: "Ti",
        location: "./titanium",
        main: "./Ti"
    }],
    project: {
        id: "com.goal.app",
        name: "Goal.com"
    },
    ti: {
        buildHash: "25c0f81",
        buildDate: "02/14/14 15:09",
        colorsModule: "Ti/_/colors",
        filesystem: {
            registry: "ondemand"
        },
        theme: "default",
        version: "3.3.0"
    },
    vendorPrefixes: {
        css: ["", "-webkit-", "-moz-", "-ms-", "-o-", "-khtml-"],
        dom: ["", "Webkit", "Moz", "ms", "O", "Khtml"]
    }
};
window.hasWP8Extensions = !1,
    function(t) {
        "use strict";

        function e() {}

        function i(t) {
            var e, i, n = 1,
                o = arguments.length;
            for (t || (t = {}); o > n;) {
                i = arguments[n++];
                for (e in i) i.hasOwnProperty(e) && (t[e] = i[e])
            }
            return t
        }

        function n(t, e) {
            var i = Object.prototype.toString.call(t),
                n = void 0 === t ? "Undefined" : i.substring(8, i.length - 1);
            return e ? e === n : n
        }

        function o(t) {
            var e;
            for (e in t) break;
            return !t || !t.call && !e
        }

        function r(e, i, n) {
            var o, r, a = [],
                s = [];
            if (n) r = t.eval(e);
            else {
                for (o in i) a.push(o + "=__vars." + o), s.push(o + ":" + o);
                r = new Function("__vars", (a.length ? "var " + a.join(",") + ";\n" : "") + e + "\n;return {" + s.join(",") + "};")(i)
            }
            return "_firebugIgnore" === r ? null : r
        }

        function a(t) {
            var e, i, n = [];
            for (t = t.replace(/\\/g, "/").split("/"); t.length;) e = t.shift(), ".." === e && n.length && ".." !== i ? (n.pop(), i = n[n.length - 1]) : "." !== e && n.push(i = e);
            return n.join("/")
        }

        function s(e, i) {
            t.hasWP8Extensions && t.external.notify(e + i)
        }

        function u(t, e, i) {
            "string" == typeof j[t] ? i(1, j[t]) : (j[t] = i, s("f", (e ? "b" : "t") + t))
        }

        function c(t, e, i, o) {
            var r = n(o, "Function") ? function() {
                return o.apply(i, arguments)
            } : n(o, "String") ? function() {
                return i[o].apply(i, arguments)
            } : i;
            return t.addEventListener(e, r, !1),
                function() {
                    t.removeEventListener(e, r, !1)
                }
        }

        function d() {
            this.thens = arguments.length ? [arguments] : []
        }

        function h(t, e) {
            t = t.name ? t : {
                name: t
            }, t.location = (/^\/\/|\:/.test(e) ? e : "") + (t.location || t.name), t.main = (t.main || "main").replace(/^\.\/|\.js$/g, ""), B[t.name] = t
        }

        function l(t, e, o, r) {
            function s() {
                var t = b.call(arguments, 0);
                return m.apply(null, [t[0], t[1] || 0, t[2] || 0, h])
            }
            var u, c, d, h = this,
                l = t && t.match(E),
                _ = N.test(t),
                f = x.test(t),
                g = {},
                T = null,
                v = O,
                b = Array.prototype.slice;
            if (h.name = t, h.deps = o || [], h.plugin = null, h.rawDef = r, h.state = r ? F : 0, h.refModule = e, !l && (f || _ && !e)) h.url = t;
            else if (l) h.plugin = h.deps.length, h.pluginArgs = l[2], h.pluginCfg = k[l[1]], h.deps.push(l[1]);
            else if (t) {
                if (t = (_ ? e.name + "/../" : "") + t.replace(C, ""), S.test(t)) throw new Error('Irrational path "' + t + '"');
                l = t.match(A), c = l && l[1], c && (d = B[c], !d && null === T && e && (d = B[c = e.pkg], _ || (l[2] = t)), d ? (T = c, L.test(u = d.location) || (u += "/"), c = l[2], v += a(u + (c ? d.root ? c : t : d.main)), c || (t = T + "/" + d.main)) : (d = U[c]) && (T = "", v = n(d, "Array") ? d[0] : d)), h.name = t = a(t), (null === T || !l && f) && (T = "", v += t), h.url = v + ".js"
            }
            h.pkg = T, s.toUrl = function() {
                var t = b.call(arguments, 0);
                return null === h.plugin && (t[1] = h), p.apply(null, t)
            }, i(s, w, {
                cache: m.cache
            }), h.cjs = {
                require: s,
                exports: g,
                module: {
                    exports: g
                }
            }
        }

        function _(t, e, i, n, o, r) {
            var a = new l(t, e, i, n),
                s = a.name;
            return e && e.cjs && t in e.cjs && (a.def = e.cjs[t], a.state = G, o = 1), o || !s ? a : Y[s] && Y[s].state && !r ? Y[s] : Y[s] = a
        }

        function f(t) {
            var e, i = M.slice(0),
                n = 0;
            for (M = []; i.length;) e = i.shift(), e.name || (e.name = t.name), e.name === t.name ? (Y[e.name] = t, t.deps = e.deps, t.rawDef = e.rawDef, t.refModule = e.refModule, t.execute(), n = 1) : (Y[e.name] = e, e.execute());
            return delete q[t.name], n
        }

        function g(t, e, i) {
            var n, r = ["require", "exports", "module"];
            if (i || (i = e || t, "string" != typeof t ? (e = e ? t : r, t = 0) : e = r), I.test(t)) throw new Error('Not allowed to define reserved module id "' + t + '"');
            if (n = _(t, 0, e, i, 0, 1), t && !q[t]) n.execute();
            else {
                if (!t && o(q)) throw new Error("Unable to define anonymous module");
                M.push(n)
            }
        }

        function p(t, e) {
            var i = t.match(/(.+)(\.[^\/\.]+?)$/),
                n = _(i && i[1] || t, e, 0, 0, 1),
                o = n.url;
            return null !== n.pkg && (o = o.substring(0, o.length - 3)), o + (i && i[2] || "")
        }

        function m(t, e, i, o, r) {
            var a, s, u = 0,
                c = 0,
                h = n(t),
                l = "String" === h,
                f = new d(e, i);
            for ("Object" === h && (o = t, t = o.deps || []), l && (t = [t], r = 1), a = s = t.length; a > u;) ! function(e) {
                function i(i) {
                    t[e] = i instanceof Error && ++c ? void 0 : i.def, 0 === --s && (c ? f.reject(i) : f.resolve.apply(f, t), s = -1)
                }
                t[e] && _(t[e], o).load(r).then(i, i)
            }(u++);
            return 0 === s && f.resolve.apply(f, t), l ? t[0] : f
        }
        var T, v, b, y, w, I = /exports|module/,
            E = /^(.+?)\!(.*)$/,
            x = /\:|^\/\/|\.js$/,
            N = /^\./,
            S = /^\.\./,
            C = /^\//,
            L = /\/$/,
            A = /([^\/]+)\/?(.*)/,
            R = /^url\:(.+)/,
            W = /\.js$/,
            k = t.require || {},
            O = (1e3 * (k.waitSeconds || 7), k.baseUrl || "./"),
            D = k.timeout || 2e3,
            U = k.paths || {},
            M = [],
            P = {},
            B = {},
            H = 1,
            F = 2,
            V = 3,
            G = 4,
            z = 5,
            q = {},
            Y = {},
            j = {};
        if (t.handleFileResponse = function(t, e) {
                var i = "s" == e[0],
                    n = e.slice(1),
                    o = j[t];
                try {
                    o(i, j[t] = i ? n : void 0)
                } catch (r) {
                    setTimeout(function() {
                        throw r
                    })
                }
            }, c.once = function(t, e, i) {
                var n = c(t, e, function() {
                    return n && n(), i.apply(this, arguments)
                });
                return n
            }, i(d.prototype, {
                then: function() {
                    return this.thens.push(arguments), this
                },
                resolve: function() {
                    this._complete(0, arguments)
                },
                reject: function(t) {
                    this._complete(1, t instanceof Error ? t : new Error(t))
                },
                _complete: function(t, i) {
                    this.then = t ? function(t, e) {
                        e && e(i)
                    } : function(t) {
                        t && t.apply(null, i)
                    }, this._complete = e;
                    for (var n, o = 0, r = this.thens, a = r.length; a > o;) n = r[o++][t], n && n[t ? "call" : "apply"](null, i);
                    delete this.thens
                }
            }), L.test(O) || (O += "/"), b = k.packages) {
            for (v = b.length - 1; v >= 0;) h(b[v--]);
            delete k.packages
        }
        for (v in T = k.packagePaths)
            for (b = T[v], y = b.length - 1; y >= 0;) h(b[y--], v + "/");
        delete k.packagePaths, l.prototype.load = function(e) {
            function i() {
                clearTimeout(m), l && l.abort(), _ && (g(), p(), _.parentNode.removeChild(_))
            }

            function a(t) {
                i(), v.state = V, (v.rawDef = t) && (n(t, "String") ? W.test(v.url) ? (t = r(t, v.cjs), v.def = v.rawDef = o(t.exports) ? t.module && !o(t.module.exports) ? t.module.exports : null : t.exports, null === v.def && (v.rawDef = t)) : (v.def = t, v.state = G) : n(t, "Function") && (q[b] = v, t())), f(v) || v.execute()
            }

            function s(t) {
                i(), Y[b] = 0, delete q[b], v.state = z, w.reject('Failed to load module "' + b + '"' + (t ? ": " + t : ""))
            }
            var h, l, _, g, p, m, T = t.document,
                v = this,
                b = v.name,
                y = P[b],
                w = v.promise = v.promise || new d;
            return v.state !== G && v.url ? v.state === V || q[b] || (v.state === F || y ? (delete P[b], a(y)) : (q[b] = v, v.state = H, D && (m = setTimeout(function() {
                s("request timed out")
            }, D)), (v.sync = e) ? (t.hasWP8Extensions && u(v.url, 0, function(t, e) {
                (h = t) && a(e)
            }), h || (l = new XMLHttpRequest, l.open("GET", v.url, !1), l.send(null), 200 === l.status ? a(l.responseText) : s(l.status))) : (_ = v.node = T.createElement("script"), _.type = "text/javascript", _.charset = "utf-8", _.async = !0, g = c(_, "load", function(e) {
                e = e || t.event;
                var i = e.target || e.srcElement;
                ("load" === e.type || /complete|loaded/.test(i.readyState)) && (g(), p(), a())
            }), p = c(_, "error", function() {
                s()
            }), _.src = !~["http:", "https:"].indexOf(t.location.protocol) && /^\/\//.test(v.url) ? "http:" + v.url : v.url, h = T.getElementsByTagName("script")[0], h.parentNode.insertBefore(_, h)))) : v.execute(), w
        }, l.prototype.execute = function() {
            var t = this,
                e = t.promise = t.promise || new d,
                i = e.resolve;
            return t.state === G ? void i.call(e, t) : void m(t, function() {
                function o() {
                    t.state = G, delete t.deps, delete t.rawDef, i.call(e, t)
                }
                var a, s = t.rawDef,
                    u = M.slice(0);
                M = [], t.def = t.def || s && (n(s, "String") ? r(s, t.cjs) : n(s, "Function") ? s.apply(null, arguments) : n(s, "Object") ? function(t, e) {
                    for (var i in e) this[i] = e[i];
                    return t
                }.call({}, s, t.cjs) : null) || t.cjs.module.exports || t.cjs.exports, f(t), M = u, null !== t.plugin && (a = arguments[t.plugin], a.dynamic && delete Y[t.name], a.load && a.load(t.pluginArgs, t.cjs.require, function(e) {
                    t.def = e, o()
                }, t.pluginCfg)), a && a.load || o()
            }, function(t) {
                e.reject(t)
            }, t.refModule, t.sync)
        }, g.amd = {
            plugins: !0,
            vendor: "titanium"
        }, m.toUrl = p, i(m, w = {
            config: k,
            evaluate: r,
            is: n,
            isEmpty: o,
            mix: i,
            on: c,
            Promise: d,
            getFileFromNative: u,
            sendNativeMessage: s
        }), m.cache = function(t) {
            var e, i;
            if (n(t, "String")) return P[t];
            for (e in t) i = e.match(R), i ? P[p(i[1])] = t[e] : (i = _(e, 0, 0, t[e], 1), P[i.name] = i.rawDef)
        }, t.require = m, t.define = g
    }(window), require.cache({
        "Ti/_/image": function() {
            define(function() {
                return {
                    normalize: function(t) {
                        return t
                    },
                    load: function(t, e, i) {
                        var n = new Image;
                        n.onload = n.onerror = function() {
                            i(n), delete n.onload, delete n.onerror
                        }, n.src = e.toUrl(t)
                    }
                }
            })
        },
        "Ti/_/include": function() {
            define(function() {
                var t = {},
                    e = [];
                return {
                    dynamic: !0,
                    normalize: function(t, e) {
                        var i = t.split("!"),
                            n = i[0];
                        return i.shift(), (/^\./.test(n) ? e(n) : n) + (i.length ? "!" + i.join("!") : "")
                    },
                    load: function(i, n, o) {
                        var r, a, s, u, c = i.split("!"),
                            d = c.length;
                        if ((u = d > 1 && "sandbox" === c[0]) && (c.shift(), i = c.join("!")), s = n.toUrl(/^\//.test(i) ? i : "./" + i, e.length ? {
                                name: e[e.length - 1]
                            } : null), r = t[s] || n.cache(s), !r)
                            if (window.hasWP8Extensions) n.getFileFromNative(s, 0, function(t, e) {
                                if (!t) throw new Error('Failed to load include "' + s + '"');
                                r = e
                            });
                            else {
                                if (a = new XMLHttpRequest, a.open("GET", s, !1), a.send(null), 200 !== a.status) throw new Error('Failed to load include "' + s + '": ' + a.status);
                                r = a.responseText
                            }
                        e.push(s);
                        try {
                            n.evaluate(t[s] = r, 0, !u)
                        } catch (h) {
                            throw h
                        } finally {
                            e.pop()
                        }
                        o(r)
                    }
                }
            })
        },
        Ti: function() {
            define(["Ti/_", "Ti/API", "Ti/_/analytics", "Ti/App", "Ti/_/Evented", "Ti/_/has", "Ti/_/lang", "Ti/_/ready", "Ti/_/style", "Ti/Buffer", "Ti/Platform", "Ti/UI", "Ti/Locale", "Ti/_/include"], function(t, e, i, n, o, r, a, s, u, c, d, h) {
                function l() {}

                function _() {
                    g || (g = 1, n.fireEvent("close"), i.add("ti.end", "ti.end"))
                }
                var f, g, p, m, T = window,
                    v = require,
                    b = v.config,
                    y = n.deployType,
                    w = b.ti.version,
                    I = (v.is, v.on),
                    E = [],
                    x = a.setObject("Ti", o, {
                        constants: {
                            buildDate: b.ti.buildDate,
                            buildHash: b.ti.buildHash,
                            version: w
                        },
                        properties: {
                            userAgent: function() {
                                return navigator.userAgent
                            }
                        },
                        createBuffer: function(t) {
                            return new c(t)
                        },
                        include: function(t) {
                            "array" == typeof t || (t = [].concat(Array.prototype.slice.call(arguments, 0))), t.forEach(function(t) {
                                require("Ti/_/include!" + t)
                            })
                        },
                        deferStart: function() {
                            if (!f) {
                                var t = Math.round(1e12 * Math.random());
                                return E.push(t),
                                    function() {
                                        var e = E.indexOf(t);
                                        ~e && E.splice(e, 1), f = 1, E.length || (r("ti-instrumentation") && instrumentation.stopTest(instrumentation.systemLoadTimeTest), require(b.main || ["app.js"]))
                                    }
                            }
                            e.warn("app.js already loaded!")
                        }
                    }),
                    N = x.deferStart();
                if (r("function-bind") || (Function.prototype.bind = function(t) {
                        var e = this,
                            i = Array.prototype.slice,
                            n = i.call(arguments, 1),
                            o = function() {
                                var r, a = n.concat(i.call(arguments));
                                return this instanceof o ? (r = e.apply(this, a), Object(r) === r ? r : this) : e.apply(t, a)
                            };
                        return e.prototype && (l.prototype = e.prototype, o.prototype = new l, l.prototype = null), o
                    }), !r("js-btoa")) {
                    var S = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
                        C = String.fromCharCode;
                    T.btoa = function(t) {
                        for (var e, i, n, o, r, a, s, u = [], c = 0, d = t.length; d > c;) e = t.charCodeAt(c++), i = t.charCodeAt(c++), n = t.charCodeAt(c++), o = e >> 2, r = (3 & e) << 4 | i >> 4, a = (15 & i) << 2 | n >> 6, s = 63 & n, isNaN(i) ? a = s = 64 : isNaN(n) && (s = 64), u.push(S.charAt(o) + S.charAt(r) + S.charAt(a) + S.charAt(s));
                        return u.join("")
                    }, T.atob = function(t) {
                        var e, i, n, o, r = [],
                            a = 0,
                            s = t.length;
                        for (t = t.replace(/[^A-Za-z0-9\+\/\=]/g, ""); s > a;) e = S.indexOf(t.charAt(a++)), i = S.indexOf(t.charAt(a++)), n = S.indexOf(t.charAt(a++)), o = S.indexOf(t.charAt(a++)), r.push(C(e << 2 | i >> 4)), 64 !== n && r.push(C((15 & i) << 4 | n >> 2)), 64 !== o && r.push(C((3 & n) << 6 | o));
                        return r.join("")
                    }
                }
                return r("winstore_extensions") && (T.alert = function(t) {
                    m ? e.warn("Cannot show more than one alert at a time") : (m = 1, new Windows.UI.Popups.MessageDialog(t).showAsync().done(function() {
                        m = 0
                    }))
                }), Object.defineProperty(T, "Ti", {
                    value: x,
                    writable: !1
                }), Object.defineProperty(T, "Titanium", {
                    value: x,
                    writable: !1
                }), e.info("Appcelerator Titanium " + w + " Mobile Web"), b.vendorPrefixes || (b.vendorPrefixes = ["", "Moz", "Webkit", "O", "ms"]), x.parse = JSON.parse, x.stringify = JSON.stringify, I(T, "beforeunload", _), I(T, "unload", _), r("ti-show-errors") && I(T, "error", function(t) {
                    function e(t, e, i, n) {
                        u.add(h.createLabel({
                            color: i,
                            font: {
                                fontSize: n,
                                fontWeight: "bold"
                            },
                            height: e,
                            left: 10,
                            right: 10,
                            textAlign: h.TEXT_ALIGNMENT_CENTER,
                            text: t
                        }))
                    }
                    if (!p) {
                        p = 1;
                        var i, n, o = t.filename || "",
                            r = o.match(/:\/\/.+(\/.*)/),
                            a = r ? r[1] : t.filename,
                            s = t.lineno,
                            u = h.createWindow({
                                backgroundColor: "#f00",
                                top: "100%",
                                height: "100%",
                                layout: h._LAYOUT_CONSTRAINING_VERTICAL
                            });
                        e("Application Error", "15%", "#0f0", "24pt"), e((t.message || "Unknown error").trim() + (a && "undefined" !== a ? " at " + a : "") + (s ? " (line " + s + ")" : ""), "45%", "#fff", "16pt"), u.add(i = h.createView({
                            height: "12%"
                        })), i.add(n = h.createButton({
                            title: "Dismiss"
                        })), u.addEventListener("close", function() {
                            u.destroy()
                        }), n.addEventListener("singletap", function() {
                            u.animate({
                                duration: 500,
                                top: "100%"
                            }, function() {
                                u.close(), p = 0
                            })
                        }), e("Error messages will only be displayed during development. When your app is packaged for final distribution, no error screen will appear. Test your code!", "28%", "#000", "10pt"), I.once(u, "postlayout", function() {
                            setTimeout(function() {
                                u.animate({
                                    duration: 500,
                                    top: 0
                                }, function() {
                                    u.top = 0, u.height = "100%"
                                })
                            }, 100)
                        }), u.open()
                    }
                    return !0
                }), s(function() {
                    u.set(document.body, {
                        margin: 0,
                        padding: 0
                    }), n.analytics && (null === localStorage.getItem("ti:enrolled") && (i.add("ti.enroll", "ti.enroll", {
                        app_name: n.name,
                        app_version: n.version,
                        oscpu: 1,
                        mac_addr: null,
                        deploytype: y,
                        ostype: d.osname,
                        osarch: null,
                        app_id: n.id,
                        platform: d.name,
                        model: d.model
                    }), localStorage.setItem("ti:enrolled", !0)), i.add("ti.start", "ti.start", {
                        tz: (new Date).getTimezoneOffset(),
                        deploytype: y,
                        os: d.osname,
                        osver: d.ostype,
                        version: b.ti.version,
                        platform: d.name,
                        model: d.model,
                        un: null,
                        app_version: n.version,
                        nettype: null
                    }), i.send()), setTimeout(N, 1)
                }), x
            })
        },
        "Ti/_": function() {
            define(["Ti/_/lang"], function(t) {
                var e, i = document.body,
                    n = document.createElement("div");
                return n.style.width = "1in", n.style.visibility = "hidden", i.appendChild(n), e = parseInt(n.clientWidth), i.removeChild(n), t.setObject("Ti._", {
                    assert: function(t, e) {
                        if (!t) throw new Error(e)
                    },
                    dpi: e,
                    escapeHtmlEntities: function(t) {
                        return ("" + t).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;")
                    },
                    getAbsolutePath: function(t) {
                        return /^app\:\/\//.test(t) && (t = t.substring(6)), /^\//.test(t) && (t = t.substring(1)), /^\/\//.test(t) || ~t.indexOf("://") ? t : location.pathname.replace(/(.*)\/.*/, "$1") + "/" + t
                    },
                    isBinaryMimeType: function(t) {
                        return /^(application|image|audio|video)\/(?!javascript|x\-javascript|atom\+xml|rss\+xml|json)/.test(t)
                    },
                    uuid: function() {
                        return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
                            var e = 16 * Math.random() | 0,
                                i = "x" == t ? e : 3 & e | 8;
                            return i.toString(16)
                        }).toUpperCase()
                    }
                })
            })
        },
        "Ti/_/lang": function() {
            define(["Ti/_/has"], function() {
                function t(t, e) {
                    return [].concat(Array.prototype.slice.call(t, e || 0))
                }

                function e(e, i) {
                    var o = t(arguments, 2),
                        r = "string" == typeof i;
                    return function() {
                        var a = e || n,
                            s = r ? a[i] : i;
                        return s && s.apply(a, o.concat(t(arguments)))
                    }
                } {
                    var i, n = this;
                    require.is
                }
                return {
                    hitch: i = function(t, i) {
                        if (arguments.length > 2) return e.apply(n, arguments);
                        if (i || (i = t, t = null), "string" == typeof i) {
                            if (t = t || n, !t[i]) throw ['hitch: scope["', i, '"] is null (scope="', t, '")'].join("");
                            return function() {
                                return t[i].apply(t, arguments || [])
                            }
                        }
                        return t ? function() {
                            return i.apply(t, arguments || [])
                        } : i
                    },
                    isDef: function(t) {
                        return void 0 !== t
                    },
                    mixProps: function(t, e, i, n) {
                        var o, r, a, s, u, c = e.__def__,
                            d = c || e,
                            h = /^constructor|__values__|__def__|declaredClass$/,
                            l = {
                                properties: 1,
                                constants: 0
                            };
                        n && t.__def__ || (t.__def__ = {});
                        for (o in d)
                            if (d.hasOwnProperty(o) && !h.test(o))
                                if (l.hasOwnProperty(o)) {
                                    s = t.__def__[o] || (t.__def__[o] = {}), r = d[o];
                                    for (a in r) u = s.hasOwnProperty(a), c && u || (u || (s[a] = r[a]), function(e, n, o, r, a) {
                                        var s = o && "object" == typeof o,
                                            u = s && o.get,
                                            c = s && o.set,
                                            d = s && o.post,
                                            h = {
                                                get: function() {
                                                    var t = this.__values__[e][n];
                                                    return u ? ("string" == typeof u ? this[u] : u).call(this, t) : t
                                                },
                                                set: function(t) {
                                                    if (!a) throw new Error('Property "' + n + '" is read only');
                                                    var i = this.__values__[e],
                                                        o = [t, i[n], n];
                                                    o[0] = i[n] = c ? ("string" == typeof c ? this[c] : c).apply(this, o) : t, d && ("function" == typeof d ? d : this[d]).apply(this, o)
                                                },
                                                configurable: !0,
                                                enumerable: !0
                                            };
                                        s && (u || c || d) ? i && (t.__values__[e][n] = o.value) : "function" == typeof o ? u = o : i && (t.__values__[e][n] = o), Object.defineProperty(t, n, h), (a || n.toUpperCase() !== n) && (t["get" + r] = h.get, a && (t["set" + r] = h.set))
                                    }(o, a, r[a], a.substring(0, 1).toUpperCase() + a.substring(1), l[o]))
                                } else c && (c.properties && c.properties.hasOwnProperty(o) || c.constants && c.constants.hasOwnProperty(o)) || (n && t.__def__.hasOwnProperty(o) || (t.__def__[o] = d[o]), t[o] = d[o]);
                        return t
                    },
                    generateAccessors: function(t, e, i) {
                        function n(e) {
                            var i = "get" + e.substring(0, 1).toUpperCase() + e.substring(1);
                            i in t.prototype || (t.prototype[i] = function() {
                                return this[e]
                            })
                        }

                        function o(e) {
                            var i = "set" + e.substring(0, 1).toUpperCase() + e.substring(1);
                            i in t.prototype || (t.prototype[i] = function(t) {
                                return this[e] = t
                            })
                        }
                        e && e.split(",").forEach(n), i && i.split(",").forEach(function(t) {
                            n(t), o(t)
                        })
                    },
                    setObject: function(t) {
                        var e, i, n = t.split("."),
                            o = n.pop(),
                            r = window,
                            a = 0,
                            s = n[a++];
                        if (s)
                            do r = s in r ? r[s] : r[s] = {}; while (r && (s = n[a++]));
                        if (r && o) {
                            i = o in r ? r[o] : {};
                            for (a = 1; a < arguments.length; a++) e = arguments[a], e && "object" == typeof e ? (i.__values__ || (i.__values__ = {
                                constants: {},
                                properties: {}
                            }), this.mixProps(i, e, 1)) : i = e
                        }
                        return r[o] = i
                    },
                    toArray: t,
                    urlEncode: function(t) {
                        var e, i, n, o, r = encodeURIComponent,
                            a = [];
                        for (e in t)
                            if (t.hasOwnProperty(e))
                                for (Array.isArray(i = t[e]) || (i = [i]), e = r(e) + "=", n = 0, o = i.length; o > n;) a.push(e + r(i[n++]));
                        return a.join("&")
                    },
                    val: function(t, e) {
                        return void 0 === t ? e : t
                    }
                }
            })
        },
        "Ti/_/has": function() {
            define(function() {
                function t(t) {
                    var e = n[t];
                    return require.is(e, "Function") && (e = n[t] = e(o, r, a)), e
                }
                var e, i = require.config,
                    n = i.hasCache || {},
                    o = window,
                    r = o.document,
                    a = r.createElement("div");
                t.add = function(e, i, o, r) {
                    return (void 0 === n[e] || r) && (n[e] = i), o && t(e)
                };
                for (e in i.has) t.add(e, i.has[e], 0, !0);
                return delete i.has, t
            })
        },
        "Ti/API": function() {
            define(["Ti/_/Evented", "Ti/_/lang"], function(t, e) {
                var i, n = {},
                    o = window,
                    r = o.console,
                    a = 0,
                    s = ["debug", "trace", "error", "fatal", "critical", "notice", "warn", "info"];
                void 0 === r && (r = o.console = {}), s.forEach(function(t) {
                    r[t] || (r[t] = "log" in r ? function() {
                        var e = Array.apply({}, arguments);
                        e.unshift(t + ":"), r.log(e.join(" "))
                    } : function() {})
                }), r.trace = 0;
                for (; 9 > a; a++) ! function(t) {
                    var r = i = console[t] ? t : i;
                    n[t] = function() {
                        var i = "[" + t.toUpperCase() + "] " + e.toArray(arguments).map(function(t) {
                            return require.is(t, "Object") ? t.hasOwnProperty("toString") ? t.toString() : JSON.stringify(t) : null === t ? "null" : void 0 === t ? "undefined" : t
                        }).join(" ");
                        o.hasWP8Extensions ? require.sendNativeMessage("l", i) : console[r](i)
                    }
                }(s[a]);
                return n.log = function() {
                    var t = e.toArray(arguments),
                        i = ~s.indexOf(("" + t[0]).toLowerCase()) && t.shift().toLowerCase();
                    n[i || "info"].apply(this, t)
                }, e.setObject("Ti.API", t, n)
            })
        },
        "Ti/_/Evented": function() {
            define(function() {
                var t = require.mix;
                return {
                    destroy: function() {
                        for (var t in this) delete this[t];
                        this._alive = 0
                    },
                    addEventListener: function(t, e) {
                        this.listeners || (this.listeners = {}), (this.listeners[t] = this.listeners[t] || []).push(e)
                    },
                    removeEventListener: function(t, e) {
                        if (this.listeners)
                            if (e)
                                for (var i = 0, n = this.listeners[t], o = n && n.length || 0; o > i; i++) n[i] === e && n.splice(i, 1);
                            else delete this.listeners[t]
                    },
                    fireEvent: function(e, i) {
                        var n = 0,
                            o = this._modifiers && this._modifiers[e],
                            r = this.listeners && this.listeners[e],
                            a = o && o.length;
                        for (i = i || {}, t(i, {
                                source: i.source || this,
                                type: e
                            }); a > n;) o[n++].call(this, i);
                        if (r)
                            for (r = [].concat(r), n = 0, a = r.length; a > n;) r[n++].call(this, i)
                    },
                    applyProperties: function(e) {
                        t(this, e)
                    },
                    _addEventModifier: function(t, e) {
                        this._modifiers || (this._modifiers = {}), (require.is(t, "Array") ? t : [t]).forEach(function(t) {
                            (this._modifiers[t] = this._modifiers[t] || []).push(e)
                        }, this)
                    },
                    constants: {
                        apiName: {
                            get: function() {
                                return this.declaredClass
                            }
                        }
                    }
                }
            })
        },
        "Ti/_/analytics": function() {
            define(["Ti/_", "Ti/_/dom", "Ti/_/has", "Ti/_/lang", "Ti/App", "Ti/Platform"], function(t, e, i, n, o, r) {
                function a() {
                    var t = localStorage.getItem("ti:analyticsEvents");
                    return t ? JSON.parse(t) : []
                }

                function s(t) {
                    localStorage.setItem("ti:analyticsEvents", JSON.stringify(t))
                }

                function u(t) {
                    if (t && "object" == typeof t && t.success) {
                        var e, i = f[t.callback],
                            n = [],
                            o = a(),
                            r = 0,
                            u = o.length;
                        if (i) {
                            for (; u > r;) e = o[r++], ~i.indexOf(e.id) || n.push(e);
                            s(n)
                        }
                    }
                }
                var c, d = window,
                    h = (require.is, require.config, o.analytics),
                    l = null,
                    _ = "https://api.appcelerator.net/p/v3/mobile-web-track/" + o.guid,
                    f = {},
                    g = 6e4,
                    p = {
                        add: function(e, i, n, o) {
                            if (h) {
                                var r = a();
                                r.push({
                                    id: t.uuid(),
                                    type: e,
                                    evt: i,
                                    ts: (new Date).toISOString().replace("Z", "+0000"),
                                    data: n
                                }), s(r), this.send(o)
                            }
                        },
                        send: function(n) {
                            if (h) {
                                var s, d = Math.floor(1e6 * Math.random()),
                                    m = Date.now(),
                                    T = [],
                                    v = [],
                                    b = sessionStorage.getItem("ti:sessionId"),
                                    y = sessionStorage.getItem("ti:analyticsSeqId"),
                                    w = a(),
                                    I = 0,
                                    E = w.length;
                                if ("string" == typeof y && (y = JSON.parse(y)), clearTimeout(c), E && (n || null == l || m - l >= g)) {
                                    for (b || (b = t.uuid()), null == y && (y = 0); E > I;) s = w[I++], T.push(s.id), v.push({
                                        id: s.id,
                                        mid: r.id,
                                        rdu: null,
                                        type: s.type,
                                        aguid: o.guid,
                                        event: s.evt,
                                        seq: y++,
                                        ver: "2",
                                        deploytype: o.deployType,
                                        sid: b,
                                        ts: s.ts,
                                        data: s.data
                                    }), "ti.end" == s.type && (y = 0, b = t.uuid());
                                    if (sessionStorage.setItem("ti:sessionId", b), sessionStorage.setItem("ti:analyticsSeqId", y), f[d] = T, l = m, v = JSON.stringify(v), i("ti-analytics-use-xhr")) {
                                        var x = new XMLHttpRequest;
                                        x.onreadystatechange = function() {
                                            if (4 == x.readyState && 200 == x.status) try {
                                                var t = JSON.parse(x.responseText);
                                                t.callback = d, u(t)
                                            } catch (e) {}
                                        }, x.open("POST", _, !0), x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), x.send("content=" + encodeURIComponent(v))
                                    } else {
                                        var N = document.body,
                                            S = "analytics" + d,
                                            C = e.create("iframe", {
                                                id: S,
                                                name: S,
                                                style: {
                                                    display: "none"
                                                }
                                            }, N),
                                            L = e.create("form", {
                                                action: _ + "?callback=" + d + "&output=html",
                                                method: "POST",
                                                style: {
                                                    display: "none"
                                                },
                                                target: S
                                            }, N);
                                        e.create("input", {
                                            name: "content",
                                            type: "hidden",
                                            value: v
                                        }, L), setTimeout(function() {
                                            function t() {
                                                setTimeout(function() {
                                                    e.destroy(L), e.destroy(C)
                                                }, 1)
                                            }
                                            C.onload = t, C.onerror = t, L.submit()
                                        }, 25)
                                    }
                                }
                                c = setTimeout(function() {
                                    p.send(1)
                                }, g)
                            }
                        }
                    };
                return require.on(d, "message", function(t) {
                    u(t.data)
                }), p
            })
        },
        "Ti/_/dom": function() {
            define(["Ti/_", "Ti/API", "Ti/_/style"], function(t, e, i) {
                var n = require.is,
                    o = {
                        innerHTML: 1,
                        className: 1,
                        value: 1
                    },
                    r = {
                        classname: "class",
                        htmlfor: "for",
                        tabindex: "tabIndex",
                        readonly: "readOnly"
                    },
                    a = {
                        "class": "className",
                        "for": "htmlFor",
                        tabindex: "tabIndex",
                        readonly: "readOnly",
                        colspan: "colSpan",
                        frameborder: "frameBorder",
                        rowspan: "rowSpan",
                        valuetype: "valueType"
                    },
                    s = {
                        set: function(t, e, u) {
                            if (2 === arguments.length) {
                                for (var c in e) s.set(t, c, e[c]);
                                return t
                            }
                            var d = e.toLowerCase(),
                                h = a[d] || e,
                                l = o[h];
                            return "style" !== h || require.is(u, "String") ? l || n(u, "Boolean") || n(u, "Function") ? (t[e] = u, t) : (t.setAttribute(r[d] || e, u), t) : i.set(t, u)
                        },
                        remove: function(t, e) {
                            return t.removeAttribute(e), t
                        }
                    };
                return {
                    create: function(t, e, i, o) {
                        var r = i ? i.ownerDocument : document;
                        return n(t, "String") && (t = r.createElement(t)), e && s.set(t, e), i && this.place(t, i, o), t
                    },
                    attr: s,
                    place: function(t, e) {
                        return e.appendChild(t), t
                    },
                    detach: function(t) {
                        return t.parentNode && t.parentNode.removeChild(t)
                    },
                    destroy: function(t) {
                        try {
                            var e = t.ownerDocument.createElement("div");
                            e.appendChild(this.detach(t) || t), e.innerHTML = ""
                        } catch (i) {}
                    },
                    calculateDistance: function(t, e, i, n) {
                        return Math.sqrt(Math.pow(t - i, 2) + Math.pow(e - n, 2))
                    },
                    unitize: function(t) {
                        return isNaN(t - 0) || t - 0 != t ? t : t + "px"
                    },
                    computeSize: function(i, o, r) {
                        if (n(i, "Number") && isNaN(i)) return 0;
                        var a = require.is(i);
                        if ("String" === a) {
                            var s = require("Ti/UI");
                            if (i === s.SIZE) r && (i = void 0);
                            else {
                                var u = parseFloat(i),
                                    c = i.match(/.*(%|mm|cm|em|pt|in|px|dp)$/);
                                switch (c = c ? c[1] : "px") {
                                    case "%":
                                        if (o == s.SIZE) r ? void 0 : s.SIZE;
                                        else if (!require.is(o, "Number")) return void e.error("Could not compute percentage size/position of element.");
                                        return u / 100 * o;
                                    case "mm":
                                        u /= 10;
                                    case "cm":
                                        return .393700787 * u * t.dpi;
                                    case "em":
                                    case "pt":
                                        u /= 12;
                                    case "pc":
                                        u /= 6;
                                    case "in":
                                        return u * t.dpi;
                                    case "px":
                                        return u;
                                    case "dp":
                                        return u * t.dpi / 96
                                }
                            }
                        } else "Number" !== a && (i = void 0);
                        return i
                    }
                }
            })
        },
        "Ti/_/style": function() {
            define(["Ti/_", "Ti/_/string", "Ti/Filesystem"], function(t, e, i) {
                function n(t, i, a) {
                    var s, u, c = 0;
                    if (t)
                        if (arguments.length > 2) {
                            for (; c < o.length;)
                                if (s = o[c++], s += s ? u || (u = e.capitalize(i)) : i, s in t.style) return (r(a, "Array") ? a : [a]).forEach(function(e) {
                                    t.style[s] = e
                                }), a
                        } else
                            for (s in i) n(t, s, i[s]);
                    return t
                }
                var o = require.config.vendorPrefixes.dom,
                    r = require.is,
                    a = document.createElement("p");
                return {
                    discover: function(t, i) {
                        var n, r, s = 0;
                        for (i || (i = a); s < o.length;)
                            if (n = o[s++], n += n ? r || (r = e.capitalize(t)) : t, n in i.style) return n;
                        return t
                    },
                    get: function(t, e) {
                        return t.style[this.discover(e, t)]
                    },
                    set: n,
                    supports: function(t, e) {
                        var i = this.discover(t, e);
                        return i in e.style
                    },
                    url: function(e) {
                        if (e && "Ti.Blob" === e.declaredClass) return "url(" + e.toString() + ")";
                        var n = e && e.match(/^(.+):\/\//),
                            o = n && ~i.protocols.indexOf(n[1]) && i.getFile(e);
                        return o && o.exists() ? "url(" + o.read().toString() + ")" : e && "none" !== e ? /^url\(/.test(e) ? e : "url(" + (require.cache(e) || t.getAbsolutePath(e)) + ")" : ""
                    }
                }
            })
        },
        "Ti/_/string": function() {
            define(["Ti/_", "Ti/_/has", "Ti/_/lang"], function(t, e, i) {
                function n(t, e, i) {
                    var n, o = e - 10;
                    for (d(t.arg, "String") || (t.arg = "" + t.arg); t.arg.length < o;) t.arg = t.rightJustify ? t.arg + i : i + t.arg;
                    n = e - t.arg.length, t.arg = t.rightJustify ? t.arg + i.substring(0, n) : i.substring(0, n) + t.arg
                }

                function o(t, e) {
                    n(t, i.val(e, t.precision), _)
                }

                function r(t, e) {
                    n(t, i.val(e, t.minWidth), f)
                }

                function a(t) {
                    t.maxWidth >= 0 && t.arg.length > t.maxWidth ? t.arg.substring(0, t.maxWidth) : t.zeroPad ? o(t, t.minWidth) : r(t)
                }

                function s(t) {
                    var e = parseInt(t.arg);
                    isFinite(e) || (c(!d(t.arg, "Number"), "Format argument '" + t.arg + "' not an integer; parseInt returned " + e), e = 0), 0 > e && (t.isUnsigned || 10 != t.base) && (e = 4294967295 + e + 1), 0 > e ? (t.arg = (-e).toString(t.base), o(t), t.arg = "-" + t.arg) : (t.arg = e.toString(t.base), e || t.precision ? o(t) : t.arg = "", t.sign && (t.arg = t.sign + t.arg)), 16 === t.base && (t.alternative && (t.arg = "0x" + t.arg), t.arg = t.toUpper ? t.arg.toUpperCase() : t.arg.toLowerCase()), 8 === t.base && t.alternative && "0" != t.arg.charAt(0) && (t.arg = "0" + t.arg)
                }

                function u(t) {
                    var e = parseFloat(t.arg);
                    switch (isFinite(e) || (c(!d(t.arg, "Number"), "Format argument '" + t.arg + "' not a float; parseFloat returned " + e), e = 0), t.specifier) {
                        case "e":
                            t.arg = e.toExponential(t.precision);
                            break;
                        case "f":
                            t.arg = e.toFixed(t.precision);
                            break;
                        case "g":
                            t.arg = Math.abs(e) < 1e-4 ? e.toExponential(t.precision > 0 ? t.precision - 1 : t.precision) : e.toPrecision(t.precision), t.alternative || (t.arg = t.arg.replace(/(\..*[^0])0*/, "$1"), t.arg = t.arg.replace(/\.0*e/, "e").replace(/\.0$/, ""));
                            break;
                        default:
                            throw new Error("Unexpected double notation '" + t.doubleNotation + "'")
                    }
                    t.arg = t.arg.replace(/e\+(\d)$/, "e+0$1").replace(/e\-(\d)$/, "e-0$1"), l && (t.arg = t.arg.replace(/^\./, "0.")), t.alternative && (t.arg = t.arg.replace(/^(\d+)$/, "$1."), t.arg = t.arg.replace(/^(\d+)e/, "$1.e")), e >= 0 && t.sign && (t.arg = t.sign + t.arg), t.arg = t.toUpper ? t.arg.toUpperCase() : t.arg.toLowerCase()
                }
                var c = t.assert,
                    d = require.is,
                    h = require.mix,
                    l = e("opera"),
                    _ = "0000000000",
                    f = "          ",
                    g = {
                        b: {
                            base: 2,
                            isInt: 1
                        },
                        o: {
                            base: 8,
                            isInt: 1
                        },
                        x: {
                            base: 16,
                            isInt: 1
                        },
                        X: {
                            extend: ["x"],
                            toUpper: 1
                        },
                        d: {
                            base: 10,
                            isInt: 1
                        },
                        i: {
                            extend: ["d"]
                        },
                        u: {
                            extend: ["d"],
                            isUnsigned: 1
                        },
                        c: {
                            setArg: function(t) {
                                if (!isNaN(t.arg)) {
                                    var e = parseInt(t.arg);
                                    c(0 > e || e > 127, "Invalid character code passed to %c in sprintf"), t.arg = isNaN(e) ? "" + e : String.fromCharCode(e)
                                }
                            }
                        },
                        s: {
                            setMaxWidth: function(t) {
                                t.maxWidth = "." === t.period ? t.precision : -1
                            }
                        },
                        e: {
                            isDouble: 1
                        },
                        E: {
                            extend: ["e"],
                            toUpper: 1
                        },
                        f: {
                            isDouble: 1
                        },
                        F: {
                            extend: ["f"]
                        },
                        g: {
                            isDouble: 1
                        },
                        G: {
                            extend: ["g"],
                            toUpper: 1
                        }
                    };
                return String.format = function(t) {
                    for (var e, n, o, r, _ = i.toArray(arguments), f = /\%(?:\(([\w_]+)\)|([1-9]\d*)\$)?([0 +\-\#]*)(\*|\d+)?(\.)?(\*|\d+)?[hlL]?([\%scdeEfFgGiouxX])/g, p = [], m = 0, T = 0, v = 0, b = "", y = ["mapping", "intmapping", "flags", "_minWidth", "period", "_precision", "specifier"]; n = f.exec(t);) {
                        if (r = t.slice(T, f.lastIndex - n[0].length), r.length && p.push(r), l) {
                            for (o = n.slice(0); o.length < n.length;) o.push(null);
                            n = o
                        }
                        e = {}, n.slice(1).concat(p.length).map(function(t, i) {
                            y[i] && (e[y[i]] = t)
                        }), p.push(e), e[0] && m++, T = f.lastIndex
                    }
                    return r = t.slice(T), r.length && p.push(r), _.shift(), c(!m || _.length, "Format has no mapped arguments"), p.forEach(function(e) {
                        var i, n, o, r = {},
                            l = g[e.specifier];
                        if (d(e, "String")) b += e;
                        else {
                            if (m ? c(void 0 === _[e.mapping], "Missing key " + e.mapping) : (e.intmapping && (v = parseInt(e.intmapping) - 1), c(v < _.length, "Got " + _.length + " format arguments, insufficient for '" + t + "'")), e.arg = _[m ? e.mapping : v++], !e.compiled) {
                                for (h(e, {
                                        compiled: 1,
                                        sign: "",
                                        zeroPad: 0,
                                        rightJustify: 0,
                                        alternative: 0,
                                        minWidth: 0 | e._minWidth,
                                        maxWidth: -1,
                                        toUpper: 0,
                                        isUnsigned: 0,
                                        isInt: 0,
                                        isDouble: 0,
                                        precision: "." === e.period ? 0 | e._precision : 1
                                    }), i = e.flags, n = i.length; n--;) switch (r[o = i.charAt(n)] = 1, o) {
                                    case " ":
                                        e.sign = " ";
                                        break;
                                    case "+":
                                        e.sign = "+";
                                        break;
                                    case "0":
                                        e.zeroPad = !r["-"];
                                        break;
                                    case "-":
                                        e.rightJustify = 1, e.zeroPad = 0;
                                        break;
                                    case "#":
                                        e.alternative = 1;
                                        break;
                                    default:
                                        throw new Error("Bad formatting flag '" + o + "'")
                                }
                                c(void 0 !== l, "Unexpected specifier '" + e.specifier + "'"), l.extend && (h(l, g[l.extend]), delete l.extend), h(e, l)
                            }
                            d(e.setArg, "Function") && e.setArg(e), d(e.setMaxWidth, "Function") && e.setMaxWidth(e), "*" === e._minWidth && (c(m, "* width not supported in mapped formats"), c(isNaN(e.minWidth = parseInt(_[v++])), "The argument for * width at position " + v + " is not a number in " + this._format), e.minWidth < 0 && (e.rightJustify = 1, e.minWidth = -e.minWidth)), "*" === e._precision && "." === e.period && (c(m, "* precision not supported in mapped formats"), c(isNaN(e.precision = parseInt(_[v++])), "The argument for * precision at position " + v + " is not a number in " + this._format), e.precision < 0 && (e.precision = 1, e.period = "")), e.isInt ? ("." === e.period && (e.zeroPad = 0), s(e)) : e.isDouble && ("." !== e.period && (e.precision = 6), u(e)), a(e), b += "" + e.arg
                        }
                    }), b
                }, {
                    capitalize: function(t) {
                        return t = t || "", t.substring(0, 1).toUpperCase() + t.substring(1)
                    },
                    trim: String.prototype.trim ? function(t) {
                        return t.trim()
                    } : function(t) {
                        return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "")
                    }
                }
            })
        },
        "Ti/Filesystem": function() {
            define(["Ti/_", "Ti/_/Evented", "Ti/_/lang", "Ti/Filesystem/File"], function(t, e, i, n) {
                function o() {
                    var t, e = /(.+:\/\/)?(.*)/,
                        n = "",
                        o = [],
                        r = i.toArray(arguments).filter(function(t) {
                            return void 0 !== t
                        }).map(function(t) {
                            return n || (n = t.match(e)) && (n = n[1] || ""), t.replace(n, "").replace(/^\/|\/$/g, "")
                        }).join("/");
                    return r.split("/").forEach(function(e) {
                        if (".." === e && ".." !== t) {
                            if (!o.length) throw new Error('Irrational path "' + r + '"');
                            o.pop(), t = o[o.length - 1]
                        } else e && "." !== e && o.push(t = e)
                    }), r = n + o.join("/"), n || /^\//.test(r) || (r = "/" + r), r
                }

                function r(e) {
                    var i = new n({
                        _type: e.charAt(0),
                        nativePath: s + t.uuid()
                    });
                    return i["create" + e]() ? i : null
                }
                var a = "appdata://",
                    s = "tmp://";
                return i.setObject("Ti.Filesystem", e, {
                    constants: {
                        MODE_APPEND: 4,
                        MODE_READ: 1,
                        MODE_WRITE: 2,
                        applicationDataDirectory: a,
                        lineEnding: "\n",
                        resourcesDirectory: "/",
                        separator: "/",
                        tempDirectory: s
                    },
                    protocols: ["appdata", "tmp"],
                    createTempDirectory: function() {
                        return r("Directory")
                    },
                    createTempFile: function() {
                        return r("File")
                    },
                    getFile: function() {
                        return new n(o.apply(null, arguments))
                    },
                    isExternalStoragePresent: function() {
                        return !1
                    },
                    openStream: function(t) {
                        var e, r = i.toArray(arguments);
                        return r.shift(), e = new n(o.apply(null, r)), e.open(t)
                    }
                })
            })
        },
        "Ti/Filesystem/File": function() {
            define(["Ti/_/declare", "Ti/_/Filesystem/Local", "Ti/App/Properties"], function(t, e, i) {
                var n = i.getString("ti.fs.backend");
                return t("Ti.Filesystem.File", n ? require(n) : e)
            })
        },
        "Ti/_/declare": function() {
            define(["Ti/_", "Ti/_/lang"], function(t, e) {
                function i(t, i, a) {
                    var s, u, c = {},
                        d = [];
                    return "string" != typeof t && (a = i, i = t, t = ""), c.__def__ = a = a || {}, u = a.constructor, "function" == typeof u && u !== o.constructor && d.push(u), "function" == typeof i ? (u = i.prototype, u.__ctors__ && (d = d.concat(u.__ctors__)), e.mixProps(c, u, 0, 1)) : i && "object" == typeof i && e.mixProps(c, i, 0, 1), c.declaredClass = t, e.mixProps(c, a), c.__ctors__ = d, s = new Function("con", "return function " + (t && t.replace(r, "") || "AnonymousClass") + "(){con.apply(this,arguments);};")(function() {
                        var t, e, i, r, a = this.declaredClass,
                            s = arguments,
                            u = s[0],
                            c = ["properties", "constants"],
                            h = this.__def__,
                            l = this.__values__ = {};
                        for (a && (n[a] || (n[a] = 0), this.widgetId = a + ":" + n[a] ++), t = 0; t < c.length; t++)
                            if (i = c[t], h[i])
                                for (e in h[i]) r = h[i][e], r && "object" == typeof r && ("function" == typeof r.get || "function" == typeof r.set || r.post) ? (l[i] || (l[i] = {}), l[i][e] = r.value) : "function" != typeof r && (l[i] || (l[i] = {}), l[i][e] = r);
                        for (t = d.length; t;) d[--t].apply(this, s);
                        if (u && "object" == typeof u) {
                            e = this.__values__.constants;
                            for (t in u)(e && e.hasOwnProperty(t) ? e : this)[t] = u[t]
                        }
                        this.toString === o.toString && (this.toString = function() {
                            return "[object " + (a ? a.replace(/\./g, "") : "Object") + "]"
                        }), f = this.postscript, f && f.apply(this, s)
                    }), s.prototype = c, t && e.setObject(t, s), s
                }
                var n = {},
                    o = Object.prototype,
                    r = /^\d*|[^A-Za-z0-9_]*/g;
                return t.declare = i
            })
        },
        "Ti/_/Filesystem/Local": function() {
            define(["Ti/_", "Ti/_/Evented", "Ti/_/declare", "Ti/_/encoding", "Ti/_/lang", "Ti/API", "Ti/Blob"], function(t, e, i, n, o, r, a) {
                function s(t, e) {
                    return y.getItem("ti:fs:" + (e ? "meta:" : "blob:") + t)
                }

                function u(t, e, i) {
                    return y.setItem("ti:fs:" + (i ? "meta:" : "blob:") + t, e), e.length
                }

                function c(t, e) {
                    if (window.hasWP8Extensions) {
                        var i;
                        return require.getFileFromNative(t, e, function(t, e) {
                            i = t ? e : null
                        }), {
                            data: i,
                            mimeType: null
                        }
                    }
                    var n = new XMLHttpRequest;
                    return n.overrideMimeType && n.overrideMimeType("text/plain; charset=x-user-defined"), n.open("GET", "." + t, !1), n.send(null), 200 === n.status ? {
                        data: n.responseText,
                        mimeType: n.getResponseHeader("Content-Type")
                    } : null
                }

                function d(t) {
                    var e, i = [];
                    return p || (p = {
                        "/": "tD\nr1"
                    }, require("./titanium/filesystem.registry").split(/\n|\|/).forEach(function(t, e) {
                        var n, o = 0,
                            t = t.split("	"),
                            r = t.length;
                        if (0 === e && "ts" === t[0]) v = t[1], p[w] += "\nc" + v;
                        else {
                            for (; r > o && !t[o]; o++);
                            i = i.slice(0, o).concat(n = t[o]), p[w + i.join(w)] = "n" + n + "\nt" + (o + 1 == r ? "D" : "F\ns" + t[o + 1])
                        }
                    })), (e = p[t]) && e + "\nr1\ne1\nc" + v + "\nm" + v
                }

                function h() {
                    return T || (T = require("Ti/Filesystem"))
                }

                function l(t, e, i, n) {
                    var o, i = i || 1,
                        a = t + e.slice(0, i).join(w);
                    return n && n.readonly ? (r.error('Unable to create "' + a + '" because parent is readonly'), !1) : (o = new m({
                        nativePath: a,
                        type: "D"
                    }), o.createDirectory(), ++i > e.length ? !0 : l(t, e, i, o))
                }

                function _(t) {
                    if (t) {
                        var e = t.match(S),
                            i = (e[1] ? e[1] : e[2] + e[3]) || w;
                        return t = e[1] ? e[2] : e[4], t ? l(i, t.split(w)) : !0
                    }
                    return !1
                }

                function f(t, e) {
                    var i, n, o = t.nativePath,
                        r = new RegExp("^(ti:fs:meta|ti:fs:blob):" + o + (/\/$/.test(o) ? "" : w) + "(.*)"),
                        a = 0,
                        s = y.length;
                    if (e = h().getFile(e.nativePath, t.name), _(e.nativePath)) {
                        for (; s > a;) n = y.key(a++), (i = n.match(r)) && y.setItem(i[1] + ":" + e.nativePath + w + i[2], y.getItem(n) || "");
                        return !0
                    }
                    return !1
                }

                function g() {
                    for (var t, e = /^ti:fs:tmp:\/\//, i = 0, n = y.length; n > i;) t = y.key(i++), e.test(t) && y.removeItem(t)
                }
                var p, m, T, v = Date.now(),
                    b = require.is,
                    y = localStorage,
                    w = "/",
                    I = {
                        n: "sname",
                        c: "i_created",
                        m: "i_modified",
                        t: "s_type",
                        y: "s_mimeType",
                        e: "b_remote",
                        x: "bexecutable",
                        r: "breadonly",
                        s: "isize",
                        l: "bsymbolicLink",
                        h: "bhidden"
                    },
                    E = {
                        i: function(t) {
                            return t - 0
                        },
                        s: function(t) {
                            return "" + t
                        },
                        b: function(t) {
                            return !!(0 | t)
                        }
                    },
                    x = "ti:fs:meta:",
                    N = "ti:fs:blob:",
                    S = /(\/)?([^\:]*)(\:\/\/)?(.*)/,
                    C = "application/octet-stream,text/plain,text/html,text/css,text/xml,text/mathml,image/gif,image/jpeg,image/png,image/x-icon,image/svg+xml,application/x-javascript,application/json,application/pdf,application/x-opentype,audio/mpeg,video/mpeg,video/quicktime,video/x-flv,video/x-ms-wmv,video/x-msvideo,video/ogg,video/mp4,video/webm,text/csv".split(","),
                    L = {
                        txt: 1,
                        html: 2,
                        htm: 2,
                        css: 3,
                        xml: 4,
                        mml: 5,
                        gif: 6,
                        jpeg: 7,
                        jpg: 7,
                        png: 8,
                        ico: 9,
                        svg: 10,
                        js: 11,
                        json: 12,
                        pdf: 13,
                        otf: 14,
                        mp3: 15,
                        mpeg: 16,
                        mpg: 16,
                        mov: 17,
                        flv: 18,
                        wmv: 19,
                        avi: 20,
                        ogg: 21,
                        ogv: 21,
                        mp4: 22,
                        m4v: 22,
                        webm: 23,
                        csv: 24
                    };
                return g(), require.on(window, "beforeunload", g),
                    function(t, e) {
                        for (var i in t) s(i, 1) || u(i, "c" + e + "\nm" + e + "\ntD\ne0\nx0\nl0\nh0\nr" + t[i], 1)
                    }({
                        "appdata://": 0,
                        "/": 1,
                        "tmp://": 0
                    }, Date.now()), m = i("Ti._.Filesystem.Local", e, {
                        constructor: function(t) {
                            if (b(t, "String")) {
                                var e = t.match(S),
                                    i = !e[1] && e[3];
                                if (/^\.\./.test(t = i ? e[4] : e[2])) throw new Error('Irrational path "' + t + '"');
                                this.__values__.constants.nativePath = (i ? e[2] + "://" : w) + t
                            }
                            this._type = t && "D" !== t._type ? "F" : "D"
                        },
                        postscript: function() {
                            var t, e, i = this.__values__.constants,
                                n = this.nativePath,
                                o = n && s(n, 1) || d(n),
                                r = n.match(S),
                                a = (r[1] ? r[1] : r[2] + r[3]) || w;
                            o && (this._exists = 1) && o.split("\n").forEach(function(t) {
                                var e = I[t.charAt(0)],
                                    n = e.substring(1),
                                    o = E[e.charAt(0)](t.substring(1));
                                (i.hasOwnProperty(n) ? i : this)[n] = o
                            }, this), n = r[1] ? r[2] : r[4], t = n.split(w), i.name = t.pop(), t = t.join(w), e = i.parent = n ? new m(a + t) : null, e && e.readonly || r && r[1] && (i.readonly = !0)
                        },
                        constants: {
                            name: "",
                            executable: !1,
                            readonly: !1,
                            size: 0,
                            symbolicLink: !1,
                            nativePath: "",
                            parent: null,
                            writable: {
                                get: function() {
                                    return !this.readonly
                                },
                                set: function(t) {
                                    return this.__values__.constants.readonly = !t
                                },
                                value: !0
                            }
                        },
                        properties: {
                            hidden: !1
                        },
                        append: function(t) {
                            if (this.isFile()) {
                                switch (t && t.declaredClass) {
                                    case "Ti.Filesystem.File":
                                        t = t.read();
                                    case "Ti.Blob":
                                        this._mimeType = t.mimeType, t = t.text
                                }
                                var e = this.read();
                                return e.append(t), this.write(e)
                            }
                            return !1
                        },
                        copy: function(t) {
                            if (this.exists && t) {
                                var e = h(),
                                    t = "Ti.Filesystem.File" === t.declaredClass ? t : e.getFile.apply(null, arguments),
                                    i = t.parent,
                                    n = this.isFile();
                                return t.exists() ? t.readonly ? !1 : t.isFile() ? n ? t.write(this.read()) : (Ti.API.error("Destination is not a directory"), !1) : n ? e.getFile(t.nativePath, this.name).write(this.read()) : f(this, t) : i && (i.createDirectory(), !i.exists() || i.readonly || !n && !t.createDirectory()) ? !1 : n ? t.write(this.read()) : f(this, t)
                            }
                            return !1
                        },
                        createDirectory: function() {
                            return this._create("D")
                        },
                        createFile: function() {
                            return this._create("F")
                        },
                        createTimestamp: function() {
                            return this._created || null
                        },
                        deleteDirectory: function(t) {
                            if (this.isDirectory() && !this.readonly) {
                                for (var e = this.nativePath, i = new RegExp("^ti:fs:(meta|blob):" + e + (/\/$/.test(e) ? "" : w) + ".*"), n = 0, o = y.length; o > n;)
                                    if (i.test(key = y.key(n++))) {
                                        if (!t) return Ti.API.error('Directory "' + e + '" not empty'), !1;
                                        y.removeItem(key)
                                    }
                                return this._exists = 0, y.removeItem(x + e), y.removeItem(N + e), !0
                            }
                            return !1
                        },
                        deleteFile: function() {
                            if (this.exists() && this.isFile() && !this.readonly) {
                                var t = this.nativePath;
                                return this._exists = 0, y.removeItem(x + t), y.removeItem(N + t), !0
                            }
                            return !1
                        },
                        exists: function() {
                            return !!this._exists
                        },
                        extension: function() {
                            var t = this.name.match(/\.(.+)$/);
                            return t ? t[1] : ""
                        },
                        getDirectoryListing: function() {
                            function t(t, i) {
                                var n, o = t.match(i);
                                o && o[1] && e.indexOf(n = o[1].split(w)[0]) < 0 && e.push(n)
                            }
                            var e = [];
                            if (this.isDirectory()) {
                                for (var i = this.nativePath + (/\/$/.test(this.nativePath) ? "" : w), n = new RegExp("^" + x + i + "(.*)"), o = new RegExp("^" + i + "(.*)"), r = 0, a = y.length; a > r;) t(y.key(r++), n);
                                for (r in p) t(r, o)
                            }
                            return e.sort()
                        },
                        isDirectory: function() {
                            return "D" === this._type
                        },
                        isFile: function() {
                            return "F" === this._type
                        },
                        modificationTimestamp: function() {
                            return this._modified || null
                        },
                        move: function() {
                            return this.copy.apply(this, arguments) && this[this.isFile() ? "deleteFile" : "deleteDirectory"](1)
                        },
                        open: function(t) {
                            var e = require("Ti/Filesystem/FileStream");
                            return this.exists() && this.isFile() ? new e({
                                mode: t,
                                data: this.read().text
                            }) : null
                        },
                        read: function() {
                            if (this.exists() && this.isFile()) {
                                var e, i = this.nativePath,
                                    n = C[L[this.extension()] || 0],
                                    o = e && e.mimeType || this._mimeType || n,
                                    r = t.isBinaryMimeType(o),
                                    u = this._remote ? (e = c(i, r)).data : s(i) || "",
                                    d = 0,
                                    h = u.length,
                                    l = "",
                                    _ = {
                                        file: this,
                                        data: u,
                                        length: h,
                                        mimeType: o = "application/octet-stream" === o && o !== n ? n : o,
                                        nativePath: i
                                    };
                                if (this._remote && r && !window.hasWP8Extensions) {
                                    for (; h > d;) l += String.fromCharCode(255 & u.charCodeAt(d++));
                                    _.data = btoa(l)
                                }
                                return new a(_)
                            }
                            return null
                        },
                        rename: function(t) {
                            if (this.exists && !this.readonly) {
                                {
                                    var e, i, n = this.nativePath,
                                        o = n,
                                        r = y.getItem(N + o),
                                        a = new RegExp("^ti:fs:(meta|blob):" + o + (/\/$/.test(o) ? "" : w) + "(.*)"),
                                        s = o.match(S),
                                        u = (s[1] ? s[1] : s[2] + s[3]) || w,
                                        c = 0,
                                        d = y.length;
                                    this.__values__.constants
                                }
                                if (o = s[1] ? s[2] : s[4], !o) return Ti.API.error("Can't rename root \"" + u + '"'), !1;
                                if (o = o.split(w), o.pop(), o.push(t), e = new m(o = u + o.join(w)), e.exists() || e.parent.readonly) return !1;
                                if ("D" === this._type)
                                    for (; d > c;) i = y.key(c++), (s = i.match(a)) && (y.setItem("ti:fs:" + s[1] + ":" + o + w + s[2], y.getItem(i)), y.removeItem(i));
                                return this._save(o, t), r && y.setItem(N + o, r), y.removeItem(x + n), y.removeItem(N + n), !0
                            }
                            return !1
                        },
                        resolve: function() {
                            return this.nativePath
                        },
                        spaceAvailable: function() {
                            return "remainingSpace" in y ? y.remainingSpace : null
                        },
                        write: function(t, e) {
                            var i = this.nativePath;
                            if (i && this.isFile() && !this.readonly && this.parent && !this.parent.readonly) {
                                switch (t && b(t, "String") && (this._mimeType = C[1]), t && t.declaredClass) {
                                    case "Ti.Filesystem.File":
                                        t = t.read();
                                    case "Ti.Blob":
                                        this._mimeType = t.mimeType, t = t._data || ""
                                }
                                return this._exists = 1, this._modified = Date.now(), this._created || (this._created = this._modified), this.__values__.constants.size = u(i, e ? this.read() + t : t), this._save()
                            }
                            return !1
                        },
                        _create: function(t) {
                            return !this.exists() && this.parent && !this.parent.readonly && _(this.parent.nativePath) ? (this._created = this._modified = Date.now(), this._exists = 1, this._type = t, this._save()) : !1
                        },
                        _save: function(t, e) {
                            var i, t = t || this.nativePath;
                            return t ? (i = ["n", e || this.name, "\nc", this._created, "\nm", this._modified, "\nt", this._type, "\ne0\nx0\nr", 0 | this.readonly, "\nl", 0 | this.symbolicLink, "\nh", 0 | this.hidden], "F" === this._type && i.push("\ns" + this.size), this._mimeType && i.push("\ny" + this._mimeType), u(t, i.join(""), 1), !0) : !1
                        }
                    })
            })
        },
        "Ti/_/encoding": function() {
            define(["Ti/_/lang"], function(t) {
                var e = String.fromCharCode,
                    i = 128;
                return t.setObject("Ti._.encoding", {
                    utf8encode: function(t) {
                        for (var n, t = t.replace(/\r\n/g, "\n"), o = 0, r = t.length, a = []; r > o;) n = t.charCodeAt(o++), i > n ? a.push(e(n)) : n >= i && 2048 > n ? (a.push(e(n >> 6 | 192)), a.push(e(63 & n | i))) : (a.push(e(n >> 12 | 224)), a.push(e(n >> 6 & 63 | i)), a.push(e(63 & n | i)));
                        return a.join("")
                    },
                    utf8decode: function(t) {
                        for (var n, o, r = [], a = 0, s = t.length; s > a;) n = t.charCodeAt(a), i > n ? (r.push(e(n)), a++) : (o = t.charCodeAt(a + 1), n > 191 && 224 > n ? (r.push(e((31 & n) << 6 | 63 & o)), a += 2) : (r.push(e((15 & n) << 12 | (63 & o) << 6 | 63 & t.charCodeAt(a + 2))), a += 3));
                        return r.join("")
                    }
                })
            })
        },
        "Ti/Blob": function() {
            define(["Ti/_", "Ti/_/declare", "Ti/_/Evented"], function(t, e, i) {
                return e("Ti.Blob", i, {
                    constructor: function(t) {
                        t = t || {}, this._data = t.data || ""
                    },
                    postscript: function() {
                        var e, i = this.mimeType,
                            n = this.__values__.constants;
                        (this._isBinary = t.isBinaryMimeType(i)) && (n.size = n.length), i.indexOf("image/") || (e = new Image, require.on.once(e, "load", function() {
                            n.width = e.width, n.height = e.height
                        }), e.src = this.toString())
                    },
                    append: function(t) {
                        t && (this._data = (this._data || "") + t.toString())
                    },
                    toString: function() {
                        return (this._isBinary ? "data:" + this.mimeType + ";base64," : "") + (this._data || "")
                    },
                    constants: {
                        file: null,
                        height: 0,
                        length: 0,
                        mimeType: "",
                        nativePath: null,
                        size: 0,
                        text: function() {
                            return this._isBinary ? null : this._data || ""
                        },
                        width: 0
                    }
                })
            })
        },
        "Ti/App/Properties": function() {
            define(["Ti/_/Evented", "Ti/_/lang"], function(t, e) {
                function i(t) {
                    if (!a) {
                        var e = localStorage.getItem(s);
                        a = require.is(e, "String") && JSON.parse(e) || {}
                    }
                    return t ? a[t] : a
                }

                function n(t, n, o) {
                    var r = i(t);
                    return void 0 === r ? e.val(o, null) : u[n] ? u[n](r) : r
                }

                function o(t, e, n) {
                    t && (i(), void 0 === n || null === n ? delete a[t] : a[t] = u[e] ? u[e](n) : n, localStorage.setItem(s, JSON.stringify(a)))
                }
                var r, a, s = "ti:properties",
                    u = {
                        Bool: function(t) {
                            return !!t
                        },
                        Double: function(t) {
                            return parseFloat(t)
                        },
                        Int: function(t) {
                            return parseInt(t)
                        },
                        List: function(t) {
                            return require.is(t, "Array") ? t : [t]
                        },
                        Object: function(t) {
                            return t
                        },
                        String: function(t) {
                            return "" + t
                        }
                    },
                    c = e.setObject("Ti.App.Properties", t, {
                        hasProperty: function(t) {
                            return !!i(t)
                        },
                        listProperties: function() {
                            var t, e = i(),
                                n = [];
                            for (t in e) n.push(t);
                            return n
                        },
                        removeProperty: function(t) {
                            o(t)
                        }
                    });
                for (r in u) ! function(t) {
                    c["get" + t] = function(e, i) {
                        return n(e, t, i)
                    }, c["set" + t] = function(e, i) {
                        o(e, t, i)
                    }
                }(r);
                return c
            })
        },
        "Ti/App": function() {
            define(["Ti/_", "Ti/_/Evented", "Ti/_/lang"], function(t, e, i) {
                return i.setObject("Ti.App", e, {
                    constants: require.mix({
                        sessionId: function() {
                            var e = sessionStorage,
                                i = e.getItem("ti:sessionId");
                            return i || e.setItem("ti:sessionId", i = t.uuid()), i
                        }
                    }, require.config.app),
                    getID: function() {
                        return this.id
                    },
                    getURL: function() {
                        return this.url
                    },
                    getGUID: function() {
                        return this.guid
                    }
                })
            })
        },
        "Ti/Platform": function() {
            define(["Ti/_", "Ti/_/browser", "Ti/_/Evented", "Ti/_/lang", "Ti/Locale", "Ti/_/dom", "Ti/UI"], function(t, e, i, n, o, r, a) {
                function s() {
                    u || (u = 1, c.cookie = d + "=" + encodeURIComponent(l) + "; expires=" + new Date(Date.now() + 63072e7).toUTCString(), localStorage.setItem(d, l))
                }
                var u, c = document,
                    d = "ti:mid",
                    h = c.cookie.match(new RegExp("(?:^|; )" + d + "=([^;]*)")),
                    l = h ? decodeURIComponent(h[1]) : void 0,
                    _ = require.on,
                    f = r.create("iframe", {
                        id: "urlOpener",
                        style: {
                            display: "none"
                        }
                    }, c.body);
                l || (l = localStorage.getItem(d)), l || localStorage.setItem(d, l = t.uuid()), _(window, "beforeunload", s), _(window, "unload", s);
                var g = navigator,
                    p = g.battery || g.webkitBattery || g.mozBattery,
                    m = n.setObject("Ti.Platform", i, {
                        canOpenURL: function(t) {
                            return !!t
                        },
                        createUUID: t.uuid,
                        is24HourTimeFormat: function() {
                            return !1
                        },
                        openURL: function(t) {
                            if (/^([tel|sms|mailto])/.test(t)) f.contentWindow.location.href = t;
                            else {
                                var e = a.createWindow({
                                        layout: a._LAYOUT_CONSTRAINING_VERTICAL,
                                        backgroundColor: "#888"
                                    }),
                                    i = a.createButton({
                                        top: 2,
                                        bottom: 2,
                                        title: "Close"
                                    }),
                                    n = a.createWebView({
                                        width: a.FILL,
                                        height: a.FILL
                                    });
                                i.addEventListener("singletap", function() {
                                    e.close()
                                }), e.add(i), e.add(n), e.open(), setTimeout(function() {
                                    n.url = t
                                }, 1)
                            }
                        },
                        properties: {
                            batteryMonitoring: !1
                        },
                        constants: {
                            BATTERY_STATE_CHARGING: 1,
                            BATTERY_STATE_FULL: 2,
                            BATTERY_STATE_UNKNOWN: -1,
                            BATTERY_STATE_UNPLUGGED: 0,
                            address: void 0,
                            architecture: void 0,
                            availableMemory: void 0,
                            batteryLevel: function() {
                                return this.batteryMonitoring && p ? 100 * p.level : -1
                            },
                            batteryState: function() {
                                return this.batteryMonitoring && p && p.charging ? this.BATTERY_STATE_CHARGING : this.BATTERY_STATE_UNKNOWN
                            },
                            isBrowser: !0,
                            id: l,
                            locale: o,
                            macaddress: void 0,
                            model: g.userAgent,
                            name: "mobileweb",
                            netmask: void 0,
                            osname: "mobileweb",
                            ostype: g.platform,
                            runtime: e.runtime,
                            processorCount: void 0,
                            username: void 0,
                            version: require.config.ti.version
                        }
                    });
                return p && require.on(p, "chargingchange", function() {
                    m.batteryMonitoring && m.fireEvent("battery", {
                        level: m.batteryLevel,
                        state: m.batteryState
                    })
                }), m
            })
        },
        "Ti/_/browser": function() {
            define(["Ti/_"], function(t) {
                var e = navigator.userAgent.toLowerCase().match(/(webkit|gecko|trident|presto)/);
                return t.browser = {
                    runtime: e ? e[0] : "unknown"
                }
            })
        },
        "Ti/Locale": function() {
            define(["require", "Ti/_/lang", "Ti/_/Evented", "Ti/API"], function(t, e, i, n) {
                function o(t, e) {
                    return u[t] || e || t || ""
                }
                var r = e.val(navigator.language, navigator.browserLanguage).replace(/^([^\-\_]+)[\-\_](.+)?$/, function(t, e, i) {
                        return e.toLowerCase() + (i && "-" + i.toUpperCase())
                    }),
                    a = r.split("-"),
                    s = a[0],
                    u = {},
                    c = t.config,
                    d = c.app;
                document.body.dir = /^ar|he$/.test(s) ? "RTL" : "LTR", document.title = d.name = d.names[s] || d.name;
                try {
                    ~c.locales.indexOf(s) && (u = t("./Locale/" + s + "/i18n"))
                } catch (h) {}
                return Object.defineProperty(window, "L", {
                    value: o,
                    enumarable: !0
                }), String.formatDate = function(t) {
                    return n.debug('Method "String.formatDate" is not implemented yet.'), t.toString()
                }, String.formatTime = function(t) {
                    return n.debug('Method "String.formatTime" is not implemented yet.'), t.toString()
                }, String.formatCurrency = function(t) {
                    return n.debug('Method "String.formatCurrency" is not implemented yet.'), t
                }, String.formatDecimal = function(t) {
                    return n.debug('Method "String.formatDecimal" is not implemented yet.'), t
                }, e.setObject("Ti.Locale", i, {
                    constants: {
                        currentCountry: a[1] || "",
                        currentLanguage: a[0] || "",
                        currentLocale: r
                    },
                    formatTelephoneNumber: function(t) {
                        return t
                    },
                    getCurrencyCode: function() {
                        return ""
                    },
                    getCurrencySymbol: function() {
                        return ""
                    },
                    getLocaleCurrencySymbol: function() {
                        return ""
                    },
                    getString: o,
                    _getString: function(t, i) {
                        return e.val(i, o(t, i))
                    }
                })
            })
        },
        "Ti/UI": function() {
            define(["Ti/_", "Ti/_/Evented", "Ti/_/has", "Ti/_/lang", "Ti/_/ready", "Ti/_/style", "Ti/_/dom", "Ti/_/event", "Ti/_/has", "Ti/_/Gestures/DoubleTap", "Ti/_/Gestures/Dragging", "Ti/_/Gestures/LongPress", "Ti/_/Gestures/Pinch", "Ti/_/Gestures/SingleTap", "Ti/_/Gestures/Swipe", "Ti/_/Gestures/TouchCancel", "Ti/_/Gestures/TouchEnd", "Ti/_/Gestures/TouchMove", "Ti/_/Gestures/TouchStart", "Ti/_/Gestures/TwoFingerTap"], function(t, e, i, n, o, r, a, s, i, u, c, d, h, l, _, f, g, p, m, T) {
                var v, b, y, w = window,
                    I = document,
                    E = I.body,
                    x = require.on,
                    N = require.is,
                    S = "2DMatrix,ActivityIndicator,AlertDialog,Animation,Button,EmailDialog,ImageView,Label,OptionDialog,Picker,PickerColumn,PickerRow,ProgressBar,ScrollableView,ScrollView,Slider,Switch,Tab,TabGroup,TableView,TableViewRow,TableViewSection,TextArea,TextField,View,WebView,Window",
                    C = {},
                    L = r.set,
                    A = navigator.userAgent.toLowerCase().match(/(iphone|android)/),
                    R = A && "iphone" === A[0],
                    W = {},
                    k = function() {
                        Ti.UI._recalculateLayout(), v = 0
                    },
                    O = k,
                    D = a.unitize,
                    U = [m, g, p, f, c, l, u, d, h, _, T];
                return x(E, "touchmove", function(t) {
                    t.preventDefault()
                }), S.split(",").forEach(function(t) {
                    C["create" + t] = function(e) {
                        return new(require("Ti/UI/" + t))(e)
                    }
                }), !navigator.standalone && A && (O = function() {
                    if (!v) {
                        v = 1;
                        var t, e = 0 | require("Ti/Gesture").isPortrait,
                            i = W[e];
                        i || (R ? (i = w.innerHeight + 60, w.screen.availHeight - i > 50 && (i += 50)) : i = w.outerHeight / (w.devicePixelRatio || 0), W[e] = i), L(E, "height", i + "px"), R ? (w.scrollTo(0, 0), k()) : t = setInterval(function() {
                            w.scrollTo(0, -1), w.innerHeight + 1 >= i && (clearTimeout(t), k())
                        }, 50)
                    }
                }, o(O), x(w, "orientationchange", O), x(w, "touchstart", O)), o(10, function() {
                    setTimeout(function() {
                        function t(t, e) {
                            var i, n, o, a = 0,
                                s = U.length,
                                u = [],
                                c = e._elements;
                            if (c && c.length) {
                                for (r || require.mix(e, {
                                        touches: ~["mouseup", "pointerup", "MSPointerUp"].indexOf(e.type) ? [] : [e],
                                        targetTouches: [],
                                        changedTouches: [e]
                                    }); s > a; a++)
                                    if (o = U[a]["process" + t]) {
                                        n = o(e, c);
                                        for (i in n) u[i] || (u[i] = []), u[i] = u[i].concat(n[i])
                                    }
                                Ti.UI._fireGestureEvents(u, c)
                            }
                        }
                        var e = Ti.UI._container = Ti.UI.createView({
                                left: 0,
                                top: 0
                            }),
                            n = e.domNode,
                            o = e._layoutCoefficients,
                            r = i("touch"),
                            a = w.navigator.msPointerEnabled,
                            u = 0;
                        o.width.x1 = 1, o.height.x1 = 1, e._measuredTop = 0, e._measuredLeft = 0, n.id = "TiUIContainer", L(n, "overflow", "hidden"), E.appendChild(n), (b = I.getElementById("splash")) && e.addEventListener("postlayout", function() {
                            setTimeout(function() {
                                L(b, {
                                    position: "absolute",
                                    width: D(e._measuredWidth),
                                    height: D(e._measuredHeight),
                                    left: 0,
                                    top: 0,
                                    right: "",
                                    bottom: ""
                                })
                            }, 10)
                        }), O(), x(n, a ? "MSPointerDown" : r ? "touchstart" : "mousedown", function(e) {
                            var i = [x(w, a ? "MSPointerMove" : r ? "touchmove" : "mousemove", function(e) {
                                (r || u) && t("TouchMoveEvent", e)
                            }), x(w, a ? "MSPointerUp" : r ? "touchend" : "mouseup", function(e) {
                                u = 0, t("TouchEndEvent", e), s.off(i)
                            }), r && x(w, "touchcancel", function(e) {
                                t("TouchCancelEvent", e), s.off(i)
                            })];
                            u = 1, t("TouchStartEvent", e)
                        })
                    }, 1)
                }), x(w, "resize", function() {
                    Ti.UI._recalculateLayout()
                }), n.setObject("Ti.UI", e, C, {
                    _addWindow: function(t, e) {
                        return this._container.add(t.modal ? t._modalParentContainer : t), e && this._setWindow(t), b && a.destroy(b), t
                    },
                    _setWindow: function(t) {
                        this.__values__.constants.currentWindow = t
                    },
                    _removeWindow: function(t) {
                        return this._container.remove(t.modal ? t._modalParentContainer : t), t
                    },
                    _fireGestureEvents: function(t, e) {
                        for (var i, n, o, r, a, s = 0, u = U.length, c = 0; e[c] && !e[c]._isPublished;) c++;
                        e[c] || (c = 0);
                        for (s in t)
                            for (i = 0, u = t[s].length; u > i; i++) a = t[s][i], N(a.x, "Number") && N(a.y, "Number") ? (r = this._container.convertPointToView({
                                x: a.x,
                                y: a.y
                            }, e[c]), n = r ? r.x : a.x, o = r ? r.y : a.y) : n = o = void 0, a.x = n, a.y = o, a.bubbles = !0, a.cancelBubble = !1, e[c].fireEvent(s, a)
                    },
                    _layoutSemaphore: 0,
                    _nodesToLayout: [],
                    _startLayout: function() {
                        this._layoutSemaphore++
                    },
                    _finishLayout: function() {
                        0 === --this._layoutSemaphore && this._triggerLayout(!0)
                    },
                    _elementLayoutCount: 0,
                    _triggerLayout: function(t, e) {
                        function n() {
                            o._elementLayoutCount = 0;
                            var t, e, n, r, a, s, u, c, d, h, l = o._nodesToLayout,
                                _ = [],
                                f = !1,
                                g = o._container,
                                p = l.length;
                            for (i("ti-instrumentation") && (o._layoutInstrumentationTest = instrumentation.startTest("Layout")), d = 0; p > d; d++)
                                if (t = l[d], t._isAttachedToActiveWin()) {
                                    for (u = [t]; u.length > 0;) {
                                        e = u.pop(), e._markedForLayout = !0, a = e._children;
                                        for (h in a) s = a[h], ("composite" !== e.layout || s._needsMeasuring || e._layout._isDependentOnParent(s)) && u.push(s)
                                    }
                                    if (t === g) f = !0;
                                    else
                                        for (n = t;;) {
                                            if (n._markedForLayout = !0, r = n, n = n._parent, c = !1, !n || n === g) {
                                                f = !0;
                                                break
                                            }
                                            for (n._hasSizeDimensions() || n._needsMeasuring || (!n._markedForLayout && !~_.indexOf(n) && _.push(n), c = !0), u = [n]; u.length > 0;) {
                                                e = u.pop(), a = e._children;
                                                for (h in a) s = a[h], s !== r && ("composite" !== e.layout || s._needsMeasuring || e._layout._isDependentOnParent(s)) && (s._markedForLayout = !0, u.push(s))
                                            }
                                            if (c) break
                                        }
                                }
                            if (f) {
                                var m = g.__values__.properties,
                                    T = g._measuredWidth = m.width = w.innerWidth,
                                    v = g._measuredHeight = m.height = w.innerHeight;
                                g._measuredSandboxWidth = T, g._measuredSandboxHeight = v, g.fireEvent("postlayout"), L(g.domNode, {
                                    width: T + "px",
                                    height: v + "px"
                                }), g._layout._doLayout(g, T, v, !1, !1)
                            }
                            for (d = 0; d < _.length; d++) e = _[d], e._layout._doLayout(e, e._measuredWidth - e._borderLeftWidth - e._borderRightWidth, e._measuredHeight - e._borderTopWidth - e._borderBottomWidth, e._parent._layout._getWidth(e, e.width) === Ti.UI.SIZE, e._parent._layout._getHeight(e, e.height) === Ti.UI.SIZE);
                            i("ti-instrumentation") && instrumentation.stopTest(o._layoutInstrumentationTest, o._elementLayoutCount + " out of approximately " + document.getElementById("TiUIContainer").getElementsByTagName("*").length + " elements laid out."), o._layoutInProgress = !1, o._layoutTimer = null, o._nodesToLayout = [], o.fireEvent("postlayout")
                        }
                        var o = this;
                        ~o._nodesToLayout.indexOf(t) || (o._nodesToLayout.push(t), e ? (clearTimeout(o._layoutTimer), o._layoutInProgress = !0, n()) : 1 === o._nodesToLayout.length && (o._layoutInProgress = !0, o._layoutTimer = setTimeout(n, 10)))
                    },
                    _recalculateLayout: function() {
                        y || (y = require("Ti/Gesture")), y._updateOrientation();
                        var t = this._container;
                        t && (t.width = w.innerWidth, t.height = w.innerHeight)
                    },
                    properties: {
                        backgroundColor: {
                            set: function(t) {
                                return this._container.backgroundColor = t
                            }
                        },
                        backgroundImage: {
                            set: function(t) {
                                return L(E, "backgroundImage", t ? r.url(t) : "")
                            }
                        },
                        currentTab: void 0
                    },
                    convertUnits: function(e, i) {
                        var n = a.computeSize(e, 0, !1);
                        switch (i) {
                            case Ti.UI.UNIT_MM:
                                n *= 10;
                            case Ti.UI.UNIT_CM:
                                return n / (.0393700787 * t.dpi * 10);
                            case Ti.UI.UNIT_IN:
                                return n / t.dpi;
                            case Ti.UI.UNIT_DIP:
                                return 96 * n / t.dpi;
                            case Ti.UI.UNIT_PX:
                                return n;
                            default:
                                return 0
                        }
                    },
                    constants: {
                        currentWindow: void 0,
                        UNKNOWN: 0,
                        FACE_DOWN: 1,
                        FACE_UP: 2,
                        PORTRAIT: 3,
                        UPSIDE_PORTRAIT: 4,
                        LANDSCAPE_LEFT: 5,
                        LANDSCAPE_RIGHT: 6,
                        INPUT_BORDERSTYLE_NONE: 0,
                        INPUT_BORDERSTYLE_LINE: 1,
                        INPUT_BORDERSTYLE_BEZEL: 2,
                        INPUT_BORDERSTYLE_ROUNDED: 3,
                        KEYBOARD_DEFAULT: 2,
                        KEYBOARD_EMAIL: 3,
                        KEYBOARD_NUMBER_PAD: 6,
                        KEYBOARD_PHONE_PAD: 7,
                        KEYBOARD_URL: 8,
                        NOTIFICATION_DURATION_LONG: 1,
                        NOTIFICATION_DURATION_SHORT: 2,
                        PICKER_TYPE_DATE: 2,
                        PICKER_TYPE_DATE_AND_TIME: 3,
                        PICKER_TYPE_PLAIN: 4,
                        PICKER_TYPE_TIME: 5,
                        RETURNKEY_DEFAULT: 0,
                        RETURNKEY_DONE: 1,
                        RETURNKEY_EMERGENCY_CALL: 2,
                        RETURNKEY_GO: 3,
                        RETURNKEY_GOOGLE: 4,
                        RETURNKEY_JOIN: 5,
                        RETURNKEY_NEXT: 6,
                        RETURNKEY_ROUTE: 7,
                        RETURNKEY_SEARCH: 8,
                        RETURNKEY_SEND: 9,
                        RETURNKEY_YAHOO: 10,
                        TEXT_ALIGNMENT_CENTER: "center",
                        TEXT_ALIGNMENT_RIGHT: "right",
                        TEXT_ALIGNMENT_LEFT: "left",
                        TEXT_AUTOCAPITALIZATION_ALL: 3,
                        TEXT_AUTOCAPITALIZATION_NONE: 0,
                        TEXT_AUTOCAPITALIZATION_SENTENCES: 2,
                        TEXT_AUTOCAPITALIZATION_WORDS: 1,
                        TEXT_VERTICAL_ALIGNMENT_BOTTOM: "bottom",
                        TEXT_VERTICAL_ALIGNMENT_CENTER: "center",
                        TEXT_VERTICAL_ALIGNMENT_TOP: "top",
                        ANIMATION_CURVE_EASE_IN: 1,
                        ANIMATION_CURVE_EASE_IN_OUT: 0,
                        ANIMATION_CURVE_EASE_OUT: 2,
                        ANIMATION_CURVE_LINEAR: 3,
                        SIZE: "auto",
                        FILL: "fill",
                        INHERIT: "inherit",
                        UNIT_PX: "px",
                        UNIT_MM: "mm",
                        UNIT_CM: "cm",
                        UNIT_IN: "in",
                        UNIT_DIP: "dp",
                        _LAYOUT_COMPOSITE: "composite",
                        _LAYOUT_VERTICAL: "vertical",
                        _LAYOUT_HORIZONTAL: "horizontal",
                        _LAYOUT_CONSTRAINING_VERTICAL: "constrainingVertical",
                        _LAYOUT_CONSTRAINING_HORIZONTAL: "constrainingHorizontal"
                    }
                })
            })
        },
        "Ti/_/ready": function() {
            define(function() {
                function t(t) {
                    if (!(a || t && "readystatechange" == t.type && !r[n.readyState])) {
                        for (; s.length;) s.shift()();
                        a = 1
                    }
                }

                function e() {
                    r[n.readyState] ? t() : setTimeout(e, 30)
                }

                function i(t, e, i) {
                    var n, o, r;
                    if (require.is(t, "Number") || (i = e, e = t, t = 1e3), n = i ? function() {
                            i.call(e)
                        } : e, a) n();
                    else {
                        for (n.priority = t, o = 0, r = s.length; r > o && t >= s[o].priority; o++);
                        s.splice(o, 0, n)
                    }
                }
                var n = document,
                    o = require.on,
                    r = {
                        loaded: 1,
                        complete: 1
                    },
                    a = !!r[n.readyState],
                    s = [];
                return a || (s.concat([o(n, "DOMContentLoaded", t), o(window, "load", t)]), "onreadystatechange" in n ? s.push(require.on(n, "readystatechange", t)) : e()), i.load = function(t, e, n) {
                    i(n)
                }, i
            })
        },
        "Ti/_/event": function() {
            define({
                stop: function(t) {
                    t && (t.preventDefault && t.preventDefault(), t.stopPropagation && t.stopPropagation())
                },
                off: function(t) {
                    for (var e, t = require.is(t, "Array") ? t : [t], i = 0, n = t.length; n > i;)(e = t[i++]) && e();
                    t.splice(0)
                }
            })
        },
        "Ti/_/Gestures/DoubleTap": function() {
            define(["Ti/_/declare", "Ti/_/lang"], function(t, e) {
                function i(t, e) {
                    n = Date.now(), o = {
                        x: t,
                        y: e
                    }
                }
                var n = null,
                    o = null,
                    r = 250,
                    a = 25;
                return e.setObject("Ti._.Gestures.DoubleTap", {
                    processTouchEndEvent: function(t) {
                        if (0 === t.touches.length && 1 === t.changedTouches.length) {
                            var e = t.changedTouches[0].clientX,
                                s = t.changedTouches[0].clientY,
                                u = {
                                    doubletap: [],
                                    dblclick: []
                                },
                                c = Date.now() - n;
                            if (n) {
                                if (n = null, r > c && Math.abs(o.x - e) < a && Math.abs(o.y - s) < a) return u.doubletap.push({
                                    x: e,
                                    y: s
                                }), u.dblclick.push({
                                    x: e,
                                    y: s
                                }), u;
                                i(e, s)
                            } else i(e, s)
                        }
                    },
                    processTouchCancelEvent: function() {
                        this._firstTapTime = null
                    }
                })
            })
        },
        "Ti/_/Gestures/Dragging": function() {
            define(["Ti/_/declare", "Ti/_/lang"], function(t, e) {
                function i(t) {
                    var e;
                    return o ? (e = n(t), o = null, {
                        draggingcancel: e
                    }) : void 0
                }

                function n(t) {
                    var e = t.changedTouches[0].clientX,
                        i = t.changedTouches[0].clientY,
                        n = e - o.x,
                        r = i - o.y;
                    return [{
                        x: e,
                        y: i,
                        distanceX: n,
                        distanceY: r,
                        distance: Math.sqrt(Math.pow(n, 2) + Math.pow(r, 2))
                    }]
                }
                var o, r = 25;
                return e.setObject("Ti._.Gestures.Drag", {
                    processTouchStartEvent: function(t) {
                        if (1 == t.touches.length && 1 == t.changedTouches.length) {
                            var e, r;
                            return o = {
                                x: e = t.changedTouches[0].clientX,
                                y: r = t.changedTouches[0].clientY
                            }, {
                                draggingstart: n(t)
                            }
                        }
                        return o ? i(t) : void 0
                    },
                    processTouchEndEvent: function(t) {
                        if (o) {
                            var e, a = Math.sqrt(Math.pow(t.changedTouches[0].clientX - o.x, 2) + Math.pow(t.changedTouches[0].clientY - o.y, 2));
                            return 0 === t.touches.length && 1 === t.changedTouches.length && a > r ? (e = n(t), o = null, {
                                draggingend: e
                            }) : i(t)
                        }
                    },
                    processTouchMoveEvent: function(t) {
                        return o ? 1 == t.touches.length && 1 == t.changedTouches.length ? {
                            dragging: n(t)
                        } : i(t) : void 0
                    },
                    processTouchCancelEvent: function(t) {
                        return o && i(t)
                    }
                })
            })
        },
        "Ti/_/Gestures/LongPress": function() {
            define(["Ti/_/declare", "Ti/_/lang"], function(t, e) {
                var i = null,
                    n = null,
                    o = 500,
                    r = 25;
                return e.setObject("Ti._.Gestures.LongPress", {
                    processTouchStartEvent: function(t, e) {
                        var r = t.changedTouches,
                            a = r[0].clientX,
                            s = r[0].clientY;
                        clearTimeout(i), 1 == t.touches.length && 1 == t.changedTouches.length && (n = {
                            x: t.changedTouches[0].clientX,
                            y: t.changedTouches[0].clientY
                        }, i = setTimeout(function() {
                            require("Ti/UI")._fireGestureEvents({
                                longpress: [{
                                    x: a,
                                    y: s
                                }]
                            }, e)
                        }, o))
                    },
                    processTouchEndEvent: function(t) {
                        0 === t.touches.length && 1 === t.changedTouches.length && clearTimeout(i)
                    },
                    processTouchMoveEvent: function(t) {
                        (!n || Math.abs(n.x - t.changedTouches[0].clientX) > r || Math.abs(n.y - t.changedTouches[0].clientY) > r) && clearTimeout(i)
                    },
                    processTouchCancelEvent: function() {
                        clearTimeout(i)
                    }
                })
            })
        },
        "Ti/_/Gestures/Pinch": function() {
            define(["Ti/_/declare", "Ti/_/lang"], function(t, e) {
                function i(t) {
                    if (n && 2 == n.length && 2 == t.touches.length) {
                        var e = Math.sqrt(Math.pow(t.touches[0].clientX - t.touches[1].clientX, 2) + Math.pow(t.touches[0].clientY - t.touches[1].clientY, 2)),
                            i = 0,
                            o = Date.now();
                        return a && (i = Math.abs(a / r - e / r) / ((o - s) / 1e3)), a = e, s = o, {
                            pinch: [{
                                scale: e / r,
                                velocity: i
                            }]
                        }
                    }
                }
                var n = null,
                    o = null,
                    r = null,
                    a = null,
                    s = null,
                    u = 100;
                return e.setObject("Ti._.Gestures.Pinch", {
                    processTouchStartEvent: function(t) {
                        var e = t.changedTouches[0].clientX,
                            i = t.changedTouches[0].clientY,
                            a = t.touches.length,
                            s = t.changedTouches.length;
                        1 == a && 1 == s ? (n = [{
                            x: e,
                            y: i
                        }], o = setTimeout(function() {
                            n = null
                        }, u)) : 2 == a && 1 == s ? (clearTimeout(o), n && (n.push({
                            x: e,
                            y: i
                        }), r = Math.sqrt(Math.pow(n[0].x - n[1].x, 2) + Math.pow(n[0].y - n[1].y, 2)))) : 2 == a && 2 == s ? (n = [{
                            x: e,
                            y: i
                        }, {
                            x: t.changedTouches[1].clientX,
                            y: t.changedTouches[1].clientY
                        }], r = Math.sqrt(Math.pow(n[0].x - n[1].x, 2) + Math.pow(n[0].y - n[1].y, 2))) : n = null
                    },
                    processTouchEndEvent: function(t) {
                        var e = i(t);
                        return n = null, e
                    },
                    processTouchMoveEvent: function(t) {
                        return i(t)
                    },
                    processTouchCancelEvent: function() {
                        n = null
                    }
                })
            })
        },
        "Ti/_/Gestures/SingleTap": function() {
            define(["Ti/_/declare", "Ti/_/lang"], function(t, e) {
                function i(t, e) {
                    return n && Math.abs(n.x - t) < r && Math.abs(n.y - e) < r
                }
                var n, o, r = 25;
                return e.setObject("Ti._.Gestures.SingleTap", {
                    processTouchStartEvent: function(t) {
                        var e = t.changedTouches;
                        1 == t.touches.length && 1 == e.length && (n = {
                            x: e[0].clientX,
                            y: e[0].clientY
                        }, o = !1)
                    },
                    processTouchEndEvent: function(t) {
                        var e = t.changedTouches,
                            r = e[0].clientX,
                            a = e[0].clientY,
                            s = {
                                singletap: [],
                                click: []
                            };
                        return 0 === t.touches.length && 1 === e.length && i(r, a) && !o && (s.singletap.push({
                            x: r,
                            y: a
                        }), s.click.push({
                            x: r,
                            y: a
                        }), n = null), s
                    },
                    processTouchMoveEvent: function(t) {
                        var e = t.changedTouches;
                        o = 1 == e.length && !i(e[0].clientX, e[0].clientY)
                    },
                    processTouchCancelEvent: function() {
                        n = null
                    }
                })
            })
        },
        "Ti/_/Gestures/Swipe": function() {
            define(["Ti/_/declare", "Ti/_/lang"], function(t, e) {
                var i, n, o = 50,
                    r = Math.PI / 6,
                    a = .5,
                    s = !1;
                return e.setObject("Ti._.Gestures.Swipe", {
                    processTouchStartEvent: function(t) {
                        1 == t.touches.length && 1 == t.changedTouches.length ? (s = !1, i = {
                            x: t.changedTouches[0].clientX,
                            y: t.changedTouches[0].clientY
                        }, n = Date.now()) : i = null
                    },
                    processTouchEndEvent: function(t) {
                        if (0 === t.touches.length && 1 === t.changedTouches.length && i) {
                            var e, u, c, d = t.changedTouches[0].clientX,
                                h = t.changedTouches[0].clientY,
                                l = Math.abs(i.x - d),
                                _ = Math.abs(i.y - h),
                                f = Math.sqrt(Math.pow(i.x - d, 2) + Math.pow(i.y - h, 2));
                            if (!s && (s = f > o), s && (e = o >= f || 0 === l || 0 === _ ? !0 : l > _ ? Math.atan(_ / l) < r : Math.atan(l / _) < r, e && (u = l > _ ? i.x - d > 0 ? "left" : "right" : i.y - h < 0 ? "down" : "up", c = Math.abs(f / (Date.now() - n)), c > a))) return {
                                swipe: [{
                                    x: d,
                                    y: h,
                                    direction: u
                                }]
                            }
                        }
                        i = null
                    },
                    processTouchCancelEvent: function() {
                        i = null
                    }
                })
            })
        },
        "Ti/_/Gestures/TouchCancel": function() {
            define(["Ti/_/declare", "Ti/_/lang"], function(t, e) {
                return e.setObject("Ti._.Gestures.TouchCancel", {
                    processTouchCancelEvent: function(t) {
                        for (var e = t.changedTouches, i = 0, n = e.length, o = {
                                touchcancel: []
                            }; n > i; i++) o.touchcancel.push({
                            x: e[i].clientX,
                            y: e[i].clientY
                        });
                        return o
                    }
                })
            })
        },
        "Ti/_/Gestures/TouchEnd": function() {
            define(["Ti/_/declare", "Ti/_/lang"], function(t, e) {
                return e.setObject("Ti._.Gestures.TouchEnd", {
                    processTouchEndEvent: function(t) {
                        for (var e = t.changedTouches, i = 0, n = e.length, o = {
                                touchend: []
                            }; n > i; i++) o.touchend.push({
                            x: e[i].clientX,
                            y: e[i].clientY
                        });
                        return o
                    }
                })
            })
        },
        "Ti/_/Gestures/TouchMove": function() {
            define(["Ti/_/declare", "Ti/_/lang"], function(t, e) {
                return e.setObject("Ti._.Gestures.TouchMove", {
                    processTouchMoveEvent: function(t) {
                        for (var e = t.changedTouches, i = 0, n = e.length, o = {
                                touchmove: []
                            }; n > i; i++) o.touchmove.push({
                            x: e[i].clientX,
                            y: e[i].clientY
                        });
                        return o
                    }
                })
            })
        },
        "Ti/_/Gestures/TouchStart": function() {
            define(["Ti/_/declare", "Ti/_/lang"], function(t, e) {
                return e.setObject("Ti._.Gestures.TouchStart", {
                    processTouchStartEvent: function(t) {
                        for (var e = t.changedTouches, i = 0, n = e.length, o = {
                                touchstart: []
                            }; n > i; i++) o.touchstart.push({
                            x: e[i].clientX,
                            y: e[i].clientY
                        });
                        return o
                    }
                })
            })
        },
        "Ti/_/Gestures/TwoFingerTap": function() {
            define(["Ti/_/declare", "Ti/_/lang"], function(t, e) {
                var i = null,
                    n = null,
                    o = null,
                    r = 100,
                    a = 25;
                return e.setObject("Ti._.Gestures.TwoFingerTap", {
                    processTouchStartEvent: function(t) {
                        var e = t.changedTouches[0].clientX,
                            a = t.changedTouches[0].clientY,
                            s = t.touches.length,
                            u = t.changedTouches.length;
                        1 == s && 1 == u ? (i = [{
                            x: e,
                            y: a
                        }], o = setTimeout(function() {
                            i = null, n = null
                        }, r)) : 2 == s && 1 == u ? (clearTimeout(o), i && i.push({
                            x: e,
                            y: a
                        })) : 2 == s && 2 == u ? i = [{
                            x: e,
                            y: a
                        }, {
                            x: t.changedTouches[1].clientX,
                            y: t.changedTouches[1].clientY
                        }] : (i = null, n = null)
                    },
                    processTouchEndEvent: function(t) {
                        var e, s, u, c = t.changedTouches,
                            d = c[0].clientX,
                            h = c[0].clientY,
                            l = t.touches.length,
                            _ = c.length,
                            f = {};
                        if (1 == l && 1 == _) n = [{
                            x: d,
                            y: h
                        }], o = setTimeout(function() {
                            i = null, n = null
                        }, r);
                        else if (0 !== l || 1 !== _ && 2 !== _) i = null, n = null;
                        else if (i && 2 === i.length) {
                            for (n || (n = []), e = 0; _ > e; e++) n.push({
                                x: c[e].clientX,
                                y: c[e].clientY
                            });
                            return 2 === n.length && (s = Math.abs(i[0].x - n[0].x) < a && Math.abs(i[0].y - n[0].y) < a, u = Math.abs(i[1].x - n[1].x) < a && Math.abs(i[1].y - n[1].y) < a, s && u || (s = Math.abs(i[0].x - n[1].x) < a && Math.abs(i[0].y - n[1].y) < a, u = Math.abs(i[1].x - n[0].x) < a && Math.abs(i[1].y - n[0].y) < a), s && u && (f.twofingertap = [{
                                x: (i[0].x + i[1].x) / 2,
                                y: (i[0].y + i[1].y) / 2
                            }])), i = null, n = null, f
                        }
                    },
                    processTouchCancelEvent: function() {
                        i = null, n = null
                    }
                })
            })
        },
        "Ti/Buffer": function() {
            define(["Ti/_/declare", "Ti/_/Evented", "Ti/Blob", "Ti/Codec"], function(t, e, i, n) {
                var o;
                return o = t("Ti.Buffer", e, {
                    constructor: function(t) {
                        t && t.value && this._set(t.value)
                    },
                    append: function(t, e) {
                        var i = t.value;
                        return e = 0 | e, length = length || i.length, this._set(this.value + i.substring(e, e + length)), length - e
                    },
                    clear: function() {
                        this._set("")
                    },
                    clone: function(t, e) {
                        return new o({
                            value: t ? this.value.substring(t, e && t + e) : this.value
                        })
                    },
                    copy: function(t, e, i, n) {
                        var o = t.value,
                            e = 0 | e,
                            i = 0 | i,
                            r = Math.max(this.length, n && i + n) - e,
                            t = o.substring(i, r);
                        this._set(this.value.substring(0, e) + t + this.value.substring(e, t.length - e))
                    },
                    fill: function(t, e, i) {
                        if (!t) throw new Error("Missing fillByte argument");
                        e = 0 | e, i = this.length - e - i | 0, this._set(this.value.substring(0, 0 | e) + new Array(i).join((t + " ").charAt(0)) + this.value.substring(i))
                    },
                    insert: function(t, e, i, n) {
                        t.value;
                        return i = 0 | i, e = 0 | e, this._set(this.value.substring(0, e) + v.substring(i, n && i + n) + this.value.substring(e)), n || v.length
                    },
                    release: function() {
                        this.length = 0
                    },
                    toBlob: function() {
                        return new i({
                            data: this.value
                        })
                    },
                    toString: function() {
                        return "" + this.value
                    },
                    _set: function(t) {
                        this.__values__.constants.value = "" + t
                    },
                    _resize: function(t, e) {
                        t = 0 | t, this._set(this.value.substring(t, e && t + e | 0))
                    },
                    constants: {
                        byteOrder: n.LITTLE_ENDIAN,
                        type: n.CHARSET_UTF8,
                        value: ""
                    },
                    properties: {
                        length: {
                            get: function() {
                                return this.value.length
                            },
                            set: function(t, e) {
                                return e > t ? this._resize(0, t) : this.__values__.constants.value += new Array(t - e).join(" "), t
                            }
                        }
                    }
                })
            })
        },
        "Ti/Codec": function() {
            define(["Ti/_/declare", "Ti/_/lang", "Ti/_/Evented"], function(t, e, i) {
                function n(t) {
                    throw new Error("Missing " + t + " argument")
                }

                function o(t, e) {
                    return t === r.TYPE_DOUBLE || t === r.TYPE_FLOAT ? parseFloat(e) : parseInt(e)
                }
                var r;
                return r = e.setObject("Ti.Codec", i, {
                    decodeNumber: function(t) {
                        return (!t || !t.source) && n("source"), t.type || n("type"), o(t.type, t.source.buffer)
                    },
                    decodeString: function(t) {
                        (!t || !t.source) && n("source");
                        var e = t.source.buffer || "",
                            i = 0 | t.position,
                            o = t.length;
                        return e.substring(i, o && i + o)
                    },
                    encodeNumber: function(t) {
                        return (!t || !t.source) && n("source"), t.dest || n("dest"), t.type || n("type"), dest.append(new(require("Ti/Buffer"))({
                            buffer: "" + o(t.type, t.source.buffer)
                        }))
                    },
                    encodeString: function(t) {
                        (!t || !t.source) && n("source"), t.dest || n("dest");
                        var e = t.source.buffer || "",
                            i = 0 | t.destPosition;
                        return e = new(require("Ti/Buffer"))({
                            buffer: e.substring(0 | t.sourcePosition, t.sourceLength || e.length)
                        }), i ? dest.insert(e, i) : dest.append(e)
                    },
                    getNativeByteOrder: function() {
                        return this.LITTLE_ENDIAN
                    },
                    constants: {
                        BIG_ENDIAN: 2,
                        CHARSET_ASCII: "ascii",
                        CHARSET_ISO_LATIN_1: "ios-latin-1",
                        CHARSET_UTF16: "utf16",
                        CHARSET_UTF16BE: "utf16be",
                        CHARSET_UTF16LE: "utf16le",
                        CHARSET_UTF8: "utf8",
                        LITTLE_ENDIAN: 1,
                        TYPE_BYTE: "byte",
                        TYPE_DOUBLE: "double",
                        TYPE_FLOAT: "float",
                        TYPE_INT: "int",
                        TYPE_LONG: "long",
                        TYPE_SHORT: "short"
                    }
                })
            })
        },
        "Ti/_/include": function() {
            define(function() {
                var t = {},
                    e = [];
                return {
                    dynamic: !0,
                    normalize: function(t, e) {
                        var i = t.split("!"),
                            n = i[0];
                        return i.shift(), (/^\./.test(n) ? e(n) : n) + (i.length ? "!" + i.join("!") : "")
                    },
                    load: function(i, n, o) {
                        var r, a, s, u, c = i.split("!"),
                            d = c.length;
                        if ((u = d > 1 && "sandbox" === c[0]) && (c.shift(), i = c.join("!")), s = n.toUrl(/^\//.test(i) ? i : "./" + i, e.length ? {
                                name: e[e.length - 1]
                            } : null), r = t[s] || n.cache(s), !r)
                            if (window.hasWP8Extensions) n.getFileFromNative(s, 0, function(t, e) {
                                if (!t) throw new Error('Failed to load include "' + s + '"');
                                r = e
                            });
                            else {
                                if (a = new XMLHttpRequest, a.open("GET", s, !1), a.send(null), 200 !== a.status) throw new Error('Failed to load include "' + s + '": ' + a.status);
                                r = a.responseText
                            }
                        e.push(s);
                        try {
                            n.evaluate(t[s] = r, 0, !u)
                        } catch (h) {
                            throw h
                        } finally {
                            e.pop()
                        }
                        o(r)
                    }
                }
            })
        },
        "Ti/Accelerometer": function() {
            define(["Ti/_/Evented", "Ti/_/lang"], function(t, e) {
                var i = Date.now(),
                    n = {},
                    o = .2,
                    r = e.setObject("Ti.Accelerometer", t);
                return require.on(window, "devicemotion", function(t) {
                    var e, a = t.acceleration || t.accelerationIncludingGravity,
                        s = a && {
                            x: a.x,
                            y: a.y,
                            z: a.z,
                            source: t.source
                        };
                    s && (void 0 !== n.x && (Math.abs(n.x - s.x) > o || Math.abs(n.y - s.y) > o || Math.abs(n.z - s.z) > o) && (e = Date.now(), s.timestamp = e - i, i = e, r.fireEvent("update", s)), n = s)
                }), r
            })
        },
        "Ti/Analytics": function() {
            define(["Ti/_/analytics", "Ti/_/Evented", "Ti/_/lang"], function(t, e, i) {
                return i.setObject("Ti.Analytics", e, {
                    addEvent: function(e, i, n) {
                        t.add(e, i, n)
                    },
                    featureEvent: function(e, i) {
                        t.add("app.feature", e, i)
                    },
                    navEvent: function(e, i, n, o) {
                        t.add("app.nav", n, o)
                    },
                    settingsEvent: function(e, i) {
                        t.add("app.settings", e, i)
                    },
                    timedEvent: function(e, i, n, o, r) {
                        t.add("app.timed", e, require.mix({}, r, {
                            start: i,
                            stop: n,
                            duration: o
                        }))
                    },
                    userEvent: function(e, i) {
                        t.add("app.user", e, i)
                    }
                })
            })
        },
        "Ti/BlobStream": function() {
            define(["Ti/_/declare", "Ti/IOStream"], function(t, e) {
                return t("Ti.BlobStream", e)
            })
        },
        "Ti/IOStream": function() {
            define(["Ti/_/declare", "Ti/_/Evented", "Ti/Buffer", "Ti/Filesystem"], function(t, e, i, n) {
                return t("Ti.IOStream", e, {
                    constructor: function(t) {
                        t = t || {}, this._data = t.data || "", this._mode = t.mode || n.MODE_APPEND
                    },
                    close: function() {
                        this._closed = !0
                    },
                    isReadable: function() {
                        return !this._closed
                    },
                    isWriteable: function() {
                        return !this._closed && (this._mode === n.MODE_WRITE || this._mode === n.MODE_APPEND)
                    },
                    read: function(t, e, n) {
                        if (this.isReadable()) {
                            var o = this._data,
                                r = n || o.length,
                                a = t.append(new i({
                                    value: o.substring(e || 0, r)
                                }));
                            return this._data = o.substring(r), a
                        }
                        return 0
                    },
                    write: function(t, e, i) {
                        if (this.isWriteable()) {
                            var n = t.value;
                            return e = 0 | e, i = i || n.length, this._data += n.substring(e, i), i - e
                        }
                        return 0
                    }
                })
            })
        },
        "Ti/BufferStream": function() {
            define(["Ti/_/declare", "Ti/IOStream"], function(t, e) {
                return t("Ti.BufferStream", e)
            })
        },
        "Ti/Facebook": function() {
            define(["Ti/_/Evented", "Ti/_/lang"], function(t, e) {
                function i() {
                    FB.init({
                        appId: c,
                        status: !1,
                        cookie: !0,
                        oauth: !0,
                        xfbml: !0
                    }), FB.getLoginStatus(function(t) {
                        s = !0, "connected" == t.status && n(t) || u && r()
                    }, !0)
                }

                function n(t) {
                    var e = t.authResponse;
                    return e ? (a.loggedIn = !0, a.uid = e.userID, a.expirationDate = new Date(Date.now() + 1e3 * e.expiresIn), a.accessToken = e.accessToken, e.expiresIn && setTimeout(function() {
                        a.logout()
                    }, 1e3 * e.expiresIn), a.fireEvent("login", {
                        cancelled: !1,
                        data: t,
                        success: !0,
                        uid: a.uid
                    }), !0) : void 0
                }

                function o(t, e, i, n) {
                    result = {
                        source: a,
                        success: !1
                    }, result[e] = i, !t || t.error ? t && (result.error = t.error) : (result.success = !0, result.result = JSON.stringify(t)), n(result)
                }

                function r() {
                    FB.login(function(t) {
                        n(t) || a.fireEvent("login", {
                            cancelled: !0,
                            data: t,
                            error: "user cancelled or an internal error occured.",
                            success: !1,
                            uid: t.id
                        })
                    }, {
                        scope: a.permissions.join()
                    })
                }
                var a, s = !1,
                    u = !1,
                    c = null,
                    d = "not logged in",
                    h = document.createElement("div"),
                    l = "facebook-jssdk",
                    _ = !1;
                if (a = e.setObject("Ti.Facebook", t, {
                        authorize: function() {
                            if (!c) throw new Error("App ID not set. Facebook authorization cancelled.");
                            s ? r() : u = !0
                        },
                        createLoginButton: function(t) {
                            return new(require("Ti/Facebook/LoginButton"))(t)
                        },
                        dialog: function(t, e, i) {
                            a.loggedIn ? (e.method = t, FB.ui(e, function(e) {
                                o(e, "action", t, i)
                            })) : i({
                                success: !1,
                                error: d,
                                action: t,
                                source: a
                            })
                        },
                        logout: function() {
                            a.loggedIn && FB.logout(function() {
                                a.loggedIn = !1, a.fireEvent("logout", {
                                    success: !0
                                })
                            })
                        },
                        request: function(t, e, i) {
                            a.loggedIn ? (e.method = t, e.urls = "facebook.com,developers.facebook.com", FB.api(e, function(e) {
                                o(e, "method", t, i)
                            })) : i({
                                success: !1,
                                error: d,
                                method: t,
                                source: a
                            })
                        },
                        requestWithGraphPath: function(t, e, i, n) {
                            a.loggedIn ? FB.api(t, i, e, function(e) {
                                o(e, "path", t, n)
                            }) : n({
                                success: !1,
                                error: d,
                                path: t,
                                source: a
                            })
                        },
                        constants: {
                            BUTTON_STYLE_NORMAL: 1,
                            BUTTON_STYLE_WIDE: 2
                        },
                        properties: {
                            accessToken: void 0,
                            appid: {
                                set: function(t) {
                                    return c = t, _ && i(), t
                                }
                            },
                            expirationDate: void 0,
                            forceDialogAuth: !0,
                            loggedIn: !1,
                            permissions: void 0,
                            uid: void 0
                        }
                    }), h.id = "fb-root", document.body.appendChild(h), !document.getElementById(l)) {
                    var f = document.createElement("script"),
                        g = document.getElementsByTagName("head")[0];
                    f.id = l, f.async = !0, f.src = "//connect.facebook.net/en_US/all.js", g.insertBefore(f, g.firstChild)
                }
                return window.fbAsyncInit = function() {
                    _ = !0, c && i()
                }, a
            })
        },
        "Ti/Geolocation": function() {
            define(["Ti/_/Evented", "Ti/_/lang", "Ti/Network"], function(t, e, i) {
                function n(t) {
                    var e = l(window, "deviceorientation", function(i) {
                        e(), t(i)
                    })
                }

                function o(t) {
                    return function(e) {
                        u = {
                            heading: {
                                accuracy: e.webkitCompassAccuracy,
                                magneticHeading: e.webkitCompassHeading
                            },
                            success: !0,
                            timestamp: Date.now()
                        }, s.fireEvent("heading", u), t && t(u)
                    }
                }

                function r(t) {
                    return function(e) {
                        var i = "coords" in e;
                        h = {
                            success: i
                        }, i ? h.coords = e.coords : h.code = e.code, s.fireEvent("location", h), t && t(h)
                    }
                }

                function a() {
                    return {
                        enableHighAccuracy: s.accuracy === s.ACCURACY_HIGH,
                        timeout: s.MobileWeb.locationTimeout,
                        maximumAge: s.MobileWeb.maximumLocationAge
                    }
                }
                var s, u, c, d, h, l = require.on,
                    _ = !1,
                    f = 0,
                    g = 0,
                    p = e.isDef;
                return n(function(t) {
                    p(t.webkitCompassHeading) && (_ = !0)
                }), s = e.setObject("Ti.Geolocation", t, {
                    getCurrentPosition: function(t) {
                        s.locationServicesEnabled && navigator.geolocation.getCurrentPosition(r(t), r(t), a())
                    },
                    getCurrentHeading: function(t) {
                        _ && (u && Date.now() - u.timestamp < s.maximumHeadingAge ? t(u) : n(o(t)))
                    },
                    forwardGeocoder: function(t, e) {
                        if (require.is(t, "String")) {
                            var n = i.createHTTPClient({
                                onload: function() {
                                    var t = this.responseText.split(",");
                                    e({
                                        success: !0,
                                        code: 0,
                                        latitude: parseFloat(t[2]),
                                        longitude: parseFloat(t[3])
                                    })
                                },
                                onerror: function(t) {
                                    e({
                                        success: !1,
                                        code: -1,
                                        error: t + ""
                                    })
                                },
                                timeout: s.MobileWeb.forwardGeocoderTimeout
                            });
                            n.open("GET", "http://api.appcelerator.net/p/v1/geo?d=f&q=" + escape(t)), n.send()
                        }
                    },
                    reverseGeocoder: function(t, e, n) {
                        if (p(t) && p(e)) {
                            var o = i.createHTTPClient({
                                onload: function() {
                                    n(JSON.parse(this.responseText))
                                },
                                onerror: function() {
                                    n({
                                        success: !1
                                    })
                                },
                                timeout: s.MobileWeb.forwardGeocoderTimeout
                            });
                            o.open("GET", "http://api.appcelerator.net/p/v1/geo?d=r&q=" + t + "," + e), o.send()
                        }
                    },
                    addEventListener: function(e, i) {
                        switch (e) {
                            case "heading":
                                _ && (f++, 1 === f && (c = l(window, "deviceorientation", o())));
                                break;
                            case "location":
                                s.locationServicesEnabled && (g++, 1 === g && (d = navigator.geolocation.watchPosition(r(), r(), a())))
                        }
                        t.addEventListener.call(this, e, i)
                    },
                    removeEventListener: function(e, i) {
                        switch (e) {
                            case "heading":
                                _ && (f--, 0 === f && c());
                                break;
                            case "location":
                                s.locationServicesEnabled && (g--, 1 > f && navigator.geolocation.clearWatch(d))
                        }
                        t.removeEventListener.call(this, e, i)
                    },
                    constants: {
                        ACCURACY_HIGH: 1,
                        ACCURACY_LOW: 2,
                        ERROR_DENIED: 1,
                        ERROR_LOCATION_UNKNOWN: 2,
                        ERROR_TIMEOUT: 3,
                        locationServicesEnabled: {
                            get: function() {
                                return !!navigator.geolocation
                            }
                        },
                        MobileWeb: {
                            locationTimeout: 1 / 0,
                            maximumLocationAge: 0,
                            maximumHeadingAge: 1e3,
                            forwardGeocoderTimeout: void 0,
                            reverseGeocoderTimeout: void 0
                        },
                        hasCompass: function() {
                            return _
                        }
                    },
                    properties: {
                        accuracy: 2
                    }
                })
            })
        },
        "Ti/Network": function() {
            define(["Ti/_/Evented", "Ti/_/lang"], function(t, e) {
                function i(t) {
                    "online" === t.type && !o && (o = 1), "offline" === t.type && o && (o = 0), r.fireEvent("change", {
                        networkType: r.networkType,
                        networkTypeName: r.networkTypeName,
                        online: o
                    })
                }
                var n = navigator.connection,
                    o = navigator.onLine,
                    r = e.setObject("Ti.Network", t, {
                        constants: {
                            NETWORK_LAN: 1,
                            NETWORK_MOBILE: 3,
                            NETWORK_NONE: 0,
                            NETWORK_UNKNOWN: -1,
                            NETWORK_WIFI: 2,
                            networkType: function() {
                                return o ? n && n.type == n.WIFI ? r.NETWORK_WIFI : n && n.type == n.ETHERNET ? r.NETWORK_LAN : !n || n.type != n.CELL_2G && n.type != n.CELL_3G ? r.NETWORK_UNKNOWN : r.NETWORK_MOBILE : r.NETWORK_NONE
                            },
                            networkTypeName: function() {
                                return o ? n && n.type == n.WIFI ? "WIFI" : n && n.type == n.ETHERNET ? "LAN" : !n || n.type != n.CELL_2G && n.type != n.CELL_3G ? "UNKNOWN" : "MOBILE" : "NONE"
                            },
                            online: function() {
                                return o
                            }
                        },
                        properties: {
                            httpURLFormatter: null
                        },
                        createHTTPClient: function(t) {
                            return new(require("Ti/Network/HTTPClient"))(t)
                        },
                        decodeURIComponent: function(t) {
                            return decodeURIComponent(t)
                        },
                        encodeURIComponent: function(t) {
                            return encodeURIComponent(t)
                        }
                    });
                return require.on(window, "online", i), require.on(window, "offline", i), r
            })
        },
        "Ti/Gesture": function() {
            define(["Ti/_/Evented", "Ti/_/lang", "Ti/UI", "Ti/_/ready", "Ti/_/event"], function(t, e, i, n, o) {
                function r() {
                    var t = !!(window.innerWidth && window.innerWidth > window.innerHeight),
                        e = f.__values__.constants;
                    return e.orientation = t ? i.LANDSCAPE_LEFT : i.PORTRAIT, e.landscape = t, e.portrait = !t, f.orientation
                }

                function a(t) {
                    var e = null,
                        n = Math.abs(t.beta || 0 | t.y),
                        o = Math.abs(t.gamma || 0 | t.x);
                    5 > n && o > 170 && (e = i.FACE_DOWN), 5 > n && 5 > o && (e = i.FACE_UP), n > 50 && 0 > n && c != e && (e = i.UPSIDE_PORTRAIT), null !== e && c !== e && f.fireEvent("orientationchange", {
                        orientation: c = e,
                        source: t.source
                    })
                }
                var s = window,
                    u = require.on,
                    c = null,
                    d = Date.now(),
                    h = {},
                    l = 0,
                    _ = [],
                    f = e.setObject("Ti.Gesture", t, {
                        _updateOrientation: function() {
                            r(), c !== f.orientation && f.fireEvent("orientationchange", {
                                orientation: c = f.orientation
                            })
                        },
                        addEventListener: function(e) {
                            "orientationchange" == e && l++, 1 == l && (_ = [u(s, "MozOrientation", a), u(s, "deviceorientation", a)]), t.addEventListener.apply(this, arguments)
                        },
                        removeEventListener: function(e) {
                            "orientationchange" == e && (l = Math.max(l - 1, 0)), 0 == l && o.off(_), t.removeEventListener.apply(this, arguments)
                        },
                        isLandscape: function() {
                            return f.landscape
                        },
                        isPortrait: function() {
                            return f.portrait
                        },
                        constants: {
                            portrait: !1,
                            landscape: !1,
                            orientation: i.UNKNOWN
                        }
                    });
                return n(function() {
                    r()
                }), u(s, "devicemotion", function(t) {
                    var e, i, n, o, r = t.acceleration || t.accelerationIncludingGravity,
                        a = r && {
                            x: r.x,
                            y: r.y,
                            z: r.z,
                            source: t.source
                        };
                    a && (void 0 !== h.x && (e = Math.abs(h.x - a.x) > 10, i = Math.abs(h.y - a.y) > 10, n = Math.abs(h.z - a.z) > 10, (e && (i || n) || i && n) && (o = Date.now(), (a.timestamp = o - d) > 300 && (d = o, f.fireEvent("shake", a)))), h = a)
                }), f
            })
        },
        "Ti/Map": function() {
            define(["Ti/_/Evented", "Ti/_/lang"], function(t, e) {
                return e.setObject("Ti.Map", t, {
                    constants: {
                        ANNOTATION_GREEN: 1,
                        ANNOTATION_PURPLE: 2,
                        ANNOTATION_RED: 0,
                        HYBRID_TYPE: 2,
                        SATELLITE_TYPE: 1,
                        STANDARD_TYPE: 0,
                        TERRAIN_TYPE: 3
                    },
                    createAnnotation: function(t) {
                        return new(require("Ti/Map/Annotation"))(t)
                    },
                    createView: function(t) {
                        return new(require("Ti/Map/View"))(t)
                    }
                })
            })
        },
        "Ti/Media": function() {
            define(["Ti/_/Evented", "Ti/_/lang"], function(t, e) {
                return e.setObject("Ti.Media", t, {
                    constants: {
                        UNKNOWN_ERROR: 0,
                        DEVICE_BUSY: 1,
                        NO_CAMERA: 2,
                        NO_VIDEO: 3,
                        VIDEO_CONTROL_DEFAULT: 1,
                        VIDEO_CONTROL_EMBEDDED: 1,
                        VIDEO_CONTROL_FULLSCREEN: 2,
                        VIDEO_CONTROL_NONE: 0,
                        VIDEO_CONTROL_HIDDEN: 0,
                        VIDEO_SCALING_NONE: 0,
                        VIDEO_SCALING_ASPECT_FILL: 2,
                        VIDEO_SCALING_ASPECT_FIT: 1,
                        VIDEO_SCALING_MODE_FILL: 3,
                        VIDEO_PLAYBACK_STATE_STOPPED: 0,
                        VIDEO_PLAYBACK_STATE_PLAYING: 1,
                        VIDEO_PLAYBACK_STATE_PAUSED: 2,
                        VIDEO_LOAD_STATE_PLAYABLE: 1,
                        VIDEO_LOAD_STATE_PLAYTHROUGH_OK: 2,
                        VIDEO_LOAD_STATE_STALLED: 4,
                        VIDEO_LOAD_STATE_UNKNOWN: 0,
                        VIDEO_REPEAT_MODE_NONE: 0,
                        VIDEO_REPEAT_MODE_ONE: 1,
                        VIDEO_FINISH_REASON_PLAYBACK_ENDED: 0,
                        VIDEO_FINISH_REASON_PLAYBACK_ERROR: 1,
                        VIDEO_FINISH_REASON_USER_EXITED: 2,
                        MEDIA_TYPE_PHOTO: "public.image",
                        MEDIA_TYPE_VIDEO: "public.video"
                    },
                    createVideoPlayer: function(t) {
                        return new(require("Ti/Media/VideoPlayer"))(t)
                    },
                    vibrate: function(t) {
                        "vibrate" in navigator && navigator.vibrate(require.is(t, "Array") ? t : [0 | t])
                    }
                })
            })
        },
        "Ti/Utils": function() {
            define(["Ti/_/encoding", "Ti/_/Evented", "Ti/_/lang", "Ti/Blob"], function(t, e, i, n) {
                function o(t, e) {
                    for (var i = [], n = 0, o = 8 * t.length; o > n; n += 8) i[n >> 5] |= (255 & t.charCodeAt(n / 8)) << (e ? e - n : n) % 32;
                    return i
                }

                function r(t, e) {
                    for (var i = "0123456789abcdef", n = 0, o = 4 * t.length, r = []; o > n; n++) r.push(i.charAt(t[n >> 2] >> (e ? e - n : n) % 4 * 8 + 4 & 15) + i.charAt(t[n >> 2] >> (e ? e - n : n) % 4 * 8 & 15));
                    return r.join("")
                }

                function a(t, e) {
                    return t = o(t, 24), t[e >> 5] |= 128 << 24 - e % 32, t[(e + 64 >> 9 << 4) + 15] = e, t
                }

                function s(t, e) {
                    var i = (65535 & t) + (65535 & e),
                        n = (t >> 16) + (e >> 16) + (i >> 16);
                    return n << 16 | 65535 & i
                }

                function u(t, e) {
                    return t << e | t >>> 32 - e
                }

                function c(t, e, i, n, o, r) {
                    return s(u(s(s(e, t), s(n, r)), o), i)
                }

                function d(t, e, i, n, o, r, a) {
                    return c(e & i | ~e & n, t, e, o, r, a)
                }

                function h(t, e, i, n, o, r, a) {
                    return c(e & n | i & ~n, t, e, o, r, a)
                }

                function l(t, e, i, n, o, r, a) {
                    return c(e ^ i ^ n, t, e, o, r, a)
                }

                function _(t, e, i, n, o, r, a) {
                    return c(i ^ (e | ~n), t, e, o, r, a)
                }

                function f(t, e, i, n) {
                    return 20 > t ? e & i | ~e & n : 40 > t ? e ^ i ^ n : 60 > t ? e & i | e & n | i & n : e ^ i ^ n
                }

                function g(t) {
                    return 20 > t ? 1518500249 : 40 > t ? 1859775393 : 60 > t ? -1894007588 : -899497514
                }

                function p(t, e) {
                    return t >>> e | t << 32 - e
                }

                function m(t) {
                    return p(t, 7) ^ p(t, 18) ^ t >>> 3
                }

                function T(t) {
                    return p(t, 17) ^ p(t, 19) ^ t >>> 10
                }

                function v(t) {
                    return t && "Ti.Blob" === t.declaredClass
                }

                function b(e) {
                    return atob(t.utf8encode(e))
                }

                function y(t) {
                    return v(t) ? t._isBinary ? b(t._data) : t._data : t
                }
                var w = [1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998];
                return i.setObject("Ti.Utils", e, {
                    base64decode: function(t) {
                        return v(t) && t._isBinary ? t : new n({
                            data: b(t._data || t)
                        })
                    },
                    base64encode: function(e) {
                        return v(e) && e._isBinary ? e : new n({
                            data: t.utf8decode(btoa(e._data || e))
                        })
                    },
                    md5HexDigest: function(e) {
                        var i, e = t.utf8encode(y(e)),
                            n = 8 * e.length,
                            a = 1732584193,
                            u = -271733879,
                            c = -1732584194,
                            f = 271733878,
                            g = 0;
                        for (e = o(e), e[n >> 5] |= 128 << n % 32, e[(n + 64 >>> 9 << 4) + 14] = n, i = e.length; i > g; g += 16) {
                            var p = a,
                                m = u,
                                T = c,
                                v = f;
                            a = d(a, u, c, f, e[g + 0], 7, -680876936), f = d(f, a, u, c, e[g + 1], 12, -389564586), c = d(c, f, a, u, e[g + 2], 17, 606105819), u = d(u, c, f, a, e[g + 3], 22, -1044525330), a = d(a, u, c, f, e[g + 4], 7, -176418897), f = d(f, a, u, c, e[g + 5], 12, 1200080426), c = d(c, f, a, u, e[g + 6], 17, -1473231341), u = d(u, c, f, a, e[g + 7], 22, -45705983), a = d(a, u, c, f, e[g + 8], 7, 1770035416), f = d(f, a, u, c, e[g + 9], 12, -1958414417), c = d(c, f, a, u, e[g + 10], 17, -42063), u = d(u, c, f, a, e[g + 11], 22, -1990404162), a = d(a, u, c, f, e[g + 12], 7, 1804603682), f = d(f, a, u, c, e[g + 13], 12, -40341101), c = d(c, f, a, u, e[g + 14], 17, -1502002290), u = d(u, c, f, a, e[g + 15], 22, 1236535329), a = h(a, u, c, f, e[g + 1], 5, -165796510), f = h(f, a, u, c, e[g + 6], 9, -1069501632), c = h(c, f, a, u, e[g + 11], 14, 643717713), u = h(u, c, f, a, e[g + 0], 20, -373897302), a = h(a, u, c, f, e[g + 5], 5, -701558691), f = h(f, a, u, c, e[g + 10], 9, 38016083), c = h(c, f, a, u, e[g + 15], 14, -660478335), u = h(u, c, f, a, e[g + 4], 20, -405537848), a = h(a, u, c, f, e[g + 9], 5, 568446438), f = h(f, a, u, c, e[g + 14], 9, -1019803690), c = h(c, f, a, u, e[g + 3], 14, -187363961), u = h(u, c, f, a, e[g + 8], 20, 1163531501), a = h(a, u, c, f, e[g + 13], 5, -1444681467), f = h(f, a, u, c, e[g + 2], 9, -51403784), c = h(c, f, a, u, e[g + 7], 14, 1735328473), u = h(u, c, f, a, e[g + 12], 20, -1926607734), a = l(a, u, c, f, e[g + 5], 4, -378558), f = l(f, a, u, c, e[g + 8], 11, -2022574463), c = l(c, f, a, u, e[g + 11], 16, 1839030562), u = l(u, c, f, a, e[g + 14], 23, -35309556), a = l(a, u, c, f, e[g + 1], 4, -1530992060), f = l(f, a, u, c, e[g + 4], 11, 1272893353), c = l(c, f, a, u, e[g + 7], 16, -155497632), u = l(u, c, f, a, e[g + 10], 23, -1094730640), a = l(a, u, c, f, e[g + 13], 4, 681279174), f = l(f, a, u, c, e[g + 0], 11, -358537222), c = l(c, f, a, u, e[g + 3], 16, -722521979), u = l(u, c, f, a, e[g + 6], 23, 76029189), a = l(a, u, c, f, e[g + 9], 4, -640364487), f = l(f, a, u, c, e[g + 12], 11, -421815835), c = l(c, f, a, u, e[g + 15], 16, 530742520), u = l(u, c, f, a, e[g + 2], 23, -995338651), a = _(a, u, c, f, e[g + 0], 6, -198630844), f = _(f, a, u, c, e[g + 7], 10, 1126891415), c = _(c, f, a, u, e[g + 14], 15, -1416354905), u = _(u, c, f, a, e[g + 5], 21, -57434055), a = _(a, u, c, f, e[g + 12], 6, 1700485571), f = _(f, a, u, c, e[g + 3], 10, -1894986606), c = _(c, f, a, u, e[g + 10], 15, -1051523), u = _(u, c, f, a, e[g + 1], 21, -2054922799), a = _(a, u, c, f, e[g + 8], 6, 1873313359), f = _(f, a, u, c, e[g + 15], 10, -30611744), c = _(c, f, a, u, e[g + 6], 15, -1560198380), u = _(u, c, f, a, e[g + 13], 21, 1309151649), a = _(a, u, c, f, e[g + 4], 6, -145523070), f = _(f, a, u, c, e[g + 11], 10, -1120210379), c = _(c, f, a, u, e[g + 2], 15, 718787259), u = _(u, c, f, a, e[g + 9], 21, -343485551), a = s(a, p), u = s(u, m), c = s(c, T), f = s(f, v)
                        }
                        return r([a, u, c, f])
                    },
                    sha1: function(e) {
                        var i, n, o, e = t.utf8encode(y(e)),
                            c = 1732584193,
                            d = -271733879,
                            h = -1732584194,
                            l = 271733878,
                            _ = -1009589776,
                            p = 0,
                            m = new Array(80);
                        for (e = a(e, 8 * e.length), o = e.length; o > p; p += 16) {
                            var T = c,
                                v = d,
                                b = h,
                                w = l,
                                I = _;
                            for (i = 0; 80 > i; i++) m[i] = 16 > i ? e[p + i] : u(m[i - 3] ^ m[i - 8] ^ m[i - 14] ^ m[i - 16], 1), n = s(s(u(c, 5), f(i, d, h, l)), s(s(_, m[i]), g(i))), _ = l, l = h, h = u(d, 30), d = c, c = n;
                            c = s(c, T), d = s(d, v), h = s(h, b), l = s(l, w), _ = s(_, I)
                        }
                        return r([c, d, h, l, _], 3)
                    },
                    sha256: function(e) {
                        var i, n, o, u, e = t.utf8encode(y(e)),
                            c = 1779033703,
                            d = -1150833019,
                            h = 1013904242,
                            l = -1521486534,
                            _ = 1359893119,
                            f = -1694144372,
                            g = 528734635,
                            v = 1541459225,
                            b = 0,
                            I = new Array(64);
                        for (e = a(e, 8 * e.length), n = e.length; n > b; b += 16) {
                            var E = c,
                                x = d,
                                N = h,
                                S = l,
                                C = _,
                                L = f,
                                A = g,
                                R = v;
                            for (i = 0; 64 > i; i++) I[i] = 16 > i ? e[b + i] : s(s(s(T(I[i - 2]), I[i - 7]), m(I[i - 15])), I[i - 16]), o = s(s(s(s(v, p(_, 6) ^ p(_, 11) ^ p(_, 25)), _ & f ^ ~_ & g), w[i]), I[i]), u = s(p(c, 2) ^ p(c, 13) ^ p(c, 22), c & d ^ c & h ^ d & h), v = g, g = f, f = _, _ = s(l, o), l = h, h = d, d = c, c = s(o, u);
                            c = s(c, E), d = s(d, x), h = s(h, N), l = s(l, S), _ = s(_, C), f = s(f, L), g = s(g, A), v = s(v, R)
                        }
                        return r([c, d, h, l, _, f, g, v], 3)
                    }
                })
            })
        },
        "Ti/XML": function() {
            define(["Ti/_/Evented", "Ti/_/lang"], function(t, e) {
                return [
                    ["Document", "doctype,implementation,documentElement,inputEncoding,xmlEncoding,domConfig", "xmlStandalone,xmlVersion,strictErrorChecking,documentURI"],
                    ["Node", "nodeName,nodeType,parentNode,childNodes,firstChild,lastChild,previousSibling,nextSibling,attributes,ownerDocument,namespaceURI,localName,baseURI", "textContent,nodeValue,prefix"],
                    ["NamedNodeMap", "length"],
                    ["CharacterData", "length", "data"],
                    ["Attr", "name,specified,ownerElement,schemaTypeInfo,isId", "value"],
                    ["Element", "tagName,schemaTypeInfo"],
                    ["Text", "isElementContentWhitespace,wholeText"],
                    ["DocumentType", "name,entities,notations,publicId,systemId,internalSubset"],
                    ["Notation", "publicId,systemId"],
                    ["NodeList", "length"],
                    ["Entity", "publicId,systemId,notationName,inputEncoding,xmlEncoding,xmlVersion"],
                    ["ProcessingInstruction", "target", "data"]
                ].forEach(function(t) {
                    var i = window[t[0]];
                    i && e.generateAccessors(i, t[1], t[2])
                }), e.setObject("Ti.XML", t, {
                    parseString: function(t) {
                        return (new DOMParser).parseFromString(t, "text/xml")
                    },
                    serializeToString: function(t) {
                        return (new XMLSerializer).serializeToString(t)
                    }
                })
            })
        },
        "Ti/Yahoo": function() {
            define(["Ti/_/Evented", "Ti/_/lang"], function(t, e) {
                return e.setObject("Ti.Yahoo", t, {
                    yql: function(t, e) {
                        require(["http://query.yahooapis.com/v1/public/yql?format=json&callback=define&q=" + encodeURIComponent(t).replace(/!/g, "%21").replace(/'/g, "%27").replace(/\(/, "%28").replace(/\)/, "%29")], function(t) {
                            var t = t || {},
                                i = t.query && t.query.results;
                            require.is(e, "Function") && e({
                                success: !!i,
                                data: i,
                                message: t.error && t.error.description
                            })
                        })
                    }
                })
            })
        },
        "Ti/Facebook/LoginButton": function() {
            define(["Ti/_/declare", "Ti/_/Evented", "Ti/UI/Button", "Ti/Facebook", "Ti/_/lang"], function(t, e, i, n, o) {
                var r = "themes/" + require.config.ti.theme + "/Facebook/",
                    a = ["login.png", "logout.png", "loginWide.png", "logout.png"],
                    s = ["loginPressed.png", "logoutPressed.png", "loginWidePressed.png", "logoutPressed.png"];
                return t("Ti.Facebook.LoginButton", i, {
                    constructor: function() {
                        this._clearDefaultLook(), this._updateImages(), this._loggedInState = n.loggedIn, this.addEventListener("singletap", function() {
                            n.loggedIn ? n.logout() : n.authorize()
                        }), n.addEventListener("login", o.hitch(this, "_updateImages")), n.addEventListener("logout", o.hitch(this, "_updateImages"))
                    },
                    _updateImages: function() {
                        this._loggedInState = n.loggedIn;
                        var t = 0;
                        n.loggedIn && t++, this.style === n.BUTTON_STYLE_WIDE && (t += 2), this.backgroundImage = r + a[t], this.backgroundSelectedImage = r + s[t], this._hasSizeDimensions() && this._triggerLayout()
                    },
                    _getContentSize: function() {
                        return {
                            width: n.loggedIn || this.style !== n.BUTTON_STYLE_WIDE ? 144 : 318,
                            height: 58
                        }
                    },
                    properties: {
                        style: {
                            post: function() {
                                this._updateImages()
                            },
                            value: n.BUTTON_STYLE_NORMAL
                        }
                    }
                })
            })
        },
        "Ti/UI/Button": function() {
            define(["Ti/_/declare", "Ti/_/UI/Widget", "Ti/_/dom", "Ti/_/css", "Ti/_/style", "Ti/_/lang", "Ti/Locale", "Ti/UI"], function(t, e, i, n, o, r, a, s) {
                var u = require.on,
                    c = o.set,
                    d = {
                        post: function() {
                            this.backgroundColor || this.backgroundDisabledColor || this.backgroundDisabledImage || this.backgroundFocusedColor || this.backgroundFocusedImage || this.backgroundImage || this.backgroundSelectedColor || this.backgroundSelectedImage ? this._clearDefaultLook() : this._setDefaultLook(), this._doBackground()
                        }
                    },
                    h = {
                        post: function() {
                            this._buttonTitle.text = a._getString(this.titleid, this.title), this._hasSizeDimensions() && this._triggerLayout()
                        }
                    };
                return t("Ti.UI.Button", e, {
                    constructor: function() {
                        var t = this._contentContainer = s.createView({
                                width: s.INHERIT,
                                height: s.INHERIT,
                                layout: s._LAYOUT_CONSTRAINING_HORIZONTAL,
                                borderColor: "transparent"
                            }),
                            e = this.domNode;
                        this._add(t), t._add(this._buttonImage = s.createImageView()), t._add(this._buttonTitle = s.createLabel({
                            textAlign: s.TEXT_ALIGNMENT_CENTER,
                            verticalAlign: s.TEXT_VERTICAL_ALIGNMENT_CENTER,
                            width: s.INHERIT,
                            height: s.INHERIT
                        })), this._setDefaultLook(), u(this, "touchstart", this, function() {
                            this._hasDefaultLook ? (n.remove(e, "TiUIElementGradient"), n.add(e, "TiUIElementGradientActive")) : (this.selectedColor && (this._buttonTitle.color = this.selectedColor), this.backgroundSelectedColor && c(this.domNode, "backgroundColor", this.backgroundSelectedColor))
                        }), u(this, "touchend", this, function() {
                            this._hasDefaultLook ? (n.remove(e, "TiUIElementGradientActive"), n.add(e, "TiUIElementGradient")) : (this.selectedColor && (this._buttonTitle.color = this.color || "#000"), this.backgroundSelectedColor && c(this.domNode, "backgroundColor", this.backgroundColor))
                        }), u(e, "mouseout", this, function() {
                            this.selectedColor && (this._buttonTitle.color = this.color || "#000")
                        })
                    },
                    _defaultWidth: s.SIZE,
                    _defaultHeight: s.SIZE,
                    _setDefaultLook: function() {
                        this._hasDefaultLook || (this._hasDefaultLook = !0, this._previousBorderWidth = this.borderWidth, this._previousBorderColor = this.borderColor, n.add(this.domNode, "TiUIElementGradient"), n.add(this.domNode, "TiUIButtonDefault"), this._contentContainer.borderWidth = 6, this._getBorderFromCSS())
                    },
                    _clearDefaultLook: function() {
                        this._hasDefaultLook && (this._hasDefaultLook = !1, this.borderWidth = this._previousBorderWidth, this.borderColor = this._previousBorderColor, n.remove(this.domNode, "TiUIElementGradient"), n.remove(this.domNode, "TiUIButtonDefault"), this._contentContainer.borderWidth = 0)
                    },
                    properties: {
                        backgroundColor: d,
                        backgroundDisabledColor: d,
                        backgroundDisabledImage: d,
                        backgroundFocusedColor: d,
                        backgroundFocusedImage: d,
                        backgroundImage: d,
                        backgroundSelectedColor: d,
                        backgroundSelectedImage: d,
                        enabled: {
                            set: function(t, e) {
                                return t !== e && (this._hasDefaultLook && (t ? (n.add(this.domNode, "TiUIElementGradient"), c(this.domNode, "backgroundColor", "")) : (n.remove(this.domNode, "TiUIElementGradient"), c(this.domNode, "backgroundColor", "#aaa"))), this._setTouchEnabled(t)), t
                            },
                            value: !0
                        },
                        image: {
                            set: function(t) {
                                return this._buttonImage.image = t, t
                            }
                        },
                        shadowColor: {
                            post: function(t) {
                                this._buttonTitle.shadowColor = t
                            }
                        },
                        shadowOffset: {
                            post: function(t) {
                                this._buttonTitle.shadowOffset = t
                            }
                        },
                        shadowRadius: {
                            post: function(t) {
                                this._buttonTitle.shadowRadius = t
                            }
                        },
                        selectedColor: void 0,
                        textAlign: {
                            set: function(t) {
                                return this._buttonTitle.textAlign = t
                            }
                        },
                        title: h,
                        titleid: h,
                        verticalAlign: {
                            set: function(t) {
                                return this._buttonTitle.verticalAlign = t
                            }
                        }
                    }
                })
            })
        },
        "Ti/_/UI/Widget": function() {
            define(["Ti/_/declare", "Ti/UI/View"], function(t, e) {
                return t("Ti._.UI.Widget", e)
            })
        },
        "Ti/UI/View": function() {
            define(["Ti/_/declare", "Ti/_/UI/Element", "Ti/_/string", "Ti/_/Layouts", "Ti/UI"], function(t, e, i, n, o) {
                var r = /^horizontal|vertical|constrainingHorizontal|constrainingVertical$/;
                return t("Ti.UI.View", e, {
                    constructor: function() {
                        this.__values__.constants.children = [], this._setLayout(), this.containerNode = this.domNode
                    },
                    _publish: function(t) {
                        this.children.push(t), t._isPublished = 1
                    },
                    _unpublish: function(t) {
                        var e = this.children,
                            i = e.indexOf(t);
                        ~i && e.splice(i, 1)
                    },
                    add: function(t) {
                        this._add(t), this._publish(t)
                    },
                    remove: function(t) {
                        this._remove(t), this._unpublish(t)
                    },
                    _defaultWidth: o.FILL,
                    _defaultHeight: o.FILL,
                    _setLayout: function(t) {
                        return t = r.test(t) ? t : "composite", this._layout && (this._layout.destroy(), this._layout = null), this._layout = new(n[i.capitalize("horizontal" !== t || this.horizontalWrap ? t : "constrainingHorizontal")])({
                            element: this
                        }), t
                    },
                    constants: {
                        children: void 0
                    },
                    properties: {
                        layout: {
                            set: "_setLayout"
                        },
                        horizontalWrap: {
                            post: function() {
                                this.layout = this.layout
                            },
                            value: !0
                        }
                    }
                })
            })
        },
        "Ti/_/UI/Element": function() {
            define(["Ti/_/css", "Ti/_/declare", "Ti/_/dom", "Ti/_/event", "Ti/_/has", "Ti/_/lang", "Ti/_/style", "Ti/_/Evented", "Ti/UI", "Ti/UI/Animation"], function(t, e, i, n, o, r, a, s, u, c) {
                var d = window,
                    h = i.unitize,
                    l = i.computeSize,
                    _ = require.on,
                    f = a.set,
                    g = require.is,
                    p = r.isDef,
                    m = {
                        post: "_doBackground"
                    },
                    T = function(t, e) {
                        return (null === t || !g(t, "String") && !g(t, "Number")) && (t = void 0), t !== e && !this._batchUpdateInProgress && this._triggerLayout(), t
                    },
                    v = {
                        set: T
                    },
                    b = "px",
                    y = o("touch"),
                    w = d.navigator.msPointerEnabled;
                return e("Ti._.UI.Element", s, {
                    domType: null,
                    domNode: null,
                    _alive: 1,
                    constructor: function() {
                        {
                            var e = this,
                                o = 0;
                            e.domNode = e._setFocusNode(i.create(e.domType || "div", {
                                className: "TiUIElement " + t.clean(e.declaredClass),
                                "data-widget-id": e.widgetId
                            }))
                        }
                        e._children = [], _(e, "touchstart", e, "_doBackground"), _(e, "touchend", e, "_doBackground"), _(e.domNode, w ? "MSPointerDown" : y ? "touchstart" : "mousedown", function(t) {
                            var i = [_(d, w ? "MSPointerMove" : y ? "touchmove" : "mousemove", function(t) {
                                (y || o) && (t._elements || (t._elements = [])).push(e)
                            }), _(d, w ? "MSPointerUp" : y ? "touchend" : "mouseup", function(t) {
                                o = 0, (t._elements || (t._elements = [])).push(e), n.off(i)
                            }), y && _(d, "touchcancel", function(t) {
                                (t._elements || (t._elements = [])).push(e), n.off(i)
                            })];
                            o = 1, (t._elements || (t._elements = [])).push(e)
                        });
                        var r = e.__values__.constants;
                        e._layoutCoefficients = {
                            width: {
                                x1: 0,
                                x2: 0,
                                x3: 0
                            },
                            minWidth: {
                                x1: 0,
                                x2: 0,
                                x3: 0
                            },
                            sandboxWidth: {
                                x1: 0,
                                x2: 0,
                                x3: 0
                            },
                            height: {
                                x1: 0,
                                x2: 0,
                                x3: 0
                            },
                            minHeight: {
                                x1: 0,
                                x2: 0,
                                x3: 0
                            },
                            sandboxHeight: {
                                x1: 0,
                                x2: 0,
                                x3: 0
                            },
                            left: {
                                x1: 0,
                                x2: 0,
                                x3: 0
                            },
                            top: {
                                x1: 0,
                                x2: 0,
                                x3: 0,
                                x4: 0
                            }
                        }, r.size = {
                            x: 0,
                            y: 0,
                            width: 0,
                            height: 0
                        }, r.rect = {
                            x: 0,
                            y: 0,
                            width: 0,
                            height: 0
                        }
                    },
                    fireEvent: function(t, e) {
                        e = e || {};
                        var i, n = e.bubbles;
                        s.fireEvent.call(this, t, e), n && !e.cancelBubble && this.bubbleParent && this._parent && (p(e.x) && (i = this.convertPointToView({
                            x: e.x,
                            y: e.y
                        }, this._parent), e.x = i ? i.x : e.x, e.y = i ? i.y : e.y), this._parent.fireEvent(t, e))
                    },
                    _setParent: function(t) {
                        this._parent = t
                    },
                    _add: function(t, e) {
                        t._hidden = e, t._setParent(this), this._children.push(t), this.containerNode.appendChild(t.domNode), t._triggerLayout()
                    },
                    _insertAt: function(t, e, i) {
                        var n = this._children;
                        e > n.length || 0 > e || (e === n.length ? this._add(t, i) : (t._parent = this, this.containerNode.insertBefore(t.domNode, n[e].domNode), n.splice(e, 0, t), this._triggerLayout()))
                    },
                    _remove: function(t) {
                        var e = this._children,
                            n = e.indexOf(t); - 1 !== n && (e.splice(n, 1), t._setParent(), i.detach(t.domNode), this._triggerLayout())
                    },
                    _removeAllChildren: function() {
                        for (var t = this._children; t.length;) this.remove(t[0]);
                        this._triggerLayout()
                    },
                    destroy: function() {
                        if (this._alive) {
                            for (var t = this._children; t.length;) t.splice(0, 1)[0].destroy();
                            this._parent && this._parent._remove(this), this.domNode && (i.destroy(this.domNode), this.domNode = null)
                        }
                        s.destroy.apply(this, arguments)
                    },
                    _isAttachedToActiveWin: function() {
                        for (var t = !1, e = this; e;) {
                            if (e === u._container) {
                                t = !0;
                                break
                            }
                            e = e._parent
                        }
                        return t
                    },
                    _needsMeasuring: !0,
                    _triggerLayout: function(t) {
                        this._needsMeasuring = !0, this._isAttachedToActiveWin() && (!this._batchUpdateInProgress || t) && u._triggerLayout(this, t)
                    },
                    _hasSizeDimensions: function() {
                        return this._hasSizeWidth() || this._hasSizeHeight()
                    },
                    _hasSizeHeight: function() {
                        return isNaN(this._layoutCoefficients.height.x1)
                    },
                    _hasSizeWidth: function() {
                        return isNaN(this._layoutCoefficients.width.x1)
                    },
                    startLayout: function() {
                        this._batchUpdateInProgress = !0
                    },
                    finishLayout: function() {
                        this._batchUpdateInProgress = !1, u._triggerLayout(this, !0)
                    },
                    updateLayout: function(t) {
                        this.startLayout();
                        for (var e = 0, i = t.length; i > e; e++) this[e] = t[e];
                        this.finishLayout()
                    },
                    convertPointToView: function(t, e) {
                        function i(t, e, i) {
                            for (var n = e.x, o = e.y, r = i ? 1 : -1; t;) n += r * t.domNode.offsetLeft, o += r * t.domNode.offsetTop, t = t._parent;
                            return {
                                x: n,
                                y: o
                            }
                        }
                        if (!this._isAttachedToActiveWin() || !e._isAttachedToActiveWin()) return null;
                        if (!t || !g(t.x, "Number") || !g(t.y, "Number")) throw new Error("Invalid point");
                        if (!e.domNode) throw new Error("Invalid destination view");
                        return i(e, i(this, t, !0), !1)
                    },
                    _getContentOffset: function() {
                        return {
                            x: 0,
                            y: 0
                        }
                    },
                    _computeGradient: function() {
                        var t = this.backgroundGradient;
                        colors = t.colors, type = t.type, cssVal = type + "-gradient(";
                        var e = l(t.startPoint.x, this._measuredWidth),
                            i = l(t.startPoint.y, this._measuredHeight),
                            n = l("50%", this._measuredWidth),
                            o = l("50%", this._measuredHeight),
                            r = colors.length;
                        if ("linear" === type) {
                            var a, s, u = l(t.endPoint.x, this._measuredWidth),
                                c = l(t.endPoint.y, this._measuredHeight);
                            if (Math.abs(e - u) < .01) c > i ? (a = i, s = c, cssVal += "270deg") : (a = c, s = i, cssVal += "90deg");
                            else if (Math.abs(i - c) < .01) u > e ? (a = e, s = u, cssVal += "0deg") : (a = u, s = e, cssVal += "180deg");
                            else {
                                var d = !1;
                                if (e > u) {
                                    d = !0;
                                    var h = e;
                                    e = u, u = h, h = i, i = c, c = h
                                }
                                var _ = Math.atan2(c - i, u - e),
                                    p = Math.tan(_),
                                    m = Math.cos(_),
                                    T = o - n * p,
                                    v = (i - e * p - T) * m,
                                    y = v * Math.sin(_),
                                    w = v * m,
                                    e = e + y,
                                    i = i - w,
                                    u = u + y,
                                    c = c - w,
                                    I = Math.PI / 2 - _;
                                if (_ > 0) {
                                    var E = T * Math.sin(I),
                                        x = -E * Math.cos(I),
                                        N = E * Math.sin(I);
                                    a = Math.sqrt(Math.pow(e - x, 2) + Math.pow(i - N, 2)), s = Math.sqrt(Math.pow(u - x, 2) + Math.pow(c - N, 2))
                                } else {
                                    var E = (this._measuredHeight - T) * Math.sin(I),
                                        x = -E * Math.cos(I),
                                        N = this._measuredHeight - E * Math.sin(I);
                                    a = Math.sqrt(Math.pow(e - x, 2) + Math.pow(i - N, 2)), s = Math.sqrt(Math.pow(u - x, 2) + Math.pow(c - N, 2))
                                }
                                _ = d ? _ + Math.PI : _, cssVal += Math.round(360 * (2 * Math.PI - _) / (2 * Math.PI)) + "deg"
                            }
                            for (var S = 0; r > S; S++) {
                                var C = colors[S];
                                g(C, "String") && (C = {
                                    color: C
                                }), g(C.offset, "Number") || (C.offset = S / (r - 1)), cssVal += "," + C.color + " " + Math.round(l(100 * C.offset + "%", s - a) + a) + b
                            }
                        } else if ("radial" === type) {
                            var L = Math.min(this._measuredWidth, this._measuredHeight),
                                A = l(t.startRadius, L),
                                R = l(t.endRadius, L),
                                W = [],
                                d = !1;
                            if (A > R) {
                                var h = A;
                                A = R, R = h, d = !0;
                                for (var S = 0;
                                    (r - 2) / 2 >= S; S++) {
                                    var k = r - S - 1;
                                    W[S] = colors[k], W[k] = colors[S]
                                }
                                if (r % 2 === 1) {
                                    var O = Math.floor(r / 2);
                                    W[O] = colors[O]
                                }
                            } else
                                for (var S = 0; r > S; S++) W[S] = colors[S];
                            cssVal += e + b + " " + i + b;
                            for (var S = 0; r > S; S++) {
                                var C = W[S];
                                g(C, "String") && (C = {
                                    color: C
                                });
                                var D;
                                D = g(C.offset, "Number") ? d ? r % 2 === 1 && S === Math.floor(r / 2) ? C.offset : 1 - C.offset : C.offset : S / (r - 1), cssVal += "," + C.color + " " + Math.round(l(100 * D + "%", R - A) + A) + b
                            }
                        }
                        require.config.vendorPrefixes.css.forEach(function(t) {
                            f(this.domNode, "backgroundImage", t + cssVal + ")")
                        }, this)
                    },
                    _defaultBackgroundColor: void 0,
                    _defaultBackgroundImage: void 0,
                    _defaultBackgroundDisabledColor: void 0,
                    _defaultBackgroundDisabledImage: void 0,
                    _defaultBackgroundFocusedColor: void 0,
                    _defaultBackgroundFocusedImage: void 0,
                    _defaultBackgroundSelectedColor: void 0,
                    _defaultBackgroundSelectedImage: void 0,
                    _borderLeftWidth: 0,
                    _borderRightWidth: 0,
                    _borderTopWidth: 0,
                    _borderBottomWidth: 0,
                    _getBorderFromCSS: function() {
                        setTimeout(r.hitch(this, function() {
                            var t = d.getComputedStyle(this.domNode),
                                e = parseInt(t["border-left-width"]),
                                i = parseInt(t["border-right-width"]),
                                n = parseInt(t["border-top-width"]),
                                o = parseInt(t["border-bottom-width"]);
                            isNaN(e) || isNaN(i) || isNaN(n) || isNaN(o) || (this.borderWidth = e === i && e === n && e === o ? e : [e, i, n, o])
                        }), 1)
                    },
                    _doBackground: function(t) {
                        if (!this.backgroundGradient) {
                            t = t || {};
                            var e, i = (t.type || "").match(/mouse(over|out)/),
                                n = this.backgroundImage || this._defaultBackgroundImage || "none",
                                o = this.backgroundColor || this._defaultBackgroundColor,
                                r = this.backgroundRepeat,
                                s = this.domNode.style;
                            this._touching && (o = this.backgroundSelectedColor || this._defaultBackgroundSelectedColor || o, n = this.backgroundSelectedImage || this._defaultBackgroundSelectedImage || n), i && (this._over = "over" === i[1]), !this._touching && this.focusable && this._over && (o = this.backgroundFocusedColor || this._defaultBackgroundFocusedColor || o, n = this.backgroundFocusedImage || this._defaultBackgroundFocusedImage || n), this.enabled || (o = this.backgroundDisabledColor || this._defaultBackgroundDisabledColor || o, n = this.backgroundDisabledImage || this._defaultBackgroundDisabledImage || n), o = o || (n && "none" !== n ? "transparent" : ""), s.backgroundColor.toLowerCase() !== o.toLowerCase() && (s.backgroundColor = o), n = a.url(n), s.backgroundImage.replace(/'|"/g, "").toLowerCase() !== n.toLowerCase() && (s.backgroundImage = n), n && (e = r ? "repeat" : "no-repeat", s.backgroundRepeat !== e && (s.backgroundRepeat = e), e = r ? "auto" : "100% 100%", s.backgroundSize.replace(/(100%) 100%/, "$1") !== e && (s.backgroundSize = e))
                        }
                    },
                    _setFocusNode: function(t) {
                        var e = this._focus = this._focus || {};
                        return e.node !== t && (e.node && (n.off(e.evts), n.off(e.evtsMore)), e.node = t, e.evts = [_(t, "focus", this, "_doBackground"), _(t, "blur", this, "_doBackground")]), t
                    },
                    show: function() {
                        this.visible = !0
                    },
                    hide: function() {
                        this.visible = !1
                    },
                    animate: function(t, e) {
                        return this._isAttachedToActiveWin() && c._play(this, t && "Ti.UI.Animation" === t.declaredClass ? t : new c(t)).then(e)
                    },
                    _setTouchEnabled: function(t) {
                        var e, i = this._children,
                            n = 0,
                            o = i.length;
                        for (f(this.domNode, "pointerEvents", t ? "auto" : "none"); o > n; n++) e = i[n], e._setTouchEnabled(t && e.touchEnabled)
                    },
                    _measuredLeft: 0,
                    _measuredTop: 0,
                    _measuredWidth: 0,
                    _measuredHeight: 0,
                    _measuredSandboxWidth: 0,
                    _measuredSandboxHeight: 0,
                    constants: {
                        size: {
                            get: function() {
                                return {
                                    x: 0,
                                    y: 0,
                                    width: this._measuredWidth,
                                    height: this._measuredHeight
                                }
                            }
                        },
                        rect: {
                            get: function() {
                                return {
                                    x: this._measuredLeft,
                                    y: this._measuredTop,
                                    width: this._measuredWidth,
                                    height: this._measuredHeight
                                }
                            }
                        },
                        parent: function() {
                            return this._parent
                        }
                    },
                    properties: {
                        backgroundColor: m,
                        backgroundDisabledColor: m,
                        backgroundDisabledImage: m,
                        backgroundFocusedColor: m,
                        backgroundFocusedImage: m,
                        backgroundGradient: {
                            set: function(t) {
                                if (g(t.type, "String") && g(t.colors, "Array") && !(t.colors.length < 2)) {
                                    var e = t.type,
                                        i = t.startPoint,
                                        n = t.endPoint;
                                    if ("linear" === e) i && "x" in i && "y" in i || (t.startPoint = {
                                        x: "0%",
                                        y: "50%"
                                    }), n && "x" in n && "y" in n || (t.endPoint = {
                                        x: "100%",
                                        y: "50%"
                                    });
                                    else {
                                        if ("radial" !== e) return;
                                        i && "x" in i && "y" in i || (t.startPoint = {
                                            x: "50%",
                                            y: "50%"
                                        })
                                    }
                                    return t
                                }
                            },
                            post: function() {
                                this.backgroundGradient && this._computeGradient()
                            }
                        },
                        backgroundImage: m,
                        backgroundRepeat: m,
                        backgroundSelectedColor: m,
                        backgroundSelectedImage: m,
                        borderColor: {
                            set: function(t) {
                                return f(this.domNode, "borderColor", t), t
                            }
                        },
                        borderRadius: {
                            set: function(t) {
                                return f(this.domNode, "borderRadius", h(t)), t
                            },
                            value: 0
                        },
                        borderWidth: {
                            set: function(t, e) {
                                if (g(t, "Array")) {
                                    if (4 !== t.length) return e;
                                    f(this.domNode, {
                                        borderLeftWidth: (this._borderLeftWidth = t[0]) + b,
                                        borderRightWidth: (this._borderRightWidth = t[1]) + b,
                                        borderTopWidth: (this._borderTopWidth = t[2]) + b,
                                        borderBottomWidth: (this._borderBottomWidth = t[3]) + b
                                    }), this._borderSet = !0
                                } else {
                                    if (isNaN(t)) return e;
                                    f(this.domNode, "borderWidth", t + b), this._borderLeftWidth = this._borderRightWidth = this._borderTopWidth = this._borderBottomWidth = t, this._borderSet = !0
                                }
                                return t
                            },
                            post: T,
                            value: 0
                        },
                        bottom: v,
                        bubbleParent: !0,
                        center: v,
                        color: {
                            set: function(t) {
                                return f(this.domNode, "color", t)
                            }
                        },
                        enabled: {
                            post: "_doBackground",
                            set: function(t) {
                                return this._focus.node.disabled = !t, t
                            },
                            value: !0
                        },
                        focusable: {
                            value: !1,
                            set: function(t) {
                                return i.attr[t ? "set" : "remove"](this._focus.node, "tabindex", 0), t
                            }
                        },
                        _minHeight: v,
                        _maxHeight: v,
                        height: v,
                        left: v,
                        opacity: {
                            set: function(t) {
                                return f(this.domNode, "opacity", t)
                            }
                        },
                        visible: {
                            set: function(t, e) {
                                return t = !!t, t !== e && (!t && (this._lastDisplay = a.get(this.domNode, "display")), f(this.domNode, "display", t ? this._lastDisplay || "" : "none"), t && void 0 !== e && this._triggerLayout()), t
                            }
                        },
                        right: v,
                        touchEnabled: {
                            set: function(t) {
                                return this._setTouchEnabled(t), t
                            },
                            value: !0
                        },
                        top: v,
                        transform: {
                            set: function(t) {
                                return f(this.domNode, "transform", t && t.toCSS()), this._curTransform = t
                            }
                        },
                        _minWidth: v,
                        _maxWidth: v,
                        width: v,
                        zIndex: v
                    }
                })
            })
        },
        "Ti/_/css": function() {
            define(["Ti/_", "Ti/_/string"], function(t, e) {
                function i(t, i, n) {
                    for (var o, r = 0, a = " " + t.className + " ", i = require.is(i, "Array") ? i : i.split(" "); r < i.length; r++) o = a.indexOf(" " + i[r] + " "), n && -1 === o ? a += i[r] + " " : n || -1 === o || (a = a.substring(0, o) + a.substring(o + i[r].length + 1));
                    t.className = e.trim(a)
                }
                return t.css = {
                    add: function(t, e) {
                        i(t, e, 1)
                    },
                    remove: function(t, e) {
                        i(t, e)
                    },
                    clean: function(t) {
                        return t.replace(/[^A-Za-z0-9\-]/g, "")
                    }
                }
            })
        },
        "Ti/UI/Animation": function() {
            define(["Ti/_/declare", "Ti/_/Evented", "Ti/_/style", "Ti/UI"], function(t, e, i, n) {
                function o() {
                    n._layoutInProgress ? l.once(n, "postlayout", function() {
                        requestAnimationFrame(r)
                    }) : requestAnimationFrame(r)
                }

                function r() {
                    var t, e, i, n, r, a, s, d, l, _, f, g, p, v, b = h();
                    u = 0;
                    for (t in E)
                        for (e = E[t], r = 0; r < e.length; r++)
                            if (i = e[r], !i.paused) {
                                if (_ = i.duration ? Math.min(1, (b - i.ts) / i.duration) : 1, f = c[i.curve](i.forward ? _ : 1 - _), n = i.elem, n._isAttachedToActiveWin())
                                    for (g in i.props) {
                                        if (v = i.props[g], d = v[0], l = v[1], 1 === _ && (p = i.forward ? l : d), "transform" === g) {
                                            if (1 !== _) {
                                                for (p = [], s = d.length, a = 0; s > a; a++)(12 > a || a > 14) && (p[a] = d[a] + (l[a] - d[a]) * f);
                                                u = 1
                                            }
                                            16 === p.length ? (a = p.splice(12), p = "matrix3d(" + p.join(",") + ") rotate3d(" + a.join(",") + "deg)") : (a = p.pop(), p = "matrix(" + p.join(",") + ") rotate(" + a + "deg)"), g = x
                                        } else if (m[g]) {
                                            if (1 !== _) {
                                                for (p = [], a = 0; 4 > a; a++) p[a] = Math.floor(d[a] + (l[a] - d[a]) * f);
                                                u = 1
                                            }
                                            p = "rgba(" + p.join(",") + ")"
                                        } else T[g] && (1 !== _ && (p = d + (l - d) * f, u = 1), p = "opacity" === g ? p : p + "px");
                                        i.prev !== p && (n.domNode.style[g] = p), i.prev = p
                                    }
                                1 === _ && (i.ts = b, i.duration && i.reverse && i.forward ? (i.forward = 0, u = 1) : i.repeat-- > 0 ? u = i.forward = 1 : (e.splice(r--, 1), i.promise.resolve(), e.length || E[t].activeCount || delete E[t]))
                            }
                    u && o()
                }

                function a(t) {
                    var e, i, n, o;
                    if (t = t.trim().toLowerCase(), "#" === t.charAt(0)) i = 4 == t.length ? 4 : 8, isNaN(t = Number("0x" + t.substring(1))) || (n = (1 << i) - 1, o = 4 === i ? 17 : 1, o = [(t >> 2 * i & n) * o, (t >> i & n) * o, (t & n) * o, 1]);
                    else if (e = t.match(v))
                        for (o = e[1].split(/\s*,\s*/), e = 0; 3 > e;) o[e++] |= 0;
                    else N && (o = N[t]);
                    return o ? (o[3] = isNaN(e = parseFloat(o[3])) ? 1 : Math.min(Math.max(e, 0), 1), o) : void 0
                }

                function s(t, e, i, n) {
                    var o, r, a, s, u = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0];
                    if (t)
                        if (o = t[1], r = t[2].split(","), a = r.length, o && 16 === a)
                            for (s = 0; 12 > s; s++) u[s] = r[s];
                        else o || 6 !== a || (u[0] = r[0], u[1] = r[1], u[4] = r[2], u[5] = r[3], u[3] = r[4], u[7] = r[5]);
                    if (e)
                        if (o = e[1], r = e[2].split(","), a = r.length, o && 4 === a)
                            for (s = 0; 4 > s; s++) u[12 + s] = r[s];
                        else o || 1 !== a || (u[14] = 1, u[15] = r[0]);
                    return i = 2 === n ? [i.a, i.b, 0, i.tx, i.c, i.d, 0, i.ty, 0, 0, 1, 0, 0, 0, 1, i.rotation] : [i.m11, i.m12, i.m13, i.m14, i.m21, i.m22, i.m23, i.m24, i.m31, i.m32, i.m33, i.m34, i.rotationX, i.rotationY, i.rotationZ, i.rotation], [u, i]
                }
                for (var u, c = [function(t) {
                        return t *= 2, 1 > t ? Math.pow(t, 2) / 2 : -1 * (--t * (t - 2) - 1) / 2
                    }, function(t) {
                        return Math.pow(t, 2)
                    }, function(t) {
                        return t * (t - 2) * -1
                    }, function(t) {
                        return t
                    }], d = window, h = Date.now, l = require.on, _ = 0, f = ["ms", "moz", "webkit", "o"], g = f.length, p = {
                        autoreverse: 1,
                        bottom: 1,
                        center: 1,
                        curve: 1,
                        delay: 1,
                        duration: 1,
                        repeat: 1,
                        right: 1,
                        visible: 1,
                        zIndex: 1
                    }, m = {
                        backgroundColor: 1,
                        color: 1
                    }, T = {
                        height: 1,
                        left: 1,
                        opacity: 1,
                        top: 1,
                        width: 1
                    }, v = /^rgba?\(([\s\.,0-9]+)\)/, b = /3d/, y = /^Ti\.UI\.(2|3)DMatrix$/, w = /matrix(3d)?\(([^\)]*)/, I = /rotate(3d)?\(([^\)]*)/, E = {}, x = i.discover("transform"), N = require(require.config.ti.colorsModule), S = t("Ti.UI.Animation", e, {
                        properties: {
                            autoreverse: void 0,
                            backgroundColor: void 0,
                            bottom: void 0,
                            center: void 0,
                            color: void 0,
                            curve: void 0,
                            delay: void 0,
                            duration: void 0,
                            height: void 0,
                            left: void 0,
                            opacity: void 0,
                            repeat: void 0,
                            right: void 0,
                            top: void 0,
                            transform: void 0,
                            visible: void 0,
                            width: void 0,
                            zIndex: void 0
                        }
                    }); --g >= 0 && !d.requestAnimationFrame;) d.requestAnimationFrame = d[f[g] + "RequestAnimationFrame"];
                return d.requestAnimationFrame || (d.requestAnimationFrame = function(t) {
                    var e = h(),
                        i = Math.max(0, 16 - (e - _)),
                        n = window.setTimeout(function() {
                            t(e + i)
                        }, i);
                    return _ = e + i, n
                }), S._play = function(t, e) {
                    function n() {
                        if (!t._alive || !t._isAttachedToActiveWin()) return void f.activeCount--;
                        var n, r, l, v, E, x, N, S, C, L, A = {},
                            R = t._parent._layout.calculateAnimation(t, e);
                        for (l in g)
                            if (x = g[l], !p[l] && void 0 !== x) {
                                for (n = 0; n < f.length; n++) delete f[n].props[l], require.isEmpty(f[n].props) && f.splice(n--, 1);
                                if (v = i.get(t.domNode, l), m[l]) v = a(v), x = a(x), (x > v || v > x) && (A[l] = [v, x]);
                                else if (T[l]) isNaN(v = parseFloat(v)) && "opacity" === l && (v = 1), x = l in R ? R[l] : x, v !== x && (A[l] = [v, x]);
                                else if ("transform" === l && (E = x.declaredClass.match(y))) {
                                    if (E = 0 | E[1], C = v.match(w), L = v.match(I), b.test(v) || 3 === E) N = s(C, L, x, E), v = N[0], x = N[1];
                                    else if (2 === E) {
                                        if (v = [1, 0, 0, 1, 0, 0, 0], C)
                                            for (S = C[2].split(","), r = Math.min(6, S.length), n = 0; r > n; n++) v[n] = parseFloat(S[n]);
                                        L && (S = L[2].split(","), S.length && (v[6] = parseFloat(S[0]))), x = [x.a, x.b, x.c, x.d, x.tx, x.ty, x.rotation], N = [v, x]
                                    }(x > v || v > x) && (A[l] = N)
                                }
                            }
                        f.push({
                            id: _,
                            elem: t,
                            promise: d,
                            props: A,
                            ts: h(),
                            reverse: !!g.autoreverse,
                            forward: 1,
                            curve: Math.max(0, Math.min(c.length - 1, 0 | g.curve)),
                            duration: 0 | g.duration,
                            repeat: !!g.repeat
                        }), e.fireEvent("start"), u || (u = 1, o())
                    }

                    function r() {
                        for (var t = 0, e = f && f.length; e > t; t++)
                            if (f[t].id === _) return f[t]
                    }
                    var d = new require.Promise,
                        l = t.widgetId,
                        _ = 1e9 * Math.random() | 0,
                        f = E[l] = E[l] || [],
                        g = e.__values__.properties,
                        v = 0 | g.delay,
                        x = !!g.visible,
                        N = g.zIndex;
                    return f.activeCount = ~~f.activeCount + 1, setTimeout(n, v || 0), d.source = t, d.animation = e, d.pause = function() {
                        var t = r();
                        return t = !!t && (t.paused || (t.paused = h())), e.fireEvent("pause"), t
                    }, d.resume = function() {
                        var t = r();
                        return t && (t.paused && (t.ts += h() - t.paused), u || (u = 1, o())), t = !!t && !(t.paused = 0), e.fireEvent("resume"), t
                    }, d.cancel = function(t) {
                        for (var n, o, r, a = 0, s = f && f.length, u = !1; s > a; a++)
                            if (f[a].id === _) {
                                if (n = f[a], t) {
                                    r = n.elem.domNode;
                                    for (o in n.props) s = n.props[o][0], i.set(r, o, T[o] && "opacity" !== o ? s + "px" : s)
                                }
                                f.splice(a, 1), f.length || f.activeCount || delete E[l], u = !0;
                                break
                            }
                        return f.activeCount--, e.fireEvent("cancel"), u
                    }, d.then(function() {
                        void 0 !== g.visible && (t.visible = x), void 0 !== g.zIndex && (t.zIndex = N), f.activeCount--, e.fireEvent("complete")
                    })
                }, S
            })
        },
        "Ti/_/Layouts": function() {
            define(["Ti/_/Layouts/Composite", "Ti/_/Layouts/Horizontal", "Ti/_/Layouts/Vertical", "Ti/_/Layouts/ConstrainingHorizontal", "Ti/_/Layouts/ConstrainingVertical"], function(t, e, i, n, o) {
                return {
                    Composite: t,
                    Horizontal: e,
                    Vertical: i,
                    ConstrainingHorizontal: n,
                    ConstrainingVertical: o
                }
            })
        },
        "Ti/_/Layouts/Composite": function() {
            define(["Ti/_/Layouts/Base", "Ti/_/declare", "Ti/UI", "Ti/_/lang"], function(t, e, i, n) {
                var o = n.isDef,
                    r = "px",
                    a = Math.round;
                return e("Ti._.Layouts.Composite", t, {
                    _doLayout: function(t, e, n, o, s) {
                        var u, c, d, h, l, _, f, g, p, m, T, v, b, y, w, I, E, x, N = {
                                width: 0,
                                height: 0
                            },
                            S = t._children,
                            C = 0,
                            L = [],
                            A = [],
                            R = S.length,
                            W = this._measureNode;
                        for (C = 0; R > C; C++) u = t._children[C], u._alive && u.domNode ? (u._markedForLayout && ((u._preLayout && u._preLayout(e, n, o, s) || u._needsMeasuring) && W(u, u, u._layoutCoefficients, this), c = u._layoutCoefficients, d = c.width, p = c.minWidth, h = c.height, m = c.minHeight, l = c.sandboxWidth, _ = c.sandboxHeight, g = c.left, f = c.top, v = d.x1 * e + d.x2, void 0 !== p.x1 && (v = Math.max(v, p.x1 * e + p.x2)), b = h.x1 * n + h.x2, void 0 !== m.x1 && (b = Math.max(b, m.x1 * n + m.x2)), T = u._getContentSize ? u._getContentSize(v, b) : u._layout._doLayout(u, isNaN(v) ? e : v - u._borderLeftWidth - u._borderRightWidth, isNaN(b) ? n : b - u._borderTopWidth - u._borderBottomWidth, isNaN(v), isNaN(b)), isNaN(v) && (v = T.width + u._borderLeftWidth + u._borderRightWidth, void 0 !== p.x1 && (v = Math.max(v, p.x1 * e + p.x2))), isNaN(b) && (b = T.height + u._borderTopWidth + u._borderBottomWidth, void 0 !== m.x1 && (b = Math.max(b, m.x1 * n + m.x2))), o && 0 !== g.x1 ? L.push(u) : I = g.x1 * e + g.x2 * v + g.x3, s && 0 !== f.x1 ? A.push(u) : E = f.x1 * n + f.x2 * b + f.x3, u._measuredSandboxWidth = w = l.x1 * n + l.x2 + v + (isNaN(I) ? 0 : I), u._measuredSandboxHeight = y = _.x1 * n + _.x2 + b + (isNaN(E) ? 0 : E), u._measuredWidth = v, u._measuredHeight = b, u._measuredLeft = I, u._measuredTop = E), u._measuredSandboxWidth > N.width && (N.width = u._measuredSandboxWidth), u._measuredSandboxHeight > N.height && (N.height = u._measuredSandboxHeight)) : this.handleInvalidState(u, t);
                        for (R = L.length, C = 0; R > C; C++) u = L[C], g = u._layoutCoefficients.left, l = u._layoutCoefficients.sandboxWidth, u._measuredLeft = I = g.x1 * N.width + g.x2 * v + g.x3, u._measuredSandboxWidth = w = l.x1 * n + l.x2 + u._measuredWidth + I, w = u._measuredSandboxWidth, w > N.width && (N.width = w);
                        for (R = A.length, C = 0; R > C; C++) u = A[C], f = u._layoutCoefficients.top, _ = u._layoutCoefficients.sandboxHeight, u._measuredTop = E = f.x1 * N.height + f.x2 * b + f.x3, u._measuredSandboxHeight = y = _.x1 * n + _.x2 + u._measuredHeight + E, y = u._measuredSandboxHeight, y > N.height && (N.height = y);
                        for (R = S.length, C = 0; R > C; C++) u = S[C], u._markedForLayout && (i._elementLayoutCount++, x = u.domNode.style, x.zIndex = u.zIndex, x.left = a(u._measuredLeft) + r, x.top = a(u._measuredTop) + r, x.width = a(u._measuredWidth - u._borderLeftWidth - u._borderRightWidth) + r, x.height = a(u._measuredHeight - u._borderTopWidth - u._borderBottomWidth) + r, u._markedForLayout = !1, u.fireEvent("postlayout"));
                        return this._computedSize = N
                    },
                    _getWidth: function(t, e) {
                        return !o(e) && o(t.left) + o(t.center && t.center.x) + o(t.right) < 2 && (e = t._defaultWidth), e === i.INHERIT ? t._parent._parent ? t._parent._parent._layout._getWidth(t._parent, t._parent.width) === i.SIZE ? i.SIZE : i.FILL : i.FILL : e
                    },
                    _getHeight: function(t, e) {
                        return !o(e) && o(t.top) + o(t.center && t.center.y) + o(t.bottom) < 2 && (e = t._defaultHeight), e === i.INHERIT ? t._parent._parent ? t._parent._parent._layout._getHeight(t._parent, t._parent.height) === i.SIZE ? i.SIZE : i.FILL : i.FILL : e
                    },
                    _isDependentOnParent: function(t) {
                        var e = t._layoutCoefficients;
                        return !isNaN(e.width.x1) && 0 !== e.width.x1 || !isNaN(e.height.x1) && 0 !== e.height.x1 || 0 !== e.left.x1 || 0 !== e.top.x1
                    },
                    _doAnimationLayout: function(t, e) {
                        var i = t._parent._measuredWidth,
                            n = t._parent._measuredHeight,
                            o = e.width.x1 * i + e.width.x2,
                            r = e.height.x1 * n + e.height.x2;
                        return {
                            width: o,
                            height: r,
                            left: e.left.x1 * i + e.left.x2 * o + e.left.x3,
                            top: e.top.x1 * n + e.top.x2 * r + e.top.x3
                        }
                    },
                    _measureNode: function(t, e, n, o) {
                        t._needsMeasuring = !1;
                        for (var r, a, s, u, c, d, h, l, _, f, g, p, m, T = o.getValueType, v = o.computeValue, b = o._getWidth(t, e.width), y = T(b), w = v(b, y), I = e._minWidth, E = T(I), x = v(I, E), N = o._getHeight(t, e.height), S = T(N), C = v(N, S), L = e._minHeight, A = T(L), R = v(L, A), W = e.left, k = T(W), O = v(W, k), D = e.center && e.center.x, U = T(D), M = v(D, U), P = e.right, B = T(P), H = v(P, B), F = e.top, V = T(F), G = v(F, V), z = e.center && e.center.y, q = T(z), Y = v(z, q), j = e.bottom, Z = T(j), X = v(j, Z), K = n.sandboxWidth, $ = n.sandboxHeight, J = [
                                [y, w, k, O, U, M, B, H],
                                [S, C, V, G, q, Y, Z, X]
                            ], Q = 0; 2 > Q; Q++) u = J[Q], c = u[0], d = u[1], h = u[2], l = u[3], _ = u[4], f = u[5], g = u[6], p = u[7], r = a = 0, c === i.SIZE ? r = a = 0 / 0 : c === i.FILL ? (r = 1, "%" === h ? r -= l : "#" === h ? a = -l : "%" === g ? r -= p : "#" === g && (a = -p)) : "%" === c ? r = d : "#" === c ? a = d : "%" === h ? "%" === _ ? r = 2 * (f - l) : "#" === _ ? (r = -2 * l, a = 2 * f) : "%" === g ? r = 1 - l - p : "#" === g && (r = 1 - l, a = -p) : "#" === h ? "%" === _ ? (r = 2 * f, a = -2 * l) : "#" === _ ? a = 2 * (f - l) : "%" === g ? (r = 1 - p, a = -l) : "#" === g && (r = 1, a = -p - l) : "%" === _ ? "%" === g ? r = 2 * (p - f) : "#" === g && (r = -2 * f, a = 2 * p) : "#" === _ && ("%" === g ? (r = 2 * p, a = -2 * f) : "#" === g && (a = 2 * (p - f))), n[m = 0 === Q ? "width" : "height"].x1 = r, n[m].x2 = a;
                        J = {
                            minWidth: [E, x, k, O, U, M, B, H],
                            minHeight: [A, R, V, G, q, Y, Z, X]
                        };
                        for (Q in J) u = J[Q], c = u[0], d = u[1], h = u[2], l = u[3], _ = u[4], f = u[5], g = u[6], p = u[7], r = a = s = 0, c === i.SIZE ? r = a = 0 / 0 : c === i.FILL ? (r = 1, "%" === h ? r -= l : "#" === h ? a = -l : "%" === g ? r -= p : "#" === g && (a = -p)) : "%" === c ? r = d : "#" === c ? a = d : r = a = s = void 0, n[Q].x1 = r, n[Q].x2 = a, n[Q].x3 = s;
                        for (J = [
                                [k, O, U, M, B, H],
                                [V, G, q, Y, Z, X]
                            ], Q = 0; 2 > Q; Q++) {
                            if (u = J[Q], h = u[0], l = u[1], _ = u[2], f = u[3], g = u[4], p = u[5], r = a = s = 0, "%" === h) r = l;
                            else if ("#" === h) s = l;
                            else if ("%" === _) r = f, a = -.5;
                            else if ("#" === _) a = -.5, s = f;
                            else if ("%" === g) r = 1 - p, a = -1;
                            else if ("#" === g) r = 1, a = -1, s = -p;
                            else switch ("left" === Q ? o._defaultHorizontalAlignment : o._defaultVerticalAlignment) {
                                case "center":
                                    r = .5, a = -.5;
                                    break;
                                case "end":
                                    r = 1, a = -1
                            }
                            n[m = 0 === Q ? "left" : "top"].x1 = r, n[m].x2 = a, n[m].x3 = s
                        }
                        K.x1 = "%" === B ? H : 0, K.x2 = "#" === B ? H : 0, $.x1 = "%" === Z ? X : 0, $.x2 = "#" === Z ? X : 0
                    },
                    _defaultHorizontalAlignment: "center",
                    _defaultVerticalAlignment: "center"
                })
            })
        },
        "Ti/_/Layouts/Base": function() {
            define(["Ti/_/css", "Ti/_/declare", "Ti/_/style", "Ti/_/lang", "Ti/API", "Ti/UI", "Ti/_", "Ti/_/dom"], function(t, e, i, n, o, r, a, s) {
                return e("Ti._.Layouts.Base", null, {
                    computedSize: {
                        width: 0,
                        height: 0
                    },
                    constructor: function(e) {
                        t.add(e.element.domNode, t.clean(this.declaredClass))
                    },
                    destroy: function() {
                        t.remove(this.element.domNode, t.clean(this.declaredClass))
                    },
                    handleInvalidState: function(t, e) {
                        o.debug("WARNING: Attempting to layout element that has been destroyed.\n	 Removing the element from the parent.\n	 The parent has a widget ID of " + e.widgetId + ".");
                        var i = e._children;
                        i.splice(i.indexOf(t), 1)
                    },
                    getValueType: function(t) {
                        return void 0 !== t ? t === r.SIZE || t === r.FILL ? t : ~(t + "").indexOf("%") ? "%" : "#" : void 0
                    },
                    calculateAnimation: function(t, e) {
                        var i = n.val,
                            o = t._animationCoefficients || (t._animationCoefficients = {
                                height: {},
                                left: {},
                                minWidth: {},
                                sandboxWidth: {},
                                minHeight: {},
                                sandboxHeight: {},
                                top: {},
                                width: {}
                            }),
                            r = {};
                        return this._measureNode(t, {
                            left: i(e.left, t.left),
                            right: i(e.right, t.right),
                            top: i(e.top, t.top),
                            bottom: i(e.bottom, t.bottom),
                            center: (t.center || e.center) && {
                                x: i(e.center && e.center.x, t.center && t.center.x),
                                y: i(e.center && e.center.y, t.center && t.center.y)
                            },
                            width: i(e.width, t.width),
                            minWidth: t.minWidth,
                            minHeight: t.minHeight,
                            height: i(e.height, t.height)
                        }, o, this), r = this._doAnimationLayout(t, o), {
                            left: r.left,
                            top: r.top,
                            width: r.width - t._borderLeftWidth - t._borderRightWidth,
                            height: r.height - t._borderTopWidth - t._borderBottomWidth
                        }
                    },
                    computeValue: function(t, e) {
                        return "%" === e ? parseFloat(t) / 100 : "#" === e ? s.computeSize(t) : void 0
                    }
                })
            })
        },
        "Ti/_/Layouts/Horizontal": function() {
            define(["Ti/_/Layouts/Base", "Ti/_/declare", "Ti/API", "Ti/UI", "Ti/_/lang"], function(t, e, i, n, o) {
                var r = o.isDef,
                    a = Math.round,
                    s = Math.floor,
                    u = Math.ceil;
                return e("Ti._.Layouts.Horizontal", t, {
                    _doLayout: function(t, e, o, r, c) {
                        var d, h, l, _, f, g, p, m, T, v, b, y, w, I, E, x, N, S, C, L, A = {
                                width: 0,
                                height: 0
                            },
                            R = t._children,
                            W = 0,
                            k = "px",
                            O = 0,
                            D = 0,
                            U = [
                                []
                            ],
                            M = [],
                            P = [],
                            B = 0,
                            H = R.length,
                            F = this._measureNode;
                        for (W = 0; H > W; W++) d = t._children[W], d._alive && d.domNode ? (d._measuredRunningWidth = D, d._markedForLayout && ((d._preLayout && d._preLayout(e, o, r, c) || d._needsMeasuring) && F(d, d, d._layoutCoefficients, this), l = d._layoutCoefficients, _ = l.width, f = l.height, g = l.sandboxWidth, T = l.left, b = _.x1 * e + _.x2 * (e - D) + _.x3, y = 0 === f.x2 ? f.x1 * o + f.x3 : 0 / 0, isNaN(b) || isNaN(f.x1) ? (v = d._getContentSize ? d._getContentSize(b, y) : d._layout._doLayout(d, isNaN(b) ? e : b - d._borderLeftWidth - d._borderRightWidth, isNaN(y) ? o : y - d._borderTopWidth - d._borderBottomWidth, isNaN(b), isNaN(y)), isNaN(b) && (b = v.width + d._borderLeftWidth + d._borderRightWidth), isNaN(f.x1) && (y = v.height + d._borderTopWidth + d._borderBottomWidth), d._childrenLaidOut = !0, 0 === f.x2 || isNaN(f.x2) || (i.warn("Child of width SIZE and height FILL detected in a horizontal layout. Performance degradation may occur."), d._childrenLaidOut = !1)) : d._childrenLaidOut = !1, d._measuredWidth = b, d._measuredHeight = y, I = d._measuredSandboxWidth = g.x1 * e + g.x2 + b, E = T.x1 * e + T.x2 + D, !r && s(I + D) > u(e) && (U.push([]), E -= D, D = 0), d._measuredLeft = E, U[U.length - 1].push(d), D += I), D > A.width && (A.width = D)) : this.handleInvalidState(d, t);
                        for (H = U.length, W = 0; H > W; W++) {
                            for (N = U[W], S = 0, C = N.length, h = 0; C > h; h++) d = N[h], d._markedForLayout && (l = d._layoutCoefficients, m = l.top, f = l.height, p = l.sandboxHeight, y = d._measuredHeight, isNaN(y) && (d._measuredHeight = y = f.x1 * o + f.x2 * (o - O) + f.x3), d._childrenLaidOut || (b = d._measuredWidth, d._childrenLaidOut = !0, d._layout._doLayout(d, isNaN(b) ? e : b - d._borderLeftWidth - d._borderRightWidth, isNaN(y) ? o : y - d._borderTopWidth - d._borderBottomWidth, isNaN(b), isNaN(y))), 0 !== m.x2 ? (P.push(d), x = O) : d._measuredTop = x = m.x1 * o + m.x3 * y + m.x4 + O, d._measuredSandboxHeight = w = p.x1 * o + p.x2 + y + x - O, w > S && (S = w));
                            M.push(S), O += S
                        }
                        for (O = 0, H = U.length, W = 0; H > W; W++) {
                            for (N = U[W], S = M[W], C = N.length, h = 0; C > h; h++) d = N[h], d._measuredRunningHeight = O, d._measuredRowHeight = S, ~P.indexOf(d) && d._markedForLayout && (y = d._measuredHeight, m = d._layoutCoefficients.top, d._measuredTop = m.x1 * o + m.x2 * S + m.x3 * y + m.x4 + O);
                            O += S
                        }
                        if (A.height = O, !c) switch (this._defaultVerticalAlignment) {
                            case "end":
                                B = o - O;
                            case "center":
                                B /= 2
                        }
                        for (H = R.length, W = 0; H > W; W++) d = R[W], d._markedForLayout && (n._elementLayoutCount++, d = R[W], L = d.domNode.style, L.zIndex = d.zIndex, L.left = a(d._measuredLeft) + k, L.top = a(d._measuredTop) + k, L.width = a(d._measuredWidth - d._borderLeftWidth - d._borderRightWidth) + k, L.height = a(d._measuredHeight - d._borderTopWidth - d._borderBottomWidth) + k, d._markedForLayout = !1, d.fireEvent("postlayout"));
                        return this._computedSize = A
                    },
                    _getWidth: function(t, e) {
                        return !r(e) && (e = t._defaultWidth), e === n.INHERIT ? t._parent._parent ? t._parent._parent._layout._getWidth(t._parent, t._parent.width) === n.SIZE ? n.SIZE : n.FILL : n.FILL : e
                    },
                    _getHeight: function(t, e) {
                        return !r(e) && (e = t._defaultHeight), e === n.INHERIT ? t._parent._parent ? t._parent._parent._layout._getHeight(t._parent, t._height) === n.SIZE ? n.SIZE : n.FILL : n.FILL : e
                    },
                    _isDependentOnParent: function(t) {
                        var e = t._layoutCoefficients;
                        return !isNaN(e.width.x1) && 0 !== e.width.x1 || !isNaN(e.width.x2) && 0 !== e.width.x2 || !isNaN(e.height.x1) && 0 !== e.height.x1 || !isNaN(e.height.x2) && 0 !== e.height.x2 || 0 !== e.sandboxWidth.x1 || 0 !== e.sandboxHeight.x1 || 0 !== e.left.x1 || 0 !== e.top.x1
                    },
                    _doAnimationLayout: function(t, e) {
                        var i = t._parent._measuredWidth,
                            n = t._parent._measuredHeight,
                            o = t._measuredHeight,
                            r = t._measuredRunningWidth,
                            a = t._measuredRunningHeight,
                            s = t._measuredRowHeight;
                        return {
                            width: e.width.x1 * i + e.width.x2 * (i - r) + e.width.x3,
                            height: e.height.x1 * n + e.height.x2 * (n - a) + e.height.x3,
                            left: e.left.x1 * i + e.left.x2 + r,
                            top: e.top.x1 * n + e.top.x2 * s + e.top.x3 * o + e.top.x4 + a
                        }
                    },
                    _measureNode: function(t, e, i, o) {
                        t._needsMeasuring = !1;
                        var r, a, s, u, c = o.getValueType,
                            d = o.computeValue,
                            h = o._getWidth(t, e.width),
                            l = c(h),
                            _ = d(h, l),
                            f = o._getHeight(t, e.height),
                            g = c(f),
                            p = d(f, g),
                            m = e.left,
                            T = c(m),
                            v = d(m, T),
                            b = e.right,
                            y = c(b),
                            w = d(b, y),
                            I = e.top,
                            E = c(I),
                            x = d(I, E),
                            N = e.bottom,
                            S = c(N),
                            C = d(N, S),
                            L = i.width,
                            A = i.height,
                            R = i.sandboxWidth,
                            W = i.sandboxHeight,
                            k = i.left,
                            O = i.top;
                        if (r = a = s = 0, l === n.SIZE ? r = a = s = 0 / 0 : l === n.FILL ? (a = 1, "%" === T && (r = -v), "#" === T && (s = -v), "%" === y && (r = -w), "#" === y && (s = -w)) : "%" === l ? r = _ : "#" === l && (s = _), L.x1 = r, L.x2 = a, L.x3 = s, r = a = 0, "%" === T && (r = v), "#" === T && (a = v), "%" === y && (r += w), "#" === y && (a += w), R.x1 = r, R.x2 = a, r = a = s = 0, g === n.SIZE ? r = a = s = 0 / 0 : g === n.FILL ? (a = 1, "%" === E && (r = -x), "#" === E && (s = -x)) : "%" === g ? r = p : "#" === g && (s = p), A.x1 = r, A.x2 = a, A.x3 = s, W.x1 = "%" === S ? C : 0, W.x2 = "#" === S ? C : 0, k.x1 = "%" === T ? v : 0, k.x2 = "#" === T ? v : 0, r = a = s = u = 0, "%" === E) r = x;
                        else if ("#" === E) u = x;
                        else if ("%" === S) r = 1 - C, s = -1;
                        else if ("#" === S) r = 1, s = -1, u = -C;
                        else switch (o._defaultRowAlignment) {
                            case "center":
                                a = .5, s = -.5;
                                break;
                            case "end":
                                a = 1, s = -1
                        }
                        O.x1 = r, O.x2 = a, O.x3 = s, O.x4 = u
                    },
                    _defaultHorizontalAlignment: "start",
                    _defaultVerticalAlignment: "start",
                    _defaultRowAlignment: "center"
                })
            })
        },
        "Ti/_/Layouts/Vertical": function() {
            define(["Ti/_/Layouts/Base", "Ti/_/declare", "Ti/UI", "Ti/_/lang"], function(t, e, i, n) {
                var o = n.isDef,
                    r = Math.round;
                return e("Ti._.Layouts.Vertical", t, {
                    _doLayout: function(t, e, n, o, a) {
                        var s, u, c, d, h, l, _, f, g, p, m, T, v, b, y, w = {
                                width: 0,
                                height: 0
                            },
                            I = t._children,
                            E = 0,
                            x = "px",
                            N = [],
                            S = 0,
                            C = I.length,
                            L = this._measureNode;
                        for (E = 0; C > E; E++) s = t._children[E], s._alive && s.domNode ? (s._measuredRunningHeight = S, s._markedForLayout && ((s._preLayout && s._preLayout(e, n, o, a) || s._needsMeasuring) && L(s, s, s._layoutCoefficients, this), u = s._layoutCoefficients, c = u.width, d = u.height, h = u.sandboxWidth, l = u.sandboxHeight, f = u.left, _ = u.top, p = c.x1 * e + c.x2, m = d.x1 * n + d.x2 * (n - S) + d.x3, g = s._getContentSize ? s._getContentSize(p, m) : s._layout._doLayout(s, isNaN(p) ? e : p - s._borderLeftWidth - s._borderRightWidth, isNaN(m) ? n : m - s._borderTopWidth - s._borderBottomWidth, isNaN(p), isNaN(m)), isNaN(p) && (p = g.width + s._borderLeftWidth + s._borderRightWidth), isNaN(m) && (m = g.height + s._borderTopWidth + s._borderBottomWidth), s._measuredWidth = p, s._measuredHeight = m, o && 0 !== f.x1 ? N.push(s) : (b = s._measuredLeft = f.x1 * e + f.x2 * p + f.x3, v = s._measuredSandboxWidth = h.x1 * e + h.x2 + p + (isNaN(b) ? 0 : b)), s._measuredTop = _.x1 * n + _.x2 + S, T = s._measuredSandboxHeight = l.x1 * n + l.x2 + m), s._measuredSandboxWidth > w.width && (w.width = s._measuredSandboxWidth), S = w.height += s._measuredSandboxHeight) : this.handleInvalidState(s, t);
                        for (C = N.length, E = 0; C > E; E++) s = N[E], h = s._layoutCoefficients.sandboxWidth, v = s._measuredSandboxWidth = h.x1 * e + h.x2 + s._measuredWidth, v > w.width && (w.width = v);
                        for (E = 0; C > E; E++) s = N[E], f = s._layoutCoefficients.left, h = s._layoutCoefficients.sandboxWidth, p = s._measuredWidth, v = s._measuredSandboxWidth, v > w.width && (w.width = v), b = s._measuredLeft = f.x1 * w.width + f.x2 * p + f.x3, s._measuredSandboxWidth += isNaN(b) ? 0 : b;
                        for (C = I.length, E = 0; C > E; E++) s = I[E], s._markedForLayout && (i._elementLayoutCount++, s = I[E], y = s.domNode.style, y.zIndex = s.zIndex, y.left = r(s._measuredLeft) + x, y.top = r(s._measuredTop) + x, y.width = r(s._measuredWidth - s._borderLeftWidth - s._borderRightWidth) + x, y.height = r(s._measuredHeight - s._borderTopWidth - s._borderBottomWidth) + x, s._markedForLayout = !1, s.fireEvent("postlayout"));
                        return this._computedSize = w
                    },
                    _getWidth: function(t, e) {
                        return !o(e) && o(t.left) + o(t.center && t.center.x) + o(t.right) < 2 && (e = t._defaultWidth), e === i.INHERIT ? t._parent._parent ? t._parent._parent._layout._getWidth(t._parent, t._parent.width) === i.SIZE ? i.SIZE : i.FILL : i.FILL : e
                    },
                    _getHeight: function(t, e) {
                        return !o(e) && (e = t._defaultHeight), e === i.INHERIT ? t._parent._parent ? t._parent._parent._layout._getHeight(t._parent, t._parent.height) === i.SIZE ? i.SIZE : i.FILL : i.FILL : e
                    },
                    _isDependentOnParent: function(t) {
                        var e = t._layoutCoefficients;
                        return !isNaN(e.width.x1) && 0 !== e.width.x1 || !isNaN(e.height.x1) && 0 !== e.height.x1 || !isNaN(e.height.x2) && 0 !== e.height.x2 || 0 !== e.sandboxWidth.x1 || 0 !== e.sandboxHeight.x1 || 0 !== e.left.x1 || 0 !== e.top.x1
                    },
                    _doAnimationLayout: function(t, e) {
                        var i = t._parent._measuredWidth,
                            n = t._parent._measuredHeight,
                            o = t._measuredRunningHeight,
                            r = e.width.x1 * i + e.width.x2;
                        return {
                            width: r,
                            height: e.height.x1 * n + e.height.x2 * (n - o) + e.height.x3,
                            left: e.left.x1 * i + e.left.x2 * r + e.left.x3,
                            top: e.top.x1 * n + e.top.x2 + o
                        }
                    },
                    _measureNode: function(t, e, n, o) {
                        t._needsMeasuring = !1;
                        var r, a, s, u = o.getValueType,
                            c = o.computeValue,
                            d = o._getWidth(t, e.width),
                            h = u(d),
                            l = c(d, h),
                            _ = o._getHeight(t, e.height),
                            f = u(_),
                            g = c(_, f),
                            p = e.left,
                            m = u(p),
                            T = c(p, m),
                            v = e.center && e.center.x,
                            b = u(v),
                            y = c(v, b),
                            w = e.right,
                            I = u(w),
                            E = c(w, I),
                            x = e.top,
                            N = u(x),
                            S = c(x, N),
                            C = e.bottom,
                            L = u(C),
                            A = c(C, L),
                            R = n.width,
                            W = n.height,
                            k = n.sandboxWidth,
                            O = n.sandboxHeight,
                            D = n.left,
                            U = n.top;
                        if (r = a = 0, h === i.SIZE ? r = a = 0 / 0 : h === i.FILL ? (r = 1, "%" === m ? r -= T : "#" === m ? a = -T : "%" === I ? r -= E : "#" === I && (a = -E)) : "%" === h ? r = l : "#" === h ? a = l : "%" === m ? "%" === b ? r = 2 * (y - T) : "#" === b ? (r = -2 * T, a = 2 * y) : "%" === I ? r = 1 - T - E : "#" === I && (r = 1 - T, a = -E) : "#" === m ? "%" === b ? (r = 2 * y, a = -2 * T) : "#" === b ? a = 2 * (y - T) : "%" === I ? (r = 1 - E, a = -T) : "#" === I && (r = 1, a = -E - T) : "%" === b ? "%" === I ? r = 2 * (E - y) : "#" === I && (r = -2 * y, a = 2 * E) : "#" === b && ("%" === I ? (r = 2 * E, a = -2 * y) : "#" === I && (a = 2 * (E - y))), R.x1 = r, R.x2 = a, k.x1 = "%" === I ? E : 0, k.x2 = "#" === I ? E : 0, r = a = s = 0, f === i.SIZE ? r = a = s = 0 / 0 : f === i.FILL ? (a = 1, "%" === N && (r = -S), "#" === N && (s = -S), "%" === L && (r = -A), "#" === L && (s = -A)) : "%" === f ? r = g : "#" === f && (s = g), W.x1 = r, W.x2 = a, W.x3 = s, r = a = 0, "%" === N && (r = S), "#" === N && (a = S), "%" === L && (r += A), "#" === L && (a += A), O.x1 = r, O.x2 = a, r = a = s = 0, "%" === m) r = T;
                        else if ("#" === m) s = T;
                        else if ("%" === b) r = y, a = -.5;
                        else if ("#" === b) a = -.5, s = y;
                        else if ("%" === I) r = 1 - E, a = -1;
                        else if ("#" === I) r = 1, a = -1, s = -E;
                        else switch (o._defaultHorizontalAlignment) {
                            case "center":
                                r = .5, a = -.5;
                                break;
                            case "end":
                                r = 1, a = -1
                        }
                        D.x1 = r, D.x2 = a, D.x3 = s, U.x1 = "%" === N ? S : 0, U.x2 = "#" === N ? S : 0
                    },
                    _defaultHorizontalAlignment: "center",
                    _defaultVerticalAlignment: "start"
                })
            })
        },
        "Ti/_/Layouts/ConstrainingHorizontal": function() {
            define(["Ti/_/Layouts/Base", "Ti/_/declare", "Ti/UI", "Ti/_/lang"], function(t, e, i, n) {
                var o = n.isDef,
                    r = Math.round;
                return e("Ti._.Layouts.ConstrainingHorizontal", t, {
                    _doLayout: function(t, e, n, o, a) {
                        var s, u, c, d, h, l, _, f, g, p, m, T, v, b, y, w, I, E = {
                                width: 0,
                                height: 0
                            },
                            x = t._children,
                            N = 0,
                            S = "px",
                            C = [],
                            L = 0,
                            A = 0,
                            R = x.length,
                            W = this._measureNode;
                        for (N = 0; R > N; N++) s = t._children[N], s._alive && s.domNode ? s._markedForLayout && ((s._preLayout && s._preLayout(e, n, o, a) || s._needsMeasuring) && W(s, s, s._layoutCoefficients, this), u = s._layoutCoefficients, c = u.width, 0 === c.x2 || isNaN(c.x2) ? (d = u.height, h = u.sandboxWidth, l = u.sandboxHeight, m = d.x1 * n + d.x2, p = c.x1 * e + c.x2 * (e - L) + c.x3, g = s._getContentSize ? s._getContentSize(p, m) : s._layout._doLayout(s, isNaN(p) ? e : p - s._borderLeftWidth - s._borderRightWidth, isNaN(m) ? n : m - s._borderTopWidth - s._borderBottomWidth, isNaN(p), isNaN(m)), isNaN(p) && (p = g.width + s._borderLeftWidth + s._borderRightWidth), isNaN(m) && (m = g.height + s._borderTopWidth + s._borderBottomWidth), v = s._measuredSandboxWidth = h.x1 * e + h.x2 + p, L += v, s._measuredWidth = p, s._measuredHeight = m) : A++) : this.handleInvalidState(s, t);
                        for (w = e - L, L = Math.floor(w / A), N = 0; R > N; N++) s = t._children[N], s._markedForLayout && (u = s._layoutCoefficients, c = u.width, 0 === c.x2 || isNaN(c.x2) || (d = u.height, h = u.sandboxWidth, l = u.sandboxHeight, m = d.x1 * n + d.x2, p = c.x1 * e + c.x2 * (R - 1 > N ? L : w - L * (A - 1)) + c.x3, g = s._getContentSize ? s._getContentSize(p, m) : s._layout._doLayout(s, isNaN(p) ? e : p - s._borderLeftWidth - s._borderRightWidth, isNaN(m) ? n : m - s._borderTopWidth - s._borderBottomWidth, isNaN(p), isNaN(m)), isNaN(p) && (p = g.width + s._borderLeftWidth + s._borderRightWidth), isNaN(m) && (m = g.height + s._borderTopWidth + s._borderBottomWidth), s._measuredWidth = p, s._measuredHeight = m, v = s._measuredSandboxWidth = h.x1 * e + h.x2 + p));
                        for (L = 0, N = 0; R > N; N++) s = t._children[N], s._measuredRunningWidth = L, s._markedForLayout ? (u = s._layoutCoefficients, l = u.sandboxHeight, _ = u.top, f = u.left, a && 0 !== _.x1 ? C.push(s) : (m = s._measuredHeight, y = s._measuredTop = _.x1 * n + _.x2 * m + _.x3, T = s._measuredSandboxHeight = l.x1 * n + l.x2 + m + (isNaN(y) ? 0 : y), s._measuredSandboxHeight > E.height && (E.height = s._measuredSandboxHeight)), b = s._measuredLeft = f.x1 * e + f.x2 + L) : s._measuredSandboxHeight > E.height && (E.height = s._measuredSandboxHeight), L += s._measuredSandboxWidth;
                        for (E.width = L, R = C.length, N = 0; R > N; N++) s = C[N], l = s._layoutCoefficients.sandboxHeight, T = s._measuredSandboxHeight = l.x1 * n + l.x2 + s._measuredHeight, T > E.height && (E.height = T);
                        for (N = 0; R > N; N++) s = C[N], _ = s._layoutCoefficients.top, l = s._layoutCoefficients.sandboxHeight, m = s._measuredHeight, T = s._measuredSandboxHeight, T > E.height && (E.height = T), y = s._measuredTop = _.x1 * E.height + _.x2 * m + _.x3, s._measuredSandboxHeight += isNaN(y) ? 0 : y;
                        for (R = x.length, N = 0; R > N; N++) s = x[N], s._markedForLayout && (i._elementLayoutCount++, s = x[N], I = s.domNode.style, I.zIndex = s.zIndex, I.left = r(s._measuredLeft) + S, I.top = r(s._measuredTop) + S, I.width = r(s._measuredWidth - s._borderLeftWidth - s._borderRightWidth) + S, I.height = r(s._measuredHeight - s._borderTopWidth - s._borderBottomWidth) + S, s._markedForLayout = !1, s.fireEvent("postlayout"));
                        return this._computedSize = E
                    },
                    _getWidth: function(t, e) {
                        return !o(e) && (e = t._defaultWidth), e === i.INHERIT ? t._parent._parent ? t._parent._parent._layout._getWidth(t._parent, t._parent.width) === i.SIZE ? i.SIZE : i.FILL : i.FILL : e
                    },
                    _getHeight: function(t, e) {
                        return !o(e) && o(t.top) + o(t.center && t.center.y) + o(t.bottom) < 2 && (e = t._defaultHeight), e === i.INHERIT ? t._parent._parent ? t._parent._parent._layout._getHeight(t._parent, t._parent.height) === i.SIZE ? i.SIZE : i.FILL : i.FILL : e
                    },
                    _isDependentOnParent: function(t) {
                        var e = t._layoutCoefficients;
                        return !isNaN(e.width.x1) && 0 !== e.width.x1 || !isNaN(e.width.x2) && 0 !== e.width.x2 || !isNaN(e.height.x1) && 0 !== e.height.x1 || 0 !== e.sandboxWidth.x1 || 0 !== e.sandboxHeight.x1 || 0 !== e.left.x1 || 0 !== e.top.x1
                    },
                    _doAnimationLayout: function(t, e) {
                        var i = t._parent._measuredWidth,
                            n = t._parent._measuredHeight,
                            o = t._measuredRunningWidth,
                            r = e.height.x1 * n + e.height.x2;
                        return {
                            width: e.width.x1 * i + e.width.x2 * (i - o) + e.width.x3,
                            height: r,
                            left: e.left.x1 * i + e.left.x2 + o,
                            top: e.top.x1 * n + e.top.x2 * r + e.top.x3
                        }
                    },
                    _measureNode: function(t, e, n, o) {
                        t._needsMeasuring = !1;
                        var r, a, s, u = o.getValueType,
                            c = o.computeValue,
                            d = o._getWidth(t, e.width),
                            h = u(d),
                            l = c(d, h),
                            _ = o._getHeight(t, e.height),
                            f = u(_),
                            g = c(_, f),
                            p = e.left,
                            m = u(p),
                            T = c(p, m),
                            v = e.right,
                            b = u(v),
                            y = c(v, b),
                            w = e.top,
                            I = u(w),
                            E = c(w, I),
                            x = e.center && e.center.y,
                            N = u(x),
                            S = c(x, N),
                            C = e.bottom,
                            L = u(C),
                            A = c(C, L),
                            R = n.width,
                            W = n.height,
                            k = n.sandboxWidth,
                            O = n.sandboxHeight,
                            D = n.left,
                            U = n.top;
                        if (r = a = 0, f === i.SIZE ? r = a = 0 / 0 : f === i.FILL ? (r = 1, "%" === I ? r -= E : "#" === I ? a = -E : "%" === L ? r -= A : "#" === L && (a = -A)) : "%" === f ? r = g : "#" === f ? a = g : "%" === I ? "%" === N ? r = 2 * (S - E) : "#" === N ? (r = -2 * E, a = 2 * S) : "%" === L ? r = 1 - E - A : "#" === L && (r = 1 - E, a = -A) : "#" === I ? "%" === N ? (r = 2 * S, a = -2 * E) : "#" === N ? a = 2 * (S - E) : "%" === L ? (r = 1 - A, a = -E) : "#" === L && (r = 1, a = -A - E) : "%" === N ? "%" === L ? r = 2 * (A - S) : "#" === L && (r = -2 * S, a = 2 * A) : "#" === N && ("%" === L ? (r = 2 * A, a = -2 * S) : "#" === L && (a = 2 * (A - S))), W.x1 = r, W.x2 = a, O.x1 = "%" === L ? A : 0, O.x2 = "#" === L ? A : 0, r = a = s = 0, h === i.SIZE ? r = a = s = 0 / 0 : h === i.FILL ? (a = 1, "%" === m && (r = -T), "#" === m && (s = -T), "%" === b && (r = -y), "#" === b && (s = -y)) : "%" === h ? r = l : "#" === h && (s = l), R.x1 = r, R.x2 = a, R.x3 = s, r = a = 0, "%" === m && (r = T), "#" === m && (a = T), "%" === b && (r += y), "#" === b && (a += y), k.x1 = r, k.x2 = a, r = a = s = 0, "%" === I) r = E;
                        else if ("#" === I) s = E;
                        else if ("%" === N) r = S, a = -.5;
                        else if ("#" === N) a = -.5, s = S;
                        else if ("%" === L) r = 1 - A, a = -1;
                        else if ("#" === L) r = 1, a = -1, s = -A;
                        else switch (o._defaultVerticalAlignment) {
                            case "center":
                                r = .5, a = -.5;
                                break;
                            case "end":
                                r = 1, a = -1
                        }
                        U.x1 = r, U.x2 = a, U.x3 = s, D.x1 = "%" === m ? T : 0, D.x2 = "#" === m ? T : 0
                    },
                    _defaultHorizontalAlignment: "start",
                    _defaultVerticalAlignment: "center"
                })
            })
        },
        "Ti/_/Layouts/ConstrainingVertical": function() {
            define(["Ti/_/Layouts/Base", "Ti/_/declare", "Ti/UI", "Ti/_/lang"], function(t, e, i, n) {
                var o = n.isDef,
                    r = Math.round;
                return e("Ti._.Layouts.ConstrainingVertical", t, {
                    _doLayout: function(t, e, n, o, a) {
                        var s, u, c, d, h, l, _, f, g, p, m, T, v, b, y, w, I, E = {
                                width: 0,
                                height: 0
                            },
                            x = t._children,
                            N = 0,
                            S = "px",
                            C = [],
                            L = 0,
                            A = 0,
                            R = x.length,
                            W = this._measureNode;
                        for (N = 0; R > N; N++) s = t._children[N], s._alive && s.domNode ? s._markedForLayout && ((s._preLayout && s._preLayout(e, n, o, a) || s._needsMeasuring) && W(s, s, s._layoutCoefficients, this), u = s._layoutCoefficients, d = u.height, 0 === d.x2 || isNaN(d.x2) ? (c = u.width, h = u.sandboxWidth, l = u.sandboxHeight, p = c.x1 * e + c.x2, m = d.x1 * n + d.x2 * (n - L) + d.x3, g = s._getContentSize ? s._getContentSize(p, m) : s._layout._doLayout(s, isNaN(p) ? e : p - s._borderLeftWidth - s._borderRightWidth, isNaN(m) ? n : m - s._borderTopWidth - s._borderBottomWidth, isNaN(p), isNaN(m)), isNaN(p) && (p = g.width + s._borderLeftWidth + s._borderRightWidth), isNaN(m) && (m = g.height + s._borderTopWidth + s._borderBottomWidth), T = s._measuredSandboxHeight = l.x1 * n + l.x2 + m, L += T, s._measuredWidth = p, s._measuredHeight = m) : A++) : this.handleInvalidState(s, t);
                        for (w = n - L, L = Math.floor(w / A), N = 0; R > N; N++) s = t._children[N], s._markedForLayout && (u = s._layoutCoefficients, d = u.height, 0 === d.x2 || isNaN(d.x2) || (c = u.width, h = u.sandboxWidth, l = u.sandboxHeight, p = c.x1 * e + c.x2, m = d.x1 * n + d.x2 * (R - 1 > N ? L : w - L * (A - 1)) + d.x3, g = s._getContentSize ? s._getContentSize(p, m) : s._layout._doLayout(s, isNaN(p) ? e : p - s._borderLeftWidth - s._borderRightWidth, isNaN(m) ? n : m - s._borderTopWidth - s._borderBottomWidth, isNaN(p), isNaN(m)), isNaN(p) && (p = g.width + s._borderLeftWidth + s._borderRightWidth), isNaN(m) && (m = g.height + s._borderTopWidth + s._borderBottomWidth), s._measuredWidth = p, s._measuredHeight = m, T = s._measuredSandboxHeight = l.x1 * n + l.x2 + m));
                        for (L = 0, N = 0; R > N; N++) s = t._children[N], s._measuredRunningHeight = L, s._markedForLayout ? (u = s._layoutCoefficients, h = u.sandboxWidth, _ = u.top, f = u.left, o && 0 !== f.x1 ? C.push(s) : (p = s._measuredWidth, b = s._measuredLeft = f.x1 * e + f.x2 * p + f.x3, v = s._measuredSandboxWidth = h.x1 * e + h.x2 + p + (isNaN(b) ? 0 : b), s._measuredSandboxWidth > E.width && (E.width = s._measuredSandboxWidth)), y = s._measuredTop = _.x1 * n + _.x2 + L) : s._measuredSandboxWidth > E.width && (E.width = s._measuredSandboxWidth), L += s._measuredSandboxHeight;
                        for (E.height = L, R = C.length, N = 0; R > N; N++) s = C[N], h = s._layoutCoefficients.sandboxWidth, v = s._measuredSandboxWidth = h.x1 * e + h.x2 + s._measuredWidth, v > E.width && (E.width = v);
                        for (N = 0; R > N; N++) s = C[N], f = s._layoutCoefficients.left, h = s._layoutCoefficients.sandboxWidth, p = s._measuredWidth, v = s._measuredSandboxWidth, v > E.width && (E.width = v), b = s._measuredLeft = f.x1 * E.width + f.x2 * p + f.x3, s._measuredSandboxWidth += isNaN(b) ? 0 : b;
                        for (R = x.length, N = 0; R > N; N++) s = x[N], s._markedForLayout && (i._elementLayoutCount++, s = x[N], I = s.domNode.style, I.zIndex = s.zIndex, I.left = r(s._measuredLeft) + S, I.top = r(s._measuredTop) + S, I.width = r(s._measuredWidth - s._borderLeftWidth - s._borderRightWidth) + S, I.height = r(s._measuredHeight - s._borderTopWidth - s._borderBottomWidth) + S, s._markedForLayout = !1, s.fireEvent("postlayout"));
                        return this._computedSize = E
                    },
                    _getWidth: function(t, e) {
                        return !o(e) && o(t.left) + o(t.center && t.center.x) + o(t.right) < 2 && (e = t._defaultWidth), e === i.INHERIT ? t._parent._parent ? t._parent._parent._layout._getWidth(t._parent, t._parent.width) === i.SIZE ? i.SIZE : i.FILL : i.FILL : e
                    },
                    _getHeight: function(t, e) {
                        return !o(e) && (e = t._defaultHeight), e === i.INHERIT ? t._parent._parent ? t._parent._parent._layout._getHeight(t._parent, t._parent.height) === i.SIZE ? i.SIZE : i.FILL : i.FILL : e
                    },
                    _isDependentOnParent: function(t) {
                        var e = t._layoutCoefficients;
                        return !isNaN(e.width.x1) && 0 !== e.width.x1 || !isNaN(e.height.x1) && 0 !== e.height.x1 || !isNaN(e.height.x2) && 0 !== e.height.x2 || 0 !== e.sandboxWidth.x1 || 0 !== e.sandboxHeight.x1 || 0 !== e.left.x1 || 0 !== e.top.x1
                    },
                    _doAnimationLayout: function(t, e) {
                        var i = t._parent._measuredWidth,
                            n = t._parent._measuredHeight,
                            o = t._measuredRunningHeight,
                            r = e.width.x1 * i + e.width.x2;
                        return {
                            width: r,
                            height: e.height.x1 * n + e.height.x2 * (n - o) + e.height.x3,
                            left: e.left.x1 * i + e.left.x2 * r + e.left.x3,
                            top: e.top.x1 * n + e.top.x2 + o
                        }
                    },
                    _measureNode: function(t, e, n, o) {
                        t._needsMeasuring = !1;
                        var r, a, s, u = o.getValueType,
                            c = o.computeValue,
                            d = o._getWidth(t, e.width),
                            h = u(d),
                            l = c(d, h),
                            _ = o._getHeight(t, e.height),
                            f = u(_),
                            g = c(_, f),
                            p = e.left,
                            m = u(p),
                            T = c(p, m),
                            v = e.center && e.center.x,
                            b = u(v),
                            y = c(v, b),
                            w = e.right,
                            I = u(w),
                            E = c(w, I),
                            x = e.top,
                            N = u(x),
                            S = c(x, N),
                            C = e.bottom,
                            L = u(C),
                            A = c(C, L),
                            R = n.width,
                            W = n.height,
                            k = n.sandboxWidth,
                            O = n.sandboxHeight,
                            D = n.left,
                            U = n.top;
                        if (r = a = 0, h === i.SIZE ? r = a = 0 / 0 : h === i.FILL ? (r = 1, "%" === m ? r -= T : "#" === m ? a = -T : "%" === I ? r -= E : "#" === I && (a = -E)) : "%" === h ? r = l : "#" === h ? a = l : "%" === m ? "%" === b ? r = 2 * (y - T) : "#" === b ? (r = -2 * T, a = 2 * y) : "%" === I ? r = 1 - T - E : "#" === I && (r = 1 - T, a = -E) : "#" === m ? "%" === b ? (r = 2 * y, a = -2 * T) : "#" === b ? a = 2 * (y - T) : "%" === I ? (r = 1 - E, a = -T) : "#" === I && (r = 1, a = -E - T) : "%" === b ? "%" === I ? r = 2 * (E - y) : "#" === I && (r = -2 * y, a = 2 * E) : "#" === b && ("%" === I ? (r = 2 * E, a = -2 * y) : "#" === I && (a = 2 * (E - y))), R.x1 = r, R.x2 = a, k.x1 = "%" === I ? E : 0, k.x2 = "#" === I ? E : 0, r = a = s = 0, f === i.SIZE ? r = a = s = 0 / 0 : f === i.FILL ? (a = 1, "%" === N && (r = -S), "#" === N && (s = -S), "%" === L && (r = -A), "#" === L && (s = -A)) : "%" === f ? r = g : "#" === f && (s = g), W.x1 = r, W.x2 = a, W.x3 = s, r = a = 0, "%" === N && (r = S), "#" === N && (a = S), "%" === L && (r += A), "#" === L && (a += A), O.x1 = r, O.x2 = a, r = a = s = 0, "%" === m) r = T;
                        else if ("#" === m) s = T;
                        else if ("%" === b) r = y, a = -.5;
                        else if ("#" === b) a = -.5, s = y;
                        else if ("%" === I) r = 1 - E, a = -1;
                        else if ("#" === I) r = 1, a = -1, s = -E;
                        else switch (o._defaultHorizontalAlignment) {
                            case "center":
                                r = .5, a = -.5;
                                break;
                            case "end":
                                r = 1, a = -1
                        }
                        D.x1 = r, D.x2 = a, D.x3 = s, U.x1 = "%" === N ? S : 0, U.x2 = "#" === N ? S : 0
                    },
                    _defaultHorizontalAlignment: "center",
                    _defaultVerticalAlignment: "start"
                })
            })
        },
        "Ti/Filesystem/FileStream": function() {
            define(["Ti/_/declare", "Ti/IOStream"], function(t, e) {
                return t("Ti.Filesystem.Filestream", e)
            })
        },
        "Ti/Map/Annotation": function() {
            define(["Ti/_/declare", "Ti/_/Evented", "Ti/Locale"], function(t, e, i) {
                var n = {
                    post: function(t, e, i) {
                        this.fireEvent("update", {
                            property: i,
                            value: t,
                            oldValue: e
                        })
                    }
                };
                return t("Ti.Map.Annotation", e, {
                    _onclick: function(t, e, i) {
                        this.fireEvent("click", {
                            annotation: this,
                            clicksource: i,
                            index: e,
                            map: t,
                            title: this.title
                        })
                    },
                    _update: function() {},
                    _getTitle: function() {
                        return i._getString(this.titleid, this.title)
                    },
                    _getSubtitle: function() {
                        return i._getString(this.subtitleid, this.subtitle)
                    },
                    properties: {
                        animate: !1,
                        image: n,
                        latitude: n,
                        longitude: n,
                        leftButton: n,
                        pincolor: n,
                        rightButton: n,
                        subtitle: n,
                        subtitleid: n,
                        title: n,
                        titleid: n
                    }
                })
            })
        },
        "Ti/Map/View": function() {
            define(["Ti/_/declare", "Ti/_/Map/Google", "Ti/App/Properties"], function(t, e, i) {
                var n = i.getString("ti.map.backend");
                return t("Ti.Map.View", n ? require(n) : e)
            })
        },
        "Ti/_/Map/Google": function() {
            define(["Ti/_/declare", "Ti/_/dom", "Ti/_/event", "Ti/_/lang", "Ti/App/Properties", "Ti/Geolocation", "Ti/Map", "Ti/UI/View", "Ti/Utils"], function(t, e, i, n, o, r, a, s, u) {
                function c(t) {
                    var e = d.MapTypeId;
                    switch (t) {
                        case a.HYBRID_TYPE:
                            return e.HYBRID;
                        case a.SATELLITE_TYPE:
                            return e.SATELLITE;
                        case a.TERRAIN_TYPE:
                            return e.TERRAIN
                    }
                    return e.ROADMAP
                }
                var d, h, l, _, f = n.isDef,
                    g = require.mix,
                    p = require.on,
                    m = s.prototype.fireEvent,
                    T = {
                        latitude: 39.828175,
                        longitude: -98.5795,
                        latitudeDelta: 30.137412,
                        longitudeDelta: 63.235658
                    },
                    v = {
                        0: "red",
                        1: "green",
                        2: "purple"
                    },
                    b = Ti.deferStart(),
                    y = t("Ti.Map.View", s, {
                        constructor: function() {
                            this.__values__.properties.annotations = [], this._annotationMap = {}, this._routes = [], this.fireEvent("loading")
                        },
                        postscript: function() {
                            var t = this,
                                e = t.region || T,
                                i = t._gmap = new d.Map(t.domNode, {
                                    disableDefaultUI: !0,
                                    zoom: 2,
                                    zoomControl: !0,
                                    center: new d.LatLng(e.latitude, e.longitude),
                                    mapTypeId: c(t.mapType)
                                });
                            p(t, "postlayout", function() {
                                h.trigger(i, "resize"), t._updateMap(e, 1), setTimeout(function() {
                                    t._updateMap(e, 1), t._updateUserLocation(t.userLocation), t.annotations.forEach(t._createMarker, t), t._annotationEvents = [], t._boundsEvt = h.addListener(i, "bounds_changed", n.hitch(t, "_fitRegion"))
                                }, 1)
                            })
                        },
                        destroy: function() {
                            i.off(this._annotationEvents), h.removeListener(this._boundsEvt), h.clearInstanceListeners(this._gmap), this.removeAllAnnotations(), this._gmap = null, s.prototype.destroy.apply(this, arguments)
                        },
                        addAnnotation: function(t) {
                            t && ("Ti.Map.Annotation" === t.declaredClass || (t = new Annotation(t)), ~this.annotations.indexOf(t) || this._createMarker(t), t.title && (this._annotationMap[t.title] = t))
                        },
                        addAnnotations: function(t) {
                            t && t.forEach(this.addAnnotation, this)
                        },
                        addRoute: function(t) {
                            t && (t.points || []).length && (t.pline = new d.Polyline({
                                map: this._gmap,
                                path: t.points.map(function(t) {
                                    return new d.LatLng(t.latitude, t.longitude)
                                }),
                                strokeColor: t.color || "#000",
                                strokeWeight: t.width || 1
                            }), this._routes.push(t))
                        },
                        deselectAnnotation: function(t) {
                            require.is(t, "String") && (t = this._annotationMap[t]), t && l && l.widgetId === t.widgetId && this._hide(t)
                        },
                        removeAllAnnotations: function() {
                            for (l && l.close(); this.annotations.length;) this.removeAnnotation(this.annotations[0])
                        },
                        removeAnnotation: function(t) {
                            if (require.is(t, "String") && (t = this._annotationMap[t]), t) {
                                var e = this.__values__.properties.annotations,
                                    i = e.indexOf(t);
                                l && this._hide(t), h.removeListener(t.evt), t.marker.setMap(null), delete t.marker, t.destroy(), ~i && e.splice(i, 1)
                            }
                        },
                        removeAnnotations: function(t) {
                            t.forEach(function(t) {
                                this.removeAnnotation(t)
                            }, this)
                        },
                        removeRoute: function(t) {
                            if (t && t.name)
                                for (var e = this._routes, i = 0; i < e.length; i++) e[i].name === t.name && (t.pline.setMap(null), delete t.pline, e.splice(i--, 1))
                        },
                        selectAnnotation: function(t) {
                            require.is(t, "String") && (t = this._annotationMap[t]), t && this._show(t)
                        },
                        setLocation: function(t) {
                            t && (this.region = t), f(t.animate) && (this.animated = t.animate), f(t.animated) && (this.animated = t.animated), f(t.regionFit) && (this.regionFit = t.regionFit), this._updateMap(t)
                        },
                        zoom: function(t) {
                            var e = this._gmap;
                            e.setZoom(e.getZoom() + t)
                        },
                        _show: function(t, n) {
                            function o() {
                                a || (a = 1) && s._dispatchEvents(t, n)
                            }
                            if (t && (!l || l.widgetId !== t.widgetId)) {
                                var r, a, s = this,
                                    u = t.widgetId,
                                    c = "TiMapAnnotation",
                                    _ = e.create("div", {
                                        className: c
                                    }),
                                    f = _,
                                    g = {
                                        annotation: f,
                                        leftButton: t.leftButton && e.create("img", {
                                            className: c + "LeftButton",
                                            src: t.leftButton
                                        }, _),
                                        rightButton: t.rightButton && e.create("img", {
                                            className: c + "RightButton",
                                            src: t.rightButton
                                        }, _),
                                        dummy: (_ = e.create("div", {
                                            className: c + "Content"
                                        }, _)) && 0,
                                        title: e.create("h1", {
                                            innerHTML: t._getTitle()
                                        }, _),
                                        subtitle: e.create("p", {
                                            innerHTML: t._getSubtitle()
                                        }, _)
                                    };
                                i.off(s._annotationEvents);
                                for (r in g) ! function(e, n) {
                                    n && s._annotationEvents.push(p(n, "click", function(n) {
                                        i.stop(n), s._hide(t, e)
                                    }))
                                }(r, g[r]);
                                s._annotationEvents.push(p(t, "update", this, function(e) {
                                    if (l.widgetId === u) {
                                        var i, n = e.property,
                                            o = e.value,
                                            r = this._annotationMap;
                                        switch (n) {
                                            case "title":
                                            case "subtitle":
                                                g[n].innerHTML = o, delete r[e.oldValue], o && (r[o] = t);
                                                break;
                                            case "leftButton":
                                            case "rightButton":
                                                g[n].src = o;
                                                break;
                                            case "image":
                                            case "pincolor":
                                                i = s._getMarkerImage(t), t.marker.setIcon(i[0]), t.marker.setShadow(i[1] || null)
                                        }
                                    }
                                })), l ? (o(), l.setContent(f)) : (l = new d.InfoWindow({
                                    content: f
                                }), h.addListener(l, "domready", o), h.addListener(l, "closeclick", function() {
                                    s._hide(t, "annotation")
                                })), l.open(s._gmap, t.marker), l.widgetId = t.widgetId
                            }
                        },
                        _hide: function(t, e) {
                            e && ~e.indexOf("Button") || (l.close(), l.widgetId = 0), this._dispatchEvents(t, e)
                        },
                        _dispatchEvents: function(t, e) {
                            var i = this.annotations.indexOf(t),
                                n = {
                                    annotation: t,
                                    clicksource: e = e || "pin",
                                    index: i,
                                    latitude: t.latitude,
                                    longitude: t.longitude,
                                    map: this,
                                    subtitle: t._getSubtitle(),
                                    title: t._getTitle()
                                };
                            m.call(this, "singletap", n), m.call(this, "click", n), t._onclick(this, i, e)
                        },
                        _getMarkerImage: function(t) {
                            var e, i, n = v[0 | t.pincolor];
                            return t.image && ("Ti.Blob" === t.image.declaredClass ? (n = v[e = u.md5HexDigest(i = t.image.toString())], n || (n = v[e] = [new d.MarkerImage(i)])) : (n = v[t.image], n || (n = v[t.image] = [new d.MarkerImage(t.image)]))), n
                        },
                        _createMarker: function(t) {
                            var e = this._getMarkerImage(t);
                            t.evt = h.addListener(t.marker = new d.Marker({
                                map: this._gmap,
                                icon: e[0],
                                shadow: e[1],
                                position: new d.LatLng(t.latitude, t.longitude),
                                optimized: !1,
                                title: t._getTitle(),
                                animation: t.animate && d.Animation.DROP
                            }), "click", n.hitch(this, function() {
                                this[l && l.widgetId === t.widgetId ? "_hide" : "_show"](t)
                            })), this.__values__.properties.annotations.push(t)
                        },
                        _fitRegion: function() {
                            var t = this.__values__.constants,
                                e = this._gmap,
                                i = e.getCenter(),
                                n = e.getBounds(),
                                o = n.getNorthEast(),
                                r = n.getSouthWest(),
                                a = t.latitudeDelta = o.lat() - r.lat(),
                                s = t.longitudeDelta = o.lng() - r.lng(),
                                u = {
                                    latitude: i.lat(),
                                    longitude: i.lng(),
                                    latitudeDelta: a,
                                    longitudeDelta: s
                                };
                            this.regionFit && (this.__values__.properties.region = u), this._initialized || (this._initialized = 1, this.fireEvent("complete")), this.fireEvent("regionchanged", u)
                        },
                        _updateMap: function(t, e) {
                            var i = this._gmap;
                            if (i) {
                                var n = !e && this.animated,
                                    o = t.latitudeDelta / 2,
                                    r = t.longitudeDelta / 2;
                                i[n ? "panTo" : "setCenter"](new d.LatLng(t.latitude, t.longitude)), i[n ? "panToBounds" : "fitBounds"](new d.LatLngBounds(new d.LatLng(t.latitude - o, t.longitude - r), new d.LatLng(t.latitude + o, t.longitude + r)))
                            }
                        },
                        _updateUserLocation: function(t) {
                            var e = this._gmap;
                            e && (t || this._locationInited) && (this._locationInited = 1, r[t ? "addEventListener" : "removeEventListener"]("location", n.hitch(this, function(t) {
                                var e, i = this._locationMarker,
                                    n = t.coords,
                                    o = t.code;
                                n ? (e = new d.LatLng(n.latitude, n.longitude), i ? i.setPosition(e) : this._locationMarker = new d.Marker({
                                    map: this._gmap,
                                    icon: _,
                                    position: e
                                })) : "code" in t && Ti.API.warn("Geolocation error: " + (o === r.ERROR_DENIED ? "permission denied" : o === r.ERROR_TIMEOUT ? "timeout" : o === r.ERROR_LOCATION_UNKNOWN ? "position unavailable" : "unknown"))
                            })), r.locationServicesEnabled ? (!t || this._locationMarker) && this._locationMarker.setVisible(t) : (Ti.API.warn("Geolocation services unavailable"), this.__values__.properties.userLocation = !1))
                        },
                        fireEvent: function(t) {
                            /(click|singletap)/.test(t) || s.prototype.fireEvent.apply(this, arguments)
                        },
                        constants: {
                            latitudeDelta: 0,
                            longitudeDelta: 0
                        },
                        properties: {
                            animated: !1,
                            annotations: {
                                set: function(t) {
                                    return t = t.filter(function(t) {
                                        return t && "Ti.Map.Annotation" === t.declaredClass
                                    }), this._gmap && (this.removeAllAnnotations(), t.forEach(this._createMarker, this)), t
                                }
                            },
                            mapType: {
                                set: function(t) {
                                    return this._gmap && this._gmap.setMapTypeId(c(t)), t
                                }
                            },
                            region: {
                                set: function(t, e) {
                                    return g({}, T, e, t)
                                },
                                post: function(t, e) {
                                    t !== e && this._updateMap(t)
                                },
                                value: null
                            },
                            regionFit: !0,
                            userLocation: {
                                post: function(t) {
                                    this._updateUserLocation(t)
                                },
                                value: !1
                            }
                        }
                    });
                return window.TiMapViewInit = function() {
                    function t(t, e, o) {
                        return new d.MarkerImage(i + "marker_" + t + ".png", new d.Size(e, 34), new n(o, 0), new n(10, 34))
                    }
                    d = google.maps, h = d.event;
                    var e, i = "themes/" + require.config.ti.theme + "/Map/",
                        n = d.Point;
                    for (e in v) v[e] = [t(v[e], 20, 0), t(v[e], 37, 20)];
                    _ = new d.MarkerImage(i + "location.png", new d.Size(22, 22), new n(0, 0), new n(11, 11)), b()
                }, require(["//maps.googleapis.com/maps/api/js?key=" + o.getString("ti.map.apikey", "") + "&sensor=true&callback=TiMapViewInit"], 0, b), y
            })
        },
        "Ti/Media/AudioPlayer": function() {
            define(["Ti/_/declare", "Ti/_/Evented"], function(t, e) {
                return t("Ti.Media.AudioPlayer", e, {})
            })
        },
        "Ti/Media/Sound": function() {
            define(["Ti/_/declare", "Ti/_/Evented"], function(t, e) {
                return t("Ti.Media.Sound", e, {})
            })
        },
        "Ti/Media/VideoPlayer": function() {
            define(["Ti/_/declare", "Ti/_/dom", "Ti/_/event", "Ti/_/lang", "Ti/Media", "Ti/UI/View"], function(t, e, i, n, o, r) {
                function a(t) {
                    return p ? !!s.mozFullScreen || !!s.webkitIsFullScreen : !!t
                }
                var s = document,
                    u = require.on,
                    c = require.config.vendorPrefixes.dom,
                    d = 0,
                    h = 1,
                    l = 2,
                    _ = 3,
                    f = "requestFullScreen",
                    g = "exitFullScreen",
                    p = function() {
                        for (var t, e = 0; e < c.length; e++)
                            if (t = c[e].toLowerCase(), s[t + "CancelFullScreen"]) return f = t + "RequestFullScreen", g = t + "ExitFullScreen", 1;
                        return !!s.cancelFullScreen
                    }(),
                    m = !0,
                    T = {
                        m4v: "video/mp4",
                        mov: "video/quicktime",
                        mp4: "video/mp4",
                        ogg: "video/ogg",
                        ogv: "video/ogg",
                        webm: "video/webm"
                    };
                return t("Ti.Media.VideoPlayer", r, {
                    _currentState: d,
                    constructor: function() {
                        this._handles = []
                    },
                    properties: {
                        autoplay: !1,
                        currentPlaybackTime: {
                            get: function() {
                                return this._video ? 1e3 * this._video.currentTime : 0
                            },
                            set: function(t) {
                                return this._video && (this._video.currentTime = t / 1e3 | 0), t
                            }
                        },
                        fullscreen: {
                            value: a(),
                            set: function(t) {
                                var e, i = this._video;
                                if (t = !!t, p) try {
                                    t === a() && (t = !t), i[t ? f : g]()
                                } catch (n) {} else m && (i.className = t ? "fullscreen" : "", t && (e = u(window, "keydown", function(t) {
                                    27 === t.keyCode && (this.fullscreen = 0, e())
                                })));
                                return this.fireEvent("fullscreen", {
                                    entering: t
                                }), t
                            }
                        },
                        mediaControlStyle: {
                            value: o.VIDEO_CONTROL_DEFAULT,
                            set: function(t) {
                                return this._video && (this._video.controls = t === o.VIDEO_CONTROL_DEFAULT), t
                            }
                        },
                        repeatMode: o.VIDEO_REPEAT_MODE_NONE,
                        scalingMode: {
                            set: function(t) {
                                var e = this.domNode,
                                    i = o.VIDEO_SCALING_ASPECT_FIT,
                                    n = {};
                                return n[o.VIDEO_SCALING_NONE] = "TiScalingNone", n[i] = "TiScalingAspectFit", e.className = e.className.replace(/(scaling\-[\w\-]+)/, "") + " " + (n[t] || n[t = i]), t
                            }
                        },
                        url: {
                            set: function(t) {
                                return this.__values__.constants.playing = !1, this._currentState = d, this.__values__.properties.url = t, this._createVideo(), t
                            }
                        }
                    },
                    constants: {
                        playbackState: o.VIDEO_PLAYBACK_STATE_STOPPED,
                        playing: !1,
                        initialPlaybackTime: 0,
                        endPlaybackTime: 0,
                        playableDuration: 0,
                        loadState: o.VIDEO_LOAD_STATE_UNKNOWN,
                        duration: 0
                    },
                    _set: function(t, e) {
                        var i = {};
                        i[t] = this.__values__.constants[t] = e, this.fireEvent(t.toLowerCase(), i)
                    },
                    _complete: function(t) {
                        var e = "ended" === t.type;
                        this.__values__.constants.playing = !1, this._currentState = d, this.fireEvent("complete", {
                            reason: e ? o.VIDEO_FINISH_REASON_PLAYBACK_ENDED : o.VIDEO_FINISH_REASON_USER_EXITED
                        }), e && this.repeatMode === o.VIDEO_REPEAT_MODE_ONE && setTimeout(n.hitch(this, function() {
                            this._video.play()
                        }), 1)
                    },
                    _stalled: function() {
                        this._set("loadState", o.VIDEO_LOAD_STATE_STALLED)
                    },
                    _fullscreenChange: function() {
                        this.__values__.properties.fullscreen = !a(this.fullscreen)
                    },
                    _durationChange: function() {
                        var t = 1e3 * this._video.duration,
                            e = this.__values__.constants;
                        1 / 0 !== t && (this.duration || this.fireEvent("durationavailable", {
                            duration: t
                        }), e.duration = e.playableDuration = e.endPlaybackTime = t)
                    },
                    _paused: function() {
                        var t = o.VIDEO_PLAYBACK_STATE_STOPPED;
                        this.__values__.constants.playing = !1, this._currentState === _ ? (this._currentState = l, t = o.VIDEO_PLAYBACK_STATE_PAUSED) : this._currentState === h && (this._video.currentTime = 0), this._set("playbackState", t)
                    },
                    _createVideo: function(t) {
                        var i, n, r = this._video,
                            a = this.url,
                            s = this.__values__.constants;
                        if (a) {
                            if (t && r && r.parentNode) return r;
                            for (this.release(), r = this._video = e.create("video", {
                                    tabindex: 0
                                }), this.mediaControlStyle === o.VIDEO_CONTROL_DEFAULT && (r.controls = 1), this.scalingMode = o.VIDEO_SCALING_ASPECT_FIT, this._handles = [u(r, "playing", this, function() {
                                    this._currentState = _, s.playing = !0, this.fireEvent("playing", {
                                        url: r.currentSrc
                                    }), this._set("playbackState", o.VIDEO_PLAYBACK_STATE_PLAYING)
                                }), u(r, "pause", this, "_paused"), u(r, "canplay", this, function() {
                                    this._set("loadState", o.VIDEO_LOAD_STATE_PLAYABLE), this._currentState === d && this.autoplay && r.play()
                                }), u(r, "canplaythrough", this, function() {
                                    this._set("loadState", o.VIDEO_LOAD_STATE_PLAYTHROUGH_OK), this.fireEvent("preload")
                                }), u(r, "loadeddata", this, function() {
                                    this.fireEvent("load")
                                }), u(r, "loadedmetadata", this, "_durationChange"), u(r, "durationchange", this, "_durationChange"), u(r, "timeupdate", this, function() {
                                    s.currentPlaybackTime = 1e3 * this._video.currentTime, this._currentState === h && this.pause()
                                }), u(r, "error", this, function() {
                                    var t = "Unknown error";
                                    switch (r.error.code) {
                                        case 1:
                                            t = "Aborted";
                                            break;
                                        case 2:
                                            t = "Decode error";
                                            break;
                                        case 3:
                                            t = "Network error";
                                            break;
                                        case 4:
                                            t = "Unsupported format"
                                    }
                                    s.playing = !1, this._set("loadState", o.VIDEO_LOAD_STATE_UNKNOWN), this.fireEvent("error", {
                                        message: t
                                    }), this.fireEvent("complete", {
                                        reason: o.VIDEO_FINISH_REASON_PLAYBACK_ERROR
                                    })
                                }), u(r, "abort", this, "_complete"), u(r, "ended", this, "_complete"), u(r, "stalled", this, "_stalled"), u(r, "waiting", this, "_stalled"), u(r, "mozfullscreenchange", this, "_fullscreenChange"), u(r, "webkitfullscreenchange", this, "_fullscreenChange")], this.domNode.appendChild(r), require.is(a, "Array") || (a = [a]), i = 0; i < a.length; i++) n = a[i].match(/.+\.([^\/\.]+?)$/), e.create("source", {
                                src: a[i],
                                type: n && T[n[1]]
                            }, r);
                            return r
                        }
                    },
                    play: function() {
                        this._currentState !== _ && this._createVideo(1).play()
                    },
                    pause: function() {
                        this._currentState === _ && this._createVideo(1).pause()
                    },
                    destroy: function() {
                        this.release(), r.prototype.destroy.apply(this, arguments)
                    },
                    release: function() {
                        var t = this._video,
                            e = t && t.parentNode;
                        this._currentState = d, this.__values__.constants.playing = !1, e && (i.off(this._handles), e.removeChild(t)), this._video = null
                    },
                    stop: function() {
                        var t = this._video;
                        this._currentState = h, t && (t.pause(), t.currentTime = 0)
                    }
                })
            })
        },
        "Ti/MobileWeb/WP8": function() {
            define(["Ti/_/lang"], function(t) {
                function e(t) {
                    this._hnd = t, this._listeners = {}
                }
                var i = window,
                    n = {},
                    o = require.sendNativeMessage;
                return e.prototype._send = function(t, r) {
                    var a;
                    return r.hnd = this._hnd, i.handleProxyResponse = function(t) {
                        a = t
                    }, o("r", t + JSON.stringify(r)), i.handleProxyResponse = void 0, a = JSON.parse(a), a.primitiveValue ? a.primitiveValue : a.hnd ? n[a.hnd] || (n[a.hnd] = new e(a.hnd)) : void 0
                }, e.prototype.invoke = function(t, i, n) {
                    return this._send("in", {
                        name: t,
                        argTypes: i,
                        argValues: n.map(function(t) {
                            var i = t instanceof e;
                            return {
                                valueHnd: i ? t._hnd : void 0,
                                valuePrimitive: i ? void 0 : t
                            }
                        })
                    })
                }, e.prototype.getProp = function(t, e) {
                    return this._send("gp", {
                        name: t,
                        isAttached: e
                    })
                }, e.prototype.setProp = function(t, i, n) {
                    var o = i instanceof e;
                    return this._send("sp", {
                        name: t,
                        valueHnd: o ? i._hnd : void 0,
                        valuePrimitive: o ? void 0 : i,
                        isAttached: n
                    })
                }, e.prototype.getAtIndex = function(t, e) {
                    return this._send("gi", {
                        name: t,
                        index: e
                    })
                }, e.prototype.setAtIndex = function(t, e, i) {
                    return this._send("si", {
                        name: t,
                        value: e,
                        index: i
                    })
                }, e.prototype.getEnum = function(t, e) {
                    return this._send("ge", {
                        name: t,
                        value: e
                    })
                }, e.prototype.destory = function() {
                    this._send("de", {})
                }, e.prototype.addEventListener = function(t, e) {
                    this._listeners[t] || (this._listeners[t] = [], o("r", "ae" + JSON.stringify({
                        hnd: this._hnd,
                        name: t
                    }))), this._listeners[t].push(e)
                }, e.prototype.removeEventListener = function(t, e) {
                    var i = this._listeners[t].indexOf(e);
                    this._listeners[t] && ~i && (this._listeners[t] = this._listeners[t].splice(i, 1), this._listeners[t].length || o("r", "re" + JSON.stringify({
                        hnd: this._hnd,
                        name: t
                    })))
                }, t.setObject("Ti.MobileWeb.WP8", {
                    createInstance: function(t, r, a) {
                        var s;
                        return i.handleProxyResponse = function(t) {
                            s = t
                        }, o("r", "ci" + JSON.stringify({
                            className: t,
                            argTypes: r,
                            argValues: a.map(function(t) {
                                var i = t instanceof e;
                                return {
                                    valueHnd: i ? t._hnd : void 0,
                                    valuePrimitive: i ? void 0 : t
                                }
                            })
                        })), i.handleProxyResponse = void 0, n[s] = new e(s)
                    },
                    getRootGrid: function() {
                        if (n.root) return n.root;
                        var t;
                        return i.handleProxyResponse = function(e) {
                            t = e
                        }, o("r", "gr"), i.handleProxyResponse = void 0, n[t] = new e(t)
                    }
                })
            })
        },
        "Ti/Network/HTTPClient": function() {
            define(["Ti/_", "Ti/_/declare", "Ti/_/has", "Ti/_/lang", "Ti/_/Evented", "Ti/Filesystem", "Ti/Network", "Ti/Blob", "Ti/_/event", "Ti/App"], function(t, e, i, n, o, r, a, s, u, c) {
                var d = require.is,
                    h = require.on;
                return e("Ti.Network.HTTPClient", o, {
                    constructor: function() {
                        var t = this._xhr = new XMLHttpRequest;
                        this._handles = [h(t, "error", this, "_onError"), t.upload && h(t.upload, "error", this, "_onError"), h(t, "progress", this, function(t) {
                            t.progress = t.lengthComputable ? t.loaded / t.total : !1, d(this.ondatastream, "Function") && this.ondatastream.call(this, t)
                        }), t.upload && h(t.upload, "progress", this, function(t) {
                            t.progress = t.lengthComputable ? t.loaded / t.total : !1, d(this.onsendstream, "Function") && this.onsendstream.call(this, t)
                        })], t.onreadystatechange = n.hitch(this, function() {
                            var e, n = this.__values__.constants,
                                o = this.onload;
                            switch (t.readyState) {
                                case 0:
                                    n.readyState = this.UNSENT;
                                    break;
                                case 1:
                                    n.readyState = this.OPENED;
                                    break;
                                case 2:
                                    n.readyState = this.LOADING;
                                    break;
                                case 3:
                                    n.readyState = this.HEADERS_RECEIVED;
                                    break;
                                case 4:
                                    clearTimeout(this._timeoutTimer), this._completed = 1, n.readyState = this.DONE, this._aborted || ((e = this.file) && (e = r.getFile(e), e.writable && e.write(t.responseText)), n.responseText = t.responseText, n.responseData = new s({
                                        data: t.responseText,
                                        length: t.responseText.length,
                                        mimeType: t.getResponseHeader("Content-Type") || "text/plain"
                                    }), n.responseXML = t.responseXML, i("ti-instrumentation") && instrumentation.stopTest(this._requestInstrumentationTest, this.location), t.status >= 400 && (o = this._onError), d(o, "Function") && o.call(this))
                            }
                            this._fireStateChange()
                        })
                    },
                    destroy: function() {
                        this._xhr && (this._xhr.abort(), this._xhr = null), u.off(this._handles), o.destroy.apply(this, arguments)
                    },
                    _onError: function(t) {
                        this.abort(), d(t, "Object") || (t = {
                            message: t
                        }), t.source = this, t.type = "error", t.error || (t.error = t.message || this._xhr.status), parseInt(t.error) || (t.error = "Can't reach host"), d(this.onerror, "Function") && this.onerror.call(this, t)
                    },
                    abort: function() {
                        clearTimeout(this._timeoutTimer), this._aborted = 1, this.connected && this._xhr.abort(), this.__values__.constants.readyState = this.UNSENT, this._fireStateChange()
                    },
                    _fireStateChange: function() {
                        d(this.onreadystatechange, "Function") && this.onreadystatechange.call(this)
                    },
                    getResponseHeader: function(t) {
                        return this._xhr.readyState > 1 ? this._xhr.getResponseHeader(t) : null
                    },
                    open: function(e, i, n) {
                        var o = Ti.Network.httpURLFormatter,
                            r = this.__values__.constants,
                            a = this.withCredentials,
                            s = t.getAbsolutePath(o ? o(i) : i),
                            u = s.match(/^((?:.+\:)?\/\/)?(?:.+@)?(.*)$/);
                        u && this.username && this.password && (s = (u[1] || "") + (this.domain ? this.domain + "\\" : "") + this.username + ":" + this.password + "@" + u[2]), this.abort(), this._xhr.open(r.connectionType = e, r.location = s, a || void 0 === n ? !0 : !!n), a && (this._xhr.withCredentials = a)
                    },
                    send: function(t) {
                        try {
                            var e = 0 | this.timeout;
                            this._aborted = this._completed = 0, i("ti-instrumentation") && (this._requestInstrumentationTest = instrumentation.startTest("HTTP Request")), t = d(t, "Object") ? n.urlEncode(t) : t, this._contentTypeSet || t && this._xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), this._xhr.setRequestHeader("X-Titanium-Id", c.guid), this._xhr.send(t), clearTimeout(this._timeoutTimer), e && (this._timeoutTimer = setTimeout(n.hitch(this, function() {
                                this.connected && (this.abort(), !this._completed && this._onError("Request timed out"))
                            }), e))
                        } catch (o) {}
                    },
                    setRequestHeader: function(t, e) {
                        "Content-Type" === t && (this._contentTypeSet = 1), this._xhr.setRequestHeader(t, e)
                    },
                    properties: {
                        ondatastream: void 0,
                        onerror: void 0,
                        onload: void 0,
                        onreadystatechange: void 0,
                        onsendstream: void 0,
                        timeout: void 0,
                        username: null,
                        password: null,
                        domain: null,
                        withCredentials: !1
                    },
                    constants: {
                        DONE: 4,
                        HEADERS_RECEIVED: 2,
                        LOADING: 3,
                        OPENED: 1,
                        UNSENT: 1,
                        connected: function() {
                            return this.readyState >= this.OPENED
                        },
                        connectionType: void 0,
                        location: void 0,
                        readyState: this.UNSENT,
                        responseData: void 0,
                        responseText: void 0,
                        responseXML: void 0,
                        status: function() {
                            return this._xhr.status
                        },
                        statusText: function() {
                            return this._xhr.statusText
                        }
                    }
                })
            })
        },
        "Ti/Platform/DisplayCaps": function() {
            define(["Ti/_", "Ti/_/Evented", "Ti/_/lang"], function(t, e, i) {
                var n = navigator.userAgent.toLowerCase(),
                    o = i.setObject("Ti.Platform.DisplayCaps", e, {
                        constants: {
                            density: function() {
                                switch (n) {
                                    case "iphone":
                                        return "medium";
                                    case "ipad":
                                        return "medium";
                                    default:
                                        return ""
                                }
                            },
                            dpi: t.dpi,
                            platformHeight: window.innerHeight,
                            platformWidth: window.innerWidth
                        }
                    });
                return Ti.Platform.displayCaps = o
            })
        },
        "Ti/UI/2DMatrix": function() {
            define(["Ti/_/declare", "Ti/_/Evented", "Ti/_/lang", "Ti/Platform"], function(t, e, i, n) {
                function o(t, e, i) {
                    var n = 0 == e ? 1 : 0,
                        o = 2 == e ? 1 : 2,
                        r = 0 == t ? 1 : 0,
                        a = 2 == t ? 1 : 2;
                    return i[r][n] * i[a][o] - i[r][o] * i[a][n]
                }

                function r(t, e, i, n, o, r, a, s) {
                    return {
                        a: t.a * e + t.b * n,
                        b: t.a * i + t.b * o,
                        c: t.c * e + t.d * n,
                        d: t.c * i + t.d * o,
                        tx: t.a * r + t.b * a + t.tx,
                        ty: t.c * r + t.d * a + t.ty,
                        rotation: t.rotation + (0 | s)
                    }
                }
                var a, s = "gecko" === n.runtime,
                    u = function(t) {
                        return s ? t + "px" : t
                    };
                return a = t("Ti.UI.2DMatrix", e, {
                    properties: {
                        a: 1,
                        b: 0,
                        c: 0,
                        d: 1,
                        tx: 0,
                        ty: 0,
                        rotation: 0
                    },
                    constructor: function(t) {
                        t && require.mix(this, t)
                    },
                    invert: function() {
                        var t = 0,
                            e = 0,
                            i = [
                                [this.a, this.b, this.tx],
                                [this.c, this.d, this.ty],
                                [0, 0, 1]
                            ],
                            n = i,
                            s = this.a * o(0, 0, i) - this.b * o(0, 1, i) + this.tx * o(0, 2, i);
                        if (Math.abs(s) > 1e-10)
                            for (s = 1 / s; 3 > e; e++)
                                for (; 3 > t; t++) n[e][t] = o(t, e, i) * s, (t + e) % 2 == 1 && (n[e][t] = -n[e][t]);
                        return new a(r(this, n[0][0], n[0][1], n[1][0], n[1][1], n[0][2], n[1][2]))
                    },
                    multiply: function(t) {
                        return new a(r(this, t.a, t.b, t.c, t.d, t.tx, t.ty, t.rotation))
                    },
                    rotate: function(t) {
                        return new a({
                            a: this.a,
                            b: this.b,
                            c: this.c,
                            d: this.d,
                            tx: this.tx,
                            ty: this.ty,
                            rotation: this.rotation + t
                        })
                    },
                    scale: function(t, e) {
                        return new a(r(this, t, 0, 0, i.val(e, t), 0, 0))
                    },
                    translate: function(t, e) {
                        return new a(r(this, 1, 0, 0, 1, t, e))
                    },
                    toCSS: function() {
                        for (var t = 0, e = [this.a, this.b, this.c, this.d, this.tx, this.ty]; 6 > t; t++) e[t] = e[t].toFixed(6), t > 4 && (e[t] = u(e[t]));
                        return "matrix(" + e.join(",") + ") rotate(" + this.rotation + "deg)"
                    }
                })
            })
        },
        "Ti/UI/ActivityIndicator": function() {
            define(["Ti/_/declare", "Ti/_/lang", "Ti/_/UI/Widget", "Ti/_/dom", "Ti/_/style", "Ti/Locale", "Ti/UI", "Ti/UI/ActivityIndicatorStyle"], function(t, e, i, n, o, r, a, s) {
                var u = .3,
                    c = o.set;
                return t("Ti.UI.ActivityIndicator", i, {
                    constructor: function() {
                        var t = this._contentContainer = a.createView({
                            layout: a._LAYOUT_CONSTRAINING_HORIZONTAL,
                            width: a.SIZE,
                            height: a.SIZE
                        });
                        this._add(t), i.prototype.hide.call(this), t._add(this._indicatorIndicator = a.createView()), t._add(this._indicatorMessage = a.createLabel()), this._createProngs()
                    },
                    _createProngs: function() {
                        var t, e = 0,
                            i = this._prongs = [],
                            o = this._indicatorIndicator,
                            r = o.domNode,
                            a = this.indicatorColor,
                            s = this.indicatorDiameter,
                            c = s / 36;
                        for (o.width = o.height = s; r.firstChild;) r.removeChild(r.firstChild);
                        for (t = n.create("div", {
                                className: "TiUIActivityIndicatorProngContainer",
                                style: {
                                    transformOrigin: "0px 0px",
                                    transform: "scale(" + c + ")"
                                }
                            }, r); 12 > e; e++) i.push(n.create("div", {
                            className: "TiUIActivityIndicatorProng",
                            style: {
                                transform: "translate(16px,0px) rotate(" + 30 * e + "deg)",
                                transformOrigin: "2px 18px",
                                opacity: u,
                                backgroundColor: a
                            }
                        }, t))
                    },
                    show: function() {
                        i.prototype.show.call(this), this._timer = setInterval(e.hitch(this, "_animate"), 100)
                    },
                    hide: function() {
                        clearTimeout(this._timer), i.prototype.hide.call(this)
                    },
                    _currentProng: 0,
                    _animate: function() {
                        var t = this._prongs[this._currentProng];
                        12 == ++this._currentProng && (this._currentProng = 0), c(t, "transition", ""), setTimeout(function() {
                            c(t, "opacity", 1), setTimeout(function() {
                                c(t, "transition", "opacity 500ms linear 0ms"), setTimeout(function() {
                                    c(t, "opacity", u)
                                }, 1)
                            }, 1)
                        }, 1)
                    },
                    _defaultWidth: a.SIZE,
                    _defaultHeight: a.SIZE,
                    _messagePadding: 0,
                    properties: {
                        color: {
                            set: function(t) {
                                return this._indicatorMessage.color = t
                            }
                        },
                        font: {
                            set: function(t) {
                                return this._indicatorMessage.font = t
                            }
                        },
                        indicatorColor: {
                            post: "_createProngs",
                            value: "#fff"
                        },
                        indicatorDiameter: {
                            post: "_createProngs",
                            value: 36
                        },
                        message: {
                            set: function(t) {
                                var e = this._indicatorMessage;
                                return e.left = t ? 5 : 0, e.text = t
                            }
                        },
                        messageid: {
                            set: function(t) {
                                var e = this._indicatorMessage;
                                return e.left = t ? 5 : 0, e.textid = t
                            }
                        },
                        style: {
                            set: function(t) {
                                this.indicatorColor = ~[s.DARK, s.BIG_DARK].indexOf(t) ? "#444" : "#fff", this.indicatorDiameter = ~[s.BIG, s.BIG_DARK].indexOf(t) ? 72 : 36
                            }
                        }
                    }
                })
            })
        },
        "Ti/UI/ActivityIndicatorStyle": function() {
            define(["Ti/_/lang"], function(t) {
                return t.setObject("Ti.UI.ActivityIndicatorStyle", {
                    constants: {
                        BIG: 0,
                        BIG_DARK: 1,
                        DARK: 2,
                        PLAIN: 3
                    }
                })
            })
        },
        "Ti/UI/AlertDialog": function() {
            define(["Ti/_/css", "Ti/_/declare", "Ti/_/lang", "Ti/_/Evented", "Ti/Locale", "Ti/UI", "Ti/_/style"], function(t, e, i, n, o, r, a) {
                return e("Ti.UI.AlertDialog", n, {
                    show: function() {
                        var e = this._alertWindow = r.createWindow(),
                            n = r.createView({
                                backgroundColor: "black",
                                opacity: 0,
                                left: 0,
                                top: 0,
                                right: 0,
                                bottom: 0
                            }),
                            s = r.createView({
                                backgroundColor: "white",
                                borderRadius: 3,
                                height: r.SIZE,
                                layout: r._LAYOUT_CONSTRAINING_VERTICAL,
                                opacity: 0,
                                width: "50%"
                            }),
                            u = this.buttonNames || [];
                        e._add(n), e._add(s), a.set(e.domNode, "zIndex", 2147483647), s._add(r.createLabel({
                            text: o._getString(this.titleid, this.title),
                            font: {
                                fontWeight: "bold"
                            },
                            left: 5,
                            right: 5,
                            top: 5,
                            height: r.SIZE,
                            textAlign: r.TEXT_ALIGNMENT_CENTER
                        })), s._add(r.createLabel({
                            text: o._getString(this.messageid, this.message),
                            left: 5,
                            right: 5,
                            top: 5,
                            height: r.SIZE,
                            textAlign: r.TEXT_ALIGNMENT_CENTER
                        })), u.length || u.push(o._getString(this.okid, this.ok || "OK")), u.forEach(function(n, o) {
                            var a = r.createButton({
                                left: 5,
                                right: 5,
                                top: 5,
                                bottom: o === u.length - 1 ? 5 : 0,
                                height: r.SIZE,
                                title: n,
                                index: o
                            });
                            o === this.cancel && t.add(a.domNode, "TiUIElementGradientCancel"), s._add(a), a.addEventListener("singletap", i.hitch(this, function() {
                                e.close(), this._alertWindow = void 0, this.fireEvent("click", {
                                    index: o,
                                    cancel: this.cancel === o
                                })
                            }))
                        }, this), n.addEventListener("postlayout", function() {
                            setTimeout(function() {
                                n.animate({
                                    opacity: .5,
                                    duration: 200
                                }, function() {
                                    s.animate({
                                        opacity: 1,
                                        duration: 200
                                    })
                                })
                            }, 0)
                        }), e.open()
                    },
                    hide: function() {
                        this._alertWindow && this._alertWindow.close()
                    },
                    properties: {
                        buttonNames: void 0,
                        cancel: -1,
                        message: void 0,
                        messageid: void 0,
                        ok: void 0,
                        okid: void 0,
                        title: void 0,
                        titleid: void 0
                    }
                })
            })
        },
        "Ti/UI/Clipboard": function() {
            define(["Ti/_/Evented", "Ti/_/lang"], function(t, e) {
                function i(t) {
                    if (!t) throw new Error(s);
                    return c[t]
                }

                function n(t, e) {
                    if (!t) throw new Error(s);
                    e ? c[t] = e : delete c[t], o()
                }

                function o() {
                    localStorage.setItem(r, JSON.stringify(c))
                }
                var r = "ti:clipboard",
                    a = "text/plain",
                    s = 'Missing required argument "type"',
                    u = localStorage.getItem(r),
                    c = require.is(u, "String") && JSON.parse(u) || {};
                return e.setObject("Ti.UI.Clipboard", t, {
                    clearData: function() {
                        c = {}, o()
                    },
                    clearText: function() {
                        n(a)
                    },
                    getData: function(t) {
                        return i(t) || null
                    },
                    getText: function() {
                        return i(a) || null
                    },
                    hasData: function(t) {
                        return !!i(t)
                    },
                    hasText: function() {
                        return !!i(a)
                    },
                    setData: function(t, e) {
                        n(t, e)
                    },
                    setText: function(t) {
                        n(a, t)
                    }
                })
            })
        },
        "Ti/UI/EmailDialog": function() {
            define(["Ti/_", "Ti/_/declare", "Ti/_/Evented", "Ti/_/lang"], function(t, e, i, n) {
                return e("Ti.UI.EmailDialog", i, {
                    open: function() {
                        var e, i, o = this.toRecipients || [],
                            r = "mailto:" + o.join(","),
                            a = {
                                subject: "subject",
                                ccRecipients: "cc",
                                bccRecipients: "bcc",
                                messageBody: "body"
                            },
                            s = {};
                        for (e in a)(i = this[e]) && (require.is(i, "Array") && (i = i.join(",")), s[a[e]] = i);
                        this.html || s.body && (s.body = t.escapeHtmlEntities(s.body)), s = n.urlEncode(s), location.href = r + (s ? "?" + s : ""), this.fireEvent("complete", {
                            result: this.SENT,
                            success: !0
                        })
                    },
                    isSupported: function() {
                        return !0
                    },
                    constants: {
                        CANCELLED: 0,
                        FAILED: 3,
                        SAVED: 1,
                        SENT: 2
                    },
                    properties: {
                        bccRecipients: void 0,
                        ccRecipients: void 0,
                        html: !1,
                        messageBody: void 0,
                        subject: void 0,
                        toRecipients: void 0
                    }
                })
            })
        },
        "Ti/UI/ImageView": function() {
            define(["Ti/_/declare", "Ti/_/event", "Ti/_/lang", "Ti/_/style", "Ti/_/UI/Widget", "Ti/UI", "Ti/Filesystem"], function(t, e, i, n, o, r, a) {
                var s = n.set,
                    u = require.is,
                    c = require.on,
                    d = t(o, {
                        domType: "img",
                        onload: null,
                        onerror: null,
                        constructor: function() {
                            this.domNode.ondragstart = function() {
                                return !1
                            }
                        },
                        _getContentSize: function() {
                            return {
                                width: this.domNode.width,
                                height: this.domNode.height
                            }
                        },
                        _preLayout: function(t, e, i, n) {
                            this.domNode.style.width = "", this.domNode.style.height = "";
                            var o = this.domNode.width / this.domNode.height,
                                a = this.__values__.properties,
                                s = a.width,
                                u = a.height;
                            return i || n ? i ? n ? (a.width = r.SIZE, a.height = r.SIZE) : (a.width = e * o, a.height = e) : (a.width = t, a.height = t / o) : t / e > o ? (a.width = e * o, a.height = e) : (a.width = t, a.height = t / o), s !== a.width || u !== a.height
                        },
                        _imageRatio: 1,
                        properties: {
                            src: {
                                set: function(t) {
                                    var n, o = this.domNode,
                                        r = "none",
                                        a = i.hitch(this, function(t) {
                                            e.off(n), this._triggerLayout(), this.onerror && this.onerror(t)
                                        });
                                    return t && (t = t.replace(/^(\/|\.\/)/, ""), r = "inherit", n = [c(o, "load", this, function() {
                                        o.style.width = "", o.style.height = "";
                                        var t = o.width / o.height;
                                        isNaN(t) && (t = 0 === o.width ? 1 : 1 / 0), this._imageRatio = t, this._triggerLayout(), this.onload && this.onload()
                                    }), c(o, "error", a), c(o, "abort", a)], o.src = require.cache(t) || t), s(o, "display", r), t
                                }
                            }
                        }
                    });
                return t("Ti.UI.ImageView", o, {
                    _createImage: function(t, e, i) {
                        var n = u(t, "String") && t.match(/^(.+)\:\/\//);
                        switch (n && ~a.protocols.indexOf(n[1]) && (t = a.getFile(t)), t && t.declaredClass) {
                            case "Ti.Filesystem.File":
                                t = t.read();
                            case "Ti.Blob":
                                t = t.toString()
                        }
                        return new d({
                            onload: e,
                            onerror: i,
                            src: t
                        })
                    },
                    _defaultWidth: r.SIZE,
                    _defaultHeight: r.SIZE,
                    _slideshowCount: 0,
                    _setSlideshowInterval: function() {
                        var t = this,
                            e = t._images;
                        clearInterval(this._slideshowTimer), this._slideshowTimer = setInterval(function() {
                            var i = !1;
                            return s(e[t._currentIndex].domNode, "display", "none"), t.reverse ? 0 === --t._currentIndex && (t._currentIndex = t.images.length - 1, i = !0) : ++t._currentIndex === t.images.length && (t._currentIndex = 0, i = !0), s(e[t._currentIndex].domNode, "display", "inherit"), t.repeatCount && i && ++t._slideshowCount === t.repeatCount ? void t.stop() : void t.fireEvent("change", {
                                index: t._currentIndex
                            })
                        }, this.duration)
                    },
                    start: function() {
                        this._images && (this._setState(0, 1), this._slideshowCount = 0, this._setSlideshowInterval(), this.fireEvent("start"))
                    },
                    stop: function() {
                        var t = this._images;
                        if (t) {
                            if (clearInterval(this._slideshowTimer), t.length) {
                                var e = 0;
                                this.reverse && (e = t.length - 1), this._currentIndex && s(t[this._currentIndex].domNode, "display", "none"), s(t[e].domNode, "display", "inherit"), this._currentIndex = e
                            }
                            this._setState(0, 0), this.fireEvent("stop")
                        }
                    },
                    pause: function() {
                        this._images && (clearInterval(this._slideshowTimer), this._setState(1, 0), this.fireEvent("pause"))
                    },
                    resume: function() {
                        this._images && (this._setSlideshowInterval(), this._setState(0, 1))
                    },
                    _setState: function(t, e) {
                        var i = this.__values__.constants;
                        i.paused = !!t, i.animating = !!e
                    },
                    constants: {
                        animating: !1,
                        paused: !1
                    },
                    properties: {
                        duration: {
                            set: function(t) {
                                return Math.max(30, t)
                            },
                            value: 200
                        },
                        image: {
                            set: function(t) {
                                return this._removeAllChildren(), this._images = void 0, this._add(this._createImage(t, function() {
                                    this.fireEvent("load", {
                                        state: "image"
                                    })
                                }, function(t) {
                                    this.fireEvent("error", t)
                                })), t
                            }
                        },
                        images: {
                            set: function(t) {
                                var e = void 0,
                                    i = 0,
                                    n = 0;
                                return this._removeAllChildren(), u(t, "Array") && (e = [], t.forEach(function(o) {
                                    var r = this._createImage(o, function() {
                                        !n && ++i === t.length && this.fireEvent("load", {
                                            state: "image"
                                        })
                                    }, function(t) {
                                        n || (n = 1) && this.fireEvent("error", t)
                                    });
                                    s(r.domNode, "display", "none"), e.push(r), this._add(r)
                                }, this)), this._images = e, t
                            },
                            post: function() {
                                this.stop()
                            }
                        },
                        repeatCount: 0,
                        reverse: !1
                    }
                })
            })
        },
        "Ti/UI/Label": function() {
            define(["Ti/_/declare", "Ti/_/UI/FontWidget", "Ti/_/dom", "Ti/_/css", "Ti/_/style", "Ti/_/lang", "Ti/Locale", "Ti/UI"], function(t, e, i, n, o, r, a, s) {
                var u = o.set,
                    c = i.unitize,
                    d = 2,
                    h = {
                        post: "_setText"
                    };
                return t("Ti.UI.Label", e, {
                    constructor: function() {
                        this._add(this._textContainer = s.createView({
                            width: s.INHERIT,
                            height: s.SIZE,
                            center: {
                                y: "50%"
                            }
                        }));
                        var t = this,
                            e = this._textContainerDomNode = this._textContainer.domNode;
                        t._textContainer._getContentSize = function(i) {
                            var n = t._textContainerDomNode.innerHTML,
                                o = t._measureText(n, e, t._hasSizeWidth() ? void 0 : i);
                            return {
                                width: o.width,
                                height: o.height
                            }
                        }, this._addStyleableDomNode(e), u(e, "overflow", "visible"), this.wordWrap = !0
                    },
                    _defaultWidth: s.SIZE,
                    _defaultHeight: s.SIZE,
                    _getText: function() {
                        var t, e, i = 0,
                            n = 0,
                            o = a._getString(this.textid, this.text);
                        if (void 0 === o) return "";
                        for (o += ""; n < o.length;)
                            if ("	" === o[n]) {
                                var r = "",
                                    s = d - e % d;
                                for (t = 0; s > t; t++) r += "&nbsp;";
                                o = o.substring(0, n) + r + o.substring(n + 1), n += r.length, e += s
                            } else "\n" === o[n] ? (o = o.substring(0, n) + "<br/>" + o.substring(n + 1), n += 5, i = n, e = 0) : (n++, e++);
                        return o.match(/<br\/>$/) && (o += "&nbsp;"), o
                    },
                    _setText: function() {
                        this._textContainerDomNode.innerHTML = this._getText(), this._triggerLayout()
                    },
                    _setTextShadow: function() {
                        var t = this.shadowColor && "" !== this.shadowColor ? this.shadowColor : void 0;
                        u(this._textContainerDomNode, "textShadow", this.shadowOffset || t ? (this.shadowOffset ? c(this.shadowOffset.x) + " " + c(this.shadowOffset.y) : "0px 0px") + " " + (this.shadowRadius ? c(this.shadowRadius) : "0.1em") + " " + r.val(t, "black") : "")
                    },
                    properties: {
                        ellipsize: {
                            set: function(t) {
                                return u(this._textContainerDomNode, "textOverflow", t ? "ellipsis" : "clip"), t
                            },
                            value: !0
                        },
                        html: {
                            set: function(t) {
                                return this._textContainerDomNode.innerHTML = t, this._hasSizeDimensions() && this._triggerLayout(), t
                            }
                        },
                        shadowColor: {
                            post: "_setTextShadow"
                        },
                        shadowOffset: {
                            post: "_setTextShadow"
                        },
                        shadowRadius: {
                            post: "_setTextShadow"
                        },
                        text: h,
                        textAlign: {
                            set: function(t) {
                                return u(this._textContainerDomNode, "textAlign", /(center|right)/.test(t) ? t : "left"), t
                            }
                        },
                        textid: h,
                        wordWrap: {
                            set: function(t) {
                                return u(this._textContainerDomNode, "whiteSpace", t ? "normal" : "nowrap"), t
                            }
                        },
                        verticalAlign: {
                            set: function(t) {
                                var e, i, n = this.center || {},
                                    o = this._textContainer;
                                switch (t) {
                                    case s.TEXT_VERTICAL_ALIGNMENT_TOP:
                                        e = 0;
                                        break;
                                    case s.TEXT_VERTICAL_ALIGNMENT_CENTER:
                                        n.y = "50%";
                                        break;
                                    case s.TEXT_VERTICAL_ALIGNMENT_BOTTOM:
                                        i = 0
                                }
                                return o.top = e, o.center = n, o.bottom = i, t
                            },
                            value: s.TEXT_VERTICAL_ALIGNMENT_CENTER
                        }
                    }
                })
            })
        },
        "Ti/_/UI/FontWidget": function() {
            define(["Ti/_/declare", "Ti/_/dom", "Ti/_/lang", "Ti/_/ready", "Ti/_/style", "Ti/_/UI/Widget"], function(t, e, i, n, o, r) {
                var a;
                return n(function() {
                    a = e.create("p", {
                        style: {
                            position: "absolute",
                            top: "-1000em",
                            left: 0,
                            height: "auto",
                            width: "auto"
                        }
                    }, document.body)
                }), t("Ti._.UI.FontWidget", r, {
                    constructor: function() {
                        this._styleableDomNodes = []
                    },
                    _setFont: function(t, e) {
                        if (t) {
                            var i = parseInt(t.fontSize);
                            t.fontSize = isNaN(i) ? void 0 : i + "px", o.set(e, t)
                        } else o.set(e, {
                            fontFamily: "",
                            fontSize: "",
                            fontStyle: "",
                            fontWeight: ""
                        })
                    },
                    _addStyleableDomNode: function(t) {
                        this._styleableDomNodes.push(t)
                    },
                    _removeStyleableDomNode: function(t) {
                        var e = this._styleableDomNodes.indexOf(t); - 1 != e && this._styleableDomNodes.splice(e, 1)
                    },
                    _measureText: function(t, n, r) {
                        var s = window.getComputedStyle(n) || {},
                            u = this.font || {},
                            c = !t || "" === t;
                        return a.innerHTML = c ? "Äy" : t, this._setFont({
                            fontFamily: u.fontFamily || s.fontFamily || "",
                            fontSize: u.fontSize || s.fontSize || "",
                            fontStyle: u.fontStyle || s.fontStyle || "",
                            fontWeight: u.fontWeight || s.fontWeight || ""
                        }, a), o.set(a, {
                            whiteSpace: n.style.whiteSpace,
                            width: e.unitize(i.val(r, "auto"))
                        }), {
                            width: c ? 0 : a.clientWidth + .5,
                            height: a.clientHeight
                        }
                    },
                    properties: {
                        color: {
                            set: function(t) {
                                for (var e in this._styleableDomNodes) o.set(this._styleableDomNodes[e], "color", t);
                                return t
                            }
                        },
                        font: {
                            set: function(t) {
                                for (var e in this._styleableDomNodes) this._setFont(t, this._styleableDomNodes[e]);
                                return t
                            }
                        }
                    }
                })
            })
        },
        "Ti/UI/MobileWeb": function() {
            define(["Ti/_/Evented", "Ti/_/lang", "Ti/UI/MobileWeb/NavigationGroup"], function(t, e, i) {
                return e.setObject("Ti.UI.MobileWeb", t, {
                    createNavigationGroup: function(t) {
                        return new i(t)
                    }
                })
            })
        },
        "Ti/UI/MobileWeb/NavigationGroup": function() {
            define(["Ti/_/css", "Ti/_/declare", "Ti/UI/View", "Ti/UI", "Ti/_/lang"], function(t, e, i, n, o) {
                var r = o.isDef,
                    a = n.FILL,
                    s = "TiUINavigationGroup";
                return e("Ti.UI.MobileWeb.NavigationGroup", i, {
                    constructor: function(e) {
                        var i = this,
                            o = i.__values__.constants.window = e && e.window,
                            r = i._navBarContainer = n.createView({
                                height: 50,
                                width: n.FILL,
                                layout: n._LAYOUT_CONSTRAINING_HORIZONTAL
                            });
                        t.add(r.domNode, s), i.layout = n._LAYOUT_CONSTRAINING_VERTICAL, r.add(i._leftContainer = n.createView({
                            width: n.SIZE,
                            height: "100%",
                            left: 5,
                            right: 5
                        })), r.add(i._centerContainer = n.createView({
                            width: n.FILL,
                            height: "100%"
                        })), r.add(i._rightContainer = n.createView({
                            width: n.SIZE,
                            height: "100%",
                            left: 5,
                            right: 5
                        })), i._add(r), i._add(i._contentContainer = n.createView({
                            width: a,
                            height: a
                        })), this.navBarAtTop = !0, r._getBorderFromCSS(), i._windows = [], o && i.open(o)
                    },
                    _defaultWidth: a,
                    _defaultHeight: a,
                    _updateNavBar: function() {
                        var t, e, i, o = this,
                            r = o._windows,
                            a = r.length,
                            s = r[a - 1],
                            u = this._navBarContainer,
                            c = o._leftContainer,
                            d = o._centerContainer,
                            h = o._rightContainer;
                        s && (i = s.rightNavButton, s.leftNavButton ? t = s.leftNavButton : (o._backButton || (o._backButton = n.createButton({
                            title: "Back"
                        }), require.on(o._backButton, "singletap", function() {
                            o.close(r[r.length - 1])
                        })), a > 1 && (t = o._backButton)), c._children[0] !== t && (c._removeAllChildren(), t && c._add(t)), h._children[0] !== i && (h._removeAllChildren(), i && h._add(i)), u.backgroundColor = s.barColor, u.backgroundImage = s.barImage, u.opacity = s.translucent ? .5 : 1, u.height = s.navBarHidden && s.modal ? 0 : 50, e = s.titleControl ? s.titleControl : s.titleImage ? s._titleImageView || (s._titleImageView = n.createImageView({
                            image: s.titleImage
                        })) : s._titleControl || (s._titleControl = n.createLabel({
                            text: s._getTitle() || this._tab && this._tab._getTitle() || "",
                            width: "100%",
                            height: "100%",
                            textAlign: n.TEXT_ALIGNMENT_CENTER
                        })), d._children[0] !== e && (d._removeAllChildren(), e && d._add(e)))
                    },
                    _getTopWindow: function() {
                        var t = this._windows,
                            e = t.length;
                        return e ? t[t.length - 1] : null
                    },
                    open: function(t) {
                        if (!t._opened) {
                            var e = this._windows,
                                i = this._tab;
                            t._navGroup = this, !r(t.backgroundColor) && !r(t.backgroundImage) && (t.backgroundColor = "#fff"), ~(e.length - 1) && e[e.length - 1].fireEvent("blur"), i && (t.tabGroup = (t.tab = i)._tabGroup), e.push(t), this._contentContainer._add(t), this._updateNavBar(), t._opened || t.fireEvent("open"), t._opened = 1, t.fireEvent("focus")
                        }
                    },
                    close: function(t) {
                        var e = this._windows,
                            i = e.indexOf(t),
                            n = this;
                        t._navGroup = void 0, i > 0 && (e.splice(i, 1), t.fireEvent("blur"), n._contentContainer.remove(t), t.fireEvent("close"), t._opened = 0, this._updateNavBar(), e[e.length - 1].fireEvent("focus"))
                    },
                    _reset: function() {
                        for (var t, e = this._windows, i = e.length - 1, n = i;;) {
                            if (t = e[i], !i) break;
                            i-- === n && t.fireEvent("blur"), this._contentContainer.remove(t), t.fireEvent("close"), t._opened = 0
                        }
                        e.splice(1), this._updateNavBar(), t.fireEvent("focus")
                    },
                    constants: {
                        window: void 0,
                        bubbleParent: !1
                    },
                    properties: {
                        navBarAtTop: {
                            set: function(e, i) {
                                if (e !== i) {
                                    var n = this._navBarContainer,
                                        o = n.domNode;
                                    this._remove(n), this._insertAt(n, e ? 0 : 1), t.remove(o, s + (e ? "Top" : "Bottom")), t.add(o, s + (e ? "Bottom" : "Top"))
                                }
                                return e
                            }
                        }
                    }
                })
            })
        },
        "Ti/UI/OptionDialog": function() {
            define(["Ti/_/declare", "Ti/_/lang", "Ti/_/Evented", "Ti/Locale", "Ti/UI", "Ti/_/css"], function(t, e, i, n, o, r) {
                return t("Ti.UI.OptionDialog", i, {
                    show: function() {
                        var t = this._optionsWindow = o.createWindow(),
                            i = o.createView({
                                backgroundColor: "black",
                                opacity: 0,
                                left: 0,
                                top: 0,
                                right: 0,
                                bottom: 0
                            }),
                            a = o.createView({
                                width: "100%",
                                height: o.SIZE,
                                bottom: 0,
                                backgroundColor: "white",
                                layout: o._LAYOUT_CONSTRAINING_VERTICAL,
                                opacity: 0
                            });
                        t._add(i), t._add(a), a._add(o.createLabel({
                            text: n._getString(this.titleid, this.title),
                            font: {
                                fontWeight: "bold"
                            },
                            left: 5,
                            right: 5,
                            top: 5,
                            height: o.SIZE,
                            textAlign: o.TEXT_ALIGNMENT_CENTER
                        })), require.is(this.options, "Array") && this.options.forEach(function(i, n, s) {
                            var u = o.createButton({
                                left: 5,
                                right: 5,
                                top: 5,
                                bottom: n === s.length - 1 ? 5 : 0,
                                height: o.SIZE,
                                title: i,
                                index: n
                            });
                            n === this.destructive ? r.add(u.domNode, "TiUIElementGradientDestructive") : n === this.cancel && r.add(u.domNode, "TiUIElementGradientCancel"), a._add(u), u.addEventListener("singletap", e.hitch(this, function() {
                                t.close(), this._optionsWindow = void 0, this.fireEvent("click", {
                                    index: n,
                                    cancel: this.cancel,
                                    destructive: this.destructive
                                })
                            }))
                        }, this), a.addEventListener("postlayout", function() {
                            setTimeout(function() {
                                a.animate({
                                    bottom: -a._measuredHeight,
                                    opacity: 1,
                                    duration: 0
                                }), i.animate({
                                    opacity: .5,
                                    duration: 200
                                }, function() {
                                    a.animate({
                                        bottom: 0,
                                        duration: 200
                                    })
                                })
                            }, 0)
                        }), t.open()
                    },
                    properties: {
                        cancel: -1,
                        destructive: -1,
                        options: void 0,
                        title: void 0,
                        titleid: void 0
                    }
                })
            })
        },
        "Ti/UI/Picker": function() {
            define(["Ti/_/declare", "Ti/_/event", "Ti/_/has", "Ti/UI/View", "Ti/_/UI/Widget", "Ti/UI", "Ti/_/lang", "Ti/_/dom", "Ti/_/ready"], function(t, e, i, n, o, r, a, s, u) {
                var c = require.is,
                    d = 6,
                    h = s.unitize(d),
                    l = {},
                    _ = require.on,
                    f = t(o, {
                        constructor: function() {
                            function t() {
                                e !== n.value && (e = n.value, o.fireEvent("change", {
                                    value: n.valueAsDate
                                }))
                            }
                            var e, n = this._input = s.create("input", {
                                    style: {
                                        left: h,
                                        top: h,
                                        right: h,
                                        bottom: h,
                                        position: "absolute"
                                    }
                                }, this.domNode),
                                o = this;
                            o._handles = [_(n, i("touch") ? "touchend" : "click", t), _(n, "keyup", t)]
                        },
                        destroy: function() {
                            e.off(this._handles), o.prototype.destroy.apply(this, arguments)
                        },
                        _getContentSize: function() {
                            return l[this.type]
                        },
                        properties: {
                            type: {
                                set: function(t) {
                                    return this._input.type = t
                                }
                            },
                            min: {
                                set: function(t) {
                                    return this._input.min = a.val(t, ""), t
                                }
                            },
                            max: {
                                set: function(t) {
                                    return this._input.max = a.val(t, ""), t
                                }
                            },
                            value: {
                                set: function(t) {
                                    try {
                                        this._input.valueAsDate = t
                                    } catch (e) {}
                                }
                            }
                        }
                    });
                return u(function() {
                    var t = s.create("input", {
                        style: {
                            height: r.SIZE,
                            width: r.SIZE
                        }
                    }, document.body);
                    ["Date", "Time", "DateTime"].forEach(function(e) {
                        try {
                            t.type = e
                        } catch (i) {}
                        l[e] = {
                            width: t.clientWidth + 2 * d,
                            height: t.clientHeight + 2 * d
                        }
                    }), s.detach(t)
                }), t("Ti.UI.Picker", n, {
                    constructor: function() {
                        this.layout = "constrainingHorizontal", this._columns = [], this._getBorderFromCSS()
                    },
                    _currentColumn: null,
                    _addColumn: function(t) {
                        this._columns.push(t), t._parentPicker = this;
                        for (var e = 0, i = this._columns.length, n = this.width === r.SIZE ? r.SIZE : 100 / i + "%", o = this.height === r.SIZE ? r.SIZE : "100%"; i > e; e++) t = this._columns[e], t.width = n, t.height = o, t._setCorners(0 === e, e === i - 1, h);
                        t._pickerChangeEventListener = a.hitch(this, function(t) {
                            var e = {
                                column: t.column,
                                columnIndex: this._columns.indexOf(t.column),
                                row: t.row,
                                rowIndex: t.rowIndex
                            };
                            if (this.type === r.PICKER_TYPE_PLAIN) {
                                var i = [];
                                for (var n in this._columns) {
                                    var o = this._columns[n].selectedRow;
                                    o && i.push(o.title)
                                }
                                e.selectedValue = i
                            }
                            this.fireEvent("change", e)
                        }), t.addEventListener("change", t._pickerChangeEventListener), this._add(t), this._publish(t)
                    },
                    _updateColumnHeights: function() {
                        var t, e = 0;
                        for (t in this._columns) e = Math.max(e, this._columns[t]._getTallestRowHeight());
                        for (t in this._columns) this._columns[t]._setTallestRowHeight(e)
                    },
                    _defaultWidth: r.SIZE,
                    _defaultHeight: r.SIZE,
                    add: function(t) {
                        if (c(t, "Array"))
                            for (var e in t) this.add(t[e]);
                        else a.isDef(t.declaredClass) && ("Ti.UI.PickerColumn" === t.declaredClass ? this._addColumn(t) : "Ti.UI.PickerRow" === t.declaredClass && (null === this._currentColumn && this._addColumn(this._currentColumn = r.createPickerColumn()), this._currentColumn.addRow(t)))
                    },
                    destroy: function() {
                        this._dateTimeInput && this._dateTimeInput.destroy(), o.prototype.destroy.apply(this, arguments)
                    },
                    getSelectedRow: function(t) {
                        var e = this._columns[t];
                        return e && e.selectedRow
                    },
                    setSelectedRow: function(t, e) {
                        var i = this._columns[t];
                        i && (i.selectedRow = i.rows[e])
                    },
                    properties: {
                        columns: {
                            get: function() {
                                return this._columns
                            },
                            set: function(t) {
                                this._removeAllChildren();
                                for (var e in this._columns) {
                                    var i = this._columns[e];
                                    i.removeEventListener(i._pickerChangeEventListener), i._parentPicker = void 0
                                }
                                this._columns = [], t && this.add(t)
                            }
                        },
                        maxDate: {
                            set: function(t) {
                                return this._dateTimeInput && (this._dateTimeInput.max = t), t
                            }
                        },
                        minDate: {
                            set: function(t) {
                                return this._dateTimeInput && (this._dateTimeInput.min = t), t
                            }
                        },
                        type: {
                            set: function(t, e) {
                                function i(t) {
                                    var e = n._dateTimeInput = new f({
                                        type: t,
                                        width: r.INHERIT,
                                        height: r.INHERIT
                                    });
                                    e.addEventListener("change", function(t) {
                                        n.__values__.properties.value = t.value, n.fireEvent("change", t)
                                    }), e.min = n.min, e.max = n.max, n._add(e)
                                }
                                var n = this;
                                if (t !== e) switch (this.columns = void 0, this._dateTimeInput = null, t) {
                                    case r.PICKER_TYPE_DATE:
                                        i("Date");
                                        break;
                                    case r.PICKER_TYPE_TIME:
                                        i("Time");
                                        break;
                                    case r.PICKER_TYPE_DATE_AND_TIME:
                                        i("DateTime")
                                }
                                return t
                            },
                            value: r.PICKER_TYPE_PLAIN
                        },
                        value: {
                            set: function(t) {
                                return this._dateTimeInput && (this._dateTimeInput.value = t), t
                            }
                        }
                    }
                })
            })
        },
        "Ti/UI/PickerColumn": function() {
            define(["Ti/_/declare", "Ti/_/UI/FontWidget", "Ti/_/dom", "Ti/UI", "Ti/_/has", "Ti/_/style", "Ti/_/lang"], function(t, e, i, n, o, r, a) {
                var s = r.set,
                    u = 15,
                    c = require.on;
                return t("Ti.UI.PickerColumn", e, {
                    constructor: function() {
                        var t = this,
                            e = o("touch") ? "touchend" : "click",
                            r = t.domNode,
                            a = t.__values__.constants.rows = [],
                            s = t._upArrow = i.create("div", {
                                className: "TiUIElementGradient",
                                style: {
                                    textAlign: "center",
                                    position: "absolute",
                                    top: 0,
                                    height: "40px",
                                    left: 0,
                                    right: 0,
                                    borderBottom: "1px solid #666",
                                    fontSize: "28px",
                                    cursor: "pointer"
                                },
                                innerHTML: "∧"
                            }, r),
                            u = t._titleContainer = i.create("div", {
                                style: {
                                    position: "absolute",
                                    top: "50%",
                                    height: "1em",
                                    width: "100%",
                                    marginTop: "-0.5em",
                                    textAlign: "center"
                                }
                            }, r),
                            d = i.create("div", {
                                style: {
                                    position: "absolute",
                                    top: "40px",
                                    bottom: "40px",
                                    width: "100%"
                                }
                            }, r),
                            h = t._downArrow = i.create("div", {
                                className: "TiUIElementGradient",
                                innerHTML: "∨",
                                style: {
                                    textAlign: "center",
                                    position: "absolute",
                                    bottom: "0px",
                                    height: "40px",
                                    width: "100%",
                                    borderTop: "1px solid #666",
                                    fontSize: "28px",
                                    cursor: "pointer"
                                }
                            }, r);
                        t._addStyleableDomNode(u), this._handles = [c(s, e, function() {
                            var e = a.indexOf(t.selectedRow);
                            t.selectedRow = e > 0 ? a[e - 1] : a[a.length - 1]
                        }), c(d, e, function() {
                            var e = n.createWindow(),
                                i = n.createView({
                                    backgroundColor: "#000",
                                    opacity: 0,
                                    left: 0,
                                    top: 0,
                                    right: 0,
                                    bottom: 0
                                }),
                                o = n.createView({
                                    width: "75%",
                                    height: n.SIZE,
                                    backgroundColor: "#fff",
                                    layout: n._LAYOUT_CONSTRAINING_VERTICAL,
                                    borderRadius: 3,
                                    opacity: 0
                                }),
                                r = 0,
                                s = 0,
                                u = a.map(function(e) {
                                    var i = e === t.selectedRow;
                                    return i && (r = parseInt(s++)), {
                                        title: e.title,
                                        hasCheck: i
                                    }
                                }),
                                c = n.createTableView({
                                    left: 5,
                                    right: 5,
                                    top: 5,
                                    height: u.length < 10 ? n.SIZE : "70%",
                                    data: u
                                }),
                                d = n.createButton({
                                    left: 5,
                                    top: 5,
                                    right: 5,
                                    title: "Cancel"
                                });
                            c.addEventListener("singletap", function(i) {
                                i.index in a && (t.selectedRow = a[i.index]), e.close()
                            }), d.addEventListener("singletap", function() {
                                e.close()
                            }), e._add(i), e._add(o), o._add(c), o._add(d), o._add(n.createView({
                                height: "5px"
                            })), e.open(), setTimeout(function() {
                                i.animate({
                                    opacity: .5,
                                    duration: 200
                                }, function() {
                                    o.animate({
                                        opacity: 1,
                                        duration: 200
                                    }, function() {
                                        c.scrollToIndex(r)
                                    })
                                })
                            }, 30)
                        }), c(h, e, function() {
                            var e = a.indexOf(t.selectedRow);
                            t.selectedRow = e < a.length - 1 ? a[e + 1] : a[0]
                        })]
                    },
                    destroy: function() {
                        event.off(this._handles), e.prototype.destroy.apply(this, arguments)
                    },
                    _setCorners: function(t, e, i) {
                        s(this._upArrow, {
                            borderTopLeftRadius: t ? i : "0px",
                            borderTopRightRadius: e ? i : "0px"
                        }), s(this._downArrow, {
                            borderBottomLeftRadius: t ? i : "0px",
                            borderBottomRightRadius: e ? i : "0px"
                        }), this.borderWidth = [0, e ? 0 : 1, 0, 0], this.borderColor = "#666"
                    },
                    _defaultWidth: n.SIZE,
                    _defaultHeight: n.SIZE,
                    _preLayout: function() {
                        return this._updateContentWidth(), this._parentPicker && this._parentPicker._updateColumnHeights(), !0
                    },
                    _getContentSize: function() {
                        var t = this._titleContainer;
                        return text = t.innerHTML, {
                            width: Math.max(this._widestRowWidth + u, 100),
                            height: this._tallestRowHeight + u + this._upArrow.clientHeight + this._downArrow.clientHeight
                        }
                    },
                    _widestRowWidth: 0,
                    _tallestRowHeight: 0,
                    _updateContentWidth: function() {
                        for (var t, e = 0, i = 0, n = this.rows.length; n > i;) t = this.rows[i++], e = Math.max(e, t._measureText(t.title, t.domNode).width);
                        this._widestRowWidth !== e && (this._widestRowWidth = e)
                    },
                    _getTallestRowHeight: function() {
                        for (var t = 0, e = 0, i = this.rows.length; i > e; e++) {
                            var n = this.rows[e];
                            t = Math.max(t, n._measureText(n.title, n.domNode).height)
                        }
                        return t
                    },
                    _setTallestRowHeight: function(t) {
                        this._tallestRowHeight !== t && (this._tallestRowHeight = t, this._triggerLayout())
                    },
                    addRow: function(t) {
                        this.rows.push(t), t._parentColumn = this, this._updateContentWidth(), this._parentPicker && this._parentPicker._updateColumnHeights(), this.selectedRow || (this.selectedRow = t), this._publish(t)
                    },
                    removeRow: function(t) {
                        var e = this.rows.indexOf(t); - 1 !== e && (this.rows.splice(e, 1), t._parentColumn = void 0, this._updateContentWidth(), this._parentPicker && this._parentPicker._updateColumnHeights(), this.selectedRow === t && (this.selectedRow = this.rows[0])), this._unpublish(t)
                    },
                    constants: {
                        rowCount: {
                            get: function() {
                                return this.rows.length
                            }
                        },
                        rows: void 0
                    },
                    properties: {
                        selectedRow: {
                            set: function(t) {
                                if (t) {
                                    var e = this.rows.indexOf(t);
                                    if (-1 === e) return;
                                    this.font = t.font, this.color = a.val(t.color, ""), this._titleContainer.innerHTML = t.title, this._hasSizeDimensions() && this._triggerLayout()
                                } else this.font = void 0, this.color = void 0, this._titleContainer.innerHTML = "", this._hasSizeDimensions() && this._triggerLayout();
                                return t
                            },
                            post: function(t) {
                                this.fireEvent("change", {
                                    column: this,
                                    rowIndex: this.rows.indexOf(t),
                                    row: t,
                                    value: t && t.title
                                })
                            }
                        }
                    }
                })
            })
        },
        "Ti/UI/PickerRow": function() {
            define(["Ti/_/declare", "Ti/_/UI/FontWidget", "Ti/UI"], function(t, e, i) {
                return t("Ti.UI.PickerRow", e, {
                    constructor: function() {
                        this._addStyleableDomNode(this.domNode)
                    },
                    _defaultWidth: i.SIZE,
                    _defaultHeight: i.SIZE,
                    properties: {
                        title: {
                            post: function() {
                                this._parentColumn && this._parentColumn._updateContentDimensions()
                            }
                        }
                    }
                })
            })
        },
        "Ti/UI/ProgressBar": function() {
            define(["Ti/_/declare", "Ti/_/UI/Widget", "Ti/_/UI/FontWidget", "Ti/_/lang", "Ti/_/dom", "Ti/_/style", "Ti/UI"], function(t, e, i, n, o, r, a) {
                var s = r.set,
                    u = t(e, {
                        constructor: function() {
                            this._contentContainer = o.create("div", {
                                className: "TiUIProgressBarContainer",
                                style: {
                                    pointerEvents: "none",
                                    left: 0,
                                    right: 0,
                                    top: 0,
                                    bottom: 0,
                                    position: "absolute",
                                    overflow: "hidden"
                                }
                            }, this.domNode), this._indicator = o.create("div", {
                                className: "TiUIProgressBarIndicator",
                                style: {
                                    pointerEvents: "none",
                                    width: "0%",
                                    height: "100%"
                                }
                            }, this._contentContainer)
                        },
                        _getContentSize: function() {
                            return {
                                width: 200,
                                height: 25
                            }
                        },
                        _setPosition: function(t) {
                            s(this._indicator, "width", Math.round(100 * t) + "%")
                        }
                    });
                return t("Ti.UI.ProgressBar", e, {
                    constructor: function() {
                        this._add(this._contentContainer = a.createView({
                            width: a.INHERIT,
                            height: a.INHERIT,
                            left: 0,
                            top: 0,
                            layout: a._LAYOUT_CONSTRAINING_VERTICAL
                        })), this._contentContainer._layout._defaultHorizontalLayout = "start", this._contentContainer._add(this._message = a.createLabel()), this._contentContainer._add(this._progressBar = new u({
                            width: a.INHERIT,
                            height: a.INHERIT
                        }))
                    },
                    _updateSize: function() {
                        this._progressBar._setPosition((this.value - this.min) / (this.max - this.min))
                    },
                    _defaultWidth: a.SIZE,
                    _defaultHeight: a.SIZE,
                    properties: {
                        color: {
                            set: function(t) {
                                return this._message.color = t, t
                            }
                        },
                        font: {
                            set: function(t) {
                                return this._message.font = t, t
                            }
                        },
                        message: {
                            set: function(t) {
                                return this._message.text = t, t
                            }
                        },
                        min: {
                            set: function(t) {
                                return Math.min(t, this.max)
                            },
                            post: "_updateSize",
                            value: 0
                        },
                        max: {
                            set: function(t) {
                                return Math.max(t, this.min)
                            },
                            post: "_updateSize",
                            value: 100
                        },
                        value: {
                            set: function(t) {
                                return Math.min(Math.max(t, this.min), this.max)
                            },
                            post: "_updateSize",
                            value: 0
                        }
                    }
                })
            })
        },
        "Ti/UI/ScrollView": function() {
            define(["Ti/_/declare", "Ti/_/UI/KineticScrollView", "Ti/_/style", "Ti/_/lang", "Ti/UI"], function(t, e, i, n, o) {
                var r = n.isDef,
                    a = .001;
                return t("Ti.UI.ScrollView", e, {
                    constructor: function() {
                        var t;
                        this._initKineticScrollView(t = o.createView({
                            width: o.SIZE,
                            height: o.SIZE,
                            _minWidth: "100%",
                            _minHeight: "100%",
                            left: 0,
                            top: 0
                        }), "both", "both", 1)
                    },
                    _handleMouseWheel: function() {
                        this._isScrollBarActive && this.fireEvent("scroll", {
                            x: -this._currentTranslationX,
                            y: -this._currentTranslationY,
                            dragging: !1,
                            decelerating: !1
                        })
                    },
                    _handleDragStart: function() {
                        this.fireEvent("dragStart")
                    },
                    _handleDrag: function() {
                        this.fireEvent("scroll", {
                            x: -this._currentTranslationX,
                            y: -this._currentTranslationY,
                            dragging: !0,
                            decelerating: !1
                        })
                    },
                    _handleDragEnd: function(t, e, i) {
                        if (r(e)) {
                            var n = this,
                                s = Math.sqrt(e * e + i * i),
                                u = s * s / (1.724 * a),
                                c = s / a,
                                d = Math.atan(Math.abs(i / e)),
                                h = u * Math.cos(d) * (0 > e ? -1 : 1),
                                l = u * Math.sin(d) * (0 > i ? -1 : 1),
                                _ = Math.min(0, Math.max(n._minTranslationX, n._currentTranslationX + h)),
                                f = Math.min(0, Math.max(n._minTranslationY, n._currentTranslationY + l));
                            n.fireEvent("dragEnd", {
                                decelerate: !0
                            }), n._animateToPosition(_, f, c, o.ANIMATION_CURVE_EASE_OUT, function() {
                                n._setTranslation(_, f), n._endScrollBars(), n.fireEvent("scrollEnd")
                            })
                        }
                    },
                    scrollTo: function(t, e) {
                        this._setTranslation(null !== t ? -t : this._currentTranslationX, null !== e ? -e : this._currentTranslationX)
                    },
                    _defaultWidth: o.FILL,
                    _defaultHeight: o.FILL,
                    _getContentOffset: function() {
                        return this.contentOffset
                    },
                    _preLayout: function() {
                        var t = this._contentContainer.layout === this.layout;
                        return this._contentContainer.layout = this.layout, t
                    },
                    add: function(t) {
                        this._contentContainer._add(t), this._publish(t)
                    },
                    remove: function(t) {
                        this._contentContainer.remove(t), this._unpublish(t)
                    },
                    properties: {
                        contentHeight: {
                            get: function() {
                                return this._contentContainer.height
                            },
                            set: function(t) {
                                return this._contentContainer.height = t, t
                            }
                        },
                        contentOffset: {
                            get: function() {
                                return {
                                    x: -this._currentTranslationX,
                                    y: -this._currentTranslationY
                                }
                            },
                            set: function(t) {
                                return this._setTranslation(r(t.x) ? -t.x : this._currentTranslationX, r(t.y) ? -t.y : this._currentTranslationY), t
                            }
                        },
                        contentWidth: {
                            get: function() {
                                return this._contentContainer.width
                            },
                            set: function(t) {
                                return this._contentContainer.width = t, t
                            }
                        },
                        disableBounce: !1,
                        horizontalBounce: {
                            set: function(t) {
                                return this._horizontalElastic = t
                            },
                            value: !0
                        },
                        layout: {
                            set: function(t) {
                                return this._contentContainer.layout = t
                            },
                            value: "composite"
                        },
                        showHorizontalScrollIndicator: {
                            set: function(t, e) {
                                return t !== e && (t ? this._createHorizontalScrollBar() : this._destroyHorizontalScrollBar()), t
                            },
                            value: !0
                        },
                        showVerticalScrollIndicator: {
                            set: function(t, e) {
                                return t !== e && (t ? this._createVerticalScrollBar() : this._destroyVerticalScrollBar()), t
                            },
                            value: !0
                        },
                        verticalBounce: {
                            set: function(t) {
                                return this._verticalElastic = t
                            },
                            value: !0
                        }
                    }
                })
            })
        },
        "Ti/_/UI/KineticScrollView": function() {
            define(["Ti/_/browser", "Ti/_/declare", "Ti/UI/View", "Ti/_/lang", "Ti/_/dom", "Ti/_/style", "Ti/UI", "Ti/_/event"], function(t, e, i, n, o, r, a) {
                var s = (r.set, o.unitize),
                    u = o.calculateDistance,
                    c = require.on,
                    d = 100,
                    h = 100;
                return e("Ti._.UI.KineticScrollView", i, {
                    _initKineticScrollView: function(t, e, i, n) {
                        function o() {
                            m = Date.now(), T = m - p, p = m, y++ ? (w = (w * (y - 1) + y * (l - v) / T) / 2 / y, I = (I * (y - 1) + y * (_ - b) / T) / 2 / y) : (w = (l - d) / T, I = (_ - h) / T)
                        }

                        function r() {
                            f = x._minTranslationX = Math.min(0, x._measuredWidth - x._borderLeftWidth - x._borderRightWidth - x._contentContainer._measuredWidth), g = x._minTranslationY = Math.min(0, x._measuredHeight - x._borderTopWidth - x._borderBottomWidth - x._contentContainer._measuredHeight)
                        }
                        var s, d, h, l, _, f, g, p, m, T, v, b, y, w, I, E, x = this;
                        x._currentTranslationX = 0, x._currentTranslationY = 0, x._horizontalElastic = "horizontal" === e || "both" === e, x._verticalElastic = "vertical" === e || "both" === e, x._kineticTransform = a.create2DMatrix(), ("horizontal" === i || "both" === i) && x._createHorizontalScrollBar(), ("vertical" === i || "both" === i) && x._createVerticalScrollBar(), x._add(x._contentContainer = t), s = t.domNode, c(x._contentContainer, "postlayout", function() {
                            r(), x._setTranslation(x._currentTranslationX, x._currentTranslationY)
                        }), c(x, "draggingstart", function(e) {
                            if (x.scrollingEnabled) {
                                x._cancelAnimations(), w = void 0, I = void 0, d = x._currentTranslationX, h = x._currentTranslationY, y = 0, p = (new Date).getTime(), r();
                                var i = x._measuredWidth,
                                    n = x._measuredHeight,
                                    o = t._measuredWidth,
                                    a = t._measuredHeight;
                                x._startScrollBars({
                                    x: -x._currentTranslationX / (o - i),
                                    y: -x._currentTranslationY / (a - n)
                                }, {
                                    x: i / o,
                                    y: n / a
                                }), x._handleDragStart && x._handleDragStart(e)
                            }
                        }), c(x, "dragging", function(t) {
                            x.scrollingEnabled && (l = d + t.distanceX, _ = h + t.distanceY, o(), x._setTranslation(v = l, b = _), x._handleDrag && x._handleDrag(t))
                        }), c(x, "draggingcancel", function(t) {
                            x.scrollingEnabled && (x._animateToPosition(d, h, 400 + .3 * u(d, h, x._currentTranslationX, x._currentTranslationY), a.ANIMATION_CURVE_EASE_IN_OUT, function() {
                                x._handleDragCancel && x._handleDragCancel(t)
                            }), x._endScrollBars(), x._handleDragCancel && x._handleDragCancel(t))
                        }), c(x, "draggingend", function(t) {
                            if (x.scrollingEnabled) {
                                l = d + t.distanceX, _ = h + t.distanceY, o();
                                var e, i = x._currentTranslationX,
                                    n = x._currentTranslationY;
                                i > 0 ? (i = 0, e = 1) : f > i && (i = f, e = 1), n > 0 ? (n = 0, e = 1) : g > n && (n = g, e = 1), e ? x._animateToPosition(i, n, 200, a.ANIMATION_CURVE_EASE_OUT, function() {
                                    x._handleDragEnd && x._handleDragEnd(t), x._endScrollBars()
                                }) : x._handleDragEnd && x._handleDragEnd(t, w, I)
                            }
                        }), n && (this._disconnectMouseWheelEvent = c(x.domNode, "mousewheel", function(e) {
                            if (x.scrollingEnabled) {
                                x._cancelAnimations();
                                var i = t._measuredWidth - x._measuredWidth,
                                    n = t._measuredHeight - x._measuredHeight,
                                    o = -x._currentTranslationX,
                                    a = -x._currentTranslationY;
                                r(), x._startScrollBars({
                                    x: o / i,
                                    y: a / n
                                }, {
                                    x: x._measuredWidth / t._measuredWidth,
                                    y: x._measuredHeight / t._measuredHeight
                                }), x._setTranslation(Math.min(0, Math.max(x._minTranslationX, -o + e.wheelDeltaX)), Math.min(0, Math.max(x._minTranslationY, -a + e.wheelDeltaY))), clearTimeout(E), E = setTimeout(function() {
                                    x._endScrollBars()
                                }, 500), x._handleMouseWheel && x._handleMouseWheel()
                            }
                        }))
                    },
                    destroy: function() {
                        this._disconnectMouseWheelEvent && this._disconnectMouseWheelEvent(), i.prototype.destroy.apply(this, arguments)
                    },
                    _animateToPosition: function(t, e, i, n, o) {
                        var r, a = this,
                            s = a._contentContainer,
                            c = (s.domNode, a._horizontalScrollBar),
                            d = a._verticalScrollBar;
                        u(a._currentTranslationX, a._currentTranslationY, t, e) < 1 ? (a._setTranslation(t, e), o()) : (r = a._setTranslation(t, e, 1), a._contentAnimation = s.animate({
                            transform: a._kineticTransform.translate(r.translationX, r.translationY),
                            duration: Math.round(i),
                            curve: n
                        }, o), a._horizontalScrollBarAnimation = c && c.animate({
                            transform: this._kineticTransform.translate(Math.max(0, Math.min(1, -r.translationX / (s._measuredWidth - a._measuredWidth))) * (this._measuredWidth - this._scrollBarWidth), 0),
                            duration: i,
                            curve: n
                        }), a._verticalScrollBarAnimation = d && d.animate({
                            transform: this._kineticTransform.translate(0, Math.max(0, Math.min(1, -r.translationY / (s._measuredHeight - a._measuredHeight))) * (this._measuredHeight - this._scrollBarHeight)),
                            duration: i,
                            curve: n
                        }))
                    },
                    _setTranslation: function(t, e, i) {
                        function n(t) {
                            return d * (-1 / (t / h + 1) + 1)
                        }
                        var o = this._contentContainer,
                            r = this._minTranslationX,
                            a = this._minTranslationY,
                            s = this._horizontalElastic && !this.disableBounce && this._measuredWidth < o._measuredWidth,
                            u = this._verticalElastic && !this.disableBounce && this._measuredHeight < o._measuredHeight,
                            c = this._measuredWidth,
                            l = this._measuredHeight,
                            _ = o._measuredWidth,
                            f = o._measuredHeight;
                        if (t > 0 ? t = s ? n(t) : 0 : r > t && (t = s ? r - n(r - t) : r), e > 0 ? e = u ? n(e) : 0 : a > e && (e = u ? a - n(a - e) : a), i || this._contentContainer.animate({
                                transform: this._kineticTransform.translate(this._currentTranslationX = t, this._currentTranslationY = e)
                            }), this._isScrollBarActive) {
                            var g = this._horizontalScrollBar,
                                p = this._verticalScrollBar;
                            g && g.animate({
                                transform: this._kineticTransform.translate(Math.max(0, Math.min(1, -t / (_ - c))) * (this._measuredWidth - this._scrollBarWidth), 0)
                            }), p && p.animate({
                                transform: this._kineticTransform.translate(0, Math.max(0, Math.min(1, -e / (f - l))) * (this._measuredHeight - this._scrollBarHeight))
                            })
                        }
                        return {
                            translationX: t,
                            translationY: e
                        }
                    },
                    _cancelAnimations: function() {
                        this._horizontalScrollBarAnimation && this._horizontalScrollBarAnimation.cancel(), this._verticalScrollBarAnimation && this._verticalScrollBarAnimation.cancel(), this._contentAnimation && this._contentAnimation.cancel()
                    },
                    _createHorizontalScrollBar: function() {
                        this._horizontalScrollBar || this._add(this._horizontalScrollBar = a.createView({
                            zIndex: 2147483647,
                            backgroundColor: "#555",
                            borderRadius: 3,
                            width: 0,
                            height: 6,
                            left: 0,
                            bottom: 0,
                            opacity: 0
                        }))
                    },
                    _createVerticalScrollBar: function() {
                        this._verticalScrollBar || this._add(this._verticalScrollBar = a.createView({
                            zIndex: 2147483647,
                            backgroundColor: "#555",
                            borderRadius: 3,
                            width: 6,
                            height: 0,
                            right: 0,
                            top: 0,
                            opacity: 0
                        }))
                    },
                    _destroyHorizontalScrollBar: function() {
                        this._horizontalScrollBarAnimation && this._horizontalScrollBarAnimation.cancel(), this._remove(this._horizontalScrollBar)
                    },
                    _destroyVerticalScrollBar: function() {
                        this._verticalScrollBarAnimation && this._verticalScrollBarAnimation.cancel(), this._remove(this._verticalScrollBar)
                    },
                    _startScrollBars: function(t, e) {
                        if (this._horizontalScrollBar && e.x < 1 && e.x > 0) {
                            var i = this._measuredWidth,
                                n = this._scrollBarWidth = Math.round(Math.max(10, i * e.x)),
                                o = this._horizontalScrollBar;
                            o.opacity = .5, o.domNode.style.width = s(n), o.animate({
                                transform: this._kineticTransform.translate(Math.max(0, Math.min(1, t.x)) * (i - n), 0)
                            }), this._isScrollBarActive = 1
                        }
                        if (this._verticalScrollBar && e.y < 1 && e.y > 0) {
                            var r = this._measuredHeight,
                                a = this._scrollBarHeight = Math.round(Math.max(10, r * e.y)),
                                u = this._verticalScrollBar;
                            u.opacity = .5, u.domNode.style.height = s(a), u.animate({
                                transform: this._kineticTransform.translate(0, Math.max(0, Math.min(1, t.y)) * (r - a))
                            }), this._isScrollBarActive = 1
                        }
                    },
                    _endScrollBars: function() {
                        function t(t) {
                            t && t.animate({
                                opacity: 0,
                                duration: 500
                            }, function() {
                                e._isScrollBarActive = !1
                            })
                        }
                        if (this._isScrollBarActive) {
                            var e = this,
                                i = e._horizontalScrollBar,
                                n = e._verticalScrollBar;
                            t(i), t(n)
                        }
                    },
                    properties: {
                        scrollingEnabled: !0
                    }
                })
            })
        },
        "Ti/UI/ScrollableView": function() {
            define(["Ti/_/declare", "Ti/UI/View", "Ti/_/dom", "Ti/_/has", "Ti/_/style", "Ti/UI", "Ti/_/browser"], function(t, e, i, n, o, r, a) {
                var s = o.set,
                    u = require.is,
                    c = i.unitize,
                    d = require.on,
                    h = d.once,
                    l = window,
                    _ = "webkit" == a.runtime ? "webkitTransitionEnd" : "transitionend",
                    f = n("touch"),
                    g = l.navigator.msPointerEnabled,
                    p = 200,
                    m = 10,
                    T = 25,
                    v = 1e3,
                    b = .5,
                    y = 2;
                return t("Ti.UI.ScrollableView", e, {
                    constructor: function() {
                        var t, e = this,
                            i = 0;
                        e._add(e._contentContainer = r.createView({
                            left: 0,
                            top: 0,
                            width: r.SIZE,
                            height: "100%",
                            layout: "constrainingHorizontal"
                        })), t = e._contentContainer.domNode, e._add(e._pagingControlContainer = r.createView({
                            width: "100%",
                            height: 20,
                            bottom: 0,
                            backgroundColor: "black",
                            opacity: 0,
                            touchEnabled: !1
                        })), e._pagingControlContainer._add(e._pagingControlContentContainer = r.createView({
                            width: r.SIZE,
                            height: "100%",
                            top: 0,
                            touchEnabled: !1,
                            layout: "constrainingHorizontal"
                        })), e.__values__.properties.views = [], e._viewToRemoveAfterScroll = -1, d(e, "postlayout", function() {
                            e._animating || e._setTranslation(e.currentPage * -e._measuredWidth)
                        }), d(t, g ? "MSPointerDown" : f ? "touchstart" : "mousedown", function(n) {
                            var o = n.touches ? n.touches[0].clientX : n.clientX,
                                r = o,
                                a = Date.now(),
                                u = e._measuredWidth,
                                c = function(t) {
                                    var n = e.currentPage,
                                        a = r - o + i;
                                    u = e._measuredWidth, t.preventDefault(), r = t.touches ? t.touches[0].clientX : t.clientX, e._setTranslation(n * -u + a), e.fireEvent("scroll", {
                                        currentPage: n,
                                        currentPageAsFloat: n - a / u,
                                        view: e.views[n]
                                    })
                                },
                                d = function(n) {
                                    var w = Date.now(),
                                        I = p > w - a,
                                        E = e.currentPage,
                                        x = Math.abs(o - r) > (I ? m : u / 2),
                                        N = e.__values__.properties,
                                        S = Math.abs(r - o);
                                    l.removeEventListener(g ? "MSPointerMove" : f ? "touchmove" : "mousemove", c), l.removeEventListener(g ? "MSPointerUp" : f ? "touchend" : "mouseup", d), u = e._measuredWidth, e._animating = 1, n.preventDefault(), x && (o > r ? E !== N.views.length - 1 && E++ : 0 !== E && E--, S = u - S), e._showPagingControl(E), i = r - o + i, S = Math.max(T, Math.min(v, (I ? b : y) * S)), s(t, "transition", S + "ms ease-out"), setTimeout(function() {
                                        h(t, _, function() {
                                            s(t, "transition", ""), e._animating = 0, N.currentPage = E, e._updatePagingControl(), e.fireEvent("scrollend", {
                                                currentPage: E,
                                                view: e.views[E]
                                            })
                                        }), e._setTranslation(E * -u)
                                    }, 1), e.fireEvent("dragend", {
                                        currentPage: E,
                                        view: e.views[E]
                                    })
                                };
                            e._showPagingControl(e.currentPage, 1), n.preventDefault(), i = e._animating ? i || 0 : 0, s(t, "transition", ""), e._setTranslation(e.currentPage * -u + i), e._animating = 0, l.addEventListener(g ? "MSPointerMove" : f ? "touchmove" : "mousemove", c), l.addEventListener(g ? "MSPointerUp" : f ? "touchend" : "mouseup", d), e.fireEvent("dragstart")
                        })
                    },
                    _setTranslation: function(t) {
                        s(this._contentContainer.domNode, "transform", "translatez(0) translatex(" + t + "px)")
                    },
                    _showPagingControl: function(t, e) {
                        var i = this;
                        return i.showPagingControl ? (i._pagingAnimation && i._pagingAnimation.cancel(), i._pagingAnimation = i._pagingControlContainer.animate({
                            duration: 250,
                            opacity: .75
                        }), clearInterval(i._pagingTimeout), void(!e && i.pagingControlTimeout > 0 ? i._pagingTimeout = setTimeout(function() {
                            i._pagingAnimation && i._pagingAnimation.cancel(), i._pagingAnimation = i._pagingControlContainer.animate({
                                duration: 750,
                                opacity: 0
                            }, function() {
                                i._pagingAnimation = void 0
                            })
                        }, i.pagingControlTimeout) : i._pagingAnimation = void 0)) : void(i._pagingControlContainer.opacity = 0)
                    },
                    _updatePagingControl: function() {
                        var t = this._pagingControlContentContainer,
                            e = this.views.length,
                            i = this.pagingControlHeight / 2;
                        if (e !== t._numViews || i !== t._diameter) {
                            t._numViews = e, t._diameter = i, t._removeAllChildren();
                            for (var n = 0; n < this.views.length; n++) t._add(r.createView({
                                width: i,
                                height: i,
                                left: 5,
                                right: 5,
                                backgroundColor: "#aaa",
                                borderRadius: c(i / 2)
                            }));
                            t._highlightedPage = -1
                        }
                        t._highlightedPage !== this.currentPage && (t._highlightedPage < 0 || (t._children[t._highlightedPage].backgroundColor = "#aaa"), t._children[this.currentPage].backgroundColor = "#fff", t._highlightedPage = this.currentPage)
                    },
                    addView: function(t) {
                        t && (t.width = "100%", t.height = "100%", this.views.push(t), this._contentContainer._add(t), 1 == this.views.length && (this.__values__.properties.currentPage = 0), this._updatePagingControl())
                    },
                    removeView: function(t) {
                        var e = u(t, "Number") ? t : this.views.indexOf(t);
                        0 > e || e >= this.views.length || (e == this.currentPage && 1 !== this.views.length ? (this._viewToRemoveAfterScroll = e, this.scrollToView(e == this.views.length - 1 ? --e : ++e)) : this._removeViewFromList(e))
                    },
                    _removeViewFromList: function(t) {
                        var e = this._contentContainer,
                            i = this;
                        t < this.currentPage && i.__values__.properties.currentPage--, e._remove(i.views.splice(t, 1)[0]), i.views.length || (i.__values__.properties.currentPage = -1), h(r, "postlayout", function() {
                            setTimeout(function() {
                                i._setTranslation(i.currentPage * -i._measuredWidth)
                            }, 1)
                        })
                    },
                    scrollToView: function(t, e) {
                        function i() {
                            var t = o._contentContainer,
                                i = t.domNode,
                                r = -o.views[n]._measuredLeft,
                                a = Math.max(T, Math.min(v, y * t._measuredWidth));
                            o._updatePagingControl(), o._showPagingControl(n), e ? (o._setTranslation(r), o.__values__.properties.currentPage = n) : (s(i, "transition", a + "ms ease-out"), setTimeout(function() {
                                h(i, _, function() {
                                    s(i, "transition", ""), o._animating = 0, o.__values__.properties.currentPage = n, o._updatePagingControl(), -1 !== o._viewToRemoveAfterScroll && (r += o.views[o._viewToRemoveAfterScroll]._measuredWidth, o._removeViewFromList(o._viewToRemoveAfterScroll), o._viewToRemoveAfterScroll = -1), o.fireEvent("scrollend", {
                                        currentPage: n,
                                        view: o.views[n]
                                    })
                                }), o._setTranslation(r)
                            }, 1))
                        }
                        var n = u(t, "Number") ? t : this.views.indexOf(t),
                            o = this;
                        0 > n || n >= this.views.length || n == this.currentPage || (o._contentContainer.domNode.offsetWidth ? i() : h(o, "postlayout", i))
                    },
                    _defaultWidth: r.FILL,
                    _defaultHeight: r.FILL,
                    properties: {
                        currentPage: {
                            set: function(t, e) {
                                return t >= 0 && t < this.views.length ? (this.scrollToView(t, 1), t) : e
                            },
                            value: -1
                        },
                        pagingControlColor: {
                            set: function(t) {
                                return this._pagingControlContainer.backgroundColor = t, t
                            },
                            value: "black"
                        },
                        pagingControlHeight: {
                            set: function(t) {
                                return this._pagingControlContainer.height = t, t
                            },
                            value: 20
                        },
                        pagingControlTimeout: {
                            post: function(t) {
                                t || (this._pagingControlContainer.opacity = .75)
                            },
                            value: 3e3
                        },
                        showPagingControl: !1,
                        views: {
                            set: function(t) {
                                if (u(t, "Array")) {
                                    var e, i = 0,
                                        n = t.length,
                                        o = this._contentContainer;
                                    for (o._removeAllChildren(); n > i; i++)(e = t[i]).width = "100%", e.height = "100%", o._add(e);
                                    return this.__values__.properties.currentPage = n ? 0 : -1, t
                                }
                            },
                            post: "_updatePagingControl"
                        }
                    }
                })
            })
        },
        "Ti/UI/Slider": function() {
            define(["Ti/_/declare", "Ti/_/UI/Widget", "Ti/_/dom", "Ti/_/css", "Ti/_/style", "Ti/_/lang", "Ti/UI"], function(t, e, i, n, o, r, a) {
                var s = require.on,
                    u = o.set;
                return t("Ti.UI.Slider", e, {
                    constructor: function() {
                        var t, e, n = this,
                            o = n._track = i.create("div", {
                                className: "TiUISliderTrack"
                            }, n.domNode),
                            r = n._thumb = i.create("div", {
                                className: "TiUIElementGradient TiUISliderThumb"
                            }, n.domNode);
                        s(n, "touchstart", function(i) {
                            t = i.x, e = n.value
                        }), s(n, "touchmove", function(i) {
                            n.value = (i.x - t) * (n.max - n.min) / (o.offsetWidth - r.offsetWidth) + e
                        }), s(n, "postlayout", n, "_updatePosition")
                    },
                    _constrainedUpdate: function(t) {
                        this.__values__.properties.value = this._constrainValue(t), this._updatePosition()
                    },
                    _constrainValue: function(t) {
                        return Math.min(r.val(this.maxRange, this.max), Math.max(r.val(this.minRange, this.min), t))
                    },
                    _updatePosition: function() {
                        var t = this._thumb;
                        this._thumbLocation = Math.round((this._track.offsetWidth - t.offsetWidth) * ((this.value - this.min) / (this.max - this.min))), u(t, "transform", "translateX(" + this._thumbLocation + "px)")
                    },
                    _defaultWidth: a.FILL,
                    _defaultHeight: a.SIZE,
                    _setTouchEnabled: function(t) {
                        var i = t ? "auto" : "none";
                        e.prototype._setTouchEnabled.call(this, t), u(this._track, "pointerEvents", i), u(this._thumb, "pointerEvents", i)
                    },
                    _getContentSize: function() {
                        return {
                            width: 200,
                            height: 40
                        }
                    },
                    properties: {
                        enabled: {
                            set: function(t, e) {
                                return t !== e && (n.remove(this._thumb, ["TiUIElementGradient", "TiUISliderThumbDisabled"]), n.add(this._thumb, t ? "TiUIElementGradient" : "TiUISliderThumbDisabled"), this._setTouchEnabled(t)), t
                            },
                            value: !0
                        },
                        max: {
                            set: function(t) {
                                return Math.max(this.min, t)
                            },
                            post: "_constrainedUpdate",
                            value: 1
                        },
                        maxRange: {
                            set: function(t) {
                                return Math.min(this.max, t)
                            },
                            post: "_constrainedUpdate"
                        },
                        min: {
                            set: function(t) {
                                return Math.min(this.max, t)
                            },
                            post: "_constrainedUpdate",
                            value: 0
                        },
                        minRange: {
                            set: function(t) {
                                return Math.max(this.min, t)
                            },
                            post: "_constrainedUpdate"
                        },
                        value: {
                            set: function(t) {
                                return this._constrainValue(t)
                            },
                            post: function(t, e) {
                                t !== e && this.fireEvent("change", {
                                    value: t,
                                    thumbOffset: {
                                        x: 0,
                                        y: 0
                                    },
                                    thumbSize: {
                                        height: 0,
                                        width: 0
                                    }
                                }), this._updatePosition()
                            },
                            value: 0
                        }
                    }
                })
            })
        },
        "Ti/UI/Switch": function() {
            define(["Ti/_/declare", "Ti/_/UI/FontWidget", "Ti/_/css", "Ti/_/style", "Ti/UI"], function(t, e, i, n, o) {
                var r = n.set,
                    a = {
                        post: function() {
                            this.backgroundColor || this.backgroundDisabledColor || this.backgroundDisabledImage || this.backgroundFocusedColor || this.backgroundFocusedImage || this.backgroundImage || this.backgroundSelectedColor || this.backgroundSelectedImage ? this._clearDefaultLook() : this._setDefaultLook(), this._doBackground()
                        }
                    };
                return t("Ti.UI.Switch", e, {
                    constructor: function() {
                        var t = this._contentContainer = o.createView({
                            width: o.INHERIT,
                            height: o.INHERIT,
                            layout: o._LAYOUT_CONSTRAINING_VERTICAL,
                            borderColor: "transparent"
                        });
                        this._add(t), t._add(this._switchTitle = o.createLabel({
                            width: o.INHERIT,
                            height: o.INHERIT,
                            verticalAlign: o.TEXT_VERTICAL_ALIGNMENT_CENTER,
                            textAlign: o.TEXT_ALIGNMENT_CENTER
                        })), t._add(this._switchIndicator = o.createView({
                            width: 40,
                            height: 10,
                            borderRadius: 4,
                            borderWidth: 1,
                            borderColor: "#888"
                        })), this._setDefaultLook();
                        var e = this;
                        e.addEventListener("singletap", function() {
                            e.value = !e.value
                        }), this.value = !1
                    },
                    _setDefaultLook: function() {
                        this._hasDefaultLook || (this._hasDefaultLook = !0, this._previousBorderWidth = this.borderWidth, this._previousBorderColor = this.borderColor, i.add(this.domNode, "TiUIElementGradient"), i.add(this.domNode, "TiUIButtonDefault"), this._contentContainer.borderWidth = 6, this._getBorderFromCSS())
                    },
                    _clearDefaultLook: function() {
                        this._hasDefaultLook && (this._hasDefaultLook = !1, this.borderWidth = this._previousBorderWidth, this.borderColor = this._previousBorderColor, i.remove(this.domNode, "TiUIElementGradient"), i.remove(this.domNode, "TiUIButtonDefault"), this._contentContainer.borderWidth = 0)
                    },
                    _defaultWidth: o.SIZE,
                    _defaultHeight: o.SIZE,
                    properties: {
                        backgroundColor: a,
                        backgroundDisabledColor: a,
                        backgroundDisabledImage: a,
                        backgroundFocusedColor: a,
                        backgroundFocusedImage: a,
                        backgroundImage: a,
                        backgroundSelectedColor: a,
                        backgroundSelectedImage: a,
                        enabled: {
                            set: function(t, e) {
                                return t !== e && (this._hasDefaultLook && (t ? (i.add(this.domNode, "TiUIElementGradient"), r(this.domNode, "backgroundColor", "")) : (i.remove(this.domNode, "TiUIElementGradient"), r(this.domNode, "backgroundColor", "#aaa"))), this._setTouchEnabled(t)), t
                            },
                            value: !0
                        },
                        textAlign: {
                            set: function(t) {
                                return this._switchTitle.textAlign = t, t
                            }
                        },
                        titleOff: {
                            set: function(t) {
                                return this.value || (this._switchTitle.text = t), t
                            },
                            value: "Off"
                        },
                        titleOn: {
                            set: function(t) {
                                return this.value && (this._switchTitle.text = t), t
                            },
                            value: "On"
                        },
                        value: {
                            set: function(t) {
                                return this._switchIndicator.backgroundColor = t ? "#0f0" : "#aaa", t = !!t, this._switchTitle.text = t ? this.titleOn : this.titleOff, t
                            },
                            post: function() {
                                this.fireEvent("change", {
                                    value: this.value
                                })
                            }
                        },
                        verticalAlign: {
                            set: function(t) {
                                this._switchTitle.verticalAlign = t
                            },
                            value: o.TEXT_VERTICAL_ALIGNMENT_CENTER
                        }
                    }
                })
            })
        },
        "Ti/UI/Tab": function() {
            define(["Ti/_/declare", "Ti/UI/View", "Ti/_/dom", "Ti/Locale", "Ti/UI", "Ti/UI/MobileWeb", "Ti/UI/Label", "Ti/UI/ImageView"], function(t, e, i, n, o, r) {
                var a = {
                        post: function() {
                            this._tabTitle.text = this._getTitle()
                        }
                    },
                    s = o.FILL,
                    u = o.SIZE;
                return t("Ti.UI.Tab", e, {
                    constructor: function(t) {
                        var e = t && t.window,
                            i = o.createView({
                                layout: o._LAYOUT_CONSTRAINING_VERTICAL,
                                width: "100%",
                                height: u
                            }),
                            n = this._tabNavigationGroup = r.createNavigationGroup({
                                window: e,
                                _tab: this
                            });
                        this._add(i), i._add(this._tabIcon = o.createImageView({
                            height: u,
                            width: u
                        })), i._add(this._tabTitle = o.createLabel({
                            width: "100%",
                            wordWrap: !0,
                            textAlign: o.TEXT_ALIGNMENT_CENTER
                        })), e && require.on(this, "singletap", this, function() {
                            var t = this._tabGroup;
                            t && (t.activeTab === this ? n._reset() : t.activeTab = this)
                        })
                    },
                    _defaultWidth: s,
                    _defaultHeight: s,
                    open: function(t, e) {
                        this._tabNavigationGroup.open(t, e)
                    },
                    close: function(t, e) {
                        this._tabNavigationGroup.close(t, e)
                    },
                    _focus: function() {
                        this.fireEvent("focus", this._tabGroup._getEventData());
                        var t = this._tabNavigationGroup._getTopWindow();
                        t && (this._tabGroup && this._tabGroup._opened && !t._opened && (t._opened = 1, t.fireEvent("open")), t._handleFocusEvent())
                    },
                    _blur: function() {
                        var t = this._tabNavigationGroup._getTopWindow();
                        t && t._handleBlurEvent(), this.fireEvent("blur", this._tabGroup._getEventData())
                    },
                    _getTitle: function() {
                        return n._getString(this.titleid, this.title)
                    },
                    _setTabGroup: function(t) {
                        this._tabGroup = t, this._tabNavigationGroup.navBarAtTop = t.tabsAtTop, this._win && (this._win.tabGroup = t)
                    },
                    _setNavBarAtTop: function(t) {
                        this._tabNavigationGroup.navBarAtTop = t
                    },
                    properties: {
                        active: {
                            get: function() {
                                return this._tabGroup && this._tabGroup.activeTab === this
                            },
                            post: function(t) {
                                var e = this._tabGroup,
                                    i = this._tabNavigationGroup,
                                    n = e._focused && e._opened;
                                t ? (i.navBarAtTop = e.tabsAtBottom, i._updateNavBar(), e._addTabContents(i), n && this._focus()) : (e._removeTabContents(i), n && this._blur())
                            }
                        },
                        icon: {
                            set: function(t) {
                                return this._tabIcon.image = t
                            }
                        },
                        title: a,
                        titleid: a
                    }
                })
            })
        },
        "Ti/UI/TabGroup": function() {
            define(["Ti/_/declare", "Ti/_/UI/SuperView", "Ti/UI/View", "Ti/UI", "Ti/_/lang"], function(t, e, i, n, o) {
                var r = require.is,
                    a = n.FILL,
                    s = {
                        post: "_updateTabsBackground"
                    };
                return t("Ti.UI.TabGroup", e, {
                    constructor: function(e) {
                        var r = this,
                            s = (r.__values__.constants.tabsAtBottom = o.val(e && e.tabsAtBottom, r.__values__.constants.tabsAtBottom), t(i, {
                                declaredClass: "Ti.UI.TabBarContainer"
                            }));
                        r._tabBarContainer = new s({
                            width: a,
                            layout: n._LAYOUT_CONSTRAINING_HORIZONTAL
                        }), r.tabHeight = 75, r._tabContentContainer = n.createView({
                            width: a,
                            height: a
                        }), r.layout = n._LAYOUT_CONSTRAINING_VERTICAL, r.tabs = [], r.tabsAtBottom = o.val(e && e.tabsAtBottom, !0)
                    },
                    addTab: function(t) {
                        var e = this.tabs;
                        e.push(t), t._setTabGroup(this), 1 === e.length ? this.activeTab = t : this._tabBarContainer._add(this._createTabDivider()), this._tabBarContainer._add(t), this._updateTabBackground(t), this._publish(t)
                    },
                    _addTabContents: function(t) {
                        this._tabContentContainer._add(t)
                    },
                    _removeTabContents: function(t) {
                        this._tabContentContainer._remove(t)
                    },
                    removeTab: function(t) {
                        var e = this.tabs,
                            i = this.tabs.indexOf(t);
                        i >= 0 && (e.splice(i, 1), this._tabBarContainer.remove(t), t === this._activeTab && this._activateTab(e[0]), this._unpublish(t))
                    },
                    _createTabDivider: function() {
                        return n.createView({
                            width: this.tabDividerWidth,
                            height: a,
                            backgroundColor: this.tabDividerColor
                        })
                    },
                    close: function() {
                        this._previousTab = null, e.prototype.close.call(this)
                    },
                    _getEventData: function() {
                        var t = this.tabs,
                            e = this._previousTab,
                            i = this._activeTab;
                        return {
                            index: i && t.indexOf(i),
                            previousIndex: e && t.indexOf(e),
                            tab: i,
                            previousTab: e
                        }
                    },
                    _handleFocusEvent: function() {
                        var t = this._previousTab,
                            e = this._activeTab;
                        t && t._blur(), !this._focused && this._opened && (this.fireEvent("focus", this._getEventData()), e && e._focus()), this._focused = 1
                    },
                    _handleBlurEvent: function(t) {
                        if (t) {
                            for (var e, i = 0, n = this.tabs.length; n > i;) e = this.tabs[i++], (2 !== t || e === this._activeTab) && e._blur();
                            this._previousTab = void 0
                        }
                        this._focused && this._opened && this.fireEvent("blur", this._getEventData()), this._focused = 0
                    },
                    _activateTab: function(t) {
                        var e = (this.tabs, this._activeTab);
                        e !== t && ((this._previousTab = e) && (e.active = !1, e._doBackground()), n.currentTab = this._activeTab = t, t.active = !0, this._updateTabsBackground())
                    },
                    _updateTabBackground: function(t) {
                        var e = t.active ? "activeTab" : "tabs";
                        ["", "Focused", "Disabled", "Selected"].forEach(function(i) {
                            i = "Background" + i, t["_default" + i + "Color"] = this[e + i + "Color"], t["_default" + i + "Image"] = this[e + i + "Image"]
                        }, this), t._doBackground()
                    },
                    _updateTabsBackground: function() {
                        for (var t = this.tabs, e = 0, i = t.length; i > e;) this._updateTabBackground(t[e++])
                    },
                    _updateDividers: function() {
                        for (var t = this._tabBarContainer._children, e = 1; e < t.length; e += 2) {
                            var i = t[e];
                            i.width = this.tabDividerWidth, i.backgroundColor = this.tabDividerColor
                        }
                    },
                    _defaultWidth: a,
                    _defaultHeight: a,
                    constants: {
                        bubbleParent: !1
                    },
                    properties: {
                        activeTab: {
                            set: function(t) {
                                return r(t, "Number") && (t = this.tabs[t]), !t in this.tabs ? void 0 : t
                            },
                            post: function(t) {
                                o.isDef(t) && this._activateTab(t)
                            }
                        },
                        tabs: {
                            set: function(t) {
                                if (r(t, "Array")) {
                                    var e, i = this._tabBarContainer;
                                    if (i._removeAllChildren(), t.length)
                                        for (e = 0; e < t.length; e++) t[e]._setTabGroup(this), 0 == e && this._activateTab(this.activeTab = t[e]), this._publish(t[e]), e && i._add(this._createTabDivider()), i._add(t[e]);
                                    return t
                                }
                            },
                            post: "_updateTabsBackground"
                        },
                        tabsAtBottom: {
                            set: function(t, e) {
                                if (t !== e) {
                                    var i = this._tabContentContainer,
                                        n = this._tabBarContainer;
                                    this._activeTab && this._activeTab._setNavBarAtTop(t), this._remove(i), this._remove(n), t ? (this._add(i), this._add(n)) : (this._add(n), this._add(i))
                                }
                                return t
                            }
                        },
                        activeTabBackgroundColor: {
                            post: "_updateTabsBackground",
                            value: "#fff"
                        },
                        activeTabBackgroundImage: s,
                        activeTabBackgroundDisabledColor: {
                            post: "_updateTabsBackground",
                            value: "#888"
                        },
                        activeTabBackgroundDisabledImage: s,
                        activeTabBackgroundFocusedColor: {
                            post: "_updateTabsBackground",
                            value: "#ccc"
                        },
                        activeTabBackgroundFocusedImage: s,
                        activeTabBackgroundSelectedColor: {
                            post: "_updateTabsBackground",
                            value: "#ddd"
                        },
                        activeTabBackgroundSelectedImage: s,
                        tabsBackgroundColor: {
                            post: "_updateTabsBackground",
                            value: "#aaa"
                        },
                        tabsBackgroundImage: s,
                        tabsBackgroundDisabledColor: {
                            post: "_updateTabsBackground",
                            value: "#666"
                        },
                        tabsBackgroundDisabledImage: s,
                        tabsBackgroundFocusedColor: {
                            post: "_updateTabsBackground",
                            value: "#ccc"
                        },
                        tabsBackgroundFocusedImage: s,
                        tabsBackgroundSelectedColor: {
                            post: "_updateTabsBackground",
                            value: "#ddd"
                        },
                        tabsBackgroundSelectedImage: s,
                        tabDividerColor: {
                            post: "_updateDividers",
                            value: "#555"
                        },
                        tabDividerWidth: {
                            post: "_updateDividers",
                            value: 1
                        },
                        tabHeight: {
                            set: function(t) {
                                return this._tabBarContainer.height = t, t
                            }
                        }
                    }
                })
            })
        },
        "Ti/_/UI/SuperView": function() {
            define(["Ti/_/declare", "Ti/UI", "Ti/UI/View"], function(t, e, i) {
                var n = [];
                return t("Ti._.UI.SuperView", i, {
                    destroy: function() {
                        this.close(), i.prototype.destroy.apply(this, arguments)
                    },
                    open: function() {
                        if (!this._opened) {
                            this._opened = 1, e._addWindow(this, 1).show();
                            var t = n.length;
                            t && n[t - 1]._handleBlurEvent(2), n.push(this), this.fireEvent("open"), this._handleFocusEvent()
                        }
                    },
                    close: function() {
                        if (this.tab) this.tab.close(this);
                        else if (this._opened) {
                            var t = n.indexOf(this),
                                i = t === n.length - 1;
                            if (e._removeWindow(this), ~t && (i && this._handleBlurEvent(1), n.splice(t, 1)), this.fireEvent("close"), i) {
                                for (t = n.length - 1; t >= 0 && !n[t]._opened; t--);
                                t >= 0 && n[t]._handleFocusEvent()
                            }
                            this._opened = 0
                        }
                    },
                    _handleFocusEvent: function() {
                        this.fireEvent("focus")
                    },
                    _handleBlurEvent: function() {
                        this.fireEvent("blur")
                    }
                })
            })
        },
        "Ti/UI/TableView": function() {
            define(["Ti/_/declare", "Ti/_/UI/KineticScrollView", "Ti/_/style", "Ti/_/lang", "Ti/UI/MobileWeb/TableViewSeparatorStyle", "Ti/UI"], function(t, e, i, n, o, r) {
                var a = i.set,
                    s = require.is,
                    u = n.isDef,
                    c = .001,
                    d = /^click|singletap|longpress$/;
                return t("Ti.UI.TableView", e, {
                    constructor: function() {
                        var t = r.createView({
                            width: r.INHERIT,
                            height: r.SIZE,
                            left: 0,
                            top: 0,
                            layout: r._LAYOUT_CONSTRAINING_VERTICAL
                        });
                        this._initKineticScrollView(t, "vertical", "vertical", 1), t._add(this._header = r.createView({
                            height: r.SIZE,
                            width: r.INHERIT,
                            layout: r._LAYOUT_CONSTRAINING_VERTICAL
                        })), t._add(this._sections = r.createView({
                            height: r.SIZE,
                            width: r.INHERIT,
                            layout: r._LAYOUT_CONSTRAINING_VERTICAL
                        })), t._add(this._footer = r.createView({
                            height: r.SIZE,
                            width: r.INHERIT,
                            layout: r._LAYOUT_CONSTRAINING_VERTICAL
                        })), this.__values__.constants.sections = [], this.data = []
                    },
                    _handleMouseWheel: function() {
                        this._fireScrollEvent("scroll")
                    },
                    _handleDragStart: function() {
                        this.fireEvent("dragstart")
                    },
                    _handleDrag: function(t) {
                        this._fireScrollEvent("scroll", t)
                    },
                    _handleDragEnd: function(t, e, i) {
                        var n = this;
                        if (u(i)) {
                            var o = i * i / (1.724 * c) * (0 > i ? -1 : 1),
                                a = Math.abs(i) / c,
                                s = Math.min(0, Math.max(n._minTranslationY, n._currentTranslationY + o));
                            n.fireEvent("dragend", {
                                decelerate: !0
                            }), n._animateToPosition(n._currentTranslationX, s, a, r.ANIMATION_CURVE_EASE_OUT, function() {
                                n._setTranslation(n._currentTranslationX, s), n._endScrollBars(), n._fireScrollEvent("scrollend", t)
                            })
                        }
                    },
                    _fireScrollEvent: function(t, e) {
                        for (var i, n = 0, o = this._contentContainer, r = -this._currentTranslationY, a = this._sections, s = a._children, u = s.length, c = 0; u > c; c += 2) {
                            var d = s[c],
                                h = r - d._measuredTop,
                                l = d._measuredHeight - h;
                            if (h > 0 && l > 0)
                                for (var _ = d._rows._children, f = 1; f < _.length; f += 2) {
                                    var g = _[f],
                                        p = h - g._measuredTop,
                                        m = g._measuredHeight - p;
                                    p > 0 && m > 0 && (n++, !i && (i = g))
                                }
                        }
                        this.fireEvent(t, {
                            contentOffset: {
                                x: 0,
                                y: r
                            },
                            contentSize: {
                                width: a._measuredWidth,
                                height: a._measuredHeight
                            },
                            firstVisibleItem: i,
                            size: {
                                width: o._measuredWidth,
                                height: o._measuredHeight
                            },
                            totalItemCount: this.data.length,
                            visibleItemCount: n,
                            x: e && e.x,
                            y: e && e.y
                        })
                    },
                    _defaultWidth: r.FILL,
                    _defaultHeight: r.FILL,
                    _getContentOffset: function() {
                        return {
                            x: -this._currentTranslationX,
                            y: -this._currentTranslationY
                        }
                    },
                    fireEvent: function(t, i) {
                        var n, o = 0,
                            r = 0,
                            a = this._sections._children,
                            s = this._tableViewRowClicked,
                            u = this._tableViewSectionClicked;
                        if (d.test(t)) {
                            if (s && u) {
                                for (; o < a.length; o += 2) {
                                    if (n = a[o]._rows._children.indexOf(s), -1 !== n) {
                                        r += Math.floor(n / 2);
                                        break
                                    }
                                    r += a[o].rowCount
                                }
                                i.row = i.rowData = s, i.index = r, i.section = u, i.searchMode = !1, e.prototype.fireEvent.apply(this, arguments), this._tableViewRowClicked = null, this._tableViewSectionClicked = null
                            }
                        } else e.prototype.fireEvent.apply(this, arguments)
                    },
                    _createSeparator: function() {
                        var t = r.createView({
                            height: 1,
                            width: r.INHERIT,
                            backgroundColor: "white"
                        });
                        return a(t.domNode, "minWidth", "100%"), t
                    },
                    _createDecorationLabel: function(t) {
                        return r.createLabel({
                            text: t,
                            backgroundColor: "darkGrey",
                            color: "white",
                            width: r.INHERIT,
                            height: r.SIZE,
                            left: 0,
                            font: {
                                fontSize: 22
                            }
                        })
                    },
                    _refreshSections: function() {
                        for (var t = 0; t < this._sections._children.length; t += 2) this._sections._children[t]._refreshRows();
                        this._triggerLayout()
                    },
                    _calculateLocation: function(t) {
                        for (var e, i = 0, n = 0; n < this._sections._children.length; n += 2)
                            if (e = this._sections._children[n], i += e.rowCount, i > t) return {
                                section: e,
                                localIndex: e.rowCount - (i - t)
                            };
                        return t == i ? {
                            section: e,
                            localIndex: e.rowCount
                        } : void 0
                    },
                    _insertRow: function(t, e) {
                        var i = this._calculateLocation(e);
                        i && i.section.add(t, i.localIndex), this._publish(t), this._refreshSections()
                    },
                    _removeRow: function(t) {
                        var e = this._calculateLocation(t);
                        e && (this._unpublish(e.section._rows._children[2 * e.localIndex + 1]), e.section._removeAt(e.localIndex))
                    },
                    appendRow: function(t) {
                        this._currentSection || (this._sections._add(this._currentSection = r.createTableViewSection({
                            _tableView: this
                        })), this.sections.push(this._currentSection), this._sections._add(this._createSeparator()), this.data.push(this._currentSection)), this._currentSection.add(t), this._publish(t), this._refreshSections()
                    },
                    deleteRow: function(t) {
                        this._removeRow(t)
                    },
                    insertRowAfter: function(t, e) {
                        this._insertRow(e, t + 1)
                    },
                    insertRowBefore: function(t, e) {
                        this._insertRow(e, t)
                    },
                    updateRow: function(t, e) {
                        this._removeRow(t), this._insertRow(e, t)
                    },
                    scrollToIndex: function(t) {
                        var e = this._calculateLocation(t);
                        e && this._setTranslation(0, -e.section._measuredTop - e.section._rows._children[2 * e.localIndex + 1]._measuredTop)
                    },
                    scrollToTop: function(t) {
                        this._setTranslation(0, -t)
                    },
                    _insertSection: function(t, e) {
                        !s(t, "Array") && (t = [t]);
                        for (var i = 0, n = t.length; n > i; i++) u(t[i].declaredClass) && "Ti.UI.TableViewSection" == t[i].declaredClass || (t[i] = r.createTableViewSection(t[i])), this._sections._insertAt(t[i], e + i), e === n ? this.sections.push(t[i]) : this.sections.splice(e, 0, t[i]);
                        this._refreshSections()
                    },
                    _removeSection: function(t) {
                        this._sections._remove(this.sections[t]), this.sections.splice(t, 1)
                    },
                    appendSection: function(t) {
                        this._insertSection(t, this.sections.length)
                    },
                    deleteSection: function(t) {
                        t in this.sections && (this._sections._remove(this.sections[t]), this.sections.splice(t, 1))
                    },
                    insertSectionBefore: function(t, e) {
                        this._insertSection(e, t)
                    },
                    insertSectionAfter: function(t, e) {
                        this._insertSection(e, t + 1)
                    },
                    updateSection: function(t, e) {
                        this._removeSection(t), this._insertSection(e, t)
                    },
                    constants: {
                        sectionCount: function() {
                            return this.sections.length
                        },
                        sections: void 0
                    },
                    properties: {
                        data: {
                            set: function(t) {
                                if (s(t, "Array")) {
                                    var e, i = [];
                                    this._sections._removeAllChildren(), this.__values__.constants.sections = [], this._currentSection = void 0;
                                    for (e in t)(!u(t[e].declaredClass) || "Ti.UI.TableViewRow" != t[e].declaredClass && "Ti.UI.TableViewSection" != t[e].declaredClass) && (t[e] = r.createTableViewRow(t[e]));
                                    for (e = 0; e < t.length; e++) "Ti.UI.TableViewRow" === t[e].declaredClass ? (this._currentSection || (this.appendSection(this._currentSection = r.createTableViewSection({
                                        _tableView: this
                                    })), i.push(this._currentSection)), this._currentSection.add(t[e])) : "Ti.UI.TableViewSection" === t[e].declaredClass && (t[e]._tableView = this, this.appendSection(this._currentSection = t[e]), i.push(this._currentSection)), this._publish(t[e]);
                                    return this._refreshSections(), i
                                }
                            }
                        },
                        footerTitle: {
                            set: function(t, e) {
                                return e != t && (this._footer._removeAllChildren(), this._footer._add(this._createDecorationLabel(t))), t
                            }
                        },
                        footerView: {
                            set: function(t, e) {
                                return e != t && (this._footer._removeAllChildren(), this._footer._add(t)), t
                            }
                        },
                        headerTitle: {
                            set: function(t, e) {
                                return e != t && (this._header._removeAllChildren(), this._header._add(this._createDecorationLabel(t)), this._header._add(this._createSeparator())), t
                            }
                        },
                        headerView: {
                            set: function(t, e) {
                                return e != t && (this._header._removeAllChildren(), this._header._add(t)), t
                            }
                        },
                        maxRowHeight: {
                            post: "_refreshSections"
                        },
                        minRowHeight: {
                            post: "_refreshSections"
                        },
                        rowHeight: {
                            post: "_refreshSections",
                            value: "50px"
                        },
                        separatorColor: {
                            post: "_refreshSections",
                            value: "lightGrey"
                        },
                        separatorStyle: {
                            post: "_refreshSections",
                            value: o.SINGLE_LINE
                        }
                    }
                })
            })
        },
        "Ti/UI/MobileWeb/TableViewSeparatorStyle": function() {
            define(["Ti/_/lang"], function(t) {
                return t.setObject("Ti.UI.MobileWeb.TableViewSeparatorStyle", {}, {
                    constants: {
                        NONE: 0,
                        SINGLE_LINE: 1
                    }
                })
            })
        },
        "Ti/UI/TableViewRow": function() {
            define(["Ti/_/declare", "Ti/_/lang", "Ti/UI/View", "Ti/_/dom", "Ti/_/css", "Ti/_/style", "Ti/UI", "Ti/_/Layouts/ConstrainingHorizontal"], function(t, e, i, n, o, r, a, s) {
                var u = e.isDef,
                    c = "themes/" + require.config.ti.theme + "/UI/TableViewRow/",
                    d = c + "check.png",
                    h = c + "child.png",
                    l = c + "detail.png",
                    _ = /(click|singletap|longpress)/;
                return t("Ti.UI.TableViewRow", i, {
                    _indentionScale: 10,
                    constructor: function() {
                        this._layout = new s({
                            element: this
                        }), this._add(this._leftImageView = a.createImageView({
                            width: a.SIZE,
                            height: a.SIZE
                        }));
                        var t = a.createView({
                            width: a.INHERIT,
                            height: a.INHERIT
                        });
                        this._add(t), t._add(this._titleLabel = a.createLabel({
                            width: a.INHERIT,
                            height: a.INHERIT,
                            wordWrap: !1
                        })), t._add(this._contentContainer = a.createView({
                            width: a.INHERIT,
                            height: a.INHERIT
                        })), this._add(this._rightImageView = a.createImageView({
                            right: 0,
                            width: a.SIZE,
                            height: a.SIZE
                        }))
                    },
                    _defaultWidth: a.INHERIT,
                    _defaultHeight: a.SIZE,
                    _tableRowHeight: void 0,
                    _tableViewSection: null,
                    fireEvent: function(t) {
                        _.test(t) && this._tableViewSection && this._tableViewSection._tableView && (this._tableViewSection._tableView._tableViewRowClicked = this), i.prototype.fireEvent.apply(this, arguments)
                    },
                    _doBackground: function() {
                        this._titleLabel.color = this._touching ? this.selectedColor : this.color, i.prototype._doBackground.apply(this, arguments)
                    },
                    _updatePadding: function() {
                        this._contentContainer.borderWidth = this._titleLabel.borderWidth = [this.leftImage ? 5 : 0, this.rightImage ? 5 : 0, 0, 0]
                    },
                    add: function(t) {
                        this._contentContainer._add(t), this._publish(t)
                    },
                    remove: function(t) {
                        this._contentContainer._remove(t), this._unpublish(t)
                    },
                    properties: {
                        className: void 0,
                        color: {
                            set: function(t) {
                                return this._titleLabel.color = t, t
                            }
                        },
                        hasCheck: {
                            set: function(t, e) {
                                return t === e || u(this.rightImage) || this.hasChild || (this._rightImageView.image = t ? d : ""), t
                            }
                        },
                        hasChild: {
                            set: function(t, e) {
                                return t === e || u(this.rightImage) || (this._rightImageView.image = t ? h : ""), t
                            }
                        },
                        hasDetail: {
                            set: function(t, e) {
                                return t === e || u(this.rightImage) || this.hasChild || this.hasCheck || (this._rightImageView.image = t ? l : ""), t
                            }
                        },
                        indentionLevel: {
                            set: function(t) {
                                return this._leftImageView.left = t * this._indentionScale, t
                            },
                            value: 0
                        },
                        layout: {
                            set: function(t) {
                                this._contentContainer.layout = t
                            }
                        },
                        leftImage: {
                            set: function(t, e) {
                                return t !== e && (this._leftImageView.image = t), t
                            },
                            post: "_updatePadding"
                        },
                        rightImage: {
                            set: function(t, e) {
                                return t !== e && (this._rightImageView.image = t), t
                            },
                            post: "_updatePadding"
                        },
                        selectedColor: void 0,
                        title: {
                            set: function(t) {
                                return this._titleLabel.text = t, t
                            }
                        },
                        font: {
                            set: function(t) {
                                return this._titleLabel.font = t, t
                            }
                        }
                    }
                })
            })
        },
        "Ti/UI/TableViewSection": function() {
            define(["Ti/_/declare", "Ti/_/lang", "Ti/_/UI/Widget", "Ti/_/style", "Ti/UI/MobileWeb/TableViewSeparatorStyle", "Ti/UI"], function(t, e, i, n, o, r) {
                var a = require.is,
                    s = n.set,
                    u = /(click|singletap|longpress)/;
                return t("Ti.UI.TableViewSection", i, {
                    constructor: function() {
                        this._indexedContent = [];
                        for (var t = 0, e = 3, i = ["_header", "_rows", "_footer"]; e > t;) this._add(this[i[t++]] = r.createView({
                            height: r.SIZE,
                            width: r.INHERIT,
                            layout: r._LAYOUT_CONSTRAINING_VERTICAL
                        }));
                        this.layout = r._LAYOUT_CONSTRAINING_VERTICAL
                    },
                    _defaultWidth: r.INHERIT,
                    _defaultHeight: r.SIZE,
                    fireEvent: function(t) {
                        u.test(t) && this._tableView && (this._tableView._tableViewSectionClicked = this), i.prototype.fireEvent.apply(this, arguments)
                    },
                    _tableView: null,
                    _createSeparator: function() {
                        var t = this._tableView && this._tableView.separatorStyle === o.SINGLE_LINE,
                            e = r.createView({
                                height: t ? 1 : 0,
                                width: r.INHERIT,
                                backgroundColor: t ? this._tableView.separatorColor : "transparent"
                            });
                        return s(e.domNode, "minWidth", "100%"), e
                    },
                    _createDecorationLabel: function(t) {
                        return r.createLabel({
                            text: t,
                            backgroundColor: "darkGrey",
                            color: "white",
                            width: r.INHERIT,
                            height: r.SIZE,
                            left: 0,
                            font: {
                                fontSize: 18
                            }
                        })
                    },
                    _refreshRows: function() {
                        if (this._tableView) {
                            var t, e, i = this._rows._children,
                                n = this._tableView,
                                r = this.__values__.constants.rows = [];
                            for (t = 1; t < i.length; t += 2) e = i[t], e._defaultHeight = n.rowHeight, e._minHeight = n.minRowHeight, e._maxHeight = n.maxRowHeight, r.push(e);
                            for (t = 0; t < i.length; t += 2) e = i[t], n.separatorStyle === o.SINGLE_LINE ? (e.height = 1, e.backgroundColor = n.separatorColor) : (e.height = 0, e.backgroundColor = "transparent")
                        }
                    },
                    _insertHelper: function(t, i) {
                        e.isDef(t.declaredClass) && "Ti.UI.TableViewRow" == t.declaredClass || (t = r.createTableViewRow(t)), this._rows._insertAt(t, 2 * i + 1), this._rows._insertAt(this._createSeparator(), 2 * i + 2), t._tableViewSection = this, this.rowCount++, this._refreshRows()
                    },
                    add: function(t, i) {
                        var n = this._rows._children,
                            o = this.rowCount;
                        if (e.isDef(i) || (i = o), !(0 > i || i > o))
                            if (0 === n.length && this._rows._add(this._createSeparator()), a(t, "Array"))
                                for (var r in t) this._insertHelper(t[r], i++);
                            else this._insertHelper(t, i)
                    },
                    _removeAt: function(t) {
                        0 > t || t >= this.rowCount || (this._rows._children[2 * t + 1]._tableViewSection = null, this._rows.remove(this._rows._children[2 * t + 1]), this._rows.remove(this._rows._children[2 * t + 1]), 1 === this._rows._children.length && this._rows.remove(this._rows._children[0]), this._refreshRows())
                    },
                    remove: function(t) {
                        var e = this._rows._children.indexOf(t); - 1 !== e && this._removeAt(e)
                    },
                    constants: {
                        rows: void 0
                    },
                    properties: {
                        footerTitle: {
                            set: function(t, e) {
                                return e != t && (this._footer._removeAllChildren(), this._footer._add(this._createDecorationLabel(t)), this._footer._add(this._createSeparator())), t
                            }
                        },
                        footerView: {
                            set: function(t, e) {
                                return e != t && (this._footer._removeAllChildren(), this._footer._add(t)), t
                            }
                        },
                        headerTitle: {
                            set: function(t, e) {
                                return e != t && (this._header._removeAllChildren(), this._header._add(this._createDecorationLabel(t)), this._header._add(this._createSeparator())), t
                            }
                        },
                        headerView: {
                            set: function(t, e) {
                                return e != t && (this._header._removeAllChildren(), this._header._add(t)), t
                            }
                        },
                        rowCount: function() {
                            return Math.floor(this._rows._children.length / 2)
                        }
                    }
                })
            })
        },
        "Ti/UI/TextArea": function() {
            define(["Ti/_/declare", "Ti/_/UI/TextBox", "Ti/_/dom", "Ti/_/css", "Ti/_/style", "Ti/UI"], function(t, e, i, n, o, r) {
                return t("Ti.UI.TextArea", e, {
                    constructor: function() {
                        var t = i.create("textarea", {
                            autocomplete: "off",
                            className: "TiUITextFieldInput"
                        }, this.domNode);
                        this._initTextBox(t)
                    },
                    _defaultWidth: r.SIZE,
                    _defaultHeight: r.SIZE,
                    _getContentSize: function(t) {
                        return {
                            width: this._measureText(this.value, this._field, t).width,
                            height: this._measureText(this.value, this._field, t).height
                        }
                    },
                    _setTouchEnabled: function(t) {
                        e.prototype._setTouchEnabled.apply(this, arguments), this.slider && o.set(this.textArea, "pointerEvents", t ? "auto" : "none")
                    }
                })
            })
        },
        "Ti/_/UI/TextBox": function() {
            define(["Ti/_/declare", "Ti/_/dom", "Ti/_/event", "Ti/_/style", "Ti/_/lang", "Ti/_/UI/FontWidget", "Ti/UI"], function(t, e, i, n, o, r, a) {
                var s = require.on,
                    u = n.set;
                return t("Ti._.UI.TextBox", r, {
                    constructor: function() {
                        this._addEventModifier(["click", "singletap", "blur", "change", "focus", "return"], function(t) {
                            t.value = this._getInternalText()
                        })
                    },
                    _initTextBox: function(t) {
                        this._field = t;
                        var e = null,
                            n = "";
                        this._addStyleableDomNode(this._setFocusNode(t)), s(t, "keydown", this, function(e) {
                            return this.editable ? void(13 === e.keyCode && (this.suppressReturn && (i.stop(e), t.blur()), this.fireEvent("return"))) : (i.stop(e), !1)
                        }), s(t, "keypress", this, function() {
                            setTimeout(o.hitch(this, function() {
                                this._capitalize()
                            }))
                        }), s(t, "focus", this, function() {
                            this.fireEvent("focus"), e = setInterval(o.hitch(this, function() {
                                var e = t.value;
                                (n.length !== e.length || n !== e) && (this.fireEvent("change"), n = e)
                            }), 200)
                        }), s(t, "blur", this, function() {
                            clearInterval(e), this.fireEvent("blur")
                        }), this.autocorrect = !0
                    },
                    _setInternalText: function(t) {
                        this._field.value !== t && (this._field.value = t, this._capitalize())
                    },
                    _getInternalText: function() {
                        return this._field.value
                    },
                    _updateInternalText: function() {
                        this._setInternalText(this._getInternalText())
                    },
                    _capitalize: function() {
                        var t = "off",
                            e = this._field;
                        switch (this.autocapitalization) {
                            case a.TEXT_AUTOCAPITALIZATION_ALL:
                                e.value = e.value.toUpperCase();
                                break;
                            case a.TEXT_AUTOCAPITALIZATION_SENTENCES:
                                t = "on"
                        }
                        this._field.autocapitalize = t
                    },
                    blur: function() {
                        this._field.blur()
                    },
                    focus: function() {
                        this._field.focus()
                    },
                    hasText: function() {
                        return !!this._field.value
                    },
                    properties: {
                        autocapitalization: {
                            value: a.TEXT_AUTOCAPITALIZATION_SENTENCES,
                            post: "_capitalize"
                        },
                        autocorrect: {
                            post: function(t) {
                                this._field.autocorrect = t ? "on" : "off"
                            }
                        },
                        editable: !0,
                        maxLength: {
                            set: function(t) {
                                return t = Math.max(0 | t, 0), e.attr[t > 0 ? "set" : "remove"](this._field, "maxlength", t), t
                            }
                        },
                        returnKeyType: function() {
                            return a.RETURNKEY_DEFAULT
                        },
                        suppressReturn: !0,
                        textAlign: {
                            post: function(t) {
                                u(this._field, "textAlign", /(center|right)/.test(t) ? t : "left")
                            }
                        },
                        value: {
                            get: function() {
                                return this._getInternalText()
                            },
                            post: "_setInternalText",
                            value: ""
                        }
                    }
                })
            })
        },
        "Ti/UI/TextField": function() {
            define(["Ti/_/declare", "Ti/_/UI/TextBox", "Ti/_/css", "Ti/_/dom", "Ti/_/lang", "Ti/_/style", "Ti/UI"], function(t, e, i, n, o, r, a) {
                var s = ["None", "Line", "Bezel", "Rounded"],
                    u = {
                        post: "_setKeyboardType"
                    },
                    c = r.set,
                    d = require.on;
                return t("Ti.UI.TextField", e, {
                    constructor: function() {
                        var t = n.create("input", {
                            autocomplete: "off",
                            className: "TiUITextFieldInput"
                        }, this.domNode);
                        this._initTextBox(t), this._setKeyboardType(), this.borderStyle = a.INPUT_BORDERSTYLE_BEZEL, this._disconnectFocusEvent = d(t, "focus", this, function() {
                            this._focused = 1, this._setInternalText(this.clearOnEdit ? "" : this._getInternalText())
                        }), this._disconnectBlurEvent = d(t, "blur", this, function() {
                            this._focused = 0, this._updateInternalText()
                        })
                    },
                    destroy: function() {
                        this._disconnectFocusEvent(), this._disconnectBlurEvent(), e.prototype.destroy.apply(this, arguments)
                    },
                    _showingHint: 1,
                    _setInternalText: function(t) {
                        var i = !this._focused && !t;
                        i !== this._showingHint && (this._showingHint = i, this._setKeyboardType()), e.prototype._setInternalText.call(this, i ? this.hintText : t)
                    },
                    _getInternalText: function() {
                        return this._showingHint ? "" : e.prototype._getInternalText.call(this)
                    },
                    _defaultWidth: a.SIZE,
                    _defaultHeight: a.SIZE,
                    _getContentSize: function(t) {
                        return {
                            width: this._measureText(this.value, this._field, t).width + 6,
                            height: this._measureText(this.value, this._field, t).height + 6
                        }
                    },
                    _setTouchEnabled: function(t) {
                        this.slider && c(this._field, "pointerEvents", t ? "auto" : "none")
                    },
                    _setKeyboardType: function() {
                        var t = "text";
                        if (this.passwordMask && !this._showingHint) t = "password";
                        else switch (this.keyboardType) {
                            case a.KEYBOARD_EMAIL:
                                t = "email";
                                break;
                            case a.KEYBOARD_NUMBER_PAD:
                                t = "number";
                                break;
                            case a.KEYBOARD_PHONE_PAD:
                                t = "tel";
                                break;
                            case a.KEYBOARD_URL:
                                t = "url"
                        }
                        try {
                            this._field.type = t
                        } catch (e) {
                            this._field.type = "text"
                        }
                    },
                    properties: {
                        borderStyle: {
                            set: function(t, e) {
                                var n = this.domNode,
                                    o = "TiUITextFieldBorderStyle";
                                return t !== e && (i.remove(n, o + s[e]), i.add(n, o + s[t])), t
                            }
                        },
                        clearOnEdit: !1,
                        hintText: {
                            post: "_updateInternalText",
                            value: ""
                        },
                        keyboardType: u,
                        passwordMask: u
                    }
                })
            })
        },
        "Ti/UI/WebView": function() {
            define(["Ti/_/declare", "Ti/_/UI/Widget", "Ti/_/dom", "Ti/_/event", "Ti/_/lang", "Ti/_/text!Ti/_/UI/WebViewBridge.js", "Ti/App", "Ti/API", "Ti/UI", "Ti/_/style"], function(t, e, i, n, o, r, a, s, u, c) {
                var d = require.on;
                return t("Ti.UI.WebView", e, {
                    constructor: function() {
                        a.addEventListener(this.widgetId + ":unload", o.hitch(this, function() {
                            this._loading(1)
                        })), this.backgroundColor = "#fff", c.set(this.domNode, {
                            overflow: "auto",
                            overflowScrolling: "touch"
                        })
                    },
                    destroy: function() {
                        a.removeEventListener(this.widgetId + ":unload"), this._destroy(), e.prototype.destroy.apply(this, arguments)
                    },
                    _destroy: function() {
                        this._iframe && (n.off(this._iframeHandles), i.destroy(this._iframe))
                    },
                    _createIFrame: function() {
                        if (this._parent) {
                            this._destroy(), this._loading(1);
                            var t = this.url || "",
                                e = t.match(/(https?)\:\/\/([^\:\/]*)(:?\d*)(.*)/),
                                n = window.location,
                                o = !e || e[0] + ":" === n.protocol && e[1] + e[2] === window.location.host,
                                a = this._iframe = i.create("iframe", {
                                    frameborder: 0,
                                    marginwidth: 0,
                                    marginheight: 0,
                                    hspace: 0,
                                    vspace: 0,
                                    scrolling: this.showScrollbars ? "auto" : "no",
                                    src: t || require.toUrl("Ti/_/UI/blank.html"),
                                    style: {
                                        width: "100%",
                                        height: "100%",
                                        position: "absolute"
                                    }
                                }, this.domNode);
                            return this._iframeHandles = [d(a, "load", this, function() {
                                var t, e, i, n = Math.max(0 | o, 0),
                                    u = a.contentWindow;
                                if (-1 !== n) o = -1;
                                else
                                    for (t in u) {
                                        n++;
                                        break
                                    }
                                n > 0 ? (e = u.location.href, this.evalJS(r.replace("WEBVIEW_ID", this.widgetId + ":unload")), (i = this.__values__.properties.html) && this._setContent(i)) : s.warn("Unable to inject WebView bridge into cross-domain URL, ignore browser security message"), this._loading(), this.fireEvent("load", {
                                    url: e ? this.__values__.properties.url = e : this.url
                                })
                            }), d(a, "error", this, function() {
                                this._loading(), this.fireEvent("error", {
                                    message: "Page failed to load",
                                    url: this.url
                                })
                            })], 1
                        }
                    },
                    _setParent: function() {
                        e.prototype._setParent.apply(this, arguments), (this.url || this.html) && this._createIFrame()
                    },
                    _getWindow: function() {
                        return this._iframe.contentWindow
                    },
                    _getDoc: function() {
                        return this._getWindow().document
                    },
                    _getHistory: function() {
                        return this._getWindow().history
                    },
                    _loading: function(t) {
                        this.loading || t && this.fireEvent("beforeload", {
                            url: this.url
                        }), this.__values__.constants.loading = !!t
                    },
                    canGoBack: function() {
                        return this.url && !!this._getHistory().length
                    },
                    canGoForward: function() {
                        return this.url && !!this._getHistory().length
                    },
                    evalJS: function(t) {
                        var e = this._getWindow(),
                            i = null;
                        try {
                            i = t && e && e.eval && e.eval(t)
                        } catch (n) {}
                        return i
                    },
                    goBack: function() {
                        if (this.canGoBack()) {
                            var t = this._getHistory();
                            t && (this._loading(1), t.go(-1))
                        }
                    },
                    goForward: function() {
                        if (this.canGoForward()) {
                            var t = this._getHistory();
                            t && (this._loading(1), t.go(1))
                        }
                    },
                    reload: function() {
                        var t = this._getWindow();
                        this.url && t ? t.location.href = this.url : this._createIFrame()
                    },
                    stopLoading: function(t) {
                        try {
                            this.loading && t ? this._destroy() : this._getWindow().stop()
                        } catch (e) {}
                        this._loading()
                    },
                    _defaultWidth: u.FILL,
                    _defaultHeight: u.FILL,
                    _getContentSize: function() {
                        return {
                            width: this._iframe ? this._iframe.clientWidth : 0,
                            height: this._iframe ? this._iframe.clientHeight : 0
                        }
                    },
                    _setContent: function(t) {
                        try {
                            var e = this._getDoc();
                            e.open(), e.write(t), e.close()
                        } catch (i) {}
                        return t
                    },
                    properties: {
                        data: {
                            set: function(t) {
                                var e = t;
                                switch (e && e.declaredClass) {
                                    case "Ti.Filesystem.File":
                                        e = e.read();
                                    case "Ti.Blob":
                                        e = e.toString();
                                    default:
                                        this.html = e
                                }
                                return t
                            }
                        },
                        html: {
                            get: function(t) {
                                var e = this._iframe && this._getDoc();
                                return void 0 === t && e ? e.documentElement.innerHTML : t
                            },
                            post: function(t) {
                                var e = this.__values__.properties;
                                e.data = void 0, e.url = void 0, this._createIFrame() && this._setContent(t)
                            }
                        },
                        showScrollbars: {
                            set: function(t) {
                                return this._iframe && i.attr.set(this._iframe, "scrolling", t ? "auto" : "no"), t
                            },
                            value: !0
                        },
                        url: {
                            post: function() {
                                var t = this.__values__.properties;
                                t.data = void 0, t.html = void 0, this._createIFrame()
                            }
                        }
                    },
                    constants: {
                        loading: !1
                    }
                })
            })
        },
        "url:Ti/_/UI/WebViewBridge.js": 'var a,b,w=window,p=w.parent,u=w.onunload;!Ti&&!Titanium&&p&&p.Ti&&(a=p.Ti.API,b=p.Ti.App,Ti=Titanium={API:{log:a.log,debug:a.debug,error:a.error,info:a.info,warn:a.warn},App:{addEventListener:b.addEventListener,removeEventListener:b.removeEventListener,fireEvent:b.fireEvent}}),w.onunload=function(){Ti.App.fireEvent("WEBVIEW_ID"),u&&u()};',
        "Ti/UI/Window": function() {
            define(["Ti/_/declare", "Ti/Gesture", "Ti/Locale", "Ti/_/UI/SuperView", "Ti/UI"], function(t, e, i, n, o) {
                var r = o.FILL,
                    a = o.SIZE,
                    s = {
                        post: function() {
                            this._navGroup && this._navGroup._updateNavBar()
                        }
                    };
                return t("Ti.UI.Window", n, {
                    _defaultWidth: r,
                    _defaultHeight: r,
                    postscript: function() {
                        if (this.url) {
                            var t = o.currentWindow;
                            o._setWindow(this), require("Ti/_/include!sandbox!" + this.url), o._setWindow(t)
                        }
                    },
                    _getTitle: function() {
                        return i.getString(this.titleid, this.title)
                    },
                    constants: {
                        url: void 0,
                        bubbleParent: !1
                    },
                    properties: {
                        modal: {
                            set: function(t, e) {
                                if (t !== e)
                                    if (t) {
                                        var i = this._modalParentContainer = o.createView();
                                        i._add(o.createView({
                                            backgroundColor: "#000",
                                            opacity: .5
                                        })), i._add(this._modalContentContainer = o.createView({
                                            width: a,
                                            height: a
                                        })), this._modalContentContainer.add(this)
                                    } else this._modalParentContainer && (this._modalParentContainer._opened && this._modalParentContainer.close(), this._modalContentContainer.remove(this), this._modalParentContainer = null, this._opened && (this.close(), this.open()));
                                return t
                            }
                        },
                        orientation: {
                            get: function() {
                                return e.orientation
                            }
                        },
                        barColor: s,
                        barImage: s,
                        leftNavButton: s,
                        navBarHidden: s,
                        rightNavButton: s,
                        titleControl: s,
                        titleImage: s,
                        title: s,
                        titleid: s,
                        translucent: s
                    }
                })
            })
        },
        "Ti/_/colors": function() {
            define({
                antiquewhite: [250, 235, 215],
                aqua: [0, 255, 255],
                aquamarine: [127, 255, 212],
                azure: [240, 255, 255],
                beige: [245, 245, 220],
                bisque: [255, 228, 196],
                black: [0, 0, 0],
                blanchedalmond: [255, 235, 205],
                blue: [0, 0, 255],
                blueviolet: [138, 43, 226],
                brown: [165, 42, 42],
                burlywood: [222, 184, 135],
                cadetblue: [95, 158, 160],
                chartreuse: [127, 255, 0],
                chocolate: [210, 105, 30],
                coral: [255, 127, 80],
                cornflowerblue: [100, 149, 237],
                cornsilk: [255, 248, 220],
                crimson: [220, 20, 60],
                cyan: [0, 255, 255],
                darkblue: [0, 0, 139],
                darkcyan: [0, 139, 139],
                darkgoldenrod: [184, 134, 11],
                darkgray: [169, 169, 169],
                darkgrey: [169, 169, 169],
                darkgreen: [0, 100, 0],
                darkkhaki: [189, 183, 107],
                darkmagenta: [139, 0, 139],
                darkolivegreen: [85, 107, 47],
                darkorange: [255, 140, 0],
                darkorchid: [153, 50, 204],
                darkred: [139, 0, 0],
                darksalmon: [233, 150, 122],
                darkseagreen: [143, 188, 143],
                darkslateblue: [72, 61, 139],
                darkslategray: [47, 79, 79],
                darkslategrey: [47, 79, 79],
                darkturquoise: [0, 206, 209],
                darkviolet: [148, 0, 211],
                deeppink: [255, 20, 147],
                deepskyblue: [0, 191, 255],
                dimgray: [105, 105, 105],
                dimgrey: [105, 105, 105],
                dodgerblue: [30, 144, 255],
                firebrick: [178, 34, 34],
                floralwhite: [255, 250, 240],
                forestgreen: [34, 139, 34],
                fuchsia: [255, 0, 255],
                gainsboro: [220, 220, 220],
                ghostwhite: [248, 248, 255],
                gold: [255, 215, 0],
                goldenrod: [218, 165, 32],
                gray: [128, 128, 128],
                grey: [128, 128, 128],
                green: [0, 128, 0],
                greenyellow: [173, 255, 47],
                honeydew: [240, 255, 240],
                hotpink: [255, 105, 180],
                indianred: [205, 92, 92],
                indigo: [75, 0, 130],
                ivory: [255, 255, 240],
                khaki: [240, 230, 140],
                lavender: [230, 230, 250],
                lavenderblush: [255, 240, 245],
                lawngreen: [124, 252, 0],
                lemonchiffon: [255, 250, 205],
                lightblue: [173, 216, 230],
                lightcoral: [240, 128, 128],
                lightcyan: [224, 255, 255],
                lightgoldenrodyellow: [250, 250, 210],
                lightgray: [211, 211, 211],
                lightgrey: [211, 211, 211],
                lightgreen: [144, 238, 144],
                lightpink: [255, 182, 193],
                lightsalmon: [255, 160, 122],
                lightseagreen: [32, 178, 170],
                lightskyblue: [135, 206, 250],
                lightslategray: [119, 136, 153],
                lightslategrey: [119, 136, 153],
                lightsteelblue: [176, 196, 222],
                lightyellow: [255, 255, 224],
                lime: [0, 255, 0],
                limegreen: [50, 205, 50],
                linen: [250, 240, 230],
                magenta: [255, 0, 255],
                maroon: [128, 0, 0],
                mediumaquamarine: [102, 205, 170],
                mediumblue: [0, 0, 205],
                mediumorchid: [186, 85, 211],
                mediumpurple: [147, 112, 216],
                mediumseagreen: [60, 179, 113],
                mediumslateblue: [123, 104, 238],
                mediumspringgreen: [0, 250, 154],
                mediumturquoise: [72, 209, 204],
                mediumvioletred: [199, 21, 133],
                midnightblue: [25, 25, 112],
                mintcream: [245, 255, 250],
                mistyrose: [255, 228, 225],
                moccasin: [255, 228, 181],
                navajowhite: [255, 222, 173],
                navy: [0, 0, 128],
                oldlace: [253, 245, 230],
                olive: [128, 128, 0],
                olivedrab: [107, 142, 35],
                orange: [255, 165, 0],
                orangered: [255, 69, 0],
                orchid: [218, 112, 214],
                palegoldenrod: [238, 232, 170],
                palegreen: [152, 251, 152],
                paleturquoise: [175, 238, 238],
                palevioletred: [216, 112, 147],
                papayawhip: [255, 239, 213],
                peachpuff: [255, 218, 185],
                peru: [205, 133, 63],
                pink: [255, 192, 203],
                plum: [221, 160, 221],
                powderblue: [176, 224, 230],
                purple: [128, 0, 128],
                red: [255, 0, 0],
                rosybrown: [188, 143, 143],
                royalblue: [65, 105, 225],
                saddlebrown: [139, 69, 19],
                salmon: [250, 128, 114],
                sandybrown: [244, 164, 96],
                seagreen: [46, 139, 87],
                seashell: [255, 245, 238],
                sienna: [160, 82, 45],
                silver: [192, 192, 192],
                skyblue: [135, 206, 235],
                slateblue: [106, 90, 205],
                slategray: [112, 128, 144],
                slategrey: [112, 128, 144],
                snow: [255, 250, 250],
                springgreen: [0, 255, 127],
                steelblue: [70, 130, 180],
                tan: [210, 180, 140],
                teal: [0, 128, 128],
                thistle: [216, 191, 216],
                tomato: [255, 99, 71],
                transparent: [0, 0, 0, 0],
                turquoise: [64, 224, 208],
                violet: [238, 130, 238],
                wheat: [245, 222, 179],
                white: [255, 255, 255],
                whitesmoke: [245, 245, 245],
                yellow: [255, 255, 0],
                yellowgreen: [154, 205, 50]
            })
        },
        "Ti/_/image": function() {
            define(function() {
                return {
                    normalize: function(t) {
                        return t
                    },
                    load: function(t, e, i) {
                        var n = new Image;
                        n.onload = n.onerror = function() {
                            i(n), delete n.onload, delete n.onerror
                        }, n.src = e.toUrl(t)
                    }
                }
            })
        },
        "Ti/_/text": function() {
            define(function() {
                var t = {};
                return {
                    dynamic: !0,
                    normalize: function(t, e) {
                        var i = t.split("!"),
                            n = i[0];
                        return i.shift(), (/^\./.test(n) ? e(n) : n) + (i.length ? "!" + i.join("!") : "")
                    },
                    load: function(e, i, n) {
                        var o, r = i.toUrl(e),
                            a = t[r] || i.cache(r);
                        if (!a)
                            if (window.hasWP8Extensions) i.getFileFromNative(r, 0, function(t, e) {
                                if (!t) throw new Error('Failed to load test "' + r + '"');
                                a = e
                            });
                            else {
                                if (o = new XMLHttpRequest, o.open("GET", r, !1), o.send(null), 200 !== o.status) throw new Error('Failed to load text "' + r + '": ' + o.status);
                                a = o.responseText
                            }
                        n(a)
                    }
                }
            })
        }
    }), require("Ti/App/Properties", function(t) {
        t.setString("ti.ui.defaultunit", "system")
    }), require(["Ti", "Ti/Accelerometer", "Ti/Analytics", "Ti/BlobStream", "Ti/BufferStream", "Ti/Facebook/LoginButton", "Ti/Filesystem/FileStream", "Ti/Map/Annotation", "Ti/Map/View", "Ti/Media/AudioPlayer", "Ti/Media/Sound", "Ti/Media/VideoPlayer", "Ti/MobileWeb/WP8", "Ti/Network/HTTPClient", "Ti/Platform/DisplayCaps", "Ti/UI/2DMatrix", "Ti/UI/ActivityIndicator", "Ti/UI/AlertDialog", "Ti/UI/Clipboard", "Ti/UI/EmailDialog", "Ti/UI/OptionDialog", "Ti/UI/Picker", "Ti/UI/PickerColumn", "Ti/UI/PickerRow", "Ti/UI/ProgressBar", "Ti/UI/ScrollView", "Ti/UI/ScrollableView", "Ti/UI/Slider", "Ti/UI/Switch", "Ti/UI/Tab", "Ti/UI/TabGroup", "Ti/UI/TableView", "Ti/UI/TableViewRow", "Ti/UI/TableViewSection", "Ti/UI/TextArea", "Ti/UI/TextField", "Ti/UI/WebView", "Ti/UI/Window", "Ti/XML", "Ti/Yahoo", "Ti/_/colors", "Ti/_/image", "Ti/_/text", "Ti/_/text!Ti/_/UI/WebViewBridge.js"]);
