/** * State-based routing for AngularJS 1.x * NOTICE: This monolithic bundle also bundles the @uirouter/core code. * This causes it to be incompatible with plugins that depend on @uirouter/core. * We recommend switching to the ui-router-core.js and ui-router-angularjs.js bundles instead. * For more information, see https://ui-router.github.io/blog/uirouter-for-angularjs-umd-bundles * @version v1.0.26 * @link https://ui-router.github.io * @license MIT License, http://www.opensource.org/licenses/MIT */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("angular")):"function"==typeof define&&define.amd?define(["exports","angular"],e):e((t=t||self)["@uirouter/angularjs"]={},t.angular)}(this,function(d,t){"use strict";var e=angular,b=t&&t.module?t:e,n=function(){for(var t=0,e=0,r=arguments.length;e=r.length)return r.apply(this,arguments);var e=Array.prototype.slice.call(arguments);return t.bind.apply(t,n([this],e))}}function r(){var r=arguments,n=r.length-1;return function(){for(var t=n,e=r[n].apply(this,arguments);t--;)e=r[t].call(this,e);return e}}function c(){for(var t=[],e=0;ethis._limit&&this.evict(),t},qt.prototype.evict=function(){var e=this._items.shift();return this._evictListeners.forEach(function(t){return t(e)}),e},qt.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},qt.prototype.clear=function(){var t=this._items;return this._items=[],t},qt.prototype.size=function(){return this._items.length},qt.prototype.remove=function(t){var e=this._items.indexOf(t);return-1 "+Qt(t))},ge.prototype.traceTransitionIgnored=function(t){this.enabled(d.Category.TRANSITION)&&ce.log(ve(t)+": Ignored <> "+Qt(t))},ge.prototype.traceHookInvocation=function(t,e,r){if(this.enabled(d.Category.HOOK)){var n=R("traceData.hookType")(r)||"internal",i=R("traceData.context.state.name")(r)||R("traceData.context")(r)||"unknown",o=Gt(t.registeredHook.callback);ce.log(ve(e)+": Hook -> "+n+" context: "+i+", "+Lt(200,o))}},ge.prototype.traceHookResult=function(t,e,r){this.enabled(d.Category.HOOK)&&ce.log(ve(e)+": <- Hook returned: "+Lt(200,Qt(t)))},ge.prototype.traceResolvePath=function(t,e,r){this.enabled(d.Category.RESOLVE)&&ce.log(ve(r)+": Resolving "+t+" ("+e+")")},ge.prototype.traceResolvableResolved=function(t,e){this.enabled(d.Category.RESOLVE)&&ce.log(ve(e)+": <- Resolved "+t+" to: "+Lt(200,Qt(t.data)))},ge.prototype.traceError=function(t,e){this.enabled(d.Category.TRANSITION)&&ce.log(ve(e)+": <- Rejected "+Qt(e)+", reason: "+t)},ge.prototype.traceSuccess=function(t,e){this.enabled(d.Category.TRANSITION)&&ce.log(ve(e)+": <- Success "+Qt(e)+", final state: "+t.name)},ge.prototype.traceUIViewEvent=function(t,e,r){void 0===r&&(r=""),this.enabled(d.Category.UIVIEW)&&ce.log("ui-view: "+Mt(30,t)+" "+le(e)+r)},ge.prototype.traceUIViewConfigUpdated=function(t,e){this.enabled(d.Category.UIVIEW)&&this.traceUIViewEvent("Updating",t," with ViewConfig from context='"+e+"'")},ge.prototype.traceUIViewFill=function(t,e){this.enabled(d.Category.UIVIEW)&&this.traceUIViewEvent("Fill",t," with: "+Lt(200,e))},ge.prototype.traceViewSync=function(t){if(this.enabled(d.Category.VIEWCONFIG)){var a="uiview component fqn",e=t.map(function(t){var e,r=t.uiView,n=t.viewConfig,i=r&&r.fqn,o=n&&n.viewDecl.$context.name+": ("+n.viewDecl.$name+")";return(e={})[a]=i,e["view config state (view name)"]=o,e}).sort(function(t,e){return(t[a]||"").localeCompare(e[a]||"")});ce.table(e)}},ge.prototype.traceViewServiceEvent=function(t,e){this.enabled(d.Category.VIEWCONFIG)&&ce.log("VIEWCONFIG: "+t+" "+function(t){var e=t.viewDecl,r=e.$context.name||"(root)";return"[View#"+t.$id+" from '"+r+"' state]: target ui-view: '"+e.$uiViewName+"@"+e.$uiViewContextAnchor+"'"}(e))},ge.prototype.traceViewServiceUIViewEvent=function(t,e){this.enabled(d.Category.VIEWCONFIG)&&ce.log("VIEWCONFIG: "+t+" "+le(e))},ge);function ge(){this._enabled={},this.approximateDigests=0}var we=new ye,_e=(Se.prototype.is=function(t,e){return!0},Se.prototype.encode=function(t,e){return t},Se.prototype.decode=function(t,e){return t},Se.prototype.equals=function(t,e){return t==e},Se.prototype.$subPattern=function(){var t=this.pattern.toString();return t.substr(1,t.length-2)},Se.prototype.toString=function(){return"{ParamType:"+this.name+"}"},Se.prototype.$normalize=function(t){return this.is(t)?t:this.decode(t)},Se.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 $e(this,t)},Se);function Se(t){this.pattern=/.*/,this.inherit=!0,B(this,t)}function $e(n,i){var o=this;function a(t){return x(t)?t:E(t)?[t]:[]}function u(r,n){return function(t){if(x(t)&&0===t.length)return t;var e=ht(a(t),r);return!0===n?0===ct(e,function(t){return!t}).length:function(t){switch(t.length){case 0:return;case 1:return"auto"===i?t[0]:t;default:return t}}(e)}}function s(o){return function(t,e){var r=a(t),n=a(e);if(r.length!==n.length)return!1;for(var i=0;i=r.invokeLimit&&r.deregister()}}},wr.prototype.handleHookResult=function(t){var e=this,r=this.getNotCurrentRejection();return r||(A(t)?t.then(function(t){return e.handleHookResult(t)}):(we.traceHookResult(t,this.transition,this.options),!1===t?Ft.aborted("Hook aborted transition").toPromise():h(Ae)(t)?Ft.redirected(t).toPromise():void 0))},wr.prototype.getNotCurrentRejection=function(){var t=this.transition.router;return t._disposed?Ft.aborted("UIRouter instance #"+t.$id+" has been stopped (disposed)").toPromise():this.transition._aborted?Ft.aborted().toPromise():this.isSuperseded()?Ft.superseded(this.options.current()).toPromise():void 0},wr.prototype.toString=function(){var t=this.options,e=this.registeredHook;return(R("traceData.hookType")(t)||"internal")+" context: "+(R("traceData.context.state.name")(t)||R("traceData.context")(t)||"unknown")+", "+Lt(200,zt(e.callback))},wr.HANDLE_RESULT=function(e){return function(t){return e.handleHookResult(t)}},wr.LOG_REJECTED_RESULT=function(e){return function(t){A(t)&&t.catch(function(t){return e.logError(Ft.normalize(t))})}},wr.LOG_ERROR=function(e){return function(t){return e.logError(t)}},wr.REJECT_ERROR=function(t){return function(t){return Vt(t)}},wr.THROW_ERROR=function(t){return function(t){throw t}},wr);function wr(t,e,r,n){var i=this;this.transition=t,this.stateContext=e,this.registeredHook=r,this.options=n,this.isSuperseded=function(){return i.type.hookPhase===d.TransitionHookPhase.RUN&&!i.options.transition.isActive()},this.options=nt(n,yr),this.type=r.eventType}function _r(t,e,r){var i=k(e)?[e]:e;return!!(T(i)?i:function(t){for(var e=i,r=0;r "+(this.valid()?"":"(X) ")+"'"+(O(r)?r.name:r)+"'"+Qt(t(this.params()))+" )"},Pr.diToken=Pr);function Pr(t,e,r){var n=this;if(this._deferred=D.$q.defer(),this.promise=this._deferred.promise,this._registeredHooks={},this._hookBuilder=new Rr(this),this.isActive=function(){return n.router.globals.transition===n},this.router=r,!(this._targetState=e).valid())throw new Error(e.error());this._options=B({current:p(this)},e.options()),this.$id=r.transitionService._transitionCount++;var i=qe.buildToPath(t,e);this._treeChanges=qe.treeChanges(t,i,this._options.reloadState),this.createTransitionHookRegFns();var o=this._hookBuilder.buildHooksForPhase(d.TransitionHookPhase.CREATE);gr.invokeHooks(o,function(){return null}),this.applyViewConfigs(r)}function kr(t,e){var r=["",""],n=t.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!e)return n;switch(e.squash){case!1:r=["(",")"+(e.isOptional?"?":"")];break;case!0:n=n.replace(/\/$/,""),r=["(?:/(",")|/)?"];break;default:r=["("+e.squash+"|",")?"]}return n+r[0]+e.type.pattern.source+r[1]}var Or=ne("/"),xr={state:{params:{}},strict:!0,caseInsensitive:!0},jr=(Vr.encodeDashes=function(t){return encodeURIComponent(t).replace(/-/g,function(t){return"%5C%"+t.charCodeAt(0).toString(16).toUpperCase()})},Vr.pathSegmentsAndParams=function(t){return Ct(t._segments,t._params.filter(function(t){return t.location===d.DefType.PATH}).concat(void 0)).reduce(mt,[]).filter(function(t){return""!==t&&E(t)})},Vr.queryParams=function(t){return t._params.filter(function(t){return t.location===d.DefType.SEARCH})},Vr.compare=function(t,e){function r(t){return t._cache.weights=t._cache.weights||function(t){return t._cache.segments=t._cache.segments||t._cache.path.map(Vr.pathSegmentsAndParams).reduce(mt,[]).reduce(ie,[]).map(function(t){return k(t)?Or(t):t}).reduce(mt,[])}(t).map(function(t){return"/"===t?1:k(t)?2:t instanceof Te?3:void 0})}var n=r(t),i=r(e);!function(t,e,r){for(var n=Math.max(t.length,e.length);t.length Registering",t),this._viewConfigs.push(t)},Gr.prototype.sync=function(){var r=this,n=this._uiViews.map(function(t){return[t.fqn,t]}).reduce(Tt,{});function i(t){for(var e=t.viewDecl.$context,r=0;++r&&e.parent;)e=e.parent;return r}var o=s(function(t,e,r,n){return e*(t(r)-t(n))}),t=this._uiViews.sort(o(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(t){var e=r._viewConfigs.filter(Gr.matches(n,t));return 1 Registering",e);var t=this._uiViews;return t.filter(function(t){return t.fqn===e.fqn&&t.$type===e.$type}).length&&we.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",e),t.push(e),this.sync(),function(){-1!==t.indexOf(e)?(we.traceViewServiceUIViewEvent("<- Deregistering",e),Z(t)(e)):we.traceViewServiceUIViewEvent("Tried removing non-registered uiView",e)}},Gr.prototype.available=function(){return this._uiViews.map(m("fqn"))},Gr.prototype.active=function(){return this._uiViews.filter(m("$config")).map(m("name"))},Gr.matches=function(u,s){return function(t){if(s.$type!==t.viewDecl.$type)return!1;var e=t.viewDecl,r=e.$uiViewName.split("."),n=s.fqn.split(".");if(!G(r,n.slice(0-r.length)))return!1;var i=1-r.length||void 0,o=n.slice(0,i).join("."),a=u[o].creationContext;return e.$uiViewContextAnchor===(a&&a.name)}},Gr);function Gr(t){var r=this;this.router=t,this._uiViews=[],this._viewConfigs=[],this._viewConfigFactories={},this._listeners=[],this._pluginapi={_rootViewContext:this._rootViewContext.bind(this),_viewConfigFactory:this._viewConfigFactory.bind(this),_registeredUIView:function(e){return ft(r._uiViews,function(t){return r.router.$id+"."+t.id===e})},_registeredUIViews:function(){return r._uiViews},_activeViewConfigs:function(){return r._viewConfigs},_onSync:function(t){return r._listeners.push(t),function(){return Z(r._listeners,t)}}}}var zr=(Wr.prototype.dispose=function(){this.transitionHistory.clear(),this.successfulTransitions.clear(),this.transition=null},Wr);function Wr(){this.params=new je,this.lastStartedTransitionId=-1,this.transitionHistory=new Dt([],1),this.successfulTransitions=new Dt([],1)}var Jr;function Qr(t){if(!(T(t)||k(t)||h(Ae)(t)||Ae.isDef(t)))throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property");return T(t)?t:p(t)}Jr=function(t,e){var r=function(t,e){return(e.priority||0)-(t.priority||0)}(t,e);return 0!==r?r:0!==(r=function(t,e){var r={STATE:4,URLMATCHER:4,REGEXP:3,RAW:2,OTHER:1};return(r[t.type]||0)-(r[e.type]||0)}(t,e))?r:0!==(r=function(t,e){return t.urlMatcher&&e.urlMatcher?jr.compare(t.urlMatcher,e.urlMatcher):0}(t,e))?r:function(t,e){var r={STATE:!0,URLMATCHER:!0};return r[t.type]&&r[e.type]?0:(t.$id||0)-(e.$id||0)}(t,e)};var Kr=(Yr.prototype.dispose=function(t){this._rules=[],delete this._otherwiseFn},Yr.prototype.initial=function(t){var e=Qr(t);this.rule(this.urlRuleFactory.create(function(t,e){return 0===e.globals.transitionHistory.size()&&!!/^\/?$/.exec(t.path)},e))},Yr.prototype.otherwise=function(t){var e=Qr(t);this._otherwiseFn=this.urlRuleFactory.create(p(!0),e),this._sorted=!1},Yr.prototype.removeRule=function(t){Z(this._rules,t)},Yr.prototype.rule=function(t){var e=this;if(!Ur.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)}},Yr.prototype.rules=function(){return this.ensureSorted(),this._rules.concat(this._otherwiseFn?[this._otherwiseFn]:[])},Yr.prototype.sort=function(t){for(var e=this.stableSort(this._rules,this._sortFn=t||this._sortFn),r=0,n=0;nr.weight?u:r}return r},en);function en(t){var n=this;this.router=t,this.interceptDeferred=!1,this.rules=new Kr(this.router),this.config=new Zr(this.router),this.url=function(t,e,r){return n.router.locationService.url(t,e,r)},this.path=function(){return n.router.locationService.path()},this.search=function(){return n.router.locationService.search()},this.hash=function(){return n.router.locationService.hash()},this.onChange=function(t){return n.router.locationService.onChange(t)}}var rn=0,nn=I("LocationServices",["url","path","search","hash","onChange"]),on=I("LocationConfig",["port","protocol","host","baseHref","html5Mode","hashPrefix"]),an=(un.prototype.disposable=function(t){this._disposables.push(t)},un.prototype.dispose=function(t){var e=this;t&&T(t.dispose)?t.dispose(this):(this._disposed=!0,this._disposables.slice().forEach(function(t){try{"function"==typeof t.dispose&&t.dispose(e),Z(e._disposables,t)}catch(t){}}))},un.prototype.plugin=function(t,e){void 0===e&&(e={});var r=new t(this,e);if(!r.name)throw new Error("Required property `name` missing on plugin: "+r);return this._disposables.push(r),this._plugins[r.name]=r},un.prototype.getPlugin=function(t){return t?this._plugins[t]:pt(this._plugins)},un);function un(t,e){void 0===t&&(t=nn),void 0===e&&(e=on),this.locationService=t,this.locationConfig=e,this.$id=rn++,this._disposed=!1,this._disposables=[],this.trace=we,this.viewService=new Br(this),this.globals=new zr,this.transitionService=new kn(this),this.urlMatcherFactory=new Dr(this),this.urlRouter=new Lr(this),this.urlService=new tn(this),this.stateRegistry=new dr(this),this.stateService=new xn(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)}function sn(e){e.addResolvable(Le.fromData(an,e.router),""),e.addResolvable(Le.fromData(Tr,e),""),e.addResolvable(Le.fromData("$transition$",e),""),e.addResolvable(Le.fromData("$stateParams",e.params()),""),e.entering().forEach(function(t){e.addResolvable(Le.fromData("$state$",t),t)})}function cn(t){function e(t){return ln(t.token)?Le.fromData(t.token,null):t}pt(t.treeChanges()).reduce(mt,[]).reduce(wt,[]).forEach(function(t){t.resolvables=t.resolvables.map(e)})}function fn(e){var t=e.to().redirectTo;if(t){var r=e.router.stateService;return T(t)?D.$q.when(t(e)).then(n):n(t)}function n(t){if(t)return t instanceof Ae?t:k(t)?r.target(t,e.params(),e.options()):t.state||t.params?r.target(t.state||e.to(),t.params||e.params(),e.options()):void 0}}var ln=K(["$transition$",Tr]);function hn(r){return function(t,e){return(0,e.$$state()[r])(t,e)}}function pn(t){return new Je(t.treeChanges().to).resolvePath("EAGER",t).then(W)}function vn(t,e){return new Je(t.treeChanges().to).subContext(e.$$state()).resolvePath("LAZY",t).then(W)}function dn(t){return new Je(t.treeChanges().to).resolvePath("LAZY",t).then(W)}function mn(t){var e=D.$q,r=t.views("entering");if(r.length)return e.all(r.map(function(t){return e.when(t.load())})).then(W)}function yn(t){var e=t.views("entering"),r=t.views("exiting");if(e.length||r.length){var n=t.router.viewService;r.forEach(function(t){return n.deactivateViewConfig(t)}),e.forEach(function(t){return n.activateViewConfig(t)}),n.sync()}}function gn(t){function e(){r.transition===t&&(r.transition=null)}var r=t.router.globals;t.onSuccess({},function(){r.successfulTransitions.enqueue(t),r.$current=t.$to(),r.current=r.$current.self,kt(t.params(),r.params)},{priority:1e4}),t.promise.then(e,e)}function wn(t){var e=t.options(),r=t.router.stateService,n=t.router.urlRouter;if("url"!==e.source&&e.location&&r.$current.navigable){var i={replace:"replace"===e.location};n.push(r.$current.navigable.url,r.params,i)}n.update(!0)}function _n(a){var u=a.router,t=a.entering().filter(function(t){return!!t.$$state().lazyLoad}).map(function(t){return Rn(a,t)});return D.$q.all(t).then(function(){if("url"!==a.originalTransition().options().source){var t=a.targetState();return u.stateService.target(t.identifier(),t.params(),t.options())}var e=u.urlService,r=e.match(e.parts()),n=r&&r.rule;if(n&&"STATE"===n.type){var i=n.state,o=r.match;return u.stateService.target(i,o,a.options())}u.urlService.sync()})}var Sn=hn("onExit"),$n=hn("onRetain"),bn=hn("onEnter");function Rn(e,r){var n=r.$$state().lazyLoad,t=n._promise;if(!t){t=n._promise=D.$q.when(n(e,r)).then(function(t){t&&Array.isArray(t.states)&&t.states.forEach(function(t){return e.router.stateRegistry.register(t)});return t}).then(function(t){return delete r.lazyLoad,delete r.$$state().lazyLoad,delete n._promise,t},function(t){return delete n._promise,D.$q.reject(t)})}return t}var En=function(t,e,r,n,i,o,a,u){void 0===i&&(i=!1),void 0===o&&(o=gr.HANDLE_RESULT),void 0===a&&(a=gr.REJECT_ERROR),void 0===u&&(u=!1),this.name=t,this.hookPhase=e,this.hookOrder=r,this.criteriaMatchPath=n,this.reverseSort=i,this.getResultHandler=o,this.getErrorHandler=a,this.synchronous=u};function Cn(t){var e=t._ignoredReason();if(e){we.traceTransitionIgnored(t);var r=t.router.globals.transition;return"SameAsCurrent"===e&&r&&r.abort(),Ft.ignored().toPromise()}}function Tn(t){if(!t.valid())throw new Error(t.error().toString())}var Pn={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,supercede:!0,custom:{},current:function(){return null},source:"unknown"},kn=(On.prototype.onCreate=function(t,e,r){},On.prototype.onBefore=function(t,e,r){},On.prototype.onStart=function(t,e,r){},On.prototype.onExit=function(t,e,r){},On.prototype.onRetain=function(t,e,r){},On.prototype.onEnter=function(t,e,r){},On.prototype.onFinish=function(t,e,r){},On.prototype.onSuccess=function(t,e,r){},On.prototype.onError=function(t,e,r){},On.prototype.dispose=function(t){pt(this._registeredHooks).forEach(function(e){return e.forEach(function(t){t._deregistered=!0,Z(e,t)})})},On.prototype.create=function(t,e){return new Tr(t,e,this._router)},On.prototype._defineCoreEvents=function(){var t=d.TransitionHookPhase,e=gr,r=this._criteriaPaths;this._defineEvent("onCreate",t.CREATE,0,r.to,!1,e.LOG_REJECTED_RESULT,e.THROW_ERROR,!0),this._defineEvent("onBefore",t.BEFORE,0,r.to),this._defineEvent("onStart",t.RUN,0,r.to),this._defineEvent("onExit",t.RUN,100,r.exiting,!0),this._defineEvent("onRetain",t.RUN,200,r.retained),this._defineEvent("onEnter",t.RUN,300,r.entering),this._defineEvent("onFinish",t.RUN,400,r.to),this._defineEvent("onSuccess",t.SUCCESS,0,r.to,!1,e.LOG_REJECTED_RESULT,e.LOG_ERROR,!0),this._defineEvent("onError",t.ERROR,0,r.to,!1,e.LOG_REJECTED_RESULT,e.LOG_ERROR,!0)},On.prototype._defineCorePaths=function(){var t=d.TransitionHookScope.STATE,e=d.TransitionHookScope.TRANSITION;this._definePathType("to",e),this._definePathType("from",e),this._definePathType("exiting",t),this._definePathType("retained",t),this._definePathType("entering",t)},On.prototype._defineEvent=function(t,e,r,n,i,o,a,u){void 0===i&&(i=!1),void 0===o&&(o=gr.HANDLE_RESULT),void 0===a&&(a=gr.REJECT_ERROR),void 0===u&&(u=!1);var s=new En(t,e,r,n,i,o,a,u);this._eventTypes.push(s),br(this,this,s)},On.prototype._getEvents=function(e){return(E(e)?this._eventTypes.filter(function(t){return t.hookPhase===e}):this._eventTypes.slice()).sort(function(t,e){var r=t.hookPhase-e.hookPhase;return 0==r?t.hookOrder-e.hookOrder:r})},On.prototype._definePathType=function(t,e){this._criteriaPaths[t]={name:t,scope:e}},On.prototype._getPathTypes=function(){return this._criteriaPaths},On.prototype.getHooks=function(t){return this._registeredHooks[t]},On.prototype._registerCoreTransitionHooks=function(){var t=this._deregisterHookFns;t.addCoreResolves=function(t){return t.onCreate({},sn)}(this),t.ignored=function(t){return t.onBefore({},Cn,{priority:-9999})}(this),t.invalid=function(t){return t.onBefore({},Tn,{priority:-1e4})}(this),t.redirectTo=function(t){return t.onStart({to:function(t){return!!t.redirectTo}},fn)}(this),t.onExit=function(t){return t.onExit({exiting:function(t){return!!t.onExit}},Sn)}(this),t.onRetain=function(t){return t.onRetain({retained:function(t){return!!t.onRetain}},$n)}(this),t.onEnter=function(t){return t.onEnter({entering:function(t){return!!t.onEnter}},bn)}(this),t.eagerResolve=function(t){return t.onStart({},pn,{priority:1e3})}(this),t.lazyResolve=function(t){return t.onEnter({entering:p(!0)},vn,{priority:1e3})}(this),t.resolveAll=function(t){return t.onFinish({},dn,{priority:1e3})}(this),t.loadViews=function(t){return t.onFinish({},mn)}(this),t.activateViews=function(t){return t.onSuccess({},yn)}(this),t.updateGlobals=function(t){return t.onCreate({},gn)}(this),t.updateUrl=function(t){return t.onSuccess({},wn,{priority:9999})}(this),t.lazyLoad=function(t){return t.onBefore({entering:function(t){return!!t.lazyLoad}},_n)}(this)},On);function On(t){this._transitionCount=0,this._eventTypes=[],this._registeredHooks={},this._criteriaPaths={},this._router=t,this.$view=t.viewService,this._deregisterHookFns={},this._pluginapi=J(p(this),{},p(this),["_definePathType","_defineEvent","_getPathTypes","_getEvents","getHooks"]),this._defineCorePaths(),this._defineCoreEvents(),this._registerCoreTransitionHooks(),t.globals.successfulTransitions.onEvict(cn)}var xn=(Object.defineProperty(jn.prototype,"transition",{get:function(){return this.router.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(jn.prototype,"params",{get:function(){return this.router.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(jn.prototype,"current",{get:function(){return this.router.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(jn.prototype,"$current",{get:function(){return this.router.globals.$current},enumerable:!0,configurable:!0}),jn.prototype.dispose=function(){this.defaultErrorHandler(W),this.invalidCallbacks=[]},jn.prototype._handleInvalidTargetState=function(t,r){function n(){return e.transitionHistory.peekTail()}var i=this,o=qe.makeTargetState(this.router.stateRegistry,t),e=this.router.globals,a=n(),u=new Dt(this.invalidCallbacks.slice()),s=new Je(t).injector(),c=function(t){if(t instanceof Ae){var e=t;return(e=i.target(e.identifier(),e.params(),e.options())).valid()?n()!==a?Ft.superseded().toPromise():i.transitionTo(e.identifier(),e.params(),e.options()):Ft.invalid(e.error()).toPromise()}};return function e(){var t=u.dequeue();return void 0===t?Ft.invalid(r.error()).toPromise():D.$q.when(t(r,o,s)).then(c).then(function(t){return t||e()})}()},jn.prototype.onInvalid=function(t){return this.invalidCallbacks.push(t),function(){Z(this.invalidCallbacks)(t)}.bind(this)},jn.prototype.reload=function(t){return this.transitionTo(this.current,this.params,{reload:!E(t)||t,inherit:!1,notify:!1})},jn.prototype.go=function(t,e,r){var n=nt(r,{relative:this.$current,inherit:!0},Pn);return this.transitionTo(t,e,n)},jn.prototype.target=function(t,e,r){if(void 0===r&&(r={}),O(r.reload)&&!r.reload.name)throw new Error("Invalid reload state object");var n=this.router.stateRegistry;if(r.reloadState=!0===r.reload?n.root():n.matcher.find(r.reload,r.relative),r.reload&&!r.reloadState)throw new Error("No such reload state '"+(k(r.reload)?r.reload:r.reload.name)+"'");return new Ae(this.router.stateRegistry,t,e,r)},jn.prototype.getCurrentPath=function(){var t=this,e=this.router.globals.successfulTransitions.peekTail();return e?e.treeChanges().to:[new He(t.router.stateRegistry.root())]},jn.prototype.transitionTo=function(t,e,r){var o=this;void 0===e&&(e={}),void 0===r&&(r={});var a=this.router,u=a.globals;function n(){return u.transition}r=nt(r,Pn),r=B(r,{current:n});var i=this.target(t,e,r),s=this.getCurrentPath();if(!i.exists())return this._handleInvalidTargetState(s,i);if(!i.valid())return Vt(i.error());if(!1===r.supercede&&n())return Ft.ignored("Another transition is in progress and supercede has been set to false in TransitionOptions for the transition. So the transition was ignored in favour of the existing one in progress.").toPromise();var c=function(i){return function(t){if(t instanceof Ft){var e=a.globals.lastStartedTransitionId<=i.$id;if(t.type===d.RejectType.IGNORED)return e&&a.urlRouter.update(),D.$q.when(u.current);var r=t.detail;if(t.type===d.RejectType.SUPERSEDED&&t.redirected&&r instanceof Ae){var n=i.redirect(r);return n.run().catch(c(n))}if(t.type===d.RejectType.ABORTED)return e&&a.urlRouter.update(),D.$q.reject(t)}return o.defaultErrorHandler()(t),D.$q.reject(t)}},f=this.router.transitionService.create(s,i),l=f.run().catch(c(f));return jt(l),B(l,{transition:f})},jn.prototype.is=function(t,e,r){r=nt(r,{relative:this.$current});var n=this.router.stateRegistry.matcher.find(t,r.relative);if(E(n)){if(this.$current!==n)return!1;if(!e)return!0;var i=n.parameters({inherit:!0,matchingKeys:e});return Te.equals(i,Te.values(i,e),this.params)}},jn.prototype.includes=function(t,e,r){r=nt(r,{relative:this.$current});var n=k(t)&&Ht.fromString(t);if(n){if(!n.matches(this.$current.name))return!1;t=this.$current.name}var i=this.router.stateRegistry.matcher.find(t,r.relative),o=this.$current.includes;if(E(i)){if(!E(o[i.name]))return!1;if(!e)return!0;var a=i.parameters({inherit:!0,matchingKeys:e});return Te.equals(a,Te.values(a,e),this.params)}},jn.prototype.href=function(t,e,r){r=nt(r,{lossy:!0,inherit:!0,absolute:!1,relative:this.$current}),e=e||{};var n=this.router.stateRegistry.matcher.find(t,r.relative);if(!E(n))return null;r.inherit&&(e=this.params.$inherit(e,this.$current,n));var i=n&&r.lossy?n.navigable:n;return i&&void 0!==i.url&&null!==i.url?this.router.urlRouter.href(i.url,e,{absolute:r.absolute}):null},jn.prototype.defaultErrorHandler=function(t){return this._defaultErrorHandler=t||this._defaultErrorHandler},jn.prototype.get=function(t,e){var r=this.router.stateRegistry;return 0===arguments.length?r.get():r.get(t,e||this.$current)},jn.prototype.lazyLoad=function(t,e){var r=this.get(t);if(!r||!r.lazyLoad)throw new Error("Can not lazy load "+t);var n=this.getCurrentPath(),i=qe.makeTargetState(this.router.stateRegistry,n);return Rn(e=e||this.router.transitionService.create(n,i),r)},jn);function jn(t){this.router=t,this.invalidCallbacks=[],this._defaultErrorHandler=function(t){t instanceof Error&&t.stack?(console.error(t),console.error(t.stack)):t instanceof Ft?(console.error(t.toString()),t.detail&&t.detail.stack&&console.error(t.detail.stack)):console.error(t)};var e=Object.keys(jn.prototype).filter(l(K(["current","$current","params","transition"])));J(p(jn.prototype),this,p(this),e)}function Vn(t,e){var r=e[0],n=e[1];return t.hasOwnProperty(r)?x(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n,t}function Hn(t){return t.split("&").filter(z).map(re).reduce(Vn,{})}var In={when:function(r){return new Promise(function(t,e){return t(r)})},reject:function(r){return new Promise(function(t,e){e(r)})},defer:function(){var r={};return r.promise=new Promise(function(t,e){r.resolve=t,r.reject=e}),r},all:function(t){if(x(t))return Promise.all(t);if(O(t)){var e=Object.keys(t).map(function(e){return t[e].then(function(t){return{key:e,val:t}})});return In.all(e).then(function(t){return t.reduce(function(t,e){return t[e.key]=e.val,t},{})})}}},An={},Dn=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,qn=/([^\s,]+)/g,Un={get:function(t){return An[t]},has:function(t){return null!=Un.get(t)},invoke:function(t,e,r){var n=B({},An,r||{}),i=Un.annotate(t),o=$t(function(t){return n.hasOwnProperty(t)},function(t){return"DI can't find injectable: '"+t+"'"}),a=i.filter(o).map(function(t){return n[t]});return T(t)?t.apply(e,a):t.slice(-1)[0].apply(e,a)},annotate:function(t){if(!H(t))throw new Error("Not an injectable function: "+t);if(t&&t.$inject)return t.$inject;if(x(t))return t.slice(0,-1);var e=t.toString().replace(Dn,"");return e.slice(e.indexOf("(")+1,e.indexOf(")")).match(qn)||[]}};function Fn(t){function e(t){return t||""}var r=te(t).map(e),n=r[0],i=r[1],o=ee(n).map(e);return{path:o[0],search:o[1],hash:i,url:t}}function Nn(t){var e=t.path(),r=t.search(),n=t.hash(),i=Object.keys(r).map(function(e){var t=r[e];return(x(t)?t:[t]).map(function(t){return e+"="+t})}).reduce(mt,[]).join("&");return e+(i?"?"+i:"")+(n?"#"+n:"")}function Ln(n,i,o,a){return function(t){var e=t.locationService=new o(t),r=t.locationConfig=new a(t,i);return{name:n,service:e,configuration:r,dispose:function(t){t.dispose(e),t.dispose(r)}}}}var Mn=(Bn.prototype.url=function(e,t){return void 0===t&&(t=!0),E(e)&&e!==this._get()&&(this._set(null,null,e,t),this.fireAfterUpdate&&this._listeners.forEach(function(t){return t({url:e})})),Nn(this)},Bn.prototype.onChange=function(t){var e=this;return this._listeners.push(t),function(){return Z(e._listeners,t)}},Bn.prototype.dispose=function(t){rt(this._listeners)},Bn);function Bn(t,e){var r=this;this.fireAfterUpdate=e,this._listeners=[],this._listener=function(e){return r._listeners.forEach(function(t){return t(e)})},this.hash=function(){return Fn(r._get()).hash},this.path=function(){return Fn(r._get()).path},this.search=function(){return Hn(Fn(r._get()).search)},this._location=U.location,this._history=U.history}var Gn,zn,Wn=((Gn=function(t,e){return(Gn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}Gn(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(Jn,zn=Mn),Jn.prototype._get=function(){return Zt(this._location.hash)},Jn.prototype._set=function(t,e,r,n){this._location.hash=r},Jn.prototype.dispose=function(t){zn.prototype.dispose.call(this,t),U.removeEventListener("hashchange",this._listener)},Jn);function Jn(t){var e=zn.call(this,t,!1)||this;return U.addEventListener("hashchange",e._listener,!1),e}var Qn,Kn,Yn=((Qn=function(t,e){return(Qn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}Qn(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(Zn,Kn=Mn),Zn.prototype._get=function(){return this._url},Zn.prototype._set=function(t,e,r,n){this._url=r},Zn);function Zn(t){return Kn.call(this,t,!0)||this}var Xn,ti,ei=((Xn=function(t,e){return(Xn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function r(){this.constructor=t}Xn(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(ri,ti=Mn),ri.prototype._getBasePrefix=function(){return Yt(this._config.baseHref())},ri.prototype._get=function(){var t=this._location,e=t.pathname,r=t.hash,n=t.search;n=ee(n)[1],r=te(r)[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)+(n?"?"+n:"")+(r?"#"+r:"")},ri.prototype._set=function(t,e,r,n){var i=this._getBasePrefix(),o=r&&"/"!==r[0]?"/":"",a=""===r||"/"===r?this._config.baseHref():i+o+r;n?this._history.replaceState(t,e,a):this._history.pushState(t,e,a)},ri.prototype.dispose=function(t){ti.prototype.dispose.call(this,t),U.removeEventListener("popstate",this._listener)},ri);function ri(t){var e=ti.call(this,t,!0)||this;return e._config=t.urlService.config,U.addEventListener("popstate",e._listener,!1),e}function ni(){var e=this;this.dispose=W,this._baseHref="",this._port=80,this._protocol="http",this._host="localhost",this._hashPrefix="",this.port=function(){return e._port},this.protocol=function(){return e._protocol},this.host=function(){return e._host},this.baseHref=function(){return e._baseHref},this.html5Mode=function(){return!1},this.hashPrefix=function(t){return E(t)?e._hashPrefix=t:e._hashPrefix}}var ii=(oi.prototype.port=function(){return location.port?Number(location.port):"https"===this.protocol()?443:80},oi.prototype.protocol=function(){return location.protocol.replace(/:/g,"")},oi.prototype.host=function(){return location.hostname},oi.prototype.html5Mode=function(){return this._isHtml5},oi.prototype.hashPrefix=function(t){return E(t)?this._hashPrefix=t:this._hashPrefix},oi.prototype.baseHref=function(t){return E(t)&&(this._baseHref=t),$(this._baseHref)&&(this._baseHref=this.getBaseHref()),this._baseHref},oi.prototype.getBaseHref=function(){var t=document.getElementsByTagName("base")[0];return t&&t.href?t.href.replace(/^([^/:]*:)?\/\/[^/]*/,""):this._isHtml5?"/":location.pathname||"/"},oi.prototype.dispose=function(){},oi);function oi(t,e){void 0===e&&(e=!1),this._isHtml5=e,this._baseHref=void 0,this._hashPrefix=""}function ai(t){return D.$injector=Un,{name:"vanilla.services",$q:D.$q=In,$injector:Un,dispose:function(){return null}}}var ui=Ln("vanilla.hashBangLocation",!1,Wn,ii),si=Ln("vanilla.pushStateLocation",!0,ei,ii),ci=Ln("vanilla.memoryLocation",!1,Yn,ni),fi=(li.prototype.dispose=function(t){},li);function li(){}var hi=Object.freeze({__proto__:null,root:U,fromJson:N,toJson:L,forEach:M,extend:B,equals:G,identity:z,noop:W,createProxyFunctions:J,inherit:Q,inArray:K,_inArray:Y,removeFrom:Z,_removeFrom:X,pushTo:tt,_pushTo:et,deregAll:rt,defaults:nt,mergeR:it,ancestors:ot,pick:at,omit:ut,pluck:st,filter:ct,find:ft,mapObj:lt,map:ht,values:pt,allTrueR:vt,anyTrueR:dt,unnestR:mt,flattenR:yt,pushR:gt,uniqR:wt,unnest:_t,flatten:St,assertPredicate:$t,assertMap:bt,assertFn:Rt,pairs:Et,arrayTuples:Ct,applyPairs:Tt,tail:Pt,copy:kt,_extend:Ot,silenceUncaughtInPromise:jt,silentRejection:Vt,makeStub:I,services:D,Glob:Ht,curry:s,compose:r,pipe:c,prop:m,propEq:y,parse:R,not:l,and:i,or:u,all:a,any:f,is:h,eq:o,val:p,invoke:v,pattern:g,isUndefined:$,isDefined:E,isNull:_,isNullOrUndefined:C,isFunction:T,isNumber:P,isString:k,isObject:O,isArray:x,isDate:j,isRegExp:V,isInjectable:H,isPromise:A,Queue:Dt,maxLength:Lt,padString:Mt,kebobString:Bt,functionToString:Gt,fnToString:zt,stringify:Qt,beforeAfterSubstr:Kt,hostRegex:Xt,stripLastPathElement:Yt,splitHash:te,splitQuery:ee,splitEqual:re,trimHashVal:Zt,splitOnDelim:ne,joinNeighborsR:ie,get Category(){return d.Category},Trace:ye,trace:we,get DefType(){return d.DefType},Param:Te,ParamTypes:ke,StateParams:je,ParamType:_e,PathNode:He,PathUtils:qe,resolvePolicies:Fe,defaultResolvePolicy:Ne,Resolvable:Le,NATIVE_INJECTOR_TOKEN:We,ResolveContext:Je,resolvablesBuilder:ir,StateBuilder:or,StateObject:ur,StateMatcher:cr,StateQueueManager:lr,StateRegistry:dr,StateService:xn,TargetState:Ae,get TransitionHookPhase(){return d.TransitionHookPhase},get TransitionHookScope(){return d.TransitionHookScope},HookBuilder:Rr,matchState:_r,RegisteredHook:Sr,makeEvent:br,get RejectType(){return d.RejectType},Rejection:Ft,Transition:Tr,TransitionHook:gr,TransitionEventType:En,defaultTransOpts:Pn,TransitionService:kn,UrlRules:Kr,UrlConfig:Zr,UrlMatcher:jr,ParamFactory:Ir,UrlMatcherFactory:Dr,UrlRouter:Lr,UrlRuleFactory:Ur,BaseUrlRule:Nr,UrlService:tn,ViewService:Br,UIRouterGlobals:zr,UIRouter:an,$q:In,$injector:Un,BaseLocationServices:Mn,HashLocationService:Wn,MemoryLocationService:Yn,PushStateLocationService:ei,MemoryLocationConfig:ni,BrowserLocationConfig:ii,keyValsToObjectR:Vn,getParams:Hn,parseUrl:Fn,buildUrl:Nn,locationPluginFactory:Ln,servicesPlugin:ai,hashLocationPlugin:ui,pushStateLocationPlugin:si,memoryLocationPlugin:ci,UIRouterPluginBase:fi});function pi(){var r=null;return function(t,e){return r=r||D.$injector.get("$templateFactory"),[new yi(t,e,r)]}}var vi=function(t,r){return t.reduce(function(t,e){return t||E(r[e])},!1)};function di(n){if(!n.parent)return{};var i=["component","bindings","componentProvider"],o=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),t=i.concat(o);if(E(n.views)&&vi(t,n))throw new Error("State '"+n.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): "+t.filter(function(t){return E(n[t])}).join(", "));var a={},e=n.views||{$default:at(n,t)};return M(e,function(t,e){if(e=e||"$default",k(t)&&(t={component:t}),t=B({},t),vi(i,t)&&vi(o,t))throw new Error("Cannot combine: "+i.join("|")+" with: "+o.join("|")+" in stateview: '"+e+"@"+n.name+"'");t.resolveAs=t.resolveAs||"$resolve",t.$type="ng1",t.$context=n,t.$name=e;var r=Br.normalizeUIViewTarget(t.$context,t.$name);t.$uiViewName=r.uiViewName,t.$uiViewContextAnchor=r.uiViewContextAnchor,a[e]=t}),a}var mi=0,yi=(gi.prototype.load=function(){var e=this,t=D.$q,r=new Je(this.path),n=this.path.reduce(function(t,e){return B(t,e.paramValues)},{}),i={template:t.when(this.factory.fromConfig(this.viewDecl,n,r)),controller:t.when(this.getController(r))};return t.all(i).then(function(t){return we.traceViewServiceEvent("Loaded",e),e.controller=t.controller,B(e,t.template),e})},gi.prototype.getController=function(t){var e=this.viewDecl.controllerProvider;if(!H(e))return this.viewDecl.controller;var r=D.$injector.annotate(e),n=x(e)?Pt(e):e;return new Le("",n,r).get(t)},gi);function gi(t,e,r){var n=this;this.path=t,this.viewDecl=e,this.factory=r,this.$id=mi++,this.loaded=!1,this.getTemplate=function(t,e){return n.component?n.factory.makeComponentTemplate(t,e,n.component,n.viewDecl.bindings):n.template}}var wi=(_i.prototype.useHttpService=function(t){this._useHttp=t},_i.prototype.fromConfig=function(t,e,r){function n(t){return D.$q.when(t).then(function(t){return{template:t}})}function i(t){return D.$q.when(t).then(function(t){return{component:t}})}return E(t.template)?n(this.fromString(t.template,e)):E(t.templateUrl)?n(this.fromUrl(t.templateUrl,e)):E(t.templateProvider)?n(this.fromProvider(t.templateProvider,e,r)):E(t.component)?i(t.component):E(t.componentProvider)?i(this.fromComponentProvider(t.componentProvider,e,r)):n("")},_i.prototype.fromString=function(t,e){return T(t)?t(e):t},_i.prototype.fromUrl=function(t,e){return T(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)},_i.prototype.fromProvider=function(t,e,r){var n=D.$injector.annotate(t),i=x(t)?Pt(t):t;return new Le("",i,n).get(r)},_i.prototype.fromComponentProvider=function(t,e,r){var n=D.$injector.annotate(t),i=x(t)?Pt(t):t;return new Le("",i,n).get(r)},_i.prototype.makeComponentTemplate=function(s,c,t,f){function l(t){var e=Bt(t);return/^(x|data)-/.exec(e)?"x-"+e:e}f=f||{};var h=3<=b.version.minor?"::":"",e=function(t){var e=D.$injector.get(t+"Directive");if(!e||!e.length)throw new Error("Unable to find component named '"+t+"'");return e.map(Si).reduce(mt,[])}(t).map(function(t){var e=t.name,r=t.type,n=l(e);if(s.attr(n)&&!f[e])return n+"='"+s.attr(n)+"'";var i=f[e]||e;if("@"===r)return n+"='{{"+h+"$resolve."+i+"}}'";if("&"!==r)return n+"='"+h+"$resolve."+i+"'";var o=c.getResolvable(i),a=o&&o.data,u=a&&D.$injector.annotate(a)||[];return n+"='$resolve."+i+(x(a)?"["+(a.length-1)+"]":"")+"("+u.join(",")+")'"}).join(" "),r=l(t);return"<"+r+" "+e+">"},_i);function _i(){var n=this;this._useHttp=b.version.minor<3,this.$get=["$http","$templateCache","$injector",function(t,e,r){return n.$templateRequest=r.has&&r.has("$templateRequest")&&r.get("$templateRequest"),n.$http=t,n.$templateCache=e,n}]}var Si=function(t){return O(t.bindToController)?$i(t.bindToController):$i(t.scope)},$i=function(e){return Object.keys(e||{}).map(function(t){return[t,/^([=<@&])[?]?(.*)/.exec(e[t])]}).filter(function(t){return E(t)&&x(t[1])}).map(function(t){return{name:t[1][2]||t[0],type:t[1][1]}})},bi=(Ri.prototype.decorator=function(t,e){return this.stateRegistry.decorator(t,e)||this},Ri.prototype.state=function(t,e){return O(t)?e=t:e.name=t,this.stateRegistry.register(e),this},Ri.prototype.onInvalid=function(t){return this.stateService.onInvalid(t)},Ri);function Ri(t,e){this.stateRegistry=t,this.stateService=e,J(p(Ri.prototype),this,p(this))}function Ei(r){return function(t,e){var i=t[r],o="onExit"===r?"from":"to";return i?function(t,e){var r=new Je(t.treeChanges(o)).subContext(e.$$state()),n=B(Bi(r),{$state$:e,$transition$:t});return D.$injector.invoke(i,this,n)}:void 0}}var Ci=(Ti.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}},Ti.prototype.dispose=function(){},Ti.prototype.onChange=function(t){var e=this;return this._urlListeners.push(t),function(){return Z(e._urlListeners)(t)}},Ti.prototype.html5Mode=function(){var t=this.$locationProvider.html5Mode();return(t=O(t)?t.enabled:t)&&this.$sniffer.history},Ti.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},Ti.prototype.url=function(t,e,r){return void 0===e&&(e=!1),E(t)&&this.$location.url(t),e&&this.$location.replace(),r&&this.$location.state(r),this.$location.url()},Ti.prototype._runtimeServices=function(t,e,r,n,i){var o=this;this.$location=e,this.$sniffer=r,this.$browser=n,this.$window=i,t.$on("$locationChangeSuccess",function(e){return o._urlListeners.forEach(function(t){return t(e)})});var a=p(e);J(a,this,a,["replace","path","search","hash"]),J(a,this,a,["port","protocol","host"])},Ti);function Ti(t){this._urlListeners=[],this.$locationProvider=t;var e=p(t);J(e,this,e,["hashPrefix"])}var Pi=(ki.injectableHandler=function(e,r){return function(t){return D.$injector.invoke(r,null,{$match:t,$stateParams:e.globals.params})}},ki.prototype.$get=function(){var t=this.router.urlService;return this.router.urlRouter.update(!0),t.interceptDeferred||t.listen(),this.router.urlRouter},ki.prototype.rule=function(t){var e=this;if(!T(t))throw new Error("'rule' must be a function");var r=new Nr(function(){return t(D.$injector,e.router.locationService)},z);return this.router.urlService.rules.rule(r),this},ki.prototype.otherwise=function(t){var e=this,r=this.router.urlService.rules;if(k(t))r.otherwise(t);else{if(!T(t))throw new Error("'rule' must be a string or function");r.otherwise(function(){return t(D.$injector,e.router.locationService)})}return this},ki.prototype.when=function(t,e){return(x(e)||T(e))&&(e=ki.injectableHandler(this.router,e)),this.router.urlService.rules.when(t,e),this},ki.prototype.deferIntercept=function(t){this.router.urlService.deferIntercept(t)},ki);function ki(t){this.router=t}b.module("ui.router.angular1",[]);var Oi=b.module("ui.router.init",["ng"]),xi=b.module("ui.router.util",["ui.router.init"]),ji=b.module("ui.router.router",["ui.router.util"]),Vi=b.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),Hi=b.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),Ii=(b.module("ui.router.compat",["ui.router"]),null);function Ai(t){(Ii=this.router=new an).stateProvider=new bi(Ii.stateRegistry,Ii.stateService),Ii.stateRegistry.decorator("views",di),Ii.stateRegistry.decorator("onExit",Ei("onExit")),Ii.stateRegistry.decorator("onRetain",Ei("onRetain")),Ii.stateRegistry.decorator("onEnter",Ei("onEnter")),Ii.viewService._pluginapi._viewConfigFactory("ng1",pi());var u=Ii.locationService=Ii.locationConfig=new Ci(t);function e(t,e,r,n,i,o,a){return u._runtimeServices(i,t,n,e,r),delete Ii.router,delete Ii.$get,Ii}return Ci.monkeyPatchPathParameterType(Ii),((Ii.router=Ii).$get=e).$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],Ii}Ai.$inject=["$locationProvider"];function Di(r){return["$uiRouterProvider",function(t){var e=t.router[r];return e.$get=function(){return e},e}]}function qi(e,t,r){if(D.$injector=e,D.$q=t,!e.hasOwnProperty("strictDi"))try{e.invoke(function(t){})}catch(t){e.strictDi=!!/strict mode/.exec(t&&t.toString())}r.stateRegistry.get().map(function(t){return t.$$state().resolvables}).reduce(mt,[]).filter(function(t){return"deferred"===t.deps}).forEach(function(t){return t.deps=e.annotate(t.resolveFn,e.strictDi)})}qi.$inject=["$injector","$q","$uiRouter"];function Ui(t){t.$watch(function(){we.approximateDigests++})}Ui.$inject=["$rootScope"],Oi.provider("$uiRouter",Ai),ji.provider("$urlRouter",["$uiRouterProvider",function(t){return t.urlRouterProvider=new Pi(t)}]),xi.provider("$urlService",Di("urlService")),xi.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return Ii.urlMatcherFactory}]),xi.provider("$templateFactory",function(){return new wi}),Vi.provider("$stateRegistry",Di("stateRegistry")),Vi.provider("$uiRouterGlobals",Di("globals")),Vi.provider("$transitions",Di("transitionService")),Vi.provider("$state",["$uiRouterProvider",function(){return B(Ii.stateProvider,{$get:function(){return Ii.stateService}})}]),Vi.factory("$stateParams",["$uiRouter",function(t){return t.globals.params}]),Hi.factory("$view",function(){return Ii.viewService}),Hi.service("$trace",function(){return we}),Hi.run(Ui),xi.run(["$urlMatcherFactory",function(t){}]),Vi.run(["$state",function(t){}]),ji.run(["$urlRouter",function(t){}]),Oi.run(qi);var Fi,Ni,Li,Mi,Bi=function(r){return r.getTokens().filter(k).map(function(t){var e=r.getResolvable(t);return[t,"NOWAIT"===r.getPolicy(e).async?e.promise:e.data]}).reduce(Tt,{})};function Gi(t){var e,r=t.match(/^\s*({[^}]*})\s*$/);if(r&&(t="("+r[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 zi(t){var e=t.parent().inheritedData("$uiView"),r=R("$cfg.path")(e);return r?Pt(r).state.name:void 0}function Wi(t,e,r){var n=r.uiState||t.current.name,i=B(function(t,e){return{relative:zi(t)||e.$current,inherit:!0,source:"sref"}}(e,t),r.uiStateOpts||{}),o=t.href(n,r.uiStateParams,i);return{uiState:n,uiStateParams:r.uiStateParams,uiStateOpts:i,href:o}}function Ji(t){var e="[object SVGAnimatedString]"===Object.prototype.toString.call(t.prop("href")),r="FORM"===t[0].nodeName;return{attr:r?"action":e?"xlink:href":"href",isAnchor:"A"===t.prop("tagName").toUpperCase(),clickable:!r}}function Qi(o,a,u,s,c){return function(t){var e=t.which||t.button,r=c();if(!(1