/** * State-based routing for AngularJS * @version v1.0.0alpha0 * @link http://angular-ui.github.com/ * @license MIT License, http://www.opensource.org/licenses/MIT */ !function (a, b) { "object" == typeof exports && "object" == typeof module ? module.exports = b() : "function" == typeof define && define.amd ? define([], b) : "object" == typeof exports ? exports["ui.router"] = b() : a["ui.router"] = b() }(this, function () { return function (a) { function b(d) { if (c[d])return c[d].exports; var e = c[d] = {exports: {}, id: d, loaded: !1}; return a[d].call(e.exports, e, e.exports, b), e.loaded = !0, e.exports } var c = {}; return b.m = a, b.c = c, b.p = "", b(0) }([function (a, b, c) { a.exports = c(1) }, function (a, b, c) { var d = c(2); b.common = d; var e = c(36); b.params = e; var f = c(15); b.path = f; var g = c(17); b.resolve = g; var h = c(12); b.state = h; var i = c(9); b.transition = i; var j = c(34); b.url = j; var k = c(49); b.view = k, Object.defineProperty(b, "__esModule", {value: !0}), b["default"] = "ui.router" }, function (a, b, c) { function d(a) { for (var c in a)b.hasOwnProperty(c) || (b[c] = a[c]) } d(c(3)), d(c(4)), d(c(5)), d(c(6)) }, function (a, b) { function c(a) { function b(c) { return c.length >= d ? a.apply(null, c) : function () { return b(c.concat([].slice.apply(arguments))) } } var c = [].slice.apply(arguments, [1]), d = a.length; return b(c) } function d() { var a = arguments, b = a.length - 1; return function () { for (var c = b, d = a[b].apply(this, arguments); c--;)d = a[c].call(this, d); return d } } function e() { for (var a = [], b = 0; b < arguments.length; b++)a[b - 0] = arguments[b]; return d.apply(null, [].slice.call(arguments).reverse()) } function f(a, b) { return function () { for (var c = [], d = 0; d < arguments.length; d++)c[d - 0] = arguments[d]; return a.apply(null, c) && b.apply(null, c) } } function g(a, b) { return function () { for (var c = [], d = 0; d < arguments.length; d++)c[d - 0] = arguments[d]; return a.apply(null, c) || b.apply(null, c) } } function h(a, b) { return function (c) { return c[a].apply(c, b) } } function i(a) { return function (b) { for (var c = 0; c < a.length; c++)if (a[c][0](b))return a[c][1](b) } } function j(a) { void 0 === a && (a = {}); for (var b = [], c = 1; c < arguments.length; c++)b[c - 1] = arguments[c]; var d = k.apply(null, [{}].concat(b)); return J({}, d, o(a || {}, Object.keys(d))) } function k(a) { for (var b = [], c = 1; c < arguments.length; c++)b[c - 1] = arguments[c]; return I(b, function (b) { I(b, function (b, c) { a.hasOwnProperty(c) || (a[c] = b) }) }), a } function l(a, b) { var c = []; for (var d in a.path) { if (a.path[d] !== b.path[d])break; c.push(a.path[d]) } return c } function m(a, b, c) { void 0 === c && (c = Object.keys(a)); for (var d = 0; d < c.length; d++) { var e = c[d]; if (a[e] != b[e])return !1 } return !0 } function n(a, b) { var c = {}, d = Q(arguments, 2); for (var e in b)a(d, e) && (c[e] = b[e]); return c } function o(a) { return n.apply(null, [R].concat(Q(arguments))) } function p(a) { return n.apply(null, [b.not(R)].concat(Q(arguments))) } function q(a, c) { return t(a, b.prop(c)) } function r(a, b) { var c = H(a), d = c ? [] : {}, e = c ? function (a) { return d.push(a) } : function (a, b) { return d[b] = a }; return I(a, function (a, c) { b(a, c) && e(a, c) }), d } function s(a, b) { var c; return I(a, function (a, d) { c || b(a, d) && (c = a) }), c } function t(a, b) { var c = H(a) ? [] : {}; return I(a, function (a, d) { return c[d] = b(a, d) }), c } function u(a, b) { return void 0 === b && (b = "assert failure"), function (c) { if (!a(c))throw new Error(b); return !0 } } function v() { for (var a = [], c = 0; c < arguments.length; c++)a[c - 0] = arguments[c]; if (0 === a.length)return []; var d = a.reduce(function (a, b) { return Math.min(b.length, a) }, 9007199254740991); return Array.apply(null, Array(d)).map(function (c, d) { return a.map(function (a) { return a[d] }).reduce(b.pushR, []) }) } function w(a, b) { var c, d; if (H(b) && (c = b[0], d = b[1]), !F(c))throw new Error("invalid parameters to applyPairs"); return a[c] = d, a } function x(a) { if (H(a) && a.length) { var c = a.slice(0, -1), d = a.slice(-1); if (c.filter(b.not(F)).length || d.filter(b.not(D)).length)return !1 } return D(a) } function y(a) { var c = i([[H, function (a) { return a.slice(-1)[0] }], [b.val(!0), P]])(a); return c && c.toString() || "undefined" } function z(a, b) { return b.length <= a ? b : b.substr(0, a - 3) + "..." } function A(a, b) { for (; b.length < a;)b += " "; return b } function B(a) { return a.length && a[a.length - 1] || void 0 } var C = angular.isDefined, D = angular.isFunction, E = angular.isNumber, F = angular.isString, G = angular.isObject, H = angular.isArray, I = angular.forEach, J = angular.extend, K = angular.copy, L = angular.noop, M = angular.toJson, N = angular.fromJson, O = angular.equals, P = angular.identity; b.isDefined = C, b.isFunction = D, b.isNumber = E, b.isString = F, b.isObject = G, b.isArray = H, b.forEach = I, b.extend = J, b.copy = K, b.noop = L, b.toJson = M, b.fromJson = N, b.equals = O, b.identity = P, b.abstractKey = "abstract", b.curry = c, b.compose = d, b.pipe = e, b.prop = function (a) { return function (b) { return b && b[a] } }, b.propEq = c(function (a, b, c) { return c && c[a] === b }), b.parse = function (a) { return e.apply(null, a.split(".").map(b.prop)) }, b.not = function (a) { return function () { for (var b = [], c = 0; c < arguments.length; c++)b[c - 0] = arguments[c]; return !a.apply(null, b) } }, b.and = f, b.or = g, b.is = function (a) { return function (b) { return null != b && b.constructor === a || b instanceof a } }, b.eq = function (a) { return function (b) { return a === b } }, b.val = function (a) { return function () { return a } }, b.invoke = h, b.pattern = i, b.inherit = function (a, b) { return J(new (J(function () { }, {prototype: a})), b) }; var Q = function (a, b) { return void 0 === b && (b = 0), Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(a, b)) }, R = function (a, b) { return -1 !== a.indexOf(b) }; b.removeFrom = function (a) { return function (b) { var c = a.indexOf(b); return c >= 0 && a.splice(c, 1), a } }, b.defaults = j, b.merge = k, b.mergeR = function (a, b) { return J(a, b) }, b.ancestors = l, b.equalForKeys = m, b.pick = o, b.omit = p, b.pluck = q, b.filter = r, b.find = s, b.map = t, b.values = function (a) { return Object.keys(a).map(function (b) { return a[b] }) }, b.allTrueR = function (a, b) { return a && b }, b.anyTrueR = function (a, b) { return a || b }, b.pushR = function (a, b) { return a.push(b), a }, b.unnestR = function (a, b) { return a.concat(b) }, b.flattenR = function (a, c) { return H(c) ? a.concat(c.reduce(b.flattenR, [])) : b.pushR(a, c) }, b.unnest = function (a) { return a.reduce(b.unnestR, []) }, b.flatten = function (a) { return a.reduce(b.flattenR, []) }, b.assertPredicate = u, b.pairs = function (a) { return Object.keys(a).map(function (b) { return [b, a[b]] }) }, b.arrayTuples = v, b.applyPairs = w, b.isInjectable = x, b.isNull = function (a) { return null === a }, b.isPromise = f(G, e(b.prop("then"), D)), b.fnToString = y, b.maxLength = z, b.padString = A, b.tail = B, angular.module("ui.router.util", ["ng", "ui.router.init"]), angular.module("ui.router.router", ["ui.router.util"]), angular.module("ui.router.state", ["ui.router.router", "ui.router.util", "ui.router.angular1"]), angular.module("ui.router", ["ui.router.init", "ui.router.state", "ui.router.angular1"]), angular.module("ui.router.compat", ["ui.router"]) }, function (a, b) { var c = function (a) { return function () { throw new Error(a + "(): No coreservices implementation for UI-Router is loaded. You should include one of: ['angular1.js']") } }, d = {$q: void 0, $injector: void 0, location: {}, locationConfig: {}}; b.services = d, ["replace", "url", "path", "search", "hash"].forEach(function (a) { return d.location[a] = c(a) }), ["port", "protocol", "host", "baseHref", "html5Mode", "hashPrefix"].forEach(function (a) { return d.locationConfig[a] = c(a) }) }, function (a, b) { var c = function () { function a(a) { void 0 === a && (a = []), this._items = a } return a.prototype.enqueue = function (a) { return this._items.push(a), a }, a.prototype.dequeue = function () { return this.size() ? this._items.splice(0, 1)[0] : void 0 }, a.prototype.clear = function () { var a = this._items; return this._items = [], a }, a.prototype.size = function () { return this._items.length }, a.prototype.remove = function (a) { var b = this._items.indexOf(a); return b > -1 && this._items.splice(b, 1)[0] }, a.prototype.peekTail = function () { return this._items[this._items.length - 1] }, a.prototype.peekHead = function () { return this.size() ? this._items[0] : void 0 }, a }(); b.Queue = c }, function (a, b, c) { function d(a) { return j.is(m.TransitionRejection)(a.reason) ? a.reason.toString() : "Promise(" + JSON.stringify(a) + ")" } function e(a) { var b = j.fnToString(a), c = b.match(/^(function [^ ]+\([^)]*\))/); return c ? c[1] : b } function f(a) { return j.isNumber(a) ? i[a] : i[i[a]] } function g(a) { var b = j.pattern([[j.not(j.isDefined), j.val("undefined")], [j.isNull, j.val("null")], [j.isPromise, d], [j.is(l.Transition), j.invoke("toString")], [j.is(k.Resolvable), j.invoke("toString")], [j.isInjectable, e], [j.val(!0), j.identity]]); return JSON.stringify(a, function (a, c) { return b(c) }).replace(/\\"/g, '"') } function h(a) { a.$watch(function () { q.approximateDigests++ }) } var i, j = c(3), k = c(7), l = c(8), m = c(28), n = function (a) { return "ui-view id#" + a.id + ", contextual name '" + a.name + "@" + a.creationContext + "', fqn: '" + a.fqn + "'" }, o = function (a) { return "ViewConfig targeting ui-view: '" + a.uiViewName + "@" + a.uiViewContextAnchor + "', context: '" + a.context.name + "'" }; !function (a) { a[a.RESOLVE = 0] = "RESOLVE", a[a.TRANSITION = 1] = "TRANSITION", a[a.HOOK = 2] = "HOOK", a[a.INVOKE = 3] = "INVOKE", a[a.UIVIEW = 4] = "UIVIEW", a[a.VIEWCONFIG = 5] = "VIEWCONFIG" }(i || (i = {})); var p = function () { function a() { var a = this; this._enabled = {}, this.enable = function () { for (var b = [], c = 0; c < arguments.length; c++)b[c - 0] = arguments[c]; return a._set(!0, b) }, this.disable = function () { for (var b = [], c = 0; c < arguments.length; c++)b[c - 0] = arguments[c]; return a._set(!1, b) }, this.approximateDigests = 0 } return a.prototype._set = function (a, b) { var c = this; b.length || (b = Object.keys(i).filter(function (a) { return isNaN(parseInt(a, 10)) }).map(function (a) { return i[a] })), b.map(f).forEach(function (b) { return c._enabled[b] = a }) }, a.prototype.enabled = function (a) { return !!this._enabled[f(a)] }, a.prototype.traceTransitionStart = function (a) { if (this.enabled(i.TRANSITION)) { var b = a.$id, c = this.approximateDigests, d = g(a); console.log("Transition #" + b + " Digest #" + c + ": Started -> " + d) } }, a.prototype.traceTransitionIgnored = function (a) { if (this.enabled(i.TRANSITION)) { var b = a.$id, c = this.approximateDigests, d = g(a); console.log("Transition #" + b + " Digest #" + c + ": Ignored <> " + d) } }, a.prototype.traceHookInvocation = function (a, b) { if (this.enabled(i.HOOK)) { var c = j.parse("transition.$id")(b), d = this.approximateDigests, f = j.parse("traceData.hookType")(b) || "internal", g = j.parse("traceData.context.state.name")(b) || j.parse("traceData.context")(b) || "unknown", h = e(a.fn); console.log("Transition #" + c + " Digest #" + d + ": Hook -> " + f + " context: " + g + ", " + j.maxLength(200, h)) } }, a.prototype.traceHookResult = function (a, b, c) { if (this.enabled(i.HOOK)) { var d = j.parse("transition.$id")(c), e = this.approximateDigests, f = g(a), h = g(b); console.log("Transition #" + d + " Digest #" + e + ": <- Hook returned: " + j.maxLength(200, f) + ", transition result: " + j.maxLength(200, h)) } }, a.prototype.traceResolvePath = function (a, b) { if (this.enabled(i.RESOLVE)) { var c = j.parse("transition.$id")(b), d = this.approximateDigests, e = a && a.toString(), f = b && b.resolvePolicy; console.log("Transition #" + c + " Digest #" + d + ": Resolving " + e + " (" + f + ")") } }, a.prototype.traceResolvePathElement = function (a, b, c) { if (this.enabled(i.RESOLVE) && b.length) { var d = j.parse("transition.$id")(c), e = this.approximateDigests, f = Object.keys(b).join(", "), g = a && a.toString(), h = c && c.resolvePolicy; console.log("Transition #" + d + " Digest #" + e + ": Resolve " + g + " resolvables: [" + f + "] (" + h + ")") } }, a.prototype.traceResolveResolvable = function (a, b) { if (this.enabled(i.RESOLVE)) { var c = j.parse("transition.$id")(b), d = this.approximateDigests, e = a && a.toString(); console.log("Transition #" + c + " Digest #" + d + ": Resolving -> " + e) } }, a.prototype.traceResolvableResolved = function (a, b) { if (this.enabled(i.RESOLVE)) { var c = j.parse("transition.$id")(b), d = this.approximateDigests, e = a && a.toString(), f = g(a.data); console.log("Transition #" + c + " Digest #" + d + ": <- Resolved " + e + " to: " + j.maxLength(200, f)) } }, a.prototype.tracePathElementInvoke = function (a, b, c, d) { if (this.enabled(i.INVOKE)) { var f = j.parse("transition.$id")(d), g = this.approximateDigests, h = a && a.state && a.state.toString(), k = e(b); console.log("Transition #" + f + " Digest #" + g + ": Invoke " + d.when + ": context: " + h + " " + j.maxLength(200, k)) } }, a.prototype.traceError = function (a, b) { if (this.enabled(i.TRANSITION)) { var c = b.$id, d = this.approximateDigests, e = g(b); console.log("Transition #" + c + " Digest #" + d + ": <- Rejected " + e + ", reason: " + a) } }, a.prototype.traceSuccess = function (a, b) { if (this.enabled(i.TRANSITION)) { var c = b.$id, d = this.approximateDigests, e = a.name, f = g(b); console.log("Transition #" + c + " Digest #" + d + ": <- Success " + f + ", final state: " + e) } }, a.prototype.traceUiViewEvent = function (a, b, c) { void 0 === c && (c = ""), this.enabled(i.UIVIEW) && console.log("ui-view: " + j.padString(30, a) + " " + n(b) + c) }, a.prototype.traceUiViewConfigUpdated = function (a, b) { this.enabled(i.UIVIEW) && this.traceUiViewEvent("Updating", a, " with ViewConfig from context='" + b + "'") }, a.prototype.traceUiViewScopeCreated = function (a, b) { this.enabled(i.UIVIEW) && this.traceUiViewEvent("Created scope for", a, ", scope #" + b.$id) }, a.prototype.traceUiViewFill = function (a, b) { this.enabled(i.UIVIEW) && this.traceUiViewEvent("Fill", a, " with: " + j.maxLength(200, b)) }, a.prototype.traceViewServiceEvent = function (a, b) { this.enabled(i.VIEWCONFIG) && console.log("$view.ViewConfig: " + a + " " + o(b)) }, a.prototype.traceViewServiceUiViewEvent = function (a, b) { this.enabled(i.VIEWCONFIG) && console.log("$view.ViewConfig: " + a + " " + n(b)) }, a }(), q = new p; b.trace = q, h.$inject = ["$rootScope"], angular.module("ui.router").run(h), angular.module("ui.router").service("$trace", function () { return q }) }, function (a, b, c) { var d = c(3), e = c(4), f = c(6), g = function () { function a(a, b, c) { this.promise = void 0, d.extend(this, { name: a, resolveFn: b, deps: e.services.$injector.annotate(b), data: c }) } return a.prototype.resolveResolvable = function (a, b) { var c = this; void 0 === b && (b = {}); var g = this, h = g.name, i = g.deps, j = g.resolveFn; f.trace.traceResolveResolvable(this, b); var k = e.services.$q.defer(); this.promise = k.promise; var l = a.getResolvables(null, {omitOwnLocals: [h]}), m = d.pick(l, i), n = d.map(m, function (c) { return c.get(a, b) }); return e.services.$q.all(n).then(function (a) { try { var b = e.services.$injector.invoke(j, null, a); k.resolve(b) } catch (d) { k.reject(d) } return c.promise }).then(function (a) { return c.data = a, f.trace.traceResolvableResolved(c, b), c.promise }) }, a.prototype.get = function (a, b) { return this.promise || this.resolveResolvable(a, b) }, a.prototype.toString = function () { return "Resolvable(name: " + this.name + ", requires: [" + this.deps + "])" }, a.makeResolvables = function (b) { var c = d.filter(b, d.not(d.isFunction)), e = Object.keys(c); if (e.length)throw new Error("Invalid resolve key/value: " + e[0] + "/" + c[e[0]]); return d.map(b, function (b, c) { return new a(c, b) }) }, a }(); b.Resolvable = g }, function (a, b, c) { var d = c(6), e = c(4), f = c(3), g = c(9), h = c(15), i = c(12), j = c(36), k = c(17), l = 0, m = new g.RejectFactory, n = f.prop("self"), o = function () { function a(a, b) { var c = this; if (this._deferred = e.services.$q.defer(), this.promise = this._deferred.promise, this.treeChanges = function () { return c._treeChanges }, this.isActive = function () { return c === c._options.current() }, !b.valid())throw new Error(b.error()); g.HookRegistry.mixin(new g.HookRegistry, this), this._options = f.extend({current: f.val(this)}, b.options()), this.$id = l++; var d = h.PathFactory.buildToPath(a, b); this._treeChanges = h.PathFactory.treeChanges(a, d, this._options.reloadState), h.PathFactory.bindTransitionResolve(this._treeChanges, this) } return a.prototype.$from = function () { return f.tail(this._treeChanges.from).state }, a.prototype.$to = function () { return f.tail(this._treeChanges.to).state }, a.prototype.from = function () { return this.$from().self }, a.prototype.to = function () { return this.$to().self }, a.prototype.is = function (b) { return b instanceof a ? this.is({ to: b.$to().name, from: b.$from().name }) : !(b.to && !g.matchState(this.$to(), b.to) || b.from && !g.matchState(this.$from(), b.from)) }, a.prototype.params = function (a) { return void 0 === a && (a = "to"), this._treeChanges[a].map(f.prop("values")).reduce(f.mergeR, {}) }, a.prototype.resolves = function () { return f.map(f.tail(this._treeChanges.to).resolveContext.getResolvables(), function (a) { return a.data }) }, a.prototype.addResolves = function (a, b) { void 0 === b && (b = ""); var c = "string" == typeof b ? b : b.name, d = this._treeChanges.to, e = f.find(d, function (a) { return a.state.name === c }); f.tail(d).resolveContext.addResolvables(k.Resolvable.makeResolvables(a), e.state) }, a.prototype.previous = function () { return this._options.previous || null }, a.prototype.options = function () { return this._options }, a.prototype.entering = function () { return f.map(this._treeChanges.entering, f.prop("state")).map(n) }, a.prototype.exiting = function () { return f.map(this._treeChanges.exiting, f.prop("state")).map(n).reverse() }, a.prototype.retained = function () { return f.map(this._treeChanges.retained, f.prop("state")).map(n) }, a.prototype.views = function (a, b) { void 0 === a && (a = "entering"); var c = this._treeChanges[a]; return b ? f.find(c, f.propEq("state", b)).views : f.unnest(c.map(f.prop("views"))) }, a.prototype.redirect = function (b) { var c = f.extend({}, this.options(), b.options(), {previous: this}); b = new i.TargetState(b.identifier(), b.$state(), b.params(), c); var d = new a(this._treeChanges.from, b), e = this.treeChanges().to, g = h.Node.matching(d.treeChanges().to, e), j = function (a, b) { return -1 === ["$stateParams", "$transition$"].indexOf(b) }; return g.forEach(function (a, b) { return f.extend(a.resolves, f.filter(e[b].resolves, j)) }), d }, a.prototype.ignored = function () { var a = this._treeChanges, b = a.to, c = a.from; if (this._options.reload || f.tail(b).state !== f.tail(c).state)return !1; var d = b.map(function (a) { return a.schema.filter(f.not(f.prop("dynamic"))) }), e = [b, c].map(function (a) { return a.map(f.prop("values")) }), g = e[0], h = e[1], i = f.arrayTuples(d, g, h); return i.map(function (a) { var b = a[0], c = a[1], d = a[2]; return j.Param.equals(b, c, d) }).reduce(f.allTrueR, !0) }, a.prototype.hookBuilder = function () { return new g.HookBuilder(g.$transitions, this, {transition: this, current: this._options.current}) }, a.prototype.run = function () { var a = this, b = this.hookBuilder(), c = g.TransitionHook.runSynchronousHooks, f = function () { return c(b.getOnSuccessHooks(), {}, !0) }, h = function (a) { return c(b.getOnErrorHooks(), {$error$: a}, !0) }; this.promise.then(f, h); var i = c(b.getOnBeforeHooks()); if (g.TransitionHook.isRejection(i)) { var j = i.reason; return this._deferred.reject(j), this.promise } if (!this.valid()) { var k = new Error(this.error()); return this._deferred.reject(k), this.promise } if (this.ignored()) { d.trace.traceTransitionIgnored(this); var l = m.ignored(); return this._deferred.reject(l.reason), this.promise } var n = function () { a._deferred.resolve(a), d.trace.traceSuccess(a.$to(), a) }, o = function (b) { return a._deferred.reject(b), d.trace.traceError(b, a), e.services.$q.reject(b) }; d.trace.traceTransitionStart(this); var p = b.asyncHooks().reduce(function (a, b) { return a.then(b.invokeStep) }, i); return p.then(n, o), this.promise }, a.prototype.valid = function () { return !this.error() }, a.prototype.error = function () { var a = this.$to(); return a.self[f.abstractKey] ? "Cannot transition to abstract state '" + a.name + "'" : j.Param.validates(a.parameters(), this.params()) ? void 0 : "Param values not valid for state '" + a.name + "'" }, a.prototype.toString = function () { var a = this.from(), b = this.to(), c = function (a) { return null !== a["#"] && void 0 !== a["#"] ? a : f.omit(a, "#") }, d = this.$id, e = f.isObject(a) ? a.name : a, g = f.toJson(c(this._treeChanges.from.map(f.prop("values")).reduce(f.mergeR, {}))), h = this.valid() ? "" : "(X) ", i = f.isObject(b) ? b.name : b, j = f.toJson(c(this.params())); return "Transition#" + d + "( '" + e + "'" + g + " -> " + h + "'" + i + "'" + j + " )" }, a }(); b.Transition = o }, function (a, b, c) { function d(a) { for (var c in a)b.hasOwnProperty(c) || (b[c] = a[c]) } d(c(10)), d(c(11)), d(c(28)), d(c(8)), d(c(47)), d(c(48)) }, function (a, b, c) { var d = c(3), e = c(9), f = function () { function a(a, b, c) { var e = this; this.$transitions = a, this.transition = b, this.baseHookOptions = c, this.getOnBeforeHooks = function () { return e._buildTransitionHooks("onBefore", {}, {async: !1}) }, this.getOnStartHooks = function () { return e._buildTransitionHooks("onStart") }, this.getOnExitHooks = function () { return e._buildNodeHooks("onExit", e.treeChanges.exiting.reverse(), function (a) { return e._toFrom({from: a.state}) }) }, this.getOnRetainHooks = function () { return e._buildNodeHooks("onRetain", e.treeChanges.retained, function (a) { return e._toFrom() }) }, this.getOnEnterHooks = function () { return e._buildNodeHooks("onEnter", e.treeChanges.entering, function (a) { return e._toFrom({to: a.state}) }) }, this.getOnFinishHooks = function () { return e._buildTransitionHooks("onFinish", {$treeChanges$: e.treeChanges}) }, this.getOnSuccessHooks = function () { return e._buildTransitionHooks("onSuccess", {}, {async: !1, rejectIfSuperseded: !1}) }, this.getOnErrorHooks = function () { return e._buildTransitionHooks("onError", {}, {async: !1, rejectIfSuperseded: !1}) }, this.treeChanges = b.treeChanges(), this.toState = d.tail(this.treeChanges.to).state, this.fromState = d.tail(this.treeChanges.from).state, this.transitionOptions = b.options() } return a.prototype.asyncHooks = function () { var a = this.getOnStartHooks(), b = this.getOnExitHooks(), c = this.getOnRetainHooks(), e = this.getOnEnterHooks(), f = this.getOnFinishHooks(); return d.flatten([a, b, c, e, f]).filter(d.identity) }, a.prototype._toFrom = function (a) { return d.extend({to: this.toState, from: this.fromState}, a) }, a.prototype._buildTransitionHooks = function (a, b, c) { var e = this; void 0 === b && (b = {}), void 0 === c && (c = {}); var f = this.treeChanges.to, g = d.tail(f); c.traceData = {hookType: a, context: f}; var h = function (a) { return e.buildHook(g, a.callback, b, c) }; return this._matchingHooks(a, this._toFrom()).map(h) }, a.prototype._buildNodeHooks = function (a, b, c, d, e) { var f = this; void 0 === d && (d = {}), void 0 === e && (e = {}); var g = function (b) { var g = c(b); e.traceData = {hookType: a, context: b}, d.$state$ = b.state; var h = function (a) { return f.buildHook(b, a.callback, d, e) }; return f._matchingHooks(a, g).map(h) }; return b.map(g) }, a.prototype.buildHook = function (a, b, c, f) { void 0 === f && (f = {}); var g = d.extend({}, this.baseHookOptions, f); return new e.TransitionHook(b, d.extend({}, c), a.resolveContext, g) }, a.prototype._matchingHooks = function (a, b) { var c = function (a) { return a.matches(b.to, b.from) }, e = function (a, b) { return b.priority - a.priority }; return [this.transition, this.$transitions].map(function (b) { return b.getHooks(a) }).filter(d.assertPredicate(d.isArray, "broken event named: " + a)).reduce(d.unnestR).filter(c).sort(e) }, a }(); b.HookBuilder = f }, function (a, b, c) { function d(a, b) { function c(a) { for (var b = 0; b < d.length; b++) { var c = g.Glob.fromString(d[b]); if (c && c.matches(a.name) || !c && d[b] === a.name)return !0 } return !1 } var d = f.isString(b) ? [b] : b, e = f.isFunction(d) ? d : c; return !!e(a) } function e(a, b) { return function (c, d, e) { void 0 === e && (e = {}); var g = new h(c, d, e); return a[b].push(g), function () { f.removeFrom(a[b])(g) } } } var f = c(3), g = c(12); b.matchState = d; var h = function () { function a(a, b, c) { void 0 === c && (c = {}), this.callback = b, this.matchCriteria = f.extend({ to: f.val(!0), from: f.val(!0) }, a), this.priority = c.priority || 0 } return a.prototype.matches = function (a, b) { return d(a, this.matchCriteria.to) && d(b, this.matchCriteria.from) }, a }(); b.EventHook = h; var i = function () { function a() { var a = this; this._transitionEvents = { onBefore: [], onStart: [], onEnter: [], onRetain: [], onExit: [], onFinish: [], onSuccess: [], onError: [] }, this.getHooks = function (b) { return a._transitionEvents[b] }, this.onBefore = e(this._transitionEvents, "onBefore"), this.onStart = e(this._transitionEvents, "onStart"), this.onEnter = e(this._transitionEvents, "onEnter"), this.onRetain = e(this._transitionEvents, "onRetain"), this.onExit = e(this._transitionEvents, "onExit"), this.onFinish = e(this._transitionEvents, "onFinish"), this.onSuccess = e(this._transitionEvents, "onSuccess"), this.onError = e(this._transitionEvents, "onError") } return a.mixin = function (a, b) { Object.keys(a._transitionEvents).concat(["getHooks"]).forEach(function (c) { return b[c] = a[c] }) }, a }(); b.HookRegistry = i }, function (a, b, c) { function d(a) { for (var c in a)b.hasOwnProperty(c) || (b[c] = a[c]) } d(c(13)), d(c(14)), d(c(41)), d(c(42)), d(c(43)), d(c(23)), d(c(44)), d(c(45)), d(c(46)), d(c(29)) }, function (a, b) { var c = function () { function a(a) { this.text = a, this.glob = a.split(".") } return a.prototype.matches = function (a) { for (var b = a.split("."), c = 0, d = this.glob.length; d > c; c++)"*" === this.glob[c] && (b[c] = "*"); return "**" === this.glob[0] && (b = b.slice(b.indexOf(this.glob[1])), b.unshift("**")), "**" === this.glob[this.glob.length - 1] && (b.splice(b.indexOf(this.glob[this.glob.length - 2]) + 1, Number.MAX_VALUE), b.push("**")), this.glob.length != b.length ? !1 : b.join("") === this.glob.join("") }, a.is = function (a) { return a.indexOf("*") > -1 }, a.fromString = function (b) { return this.is(b) ? new a(b) : null }, a }(); b.Glob = c }, function (a, b, c) { function d(a, b) { function c(a, b) { return r.builder(a, b) || this } function d(a, b) { return e.isObject(a) ? b = a : b.name = a, s.register(b), this } function l(a) { w.push(a) } function m(a, b, c, d, l, m) { function r(c, d) { function e(a) { if (a instanceof g.TargetState) { var b = a; return b = p.target(b.identifier(), b.params(), b.options()), b.valid() ? j() !== k ? v.superseded() : p.transitionTo(b.identifier(), b.params(), b.options()) : v.invalid(b.error()) } } function h() { var a = m.dequeue(); return void 0 === a ? v.invalid(d.error()) : n(a).then(e).then(function (a) { return a || h() }) } var j = function () { return t.peekTail() || u.peekTail() }, k = j(), l = i.PathFactory.makeTargetState(c), m = new f.Queue([].concat(w)), n = function (c) { return a.when(b.invoke(c, null, {$to$: d, $from$: l})) }; return h() } var x = m, y = { name: "", url: "^", views: null, params: {"#": {value: null, type: "hash"}}, "abstract": !0 }; n = s.register(y, !0), n.navigable = null; var z = function () { return i.PathFactory.bindTransNodesToPath([new i.Node(n, {})]) }; return c.rootContext(n), e.extend(p, { params: new k.StateParams, current: n.self, $current: n, transition: null }), s.flush(p), s.autoFlush = !0, p.reload = function (a) { return p.transitionTo(p.current, d, {reload: e.isDefined(a) ? a : !0, inherit: !1, notify: !1}) }, p.go = function (a, b, c) { var d = {relative: p.$current, inherit: !0}, f = e.defaults(c, d, h.defaultTransOpts); return p.transitionTo(a, b, f) }, p.target = function (a, b, c) { void 0 === c && (c = {}); var d = q.find(a, c.relative); return new g.TargetState(a, d, b, c) }, p.transitionTo = function (b, f, g) { if (void 0 === f && (f = {}), void 0 === g && (g = {}), g = e.defaults(g, h.defaultTransOpts), g = e.extend(g, {current: t.peekTail.bind(t)}), e.isObject(g.reload) && !g.reload.name)throw new Error("Invalid reload state object"); if (g.reloadState = g.reload === !0 ? p.$current.path[0] : q.find(g.reload, g.relative), g.reload && !g.reloadState)throw new Error("No such reload state '" + (e.isString(g.reload) ? g.reload : g.reload.name) + "'"); var i = p.target(b, f, g), k = u.peekTail(), m = k ? k.to : z(); if (!i.exists())return r(m, i); if (!i.valid())return a.reject(i.error()); var n = x.create(m, i), o = new j.TransitionManager(n, x, l, c, p, d, a, t, u), s = o.runTransition(); return e.extend(s, {transition: n}) }, p.is = function (a, b, c) { c = e.defaults(c, {relative: p.$current}); var f = q.find(a, c.relative); return e.isDefined(f) ? p.$current !== f ? !1 : e.isDefined(b) && null !== b ? k.Param.equals(f.parameters(), d, b) : !0 : void 0 }, p.includes = function (a, b, c) { c = e.defaults(c, {relative: p.$current}); var f = e.isString(a) && g.Glob.fromString(a); if (f) { if (!f.matches(p.$current.name))return !1; a = p.$current.name } var h = q.find(a, c.relative), i = p.$current.includes; return e.isDefined(h) ? e.isDefined(i[h.name]) ? b ? e.equalForKeys(k.Param.values(h.parameters(), b), d, Object.keys(b)) : !0 : !1 : void 0 }, p.href = function (a, b, c) { var f = {lossy: !0, inherit: !0, absolute: !1, relative: p.$current}; c = e.defaults(c, f); var g = q.find(a, c.relative); if (!e.isDefined(g))return null; c.inherit && (b = d.$inherit(b || {}, p.$current, g)); var h = g && c.lossy ? g.navigable : g; return h && void 0 !== h.url && null !== h.url ? l.href(h.url, k.Param.values(g.parameters(), b), {absolute: c.absolute}) : null }, p.get = function (a, b) { if (0 === arguments.length)return Object.keys(o).map(function (a) { return o[a].self }); var c = q.find(a, b || p.$current); return c && c.self || null }, p } var n, o = {}, p = function () { }, q = new g.StateMatcher(o), r = new g.StateBuilder(function () { return n }, q, b), s = new g.StateQueueManager(o, r, a, p), t = new f.Queue, u = new f.Queue, v = new h.RejectFactory; this.decorator = c, this.state = d; var w = []; this.onInvalid = l, this.$get = m, m.$inject = ["$q", "$injector", "$view", "$stateParams", "$urlRouter", "$transitions"] } var e = c(3), f = c(5), g = c(12), h = c(9), i = c(15), j = c(23), k = c(36); b.$StateProvider = d }, function (a, b, c) { function d(a) { for (var c in a)b.hasOwnProperty(c) || (b[c] = a[c]) } d(c(16)), d(c(22)) }, function (a, b, c) { var d = c(3), e = c(17), f = c(21), g = function () { function a(a, b, c) { void 0 === c && (c = {}), this.state = a, this.schema = a.parameters({inherit: !1}); var g = function (a) { return [a.id, a.value(b[a.id])] }; this.values = this.schema.reduce(function (a, b) { return d.applyPairs(a, g(b)) }, {}), this.resolves = d.extend(d.map(a.resolve, function (a, b) { return new e.Resolvable(b, a) }), c); var h = function (c, d) { return new f.ViewConfig({rawViewName: d, viewDeclarationObj: c, context: a, params: b}) }; this.views = d.values(d.map(a.views, h)) } return a.prototype.parameter = function (a) { return d.find(this.schema, d.propEq("id", a)) }, a.prototype.equals = function (a, b) { var c = this; void 0 === b && (b = this.schema.map(d.prop("id"))); var e = function (b) { return c.parameter(b).type.equals(c.values[b], a.values[b]) }; return this.state === a.state && b.map(e).reduce(d.allTrueR, !0) }, a.clone = function (b, c) { return void 0 === c && (c = {}), new a(b.state, c.values || b.values, c.resolves || b.resolves) }, a.matching = function (a, b) { var c = a.reduce(function (a, c, d) { return a === d && d < b.length && c.state === b[d].state ? d + 1 : a }, 0); return a.slice(0, c) }, a }(); b.Node = g }, function (a, b, c) { function d(a) { for (var c in a)b.hasOwnProperty(c) || (b[c] = a[c]) } d(c(7)), d(c(18)), d(c(20)) }, function (a, b, c) { function d(a, b) { var c = e.isString(a) ? a : null, d = e.isObject(a) ? a : {}, f = d[b.name] || c || i; return h.ResolvePolicy[f] } var e = c(3), f = c(6), g = c(4), h = c(19), i = h.ResolvePolicy[h.ResolvePolicy.LAZY], j = function () { function a(a) { this._path = a, e.extend(this, { _nodeFor: function (a) { return e.find(this._path, e.propEq("state", a)) }, _pathTo: function (a) { var b = this._nodeFor(a), c = this._path.indexOf(b); if (-1 === c)throw new Error("This path does not contain the state"); return this._path.slice(0, c + 1) } }) } return a.prototype.getResolvables = function (a, b) { b = e.defaults(b, {omitOwnLocals: []}); var c = (e.find(this._path, e.propEq("")), a ? this._pathTo(a) : this._path), d = e.tail(c); return c.reduce(function (a, c) { var f = c === d ? b.omitOwnLocals : [], g = e.omit(c.resolves, f); return e.extend(a, g) }, {}) }, a.prototype.getResolvablesForFn = function (a) { var b = g.services.$injector.annotate(a); return e.pick(this.getResolvables(), b) }, a.prototype.isolateRootTo = function (b) { return new a(this._pathTo(b)) }, a.prototype.addResolvables = function (a, b) { e.extend(this._nodeFor(b).resolves, a) }, a.prototype.getOwnResolvables = function (a) { return e.extend({}, this._nodeFor(a).resolves) }, a.prototype.resolvePath = function (a) { var b = this; void 0 === a && (a = {}), f.trace.traceResolvePath(this._path, a); var c = function (c) { return b.resolvePathElement(c.state, a) }; return g.services.$q.all(e.map(this._path, c)).then(e.noop) }, a.prototype.resolvePathElement = function (a, b) { var c = this; void 0 === b && (b = {}); var j = b && b.resolvePolicy, k = h.ResolvePolicy[j || i], l = this.getOwnResolvables(a), m = function (b) { return d(a.resolvePolicy, b) >= k }, n = e.filter(l, m), o = function (d) { return d.get(c.isolateRootTo(a), b) }, p = e.map(n, o); return f.trace.traceResolvePathElement(this, n, b), g.services.$q.all(p).then(e.noop) }, a.prototype.invokeLater = function (a, b, c) { var d = this; void 0 === b && (b = {}), void 0 === c && (c = {}); var h = this.getResolvablesForFn(a); f.trace.tracePathElementInvoke(e.tail(this._path), a, Object.keys(h), e.extend({when: "Later"}, c)); var i = function (a) { return a.get(d, c) }, j = e.map(h, i); return g.services.$q.all(j).then(function () { try { return d.invokeNow(a, b, c) } catch (e) { return g.services.$q.reject(e) } }) }, a.prototype.invokeNow = function (a, b, c) { void 0 === c && (c = {}); var d = this.getResolvablesForFn(a); f.trace.tracePathElementInvoke(e.tail(this._path), a, Object.keys(d), e.extend({when: "Now "}, c)); var h = e.map(d, e.prop("data")); return g.services.$injector.invoke(a, null, e.extend({}, b, h)) }, a }(); b.ResolveContext = j }, function (a, b) { !function (a) { a[a.JIT = 0] = "JIT", a[a.LAZY = 1] = "LAZY", a[a.EAGER = 2] = "EAGER" }(b.ResolvePolicy || (b.ResolvePolicy = {})); b.ResolvePolicy }, function (a, b, c) { var d = c(3), e = function () { function a(a, b) { this._resolveContext = a, this._state = b } return a.prototype.invokeLater = function (a, b) { return this._resolveContext.invokeLater(a, b) }, a.prototype.invokeNow = function (a, b) { return this._resolveContext.invokeNow(null, a, b) }, a.prototype.getLocals = function (a) { var b = this, c = function (a) { return a.get(b._resolveContext) }; return d.map(this._resolveContext.getResolvablesForFn(a), c) }, a }(); b.ResolveInjector = e }, function (a, b, c) { "use strict"; function d(a) { void 0 === a && (a = ""); var b = a.split("@"), c = b[0] || "$default", d = f.isString(b[1]) ? b[1] : "^", e = /^(\^(?:\.\^)*)\.(.*$)/.exec(c); return e && (d = e[1], c = e[2]), "!" === c.charAt(0) && (c = c.substr(1), d = ""), { uiViewName: c, uiViewContextAnchor: d } } function e(a, b, c, d) { var e = [], h = [], i = function (a) { for (var b = [], c = 1; c < arguments.length; c++)b[c - 1] = arguments[c]; return function (c) { return b.reduce(function (b, d) { return b && a[d] === c[d] }, !0) } }; this.rootContext = function (a) { return a ? this._rootContext = a : this._rootContext }, this.load = function (a, d) { if (!a.hasTemplate())throw new Error("No template configuration specified for '" + a.uiViewName + "@" + a.uiViewContextAnchor + "'"); var e = {template: c.when(a.getTemplate(b, d)), controller: c.when(a.getController(d))}; return c.all(e).then(function (b) { return g.trace.traceViewServiceEvent("Loaded", a), f.extend(a, b) }) }, this.reset = function (a) { g.trace.traceViewServiceEvent("<- Removing", a), h.filter(i(a, "uiViewName", "context")).forEach(f.removeFrom(h)) }, this.registerStateViewConfig = function (a) { g.trace.traceViewServiceEvent("-> Registering", a), h.push(a) }, this.sync = function () { function a(a) { return a.fqn.split(".").length } function b(a) { for (var b = a.context, c = 0; ++c && b.parent;)b = b.parent; return c } var c = e.map(function (a) { return [a.fqn, a] }).reduce(f.applyPairs, {}), d = f.curry(function (a, b) { var d = b.uiViewName.split("."), e = a.fqn.split("."); if (!angular.equals(d, e.slice(0 - d.length)))return !1; var f = 1 - d.length || void 0, g = e.slice(0, f).join("."), h = c[g].creationContext; return b.uiViewContextAnchor === (h && h.name) }), g = f.curry(function (a, b, c, d) { return b * (a(c) - a(d)) }), i = function (a) { var c = h.filter(d(a)); return c.length > 1 && c.sort(g(b, -1)), [a, c[0]] }, j = function (a) { var b = a[0], c = a[1]; -1 !== e.indexOf(b) && b.configUpdated(c) }; e.sort(g(a, 1)).map(i).forEach(j) }, this.registerUiView = function (a) { g.trace.traceViewServiceUiViewEvent("-> Registering", a); var b = function (b) { return b.fqn === a.fqn }; return e.filter(b).length && g.trace.traceViewServiceUiViewEvent("!!!! duplicate uiView named:", a), e.push(a), this.sync(), function () { var b = e.indexOf(a); return 0 >= b ? void g.trace.traceViewServiceUiViewEvent("Tried removing non-registered uiView", a) : (g.trace.traceViewServiceUiViewEvent("<- Deregistering", a), void f.removeFrom(e)(a)) } }, this.available = function () { return e.map(f.prop("fqn")) }, this.active = function () { return e.filter(f.prop("$config")).map(f.prop("name")) } } var f = c(3), g = c(2), h = function () { function a(a) { var b = d(a.rawViewName), c = b.uiViewName, e = b.uiViewContextAnchor, g = /^(\^(?:\.\^)*)$/; if (g.exec(e)) { var h = e.split(".").reduce(function (a, b) { return a.parent }, a.context); e = h.name } f.extend(this, f.pick(a, "viewDeclarationObj", "params", "context", "locals"), { uiViewName: c, uiViewContextAnchor: e }), this.controllerAs = a.viewDeclarationObj.controllerAs } return a.prototype.hasTemplate = function () { var a = this.viewDeclarationObj; return !!(a.template || a.templateUrl || a.templateProvider) }, a.prototype.getTemplate = function (a, b) { return a.fromConfig(this.viewDeclarationObj, this.params, b.invokeLater.bind(b)) }, a.prototype.getController = function (a) { var b = this.viewDeclarationObj.controllerProvider; return f.isInjectable(b) ? a.invokeLater(b, {}) : this.viewDeclarationObj.controller }, a }(); b.ViewConfig = h, e.$inject = ["$rootScope", "$templateFactory", "$q", "$timeout"], angular.module("ui.router.state").service("$view", e) }, function (a, b, c) { var d = c(3), e = c(12), f = c(15), g = c(17), h = function () { function a() { } return a.makeTargetState = function (a) { var b = d.tail(a).state; return new e.TargetState(b, b, a.map(d.prop("values")).reduce(d.mergeR, {})) }, a.buildToPath = function (b, c) { var d = c.params(), e = a.makeParamsNode(d), f = c.$state().path.map(e); return c.options().inherit && (f = a.inheritParams(b, f, Object.keys(d))), f }, a.inheritParams = function (a, b, c) { function e(a, b) { var c = d.find(a, d.propEq("state", b)); return d.extend({}, c && c.values) } void 0 === c && (c = []); var g = d.curry(function (a, b, c) { var g = d.extend({}, c && c.values), h = d.pick(g, b); g = d.omit(g, b); var i = e(a, c.state) || {}, j = d.extend(g, i, h); return new f.Node(c.state, j) }); return b.map(g(a, c)) }, a.bindTransNodesToPath = function (a) { var b = new g.ResolveContext(a); return a.forEach(function (a) { a.resolveContext = b.isolateRootTo(a.state), a.resolveInjector = new g.ResolveInjector(a.resolveContext, a.state), a.resolves.$stateParams = new g.Resolvable("$stateParams", function () { return a.values }, a.values) }), a }, a.treeChanges = function (b, c, e) { function g(a, b) { return f.Node.clone(a, {values: c[b].values}) } for (var h = 0, i = Math.min(b.length, c.length), j = function (a) { return a.parameters({inherit: !1}).filter(d.not(d.prop("dynamic"))).map(d.prop("id")) }, k = function (a, b) { return a.equals(b, j(a.state)) }; i > h && b[h].state !== e && k(b[h], c[h]);)h++; var l, m, n, o, p, q, r, s; return l = b, m = l.slice(0, h), n = l.slice(h), q = m.map(g), r = c.slice(h), s = q.concat(r), p = a.bindTransNodesToPath(s), o = p.slice(h), { from: l, to: p, retained: m, exiting: n, entering: o } }, a.bindTransitionResolve = function (a, b) { var c = a.to[0]; c.resolves.$transition$ = new g.Resolvable("$transition$", function () { return b }, b) }, a.makeParamsNode = d.curry(function (a, b) { return new f.Node(b, a) }), a }(); b.PathFactory = h }, function (a, b, c) { var d = c(3), e = c(24), f = c(28), g = c(29), h = c(30), i = c(39), j = c(40), k = function () { function a(a, b, c, d, e, f, g, k, l) { this.transition = a, this.$transitions = b, this.$urlRouter = c, this.$view = d, this.$state = e, this.$stateParams = f, this.$q = g, this.activeTransQ = k, this.changeHistory = l, this.viewHooks = new h.ViewHooks(a, d), this.enterExitHooks = new i.EnterExitHooks(a), this.resolveHooks = new j.ResolveHooks(a), this.treeChanges = a.treeChanges(), this.registerUpdateGlobalState(), this.viewHooks.registerHooks(), this.enterExitHooks.registerHooks(), this.resolveHooks.registerHooks() } return a.prototype.runTransition = function () { var a = this; return this.activeTransQ.clear(), this.activeTransQ.enqueue(this.transition), this.transition.run().then(function (a) { return a.to() })["catch"](function (b) { return a.transRejected(b) })["finally"](function () { return a.activeTransQ.remove(a.transition) }) }, a.prototype.registerUpdateGlobalState = function () { this.transition.onFinish({}, this.updateGlobalState.bind(this), {priority: -1e4}) }, a.prototype.updateGlobalState = function () { var a = this, b = a.treeChanges, c = a.transition, d = a.$state, e = a.changeHistory; d.$current = c.$to(), d.current = d.$current.self, e.enqueue(b), this.updateStateParams() }, a.prototype.transRejected = function (a) { var b = this, c = b.transition, h = b.$state, i = b.$stateParams, j = b.$q; if (a instanceof f.TransitionRejection) { if (a.type === f.RejectType.IGNORED) { var k = h.$current.parameters().filter(d.prop("dynamic")); return e.Param.equals(k, i, c.params()) || this.updateStateParams(), h.current } if (a.type === f.RejectType.SUPERSEDED && a.redirected && a.detail instanceof g.TargetState)return this._redirectMgr(c.redirect(a.detail)).runTransition() } return this.$transitions.defaultErrorHandler()(a), j.reject(a) }, a.prototype.updateStateParams = function () { var a = this, b = a.transition, c = a.$urlRouter, e = a.$state, f = a.$stateParams, g = b.options(); e.params = b.params(), d.copy(e.params, f), f.$sync().$off(), g.location && e.$current.navigable && c.push(e.$current.navigable.url, f, {replace: "replace" === g.location}), c.update(!0) }, a.prototype._redirectMgr = function (b) { var c = this, d = c.$transitions, e = c.$urlRouter, f = c.$view, g = c.$state, h = c.$stateParams, i = c.$q, j = c.activeTransQ, k = c.changeHistory; return new a(b, d, e, f, g, h, i, j, k) }, a }(); b.TransitionManager = k }, function (a, b, c) { var d, e = c(3), f = c(4), g = c(25), h = c(26), i = c(27), j = Object.prototype.hasOwnProperty, k = function (a) { return 0 === ["value", "type", "squash", "array", "dynamic"].filter(j.bind(a || {})).length }; !function (a) { a[a.PATH = 0] = "PATH", a[a.SEARCH = 1] = "SEARCH", a[a.CONFIG = 2] = "CONFIG" }(d || (d = {})); var l = function () { function a(a, b, c, f) { function j(a) { return a = k(a) && {value: a} || a, e.extend(a, { $$fn: e.isInjectable(a.value) ? a.value : function () { return a.value } }) } function l(b, c, e) { if (b.type && c && "string" !== c.name)throw new Error("Param '" + a + "' has two type configurations."); return b.type && c && "string" === c.name && i.paramTypes.type(b.type) ? i.paramTypes.type(b.type) : c ? c : b.type ? b.type instanceof h.Type ? b.type : i.paramTypes.type(b.type) : e === d.CONFIG ? i.paramTypes.type("any") : i.paramTypes.type("string") } function m() { var b = {array: f === d.SEARCH ? "auto" : !1}, g = a.match(/\[\]$/) ? {array: !0} : {}; return e.extend(b, g, c).array } function n(a, b) { var c = a.squash; if (!b || c === !1)return !1; if (!e.isDefined(c) || null == c)return g.matcherConfig.defaultSquashPolicy(); if (c === !0 || e.isString(c))return c; throw new Error("Invalid squash policy: '" + c + "'. Valid policies: false, true, or arbitrary string") } function o(a, b, c, d) { var f, g, h = [{from: "", to: c || b ? void 0 : ""}, {from: null, to: c || b ? void 0 : ""}]; return f = e.isArray(a.replace) ? a.replace : [], e.isString(d) && f.push({ from: d, to: void 0 }), g = e.map(f, e.prop("from")), e.filter(h, function (a) { return -1 === g.indexOf(a.from) }).concat(f) } c = j(c), b = l(c, b, f); var p = m(); b = p ? b.$asArray(p, f === d.SEARCH) : b; var q = void 0 !== c.value, r = c.dynamic === !0, s = n(c, q), t = o(c, p, q, s); e.extend(this, { id: a, type: b, location: f, squash: s, replace: t, isOptional: q, dynamic: r, config: c, array: p }) } return a.prototype.isDefaultValue = function (a) { return this.isOptional && this.type.equals(this.value(), a) }, a.prototype.value = function (a) { var b = this, c = function () { if (!f.services.$injector)throw new Error("Injectable functions cannot be called at configuration time"); var a = f.services.$injector.invoke(b.config.$$fn); if (null !== a && void 0 !== a && !b.type.is(a))throw new Error("Default value (" + a + ") for parameter '" + b.id + "' is not an instance of Type (" + b.type.name + ")"); return a }, d = function (a) { var c = e.map(e.filter(b.replace, e.propEq("from", a)), e.prop("to")); return c.length ? c[0] : a }; return a = d(a), e.isDefined(a) ? this.type.$normalize(a) : c() }, a.prototype.isSearch = function () { return this.location === d.SEARCH }, a.prototype.validates = function (a) { if ((!e.isDefined(a) || null === a) && this.isOptional)return !0; var b = this.type.$normalize(a); if (!this.type.is(b))return !1; var c = this.type.encode(b); return e.isString(c) && !this.type.pattern.exec(c) ? !1 : !0 }, a.prototype.toString = function () { return "{Param:" + this.id + " " + this.type + " squash: '" + this.squash + "' optional: " + this.isOptional + "}" }, a.fromConfig = function (b, c, e) { return new a(b, c, e, d.CONFIG) }, a.fromPath = function (b, c, e) { return new a(b, c, e, d.PATH) }, a.fromSearch = function (b, c, e) { return new a(b, c, e, d.SEARCH) }, a.values = function (a, b) { return b = b || {}, a.map(function (a) { return [a.id, a.value(b[a.id])] }).reduce(e.applyPairs, {}) }, a.equals = function (a, b, c) { return b = b || {}, c = c || {}, -1 === a.map(function (a) { return a.type.equals(b[a.id], c[a.id]) }).indexOf(!1) }, a.validates = function (a, b) { return b = b || {}, -1 === a.map(function (a) { return a.validates(b[a.id]) }).indexOf(!1) }, a }(); b.Param = l }, function (a, b, c) { var d = c(3), e = function () { function a() { this._isCaseInsensitive = !1, this._isStrictMode = !0, this._defaultSquashPolicy = !1 } return a.prototype.caseInsensitive = function (a) { return this._isCaseInsensitive = d.isDefined(a) ? a : this._isCaseInsensitive }, a.prototype.strictMode = function (a) { return this._isStrictMode = d.isDefined(a) ? a : this._isStrictMode }, a.prototype.defaultSquashPolicy = function (a) { if (d.isDefined(a) && a !== !0 && a !== !1 && !d.isString(a))throw new Error("Invalid squash policy: " + a + ". Valid policies: false, true, arbitrary-string"); return this._defaultSquashPolicy = d.isDefined(a) ? a : this._defaultSquashPolicy }, a }(); b.matcherConfig = new e }, function (a, b, c) { function d(a, b) { function c(a) { return e.isArray(a) ? a : e.isDefined(a) ? [a] : [] } function d(a) { switch (a.length) { case 0: return void 0; case 1: return "auto" === b ? a[0] : a; default: return a } } function f(a, b) { return function (f) { var g = c(f), h = e.map(g, a); return b === !0 ? 0 === e.filter(h, function (a) { return !a }).length : d(h) } } function g(a) { return function (b, d) { var e = c(b), f = c(d); if (e.length !== f.length)return !1; for (var g = 0; g < e.length; g++)if (!a(e[g], f[g]))return !1; return !0 } } var h = this; ["encode", "decode", "equals", "$normalize"].map(function (b) { h[b] = ("equals" === b ? g : f)(a[b].bind(a)) }), e.extend(this, {name: a.name, pattern: a.pattern, is: f(a.is.bind(a), !0), $arrayMode: b}) } var e = c(3), f = function () { function a(a) { this.pattern = /.*/, e.extend(this, a) } return a.prototype.is = function (a, b) { return !0 }, a.prototype.encode = function (a, b) { return a }, a.prototype.decode = function (a, b) { return a }, a.prototype.equals = function (a, b) { return a == b }, a.prototype.$subPattern = function () { var a = this.pattern.toString(); return a.substr(1, a.length - 2) }, a.prototype.toString = function () { return "{Type:" + this.name + "}" }, a.prototype.$normalize = function (a) { return this.is(a) ? a : this.decode(a) }, a.prototype.$asArray = function (a, b) { if (!a)return this; if ("auto" === a && !b)throw new Error("'auto' array mode is for query parameters only"); return new d(this, a) }, a }(); b.Type = f }, function (a, b, c) { var d = c(3), e = c(4), f = c(26), g = function (a, b) { return function (c) { return null != c ? c.toString().replace(a, b) : c } }, h = g(/\//g, "%2F"), i = g(/%2F/g, "/"), j = function () { function a() { this.enqueue = !0, this.typeQueue = [], this.defaultTypes = { hash: { encode: h, decode: i, is: d.is(String), pattern: /.*/, equals: d.val(!0) }, string: {encode: h, decode: i, is: d.is(String), pattern: /[^\/]*/}, "int": { encode: h, decode: function (a) { return parseInt(a, 10) }, is: function (a) { return d.isDefined(a) && this.decode(a.toString()) === a }, pattern: /-?\d+/ }, bool: { encode: function (a) { return a && 1 || 0 }, decode: function (a) { return 0 !== parseInt(a, 10) }, is: d.is(Boolean), pattern: /0|1/ }, date: { encode: function (a) { return this.is(a) ? [a.getFullYear(), ("0" + (a.getMonth() + 1)).slice(-2), ("0" + a.getDate()).slice(-2)].join("-") : void 0 }, decode: function (a) { if (this.is(a))return a; var b = this.capture.exec(a); return b ? new Date(b[1], b[2] - 1, b[3]) : void 0 }, is: function (a) { return a instanceof Date && !isNaN(a.valueOf()) }, equals: function (a, b) { return this.is(a) && this.is(b) && a.toISOString() === b.toISOString() }, pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/, capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/ }, json: {encode: d.toJson, decode: d.fromJson, is: d.is(Object), equals: d.equals, pattern: /[^\/]*/}, any: {encode: d.identity, decode: d.identity, equals: d.equals, pattern: /.*/} }; var a = function (a, b) { return new f.Type(d.extend({name: b}, a)) }; this.types = d.inherit(d.map(this.defaultTypes, a), {}) } return a.prototype.type = function (a, b, c) { if (!d.isDefined(b))return this.types[a]; if (this.types.hasOwnProperty(a))throw new Error("A type named '" + a + "' has already been defined."); return this.types[a] = new f.Type(d.extend({name: a}, b)), c && (this.typeQueue.push({ name: a, def: c }), this.enqueue || this._flushTypeQueue()), this }, a.prototype._flushTypeQueue = function () { for (; this.typeQueue.length;) { var a = this.typeQueue.shift(); if (a.pattern)throw new Error("You cannot override a type's .pattern at runtime."); d.extend(this.types[a.name], e.services.$injector.invoke(a.def)) } }, a }(); b.paramTypes = new j }, function (a, b, c) { "use strict"; var d = c(3), e = c(4); !function (a) { a[a.SUPERSEDED = 2] = "SUPERSEDED", a[a.ABORTED = 3] = "ABORTED", a[a.INVALID = 4] = "INVALID", a[a.IGNORED = 5] = "IGNORED" }(b.RejectType || (b.RejectType = {})); var f = b.RejectType, g = function () { function a(a, b, c) { d.extend(this, {type: a, message: b, detail: c}) } return a.prototype.toString = function () { var a = function (a) { return a && a.toString !== Object.prototype.toString ? a.toString() : JSON.stringify(a) }, b = this.type, c = this.message, d = a(this.detail); return "TransitionRejection(type: " + b + ", message: " + c + ", detail: " + d + ")" }, a }(); b.TransitionRejection = g; var h = function () { function a() { } return a.prototype.superseded = function (a, b) { var c = "The transition has been superseded by a different transition (see detail).", h = new g(f.SUPERSEDED, c, a); return b && b.redirected && (h.redirected = !0), d.extend(e.services.$q.reject(h), {reason: h}) }, a.prototype.redirected = function (a) { return this.superseded(a, {redirected: !0}) }, a.prototype.invalid = function (a) { var b = "This transition is invalid (see detail)", c = new g(f.INVALID, b, a); return d.extend(e.services.$q.reject(c), {reason: c}) }, a.prototype.ignored = function (a) { var b = "The transition was ignored.", c = new g(f.IGNORED, b, a); return d.extend(e.services.$q.reject(c), {reason: c}) }, a.prototype.aborted = function (a) { var b = "The transition has been aborted.", c = new g(f.ABORTED, b, a); return d.extend(e.services.$q.reject(c), {reason: c}) }, a }(); b.RejectFactory = h }, function (a, b) { var c = function () { function a(a, b, c, d) { void 0 === c && (c = {}), void 0 === d && (d = {}), this._identifier = a, this._definition = b, this._options = d, this._params = c || {} } return a.prototype.name = function () { return this._definition && this._definition.name || this._identifier }, a.prototype.identifier = function () { return this._identifier }, a.prototype.params = function () { return this._params }, a.prototype.$state = function () { return this._definition }, a.prototype.state = function () { return this._definition && this._definition.self }, a.prototype.options = function () { return this._options }, a.prototype.exists = function () { return !(!this._definition || !this._definition.self) }, a.prototype.valid = function () { return !this.error() }, a.prototype.error = function () { var a = this.options().relative; if (!this._definition && a) { var b = a.name ? a.name : a; return "Could not resolve '" + this.name() + "' from state '" + b + "'" } return this._definition ? this._definition.self ? void 0 : "State '" + this.name() + "' has an invalid definition" : "No such state '" + this.name() + "'" }, a }(); b.TargetState = c }, function (a, b, c) { var d = c(3), e = c(4), f = c(31), g = function () { function a(a, b) { this.transition = a, this.$view = b, this.treeChanges = a.treeChanges(), this.enteringViews = a.views("entering"), this.exitingViews = a.views("exiting") } return a.prototype.loadAllEnteringViews = function () { var a = this, b = function (b) { var c = d.find(a.treeChanges.to, d.propEq("state", b.context)).resolveInjector; return a.$view.load(b, c) }; return e.services.$q.all(this.enteringViews.map(b)).then(d.noop) }, a.prototype.loadAllControllerLocals = function () { var a = this, b = function (b) { function c() { } var g = f.annotateController(b.controller), h = d.find(a.treeChanges.to, d.propEq("state", b.context)).resolveInjector; return c.$inject = g, e.services.$q.all(h.getLocals(c)).then(function (a) { return b.locals = a }) }, c = this.enteringViews.filter(function (a) { return !!a.controller }).map(b); return e.services.$q.all(c).then(d.noop) }, a.prototype.updateViews = function () { var a = this.$view; this.exitingViews.forEach(function (b) { return a.reset(b) }), this.enteringViews.forEach(function (b) { return a.registerStateViewConfig(b) }), a.sync() }, a.prototype.registerHooks = function () { this.enteringViews.length && (this.transition.onStart({}, this.loadAllEnteringViews.bind(this)), this.transition.onFinish({}, this.loadAllControllerLocals.bind(this))), (this.exitingViews.length || this.enteringViews.length) && this.transition.onSuccess({}, this.updateViews.bind(this)) }, a }(); b.ViewHooks = g }, function (a, b, c) { function d(a) { var b = h.services.$injector, c = b.get("$controller"), d = b.instantiate; try { var e; return b.instantiate = function (a) { b.instantiate = d, e = b.annotate(a) }, c(a, {$scope: {}}), e } finally { b.instantiate = d } } function e(a, b) { h.services.$injector = a, h.services.$q = b } function f(a) { function b(b, c, d) { return h.services.locationConfig.html5Mode = function () { var b = a.html5Mode(); return b = i.isObject(b) ? b.enabled : b, b && d.history }, k(["replace", "url", "path", "search", "hash"], b, h.services.location), k(["port", "protocol", "host"], b, h.services.locationConfig), k(["baseHref"], c, h.services.locationConfig), l } l = new g.Router, k(["hashPrefix"], a, h.services.locationConfig), this.$get = b, b.$inject = ["$location", "$browser", "$sniffer"] } var g = c(32), h = c(4), i = c(3), j = angular.module("ui.router.angular1", []); b.annotateController = d, e.$inject = ["$injector", "$q"], j.run(e); var k = function (a, b, c) { return a.forEach(function (a) { return c[a] = b[a].bind(b) }) }, l = null; f.$inject = ["$locationProvider"], angular.module("ui.router.init", []).provider("ng1UIRouter", f), angular.module("ui.router.util").provider("$urlMatcherFactory", ["ng1UIRouterProvider", function () { return l.urlMatcherFactory }]), angular.module("ui.router.router").provider("$urlRouter", ["ng1UIRouterProvider", function () { return l.urlRouterProvider }]), angular.module("ui.router.state").provider("$state", ["ng1UIRouterProvider", function () { return l.stateProvider }]), angular.module("ui.router.init").run(["ng1UIRouter", function (a) { }]), angular.module("ui.router.state").run(["$state", function (a) { }]), angular.module("ui.router.util").run(["$urlMatcherFactory", function (a) { }]) }, function (a, b, c) { var d = c(33), e = c(38), f = c(14), g = function () { function a() { this.urlMatcherFactory = new d.UrlMatcherFactory, this.urlRouterProvider = new e.$UrlRouterProvider(this.urlMatcherFactory), this.stateProvider = new f.$StateProvider(this.urlRouterProvider, this.urlMatcherFactory) } return a }(); b.Router = g }, function (a, b, c) { function d() { return {strict: f.matcherConfig.strictMode(), caseInsensitive: f.matcherConfig.caseInsensitive()} } var e = c(3), f = c(34), g = c(36), h = function () { function a() { e.extend(this, {UrlMatcher: f.UrlMatcher, Param: g.Param}) } return a.prototype.caseInsensitive = function (a) { return f.matcherConfig.caseInsensitive(a) }, a.prototype.strictMode = function (a) { return f.matcherConfig.strictMode(a) }, a.prototype.defaultSquashPolicy = function (a) { return f.matcherConfig.defaultSquashPolicy(a) }, a.prototype.compile = function (a, b) { return new f.UrlMatcher(a, e.extend(d(), b)) }, a.prototype.isMatcher = function (a) { if (!e.isObject(a))return !1; var b = !0; return e.forEach(f.UrlMatcher.prototype, function (c, d) { e.isFunction(c) && (b = b && e.isDefined(a[d]) && e.isFunction(a[d])) }), b }, a.prototype.type = function (a, b, c) { var d = g.paramTypes.type(a, b, c); return e.isDefined(b) ? this : d }, a.prototype.$get = function () { return g.paramTypes.enqueue = !1, g.paramTypes._flushTypeQueue(), this }, a }(); b.UrlMatcherFactory = h }, function (a, b, c) { function d(a) { for (var c in a)b.hasOwnProperty(c) || (b[c] = a[c]) } d(c(35)), d(c(25)), d(c(33)), d(c(38)) }, function (a, b, c) { function d(a, b) { var c = ["", ""], d = a.replace(/[\\\[\]\^$*+?.()|{}]/g, "\\$&"); if (!b)return d; switch (b.squash) { case!1: c = ["(", ")" + (b.isOptional ? "?" : "")]; break; case!0: c = ["?(", ")?"]; break; default: c = ["(" + b.squash + "|", ")?"] } return d + c[0] + b.type.pattern.source + c[1] } var e = c(3), f = c(36), g = function (a, b, c) { return a[b] = a[b] || c() }, h = function () { function a(b, c) { var g = this; this.pattern = b, this.config = c, this._cache = { path: [], pattern: null }, this._children = [], this._params = [], this._segments = [], this._compiled = [], this.config = e.defaults(this.config, { params: {}, strict: !0, caseInsensitive: !1, paramMap: e.identity }); for (var h, i, j, k = /([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, l = /([:]?)([\w\[\]-]+)|\{([\w\[\]-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g, m = 0, n = [], o = function (c) { if (!a.nameValidator.test(c))throw new Error("Invalid parameter name '" + c + "' in pattern '" + b + "'"); if (e.find(g._params, e.propEq("id", c)))throw new Error("Duplicate parameter name '" + c + "' in pattern '" + b + "'") }, p = function (a, c) { var d = a[2] || a[3], h = c ? a[4] : a[4] || ("*" === a[1] ? ".*" : null); return { id: d, regexp: h, cfg: g.config.params[d], segment: b.substring(m, a.index), type: h ? f.paramTypes.type(h || "string") || e.inherit(f.paramTypes.type("string"), {pattern: new RegExp(h, g.config.caseInsensitive ? "i" : void 0)}) : null } }; (h = k.exec(b)) && (i = p(h, !1), !(i.segment.indexOf("?") >= 0));)o(i.id), this._params.push(f.Param.fromPath(i.id, i.type, this.config.paramMap(i.cfg, !1))), this._segments.push(i.segment), n.push([i.segment, e.tail(this._params)]), m = k.lastIndex; j = b.substring(m); var q = j.indexOf("?"); if (q >= 0) { var r = j.substring(q); if (j = j.substring(0, q), r.length > 0)for (m = 0; h = l.exec(r);)i = p(h, !0), o(i.id), this._params.push(f.Param.fromSearch(i.id, i.type, this.config.paramMap(i.cfg, !0))), m = k.lastIndex } this._segments.push(j), e.extend(this, { _compiled: n.map(function (a) { return d.apply(null, a) }).concat(d(j)), prefix: this._segments[0] }), Object.freeze(this) } return a.prototype.append = function (a) { return this._children.push(a), e.forEach(a._cache, function (b, c) { return a._cache[c] = e.isArray(b) ? [] : null }), a._cache.path = this._cache.path.concat(this), a }, a.prototype.isRoot = function () { return 0 === this._cache.path.length }, a.prototype.toString = function () { return this.pattern }, a.prototype.exec = function (a, b, c, d) { function f(a) { var b = function (a) { return a.split("").reverse().join("") }, c = function (a) { return a.replace(/\\-/g, "-") }, d = b(a).split(/-(?!\\)/), f = e.map(d, b); return e.map(f, c).reverse() } var h = this; void 0 === b && (b = {}), void 0 === d && (d = {}); var i = g(this._cache, "pattern", function () { return new RegExp(["^", e.unnest(h._cache.path.concat(h).map(e.prop("_compiled"))).join(""), h.config.strict === !1 ? "/?" : "", "$"].join(""), h.config.caseInsensitive ? "i" : void 0) }).exec(a); if (!i)return null; var j = this.parameters(), k = j.filter(function (a) { return !a.isSearch() }), l = j.filter(function (a) { return a.isSearch() }), m = this._cache.path.concat(this).map(function (a) { return a._segments.length - 1 }).reduce(function (a, b) { return a + b }), n = {}; if (m !== i.length - 1)throw new Error("Unbalanced capture group in route '" + this.pattern + "'"); for (var o = 0; m > o; o++) { for (var p = k[o], q = i[o + 1], r = 0; r < p.replace; r++)p.replace[r].from === q && (q = p.replace[r].to); q && p.array === !0 && (q = f(q)), n[p.id] = p.value(q) } return e.forEach(l, function (a) { n[a.id] = a.value(b[a.id]) }), c && (n["#"] = c), n }, a.prototype.parameters = function (a) { return void 0 === a && (a = {}), a.inherit === !1 ? this._params : e.unnest(this._cache.path.concat(this).map(e.prop("_params"))) }, a.prototype.parameter = function (a, b) { void 0 === b && (b = {}); var c = e.tail(this._cache.path); return e.find(this._params, e.propEq("id", a)) || b.inherit !== !1 && c && c.parameter(a) || null }, a.prototype.validates = function (a) { var b = this, c = function (a, b) { return !a || a.validates(b) }; return e.pairs(a || {}).map(function (a) { var d = a[0], e = a[1]; return c(b.parameter(d), e) }).reduce(e.allTrueR, !0) }, a.prototype.format = function (a) { function b(a) { return encodeURIComponent(a).replace(/-/g, function (a) { return "%5C%" + a.charCodeAt(0).toString(16).toUpperCase() }) } void 0 === a && (a = {}); var c = this._segments, d = c[0], f = !1, g = this.parameters({inherit: !1}), h = e.tail(this._cache.path); if (!this.validates(a))return null; g.map(function (g, h) { var i = h < c.length - 1, j = g.value(a[g.id]), k = g.isDefaultValue(j), l = k ? g.squash : !1, m = g.type.encode(j); if (!i) { if (null == m || k && l !== !1)return; return e.isArray(m) || (m = [m]), m = e.map(m, encodeURIComponent).join("&" + g.id + "="), d += (f ? "&" : "?") + (g.id + "=" + m), void(f = !0) } d += function (a, c) { return l === !0 ? a.match(c.match(/\/$/) ? /\/?(.*)/ : /(.*)/)[1] : e.isString(l) ? l + a : l !== !1 ? "" : null == m ? a : e.isArray(m) ? e.map(m, b).join("-") + a : g.type.raw ? m + a : encodeURIComponent(m) + a }(c[h + 1], d) }), a["#"] && (d += "#" + a["#"]); var i = ["#"].concat(g.map(e.prop("id"))); return (h && h.format(e.omit(a, i)) || "") + d }, a.nameValidator = /^\w+(-+\w+)*(?:\[\])?$/, a }(); b.UrlMatcher = h }, function (a, b, c) { function d(a) { for (var c in a)b.hasOwnProperty(c) || (b[c] = a[c]) } d(c(24)), d(c(27)), d(c(37)), d(c(26)) }, function (a, b, c) { function d() { function a() { function a(a, b) { return function () { e.forEach(a.split(" "), function (a) { return c[a].splice(c[a].indexOf(b), 1) }) } } function b(a, b) { c[a] && c[a].length && e.forEach(c[a], function (a) { return a(b) }) } var c = {}, d = {}; return f.prototype.$digest = function () { var a = this; e.forEach(this, function (c, e) { c !== d[e] && a.hasOwnProperty(e) && (d[e] = c, b(e, c)) }) }, f.prototype.$inherit = function (a, b, c) { var d, f = e.ancestors(b, c), g = {}, h = []; for (var i in f)if (f[i].params && (d = Object.keys(f[i].params), d.length))for (var j in d)h.indexOf(d[j]) >= 0 || (h.push(d[j]), g[d[j]] = this[d[j]]); return e.extend({}, g, a) }, f.prototype.$set = function (a, c) { var d = this, f = !1, g = !1; return c && e.forEach(a, function (a, b) { (c.parameter(b) || {}).dynamic !== !0 && (g = !0) }), g ? !1 : (e.forEach(a, function (a, c) { a !== d[c] && (d[c] = a, b(c), f = !0) }), this.$sync(), f) }, f.prototype.$sync = function () { return e.copy(this, d), this }, f.prototype.$off = function () { return c = {}, this }, f.prototype.$raw = function () { return e.omit(this, Object.keys(this).filter(f.prototype.hasOwnProperty.bind(f.prototype))) }, f.prototype.$localize = function (a, b) { return new f(e.pick(b || this, Object.keys(a.params))) }, f.prototype.$observe = function (b, d) { return e.forEach(b.split(" "), function (a) { return (c[a] || (c[a] = [])).push(d) }), a(b, d) }, new f } function b(a) { return a.$watch(function () { c.$digest() }), c } var c = a(); this.$get = b, b.$inject = ["$rootScope"] } var e = c(3), f = function () { function a(a) { void 0 === a && (a = {}), e.extend(this, a) } return a.prototype.$digest = function () { }, a.prototype.$inherit = function (a, b, c) { }, a.prototype.$set = function (a, b) { }, a.prototype.$sync = function () { }, a.prototype.$off = function () { }, a.prototype.$raw = function () { }, a.prototype.$localize = function (a, b) { }, a.prototype.$observe = function (a, b) { }, a }(); b.StateParams = f, d.$inject = [], angular.module("ui.router.state").provider("$stateParams", d) }, function (a, b, c) { function d(a) { function b(a) { var b = /^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source); return null != b ? b[1].replace(/\\(.)/g, "$1") : "" } function c(a, b) { return a.replace(/\$(\$|\d{1,2})/, function (a, c) { return b["$" === c ? 0 : Number(c)] }) } function d(a, b, c) { if (!c)return !1; var d = a.invoke(b, b, {$match: c}); return e.isDefined(d) ? d : !0 } function h(a) { function b(a, b, c) { var d = f.services.locationConfig.baseHref(); return "/" === d ? a : b ? d.slice(0, -1) + a : c ? d.slice(1) + a : a } function c(a) { function b(a) { var b = a(f.services.$injector, g); return b ? (e.isString(b) && (g.replace(), g.url(b)), !0) : !1 } if (!a || !a.defaultPrevented) { var c, d = j.length; for (c = 0; d > c; c++)if (b(j[c]))return; k && b(k) } } function d() { return i = i || a.$on("$locationChangeSuccess", c) } var h = g.url(); return l || d(), { sync: function () { c() }, listen: function () { return d() }, update: function (a) { return a ? void(h = g.url()) : void(g.url() !== h && (g.url(h), g.replace())) }, push: function (a, b, c) { g.url(a.format(b || {})), c && c.replace && g.replace() }, href: function (a, c, d) { if (!a.validates(c))return null; var e = a.format(c); d = d || {}; var g = f.services.locationConfig, h = g.html5Mode(); if (h || null === e || (e = "#" + g.hashPrefix() + e), e = b(e, h, d.absolute), !d.absolute || !e)return e; var i = !h && e ? "/" : "", j = g.port(); return j = 80 === j || 443 === j ? "" : ":" + j, [g.protocol(), "://", g.host(), j, i, e].join("") } } } var i, j = [], k = null, l = !1; this.rule = function (a) { if (!e.isFunction(a))throw new Error("'rule' must be a function"); return j.push(a), this }, this.otherwise = function (a) { if (!e.isFunction(a) && !e.isString(a))throw new Error("'rule' must be a string or function"); return k = e.isString(a) ? function () { return a } : a, this }, this.when = function (h, i) { var j, k = e.isString(i); if (e.isString(h) && (h = a.compile(h)), !k && !e.isFunction(i) && !e.isArray(i))throw new Error("invalid 'handler' in when()"); var l = { matcher: function (b, c) { return k && (j = a.compile(c), c = ["$match", j.format.bind(j)]), e.extend(function () { return d(f.services.$injector, c, b.exec(g.path(), g.search(), g.hash())) }, {prefix: e.isString(b.prefix) ? b.prefix : ""}) }, regex: function (a, h) { if (a.global || a.sticky)throw new Error("when() RegExp must not be global or sticky"); return k && (j = h, h = ["$match", function (a) { return c(j, a) }]), e.extend(function () { return d(f.services.$injector, h, a.exec(g.path())) }, {prefix: b(a)}) } }, m = {matcher: a.isMatcher(h), regex: h instanceof RegExp}; for (var n in m)if (m[n])return this.rule(l[n](h, i)); throw new Error("invalid 'what' in when()") }, this.deferIntercept = function (a) { void 0 === a && (a = !0), l = a }, this.$get = h, h.$inject = ["$rootScope"] } var e = c(3), f = c(4), g = f.services.location; b.$UrlRouterProvider = d }, function (a, b) { var c = function () { function a(a) { this.transition = a } return a.prototype.registerHooks = function () { this.registerOnEnterHooks(), this.registerOnRetainHooks(), this.registerOnExitHooks() }, a.prototype.registerOnEnterHooks = function () { var a = this, b = function (b) { return a.transition.onEnter({to: b.name}, b.onEnter) }; this.transition.entering().filter(function (a) { return !!a.onEnter }).forEach(b) }, a.prototype.registerOnRetainHooks = function () { var a = this, b = function (b) { return a.transition.onRetain({}, b.onRetain) }; this.transition.retained().filter(function (a) { return !!a.onRetain }).forEach(b) }, a.prototype.registerOnExitHooks = function () { var a = this, b = function (b) { return a.transition.onExit({from: b.name}, b.onExit) }; this.transition.exiting().filter(function (a) { return !!a.onExit }).forEach(b) }, a }(); b.EnterExitHooks = c }, function (a, b, c) { var d = c(3), e = c(19), f = e.ResolvePolicy[e.ResolvePolicy.LAZY], g = e.ResolvePolicy[e.ResolvePolicy.EAGER], h = function () { function a(a) { this.transition = a } return a.prototype.registerHooks = function () { function a(a) { return d.tail(c.to).resolveContext.resolvePath(d.extend({transition: a}, {resolvePolicy: g})) } function b(a, b) { var e = d.find(c.entering, d.propEq("state", a)); return e.resolveContext.resolvePathElement(e.state, d.extend({transition: b}, {resolvePolicy: f})) } var c = this.transition.treeChanges(); a.$inject = ["$transition$"], b.$inject = ["$state$", "$transition$"], this.transition.onStart({}, a, {priority: 1e3}), this.transition.onEnter({}, b, {priority: 1e3}) }, a }(); b.ResolveHooks = h }, function (a, b, c) { var d = c(3), e = c(36), f = function (a) { if (!d.isString(a))return !1; var b = "^" === a.charAt(0); return {val: b ? a.substring(1) : a, root: b} }, g = function () { function a(a, b, c) { this.matcher = b; var g = this; this.builders = { parent: [function (c) { return c === a() ? null : b.find(g.parentName(c)) || a() }], data: [function (a) { return a.parent && a.parent.data && (a.data = a.self.data = d.extend({}, a.parent.data, a.data)), a.data }], url: [function (b) { var e = b, g = f(e.url), h = b.parent, i = g ? c.compile(g.val, { params: b.params || {}, paramMap: function (a, b) { return e.reloadOnSearch === !1 && b && (a = d.extend(a || {}, {dynamic: !0})), a } }) : e.url; if (!i)return null; if (!c.isMatcher(i))throw new Error("Invalid url '" + i + "' in state '" + b + "'"); return g && g.root ? i : (h && h.navigable || a()).url.append(i) }], navigable: [function (b) { return b !== a() && b.url ? b : b.parent ? b.parent.navigable : null }], params: [function (a) { var b = function (a, b) { return e.Param.fromConfig(b, null, a) }, c = a.url && a.url.parameters({inherit: !1}) || [], f = d.values(d.map(d.omit(a.params || {}, c.map(d.prop("id"))), b)); return c.concat(f).map(function (a) { return [a.id, a] }).reduce(d.applyPairs, {}) }], views: [function (a) { var b = {}, c = ["templateProvider", "templateUrl", "template", "notify", "async"], e = ["controller", "controllerProvider", "controllerAs"], f = c.concat(e); return d.forEach(a.views || {$default: d.pick(a, f)}, function (c, f) { f = f || "$default", d.forEach(e, function (b) { a[b] && !c[b] && (c[b] = a[b]) }), Object.keys(c).length > 0 && (b[f] = c) }), b }], path: [function (a) { return a.parent ? a.parent.path.concat(a) : [a] }], includes: [function (a) { var b = a.parent ? d.extend({}, a.parent.includes) : {}; return b[a.name] = !0, b }] } } return a.prototype.builder = function (a, b) { var c = this.builders, e = c[a] || []; return d.isString(a) && !d.isDefined(b) ? e.length > 1 ? e : e[0] : d.isString(a) && d.isFunction(b) ? (c[a] = e, c[a].push(b), function () { return c[a].splice(c[a].indexOf(b, 1)) && null }) : void 0 }, a.prototype.build = function (a) { var b = this, c = b.matcher, e = b.builders, f = this.parentName(a); if (f && !c.find(f))return null; for (var g in e)if (e.hasOwnProperty(g)) { var h = e[g].reduce(function (a, b) { return function (c) { return b(c, a) } }, d.noop); a[g] = h(a) } return a }, a.prototype.parentName = function (a) { var b = a.name || ""; return -1 !== b.indexOf(".") ? b.substring(0, b.lastIndexOf(".")) : a.parent ? d.isString(a.parent) ? a.parent : a.parent.name : "" }, a.prototype.name = function (a) { var b = a.name; if (-1 !== b.indexOf(".") || !a.parent)return b; var c = d.isString(a.parent) ? a.parent : a.parent.name; return c ? c + "." + b : b }, a }(); b.StateBuilder = g }, function (a, b, c) { function d(a, b) { var c, d = a.match(/^\s*({[^}]*})\s*$/); if (d && (a = b + "(" + d[1] + ")"), c = a.replace(/\n/g, " ").match(/^([^(]+?)\s*(\((.*)\))?$/), !c || 4 !== c.length)throw new Error("Invalid state ref '" + a + "'"); return {state: c[1], paramExpr: c[3] || null} } function e(a) { var b = a.parent().inheritedData("$uiView"); return b && b.context && b.context.name ? b.context : void 0 } function f(a, b) { return { restrict: "A", require: ["?^uiSrefActive", "?^uiSrefActiveEq"], link: function (c, f, g, j) { var k = d(g.uiSref, a.current.name), l = null, m = e(f) || a.$current, n = null, o = "A" === f.prop("tagName"), p = "FORM" === f[0].nodeName, q = p ? "action" : "href", r = !0, s = c.$eval(g.uiSrefOpts), t = { relative: m, inherit: !0 }, u = h.defaults(s, t, i.defaultTransOpts), v = function (b) { if (b && (l = h.copy(b)), r) { n = a.href(k.state, l, u); var c = j[1] || j[0]; return c && c.$$addStateInfo(k.state, l), null === n ? (r = !1, !1) : void g.$set(q, n) } }; k.paramExpr && (c.$watch(k.paramExpr, function (a) { a !== l && v(a) }, !0), l = h.copy(c.$eval(k.paramExpr))), v(), p || f.bind("click", function (c) { var d = c.which || c.button; if (!(d > 1 || c.ctrlKey || c.metaKey || c.shiftKey || f.attr("target"))) { var e = b(function () { a.go(k.state, l, u) }); c.preventDefault(); var g = o && !n ? 1 : 0; c.preventDefault = function () { g-- <= 0 && b.cancel(e) } } }) } } } function g(a, b, c) { return { restrict: "A", controller: ["$scope", "$element", "$attrs", "$timeout", "$transitions", function (b, f, g, i, j) { function k(b, c, d) { var g = a.get(b, e(f)), h = m(b, c); t.push({state: g || {name: b}, params: c, hash: h}), u[h] = d } function l(a) { a.promise.then(n) } function m(a, c) { if (!h.isString(a))throw new Error("state should be a string"); return h.isObject(c) ? a + h.toJson(c) : (c = b.$eval(c), h.isObject(c) ? a + h.toJson(c) : a) } function n() { for (var a = 0; a < t.length; a++)q(t[a].state, t[a].params) ? o(f, u[t[a].hash]) : p(f, u[t[a].hash]), r(t[a].state, t[a].params) ? o(f, s) : p(f, s) } function o(a, b) { i(function () { a.addClass(b) }) } function p(a, b) { a.removeClass(b) } function q(b, c) { return a.includes(b.name, c) } function r(b, c) { return a.is(b.name, c) } var s, t = [], u = {}; s = c(g.uiSrefActiveEq || "", !1)(b); var v = b.$eval(g.uiSrefActive) || c(g.uiSrefActive || "", !1)(b); h.isObject(v) && h.forEach(v, function (c, e) { if (h.isString(c)) { var f = d(c, a.current.name); k(f.state, b.$eval(f.paramExpr), e) } }), this.$$addStateInfo = function (a, b) { h.isObject(v) && t.length > 0 || (k(a, b, v), n()) }, b.$on("$stateChangeSuccess", n), l.$inject = ["$transition$"]; var w = j.onStart({}, l); b.$on("$destroy", w) }] } } var h = c(3), i = c(9); f.$inject = ["$state", "$timeout"], g.$inject = ["$state", "$stateParams", "$interpolate"], angular.module("ui.router.state").directive("uiSref", f).directive("uiSrefActive", g).directive("uiSrefActiveEq", g) }, function (a, b) { function c(a) { return function (b) { return a.is(b) } } function d(a) { return function (b, c, d) { return a.includes(b, c, d) } } c.$inject = ["$state"], b.$IsStateFilter = c, d.$inject = ["$state"], b.$IncludedByStateFilter = d, angular.module("ui.router.state").filter("isState", c).filter("includedByState", d) }, function (a, b, c) { var d = c(2), e = function () { function a(a) { d.extend(this, a) } return a.prototype.is = function (a) { return this === a || this.self === a || this.fqn() === a }, a.prototype.fqn = function () { if (!(this.parent && this.parent instanceof this.constructor))return this.name; var a = this.parent.fqn(); return a ? a + "." + this.name : this.name }, a.prototype.root = function () { return this.parent && this.parent.root() || this }, a.prototype.parameters = function (a) { a = d.defaults(a, {inherit: !0}); var b = a.inherit && this.parent && this.parent.parameters() || []; return b.concat(d.values(this.params)) }, a.prototype.parameter = function (a, b) { return void 0 === b && (b = {}), this.url && this.url.parameter(a, b) || d.find(d.values(this.params), d.propEq("id", a)) || b.inherit && this.parent && this.parent.parameter(a) }, a.prototype.toString = function () { return this.fqn() }, a }(); b.State = e }, function (a, b, c) { var d = c(3), e = function () { function a(a) { this._states = a } return a.prototype.isRelative = function (a) { return a = a || "", 0 === a.indexOf(".") || 0 === a.indexOf("^") }, a.prototype.find = function (a, b) { if (!a && "" !== a)return void 0; var c = d.isString(a), e = c ? a : a.name; this.isRelative(e) && (e = this.resolvePath(e, b)); var f = this._states[e]; return !f || !c && (c || f !== a && f.self !== a) ? void 0 : f }, a.prototype.resolvePath = function (a, b) { if (!b)throw new Error("No reference point given for path '" + a + "'"); for (var c = this.find(b), d = a.split("."), e = 0, f = d.length, g = c; f > e; e++)if ("" !== d[e] || 0 !== e) { if ("^" !== d[e])break; if (!g.parent)throw new Error("Path '" + a + "' not valid for state '" + c.name + "'"); g = g.parent } else g = c; var h = d.slice(e).join("."); return g.name + (g.name && h ? "." : "") + h }, a }(); b.StateMatcher = e }, function (a, b, c) { var d = c(3), e = c(12), f = function () { function a(a, b, c, d) { this.states = a, this.builder = b, this.$urlRouterProvider = c, this.$state = d, this.autoFlush = !1, this.queue = [] } return a.prototype.register = function (a, b) { var c = this, f = c.states, g = c.queue, h = c.$state, i = d.inherit(new e.State, d.extend({}, a, { self: a, resolve: a.resolve || {}, toString: function () { return a.name } })); if (!d.isString(i.name))throw new Error("State must have a valid name"); if (f.hasOwnProperty(i.name) || -1 !== d.pluck(g, "name").indexOf(i.name))throw new Error("State '" + i.name + "' is already defined"); return g[b ? "unshift" : "push"](i), this.autoFlush && this.flush(h), i }, a.prototype.flush = function (a) { for (var b, c, d, e = this, f = e.queue, g = e.states, h = e.builder, i = [], j = {}; f.length > 0;)if (c = f.shift(), b = h.build(c), d = i.indexOf(c), b) { if (g.hasOwnProperty(c.name))throw new Error("State '" + name + "' is already defined"); g[c.name] = c, this.attachRoute(a, c), d >= 0 && i.splice(d, 1) } else { var k = j[c.name]; if (j[c.name] = f.length, d >= 0 && k === f.length)throw new Error("Cannot register orphaned state '" + c.name + "'"); 0 > d && i.push(c), f.push(c) } return g }, a.prototype.attachRoute = function (a, b) { var c = this.$urlRouterProvider; !b[d.abstractKey] && b.url && c.when(b.url, ["$match", "$stateParams", function (c, e) { a.$current.navigable === b && d.equalForKeys(c, e) || a.transitionTo(b, c, { inherit: !0, location: !1 }) }]) }, a }(); b.StateQueueManager = f }, function (a, b, c) { var d = c(3), e = c(6), f = c(4), g = c(28), h = c(12), i = new g.RejectFactory, j = { async: !0, rejectIfSuperseded: !0, current: d.noop, transition: null, traceData: {} }, k = function () { function a(a, b, c, f) { var g = this; this.fn = a, this.locals = b, this.resolveContext = c, this.options = f, this.isSuperseded = function () { return g.options.current() !== g.options.transition }, this.mapHookResult = d.pattern([[this.isSuperseded, function () { return i.superseded(g.options.current()) }], [d.eq(!1), d.val(i.aborted("Hook aborted transition"))], [d.is(h.TargetState), function (a) { return i.redirected(a) }], [d.isPromise, function (a) { return a.then(g.handleHookResult.bind(g)) }]]), this.invokeStep = function (a) { var b = g, c = b.options, f = b.fn, h = b.resolveContext, j = d.extend({}, g.locals, a); if (e.trace.traceHookInvocation(g, c), c.rejectIfSuperseded && g.isSuperseded())return i.superseded(c.current()); if (!c.async) { var k = h.invokeNow(f, j, c); return g.handleHookResult(k) } return h.invokeLater(f, j, c).then(g.handleHookResult.bind(g)) }, this.options = d.defaults(f, j) } return a.prototype.handleHookResult = function (a) { if (!d.isDefined(a))return void 0; e.trace.traceHookResult(a, void 0, this.options); var b = this.mapHookResult(a); return b && e.trace.traceHookResult(a, b, this.options), b }, a.prototype.toString = function () { var a = this, b = a.options, c = a.fn, e = d.parse("traceData.hookType")(b) || "internal", f = d.parse("traceData.context.state.name")(b) || d.parse("traceData.context")(b) || "unknown", g = d.fnToString(c); return e + " context: " + f + ", " + d.maxLength(200, g) }, a.runSynchronousHooks = function (b, c, e) { void 0 === c && (c = {}), void 0 === e && (e = !1); for (var g = [], h = 0; h < b.length; h++)try { g.push(b[h].invokeStep(c)) } catch (i) { if (!e)throw i; console.log("Swallowed exception during synchronous hook handler: " + i) } var j = g.filter(a.isRejection); return j.length ? j[0] : g.filter(d.not(a.isRejection)).filter(d.isPromise).reduce(function (a, b) { return a.then(d.val(b)) }, f.services.$q.when()) }, a.isRejection = function (a) { return a && a.reason instanceof g.TransitionRejection && a }, a }(); b.TransitionHook = k }, function (a, b, c) { function d() { this._reinit.bind(b.$transitions)(), this.$get = function () { return b.$transitions } } var e = c(8), f = c(11); b.defaultTransOpts = { location: !0, relative: null, inherit: !1, notify: !0, reload: !1, custom: {}, current: function () { return null } }; var g = function () { function a() { this._defaultErrorHandler = function (a) { a instanceof Error && console.log(a) }, this._reinit() } return a.prototype.defaultErrorHandler = function (a) { return this._defaultErrorHandler = a || this._defaultErrorHandler }, a.prototype._reinit = function () { f.HookRegistry.mixin(new f.HookRegistry, this) }, a.prototype.create = function (a, b) { return new e.Transition(a, b) }, a }(); b.$transitions = new g, d.prototype = b.$transitions, b.$transitionsProvider = d, angular.module("ui.router.state").provider("$transitions", b.$transitionsProvider) }, function (a, b, c) { function d(a) { for (var c in a)b.hasOwnProperty(c) || (b[c] = a[c]) } d(c(50)), d(c(21)), d(c(51)), d(c(52)) }, function (a, b, c) { function d(a, b) { this.fromConfig = function (a, b, c) { return e.isDefined(a.template) ? this.fromString(a.template, b) : e.isDefined(a.templateUrl) ? this.fromUrl(a.templateUrl, b) : e.isDefined(a.templateProvider) ? this.fromProvider(a.templateProvider, b, c) : null }, this.fromString = function (a, b) { return e.isFunction(a) ? a(b) : a }, this.fromUrl = function (c, d) { return e.isFunction(c) && (c = c(d)), null == c ? null : a.get(c, { cache: b, headers: {Accept: "text/html"} }).then(e.prop("data")) }, this.fromProvider = function (a, b, c) { return c(a) } } var e = c(3); d.$inject = ["$http", "$templateCache"], angular.module("ui.router.util").service("$templateFactory", d) }, function (a, b, c) { function d(a, b, c, d, e) { function h(a, c) { return { enter: function (a, c, d) { angular.version.minor > 2 ? b.enter(a, null, c).then(d) : b.enter(a, null, c, d) }, leave: function (a, c) { angular.version.minor > 2 ? b.leave(a).then(c) : b.leave(a, c) } } } function i(a, b) { return a === b } var j = {context: a.rootContext()}, k = { count: 0, restrict: "ECA", terminal: !0, priority: 400, transclude: "element", compile: function (b, e, l) { return function (b, e, m) { function n(a) { i(x, a) || (g.trace.traceUiViewConfigUpdated(A, a && a.context), x = a, p(a)) } function o() { q && (g.trace.traceUiViewEvent("Removing (previous) el", A), q.remove(), q = null), s && (g.trace.traceUiViewEvent("Destroying (previous) scope", A), s.$destroy(), s = null), r && (g.trace.traceUiViewEvent("Animate out (previous)", A), w.leave(r, function () { q = null }), q = r, r = null) } function p(a) { a = a || {}; var d = b.$new(); g.trace.traceUiViewScopeCreated(A, d), f.extend(A, { context: a.context, $template: a.template, $controller: a.controller, $controllerAs: a.controllerAs, $locals: a.locals }); var h = l(d, function (a) { w.enter(a.data("$uiView", A), e, function () { s && s.$emit("$viewContentAnimationEnded"), (f.isDefined(v) && !v || b.$eval(v)) && c(a) }), o() }); r = h, s = d, s.$emit("$viewContentLoaded", a || x), s.$eval(u) } var q, r, s, t, u = m.onload || "", v = m.autoscroll, w = h(m, b), x = void 0, y = e.inheritedData("$uiView") || j, z = d(m.uiView || m.name || "")(b) || "$default", A = { id: k.count++, name: z, fqn: y.name ? y.fqn + "." + z : z, config: null, configUpdated: n, get creationContext() { return y.context } }; g.trace.traceUiViewEvent("Linking", A), e.data("$uiView", A), p(), t = a.registerUiView(A), b.$on("$destroy", function () { g.trace.traceUiViewEvent("Destroying/Unregistering", A), t() }) } } }; return k } function e(a, b, c, d, e) { return { restrict: "ECA", priority: -400, compile: function (c) { var d = c.html(); return function (c, e) { var h = e.data("$uiView"); if (h) { e.html(h.$template || d), g.trace.traceUiViewFill(h, e.html()); var i = a(e.contents()), j = h.$controller, k = h.$controllerAs; if (j) { var l = h.$locals, m = b(j, f.extend(l, {$scope: c})); k && (c[k] = m), e.data("$ngControllerController", m), e.children().data("$ngControllerController", m) } i(c) } } } } } var f = c(3), g = c(6); d.$inject = ["$view", "$animate", "$uiViewScroll", "$interpolate", "$q"], e.$inject = ["$compile", "$controller", "$interpolate", "$injector", "$q"], angular.module("ui.router.state").directive("uiView", d), angular.module("ui.router.state").directive("uiView", e) }, function (a, b) { function c() { var a = !1; this.useAnchorScroll = function () { a = !0 }, this.$get = ["$anchorScroll", "$timeout", function (b, c) { return a ? b : function (a) { return c(function () { a[0].scrollIntoView() }, 0, !1) } }] } angular.module("ui.router.state").provider("$uiViewScroll", c) }]) });