diff --git a/package-lock.json b/package-lock.json
index 9d580b9..182c5e0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -542,9 +542,9 @@
}
},
"@types/node": {
- "version": "11.13.17",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.17.tgz",
- "integrity": "sha512-7W3kSMa8diVH6s24a8Qrmvwu+vG3ahOC/flMHFdWSdnPYoQI0yPO84h5zOWYXAha2Npn3Pw3SSuQSwBUfaniyQ=="
+ "version": "11.13.18",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-11.13.18.tgz",
+ "integrity": "sha512-sMHdXLccscaxI+Hlzz58yLQue3lQyXP+6aQniDRi5oju3n0123kcjhicVGF20WF7cHiwJ2vxMbXc4skOclosoA=="
},
"@types/node-fetch": {
"version": "2.5.0",
diff --git a/package.json b/package.json
index 62e0ce5..fb8be2a 100644
--- a/package.json
+++ b/package.json
@@ -17,11 +17,12 @@
"dependencies": {
"@types/angular": "^1.6.55",
"@types/express": "^4.17.0",
- "@types/node": "^11.13.17",
+ "@types/node": "^11.13.18",
"@types/webpack-env": "^1.14.0",
"@uirouter/angularjs": "^1.0.5",
"angular": "^1.7.8",
"autoprefixer": "^9.6.1",
+ "bsert": "0.0.10",
"bsock": "^0.1.9",
"css-loader": "^3.1.0",
"cssnano": "^4.1.10",
@@ -40,8 +41,7 @@
"socket.io": "^2.2.0",
"style-loader": "^0.23.1",
"ts-loader": "^6.0.4",
- "tslint-loader": "^3.5.4",
- "bsert": "0.0.10"
+ "tslint-loader": "^3.5.4"
},
"devDependencies": {
"@types/angular": "^1.6.27",
diff --git a/src/components/Root/index.ts b/src/components/Root/index.ts
index 50d36d4..52b60c5 100644
--- a/src/components/Root/index.ts
+++ b/src/components/Root/index.ts
@@ -1,4 +1,4 @@
-import html from './index'
+const html = require('./index.html').default
import './index.scss'
import rootCtrl from './controller'
diff --git a/src/index.html b/src/index.html
index ee63033..ad45a2b 100644
--- a/src/index.html
+++ b/src/index.html
@@ -2,6 +2,7 @@
+
Document
diff --git a/src/views/todo-list/index.ts b/src/views/todo-list/index.ts
index 6a9769b..59fc0e4 100644
--- a/src/views/todo-list/index.ts
+++ b/src/views/todo-list/index.ts
@@ -1,5 +1,5 @@
import ctrl from './controller'
-import html from './index'
+const html = require('./index.html').default
import './index.scss'
export default {
diff --git a/static/index.html b/static/index.html
index 5aaf8db..6776c48 100644
--- a/static/index.html
+++ b/static/index.html
@@ -1 +1 @@
- Document
\ No newline at end of file
+ Document
\ No newline at end of file
diff --git a/static/js/app.0fe5d117.js b/static/js/app.0fe5d117.js
deleted file mode 100644
index e9884e9..0000000
--- a/static/js/app.0fe5d117.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(e){function t(t){for(var n,l,i=t[0],c=t[1],s=t[2],a=0,d=[];a{t.state(e)})}["todo-list"].forEach(e=>{const t=o(14)(`./${e}/route`).default,{children:r}=t;let u=[];r&&r.length>0&&(u=r.map(e=>(e.name=`${t.name}.${e.name}`,e))),delete t.children,u.push(t),n=n.concat(u)}),r.$inject=["$urlRouterProvider","$stateProvider"],t.default=r},function(e,t,o){var n={"./todo-list/route":15};function r(e){var t=u(e);return o(t)}function u(e){if(!o.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}r.keys=function(){return Object.keys(n)},r.resolve=u,e.exports=r,r.id=14},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"todolist",url:"/todolist",component:"todolist"}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(4),r=o(5);t.default=n.module("components",[]).component("root",r.default).name},function(e,t,o){},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){this.$rootScope=e}}n.$inject=["$rootScope"],t.default=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(4),r=o(6);t.default=n.module("wallets",[]).component("todolist",r.default).name},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){this.bip32=e,this.todos=[],this.id=0,this.todoTypes=["All","Todo","Done"],this.visibleType="All"}handleSubmit(e){e.keyCode}toggleType(e){this.visibleType=e}}n.$inject=["bip32"],t.default=n},function(e,t,o){},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(4),r=o(23);t.default=n.module("filters",[]).filter("todosVisible",()=>r.default).name},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){switch(t){case"All":return e;case"Todo":return e.filter(e=>!e.complete);case"Done":return e.filter(e=>e.complete);default:throw new Error("Unknown type "+t)}}}]);
\ No newline at end of file
diff --git a/static/js/app.246f7cfe.js b/static/js/app.246f7cfe.js
new file mode 100644
index 0000000..598567d
--- /dev/null
+++ b/static/js/app.246f7cfe.js
@@ -0,0 +1 @@
+!function(e){function t(t){for(var n,s,i=t[0],a=t[1],c=t[2],d=0,f=[];d{t.state(e)})}["todo-list"].forEach(e=>{const t=o(12)(`./${e}/route`).default,{children:l}=t;let r=[];l&&l.length>0&&(r=l.map(e=>(e.name=`${t.name}.${e.name}`,e))),delete t.children,r.push(t),n=n.concat(r)}),l.$inject=["$urlRouterProvider","$stateProvider"],t.default=l},function(e,t,o){var n={"./todo-list/route":13};function l(e){var t=r(e);return o(t)}function r(e){if(!o.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}l.keys=function(){return Object.keys(n)},l.resolve=r,e.exports=l,l.id=12},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"todolist",url:"/todolist",component:"todolist"}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(4),l=o(15);t.default=n.module("components",[]).component("root",l.default).name},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(16).default;o(17);const l=o(18);t.default={template:n,controller:l.default}},function(e,t,o){"use strict";o.r(t),t.default=' '},function(e,t,o){},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){this.$rootScope=e}}n.$inject=["$rootScope"],t.default=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(4),l=o(20);t.default=n.module("wallets",[]).component("todolist",l.default).name},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(21),l=o(22).default;o(23),t.default={template:l,controller:n.default}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){this.bip32=e,this.todos=[],this.id=0,this.todoTypes=["All","Todo","Done"],this.visibleType="All"}handleSubmit(e){e.keyCode}toggleType(e){this.visibleType=e}}n.$inject=["bip32"],t.default=n},function(e,t,o){"use strict";o.r(t),t.default=' '},function(e,t,o){},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=o(4),l=o(25);t.default=n.module("filters",[]).filter("todosVisible",()=>l.default).name},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){switch(t){case"All":return e;case"Todo":return e.filter(e=>!e.complete);case"Done":return e.filter(e=>e.complete);default:throw new Error("Unknown type "+t)}}}]);
\ No newline at end of file
diff --git a/static/js/vendor.ec7aebc2.js b/static/js/vendor.8f6b1fe6.js
similarity index 61%
rename from static/js/vendor.ec7aebc2.js
rename to static/js/vendor.8f6b1fe6.js
index cce0ad8..444b900 100644
--- a/static/js/vendor.ec7aebc2.js
+++ b/static/js/vendor.8f6b1fe6.js
@@ -1,7 +1,7 @@
-(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(t,e,n){"use strict";(function(t){n.d(e,"M",function(){return a}),n.d(e,"x",function(){return s}),n.d(e,"Q",function(){return c}),n.d(e,"w",function(){return l}),n.d(e,"r",function(){return f}),n.d(e,"q",function(){return h}),n.d(e,"y",function(){return p}),n.d(e,"E",function(){return d}),n.d(e,"n",function(){return v}),n.d(e,"A",function(){return $}),n.d(e,"z",function(){return m}),n.d(e,"b",function(){return g}),n.d(e,"L",function(){return y}),n.d(e,"d",function(){return b}),n.d(e,"K",function(){return w}),n.d(e,"c",function(){return O}),n.d(e,"p",function(){return S}),n.d(e,"o",function(){return E}),n.d(e,"D",function(){return j}),n.d(e,"f",function(){return x}),n.d(e,"H",function(){return C}),n.d(e,"F",function(){return _}),n.d(e,"I",function(){return k}),n.d(e,"s",function(){return R}),n.d(e,"t",function(){return T}),n.d(e,"C",function(){return A}),n.d(e,"B",function(){return P}),n.d(e,"U",function(){return V}),n.d(e,"e",function(){return M}),n.d(e,"g",function(){return I}),n.d(e,"T",function(){return N}),n.d(e,"v",function(){return U}),n.d(e,"J",function(){return D}),n.d(e,"R",function(){return L}),n.d(e,"S",function(){return H}),n.d(e,"u",function(){return q}),n.d(e,"l",function(){return F}),n.d(e,"k",function(){return B}),n.d(e,"j",function(){return z}),n.d(e,"G",function(){return W}),n.d(e,"i",function(){return G}),n.d(e,"h",function(){return J}),n.d(e,"P",function(){return K}),n.d(e,"m",function(){return Y}),n.d(e,"a",function(){return Z}),n.d(e,"N",function(){return X}),n.d(e,"O",function(){return tt});var r=n(1),i=n(2),o=n(3),a="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||void 0,u=a.angular||{},s=u.fromJson||JSON.parse.bind(JSON),c=u.toJson||JSON.stringify.bind(JSON),l=u.forEach||function(t,e,n){if(Object(r.a)(t))return t.forEach(e,n);Object.keys(t).forEach(function(n){return e(t[n],n)})},f=Object.assign||Z,h=u.equals||Q;function p(t){return t}function d(){}function v(t,e,n,r,i){void 0===i&&(i=!1);var o=function(e){return t()[e].bind(n())};return(r=r||Object.keys(t())).reduce(function(t,n){var r;return t[n]=i?(r=n,function(){return e[r]=o(r),e[r].apply(null,arguments)}):o(n),t},e)}var $=function(t,e){return f(Object.create(t),e)},m=Object(i.e)(g);function g(t,e){return-1!==t.indexOf(e)}var y=Object(i.e)(b);function b(t,e){var n=t.indexOf(e);return n>=0&&t.splice(n,1),t}var w=Object(i.e)(O);function O(t,e){return t.push(e),e}var S=function(t){return t.slice().forEach(function(e){"function"==typeof e&&e(),y(t,e)})};function E(t){for(var e=[],n=1;n=n?t.apply(null,r):function(){return e(r.concat([].slice.apply(arguments)))}}(e)}function i(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function o(){for(var t=[],e=0;ethis._limit&&this.evict(),t},t.prototype.evict=function(){var t=this._items.shift();return this._evictListeners.forEach(function(e){return e(t)}),t},t.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},t.prototype.clear=function(){var t=this._items;return this._items=[],t},t.prototype.size=function(){return this._items.length},t.prototype.remove=function(t){var e=this._items.indexOf(t);return e>-1&&this._items.splice(e,1)[0]},t.prototype.peekTail=function(){return this._items[this._items.length-1]},t.prototype.peekHead=function(){if(this.size())return this._items[0]},t}();!function(t){t[t.SUPERSEDED=2]="SUPERSEDED",t[t.ABORTED=3]="ABORTED",t[t.INVALID=4]="INVALID",t[t.IGNORED=5]="IGNORED",t[t.ERROR=6]="ERROR"}(i||(i={}));var d=0,v=function(){function t(t,e,n){this.$id=d++,this.type=t,this.message=e,this.detail=n}return t.isRejectionPromise=function(e){return e&&"function"==typeof e.then&&Object(f.h)(t)(e._transitionRejection)},t.superseded=function(e,n){var r=new t(i.SUPERSEDED,"The transition has been superseded by a different transition",e);return n&&n.redirected&&(r.redirected=!0),r},t.redirected=function(e){return t.superseded(e,{redirected:!0})},t.invalid=function(e){return new t(i.INVALID,"This transition is invalid",e)},t.ignored=function(e){return new t(i.IGNORED,"The transition was ignored",e)},t.aborted=function(e){return new t(i.ABORTED,"The transition has been aborted",e)},t.errored=function(e){return new t(i.ERROR,"The transition errored",e)},t.normalize=function(e){return Object(f.h)(t)(e)?e:t.errored(e)},t.prototype.toString=function(){var t,e=(t=this.detail)&&t.toString!==Object.prototype.toString?t.toString():S(t);return"Transition Rejection($id: "+this.$id+" type: "+this.type+", message: "+this.message+", detail: "+e+")"},t.prototype.toPromise=function(){return Object(s.r)(Object(s.O)(this),{_transitionRejection:this})},t}();function $(t,e){return e.length<=t?e:e.substr(0,t-3)+"..."}function m(t,e){for(;e.length "+S(t))},t.prototype.traceTransitionIgnored=function(t){this.enabled(M.TRANSITION)&&console.log(L(t)+": Ignored <> "+S(t))},t.prototype.traceHookInvocation=function(t,e,n){if(this.enabled(M.HOOK)){var r=Object(f.k)("traceData.hookType")(n)||"internal",i=Object(f.k)("traceData.context.state.name")(n)||Object(f.k)("traceData.context")(n)||"unknown",o=y(t.registeredHook.callback);console.log(L(e)+": Hook -> "+r+" context: "+i+", "+$(200,o))}},t.prototype.traceHookResult=function(t,e,n){this.enabled(M.HOOK)&&console.log(L(e)+": <- Hook returned: "+$(200,S(t)))},t.prototype.traceResolvePath=function(t,e,n){this.enabled(M.RESOLVE)&&console.log(L(n)+": Resolving "+t+" ("+e+")")},t.prototype.traceResolvableResolved=function(t,e){this.enabled(M.RESOLVE)&&console.log(L(e)+": <- Resolved "+t+" to: "+$(200,S(t.data)))},t.prototype.traceError=function(t,e){this.enabled(M.TRANSITION)&&console.log(L(e)+": <- Rejected "+S(e)+", reason: "+t)},t.prototype.traceSuccess=function(t,e){this.enabled(M.TRANSITION)&&console.log(L(e)+": <- Success "+S(e)+", final state: "+t.name)},t.prototype.traceUIViewEvent=function(t,e,n){void 0===n&&(n=""),this.enabled(M.UIVIEW)&&console.log("ui-view: "+m(30,t)+" "+P(e)+n)},t.prototype.traceUIViewConfigUpdated=function(t,e){this.enabled(M.UIVIEW)&&this.traceUIViewEvent("Updating",t," with ViewConfig from context='"+e+"'")},t.prototype.traceUIViewFill=function(t,e){this.enabled(M.UIVIEW)&&this.traceUIViewEvent("Fill",t," with: "+$(200,e))},t.prototype.traceViewSync=function(t){if(this.enabled(M.VIEWCONFIG)){var e="uiview component fqn",n=t.map(function(t){var n,r=t.uiView,i=t.viewConfig,o=r&&r.fqn,a=i&&i.viewDecl.$context.name+": ("+i.viewDecl.$name+")";return(n={})[e]=o,n["view config state (view name)"]=a,n}).sort(function(t,n){return(t[e]||"").localeCompare(n[e]||"")});N(n)}},t.prototype.traceViewServiceEvent=function(t,e){this.enabled(M.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+function(t){var e=t.viewDecl,n=e.$context.name||"(root)";return"[View#"+t.$id+" from '"+n+"' state]: target ui-view: '"+e.$uiViewName+"@"+e.$uiViewContextAnchor+"'"}(e))},t.prototype.traceViewServiceUIViewEvent=function(t,e){this.enabled(M.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+P(e))},t}(),q=new H,F=function(){function t(t){this.pattern=/.*/,this.inherit=!0,Object(s.r)(this,t)}return t.prototype.is=function(t,e){return!0},t.prototype.encode=function(t,e){return t},t.prototype.decode=function(t,e){return t},t.prototype.equals=function(t,e){return t==e},t.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},t.prototype.toString=function(){return"{ParamType:"+this.name+"}"},t.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},t.prototype.$asArray=function(t,e){if(!t)return this;if("auto"===t&&!e)throw new Error("'auto' array mode is for query parameters only");return new B(this,t)},t}();function B(t,e){var n=this;function r(t){return Object(h.a)(t)?t:Object(h.c)(t)?[t]:[]}function i(t,n){return function(i){if(Object(h.a)(i)&&0===i.length)return i;var o=r(i),a=Object(s.B)(o,t);return!0===n?0===Object(s.s)(a,function(t){return!t}).length:function(t){switch(t.length){case 0:return;case 1:return"auto"===e?t[0]:t;default:return t}}(a)}}function o(t){return function(e,n){var i=r(e),o=r(n);if(i.length!==o.length)return!1;for(var a=0;a=0||(a.push(r[c]),o[r[c]]=this[r[c]]);return Object(s.r)({},o,t)},t}(),X=function(){function t(e){if(e instanceof t){var n=e;this.state=n.state,this.paramSchema=n.paramSchema.slice(),this.paramValues=Object(s.r)({},n.paramValues),this.resolvables=n.resolvables.slice(),this.views=n.views&&n.views.slice()}else{var r=e;this.state=r,this.paramSchema=r.parameters({inherit:!1}),this.paramValues={},this.resolvables=r.resolvables.map(function(t){return t.clone()})}}return t.prototype.clone=function(){return new t(this)},t.prototype.applyRawParams=function(t){return this.paramValues=this.paramSchema.reduce(function(e,n){return Object(s.h)(e,[(r=n).id,r.value(t[r.id])]);var r},{}),this},t.prototype.parameter=function(t){return Object(s.t)(this.paramSchema,Object(f.o)("id",t))},t.prototype.equals=function(t,e){var n=this.diff(t,e);return n&&0===n.length},t.prototype.diff=function(t,e){if(this.state!==t.state)return!1;var n=e?e(this):this.paramSchema;return Y.changed(n,this.paramValues,t.paramValues)},t.clone=function(t){return t.clone()},t}(),tt=function(){function t(t,e,n,r){this._stateRegistry=t,this._identifier=e,this._identifier=e,this._params=Object(s.r)({},n||{}),this._options=Object(s.r)({},r||{}),this._definition=t.matcher.find(e,this._options.relative)}return t.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},t.prototype.identifier=function(){return this._identifier},t.prototype.params=function(){return this._params},t.prototype.$state=function(){return this._definition},t.prototype.state=function(){return this._definition&&this._definition.self},t.prototype.options=function(){return this._options},t.prototype.exists=function(){return!(!this._definition||!this._definition.self)},t.prototype.valid=function(){return!this.error()},t.prototype.error=function(){var t=this.options().relative;if(!this._definition&&t){var e=t.name?t.name:t;return"Could not resolve '"+this.name()+"' from state '"+e+"'"}return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'"},t.prototype.toString=function(){return"'"+this.name()+"'"+S(this.params())},t.prototype.withState=function(e){return new t(this._stateRegistry,e,this._params,this._options)},t.prototype.withParams=function(e,n){void 0===n&&(n=!1);var r=n?e:Object(s.r)({},this._params,e);return new t(this._stateRegistry,this._identifier,r,this._options)},t.prototype.withOptions=function(e,n){void 0===n&&(n=!1);var r=n?e:Object(s.r)({},this._options,e);return new t(this._stateRegistry,this._identifier,this._params,r)},t.isDef=function(t){return t&&t.state&&(Object(h.l)(t.state)||Object(h.l)(t.state.name))},t}(),et=function(){function t(){}return t.makeTargetState=function(t,e){var n=Object(s.P)(e).state;return new tt(t,n,e.map(Object(f.n)("paramValues")).reduce(s.D,{}),{})},t.buildPath=function(t){var e=t.params();return t.$state().path.map(function(t){return new X(t).applyRawParams(e)})},t.buildToPath=function(e,n){var r=t.buildPath(n);return n.options().inherit?t.inheritParams(e,r,Object.keys(n.params())):r},t.applyViewConfigs=function(e,n,r){n.filter(function(t){return Object(s.z)(r,t.state)}).forEach(function(r){var i=Object(s.U)(r.state.views||{}),o=t.subPath(n,function(t){return t===r}),a=i.map(function(t){return e.createViewConfig(o,t)});r.views=a.reduce(s.T,[])})},t.inheritParams=function(t,e,n){void 0===n&&(n=[]);var r=t.map(function(t){return t.paramSchema}).reduce(s.T,[]).filter(function(t){return!t.inherit}).map(Object(f.n)("id"));return e.map(function(e){var i=Object(s.r)({},e&&e.paramValues),o=Object(s.H)(i,n);i=Object(s.F)(i,n);var a,u,c,l=Object(s.F)((a=t,u=e.state,c=Object(s.t)(a,Object(f.o)("state",u)),Object(s.r)({},c&&c.paramValues)||{}),r),h=Object(s.r)(i,l,o);return new X(e.state).applyRawParams(h)})},t.treeChanges=function(e,n,r){for(var i,o,a,u,s,c,l=Math.min(e.length,n.length),f=0;f1?r:r[0]:Object(h.l)(t)&&Object(h.d)(e)?(n[t]=r,n[t].push(e),function(){return n[t].splice(n[t].indexOf(e,1))&&null}):void 0},t.prototype.build=function(t){var e=this.matcher,n=this.builders,r=this.parentName(t);if(r&&!e.find(r,void 0,!1))return null;for(var i in n)if(n.hasOwnProperty(i)){var o=n[i].reduce(function(t,e){return function(n){return e(n,t)}},s.E);t[i]=o(t)}return t},t.prototype.parentName=function(t){var e=t.name||"",n=e.split(".");if("**"===n.pop()&&n.pop(),n.length){if(t.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+e+")");return n.join(".")}return t.parent?Object(h.l)(t.parent)?t.parent:t.parent.name:""},t.prototype.name=function(t){var e=t.name;if(-1!==e.indexOf(".")||!t.parent)return e;var n=Object(h.l)(t.parent)?t.parent:t.parent.name;return n?n+"."+e:e},t}(),St=function(){function t(e){return t.create(e||{})}return t.create=function(e){e=t.isStateClass(e)?new e:e;var n=Object(s.A)(Object(s.A)(e,t.prototype));return e.$$state=function(){return n},n.self=e,n.__stateObjectCache={nameGlob:l.fromString(n.name)},n},t.prototype.is=function(t){return this===t||this.self===t||this.fqn()===t},t.prototype.fqn=function(){if(!(this.parent&&this.parent instanceof this.constructor))return this.name;var t=this.parent.fqn();return t?t+"."+this.name:this.name},t.prototype.root=function(){return this.parent&&this.parent.root()||this},t.prototype.parameters=function(t){return((t=Object(s.o)(t,{inherit:!0,matchingKeys:null})).inherit&&this.parent&&this.parent.parameters()||[]).concat(Object(s.U)(this.params)).filter(function(e){return!t.matchingKeys||t.matchingKeys.hasOwnProperty(e.id)})},t.prototype.parameter=function(t,e){return void 0===e&&(e={}),this.url&&this.url.parameter(t,e)||Object(s.t)(Object(s.U)(this.params),Object(f.o)("id",t))||e.inherit&&this.parent&&this.parent.parameter(t)},t.prototype.toString=function(){return this.fqn()},t.isStateClass=function(t){return Object(h.d)(t)&&!0===t.__uiRouterState},t.isState=function(t){return Object(h.i)(t.__stateObjectCache)},t}(),Et=function(){function t(t){this._states=t}return t.prototype.isRelative=function(t){return 0===(t=t||"").indexOf(".")||0===t.indexOf("^")},t.prototype.find=function(t,e,n){if(void 0===n&&(n=!0),t||""===t){var r=Object(h.l)(t),i=r?t:t.name;this.isRelative(i)&&(i=this.resolvePath(i,e));var o=this._states[i];if(o&&(r||!(r||o!==t&&o.self!==t)))return o;if(r&&n){var a=Object(s.U)(this._states).filter(function(t){return t.__stateObjectCache.nameGlob&&t.__stateObjectCache.nameGlob.matches(i)});return a.length>1&&console.log("stateMatcher.find: Found multiple matches for "+i+" using glob: ",a.map(function(t){return t.name})),a[0]}}},t.prototype.resolvePath=function(t,e){if(!e)throw new Error("No reference point given for path '"+t+"'");for(var n=this.find(e),r=t.split("."),i=r.length,o=0,a=n;o0;){var c=e.shift(),l=c.name,f=r.build(c),h=o.indexOf(c);if(f){var p=u(l);if(p&&p.name===l)throw new Error("State '"+l+"' is already defined");var d=u(l+".**");d&&this.router.stateRegistry.deregister(d),n[l]=c,this.attachRoute(c),h>=0&&o.splice(h,1),i.push(c)}else{var v=a[l];if(a[l]=e.length,h>=0&&v===e.length)return e.push(c),s(),n;h<0&&o.push(c),e.push(c)}}return s(),n},t.prototype.attachRoute=function(t){if(!t.abstract&&t.url){var e=this.router.urlService.rules;e.rule(e.urlRuleFactory.create(t))}},t}(),xt=function(){function t(t){this.router=t,this.states={},this.listeners=[],this.matcher=new Et(this.states),this.builder=new Ot(this.matcher,t.urlMatcherFactory),this.stateQueue=new jt(t,this.states,this.builder,this.listeners),this._registerRoot()}return t.prototype._registerRoot=function(){(this._root=this.stateQueue.register({name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},abstract:!0})).navigable=null},t.prototype.dispose=function(){var t=this;this.stateQueue.dispose(),this.listeners=[],this.get().forEach(function(e){return t.get(e)&&t.deregister(e)})},t.prototype.onStatesChanged=function(t){return this.listeners.push(t),function(){Object(s.L)(this.listeners)(t)}.bind(this)},t.prototype.root=function(){return this._root},t.prototype.register=function(t){return this.stateQueue.register(t)},t.prototype._deregisterTree=function(t){var e=this,n=this.get().map(function(t){return t.$$state()}),r=function(t){var e=n.filter(function(e){return-1!==t.indexOf(e.parent)});return 0===e.length?e:e.concat(r(e))},i=r([t]),o=[t].concat(i).reverse();return o.forEach(function(t){var n=e.router.urlService.rules;n.rules().filter(Object(f.o)("state",t)).forEach(function(t){return n.removeRule(t)}),delete e.states[t.name]}),o},t.prototype.deregister=function(t){var e=this.get(t);if(!e)throw new Error("Can't deregister state; not found: "+t);var n=this._deregisterTree(e.$$state());return this.listeners.forEach(function(t){return t("deregistered",n.map(function(t){return t.self}))}),n},t.prototype.get=function(t,e){var n=this;if(0===arguments.length)return Object.keys(this.states).map(function(t){return n.states[t].self});var r=this.matcher.find(t,e);return r&&r.self||null},t.prototype.decorator=function(t,e){return this.builder.builder(t,e)},t}();!function(t){t[t.CREATE=0]="CREATE",t[t.BEFORE=1]="BEFORE",t[t.RUN=2]="RUN",t[t.SUCCESS=3]="SUCCESS",t[t.ERROR=4]="ERROR"}(bt||(bt={})),function(t){t[t.TRANSITION=0]="TRANSITION",t[t.STATE=1]="STATE"}(wt||(wt={}));var Ct={current:s.E,transition:null,traceData:{},bind:null},_t=function(){function t(t,e,n,r){var i=this;this.transition=t,this.stateContext=e,this.registeredHook=n,this.options=r,this.isSuperseded=function(){return i.type.hookPhase===bt.RUN&&!i.options.transition.isActive()},this.options=Object(s.o)(r,Ct),this.type=n.eventType}return t.chain=function(t,e){return t.reduce(function(t,e){return t.then(function(){return e.invokeHook()})},e||c.b.$q.when())},t.invokeHooks=function(e,n){for(var r=0;r=e.invokeLimit&&e.deregister()}}},t.prototype.handleHookResult=function(t){var e=this,n=this.getNotCurrentRejection();return n||(Object(h.j)(t)?t.then(function(t){return e.handleHookResult(t)}):(q.traceHookResult(t,this.transition,this.options),!1===t?v.aborted("Hook aborted transition").toPromise():Object(f.h)(tt)(t)?v.redirected(t).toPromise():void 0))},t.prototype.getNotCurrentRejection=function(){var t=this.transition.router;return t._disposed?v.aborted("UIRouter instance #"+t.$id+" has been stopped (disposed)").toPromise():this.transition._aborted?v.aborted().toPromise():this.isSuperseded()?v.superseded(this.options.current()).toPromise():void 0},t.prototype.toString=function(){var t=this.options,e=this.registeredHook;return(Object(f.k)("traceData.hookType")(t)||"internal")+" context: "+(Object(f.k)("traceData.context.state.name")(t)||Object(f.k)("traceData.context")(t)||"unknown")+", "+$(200,b(e.callback))},t.HANDLE_RESULT=function(t){return function(e){return t.handleHookResult(e)}},t.LOG_REJECTED_RESULT=function(t){return function(e){Object(h.j)(e)&&e.catch(function(e){return t.logError(v.normalize(e))})}},t.LOG_ERROR=function(t){return function(e){return t.logError(e)}},t.REJECT_ERROR=function(t){return function(t){return Object(s.O)(t)}},t.THROW_ERROR=function(t){return function(t){throw t}},t}();function kt(t,e,n){var r=Object(h.l)(e)?[e]:e;return!!(Object(h.d)(r)?r:function(t){for(var e=r,n=0;n20)throw new Error("Too many consecutive Transition redirects (20+)");var r={redirectedFrom:this,source:"redirect"};"url"===this.options().source&&!1!==t.options().location&&(r.location="replace");var i=Object(s.r)({},this.options(),t.options(),r);t=t.withOptions(i,!0);var o,a=this.router.transitionService.create(this._treeChanges.from,t),u=this._treeChanges.entering,c=a._treeChanges.entering;return et.matching(c,u,et.nonDynamicParams).filter(Object(f.i)((o=t.options().reloadState,function(t){return o&&t.state.includes[o.name]}))).forEach(function(t,e){t.resolvables=u[e].resolvables}),a},t.prototype._changedParams=function(){var t=this._treeChanges;if(!this._options.reload&&(!t.exiting.length&&!t.entering.length&&t.to.length===t.from.length&&!Object(s.i)(t.to,t.from).map(function(t){return t[0].state!==t[1].state}).reduce(s.g,!1))){var e=t.to.map(function(t){return t.paramSchema}),n=[t.to,t.from].map(function(t){return t.map(function(t){return t.paramValues})}),r=n[0],i=n[1];return Object(s.i)(e,r,i).map(function(t){var e=t[0],n=t[1],r=t[2];return Y.changed(e,n,r)}).reduce(s.T,[])}},t.prototype.dynamic=function(){var t=this._changedParams();return!!t&&t.map(function(t){return t.dynamic}).reduce(s.g,!1)},t.prototype.ignored=function(){return!!this._ignoredReason()},t.prototype._ignoredReason=function(){var t=this.router.globals.transition,e=this._options.reloadState,n=function(t,n){if(t.length!==n.length)return!1;var r=et.matching(t,n);return t.length===r.filter(function(t){return!e||!t.state.includes[e.name]}).length},r=this.treeChanges(),i=t&&t.treeChanges();return i&&n(i.to,r.to)&&n(i.exiting,r.exiting)?"SameAsPending":0===r.exiting.length&&0===r.entering.length&&n(r.from,r.to)?"SameAsCurrent":void 0},t.prototype.run=function(){var t=this,e=_t.runAllHooks,n=function(e){return t._hookBuilder.buildHooksForPhase(e)},r=n(bt.BEFORE);return _t.invokeHooks(r,function(){var e=t.router.globals;return e.lastStartedTransitionId=t.$id,e.transition=t,e.transitionHistory.enqueue(t),q.traceTransitionStart(t),c.b.$q.when(void 0)}).then(function(){var t=n(bt.RUN);return _t.invokeHooks(t,function(){return c.b.$q.when(void 0)})}).then(function(){q.traceSuccess(t.$to(),t),t.success=!0,t._deferred.resolve(t.to()),e(n(bt.SUCCESS))},function(r){q.traceError(r,t),t.success=!1,t._deferred.reject(r),t._error=r,e(n(bt.ERROR))}),this.promise},t.prototype.valid=function(){return!this.error()||void 0!==this.success},t.prototype.abort=function(){Object(h.m)(this.success)&&(this._aborted=!0)},t.prototype.error=function(){var t=this.$to();if(t.self.abstract)return v.invalid("Cannot transition to abstract state '"+t.name+"'");var e=t.parameters(),n=this.params(),r=e.filter(function(t){return!t.validates(n[t.id])});if(r.length){var i=r.map(function(t){return"["+t.id+":"+S(n[t.id])+"]"}).join(", "),o="The following parameter values are not valid for state '"+t.name+"': "+i;return v.invalid(o)}return!1===this.success?this._error:void 0},t.prototype.toString=function(){var t=this.from(),e=this.to(),n=function(t){return null!==t["#"]&&void 0!==t["#"]?t:Object(s.F)(t,["#"])};return"Transition#"+this.$id+"( '"+(Object(h.i)(t)?t.name:t)+"'"+S(n(this._treeChanges.from.map(Object(f.n)("paramValues")).reduce(s.D,{})))+" -> "+(this.valid()?"":"(X) ")+"'"+(Object(h.i)(e)?e.name:e)+"'"+S(n(this.params()))+" )"},t.diToken=t,t}();function Mt(t,e){var n=["",""],r=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!e)return r;switch(e.squash){case!1:n=["(",")"+(e.isOptional?"?":"")];break;case!0:r=r.replace(/\/$/,""),n=["(?:/(",")|/)?"];break;default:n=["("+e.squash+"|",")?"]}return r+n[0]+e.type.pattern.source+n[1]}var It=T("/"),Nt={state:{params:{}},strict:!0,caseInsensitive:!0},Ut=function(){function t(e,n,r,i){var o=this;this._cache={path:[this]},this._children=[],this._params=[],this._segments=[],this._compiled=[],this.config=i=Object(s.o)(i,Nt),this.pattern=e;for(var a,u,c,l=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,h=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,p=[],d=0,v=function(n){if(!t.nameValidator.test(n))throw new Error("Invalid parameter name '"+n+"' in pattern '"+e+"'");if(Object(s.t)(o._params,Object(f.o)("id",n)))throw new Error("Duplicate parameter name '"+n+"' in pattern '"+e+"'")},$=function(t,r){var i,a=t[2]||t[3],u=r?t[4]:t[4]||("*"===t[1]?"[\\s\\S]*":null);return{id:a,regexp:u,segment:e.substring(d,t.index),type:u?n.type(u)||(i=u,Object(s.A)(n.type(r?"query":"path"),{pattern:new RegExp(i,o.config.caseInsensitive?"i":void 0)})):null}};(a=l.exec(e))&&!((u=$(a,!1)).segment.indexOf("?")>=0);)v(u.id),this._params.push(r.fromPath(u.id,u.type,i.state)),this._segments.push(u.segment),p.push([u.segment,Object(s.P)(this._params)]),d=l.lastIndex;var m=(c=e.substring(d)).indexOf("?");if(m>=0){var g=c.substring(m);if(c=c.substring(0,m),g.length>0)for(d=0;a=h.exec(g);)v((u=$(a,!0)).id),this._params.push(r.fromSearch(u.id,u.type,i.state)),d=l.lastIndex}this._segments.push(c),this._compiled=p.map(function(t){return Mt.apply(null,t)}).concat(Mt(c))}return t.encodeDashes=function(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})},t.pathSegmentsAndParams=function(t){var e=t._segments,n=t._params.filter(function(t){return t.location===z.PATH});return Object(s.i)(e,n.concat(void 0)).reduce(s.T,[]).filter(function(t){return""!==t&&Object(h.c)(t)})},t.queryParams=function(t){return t._params.filter(function(t){return t.location===z.SEARCH})},t.compare=function(e,n){var r=function(e){return e._cache.weights=e._cache.weights||function(e){return e._cache.segments=e._cache.segments||e._cache.path.map(t.pathSegmentsAndParams).reduce(s.T,[]).reduce(A,[]).map(function(t){return Object(h.l)(t)?It(t):t}).reduce(s.T,[])}(e).map(function(t){return"/"===t?1:Object(h.l)(t)?2:t instanceof Y?3:void 0})},i=r(e),o=r(n);!function(t,e,n){for(var r=Math.max(t.length,e.length);t.length Registering",t),this._viewConfigs.push(t)},t.prototype.sync=function(){var e=this,n=this._uiViews.map(function(t){return[t.fqn,t]}).reduce(s.h,{});function r(t){for(var e=t.viewDecl.$context,n=0;++n&&e.parent;)e=e.parent;return n}var i=Object(f.e)(function(t,e,n,r){return e*(t(n)-t(r))}),o=this._uiViews.sort(i(function(t){var e=function(t){return t&&t.parent?e(t.parent)+1:1};return 1e4*t.fqn.split(".").length+e(t.creationContext)},1)).map(function(o){var a=e._viewConfigs.filter(t.matches(n,o));return a.length>1&&a.sort(i(r,-1)),{uiView:o,viewConfig:a[0]}}),a=o.map(function(t){return t.viewConfig}),u=this._viewConfigs.filter(function(t){return!Object(s.z)(a,t)}).map(function(t){return{uiView:void 0,viewConfig:t}});o.forEach(function(t){-1!==e._uiViews.indexOf(t.uiView)&&t.uiView.configUpdated(t.viewConfig)});var c=o.concat(u);this._listeners.forEach(function(t){return t(c)}),q.traceViewSync(c)},t.prototype.registerUIView=function(t){q.traceViewServiceUIViewEvent("-> Registering",t);var e=this._uiViews;return e.filter(function(e){return e.fqn===t.fqn&&e.$type===t.$type}).length&&q.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){-1!==e.indexOf(t)?(q.traceViewServiceUIViewEvent("<- Deregistering",t),Object(s.L)(e)(t)):q.traceViewServiceUIViewEvent("Tried removing non-registered uiView",t)}},t.prototype.available=function(){return this._uiViews.map(Object(f.n)("fqn"))},t.prototype.active=function(){return this._uiViews.filter(Object(f.n)("$config")).map(Object(f.n)("name"))},t.matches=function(t,e){return function(n){if(e.$type!==n.viewDecl.$type)return!1;var r=n.viewDecl,i=r.$uiViewName.split("."),o=e.fqn.split(".");if(!Object(s.q)(i,o.slice(0-i.length)))return!1;var a=1-i.length||void 0,u=o.slice(0,a).join("."),c=t[u].creationContext;return r.$uiViewContextAnchor===(c&&c.name)}},t}(),Gt=function(){function t(){this.params=new Q,this.lastStartedTransitionId=-1,this.transitionHistory=new p([],1),this.successfulTransitions=new p([],1)}return t.prototype.dispose=function(){this.transitionHistory.clear(),this.successfulTransitions.clear(),this.transition=null},t}();function Jt(t){if(!(Object(h.d)(t)||Object(h.l)(t)||Object(f.h)(tt)(t)||tt.isDef(t)))throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property");return Object(h.d)(t)?t:Object(f.p)(t)}Bt=function(t,e){var n=function(t,e){return(e.priority||0)-(t.priority||0)}(t,e);return 0!==n?n:0!==(n=function(t,e){var n={STATE:4,URLMATCHER:4,REGEXP:3,RAW:2,OTHER:1};return(n[t.type]||0)-(n[e.type]||0)}(t,e))?n:0!==(n=function(t,e){return t.urlMatcher&&e.urlMatcher?Ut.compare(t.urlMatcher,e.urlMatcher):0}(t,e))?n:function(t,e){var n={STATE:!0,URLMATCHER:!0};return n[t.type]&&n[e.type]?0:(t.$id||0)-(e.$id||0)}(t,e)};var Kt=function(){function t(t){this.router=t,this._sortFn=Bt,this._rules=[],this._id=0,this.urlRuleFactory=new qt(t)}return t.prototype.dispose=function(t){this._rules=[],delete this._otherwiseFn},t.prototype.initial=function(t){var e=Jt(t);this.rule(this.urlRuleFactory.create(function(t,e){return 0===e.globals.transitionHistory.size()&&!!/^\/?$/.exec(t.path)},e))},t.prototype.otherwise=function(t){var e=Jt(t);this._otherwiseFn=this.urlRuleFactory.create(Object(f.p)(!0),e),this._sorted=!1},t.prototype.removeRule=function(t){Object(s.L)(this._rules,t)},t.prototype.rule=function(t){var e=this;if(!qt.isUrlRule(t))throw new Error("invalid rule");return t.$id=this._id++,t.priority=t.priority||0,this._rules.push(t),this._sorted=!1,function(){return e.removeRule(t)}},t.prototype.rules=function(){return this.ensureSorted(),this._rules.concat(this._otherwiseFn?[this._otherwiseFn]:[])},t.prototype.sort=function(t){for(var e=this.stableSort(this._rules,this._sortFn=t||this._sortFn),n=0,r=0;rn.weight?u:n}return n},t}(),Qt=0,Xt=Object(c.a)("LocationServices",["url","path","search","hash","onChange"]),te=Object(c.a)("LocationConfig",["port","protocol","host","baseHref","html5Mode","hashPrefix"]),ee=function(){function t(t,e){void 0===t&&(t=Xt),void 0===e&&(e=te),this.locationService=t,this.locationConfig=e,this.$id=Qt++,this._disposed=!1,this._disposables=[],this.trace=q,this.viewService=new Wt(this),this.globals=new Gt,this.transitionService=new Ee(this),this.urlMatcherFactory=new Ht(this),this.urlRouter=new zt(this),this.urlService=new Zt(this),this.stateRegistry=new xt(this),this.stateService=new je(this),this._plugins={},this.viewService._pluginapi._rootViewContext(this.stateRegistry.root()),this.globals.$current=this.stateRegistry.root(),this.globals.current=this.globals.$current.self,this.disposable(this.globals),this.disposable(this.stateService),this.disposable(this.stateRegistry),this.disposable(this.transitionService),this.disposable(this.urlService),this.disposable(t),this.disposable(e)}return t.prototype.disposable=function(t){this._disposables.push(t)},t.prototype.dispose=function(t){var e=this;t&&Object(h.d)(t.dispose)?t.dispose(this):(this._disposed=!0,this._disposables.slice().forEach(function(t){try{"function"==typeof t.dispose&&t.dispose(e),Object(s.L)(e._disposables,t)}catch(t){}}))},t.prototype.plugin=function(t,e){void 0===e&&(e={});var n=new t(this,e);if(!n.name)throw new Error("Required property `name` missing on plugin: "+n);return this._disposables.push(n),this._plugins[n.name]=n},t.prototype.getPlugin=function(t){return t?this._plugins[t]:Object(s.U)(this._plugins)},t}();function ne(t){t.addResolvable(it.fromData(ee,t.router),""),t.addResolvable(it.fromData(Vt,t),""),t.addResolvable(it.fromData("$transition$",t),""),t.addResolvable(it.fromData("$stateParams",t.params()),""),t.entering().forEach(function(e){t.addResolvable(it.fromData("$state$",e),e)})}var re=["$transition$",Vt],ie=Object(s.z)(re),oe=function(t){var e=Object(s.U)(t.treeChanges()).reduce(s.T,[]).reduce(s.R,[]),n=function(t){return ie(t.token)?it.fromData(t.token,null):t};e.forEach(function(t){t.resolvables=t.resolvables.map(n)})},ae=function(t){var e=t.to().redirectTo;if(e){var n=t.router.stateService;return Object(h.d)(e)?c.b.$q.when(e(t)).then(r):r(e)}function r(e){if(e)return e instanceof tt?e:Object(h.l)(e)?n.target(e,t.params(),t.options()):e.state||e.params?n.target(e.state||t.to(),e.params||t.params(),t.options()):void 0}};function ue(t){return function(e,n){return(0,n.$$state()[t])(e,n)}}var se=ue("onExit"),ce=ue("onRetain"),le=ue("onEnter"),fe=function(t){return new ct(t.treeChanges().to).resolvePath("EAGER",t).then(s.E)},he=function(t,e){return new ct(t.treeChanges().to).subContext(e.$$state()).resolvePath("LAZY",t).then(s.E)},pe=function(t){return new ct(t.treeChanges().to).resolvePath("LAZY",t).then(s.E)},de=function(t){var e=c.b.$q,n=t.views("entering");if(n.length)return e.all(n.map(function(t){return e.when(t.load())})).then(s.E)},ve=function(t){var e=t.views("entering"),n=t.views("exiting");if(e.length||n.length){var r=t.router.viewService;n.forEach(function(t){return r.deactivateViewConfig(t)}),e.forEach(function(t){return r.activateViewConfig(t)}),r.sync()}},$e=function(t){var e=t.router.globals,n=function(){e.transition===t&&(e.transition=null)};t.onSuccess({},function(){e.successfulTransitions.enqueue(t),e.$current=t.$to(),e.current=e.$current.self,Object(s.m)(t.params(),e.params)},{priority:1e4}),t.promise.then(n,n)},me=function(t){var e=t.options(),n=t.router.stateService,r=t.router.urlRouter;if("url"!==e.source&&e.location&&n.$current.navigable){var i={replace:"replace"===e.location};r.push(n.$current.navigable.url,n.params,i)}r.update(!0)},ge=function(t){var e=t.router;var n=t.entering().filter(function(t){return!!t.$$state().lazyLoad}).map(function(e){return ye(t,e)});return c.b.$q.all(n).then(function(){if("url"!==t.originalTransition().options().source){var n=t.targetState();return e.stateService.target(n.identifier(),n.params(),n.options())}var r=e.urlService,i=r.match(r.parts()),o=i&&i.rule;if(o&&"STATE"===o.type){var a=o.state,u=i.match;return e.stateService.target(a,u,t.options())}e.urlService.sync()})};function ye(t,e){var n=e.$$state().lazyLoad,r=n._promise;if(!r){r=n._promise=c.b.$q.when(n(t,e)).then(function(e){e&&Array.isArray(e.states)&&e.states.forEach(function(e){return t.router.stateRegistry.register(e)});return e}).then(function(t){return delete e.lazyLoad,delete e.$$state().lazyLoad,delete n._promise,t},function(t){return delete n._promise,c.b.$q.reject(t)})}return r}var be=function(){return function(t,e,n,r,i,o,a,u){void 0===i&&(i=!1),void 0===o&&(o=_t.HANDLE_RESULT),void 0===a&&(a=_t.REJECT_ERROR),void 0===u&&(u=!1),this.name=t,this.hookPhase=e,this.hookOrder=n,this.criteriaMatchPath=r,this.reverseSort=i,this.getResultHandler=o,this.getErrorHandler=a,this.synchronous=u}}();function we(t){var e=t._ignoredReason();if(e){q.traceTransitionIgnored(t);var n=t.router.globals.transition;return"SameAsCurrent"===e&&n&&n.abort(),v.ignored().toPromise()}}function Oe(t){if(!t.valid())throw new Error(t.error().toString())}var Se={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,custom:{},current:function(){return null},source:"unknown"},Ee=function(){function t(t){this._transitionCount=0,this._eventTypes=[],this._registeredHooks={},this._criteriaPaths={},this._router=t,this.$view=t.viewService,this._deregisterHookFns={},this._pluginapi=Object(s.n)(Object(f.p)(this),{},Object(f.p)(this),["_definePathType","_defineEvent","_getPathTypes","_getEvents","getHooks"]),this._defineCorePaths(),this._defineCoreEvents(),this._registerCoreTransitionHooks(),t.globals.successfulTransitions.onEvict(oe)}return t.prototype.onCreate=function(t,e,n){},t.prototype.onBefore=function(t,e,n){},t.prototype.onStart=function(t,e,n){},t.prototype.onExit=function(t,e,n){},t.prototype.onRetain=function(t,e,n){},t.prototype.onEnter=function(t,e,n){},t.prototype.onFinish=function(t,e,n){},t.prototype.onSuccess=function(t,e,n){},t.prototype.onError=function(t,e,n){},t.prototype.dispose=function(t){Object(s.U)(this._registeredHooks).forEach(function(t){return t.forEach(function(e){e._deregistered=!0,Object(s.L)(t,e)})})},t.prototype.create=function(t,e){return new Vt(t,e,this._router)},t.prototype._defineCoreEvents=function(){var t=bt,e=_t,n=this._criteriaPaths;this._defineEvent("onCreate",t.CREATE,0,n.to,!1,e.LOG_REJECTED_RESULT,e.THROW_ERROR,!0),this._defineEvent("onBefore",t.BEFORE,0,n.to),this._defineEvent("onStart",t.RUN,0,n.to),this._defineEvent("onExit",t.RUN,100,n.exiting,!0),this._defineEvent("onRetain",t.RUN,200,n.retained),this._defineEvent("onEnter",t.RUN,300,n.entering),this._defineEvent("onFinish",t.RUN,400,n.to),this._defineEvent("onSuccess",t.SUCCESS,0,n.to,!1,e.LOG_REJECTED_RESULT,e.LOG_ERROR,!0),this._defineEvent("onError",t.ERROR,0,n.to,!1,e.LOG_REJECTED_RESULT,e.LOG_ERROR,!0)},t.prototype._defineCorePaths=function(){var t=wt.STATE,e=wt.TRANSITION;this._definePathType("to",e),this._definePathType("from",e),this._definePathType("exiting",t),this._definePathType("retained",t),this._definePathType("entering",t)},t.prototype._defineEvent=function(t,e,n,r,i,o,a,u){void 0===i&&(i=!1),void 0===o&&(o=_t.HANDLE_RESULT),void 0===a&&(a=_t.REJECT_ERROR),void 0===u&&(u=!1);var s=new be(t,e,n,r,i,o,a,u);this._eventTypes.push(s),Tt(this,this,s)},t.prototype._getEvents=function(t){return(Object(h.c)(t)?this._eventTypes.filter(function(e){return e.hookPhase===t}):this._eventTypes.slice()).sort(function(t,e){var n=t.hookPhase-e.hookPhase;return 0===n?t.hookOrder-e.hookOrder:n})},t.prototype._definePathType=function(t,e){this._criteriaPaths[t]={name:t,scope:e}},t.prototype._getPathTypes=function(){return this._criteriaPaths},t.prototype.getHooks=function(t){return this._registeredHooks[t]},t.prototype._registerCoreTransitionHooks=function(){var t=this._deregisterHookFns;t.addCoreResolves=this.onCreate({},ne),t.ignored=function(t){return t.onBefore({},we,{priority:-9999})}(this),t.invalid=function(t){return t.onBefore({},Oe,{priority:-1e4})}(this),t.redirectTo=function(t){return t.onStart({to:function(t){return!!t.redirectTo}},ae)}(this),t.onExit=function(t){return t.onExit({exiting:function(t){return!!t.onExit}},se)}(this),t.onRetain=function(t){return t.onRetain({retained:function(t){return!!t.onRetain}},ce)}(this),t.onEnter=function(t){return t.onEnter({entering:function(t){return!!t.onEnter}},le)}(this),t.eagerResolve=function(t){return t.onStart({},fe,{priority:1e3})}(this),t.lazyResolve=function(t){return t.onEnter({entering:Object(f.p)(!0)},he,{priority:1e3})}(this),t.resolveAll=function(t){return t.onFinish({},pe,{priority:1e3})}(this),t.loadViews=function(t){return t.onFinish({},de)}(this),t.activateViews=function(t){return t.onSuccess({},ve)}(this),t.updateGlobals=function(t){return t.onCreate({},$e)}(this),t.updateUrl=function(t){return t.onSuccess({},me,{priority:9999})}(this),t.lazyLoad=function(t){return t.onBefore({entering:function(t){return!!t.lazyLoad}},ge)}(this)},t}(),je=function(){function t(e){this.router=e,this.invalidCallbacks=[],this._defaultErrorHandler=function(t){t instanceof Error&&t.stack?(console.error(t),console.error(t.stack)):t instanceof v?(console.error(t.toString()),t.detail&&t.detail.stack&&console.error(t.detail.stack)):console.error(t)};var n=Object.keys(t.prototype).filter(Object(f.i)(Object(s.z)(["current","$current","params","transition"])));Object(s.n)(Object(f.p)(t.prototype),this,Object(f.p)(this),n)}return Object.defineProperty(t.prototype,"transition",{get:function(){return this.router.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){return this.router.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"current",{get:function(){return this.router.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$current",{get:function(){return this.router.globals.$current},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.defaultErrorHandler(s.E),this.invalidCallbacks=[]},t.prototype._handleInvalidTargetState=function(t,e){var n=this,r=et.makeTargetState(this.router.stateRegistry,t),i=this.router.globals,o=function(){return i.transitionHistory.peekTail()},a=o(),u=new p(this.invalidCallbacks.slice()),s=new ct(t).injector(),l=function(t){if(t instanceof tt){var e=t;return(e=n.target(e.identifier(),e.params(),e.options())).valid()?o()!==a?v.superseded().toPromise():n.transitionTo(e.identifier(),e.params(),e.options()):v.invalid(e.error()).toPromise()}};return function t(){var n=u.dequeue();return void 0===n?v.invalid(e.error()).toPromise():c.b.$q.when(n(e,r,s)).then(l).then(function(e){return e||t()})}()},t.prototype.onInvalid=function(t){return this.invalidCallbacks.push(t),function(){Object(s.L)(this.invalidCallbacks)(t)}.bind(this)},t.prototype.reload=function(t){return this.transitionTo(this.current,this.params,{reload:!Object(h.c)(t)||t,inherit:!1,notify:!1})},t.prototype.go=function(t,e,n){var r={relative:this.$current,inherit:!0},i=Object(s.o)(n,r,Se);return this.transitionTo(t,e,i)},t.prototype.target=function(t,e,n){if(void 0===n&&(n={}),Object(h.i)(n.reload)&&!n.reload.name)throw new Error("Invalid reload state object");var r=this.router.stateRegistry;if(n.reloadState=!0===n.reload?r.root():r.matcher.find(n.reload,n.relative),n.reload&&!n.reloadState)throw new Error("No such reload state '"+(Object(h.l)(n.reload)?n.reload:n.reload.name)+"'");return new tt(this.router.stateRegistry,t,e,n)},t.prototype.getCurrentPath=function(){var t=this,e=this.router.globals.successfulTransitions.peekTail();return e?e.treeChanges().to:[new X(t.router.stateRegistry.root())]},t.prototype.transitionTo=function(t,e,n){var r=this;void 0===e&&(e={}),void 0===n&&(n={});var o=this.router,a=o.globals;n=Object(s.o)(n,Se);n=Object(s.r)(n,{current:function(){return a.transition}});var u=this.target(t,e,n),l=this.getCurrentPath();if(!u.exists())return this._handleInvalidTargetState(l,u);if(!u.valid())return Object(s.O)(u.error());var f=function(t){return function(e){if(e instanceof v){var n=o.globals.lastStartedTransitionId<=t.$id;if(e.type===i.IGNORED)return n&&o.urlRouter.update(),c.b.$q.when(a.current);var u=e.detail;if(e.type===i.SUPERSEDED&&e.redirected&&u instanceof tt){var s=t.redirect(u);return s.run().catch(f(s))}if(e.type===i.ABORTED)return n&&o.urlRouter.update(),c.b.$q.reject(e)}return r.defaultErrorHandler()(e),c.b.$q.reject(e)}},h=this.router.transitionService.create(l,u),p=h.run().catch(f(h));return Object(s.N)(p),Object(s.r)(p,{transition:h})},t.prototype.is=function(t,e,n){n=Object(s.o)(n,{relative:this.$current});var r=this.router.stateRegistry.matcher.find(t,n.relative);if(Object(h.c)(r)){if(this.$current!==r)return!1;if(!e)return!0;var i=r.parameters({inherit:!0,matchingKeys:e});return Y.equals(i,Y.values(i,e),this.params)}},t.prototype.includes=function(t,e,n){n=Object(s.o)(n,{relative:this.$current});var r=Object(h.l)(t)&&l.fromString(t);if(r){if(!r.matches(this.$current.name))return!1;t=this.$current.name}var i=this.router.stateRegistry.matcher.find(t,n.relative),o=this.$current.includes;if(Object(h.c)(i)){if(!Object(h.c)(o[i.name]))return!1;if(!e)return!0;var a=i.parameters({inherit:!0,matchingKeys:e});return Y.equals(a,Y.values(a,e),this.params)}},t.prototype.href=function(t,e,n){var r={lossy:!0,inherit:!0,absolute:!1,relative:this.$current};n=Object(s.o)(n,r),e=e||{};var i=this.router.stateRegistry.matcher.find(t,n.relative);if(!Object(h.c)(i))return null;n.inherit&&(e=this.params.$inherit(e,this.$current,i));var o=i&&n.lossy?i.navigable:i;return o&&void 0!==o.url&&null!==o.url?this.router.urlRouter.href(o.url,e,{absolute:n.absolute}):null},t.prototype.defaultErrorHandler=function(t){return this._defaultErrorHandler=t||this._defaultErrorHandler},t.prototype.get=function(t,e){var n=this.router.stateRegistry;return 0===arguments.length?n.get():n.get(t,e||this.$current)},t.prototype.lazyLoad=function(t,e){var n=this.get(t);if(!n||!n.lazyLoad)throw new Error("Can not lazy load "+t);var r=this.getCurrentPath(),i=et.makeTargetState(this.router.stateRegistry,r);return ye(e=e||this.router.transitionService.create(r,i),n)},t}(),xe={when:function(t){return new Promise(function(e,n){return e(t)})},reject:function(t){return new Promise(function(e,n){n(t)})},defer:function(){var t={};return t.promise=new Promise(function(e,n){t.resolve=e,t.reject=n}),t},all:function(t){if(Object(h.a)(t))return Promise.all(t);if(Object(h.i)(t)){var e=Object.keys(t).map(function(e){return t[e].then(function(t){return{key:e,val:t}})});return xe.all(e).then(function(t){return t.reduce(function(t,e){return t[e.key]=e.val,t},{})})}}},Ce={},_e=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,ke=/([^\s,]+)/g,Re={get:function(t){return Ce[t]},has:function(t){return null!=Re.get(t)},invoke:function(t,e,n){var r=Object(s.r)({},Ce,n||{}),i=Re.annotate(t),o=Object(s.l)(function(t){return r.hasOwnProperty(t)},function(t){return"DI can't find injectable: '"+t+"'"}),a=i.filter(o).map(function(t){return r[t]});return Object(h.d)(t)?t.apply(e,a):t.slice(-1)[0].apply(e,a)},annotate:function(t){if(!Object(h.e)(t))throw new Error("Not an injectable function: "+t);if(t&&t.$inject)return t.$inject;if(Object(h.a)(t))return t.slice(0,-1);var e=t.toString().replace(_e,"");return e.slice(e.indexOf("(")+1,e.indexOf(")")).match(ke)||[]}},Te=function(t,e){var n=e[0],r=e[1];return t.hasOwnProperty(n)?Object(h.a)(t[n])?t[n].push(r):t[n]=[t[n],r]:t[n]=r,t},Ae=function(t){return t.split("&").filter(s.y).map(k).reduce(Te,{})};function Pe(t){var e=function(t){return t||""},n=C(t).map(e),r=n[0],i=n[1],o=_(r).map(e);return{path:o[0],search:o[1],hash:i,url:t}}var Ve=function(t){var e=t.path(),n=t.search(),r=t.hash(),i=Object.keys(n).map(function(t){var e=n[t];return(Object(h.a)(e)?e:[e]).map(function(e){return t+"="+e})}).reduce(s.T,[]).join("&");return e+(i?"?"+i:"")+(r?"#"+r:"")};function Me(t,e,n,r){return function(i){var o=i.locationService=new n(i),a=i.locationConfig=new r(i,e);return{name:t,service:o,configuration:a,dispose:function(t){t.dispose(o),t.dispose(a)}}}}var Ie,Ne=function(){function t(t,e){var n=this;this.fireAfterUpdate=e,this._listeners=[],this._listener=function(t){return n._listeners.forEach(function(e){return e(t)})},this.hash=function(){return Pe(n._get()).hash},this.path=function(){return Pe(n._get()).path},this.search=function(){return Ae(Pe(n._get()).search)},this._location=s.M.location,this._history=s.M.history}return t.prototype.url=function(t,e){return void 0===e&&(e=!0),Object(h.c)(t)&&t!==this._get()&&(this._set(null,null,t,e),this.fireAfterUpdate&&this._listeners.forEach(function(e){return e({url:t})})),Ve(this)},t.prototype.onChange=function(t){var e=this;return this._listeners.push(t),function(){return Object(s.L)(e._listeners,t)}},t.prototype.dispose=function(t){Object(s.p)(this._listeners)},t}(),Ue=(Ie=function(t,e){return(Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}Ie(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),De=function(t){function e(e){var n=t.call(this,e,!1)||this;return s.M.addEventListener("hashchange",n._listener,!1),n}return Ue(e,t),e.prototype._get=function(){return R(this._location.hash)},e.prototype._set=function(t,e,n,r){this._location.hash=n},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),s.M.removeEventListener("hashchange",this._listener)},e}(Ne),Le=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),He=function(t){function e(e){return t.call(this,e,!0)||this}return Le(e,t),e.prototype._get=function(){return this._url},e.prototype._set=function(t,e,n,r){this._url=n},e}(Ne),qe=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fe=function(t){function e(e){var n=t.call(this,e,!0)||this;return n._config=e.urlService.config,s.M.addEventListener("popstate",n._listener,!1),n}return qe(e,t),e.prototype._getBasePrefix=function(){return x(this._config.baseHref())},e.prototype._get=function(){var t=this._location,e=t.pathname,n=t.hash,r=t.search;r=_(r)[1],n=C(n)[1];var i=this._getBasePrefix(),o=e===this._config.baseHref(),a=e.substr(0,i.length)===i;return(e=o?"/":a?e.substring(i.length):e)+(r?"?"+r:"")+(n?"#"+n:"")},e.prototype._set=function(t,e,n,r){var i=this._getBasePrefix(),o=n&&"/"!==n[0]?"/":"",a=""===n||"/"===n?this._config.baseHref():i+o+n;r?this._history.replaceState(t,e,a):this._history.pushState(t,e,a)},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),s.M.removeEventListener("popstate",this._listener)},e}(Ne),Be=function(){return function(){var t=this;this.dispose=s.E,this._baseHref="",this._port=80,this._protocol="http",this._host="localhost",this._hashPrefix="",this.port=function(){return t._port},this.protocol=function(){return t._protocol},this.host=function(){return t._host},this.baseHref=function(){return t._baseHref},this.html5Mode=function(){return!1},this.hashPrefix=function(e){return Object(h.c)(e)?t._hashPrefix=e:t._hashPrefix}}}(),ze=function(){function t(t,e){void 0===e&&(e=!1),this._isHtml5=e,this._baseHref=void 0,this._hashPrefix=""}return t.prototype.port=function(){return location.port?Number(location.port):"https"===this.protocol()?443:80},t.prototype.protocol=function(){return location.protocol.replace(/:/g,"")},t.prototype.host=function(){return location.hostname},t.prototype.html5Mode=function(){return this._isHtml5},t.prototype.hashPrefix=function(t){return Object(h.c)(t)?this._hashPrefix=t:this._hashPrefix},t.prototype.baseHref=function(t){return Object(h.c)(t)&&(this._baseHref=t),Object(h.m)(this._baseHref)&&(this._baseHref=this.getBaseHref()),this._baseHref},t.prototype.getBaseHref=function(){var t=document.getElementsByTagName("base")[0];return t&&t.href?t.href.replace(/^([^\/:]*:)?\/\/[^\/]*/,""):this._isHtml5?"/":location.pathname||"/"},t.prototype.dispose=function(){},t}();function We(t){return c.b.$injector=Re,c.b.$q=xe,{name:"vanilla.services",$q:xe,$injector:Re,dispose:function(){return null}}}var Ge=Me("vanilla.hashBangLocation",!1,De,ze),Je=Me("vanilla.pushStateLocation",!0,Fe,ze),Ke=Me("vanilla.memoryLocation",!1,He,Be),Ye=function(){function t(){}return t.prototype.dispose=function(t){},t}();function Ze(){var t=null;return function(e,n){return t=t||c.b.$injector.get("$templateFactory"),[new en(e,n,t)]}}var Qe=function(t,e){return t.reduce(function(t,n){return t||Object(h.c)(e[n])},!1)};function Xe(t){if(!t.parent)return{};var e=["component","bindings","componentProvider"],n=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),r=e.concat(n);if(Object(h.c)(t.views)&&Qe(r,t))throw new Error("State '"+t.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level. Move the following properties into a view (in the 'views' object): "+r.filter(function(e){return Object(h.c)(t[e])}).join(", "));var i={},o=t.views||{$default:Object(s.H)(t,r)};return Object(s.w)(o,function(r,o){if(o=o||"$default",Object(h.l)(r)&&(r={component:r}),r=Object(s.r)({},r),Qe(e,r)&&Qe(n,r))throw new Error("Cannot combine: "+e.join("|")+" with: "+n.join("|")+" in stateview: '"+o+"@"+t.name+"'");r.resolveAs=r.resolveAs||"$resolve",r.$type="ng1",r.$context=t,r.$name=o;var a=Wt.normalizeUIViewTarget(r.$context,r.$name);r.$uiViewName=a.uiViewName,r.$uiViewContextAnchor=a.uiViewContextAnchor,i[o]=r}),i}var tn=0,en=function(){function t(t,e,n){var r=this;this.path=t,this.viewDecl=e,this.factory=n,this.$id=tn++,this.loaded=!1,this.getTemplate=function(t,e){return r.component?r.factory.makeComponentTemplate(t,e,r.component,r.viewDecl.bindings):r.template}}return t.prototype.load=function(){var t=this,e=c.b.$q,n=new ct(this.path),r=this.path.reduce(function(t,e){return Object(s.r)(t,e.paramValues)},{}),i={template:e.when(this.factory.fromConfig(this.viewDecl,r,n)),controller:e.when(this.getController(n))};return e.all(i).then(function(e){return q.traceViewServiceEvent("Loaded",t),t.controller=e.controller,Object(s.r)(t,e.template),t})},t.prototype.getController=function(t){var e=this.viewDecl.controllerProvider;if(!Object(h.e)(e))return this.viewDecl.controller;var n=c.b.$injector.annotate(e),r=Object(h.a)(e)?Object(s.P)(e):e;return new it("",r,n).get(t)},t}(),nn=function(){function t(){var t=this;this._useHttp=u.version.minor<3,this.$get=["$http","$templateCache","$injector",function(e,n,r){return t.$templateRequest=r.has&&r.has("$templateRequest")&&r.get("$templateRequest"),t.$http=e,t.$templateCache=n,t}]}return t.prototype.useHttpService=function(t){this._useHttp=t},t.prototype.fromConfig=function(t,e,n){var r=function(t){return c.b.$q.when(t).then(function(t){return{template:t}})},i=function(t){return c.b.$q.when(t).then(function(t){return{component:t}})};return Object(h.c)(t.template)?r(this.fromString(t.template,e)):Object(h.c)(t.templateUrl)?r(this.fromUrl(t.templateUrl,e)):Object(h.c)(t.templateProvider)?r(this.fromProvider(t.templateProvider,e,n)):Object(h.c)(t.component)?i(t.component):Object(h.c)(t.componentProvider)?i(this.fromComponentProvider(t.componentProvider,e,n)):r("")},t.prototype.fromString=function(t,e){return Object(h.d)(t)?t(e):t},t.prototype.fromUrl=function(t,e){return Object(h.d)(t)&&(t=t(e)),null==t?null:this._useHttp?this.$http.get(t,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(t){return t.data}):this.$templateRequest(t)},t.prototype.fromProvider=function(t,e,n){var r=c.b.$injector.annotate(t),i=Object(h.a)(t)?Object(s.P)(t):t;return new it("",i,r).get(n)},t.prototype.fromComponentProvider=function(t,e,n){var r=c.b.$injector.annotate(t),i=Object(h.a)(t)?Object(s.P)(t):t;return new it("",i,r).get(n)},t.prototype.makeComponentTemplate=function(t,e,n,r){r=r||{};var i=u.version.minor>=3?"::":"",o=function(t){var e=g(t);return/^(x|data)-/.exec(e)?"x-"+e:e},a=function(t){var e=c.b.$injector.get(t+"Directive");if(!e||!e.length)throw new Error("Unable to find component named '"+t+"'");return e.map(rn).reduce(s.T,[])}(n).map(function(n){var a=n.name,u=n.type,s=o(a);if(t.attr(s)&&!r[a])return s+"='"+t.attr(s)+"'";var l=r[a]||a;if("@"===u)return s+"='{{"+i+"$resolve."+l+"}}'";if("&"===u){var f=e.getResolvable(l),p=f&&f.data,d=p&&c.b.$injector.annotate(p)||[];return s+"='$resolve."+l+(Object(h.a)(p)?"["+(p.length-1)+"]":"")+"("+d.join(",")+")'"}return s+"='"+i+"$resolve."+l+"'"}).join(" "),l=o(n);return"<"+l+" "+a+">"+l+">"},t}();var rn=function(t){return Object(h.i)(t.bindToController)?on(t.bindToController):on(t.scope)},on=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@&])[?]?(.*)/.exec(t[e])]}).filter(function(t){return Object(h.c)(t)&&Object(h.a)(t[1])}).map(function(t){return{name:t[1][2]||t[0],type:t[1][1]}})},an=function(){function t(e,n){this.stateRegistry=e,this.stateService=n,Object(s.n)(Object(f.p)(t.prototype),this,Object(f.p)(this))}return t.prototype.decorator=function(t,e){return this.stateRegistry.decorator(t,e)||this},t.prototype.state=function(t,e){return Object(h.i)(t)?e=t:e.name=t,this.stateRegistry.register(e),this},t.prototype.onInvalid=function(t){return this.stateService.onInvalid(t)},t}(),un=function(t){return function(e,n){var r=e[t],i="onExit"===t?"from":"to";return r?function(t,e){var n=new ct(t.treeChanges(i)).subContext(e.$$state()),o=Object(s.r)(En(n),{$state$:e,$transition$:t});return c.b.$injector.invoke(r,this,o)}:void 0}},sn=function(){function t(t){this._urlListeners=[],this.$locationProvider=t;var e=Object(f.p)(t);Object(s.n)(e,this,e,["hashPrefix"])}return t.monkeyPatchPathParameterType=function(t){var e=t.urlMatcherFactory.type("path");e.encode=function(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t},e.decode=function(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}},t.prototype.dispose=function(){},t.prototype.onChange=function(t){var e=this;return this._urlListeners.push(t),function(){return Object(s.L)(e._urlListeners)(t)}},t.prototype.html5Mode=function(){var t=this.$locationProvider.html5Mode();return(t=Object(h.i)(t)?t.enabled:t)&&this.$sniffer.history},t.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},t.prototype.url=function(t,e,n){return void 0===e&&(e=!1),Object(h.c)(t)&&this.$location.url(t),e&&this.$location.replace(),n&&this.$location.state(n),this.$location.url()},t.prototype._runtimeServices=function(t,e,n,r,i){var o=this;this.$location=e,this.$sniffer=n,this.$browser=r,this.$window=i,t.$on("$locationChangeSuccess",function(t){return o._urlListeners.forEach(function(e){return e(t)})});var a=Object(f.p)(e);Object(s.n)(a,this,a,["replace","path","search","hash"]),Object(s.n)(a,this,a,["port","protocol","host"])},t}(),cn=function(){function t(t){this.router=t}return t.injectableHandler=function(t,e){return function(n){return c.b.$injector.invoke(e,null,{$match:n,$stateParams:t.globals.params})}},t.prototype.$get=function(){var t=this.router.urlService;return this.router.urlRouter.update(!0),t.interceptDeferred||t.listen(),this.router.urlRouter},t.prototype.rule=function(t){var e=this;if(!Object(h.d)(t))throw new Error("'rule' must be a function");var n=new Ft(function(){return t(c.b.$injector,e.router.locationService)},s.y);return this.router.urlService.rules.rule(n),this},t.prototype.otherwise=function(t){var e=this,n=this.router.urlService.rules;if(Object(h.l)(t))n.otherwise(t);else{if(!Object(h.d)(t))throw new Error("'rule' must be a string or function");n.otherwise(function(){return t(c.b.$injector,e.router.locationService)})}return this},t.prototype.when=function(e,n){return(Object(h.a)(n)||Object(h.d)(n))&&(n=t.injectableHandler(this.router,n)),this.router.urlService.rules.when(e,n),this},t.prototype.deferIntercept=function(t){this.router.urlService.deferIntercept(t)},t}();u.module("ui.router.angular1",[]);var ln=u.module("ui.router.init",["ng"]),fn=u.module("ui.router.util",["ui.router.init"]),hn=u.module("ui.router.router",["ui.router.util"]),pn=u.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),dn=u.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),vn=(u.module("ui.router.compat",["ui.router"]),null);function $n(t){(vn=this.router=new ee).stateProvider=new an(vn.stateRegistry,vn.stateService),vn.stateRegistry.decorator("views",Xe),vn.stateRegistry.decorator("onExit",un("onExit")),vn.stateRegistry.decorator("onRetain",un("onRetain")),vn.stateRegistry.decorator("onEnter",un("onEnter")),vn.viewService._pluginapi._viewConfigFactory("ng1",Ze());var e=vn.locationService=vn.locationConfig=new sn(t);function n(t,n,r,i,o,a,u){return e._runtimeServices(o,t,i,n,r),delete vn.router,delete vn.$get,vn}return sn.monkeyPatchPathParameterType(vn),vn.router=vn,vn.$get=n,n.$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],vn}$n.$inject=["$locationProvider"];var mn=function(t){return["$uiRouterProvider",function(e){var n=e.router[t];return n.$get=function(){return n},n}]};function gn(t,e,n){if(c.b.$injector=t,c.b.$q=e,!t.hasOwnProperty("strictDi"))try{t.invoke(function(t){})}catch(e){t.strictDi=!!/strict mode/.exec(e&&e.toString())}n.stateRegistry.get().map(function(t){return t.$$state().resolvables}).reduce(s.T,[]).filter(function(t){return"deferred"===t.deps}).forEach(function(e){return e.deps=t.annotate(e.resolveFn,t.strictDi)})}gn.$inject=["$injector","$q","$uiRouter"];function yn(t){t.$watch(function(){q.approximateDigests++})}yn.$inject=["$rootScope"],ln.provider("$uiRouter",$n),hn.provider("$urlRouter",["$uiRouterProvider",function(t){return t.urlRouterProvider=new cn(t)}]),fn.provider("$urlService",mn("urlService")),fn.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return vn.urlMatcherFactory}]),fn.provider("$templateFactory",function(){return new nn}),pn.provider("$stateRegistry",mn("stateRegistry")),pn.provider("$uiRouterGlobals",mn("globals")),pn.provider("$transitions",mn("transitionService")),pn.provider("$state",["$uiRouterProvider",function(){return Object(s.r)(vn.stateProvider,{$get:function(){return vn.stateService}})}]),pn.factory("$stateParams",["$uiRouter",function(t){return t.globals.params}]),dn.factory("$view",function(){return vn.viewService}),dn.service("$trace",function(){return q}),dn.run(yn),fn.run(["$urlMatcherFactory",function(t){}]),pn.run(["$state",function(t){}]),hn.run(["$urlRouter",function(t){}]),ln.run(gn);var bn,wn,On,Sn,En=function(t){return t.getTokens().filter(h.l).map(function(e){var n=t.getResolvable(e);return[e,"NOWAIT"===t.getPolicy(n).async?n.promise:n.data]}).reduce(s.h,{})};n(12);function jn(t){var e,n=t.match(/^\s*({[^}]*})\s*$/);if(n&&(t="("+n[1]+")"),!(e=t.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/))||4!==e.length)throw new Error("Invalid state ref '"+t+"'");return{state:e[1]||null,paramExpr:e[3]||null}}function xn(t){var e=t.parent().inheritedData("$uiView"),n=Object(f.k)("$cfg.path")(e);return n?Object(s.P)(n).state.name:void 0}function Cn(t,e,n){var r=n.uiState||t.current.name,i=Object(s.r)(function(t,e){return{relative:xn(t)||e.$current,inherit:!0,source:"sref"}}(e,t),n.uiStateOpts||{}),o=t.href(r,n.uiStateParams,i);return{uiState:r,uiStateParams:n.uiStateParams,uiStateOpts:i,href:o}}function _n(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),n="FORM"===t[0].nodeName;return{attr:n?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!n}}function kn(t,e,n,r,i){return function(o){var a=o.which||o.button,u=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||t.attr("target"))){var s=n(function(){t.attr("disabled")||e.go(u.uiState,u.uiStateParams,u.uiStateOpts)});o.preventDefault();var c=r.isAnchor&&!u.href?1:0;o.preventDefault=function(){c--<=0&&n.cancel(s)}}}}function Rn(t,e,n,r){var i;r&&(i=r.events),Object(h.a)(i)||(i=["click"]);for(var o=t.on?"on":"bind",a=0,u=i;a0)){var n=m(t,e,u);return g(),n}},e.$on("$destroy",(c=r.stateRegistry.onStatesChanged(v),l=r.transitionService.onStart({},d),f=e.$on("$stateChangeSuccess",g),function(){c(),l(),f()})),r.globals.transition&&d(r.globals.transition),g()}]}}],u.module("ui.router.state").directive("uiSref",bn).directive("uiSrefActive",On).directive("uiSrefActiveEq",On).directive("uiState",wn),Tn.$inject=["$state"],An.$inject=["$state"],u.module("ui.router.state").filter("isState",Tn).filter("includedByState",An),Sn=["$view","$animate","$uiViewScroll","$interpolate","$q",function(t,e,n,r,i){var o={$cfg:{viewDecl:{$context:t._pluginapi._rootViewContext()}},$uiView:{}},a={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(s,c,l){return function(s,c,p){var d,v,$,m,g,y=p.onload||"",b=p.autoscroll,w={enter:function(t,n,r){u.version.minor>2?e.enter(t,null,n).then(r):e.enter(t,null,n,r)},leave:function(t,n){u.version.minor>2?e.leave(t).then(n):e.leave(t,n)}},O=c.inheritedData("$uiView")||o,S=r(p.uiView||p.name||"")(s)||"$default",E={$type:"ng1",id:a.count++,name:S,fqn:O.$uiView.fqn?O.$uiView.fqn+"."+S:S,config:null,configUpdated:function(t){if(t&&!(t instanceof en))return;if(e=m,n=t,e===n)return;var e,n;q.traceUIViewConfigUpdated(E,t&&t.viewDecl&&t.viewDecl.$context),m=t,j(t)},get creationContext(){var t=Object(f.k)("$cfg.viewDecl.$context")(O),e=Object(f.k)("$uiView.creationContext")(O);return t||e}};function j(t){var e=s.$new(),r=i.defer(),o=i.defer(),a={$cfg:t,$uiView:E},u={$animEnter:r.promise,$animLeave:o.promise,$$animLeave:o};e.$emit("$viewContentLoading",S);var f=l(e,function(t){t.data("$uiViewAnim",u),t.data("$uiView",a),w.enter(t,c,function(){r.resolve(),$&&$.$emit("$viewContentAnimationEnded"),(Object(h.c)(b)&&!b||s.$eval(b))&&n(t)}),function(){if(d&&(q.traceUIViewEvent("Removing (previous) el",d.data("$uiView")),d.remove(),d=null),$&&(q.traceUIViewEvent("Destroying scope",E),$.$destroy(),$=null),v){var t=v.data("$uiViewAnim");q.traceUIViewEvent("Animate out",t),w.leave(v,function(){t.$$animLeave.resolve(),d=null}),d=v,v=null}}()});v=f,($=e).$emit("$viewContentLoaded",t||m),$.$eval(y)}q.traceUIViewEvent("Linking",E),c.data("$uiView",{$uiView:E}),j(),g=t.registerUIView(E),s.$on("$destroy",function(){q.traceUIViewEvent("Destroying/Unregistering",E),g()})}}};return a}],Pn.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var Vn="function"==typeof u.module("ui.router").component,Mn=0;function In(t,e,n,r,i){!Object(h.d)(n.$onInit)||i.viewDecl.component&&Vn||n.$onInit();var o=Object(s.P)(i.path).state.self,a={bind:n};if(Object(h.d)(n.uiOnParamsChanged)){var u=new ct(i.path).getResolvable("$transition$").data;r.$on("$destroy",e.onSuccess({},function(t){if(t!==u&&-1===t.exiting().indexOf(o)){var e=t.params("to"),r=t.params("from"),i=function(t){return t.paramSchema},a=t.treeChanges("to").map(i).reduce(s.T,[]),c=t.treeChanges("from").map(i).reduce(s.T,[]),l=a.filter(function(t){var n=c.indexOf(t);return-1===n||!c[n].type.equals(e[t.id],r[t.id])});if(l.length){var f=l.map(function(t){return t.id}),h=Object(s.s)(e,function(t,e){return-1!==f.indexOf(e)});n.uiOnParamsChanged(h,t)}}},a))}if(Object(h.d)(n.uiCanExit)){var c=Mn++,l=function(t){return!!t&&(t._uiCanExitIds&&!0===t._uiCanExitIds[c]||l(t.redirectedFrom()))},f={exiting:o.name};r.$on("$destroy",e.onBefore(f,function(e){var r,i=e._uiCanExitIds=e._uiCanExitIds||{};return l(e)||(r=t.when(n.uiCanExit(e))).then(function(t){return i[c]=!1!==t}),r},a))}}u.module("ui.router.state").directive("uiView",Sn),u.module("ui.router.state").directive("uiView",Pn),u.module("ui.router.state").provider("$uiViewScroll",function(){var t=!1;this.useAnchorScroll=function(){t=!0},this.$get=["$anchorScroll","$timeout",function(e,n){return t?e:function(t){return n(function(){t[0].scrollIntoView()},0,!1)}}]}),n.d(e,"watchDigests",function(){return yn}),n.d(e,"getLocals",function(){return En}),n.d(e,"getNg1ViewConfigFactory",function(){return Ze}),n.d(e,"ng1ViewsBuilder",function(){return Xe}),n.d(e,"Ng1ViewConfig",function(){return en}),n.d(e,"StateProvider",function(){return an}),n.d(e,"UrlRouterProvider",function(){return cn}),n.d(e,"core",function(){return r}),n.d(e,"UrlRules",function(){return Kt}),n.d(e,"UrlConfig",function(){return Yt}),n.d(e,"UIRouterGlobals",function(){return Gt}),n.d(e,"UIRouter",function(){return ee}),n.d(e,"UIRouterPluginBase",function(){return Ye}),n.d(e,"root",function(){return s.M}),n.d(e,"fromJson",function(){return s.x}),n.d(e,"toJson",function(){return s.Q}),n.d(e,"forEach",function(){return s.w}),n.d(e,"extend",function(){return s.r}),n.d(e,"equals",function(){return s.q}),n.d(e,"identity",function(){return s.y}),n.d(e,"noop",function(){return s.E}),n.d(e,"createProxyFunctions",function(){return s.n}),n.d(e,"inherit",function(){return s.A}),n.d(e,"inArray",function(){return s.z}),n.d(e,"_inArray",function(){return s.b}),n.d(e,"removeFrom",function(){return s.L}),n.d(e,"_removeFrom",function(){return s.d}),n.d(e,"pushTo",function(){return s.K}),n.d(e,"_pushTo",function(){return s.c}),n.d(e,"deregAll",function(){return s.p}),n.d(e,"defaults",function(){return s.o}),n.d(e,"mergeR",function(){return s.D}),n.d(e,"ancestors",function(){return s.f}),n.d(e,"pick",function(){return s.H}),n.d(e,"omit",function(){return s.F}),n.d(e,"pluck",function(){return s.I}),n.d(e,"filter",function(){return s.s}),n.d(e,"find",function(){return s.t}),n.d(e,"mapObj",function(){return s.C}),n.d(e,"map",function(){return s.B}),n.d(e,"values",function(){return s.U}),n.d(e,"allTrueR",function(){return s.e}),n.d(e,"anyTrueR",function(){return s.g}),n.d(e,"unnestR",function(){return s.T}),n.d(e,"flattenR",function(){return s.v}),n.d(e,"pushR",function(){return s.J}),n.d(e,"uniqR",function(){return s.R}),n.d(e,"unnest",function(){return s.S}),n.d(e,"flatten",function(){return s.u}),n.d(e,"assertPredicate",function(){return s.l}),n.d(e,"assertMap",function(){return s.k}),n.d(e,"assertFn",function(){return s.j}),n.d(e,"pairs",function(){return s.G}),n.d(e,"arrayTuples",function(){return s.i}),n.d(e,"applyPairs",function(){return s.h}),n.d(e,"tail",function(){return s.P}),n.d(e,"copy",function(){return s.m}),n.d(e,"_extend",function(){return s.a}),n.d(e,"silenceUncaughtInPromise",function(){return s.N}),n.d(e,"silentRejection",function(){return s.O}),n.d(e,"makeStub",function(){return c.a}),n.d(e,"services",function(){return c.b}),n.d(e,"Glob",function(){return l}),n.d(e,"curry",function(){return f.e}),n.d(e,"compose",function(){return f.d}),n.d(e,"pipe",function(){return f.m}),n.d(e,"prop",function(){return f.n}),n.d(e,"propEq",function(){return f.o}),n.d(e,"parse",function(){return f.k}),n.d(e,"not",function(){return f.i}),n.d(e,"and",function(){return f.b}),n.d(e,"or",function(){return f.j}),n.d(e,"all",function(){return f.a}),n.d(e,"any",function(){return f.c}),n.d(e,"is",function(){return f.h}),n.d(e,"eq",function(){return f.f}),n.d(e,"val",function(){return f.p}),n.d(e,"invoke",function(){return f.g}),n.d(e,"pattern",function(){return f.l}),n.d(e,"isUndefined",function(){return h.m}),n.d(e,"isDefined",function(){return h.c}),n.d(e,"isNull",function(){return h.f}),n.d(e,"isNullOrUndefined",function(){return h.g}),n.d(e,"isFunction",function(){return h.d}),n.d(e,"isNumber",function(){return h.h}),n.d(e,"isString",function(){return h.l}),n.d(e,"isObject",function(){return h.i}),n.d(e,"isArray",function(){return h.a}),n.d(e,"isDate",function(){return h.b}),n.d(e,"isRegExp",function(){return h.k}),n.d(e,"isInjectable",function(){return h.e}),n.d(e,"isPromise",function(){return h.j}),n.d(e,"Queue",function(){return p}),n.d(e,"maxLength",function(){return $}),n.d(e,"padString",function(){return m}),n.d(e,"kebobString",function(){return g}),n.d(e,"functionToString",function(){return y}),n.d(e,"fnToString",function(){return b}),n.d(e,"stringify",function(){return S}),n.d(e,"beforeAfterSubstr",function(){return E}),n.d(e,"hostRegex",function(){return j}),n.d(e,"stripLastPathElement",function(){return x}),n.d(e,"splitHash",function(){return C}),n.d(e,"splitQuery",function(){return _}),n.d(e,"splitEqual",function(){return k}),n.d(e,"trimHashVal",function(){return R}),n.d(e,"splitOnDelim",function(){return T}),n.d(e,"joinNeighborsR",function(){return A}),n.d(e,"Category",function(){return M}),n.d(e,"Trace",function(){return H}),n.d(e,"trace",function(){return q}),n.d(e,"DefType",function(){return z}),n.d(e,"Param",function(){return Y}),n.d(e,"ParamTypes",function(){return Z}),n.d(e,"StateParams",function(){return Q}),n.d(e,"ParamType",function(){return F}),n.d(e,"PathNode",function(){return X}),n.d(e,"PathUtils",function(){return et}),n.d(e,"resolvePolicies",function(){return nt}),n.d(e,"defaultResolvePolicy",function(){return rt}),n.d(e,"Resolvable",function(){return it}),n.d(e,"NATIVE_INJECTOR_TOKEN",function(){return st}),n.d(e,"ResolveContext",function(){return ct}),n.d(e,"resolvablesBuilder",function(){return yt}),n.d(e,"StateBuilder",function(){return Ot}),n.d(e,"StateObject",function(){return St}),n.d(e,"StateMatcher",function(){return Et}),n.d(e,"StateQueueManager",function(){return jt}),n.d(e,"StateRegistry",function(){return xt}),n.d(e,"StateService",function(){return je}),n.d(e,"TargetState",function(){return tt}),n.d(e,"TransitionHookPhase",function(){return bt}),n.d(e,"TransitionHookScope",function(){return wt}),n.d(e,"HookBuilder",function(){return At}),n.d(e,"matchState",function(){return kt}),n.d(e,"RegisteredHook",function(){return Rt}),n.d(e,"makeEvent",function(){return Tt}),n.d(e,"RejectType",function(){return i}),n.d(e,"Rejection",function(){return v}),n.d(e,"Transition",function(){return Vt}),n.d(e,"TransitionHook",function(){return _t}),n.d(e,"TransitionEventType",function(){return be}),n.d(e,"defaultTransOpts",function(){return Se}),n.d(e,"TransitionService",function(){return Ee}),n.d(e,"UrlMatcher",function(){return Ut}),n.d(e,"ParamFactory",function(){return Lt}),n.d(e,"UrlMatcherFactory",function(){return Ht}),n.d(e,"UrlRouter",function(){return zt}),n.d(e,"UrlRuleFactory",function(){return qt}),n.d(e,"BaseUrlRule",function(){return Ft}),n.d(e,"UrlService",function(){return Zt}),n.d(e,"ViewService",function(){return Wt}),n.d(e,"$q",function(){return xe}),n.d(e,"$injector",function(){return Re}),n.d(e,"BaseLocationServices",function(){return Ne}),n.d(e,"HashLocationService",function(){return De}),n.d(e,"MemoryLocationService",function(){return He}),n.d(e,"PushStateLocationService",function(){return Fe}),n.d(e,"MemoryLocationConfig",function(){return Be}),n.d(e,"BrowserLocationConfig",function(){return ze}),n.d(e,"keyValsToObjectR",function(){return Te}),n.d(e,"getParams",function(){return Ae}),n.d(e,"parseUrl",function(){return Pe}),n.d(e,"buildUrl",function(){return Ve}),n.d(e,"locationPluginFactory",function(){return Me}),n.d(e,"servicesPlugin",function(){return We}),n.d(e,"hashLocationPlugin",function(){return Ge}),n.d(e,"pushStateLocationPlugin",function(){return Je}),n.d(e,"memoryLocationPlugin",function(){return Ke});e.default="ui.router"},,,function(t,e){
+(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(t,e,n){"use strict";(function(t){n.d(e,"M",function(){return a}),n.d(e,"x",function(){return s}),n.d(e,"Q",function(){return c}),n.d(e,"w",function(){return l}),n.d(e,"r",function(){return f}),n.d(e,"q",function(){return h}),n.d(e,"y",function(){return p}),n.d(e,"E",function(){return d}),n.d(e,"n",function(){return v}),n.d(e,"A",function(){return $}),n.d(e,"z",function(){return m}),n.d(e,"b",function(){return g}),n.d(e,"L",function(){return y}),n.d(e,"d",function(){return b}),n.d(e,"K",function(){return w}),n.d(e,"c",function(){return O}),n.d(e,"p",function(){return S}),n.d(e,"o",function(){return E}),n.d(e,"D",function(){return j}),n.d(e,"f",function(){return x}),n.d(e,"H",function(){return C}),n.d(e,"F",function(){return _}),n.d(e,"I",function(){return k}),n.d(e,"s",function(){return R}),n.d(e,"t",function(){return T}),n.d(e,"C",function(){return A}),n.d(e,"B",function(){return P}),n.d(e,"U",function(){return V}),n.d(e,"e",function(){return M}),n.d(e,"g",function(){return I}),n.d(e,"T",function(){return N}),n.d(e,"v",function(){return U}),n.d(e,"J",function(){return D}),n.d(e,"R",function(){return L}),n.d(e,"S",function(){return H}),n.d(e,"u",function(){return q}),n.d(e,"l",function(){return F}),n.d(e,"k",function(){return B}),n.d(e,"j",function(){return z}),n.d(e,"G",function(){return W}),n.d(e,"i",function(){return G}),n.d(e,"h",function(){return J}),n.d(e,"P",function(){return K}),n.d(e,"m",function(){return Y}),n.d(e,"a",function(){return Z}),n.d(e,"N",function(){return X}),n.d(e,"O",function(){return tt});var r=n(1),i=n(2),o=n(3),a="object"==typeof self&&self.self===self&&self||"object"==typeof t&&t.global===t&&t||void 0,u=a.angular||{},s=u.fromJson||JSON.parse.bind(JSON),c=u.toJson||JSON.stringify.bind(JSON),l=u.forEach||function(t,e,n){if(Object(r.a)(t))return t.forEach(e,n);Object.keys(t).forEach(function(n){return e(t[n],n)})},f=Object.assign||Z,h=u.equals||Q;function p(t){return t}function d(){}function v(t,e,n,r,i){void 0===i&&(i=!1);var o=function(e){return t()[e].bind(n())};return(r=r||Object.keys(t())).reduce(function(t,n){var r;return t[n]=i?(r=n,function(){return e[r]=o(r),e[r].apply(null,arguments)}):o(n),t},e)}var $=function(t,e){return f(Object.create(t),e)},m=Object(i.e)(g);function g(t,e){return-1!==t.indexOf(e)}var y=Object(i.e)(b);function b(t,e){var n=t.indexOf(e);return n>=0&&t.splice(n,1),t}var w=Object(i.e)(O);function O(t,e){return t.push(e),e}var S=function(t){return t.slice().forEach(function(e){"function"==typeof e&&e(),y(t,e)})};function E(t){for(var e=[],n=1;n=n?t.apply(null,r):function(){return e(r.concat([].slice.apply(arguments)))}}(e)}function i(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}}function o(){for(var t=[],e=0;ethis._limit&&this.evict(),t},t.prototype.evict=function(){var t=this._items.shift();return this._evictListeners.forEach(function(e){return e(t)}),t},t.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},t.prototype.clear=function(){var t=this._items;return this._items=[],t},t.prototype.size=function(){return this._items.length},t.prototype.remove=function(t){var e=this._items.indexOf(t);return e>-1&&this._items.splice(e,1)[0]},t.prototype.peekTail=function(){return this._items[this._items.length-1]},t.prototype.peekHead=function(){if(this.size())return this._items[0]},t}();!function(t){t[t.SUPERSEDED=2]="SUPERSEDED",t[t.ABORTED=3]="ABORTED",t[t.INVALID=4]="INVALID",t[t.IGNORED=5]="IGNORED",t[t.ERROR=6]="ERROR"}(i||(i={}));var d=0,v=function(){function t(t,e,n){this.$id=d++,this.type=t,this.message=e,this.detail=n}return t.isRejectionPromise=function(e){return e&&"function"==typeof e.then&&Object(f.h)(t)(e._transitionRejection)},t.superseded=function(e,n){var r=new t(i.SUPERSEDED,"The transition has been superseded by a different transition",e);return n&&n.redirected&&(r.redirected=!0),r},t.redirected=function(e){return t.superseded(e,{redirected:!0})},t.invalid=function(e){return new t(i.INVALID,"This transition is invalid",e)},t.ignored=function(e){return new t(i.IGNORED,"The transition was ignored",e)},t.aborted=function(e){return new t(i.ABORTED,"The transition has been aborted",e)},t.errored=function(e){return new t(i.ERROR,"The transition errored",e)},t.normalize=function(e){return Object(f.h)(t)(e)?e:t.errored(e)},t.prototype.toString=function(){var t,e=(t=this.detail)&&t.toString!==Object.prototype.toString?t.toString():S(t);return"Transition Rejection($id: "+this.$id+" type: "+this.type+", message: "+this.message+", detail: "+e+")"},t.prototype.toPromise=function(){return Object(s.r)(Object(s.O)(this),{_transitionRejection:this})},t}();function $(t,e){return e.length<=t?e:e.substr(0,t-3)+"..."}function m(t,e){for(;e.length "+S(t))},t.prototype.traceTransitionIgnored=function(t){this.enabled(M.TRANSITION)&&console.log(L(t)+": Ignored <> "+S(t))},t.prototype.traceHookInvocation=function(t,e,n){if(this.enabled(M.HOOK)){var r=Object(f.k)("traceData.hookType")(n)||"internal",i=Object(f.k)("traceData.context.state.name")(n)||Object(f.k)("traceData.context")(n)||"unknown",o=y(t.registeredHook.callback);console.log(L(e)+": Hook -> "+r+" context: "+i+", "+$(200,o))}},t.prototype.traceHookResult=function(t,e,n){this.enabled(M.HOOK)&&console.log(L(e)+": <- Hook returned: "+$(200,S(t)))},t.prototype.traceResolvePath=function(t,e,n){this.enabled(M.RESOLVE)&&console.log(L(n)+": Resolving "+t+" ("+e+")")},t.prototype.traceResolvableResolved=function(t,e){this.enabled(M.RESOLVE)&&console.log(L(e)+": <- Resolved "+t+" to: "+$(200,S(t.data)))},t.prototype.traceError=function(t,e){this.enabled(M.TRANSITION)&&console.log(L(e)+": <- Rejected "+S(e)+", reason: "+t)},t.prototype.traceSuccess=function(t,e){this.enabled(M.TRANSITION)&&console.log(L(e)+": <- Success "+S(e)+", final state: "+t.name)},t.prototype.traceUIViewEvent=function(t,e,n){void 0===n&&(n=""),this.enabled(M.UIVIEW)&&console.log("ui-view: "+m(30,t)+" "+P(e)+n)},t.prototype.traceUIViewConfigUpdated=function(t,e){this.enabled(M.UIVIEW)&&this.traceUIViewEvent("Updating",t," with ViewConfig from context='"+e+"'")},t.prototype.traceUIViewFill=function(t,e){this.enabled(M.UIVIEW)&&this.traceUIViewEvent("Fill",t," with: "+$(200,e))},t.prototype.traceViewSync=function(t){if(this.enabled(M.VIEWCONFIG)){var e="uiview component fqn",n=t.map(function(t){var n,r=t.uiView,i=t.viewConfig,o=r&&r.fqn,a=i&&i.viewDecl.$context.name+": ("+i.viewDecl.$name+")";return(n={})[e]=o,n["view config state (view name)"]=a,n}).sort(function(t,n){return(t[e]||"").localeCompare(n[e]||"")});N(n)}},t.prototype.traceViewServiceEvent=function(t,e){this.enabled(M.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+function(t){var e=t.viewDecl,n=e.$context.name||"(root)";return"[View#"+t.$id+" from '"+n+"' state]: target ui-view: '"+e.$uiViewName+"@"+e.$uiViewContextAnchor+"'"}(e))},t.prototype.traceViewServiceUIViewEvent=function(t,e){this.enabled(M.VIEWCONFIG)&&console.log("VIEWCONFIG: "+t+" "+P(e))},t}(),q=new H,F=function(){function t(t){this.pattern=/.*/,this.inherit=!0,Object(s.r)(this,t)}return t.prototype.is=function(t,e){return!0},t.prototype.encode=function(t,e){return t},t.prototype.decode=function(t,e){return t},t.prototype.equals=function(t,e){return t==e},t.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},t.prototype.toString=function(){return"{ParamType:"+this.name+"}"},t.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},t.prototype.$asArray=function(t,e){if(!t)return this;if("auto"===t&&!e)throw new Error("'auto' array mode is for query parameters only");return new B(this,t)},t}();function B(t,e){var n=this;function r(t){return Object(h.a)(t)?t:Object(h.c)(t)?[t]:[]}function i(t,n){return function(i){if(Object(h.a)(i)&&0===i.length)return i;var o=r(i),a=Object(s.B)(o,t);return!0===n?0===Object(s.s)(a,function(t){return!t}).length:function(t){switch(t.length){case 0:return;case 1:return"auto"===e?t[0]:t;default:return t}}(a)}}function o(t){return function(e,n){var i=r(e),o=r(n);if(i.length!==o.length)return!1;for(var a=0;a=0||(a.push(r[c]),o[r[c]]=this[r[c]]);return Object(s.r)({},o,t)},t}(),X=function(){function t(e){if(e instanceof t){var n=e;this.state=n.state,this.paramSchema=n.paramSchema.slice(),this.paramValues=Object(s.r)({},n.paramValues),this.resolvables=n.resolvables.slice(),this.views=n.views&&n.views.slice()}else{var r=e;this.state=r,this.paramSchema=r.parameters({inherit:!1}),this.paramValues={},this.resolvables=r.resolvables.map(function(t){return t.clone()})}}return t.prototype.clone=function(){return new t(this)},t.prototype.applyRawParams=function(t){return this.paramValues=this.paramSchema.reduce(function(e,n){return Object(s.h)(e,[(r=n).id,r.value(t[r.id])]);var r},{}),this},t.prototype.parameter=function(t){return Object(s.t)(this.paramSchema,Object(f.o)("id",t))},t.prototype.equals=function(t,e){var n=this.diff(t,e);return n&&0===n.length},t.prototype.diff=function(t,e){if(this.state!==t.state)return!1;var n=e?e(this):this.paramSchema;return Y.changed(n,this.paramValues,t.paramValues)},t.clone=function(t){return t.clone()},t}(),tt=function(){function t(t,e,n,r){this._stateRegistry=t,this._identifier=e,this._identifier=e,this._params=Object(s.r)({},n||{}),this._options=Object(s.r)({},r||{}),this._definition=t.matcher.find(e,this._options.relative)}return t.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},t.prototype.identifier=function(){return this._identifier},t.prototype.params=function(){return this._params},t.prototype.$state=function(){return this._definition},t.prototype.state=function(){return this._definition&&this._definition.self},t.prototype.options=function(){return this._options},t.prototype.exists=function(){return!(!this._definition||!this._definition.self)},t.prototype.valid=function(){return!this.error()},t.prototype.error=function(){var t=this.options().relative;if(!this._definition&&t){var e=t.name?t.name:t;return"Could not resolve '"+this.name()+"' from state '"+e+"'"}return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'"},t.prototype.toString=function(){return"'"+this.name()+"'"+S(this.params())},t.prototype.withState=function(e){return new t(this._stateRegistry,e,this._params,this._options)},t.prototype.withParams=function(e,n){void 0===n&&(n=!1);var r=n?e:Object(s.r)({},this._params,e);return new t(this._stateRegistry,this._identifier,r,this._options)},t.prototype.withOptions=function(e,n){void 0===n&&(n=!1);var r=n?e:Object(s.r)({},this._options,e);return new t(this._stateRegistry,this._identifier,this._params,r)},t.isDef=function(t){return t&&t.state&&(Object(h.l)(t.state)||Object(h.l)(t.state.name))},t}(),et=function(){function t(){}return t.makeTargetState=function(t,e){var n=Object(s.P)(e).state;return new tt(t,n,e.map(Object(f.n)("paramValues")).reduce(s.D,{}),{})},t.buildPath=function(t){var e=t.params();return t.$state().path.map(function(t){return new X(t).applyRawParams(e)})},t.buildToPath=function(e,n){var r=t.buildPath(n);return n.options().inherit?t.inheritParams(e,r,Object.keys(n.params())):r},t.applyViewConfigs=function(e,n,r){n.filter(function(t){return Object(s.z)(r,t.state)}).forEach(function(r){var i=Object(s.U)(r.state.views||{}),o=t.subPath(n,function(t){return t===r}),a=i.map(function(t){return e.createViewConfig(o,t)});r.views=a.reduce(s.T,[])})},t.inheritParams=function(t,e,n){void 0===n&&(n=[]);var r=t.map(function(t){return t.paramSchema}).reduce(s.T,[]).filter(function(t){return!t.inherit}).map(Object(f.n)("id"));return e.map(function(e){var i=Object(s.r)({},e&&e.paramValues),o=Object(s.H)(i,n);i=Object(s.F)(i,n);var a,u,c,l=Object(s.F)((a=t,u=e.state,c=Object(s.t)(a,Object(f.o)("state",u)),Object(s.r)({},c&&c.paramValues)||{}),r),h=Object(s.r)(i,l,o);return new X(e.state).applyRawParams(h)})},t.treeChanges=function(e,n,r){for(var i,o,a,u,s,c,l=Math.min(e.length,n.length),f=0;f1?r:r[0]:Object(h.l)(t)&&Object(h.d)(e)?(n[t]=r,n[t].push(e),function(){return n[t].splice(n[t].indexOf(e,1))&&null}):void 0},t.prototype.build=function(t){var e=this.matcher,n=this.builders,r=this.parentName(t);if(r&&!e.find(r,void 0,!1))return null;for(var i in n)if(n.hasOwnProperty(i)){var o=n[i].reduce(function(t,e){return function(n){return e(n,t)}},s.E);t[i]=o(t)}return t},t.prototype.parentName=function(t){var e=t.name||"",n=e.split(".");if("**"===n.pop()&&n.pop(),n.length){if(t.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+e+")");return n.join(".")}return t.parent?Object(h.l)(t.parent)?t.parent:t.parent.name:""},t.prototype.name=function(t){var e=t.name;if(-1!==e.indexOf(".")||!t.parent)return e;var n=Object(h.l)(t.parent)?t.parent:t.parent.name;return n?n+"."+e:e},t}(),St=function(){function t(e){return t.create(e||{})}return t.create=function(e){e=t.isStateClass(e)?new e:e;var n=Object(s.A)(Object(s.A)(e,t.prototype));return e.$$state=function(){return n},n.self=e,n.__stateObjectCache={nameGlob:l.fromString(n.name)},n},t.prototype.is=function(t){return this===t||this.self===t||this.fqn()===t},t.prototype.fqn=function(){if(!(this.parent&&this.parent instanceof this.constructor))return this.name;var t=this.parent.fqn();return t?t+"."+this.name:this.name},t.prototype.root=function(){return this.parent&&this.parent.root()||this},t.prototype.parameters=function(t){return((t=Object(s.o)(t,{inherit:!0,matchingKeys:null})).inherit&&this.parent&&this.parent.parameters()||[]).concat(Object(s.U)(this.params)).filter(function(e){return!t.matchingKeys||t.matchingKeys.hasOwnProperty(e.id)})},t.prototype.parameter=function(t,e){return void 0===e&&(e={}),this.url&&this.url.parameter(t,e)||Object(s.t)(Object(s.U)(this.params),Object(f.o)("id",t))||e.inherit&&this.parent&&this.parent.parameter(t)},t.prototype.toString=function(){return this.fqn()},t.isStateClass=function(t){return Object(h.d)(t)&&!0===t.__uiRouterState},t.isState=function(t){return Object(h.i)(t.__stateObjectCache)},t}(),Et=function(){function t(t){this._states=t}return t.prototype.isRelative=function(t){return 0===(t=t||"").indexOf(".")||0===t.indexOf("^")},t.prototype.find=function(t,e,n){if(void 0===n&&(n=!0),t||""===t){var r=Object(h.l)(t),i=r?t:t.name;this.isRelative(i)&&(i=this.resolvePath(i,e));var o=this._states[i];if(o&&(r||!(r||o!==t&&o.self!==t)))return o;if(r&&n){var a=Object(s.U)(this._states).filter(function(t){return t.__stateObjectCache.nameGlob&&t.__stateObjectCache.nameGlob.matches(i)});return a.length>1&&console.log("stateMatcher.find: Found multiple matches for "+i+" using glob: ",a.map(function(t){return t.name})),a[0]}}},t.prototype.resolvePath=function(t,e){if(!e)throw new Error("No reference point given for path '"+t+"'");for(var n=this.find(e),r=t.split("."),i=r.length,o=0,a=n;o0;){var c=e.shift(),l=c.name,f=r.build(c),h=o.indexOf(c);if(f){var p=u(l);if(p&&p.name===l)throw new Error("State '"+l+"' is already defined");var d=u(l+".**");d&&this.router.stateRegistry.deregister(d),n[l]=c,this.attachRoute(c),h>=0&&o.splice(h,1),i.push(c)}else{var v=a[l];if(a[l]=e.length,h>=0&&v===e.length)return e.push(c),s(),n;h<0&&o.push(c),e.push(c)}}return s(),n},t.prototype.attachRoute=function(t){if(!t.abstract&&t.url){var e=this.router.urlService.rules;e.rule(e.urlRuleFactory.create(t))}},t}(),xt=function(){function t(t){this.router=t,this.states={},this.listeners=[],this.matcher=new Et(this.states),this.builder=new Ot(this.matcher,t.urlMatcherFactory),this.stateQueue=new jt(t,this.states,this.builder,this.listeners),this._registerRoot()}return t.prototype._registerRoot=function(){(this._root=this.stateQueue.register({name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},abstract:!0})).navigable=null},t.prototype.dispose=function(){var t=this;this.stateQueue.dispose(),this.listeners=[],this.get().forEach(function(e){return t.get(e)&&t.deregister(e)})},t.prototype.onStatesChanged=function(t){return this.listeners.push(t),function(){Object(s.L)(this.listeners)(t)}.bind(this)},t.prototype.root=function(){return this._root},t.prototype.register=function(t){return this.stateQueue.register(t)},t.prototype._deregisterTree=function(t){var e=this,n=this.get().map(function(t){return t.$$state()}),r=function(t){var e=n.filter(function(e){return-1!==t.indexOf(e.parent)});return 0===e.length?e:e.concat(r(e))},i=r([t]),o=[t].concat(i).reverse();return o.forEach(function(t){var n=e.router.urlService.rules;n.rules().filter(Object(f.o)("state",t)).forEach(function(t){return n.removeRule(t)}),delete e.states[t.name]}),o},t.prototype.deregister=function(t){var e=this.get(t);if(!e)throw new Error("Can't deregister state; not found: "+t);var n=this._deregisterTree(e.$$state());return this.listeners.forEach(function(t){return t("deregistered",n.map(function(t){return t.self}))}),n},t.prototype.get=function(t,e){var n=this;if(0===arguments.length)return Object.keys(this.states).map(function(t){return n.states[t].self});var r=this.matcher.find(t,e);return r&&r.self||null},t.prototype.decorator=function(t,e){return this.builder.builder(t,e)},t}();!function(t){t[t.CREATE=0]="CREATE",t[t.BEFORE=1]="BEFORE",t[t.RUN=2]="RUN",t[t.SUCCESS=3]="SUCCESS",t[t.ERROR=4]="ERROR"}(bt||(bt={})),function(t){t[t.TRANSITION=0]="TRANSITION",t[t.STATE=1]="STATE"}(wt||(wt={}));var Ct={current:s.E,transition:null,traceData:{},bind:null},_t=function(){function t(t,e,n,r){var i=this;this.transition=t,this.stateContext=e,this.registeredHook=n,this.options=r,this.isSuperseded=function(){return i.type.hookPhase===bt.RUN&&!i.options.transition.isActive()},this.options=Object(s.o)(r,Ct),this.type=n.eventType}return t.chain=function(t,e){return t.reduce(function(t,e){return t.then(function(){return e.invokeHook()})},e||c.b.$q.when())},t.invokeHooks=function(e,n){for(var r=0;r=e.invokeLimit&&e.deregister()}}},t.prototype.handleHookResult=function(t){var e=this,n=this.getNotCurrentRejection();return n||(Object(h.j)(t)?t.then(function(t){return e.handleHookResult(t)}):(q.traceHookResult(t,this.transition,this.options),!1===t?v.aborted("Hook aborted transition").toPromise():Object(f.h)(tt)(t)?v.redirected(t).toPromise():void 0))},t.prototype.getNotCurrentRejection=function(){var t=this.transition.router;return t._disposed?v.aborted("UIRouter instance #"+t.$id+" has been stopped (disposed)").toPromise():this.transition._aborted?v.aborted().toPromise():this.isSuperseded()?v.superseded(this.options.current()).toPromise():void 0},t.prototype.toString=function(){var t=this.options,e=this.registeredHook;return(Object(f.k)("traceData.hookType")(t)||"internal")+" context: "+(Object(f.k)("traceData.context.state.name")(t)||Object(f.k)("traceData.context")(t)||"unknown")+", "+$(200,b(e.callback))},t.HANDLE_RESULT=function(t){return function(e){return t.handleHookResult(e)}},t.LOG_REJECTED_RESULT=function(t){return function(e){Object(h.j)(e)&&e.catch(function(e){return t.logError(v.normalize(e))})}},t.LOG_ERROR=function(t){return function(e){return t.logError(e)}},t.REJECT_ERROR=function(t){return function(t){return Object(s.O)(t)}},t.THROW_ERROR=function(t){return function(t){throw t}},t}();function kt(t,e,n){var r=Object(h.l)(e)?[e]:e;return!!(Object(h.d)(r)?r:function(t){for(var e=r,n=0;n20)throw new Error("Too many consecutive Transition redirects (20+)");var r={redirectedFrom:this,source:"redirect"};"url"===this.options().source&&!1!==t.options().location&&(r.location="replace");var i=Object(s.r)({},this.options(),t.options(),r);t=t.withOptions(i,!0);var o,a=this.router.transitionService.create(this._treeChanges.from,t),u=this._treeChanges.entering,c=a._treeChanges.entering;return et.matching(c,u,et.nonDynamicParams).filter(Object(f.i)((o=t.options().reloadState,function(t){return o&&t.state.includes[o.name]}))).forEach(function(t,e){t.resolvables=u[e].resolvables}),a},t.prototype._changedParams=function(){var t=this._treeChanges;if(!this._options.reload&&(!t.exiting.length&&!t.entering.length&&t.to.length===t.from.length&&!Object(s.i)(t.to,t.from).map(function(t){return t[0].state!==t[1].state}).reduce(s.g,!1))){var e=t.to.map(function(t){return t.paramSchema}),n=[t.to,t.from].map(function(t){return t.map(function(t){return t.paramValues})}),r=n[0],i=n[1];return Object(s.i)(e,r,i).map(function(t){var e=t[0],n=t[1],r=t[2];return Y.changed(e,n,r)}).reduce(s.T,[])}},t.prototype.dynamic=function(){var t=this._changedParams();return!!t&&t.map(function(t){return t.dynamic}).reduce(s.g,!1)},t.prototype.ignored=function(){return!!this._ignoredReason()},t.prototype._ignoredReason=function(){var t=this.router.globals.transition,e=this._options.reloadState,n=function(t,n){if(t.length!==n.length)return!1;var r=et.matching(t,n);return t.length===r.filter(function(t){return!e||!t.state.includes[e.name]}).length},r=this.treeChanges(),i=t&&t.treeChanges();return i&&n(i.to,r.to)&&n(i.exiting,r.exiting)?"SameAsPending":0===r.exiting.length&&0===r.entering.length&&n(r.from,r.to)?"SameAsCurrent":void 0},t.prototype.run=function(){var t=this,e=_t.runAllHooks,n=function(e){return t._hookBuilder.buildHooksForPhase(e)},r=n(bt.BEFORE);return _t.invokeHooks(r,function(){var e=t.router.globals;return e.lastStartedTransitionId=t.$id,e.transition=t,e.transitionHistory.enqueue(t),q.traceTransitionStart(t),c.b.$q.when(void 0)}).then(function(){var t=n(bt.RUN);return _t.invokeHooks(t,function(){return c.b.$q.when(void 0)})}).then(function(){q.traceSuccess(t.$to(),t),t.success=!0,t._deferred.resolve(t.to()),e(n(bt.SUCCESS))},function(r){q.traceError(r,t),t.success=!1,t._deferred.reject(r),t._error=r,e(n(bt.ERROR))}),this.promise},t.prototype.valid=function(){return!this.error()||void 0!==this.success},t.prototype.abort=function(){Object(h.m)(this.success)&&(this._aborted=!0)},t.prototype.error=function(){var t=this.$to();if(t.self.abstract)return v.invalid("Cannot transition to abstract state '"+t.name+"'");var e=t.parameters(),n=this.params(),r=e.filter(function(t){return!t.validates(n[t.id])});if(r.length){var i=r.map(function(t){return"["+t.id+":"+S(n[t.id])+"]"}).join(", "),o="The following parameter values are not valid for state '"+t.name+"': "+i;return v.invalid(o)}return!1===this.success?this._error:void 0},t.prototype.toString=function(){var t=this.from(),e=this.to(),n=function(t){return null!==t["#"]&&void 0!==t["#"]?t:Object(s.F)(t,["#"])};return"Transition#"+this.$id+"( '"+(Object(h.i)(t)?t.name:t)+"'"+S(n(this._treeChanges.from.map(Object(f.n)("paramValues")).reduce(s.D,{})))+" -> "+(this.valid()?"":"(X) ")+"'"+(Object(h.i)(e)?e.name:e)+"'"+S(n(this.params()))+" )"},t.diToken=t,t}();function Mt(t,e){var n=["",""],r=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!e)return r;switch(e.squash){case!1:n=["(",")"+(e.isOptional?"?":"")];break;case!0:r=r.replace(/\/$/,""),n=["(?:/(",")|/)?"];break;default:n=["("+e.squash+"|",")?"]}return r+n[0]+e.type.pattern.source+n[1]}var It=T("/"),Nt={state:{params:{}},strict:!0,caseInsensitive:!0},Ut=function(){function t(e,n,r,i){var o=this;this._cache={path:[this]},this._children=[],this._params=[],this._segments=[],this._compiled=[],this.config=i=Object(s.o)(i,Nt),this.pattern=e;for(var a,u,c,l=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,h=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,p=[],d=0,v=function(n){if(!t.nameValidator.test(n))throw new Error("Invalid parameter name '"+n+"' in pattern '"+e+"'");if(Object(s.t)(o._params,Object(f.o)("id",n)))throw new Error("Duplicate parameter name '"+n+"' in pattern '"+e+"'")},$=function(t,r){var i,a=t[2]||t[3],u=r?t[4]:t[4]||("*"===t[1]?"[\\s\\S]*":null);return{id:a,regexp:u,segment:e.substring(d,t.index),type:u?n.type(u)||(i=u,Object(s.A)(n.type(r?"query":"path"),{pattern:new RegExp(i,o.config.caseInsensitive?"i":void 0)})):null}};(a=l.exec(e))&&!((u=$(a,!1)).segment.indexOf("?")>=0);)v(u.id),this._params.push(r.fromPath(u.id,u.type,i.state)),this._segments.push(u.segment),p.push([u.segment,Object(s.P)(this._params)]),d=l.lastIndex;var m=(c=e.substring(d)).indexOf("?");if(m>=0){var g=c.substring(m);if(c=c.substring(0,m),g.length>0)for(d=0;a=h.exec(g);)v((u=$(a,!0)).id),this._params.push(r.fromSearch(u.id,u.type,i.state)),d=l.lastIndex}this._segments.push(c),this._compiled=p.map(function(t){return Mt.apply(null,t)}).concat(Mt(c))}return t.encodeDashes=function(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})},t.pathSegmentsAndParams=function(t){var e=t._segments,n=t._params.filter(function(t){return t.location===z.PATH});return Object(s.i)(e,n.concat(void 0)).reduce(s.T,[]).filter(function(t){return""!==t&&Object(h.c)(t)})},t.queryParams=function(t){return t._params.filter(function(t){return t.location===z.SEARCH})},t.compare=function(e,n){var r=function(e){return e._cache.weights=e._cache.weights||function(e){return e._cache.segments=e._cache.segments||e._cache.path.map(t.pathSegmentsAndParams).reduce(s.T,[]).reduce(A,[]).map(function(t){return Object(h.l)(t)?It(t):t}).reduce(s.T,[])}(e).map(function(t){return"/"===t?1:Object(h.l)(t)?2:t instanceof Y?3:void 0})},i=r(e),o=r(n);!function(t,e,n){for(var r=Math.max(t.length,e.length);t.length Registering",t),this._viewConfigs.push(t)},t.prototype.sync=function(){var e=this,n=this._uiViews.map(function(t){return[t.fqn,t]}).reduce(s.h,{});function r(t){for(var e=t.viewDecl.$context,n=0;++n&&e.parent;)e=e.parent;return n}var i=Object(f.e)(function(t,e,n,r){return e*(t(n)-t(r))}),o=this._uiViews.sort(i(function(t){var e=function(t){return t&&t.parent?e(t.parent)+1:1};return 1e4*t.fqn.split(".").length+e(t.creationContext)},1)).map(function(o){var a=e._viewConfigs.filter(t.matches(n,o));return a.length>1&&a.sort(i(r,-1)),{uiView:o,viewConfig:a[0]}}),a=o.map(function(t){return t.viewConfig}),u=this._viewConfigs.filter(function(t){return!Object(s.z)(a,t)}).map(function(t){return{uiView:void 0,viewConfig:t}});o.forEach(function(t){-1!==e._uiViews.indexOf(t.uiView)&&t.uiView.configUpdated(t.viewConfig)});var c=o.concat(u);this._listeners.forEach(function(t){return t(c)}),q.traceViewSync(c)},t.prototype.registerUIView=function(t){q.traceViewServiceUIViewEvent("-> Registering",t);var e=this._uiViews;return e.filter(function(e){return e.fqn===t.fqn&&e.$type===t.$type}).length&&q.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){-1!==e.indexOf(t)?(q.traceViewServiceUIViewEvent("<- Deregistering",t),Object(s.L)(e)(t)):q.traceViewServiceUIViewEvent("Tried removing non-registered uiView",t)}},t.prototype.available=function(){return this._uiViews.map(Object(f.n)("fqn"))},t.prototype.active=function(){return this._uiViews.filter(Object(f.n)("$config")).map(Object(f.n)("name"))},t.matches=function(t,e){return function(n){if(e.$type!==n.viewDecl.$type)return!1;var r=n.viewDecl,i=r.$uiViewName.split("."),o=e.fqn.split(".");if(!Object(s.q)(i,o.slice(0-i.length)))return!1;var a=1-i.length||void 0,u=o.slice(0,a).join("."),c=t[u].creationContext;return r.$uiViewContextAnchor===(c&&c.name)}},t}(),Gt=function(){function t(){this.params=new Q,this.lastStartedTransitionId=-1,this.transitionHistory=new p([],1),this.successfulTransitions=new p([],1)}return t.prototype.dispose=function(){this.transitionHistory.clear(),this.successfulTransitions.clear(),this.transition=null},t}();function Jt(t){if(!(Object(h.d)(t)||Object(h.l)(t)||Object(f.h)(tt)(t)||tt.isDef(t)))throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property");return Object(h.d)(t)?t:Object(f.p)(t)}Bt=function(t,e){var n=function(t,e){return(e.priority||0)-(t.priority||0)}(t,e);return 0!==n?n:0!==(n=function(t,e){var n={STATE:4,URLMATCHER:4,REGEXP:3,RAW:2,OTHER:1};return(n[t.type]||0)-(n[e.type]||0)}(t,e))?n:0!==(n=function(t,e){return t.urlMatcher&&e.urlMatcher?Ut.compare(t.urlMatcher,e.urlMatcher):0}(t,e))?n:function(t,e){var n={STATE:!0,URLMATCHER:!0};return n[t.type]&&n[e.type]?0:(t.$id||0)-(e.$id||0)}(t,e)};var Kt=function(){function t(t){this.router=t,this._sortFn=Bt,this._rules=[],this._id=0,this.urlRuleFactory=new qt(t)}return t.prototype.dispose=function(t){this._rules=[],delete this._otherwiseFn},t.prototype.initial=function(t){var e=Jt(t);this.rule(this.urlRuleFactory.create(function(t,e){return 0===e.globals.transitionHistory.size()&&!!/^\/?$/.exec(t.path)},e))},t.prototype.otherwise=function(t){var e=Jt(t);this._otherwiseFn=this.urlRuleFactory.create(Object(f.p)(!0),e),this._sorted=!1},t.prototype.removeRule=function(t){Object(s.L)(this._rules,t)},t.prototype.rule=function(t){var e=this;if(!qt.isUrlRule(t))throw new Error("invalid rule");return t.$id=this._id++,t.priority=t.priority||0,this._rules.push(t),this._sorted=!1,function(){return e.removeRule(t)}},t.prototype.rules=function(){return this.ensureSorted(),this._rules.concat(this._otherwiseFn?[this._otherwiseFn]:[])},t.prototype.sort=function(t){for(var e=this.stableSort(this._rules,this._sortFn=t||this._sortFn),n=0,r=0;rn.weight?u:n}return n},t}(),Qt=0,Xt=Object(c.a)("LocationServices",["url","path","search","hash","onChange"]),te=Object(c.a)("LocationConfig",["port","protocol","host","baseHref","html5Mode","hashPrefix"]),ee=function(){function t(t,e){void 0===t&&(t=Xt),void 0===e&&(e=te),this.locationService=t,this.locationConfig=e,this.$id=Qt++,this._disposed=!1,this._disposables=[],this.trace=q,this.viewService=new Wt(this),this.globals=new Gt,this.transitionService=new Ee(this),this.urlMatcherFactory=new Ht(this),this.urlRouter=new zt(this),this.urlService=new Zt(this),this.stateRegistry=new xt(this),this.stateService=new je(this),this._plugins={},this.viewService._pluginapi._rootViewContext(this.stateRegistry.root()),this.globals.$current=this.stateRegistry.root(),this.globals.current=this.globals.$current.self,this.disposable(this.globals),this.disposable(this.stateService),this.disposable(this.stateRegistry),this.disposable(this.transitionService),this.disposable(this.urlService),this.disposable(t),this.disposable(e)}return t.prototype.disposable=function(t){this._disposables.push(t)},t.prototype.dispose=function(t){var e=this;t&&Object(h.d)(t.dispose)?t.dispose(this):(this._disposed=!0,this._disposables.slice().forEach(function(t){try{"function"==typeof t.dispose&&t.dispose(e),Object(s.L)(e._disposables,t)}catch(t){}}))},t.prototype.plugin=function(t,e){void 0===e&&(e={});var n=new t(this,e);if(!n.name)throw new Error("Required property `name` missing on plugin: "+n);return this._disposables.push(n),this._plugins[n.name]=n},t.prototype.getPlugin=function(t){return t?this._plugins[t]:Object(s.U)(this._plugins)},t}();function ne(t){t.addResolvable(it.fromData(ee,t.router),""),t.addResolvable(it.fromData(Vt,t),""),t.addResolvable(it.fromData("$transition$",t),""),t.addResolvable(it.fromData("$stateParams",t.params()),""),t.entering().forEach(function(e){t.addResolvable(it.fromData("$state$",e),e)})}var re=["$transition$",Vt],ie=Object(s.z)(re),oe=function(t){var e=Object(s.U)(t.treeChanges()).reduce(s.T,[]).reduce(s.R,[]),n=function(t){return ie(t.token)?it.fromData(t.token,null):t};e.forEach(function(t){t.resolvables=t.resolvables.map(n)})},ae=function(t){var e=t.to().redirectTo;if(e){var n=t.router.stateService;return Object(h.d)(e)?c.b.$q.when(e(t)).then(r):r(e)}function r(e){if(e)return e instanceof tt?e:Object(h.l)(e)?n.target(e,t.params(),t.options()):e.state||e.params?n.target(e.state||t.to(),e.params||t.params(),t.options()):void 0}};function ue(t){return function(e,n){return(0,n.$$state()[t])(e,n)}}var se=ue("onExit"),ce=ue("onRetain"),le=ue("onEnter"),fe=function(t){return new ct(t.treeChanges().to).resolvePath("EAGER",t).then(s.E)},he=function(t,e){return new ct(t.treeChanges().to).subContext(e.$$state()).resolvePath("LAZY",t).then(s.E)},pe=function(t){return new ct(t.treeChanges().to).resolvePath("LAZY",t).then(s.E)},de=function(t){var e=c.b.$q,n=t.views("entering");if(n.length)return e.all(n.map(function(t){return e.when(t.load())})).then(s.E)},ve=function(t){var e=t.views("entering"),n=t.views("exiting");if(e.length||n.length){var r=t.router.viewService;n.forEach(function(t){return r.deactivateViewConfig(t)}),e.forEach(function(t){return r.activateViewConfig(t)}),r.sync()}},$e=function(t){var e=t.router.globals,n=function(){e.transition===t&&(e.transition=null)};t.onSuccess({},function(){e.successfulTransitions.enqueue(t),e.$current=t.$to(),e.current=e.$current.self,Object(s.m)(t.params(),e.params)},{priority:1e4}),t.promise.then(n,n)},me=function(t){var e=t.options(),n=t.router.stateService,r=t.router.urlRouter;if("url"!==e.source&&e.location&&n.$current.navigable){var i={replace:"replace"===e.location};r.push(n.$current.navigable.url,n.params,i)}r.update(!0)},ge=function(t){var e=t.router;var n=t.entering().filter(function(t){return!!t.$$state().lazyLoad}).map(function(e){return ye(t,e)});return c.b.$q.all(n).then(function(){if("url"!==t.originalTransition().options().source){var n=t.targetState();return e.stateService.target(n.identifier(),n.params(),n.options())}var r=e.urlService,i=r.match(r.parts()),o=i&&i.rule;if(o&&"STATE"===o.type){var a=o.state,u=i.match;return e.stateService.target(a,u,t.options())}e.urlService.sync()})};function ye(t,e){var n=e.$$state().lazyLoad,r=n._promise;if(!r){r=n._promise=c.b.$q.when(n(t,e)).then(function(e){e&&Array.isArray(e.states)&&e.states.forEach(function(e){return t.router.stateRegistry.register(e)});return e}).then(function(t){return delete e.lazyLoad,delete e.$$state().lazyLoad,delete n._promise,t},function(t){return delete n._promise,c.b.$q.reject(t)})}return r}var be=function(){return function(t,e,n,r,i,o,a,u){void 0===i&&(i=!1),void 0===o&&(o=_t.HANDLE_RESULT),void 0===a&&(a=_t.REJECT_ERROR),void 0===u&&(u=!1),this.name=t,this.hookPhase=e,this.hookOrder=n,this.criteriaMatchPath=r,this.reverseSort=i,this.getResultHandler=o,this.getErrorHandler=a,this.synchronous=u}}();function we(t){var e=t._ignoredReason();if(e){q.traceTransitionIgnored(t);var n=t.router.globals.transition;return"SameAsCurrent"===e&&n&&n.abort(),v.ignored().toPromise()}}function Oe(t){if(!t.valid())throw new Error(t.error().toString())}var Se={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,custom:{},current:function(){return null},source:"unknown"},Ee=function(){function t(t){this._transitionCount=0,this._eventTypes=[],this._registeredHooks={},this._criteriaPaths={},this._router=t,this.$view=t.viewService,this._deregisterHookFns={},this._pluginapi=Object(s.n)(Object(f.p)(this),{},Object(f.p)(this),["_definePathType","_defineEvent","_getPathTypes","_getEvents","getHooks"]),this._defineCorePaths(),this._defineCoreEvents(),this._registerCoreTransitionHooks(),t.globals.successfulTransitions.onEvict(oe)}return t.prototype.onCreate=function(t,e,n){},t.prototype.onBefore=function(t,e,n){},t.prototype.onStart=function(t,e,n){},t.prototype.onExit=function(t,e,n){},t.prototype.onRetain=function(t,e,n){},t.prototype.onEnter=function(t,e,n){},t.prototype.onFinish=function(t,e,n){},t.prototype.onSuccess=function(t,e,n){},t.prototype.onError=function(t,e,n){},t.prototype.dispose=function(t){Object(s.U)(this._registeredHooks).forEach(function(t){return t.forEach(function(e){e._deregistered=!0,Object(s.L)(t,e)})})},t.prototype.create=function(t,e){return new Vt(t,e,this._router)},t.prototype._defineCoreEvents=function(){var t=bt,e=_t,n=this._criteriaPaths;this._defineEvent("onCreate",t.CREATE,0,n.to,!1,e.LOG_REJECTED_RESULT,e.THROW_ERROR,!0),this._defineEvent("onBefore",t.BEFORE,0,n.to),this._defineEvent("onStart",t.RUN,0,n.to),this._defineEvent("onExit",t.RUN,100,n.exiting,!0),this._defineEvent("onRetain",t.RUN,200,n.retained),this._defineEvent("onEnter",t.RUN,300,n.entering),this._defineEvent("onFinish",t.RUN,400,n.to),this._defineEvent("onSuccess",t.SUCCESS,0,n.to,!1,e.LOG_REJECTED_RESULT,e.LOG_ERROR,!0),this._defineEvent("onError",t.ERROR,0,n.to,!1,e.LOG_REJECTED_RESULT,e.LOG_ERROR,!0)},t.prototype._defineCorePaths=function(){var t=wt.STATE,e=wt.TRANSITION;this._definePathType("to",e),this._definePathType("from",e),this._definePathType("exiting",t),this._definePathType("retained",t),this._definePathType("entering",t)},t.prototype._defineEvent=function(t,e,n,r,i,o,a,u){void 0===i&&(i=!1),void 0===o&&(o=_t.HANDLE_RESULT),void 0===a&&(a=_t.REJECT_ERROR),void 0===u&&(u=!1);var s=new be(t,e,n,r,i,o,a,u);this._eventTypes.push(s),Tt(this,this,s)},t.prototype._getEvents=function(t){return(Object(h.c)(t)?this._eventTypes.filter(function(e){return e.hookPhase===t}):this._eventTypes.slice()).sort(function(t,e){var n=t.hookPhase-e.hookPhase;return 0===n?t.hookOrder-e.hookOrder:n})},t.prototype._definePathType=function(t,e){this._criteriaPaths[t]={name:t,scope:e}},t.prototype._getPathTypes=function(){return this._criteriaPaths},t.prototype.getHooks=function(t){return this._registeredHooks[t]},t.prototype._registerCoreTransitionHooks=function(){var t=this._deregisterHookFns;t.addCoreResolves=this.onCreate({},ne),t.ignored=function(t){return t.onBefore({},we,{priority:-9999})}(this),t.invalid=function(t){return t.onBefore({},Oe,{priority:-1e4})}(this),t.redirectTo=function(t){return t.onStart({to:function(t){return!!t.redirectTo}},ae)}(this),t.onExit=function(t){return t.onExit({exiting:function(t){return!!t.onExit}},se)}(this),t.onRetain=function(t){return t.onRetain({retained:function(t){return!!t.onRetain}},ce)}(this),t.onEnter=function(t){return t.onEnter({entering:function(t){return!!t.onEnter}},le)}(this),t.eagerResolve=function(t){return t.onStart({},fe,{priority:1e3})}(this),t.lazyResolve=function(t){return t.onEnter({entering:Object(f.p)(!0)},he,{priority:1e3})}(this),t.resolveAll=function(t){return t.onFinish({},pe,{priority:1e3})}(this),t.loadViews=function(t){return t.onFinish({},de)}(this),t.activateViews=function(t){return t.onSuccess({},ve)}(this),t.updateGlobals=function(t){return t.onCreate({},$e)}(this),t.updateUrl=function(t){return t.onSuccess({},me,{priority:9999})}(this),t.lazyLoad=function(t){return t.onBefore({entering:function(t){return!!t.lazyLoad}},ge)}(this)},t}(),je=function(){function t(e){this.router=e,this.invalidCallbacks=[],this._defaultErrorHandler=function(t){t instanceof Error&&t.stack?(console.error(t),console.error(t.stack)):t instanceof v?(console.error(t.toString()),t.detail&&t.detail.stack&&console.error(t.detail.stack)):console.error(t)};var n=Object.keys(t.prototype).filter(Object(f.i)(Object(s.z)(["current","$current","params","transition"])));Object(s.n)(Object(f.p)(t.prototype),this,Object(f.p)(this),n)}return Object.defineProperty(t.prototype,"transition",{get:function(){return this.router.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){return this.router.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"current",{get:function(){return this.router.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$current",{get:function(){return this.router.globals.$current},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this.defaultErrorHandler(s.E),this.invalidCallbacks=[]},t.prototype._handleInvalidTargetState=function(t,e){var n=this,r=et.makeTargetState(this.router.stateRegistry,t),i=this.router.globals,o=function(){return i.transitionHistory.peekTail()},a=o(),u=new p(this.invalidCallbacks.slice()),s=new ct(t).injector(),l=function(t){if(t instanceof tt){var e=t;return(e=n.target(e.identifier(),e.params(),e.options())).valid()?o()!==a?v.superseded().toPromise():n.transitionTo(e.identifier(),e.params(),e.options()):v.invalid(e.error()).toPromise()}};return function t(){var n=u.dequeue();return void 0===n?v.invalid(e.error()).toPromise():c.b.$q.when(n(e,r,s)).then(l).then(function(e){return e||t()})}()},t.prototype.onInvalid=function(t){return this.invalidCallbacks.push(t),function(){Object(s.L)(this.invalidCallbacks)(t)}.bind(this)},t.prototype.reload=function(t){return this.transitionTo(this.current,this.params,{reload:!Object(h.c)(t)||t,inherit:!1,notify:!1})},t.prototype.go=function(t,e,n){var r={relative:this.$current,inherit:!0},i=Object(s.o)(n,r,Se);return this.transitionTo(t,e,i)},t.prototype.target=function(t,e,n){if(void 0===n&&(n={}),Object(h.i)(n.reload)&&!n.reload.name)throw new Error("Invalid reload state object");var r=this.router.stateRegistry;if(n.reloadState=!0===n.reload?r.root():r.matcher.find(n.reload,n.relative),n.reload&&!n.reloadState)throw new Error("No such reload state '"+(Object(h.l)(n.reload)?n.reload:n.reload.name)+"'");return new tt(this.router.stateRegistry,t,e,n)},t.prototype.getCurrentPath=function(){var t=this,e=this.router.globals.successfulTransitions.peekTail();return e?e.treeChanges().to:[new X(t.router.stateRegistry.root())]},t.prototype.transitionTo=function(t,e,n){var r=this;void 0===e&&(e={}),void 0===n&&(n={});var o=this.router,a=o.globals;n=Object(s.o)(n,Se);n=Object(s.r)(n,{current:function(){return a.transition}});var u=this.target(t,e,n),l=this.getCurrentPath();if(!u.exists())return this._handleInvalidTargetState(l,u);if(!u.valid())return Object(s.O)(u.error());var f=function(t){return function(e){if(e instanceof v){var n=o.globals.lastStartedTransitionId<=t.$id;if(e.type===i.IGNORED)return n&&o.urlRouter.update(),c.b.$q.when(a.current);var u=e.detail;if(e.type===i.SUPERSEDED&&e.redirected&&u instanceof tt){var s=t.redirect(u);return s.run().catch(f(s))}if(e.type===i.ABORTED)return n&&o.urlRouter.update(),c.b.$q.reject(e)}return r.defaultErrorHandler()(e),c.b.$q.reject(e)}},h=this.router.transitionService.create(l,u),p=h.run().catch(f(h));return Object(s.N)(p),Object(s.r)(p,{transition:h})},t.prototype.is=function(t,e,n){n=Object(s.o)(n,{relative:this.$current});var r=this.router.stateRegistry.matcher.find(t,n.relative);if(Object(h.c)(r)){if(this.$current!==r)return!1;if(!e)return!0;var i=r.parameters({inherit:!0,matchingKeys:e});return Y.equals(i,Y.values(i,e),this.params)}},t.prototype.includes=function(t,e,n){n=Object(s.o)(n,{relative:this.$current});var r=Object(h.l)(t)&&l.fromString(t);if(r){if(!r.matches(this.$current.name))return!1;t=this.$current.name}var i=this.router.stateRegistry.matcher.find(t,n.relative),o=this.$current.includes;if(Object(h.c)(i)){if(!Object(h.c)(o[i.name]))return!1;if(!e)return!0;var a=i.parameters({inherit:!0,matchingKeys:e});return Y.equals(a,Y.values(a,e),this.params)}},t.prototype.href=function(t,e,n){var r={lossy:!0,inherit:!0,absolute:!1,relative:this.$current};n=Object(s.o)(n,r),e=e||{};var i=this.router.stateRegistry.matcher.find(t,n.relative);if(!Object(h.c)(i))return null;n.inherit&&(e=this.params.$inherit(e,this.$current,i));var o=i&&n.lossy?i.navigable:i;return o&&void 0!==o.url&&null!==o.url?this.router.urlRouter.href(o.url,e,{absolute:n.absolute}):null},t.prototype.defaultErrorHandler=function(t){return this._defaultErrorHandler=t||this._defaultErrorHandler},t.prototype.get=function(t,e){var n=this.router.stateRegistry;return 0===arguments.length?n.get():n.get(t,e||this.$current)},t.prototype.lazyLoad=function(t,e){var n=this.get(t);if(!n||!n.lazyLoad)throw new Error("Can not lazy load "+t);var r=this.getCurrentPath(),i=et.makeTargetState(this.router.stateRegistry,r);return ye(e=e||this.router.transitionService.create(r,i),n)},t}(),xe={when:function(t){return new Promise(function(e,n){return e(t)})},reject:function(t){return new Promise(function(e,n){n(t)})},defer:function(){var t={};return t.promise=new Promise(function(e,n){t.resolve=e,t.reject=n}),t},all:function(t){if(Object(h.a)(t))return Promise.all(t);if(Object(h.i)(t)){var e=Object.keys(t).map(function(e){return t[e].then(function(t){return{key:e,val:t}})});return xe.all(e).then(function(t){return t.reduce(function(t,e){return t[e.key]=e.val,t},{})})}}},Ce={},_e=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,ke=/([^\s,]+)/g,Re={get:function(t){return Ce[t]},has:function(t){return null!=Re.get(t)},invoke:function(t,e,n){var r=Object(s.r)({},Ce,n||{}),i=Re.annotate(t),o=Object(s.l)(function(t){return r.hasOwnProperty(t)},function(t){return"DI can't find injectable: '"+t+"'"}),a=i.filter(o).map(function(t){return r[t]});return Object(h.d)(t)?t.apply(e,a):t.slice(-1)[0].apply(e,a)},annotate:function(t){if(!Object(h.e)(t))throw new Error("Not an injectable function: "+t);if(t&&t.$inject)return t.$inject;if(Object(h.a)(t))return t.slice(0,-1);var e=t.toString().replace(_e,"");return e.slice(e.indexOf("(")+1,e.indexOf(")")).match(ke)||[]}},Te=function(t,e){var n=e[0],r=e[1];return t.hasOwnProperty(n)?Object(h.a)(t[n])?t[n].push(r):t[n]=[t[n],r]:t[n]=r,t},Ae=function(t){return t.split("&").filter(s.y).map(k).reduce(Te,{})};function Pe(t){var e=function(t){return t||""},n=C(t).map(e),r=n[0],i=n[1],o=_(r).map(e);return{path:o[0],search:o[1],hash:i,url:t}}var Ve=function(t){var e=t.path(),n=t.search(),r=t.hash(),i=Object.keys(n).map(function(t){var e=n[t];return(Object(h.a)(e)?e:[e]).map(function(e){return t+"="+e})}).reduce(s.T,[]).join("&");return e+(i?"?"+i:"")+(r?"#"+r:"")};function Me(t,e,n,r){return function(i){var o=i.locationService=new n(i),a=i.locationConfig=new r(i,e);return{name:t,service:o,configuration:a,dispose:function(t){t.dispose(o),t.dispose(a)}}}}var Ie,Ne=function(){function t(t,e){var n=this;this.fireAfterUpdate=e,this._listeners=[],this._listener=function(t){return n._listeners.forEach(function(e){return e(t)})},this.hash=function(){return Pe(n._get()).hash},this.path=function(){return Pe(n._get()).path},this.search=function(){return Ae(Pe(n._get()).search)},this._location=s.M.location,this._history=s.M.history}return t.prototype.url=function(t,e){return void 0===e&&(e=!0),Object(h.c)(t)&&t!==this._get()&&(this._set(null,null,t,e),this.fireAfterUpdate&&this._listeners.forEach(function(e){return e({url:t})})),Ve(this)},t.prototype.onChange=function(t){var e=this;return this._listeners.push(t),function(){return Object(s.L)(e._listeners,t)}},t.prototype.dispose=function(t){Object(s.p)(this._listeners)},t}(),Ue=(Ie=function(t,e){return(Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}Ie(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),De=function(t){function e(e){var n=t.call(this,e,!1)||this;return s.M.addEventListener("hashchange",n._listener,!1),n}return Ue(e,t),e.prototype._get=function(){return R(this._location.hash)},e.prototype._set=function(t,e,n,r){this._location.hash=n},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),s.M.removeEventListener("hashchange",this._listener)},e}(Ne),Le=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),He=function(t){function e(e){return t.call(this,e,!0)||this}return Le(e,t),e.prototype._get=function(){return this._url},e.prototype._set=function(t,e,n,r){this._url=n},e}(Ne),qe=function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fe=function(t){function e(e){var n=t.call(this,e,!0)||this;return n._config=e.urlService.config,s.M.addEventListener("popstate",n._listener,!1),n}return qe(e,t),e.prototype._getBasePrefix=function(){return x(this._config.baseHref())},e.prototype._get=function(){var t=this._location,e=t.pathname,n=t.hash,r=t.search;r=_(r)[1],n=C(n)[1];var i=this._getBasePrefix(),o=e===this._config.baseHref(),a=e.substr(0,i.length)===i;return(e=o?"/":a?e.substring(i.length):e)+(r?"?"+r:"")+(n?"#"+n:"")},e.prototype._set=function(t,e,n,r){var i=this._getBasePrefix(),o=n&&"/"!==n[0]?"/":"",a=""===n||"/"===n?this._config.baseHref():i+o+n;r?this._history.replaceState(t,e,a):this._history.pushState(t,e,a)},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),s.M.removeEventListener("popstate",this._listener)},e}(Ne),Be=function(){return function(){var t=this;this.dispose=s.E,this._baseHref="",this._port=80,this._protocol="http",this._host="localhost",this._hashPrefix="",this.port=function(){return t._port},this.protocol=function(){return t._protocol},this.host=function(){return t._host},this.baseHref=function(){return t._baseHref},this.html5Mode=function(){return!1},this.hashPrefix=function(e){return Object(h.c)(e)?t._hashPrefix=e:t._hashPrefix}}}(),ze=function(){function t(t,e){void 0===e&&(e=!1),this._isHtml5=e,this._baseHref=void 0,this._hashPrefix=""}return t.prototype.port=function(){return location.port?Number(location.port):"https"===this.protocol()?443:80},t.prototype.protocol=function(){return location.protocol.replace(/:/g,"")},t.prototype.host=function(){return location.hostname},t.prototype.html5Mode=function(){return this._isHtml5},t.prototype.hashPrefix=function(t){return Object(h.c)(t)?this._hashPrefix=t:this._hashPrefix},t.prototype.baseHref=function(t){return Object(h.c)(t)&&(this._baseHref=t),Object(h.m)(this._baseHref)&&(this._baseHref=this.getBaseHref()),this._baseHref},t.prototype.getBaseHref=function(){var t=document.getElementsByTagName("base")[0];return t&&t.href?t.href.replace(/^([^\/:]*:)?\/\/[^\/]*/,""):this._isHtml5?"/":location.pathname||"/"},t.prototype.dispose=function(){},t}();function We(t){return c.b.$injector=Re,c.b.$q=xe,{name:"vanilla.services",$q:xe,$injector:Re,dispose:function(){return null}}}var Ge=Me("vanilla.hashBangLocation",!1,De,ze),Je=Me("vanilla.pushStateLocation",!0,Fe,ze),Ke=Me("vanilla.memoryLocation",!1,He,Be),Ye=function(){function t(){}return t.prototype.dispose=function(t){},t}();function Ze(){var t=null;return function(e,n){return t=t||c.b.$injector.get("$templateFactory"),[new en(e,n,t)]}}var Qe=function(t,e){return t.reduce(function(t,n){return t||Object(h.c)(e[n])},!1)};function Xe(t){if(!t.parent)return{};var e=["component","bindings","componentProvider"],n=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),r=e.concat(n);if(Object(h.c)(t.views)&&Qe(r,t))throw new Error("State '"+t.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level. Move the following properties into a view (in the 'views' object): "+r.filter(function(e){return Object(h.c)(t[e])}).join(", "));var i={},o=t.views||{$default:Object(s.H)(t,r)};return Object(s.w)(o,function(r,o){if(o=o||"$default",Object(h.l)(r)&&(r={component:r}),r=Object(s.r)({},r),Qe(e,r)&&Qe(n,r))throw new Error("Cannot combine: "+e.join("|")+" with: "+n.join("|")+" in stateview: '"+o+"@"+t.name+"'");r.resolveAs=r.resolveAs||"$resolve",r.$type="ng1",r.$context=t,r.$name=o;var a=Wt.normalizeUIViewTarget(r.$context,r.$name);r.$uiViewName=a.uiViewName,r.$uiViewContextAnchor=a.uiViewContextAnchor,i[o]=r}),i}var tn=0,en=function(){function t(t,e,n){var r=this;this.path=t,this.viewDecl=e,this.factory=n,this.$id=tn++,this.loaded=!1,this.getTemplate=function(t,e){return r.component?r.factory.makeComponentTemplate(t,e,r.component,r.viewDecl.bindings):r.template}}return t.prototype.load=function(){var t=this,e=c.b.$q,n=new ct(this.path),r=this.path.reduce(function(t,e){return Object(s.r)(t,e.paramValues)},{}),i={template:e.when(this.factory.fromConfig(this.viewDecl,r,n)),controller:e.when(this.getController(n))};return e.all(i).then(function(e){return q.traceViewServiceEvent("Loaded",t),t.controller=e.controller,Object(s.r)(t,e.template),t})},t.prototype.getController=function(t){var e=this.viewDecl.controllerProvider;if(!Object(h.e)(e))return this.viewDecl.controller;var n=c.b.$injector.annotate(e),r=Object(h.a)(e)?Object(s.P)(e):e;return new it("",r,n).get(t)},t}(),nn=function(){function t(){var t=this;this._useHttp=u.version.minor<3,this.$get=["$http","$templateCache","$injector",function(e,n,r){return t.$templateRequest=r.has&&r.has("$templateRequest")&&r.get("$templateRequest"),t.$http=e,t.$templateCache=n,t}]}return t.prototype.useHttpService=function(t){this._useHttp=t},t.prototype.fromConfig=function(t,e,n){var r=function(t){return c.b.$q.when(t).then(function(t){return{template:t}})},i=function(t){return c.b.$q.when(t).then(function(t){return{component:t}})};return Object(h.c)(t.template)?r(this.fromString(t.template,e)):Object(h.c)(t.templateUrl)?r(this.fromUrl(t.templateUrl,e)):Object(h.c)(t.templateProvider)?r(this.fromProvider(t.templateProvider,e,n)):Object(h.c)(t.component)?i(t.component):Object(h.c)(t.componentProvider)?i(this.fromComponentProvider(t.componentProvider,e,n)):r("")},t.prototype.fromString=function(t,e){return Object(h.d)(t)?t(e):t},t.prototype.fromUrl=function(t,e){return Object(h.d)(t)&&(t=t(e)),null==t?null:this._useHttp?this.$http.get(t,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(t){return t.data}):this.$templateRequest(t)},t.prototype.fromProvider=function(t,e,n){var r=c.b.$injector.annotate(t),i=Object(h.a)(t)?Object(s.P)(t):t;return new it("",i,r).get(n)},t.prototype.fromComponentProvider=function(t,e,n){var r=c.b.$injector.annotate(t),i=Object(h.a)(t)?Object(s.P)(t):t;return new it("",i,r).get(n)},t.prototype.makeComponentTemplate=function(t,e,n,r){r=r||{};var i=u.version.minor>=3?"::":"",o=function(t){var e=g(t);return/^(x|data)-/.exec(e)?"x-"+e:e},a=function(t){var e=c.b.$injector.get(t+"Directive");if(!e||!e.length)throw new Error("Unable to find component named '"+t+"'");return e.map(rn).reduce(s.T,[])}(n).map(function(n){var a=n.name,u=n.type,s=o(a);if(t.attr(s)&&!r[a])return s+"='"+t.attr(s)+"'";var l=r[a]||a;if("@"===u)return s+"='{{"+i+"$resolve."+l+"}}'";if("&"===u){var f=e.getResolvable(l),p=f&&f.data,d=p&&c.b.$injector.annotate(p)||[];return s+"='$resolve."+l+(Object(h.a)(p)?"["+(p.length-1)+"]":"")+"("+d.join(",")+")'"}return s+"='"+i+"$resolve."+l+"'"}).join(" "),l=o(n);return"<"+l+" "+a+">"+l+">"},t}();var rn=function(t){return Object(h.i)(t.bindToController)?on(t.bindToController):on(t.scope)},on=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@&])[?]?(.*)/.exec(t[e])]}).filter(function(t){return Object(h.c)(t)&&Object(h.a)(t[1])}).map(function(t){return{name:t[1][2]||t[0],type:t[1][1]}})},an=function(){function t(e,n){this.stateRegistry=e,this.stateService=n,Object(s.n)(Object(f.p)(t.prototype),this,Object(f.p)(this))}return t.prototype.decorator=function(t,e){return this.stateRegistry.decorator(t,e)||this},t.prototype.state=function(t,e){return Object(h.i)(t)?e=t:e.name=t,this.stateRegistry.register(e),this},t.prototype.onInvalid=function(t){return this.stateService.onInvalid(t)},t}(),un=function(t){return function(e,n){var r=e[t],i="onExit"===t?"from":"to";return r?function(t,e){var n=new ct(t.treeChanges(i)).subContext(e.$$state()),o=Object(s.r)(En(n),{$state$:e,$transition$:t});return c.b.$injector.invoke(r,this,o)}:void 0}},sn=function(){function t(t){this._urlListeners=[],this.$locationProvider=t;var e=Object(f.p)(t);Object(s.n)(e,this,e,["hashPrefix"])}return t.monkeyPatchPathParameterType=function(t){var e=t.urlMatcherFactory.type("path");e.encode=function(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t},e.decode=function(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}},t.prototype.dispose=function(){},t.prototype.onChange=function(t){var e=this;return this._urlListeners.push(t),function(){return Object(s.L)(e._urlListeners)(t)}},t.prototype.html5Mode=function(){var t=this.$locationProvider.html5Mode();return(t=Object(h.i)(t)?t.enabled:t)&&this.$sniffer.history},t.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},t.prototype.url=function(t,e,n){return void 0===e&&(e=!1),Object(h.c)(t)&&this.$location.url(t),e&&this.$location.replace(),n&&this.$location.state(n),this.$location.url()},t.prototype._runtimeServices=function(t,e,n,r,i){var o=this;this.$location=e,this.$sniffer=n,this.$browser=r,this.$window=i,t.$on("$locationChangeSuccess",function(t){return o._urlListeners.forEach(function(e){return e(t)})});var a=Object(f.p)(e);Object(s.n)(a,this,a,["replace","path","search","hash"]),Object(s.n)(a,this,a,["port","protocol","host"])},t}(),cn=function(){function t(t){this.router=t}return t.injectableHandler=function(t,e){return function(n){return c.b.$injector.invoke(e,null,{$match:n,$stateParams:t.globals.params})}},t.prototype.$get=function(){var t=this.router.urlService;return this.router.urlRouter.update(!0),t.interceptDeferred||t.listen(),this.router.urlRouter},t.prototype.rule=function(t){var e=this;if(!Object(h.d)(t))throw new Error("'rule' must be a function");var n=new Ft(function(){return t(c.b.$injector,e.router.locationService)},s.y);return this.router.urlService.rules.rule(n),this},t.prototype.otherwise=function(t){var e=this,n=this.router.urlService.rules;if(Object(h.l)(t))n.otherwise(t);else{if(!Object(h.d)(t))throw new Error("'rule' must be a string or function");n.otherwise(function(){return t(c.b.$injector,e.router.locationService)})}return this},t.prototype.when=function(e,n){return(Object(h.a)(n)||Object(h.d)(n))&&(n=t.injectableHandler(this.router,n)),this.router.urlService.rules.when(e,n),this},t.prototype.deferIntercept=function(t){this.router.urlService.deferIntercept(t)},t}();u.module("ui.router.angular1",[]);var ln=u.module("ui.router.init",["ng"]),fn=u.module("ui.router.util",["ui.router.init"]),hn=u.module("ui.router.router",["ui.router.util"]),pn=u.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),dn=u.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),vn=(u.module("ui.router.compat",["ui.router"]),null);function $n(t){(vn=this.router=new ee).stateProvider=new an(vn.stateRegistry,vn.stateService),vn.stateRegistry.decorator("views",Xe),vn.stateRegistry.decorator("onExit",un("onExit")),vn.stateRegistry.decorator("onRetain",un("onRetain")),vn.stateRegistry.decorator("onEnter",un("onEnter")),vn.viewService._pluginapi._viewConfigFactory("ng1",Ze());var e=vn.locationService=vn.locationConfig=new sn(t);function n(t,n,r,i,o,a,u){return e._runtimeServices(o,t,i,n,r),delete vn.router,delete vn.$get,vn}return sn.monkeyPatchPathParameterType(vn),vn.router=vn,vn.$get=n,n.$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],vn}$n.$inject=["$locationProvider"];var mn=function(t){return["$uiRouterProvider",function(e){var n=e.router[t];return n.$get=function(){return n},n}]};function gn(t,e,n){if(c.b.$injector=t,c.b.$q=e,!t.hasOwnProperty("strictDi"))try{t.invoke(function(t){})}catch(e){t.strictDi=!!/strict mode/.exec(e&&e.toString())}n.stateRegistry.get().map(function(t){return t.$$state().resolvables}).reduce(s.T,[]).filter(function(t){return"deferred"===t.deps}).forEach(function(e){return e.deps=t.annotate(e.resolveFn,t.strictDi)})}gn.$inject=["$injector","$q","$uiRouter"];function yn(t){t.$watch(function(){q.approximateDigests++})}yn.$inject=["$rootScope"],ln.provider("$uiRouter",$n),hn.provider("$urlRouter",["$uiRouterProvider",function(t){return t.urlRouterProvider=new cn(t)}]),fn.provider("$urlService",mn("urlService")),fn.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return vn.urlMatcherFactory}]),fn.provider("$templateFactory",function(){return new nn}),pn.provider("$stateRegistry",mn("stateRegistry")),pn.provider("$uiRouterGlobals",mn("globals")),pn.provider("$transitions",mn("transitionService")),pn.provider("$state",["$uiRouterProvider",function(){return Object(s.r)(vn.stateProvider,{$get:function(){return vn.stateService}})}]),pn.factory("$stateParams",["$uiRouter",function(t){return t.globals.params}]),dn.factory("$view",function(){return vn.viewService}),dn.service("$trace",function(){return q}),dn.run(yn),fn.run(["$urlMatcherFactory",function(t){}]),pn.run(["$state",function(t){}]),hn.run(["$urlRouter",function(t){}]),ln.run(gn);var bn,wn,On,Sn,En=function(t){return t.getTokens().filter(h.l).map(function(e){var n=t.getResolvable(e);return[e,"NOWAIT"===t.getPolicy(n).async?n.promise:n.data]}).reduce(s.h,{})};n(10);function jn(t){var e,n=t.match(/^\s*({[^}]*})\s*$/);if(n&&(t="("+n[1]+")"),!(e=t.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/))||4!==e.length)throw new Error("Invalid state ref '"+t+"'");return{state:e[1]||null,paramExpr:e[3]||null}}function xn(t){var e=t.parent().inheritedData("$uiView"),n=Object(f.k)("$cfg.path")(e);return n?Object(s.P)(n).state.name:void 0}function Cn(t,e,n){var r=n.uiState||t.current.name,i=Object(s.r)(function(t,e){return{relative:xn(t)||e.$current,inherit:!0,source:"sref"}}(e,t),n.uiStateOpts||{}),o=t.href(r,n.uiStateParams,i);return{uiState:r,uiStateParams:n.uiStateParams,uiStateOpts:i,href:o}}function _n(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),n="FORM"===t[0].nodeName;return{attr:n?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!n}}function kn(t,e,n,r,i){return function(o){var a=o.which||o.button,u=i();if(!(a>1||o.ctrlKey||o.metaKey||o.shiftKey||t.attr("target"))){var s=n(function(){t.attr("disabled")||e.go(u.uiState,u.uiStateParams,u.uiStateOpts)});o.preventDefault();var c=r.isAnchor&&!u.href?1:0;o.preventDefault=function(){c--<=0&&n.cancel(s)}}}}function Rn(t,e,n,r){var i;r&&(i=r.events),Object(h.a)(i)||(i=["click"]);for(var o=t.on?"on":"bind",a=0,u=i;a0)){var n=m(t,e,u);return g(),n}},e.$on("$destroy",(c=r.stateRegistry.onStatesChanged(v),l=r.transitionService.onStart({},d),f=e.$on("$stateChangeSuccess",g),function(){c(),l(),f()})),r.globals.transition&&d(r.globals.transition),g()}]}}],u.module("ui.router.state").directive("uiSref",bn).directive("uiSrefActive",On).directive("uiSrefActiveEq",On).directive("uiState",wn),Tn.$inject=["$state"],An.$inject=["$state"],u.module("ui.router.state").filter("isState",Tn).filter("includedByState",An),Sn=["$view","$animate","$uiViewScroll","$interpolate","$q",function(t,e,n,r,i){var o={$cfg:{viewDecl:{$context:t._pluginapi._rootViewContext()}},$uiView:{}},a={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(s,c,l){return function(s,c,p){var d,v,$,m,g,y=p.onload||"",b=p.autoscroll,w={enter:function(t,n,r){u.version.minor>2?e.enter(t,null,n).then(r):e.enter(t,null,n,r)},leave:function(t,n){u.version.minor>2?e.leave(t).then(n):e.leave(t,n)}},O=c.inheritedData("$uiView")||o,S=r(p.uiView||p.name||"")(s)||"$default",E={$type:"ng1",id:a.count++,name:S,fqn:O.$uiView.fqn?O.$uiView.fqn+"."+S:S,config:null,configUpdated:function(t){if(t&&!(t instanceof en))return;if(e=m,n=t,e===n)return;var e,n;q.traceUIViewConfigUpdated(E,t&&t.viewDecl&&t.viewDecl.$context),m=t,j(t)},get creationContext(){var t=Object(f.k)("$cfg.viewDecl.$context")(O),e=Object(f.k)("$uiView.creationContext")(O);return t||e}};function j(t){var e=s.$new(),r=i.defer(),o=i.defer(),a={$cfg:t,$uiView:E},u={$animEnter:r.promise,$animLeave:o.promise,$$animLeave:o};e.$emit("$viewContentLoading",S);var f=l(e,function(t){t.data("$uiViewAnim",u),t.data("$uiView",a),w.enter(t,c,function(){r.resolve(),$&&$.$emit("$viewContentAnimationEnded"),(Object(h.c)(b)&&!b||s.$eval(b))&&n(t)}),function(){if(d&&(q.traceUIViewEvent("Removing (previous) el",d.data("$uiView")),d.remove(),d=null),$&&(q.traceUIViewEvent("Destroying scope",E),$.$destroy(),$=null),v){var t=v.data("$uiViewAnim");q.traceUIViewEvent("Animate out",t),w.leave(v,function(){t.$$animLeave.resolve(),d=null}),d=v,v=null}}()});v=f,($=e).$emit("$viewContentLoaded",t||m),$.$eval(y)}q.traceUIViewEvent("Linking",E),c.data("$uiView",{$uiView:E}),j(),g=t.registerUIView(E),s.$on("$destroy",function(){q.traceUIViewEvent("Destroying/Unregistering",E),g()})}}};return a}],Pn.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var Vn="function"==typeof u.module("ui.router").component,Mn=0;function In(t,e,n,r,i){!Object(h.d)(n.$onInit)||i.viewDecl.component&&Vn||n.$onInit();var o=Object(s.P)(i.path).state.self,a={bind:n};if(Object(h.d)(n.uiOnParamsChanged)){var u=new ct(i.path).getResolvable("$transition$").data;r.$on("$destroy",e.onSuccess({},function(t){if(t!==u&&-1===t.exiting().indexOf(o)){var e=t.params("to"),r=t.params("from"),i=function(t){return t.paramSchema},a=t.treeChanges("to").map(i).reduce(s.T,[]),c=t.treeChanges("from").map(i).reduce(s.T,[]),l=a.filter(function(t){var n=c.indexOf(t);return-1===n||!c[n].type.equals(e[t.id],r[t.id])});if(l.length){var f=l.map(function(t){return t.id}),h=Object(s.s)(e,function(t,e){return-1!==f.indexOf(e)});n.uiOnParamsChanged(h,t)}}},a))}if(Object(h.d)(n.uiCanExit)){var c=Mn++,l=function(t){return!!t&&(t._uiCanExitIds&&!0===t._uiCanExitIds[c]||l(t.redirectedFrom()))},f={exiting:o.name};r.$on("$destroy",e.onBefore(f,function(e){var r,i=e._uiCanExitIds=e._uiCanExitIds||{};return l(e)||(r=t.when(n.uiCanExit(e))).then(function(t){return i[c]=!1!==t}),r},a))}}u.module("ui.router.state").directive("uiView",Sn),u.module("ui.router.state").directive("uiView",Pn),u.module("ui.router.state").provider("$uiViewScroll",function(){var t=!1;this.useAnchorScroll=function(){t=!0},this.$get=["$anchorScroll","$timeout",function(e,n){return t?e:function(t){return n(function(){t[0].scrollIntoView()},0,!1)}}]}),n.d(e,"watchDigests",function(){return yn}),n.d(e,"getLocals",function(){return En}),n.d(e,"getNg1ViewConfigFactory",function(){return Ze}),n.d(e,"ng1ViewsBuilder",function(){return Xe}),n.d(e,"Ng1ViewConfig",function(){return en}),n.d(e,"StateProvider",function(){return an}),n.d(e,"UrlRouterProvider",function(){return cn}),n.d(e,"core",function(){return r}),n.d(e,"UrlRules",function(){return Kt}),n.d(e,"UrlConfig",function(){return Yt}),n.d(e,"UIRouterGlobals",function(){return Gt}),n.d(e,"UIRouter",function(){return ee}),n.d(e,"UIRouterPluginBase",function(){return Ye}),n.d(e,"root",function(){return s.M}),n.d(e,"fromJson",function(){return s.x}),n.d(e,"toJson",function(){return s.Q}),n.d(e,"forEach",function(){return s.w}),n.d(e,"extend",function(){return s.r}),n.d(e,"equals",function(){return s.q}),n.d(e,"identity",function(){return s.y}),n.d(e,"noop",function(){return s.E}),n.d(e,"createProxyFunctions",function(){return s.n}),n.d(e,"inherit",function(){return s.A}),n.d(e,"inArray",function(){return s.z}),n.d(e,"_inArray",function(){return s.b}),n.d(e,"removeFrom",function(){return s.L}),n.d(e,"_removeFrom",function(){return s.d}),n.d(e,"pushTo",function(){return s.K}),n.d(e,"_pushTo",function(){return s.c}),n.d(e,"deregAll",function(){return s.p}),n.d(e,"defaults",function(){return s.o}),n.d(e,"mergeR",function(){return s.D}),n.d(e,"ancestors",function(){return s.f}),n.d(e,"pick",function(){return s.H}),n.d(e,"omit",function(){return s.F}),n.d(e,"pluck",function(){return s.I}),n.d(e,"filter",function(){return s.s}),n.d(e,"find",function(){return s.t}),n.d(e,"mapObj",function(){return s.C}),n.d(e,"map",function(){return s.B}),n.d(e,"values",function(){return s.U}),n.d(e,"allTrueR",function(){return s.e}),n.d(e,"anyTrueR",function(){return s.g}),n.d(e,"unnestR",function(){return s.T}),n.d(e,"flattenR",function(){return s.v}),n.d(e,"pushR",function(){return s.J}),n.d(e,"uniqR",function(){return s.R}),n.d(e,"unnest",function(){return s.S}),n.d(e,"flatten",function(){return s.u}),n.d(e,"assertPredicate",function(){return s.l}),n.d(e,"assertMap",function(){return s.k}),n.d(e,"assertFn",function(){return s.j}),n.d(e,"pairs",function(){return s.G}),n.d(e,"arrayTuples",function(){return s.i}),n.d(e,"applyPairs",function(){return s.h}),n.d(e,"tail",function(){return s.P}),n.d(e,"copy",function(){return s.m}),n.d(e,"_extend",function(){return s.a}),n.d(e,"silenceUncaughtInPromise",function(){return s.N}),n.d(e,"silentRejection",function(){return s.O}),n.d(e,"makeStub",function(){return c.a}),n.d(e,"services",function(){return c.b}),n.d(e,"Glob",function(){return l}),n.d(e,"curry",function(){return f.e}),n.d(e,"compose",function(){return f.d}),n.d(e,"pipe",function(){return f.m}),n.d(e,"prop",function(){return f.n}),n.d(e,"propEq",function(){return f.o}),n.d(e,"parse",function(){return f.k}),n.d(e,"not",function(){return f.i}),n.d(e,"and",function(){return f.b}),n.d(e,"or",function(){return f.j}),n.d(e,"all",function(){return f.a}),n.d(e,"any",function(){return f.c}),n.d(e,"is",function(){return f.h}),n.d(e,"eq",function(){return f.f}),n.d(e,"val",function(){return f.p}),n.d(e,"invoke",function(){return f.g}),n.d(e,"pattern",function(){return f.l}),n.d(e,"isUndefined",function(){return h.m}),n.d(e,"isDefined",function(){return h.c}),n.d(e,"isNull",function(){return h.f}),n.d(e,"isNullOrUndefined",function(){return h.g}),n.d(e,"isFunction",function(){return h.d}),n.d(e,"isNumber",function(){return h.h}),n.d(e,"isString",function(){return h.l}),n.d(e,"isObject",function(){return h.i}),n.d(e,"isArray",function(){return h.a}),n.d(e,"isDate",function(){return h.b}),n.d(e,"isRegExp",function(){return h.k}),n.d(e,"isInjectable",function(){return h.e}),n.d(e,"isPromise",function(){return h.j}),n.d(e,"Queue",function(){return p}),n.d(e,"maxLength",function(){return $}),n.d(e,"padString",function(){return m}),n.d(e,"kebobString",function(){return g}),n.d(e,"functionToString",function(){return y}),n.d(e,"fnToString",function(){return b}),n.d(e,"stringify",function(){return S}),n.d(e,"beforeAfterSubstr",function(){return E}),n.d(e,"hostRegex",function(){return j}),n.d(e,"stripLastPathElement",function(){return x}),n.d(e,"splitHash",function(){return C}),n.d(e,"splitQuery",function(){return _}),n.d(e,"splitEqual",function(){return k}),n.d(e,"trimHashVal",function(){return R}),n.d(e,"splitOnDelim",function(){return T}),n.d(e,"joinNeighborsR",function(){return A}),n.d(e,"Category",function(){return M}),n.d(e,"Trace",function(){return H}),n.d(e,"trace",function(){return q}),n.d(e,"DefType",function(){return z}),n.d(e,"Param",function(){return Y}),n.d(e,"ParamTypes",function(){return Z}),n.d(e,"StateParams",function(){return Q}),n.d(e,"ParamType",function(){return F}),n.d(e,"PathNode",function(){return X}),n.d(e,"PathUtils",function(){return et}),n.d(e,"resolvePolicies",function(){return nt}),n.d(e,"defaultResolvePolicy",function(){return rt}),n.d(e,"Resolvable",function(){return it}),n.d(e,"NATIVE_INJECTOR_TOKEN",function(){return st}),n.d(e,"ResolveContext",function(){return ct}),n.d(e,"resolvablesBuilder",function(){return yt}),n.d(e,"StateBuilder",function(){return Ot}),n.d(e,"StateObject",function(){return St}),n.d(e,"StateMatcher",function(){return Et}),n.d(e,"StateQueueManager",function(){return jt}),n.d(e,"StateRegistry",function(){return xt}),n.d(e,"StateService",function(){return je}),n.d(e,"TargetState",function(){return tt}),n.d(e,"TransitionHookPhase",function(){return bt}),n.d(e,"TransitionHookScope",function(){return wt}),n.d(e,"HookBuilder",function(){return At}),n.d(e,"matchState",function(){return kt}),n.d(e,"RegisteredHook",function(){return Rt}),n.d(e,"makeEvent",function(){return Tt}),n.d(e,"RejectType",function(){return i}),n.d(e,"Rejection",function(){return v}),n.d(e,"Transition",function(){return Vt}),n.d(e,"TransitionHook",function(){return _t}),n.d(e,"TransitionEventType",function(){return be}),n.d(e,"defaultTransOpts",function(){return Se}),n.d(e,"TransitionService",function(){return Ee}),n.d(e,"UrlMatcher",function(){return Ut}),n.d(e,"ParamFactory",function(){return Lt}),n.d(e,"UrlMatcherFactory",function(){return Ht}),n.d(e,"UrlRouter",function(){return zt}),n.d(e,"UrlRuleFactory",function(){return qt}),n.d(e,"BaseUrlRule",function(){return Ft}),n.d(e,"UrlService",function(){return Zt}),n.d(e,"ViewService",function(){return Wt}),n.d(e,"$q",function(){return xe}),n.d(e,"$injector",function(){return Re}),n.d(e,"BaseLocationServices",function(){return Ne}),n.d(e,"HashLocationService",function(){return De}),n.d(e,"MemoryLocationService",function(){return He}),n.d(e,"PushStateLocationService",function(){return Fe}),n.d(e,"MemoryLocationConfig",function(){return Be}),n.d(e,"BrowserLocationConfig",function(){return ze}),n.d(e,"keyValsToObjectR",function(){return Te}),n.d(e,"getParams",function(){return Ae}),n.d(e,"parseUrl",function(){return Pe}),n.d(e,"buildUrl",function(){return Ve}),n.d(e,"locationPluginFactory",function(){return Me}),n.d(e,"servicesPlugin",function(){return We}),n.d(e,"hashLocationPlugin",function(){return Ge}),n.d(e,"pushStateLocationPlugin",function(){return Je}),n.d(e,"memoryLocationPlugin",function(){return Ke});e.default="ui.router"},,,function(t,e){
/**
* @license AngularJS v1.7.8
* (c) 2010-2018 Google, Inc. http://angularjs.org
* License: MIT
*/
-!function(t){"use strict";var e={objectMaxDepth:5,urlErrorParamsEnabled:!0};function n(t){if(!L(t))return e;D(t.objectMaxDepth)&&(e.objectMaxDepth=r(t.objectMaxDepth)?t.objectMaxDepth:NaN),D(t.urlErrorParamsEnabled)&&Z(t.urlErrorParamsEnabled)&&(e.urlErrorParamsEnabled=t.urlErrorParamsEnabled)}function r(t){return F(t)&&t>0}function i(t,n){n=n||Error;var r="https://errors.angularjs.org/1.7.8/",i=r.replace(".","\\.")+"[\\s\\S]*",o=new RegExp(i,"g");return function(){var i,a,u=arguments[0],s=arguments[1],c="["+(t?t+":":"")+u+"] ",l=ht(arguments,2).map(function(t){return Gt(t,e.objectMaxDepth)});if(c+=s.replace(/\{\d+\}/g,function(t){var e=+t.slice(1,-1);return e=0&&e-1 in t||"function"==typeof t.item)}function S(t,e,n){var r,i;if(t)if(G(t))for(r in t)"prototype"!==r&&"length"!==r&&"name"!==r&&t.hasOwnProperty(r)&&e.call(n,t[r],r,t);else if(z(t)||O(t)){var o="object"!=typeof t;for(r=0,i=t.length;r=0&&t.splice(n,1),n}function at(t,e,n){var i,o,a=[],u=[];if(n=r(n)?n:NaN,e){if((o=e)&&F(o.length)&&X.test(m.call(o))||(i=e,"[object ArrayBuffer]"===m.call(i)))throw y("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t===e)throw y("cpi","Can't copy! Source and destination are identical.");return z(e)?e.length=0:S(e,function(t,n){"$$hashKey"!==n&&delete e[n]}),a.push(t),u.push(e),s(t,e,n)}return c(t,n);function s(t,e,n){if(--n<0)return"...";var r,i=e.$$hashKey;if(z(t))for(var o=0,a=t.length;o2?ht(arguments,2):[];return!G(e)||e instanceof RegExp?e:n.length?function(){return arguments.length?e.apply(t,ft(n,arguments,0)):e.apply(t,n)}:function(){return arguments.length?e.apply(t,arguments):e.call(t)}}function dt(e,n){var r=n;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?r=void 0:K(n)?r="$WINDOW":n&&t.document===n?r="$DOCUMENT":Y(n)&&(r="$SCOPE"),r}function vt(t,e){if(!U(t))return F(e)||(e=e?2:null),JSON.stringify(t,dt,e)}function $t(t){return q(t)?JSON.parse(t):t}var mt=/:/g;function gt(t,e){t=t.replace(mt,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return A(n)?e:n}function yt(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}function bt(t,e,n){n=n?-1:1;var r=t.getTimezoneOffset();return yt(t,n*(gt(e,r)-r))}function wt(t){t=a(t).clone().empty();var e=a("").append(t).html();try{return t[0].nodeType===qt?h(e):e.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(t,e){return"<"+h(e)})}catch(t){return h(e)}}function Ot(t){try{return decodeURIComponent(t)}catch(t){}}function St(t){var e={};return S((t||"").split("&"),function(t){var n,r,i;t&&(r=t=t.replace(/\+/g,"%20"),-1!==(n=t.indexOf("="))&&(r=t.substring(0,n),i=t.substring(n+1)),D(r=Ot(r))&&(i=!D(i)||Ot(i),f.call(e,r)?z(e[r])?e[r].push(i):e[r]=[e[r],i]:e[r]=i))}),e}function Et(t){return jt(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function jt(t,e){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,e?"%20":"+")}var xt=["ng-","data-ng-","ng:","x-ng-"];var Ct=function(e){var n=e.currentScript;if(!n)return!0;if(!(n instanceof t.HTMLScriptElement||n instanceof t.SVGScriptElement))return!1;var r=n.attributes;return[r.getNamedItem("src"),r.getNamedItem("href"),r.getNamedItem("xlink:href")].every(function(t){if(!t)return!0;if(!t.value)return!1;var n=e.createElement("a");if(n.href=t.value,e.location.origin===n.origin)return!0;switch(n.protocol){case"http:":case"https:":case"ftp:":case"blob:":case"file:":case"data:":return!0;default:return!1}})}(t.document);function _t(e,n){var r,i,o={};if(S(xt,function(t){var n=t+"app";!r&&e.hasAttribute&&e.hasAttribute(n)&&(r=e,i=e.getAttribute(n))}),S(xt,function(t){var n,o=t+"app";!r&&(n=e.querySelector("["+o.replace(":","\\:")+"]"))&&(r=n,i=n.getAttribute(o))}),r){if(!Ct)return void t.console.error("AngularJS: disabling automatic bootstrap.