// enyo.js (function() { var e = "enyo.js"; enyo = window.enyo || {}, enyo.locateScript = function(e) { var t = document.getElementsByTagName("script"); for (var n = t.length - 1, r, i, s = e.length; n >= 0 && (r = t[n]); n--) if (!r.located) { i = r.getAttribute("src") || ""; if (i.slice(-s) == e) return r.located = !0, { path: i.slice(0, Math.max(0, i.lastIndexOf("/"))), node: r }; } }, enyo.args = enyo.args || {}; var t = enyo.locateScript(e); if (t) { enyo.args.root = (enyo.args.root || t.path).replace("/source", ""); for (var n = 0, r = t.node.attributes.length, i; n < r && (i = t.node.attributes.item(n)); n++) enyo.args[i.nodeName] = i.value; } })(); // ../../loader.js (function() { enyo = window.enyo || {}, enyo.pathResolverFactory = function() { this.paths = {}; }, enyo.pathResolverFactory.prototype = { addPath: function(e, t) { return this.paths[e] = t; }, addPaths: function(e) { if (e) for (var t in e) this.addPath(t, e[t]); }, includeTrailingSlash: function(e) { return e && e.slice(-1) !== "/" ? e + "/" : e; }, rewritePattern: /\$([^\/\\]*)(\/)?/g, rewrite: function(e) { var t, n = this.includeTrailingSlash, r = this.paths, i = function(e, i) { return t = !0, n(r[i]) || ""; }, s = e; do t = !1, s = s.replace(this.rewritePattern, i); while (t); return s; } }, enyo.path = new enyo.pathResolverFactory, enyo.loaderFactory = function(e, t) { this.machine = e, this.packages = [], this.modules = [], this.sheets = [], this.stack = [], this.pathResolver = t || enyo.path, this.packageName = "", this.packageFolder = "", this.finishCallbacks = {}; }, enyo.loaderFactory.prototype = { verbose: !1, loadScript: function(e, t, n) { this.machine.script(e, t, n); }, loadSheet: function(e) { this.machine.sheet(e); }, loadPackage: function(e) { this.machine.script(e); }, report: function() {}, load: function() { this.more({ index: 0, depends: arguments || [] }); }, more: function(e) { if (e && this.continueBlock(e)) return; var t = this.stack.pop(); t ? (enyo.runtimeLoading && e.failed && (t.failed = t.failed || [], t.failed.push.apply(t.failed, e.failed)), this.verbose && console.groupEnd("* finish package (" + (t.packageName || "anon") + ")"), this.packageFolder = t.folder, this.packageName = "", this.more(t)) : this.finish(e); }, finish: function(e) { this.packageFolder = "", this.verbose && console.log("-------------- fini"); for (var t in this.finishCallbacks) this.finishCallbacks[t] && (this.finishCallbacks[t](e), this.finishCallbacks[t] = null); }, continueBlock: function(e) { while (e.index < e.depends.length) { var t = e.depends[e.index++]; if (t) if (typeof t == "string") { if (this.require(t, e)) return !0; } else this.pathResolver.addPaths(t); } }, require: function(e, t) { var n = this.pathResolver.rewrite(e), r = this.getPathPrefix(e); n = r + n; if (n.slice(-4) != ".css" && n.slice(-5) != ".less") return n.slice(-3) == ".js" && n.slice(-10) != "package.js" ? (this.verbose && console.log("+ module: [" + r + "][" + e + "]"), this.requireScript(e, n, t)) : (this.requirePackage(n, t), !0); this.verbose && console.log("+ stylesheet: [" + r + "][" + e + "]"), this.requireStylesheet(n); }, getPathPrefix: function(e) { var t = e.slice(0, 1); return t != "/" && t != "\\" && t != "$" && !/^https?:/i.test(e) ? this.packageFolder : ""; }, requireStylesheet: function(e) { this.sheets.push(e), this.loadSheet(e); }, requireScript: function(e, t, n) { this.modules.push({ packageName: this.packageName, rawPath: e, path: t }); if (enyo.runtimeLoading) { var r = this, i = function() { r.more(n); }, s = function() { n.failed = n.failed || [], n.failed.push(t), r.more(n); }; this.loadScript(t, i, s); } else this.loadScript(t); return enyo.runtimeLoading; }, decodePackagePath: function(e) { var t = "", n = "", r = "", i = "package.js", s = e.replace(/\\/g, "/").replace(/\/\//g, "/").replace(/:\//, "://").split("/"), o, u; if (s.length) { var a = s.pop() || s.pop() || ""; a.slice(-i.length) !== i ? s.push(a) : i = a, r = s.join("/"), r = r ? r + "/" : "", i = r + i; for (o = s.length - 1; o >= 0; o--) if (s[o] == "source") { s.splice(o, 1); break; } n = s.join("/"); for (o = s.length - 1; u = s[o]; o--) if (u == "lib" || u == "enyo") { s = s.slice(o + 1); break; } for (o = s.length - 1; u = s[o]; o--) (u == ".." || u == ".") && s.splice(o, 1); t = s.join("-"); } return { alias: t, target: n, folder: r, manifest: i }; }, aliasPackage: function(e) { var t = this.decodePackagePath(e); this.manifest = t.manifest, t.alias && (this.pathResolver.addPath(t.alias, t.target), this.packageName = t.alias, this.packages.push({ name: t.alias, folder: t.folder })), this.packageFolder = t.folder; }, requirePackage: function(e, t) { t.folder = this.packageFolder, this.aliasPackage(e), t.packageName = this.packageName, this.stack.push(t), this.report("loading package", this.packageName), this.verbose && console.group("* start package [" + this.packageName + "]"), this.loadPackage(this.manifest); } }; })(); // boot.js enyo.execUnsafeLocalFunction = function(e) { typeof MSApp == "undefined" ? e() : MSApp.execUnsafeLocalFunction(e); }, enyo.machine = { sheet: function(e) { var t = "text/css", n = "stylesheet", r = e.slice(-5) == ".less"; r && (window.less ? (t = "text/less", n = "stylesheet/less") : e = e.slice(0, e.length - 4) + "css"); var i; enyo.runtimeLoading || r ? (i = document.createElement("link"), i.href = e, i.media = "screen", i.rel = n, i.type = t, document.getElementsByTagName("head")[0].appendChild(i)) : (i = function() { document.write(''); }, enyo.execUnsafeLocalFunction(i)), r && window.less && (less.sheets.push(i), enyo.loader.finishCallbacks.lessRefresh || (enyo.loader.finishCallbacks.lessRefresh = function() { less.refresh(!0); })); }, script: function(e, t, n) { if (!enyo.runtimeLoading) document.write('