/**
* State-based routing for AngularJS 1.x
* This bundle requires the ui-router-core.js bundle from the @uirouter/core package.
* @version v1.0.24
* @link https://ui-router.github.io
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("angular"),require("@uirouter/core")):"function"==typeof define&&define.amd?define(["exports","angular","@uirouter/core"],t):t((e=e||self)["@uirouter/angularjs"]={},e.angular,e["@uirouter/core"])}(this,function(t,e,x){"use strict";var r=angular,C=e&&e.module?e:r;function n(){var r=null;return function(e,t){return r=r||x.services.$injector.get("$templateFactory"),[new R(e,t,r)]}}var u=function(e,r){return e.reduce(function(e,t){return e||x.isDefined(r[t])},!1)};function i(n){if(!n.parent)return{};var i=["component","bindings","componentProvider"],o=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),e=i.concat(o);if(x.isDefined(n.views)&&u(e,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): "+e.filter(function(e){return x.isDefined(n[e])}).join(", "));var a={},t=n.views||{$default:x.pick(n,e)};return x.forEach(t,function(e,t){if(t=t||"$default",x.isString(e)&&(e={component:e}),e=x.extend({},e),u(i,e)&&u(o,e))throw new Error("Cannot combine: "+i.join("|")+" with: "+o.join("|")+" in stateview: '"+t+"@"+n.name+"'");e.resolveAs=e.resolveAs||"$resolve",e.$type="ng1",e.$context=n,e.$name=t;var r=x.ViewService.normalizeUIViewTarget(e.$context,e.$name);e.$uiViewName=r.uiViewName,e.$uiViewContextAnchor=r.uiViewContextAnchor,a[t]=e}),a}var o=0,R=(a.prototype.load=function(){var t=this,e=x.services.$q,r=new x.ResolveContext(this.path),n=this.path.reduce(function(e,t){return x.extend(e,t.paramValues)},{}),i={template:e.when(this.factory.fromConfig(this.viewDecl,n,r)),controller:e.when(this.getController(r))};return e.all(i).then(function(e){return x.trace.traceViewServiceEvent("Loaded",t),t.controller=e.controller,x.extend(t,e.template),t})},a.prototype.getController=function(e){var t=this.viewDecl.controllerProvider;if(!x.isInjectable(t))return this.viewDecl.controller;var r=x.services.$injector.annotate(t),n=x.isArray(t)?x.tail(t):t;return new x.Resolvable("",n,r).get(e)},a);function a(e,t,r){var n=this;this.path=e,this.viewDecl=t,this.factory=r,this.$id=o++,this.loaded=!1,this.getTemplate=function(e,t){return n.component?n.factory.makeComponentTemplate(e,t,n.component,n.viewDecl.bindings):n.template}}var c=(s.prototype.useHttpService=function(e){this._useHttp=e},s.prototype.fromConfig=function(e,t,r){function n(e){return x.services.$q.when(e).then(function(e){return{template:e}})}function i(e){return x.services.$q.when(e).then(function(e){return{component:e}})}return x.isDefined(e.template)?n(this.fromString(e.template,t)):x.isDefined(e.templateUrl)?n(this.fromUrl(e.templateUrl,t)):x.isDefined(e.templateProvider)?n(this.fromProvider(e.templateProvider,t,r)):x.isDefined(e.component)?i(e.component):x.isDefined(e.componentProvider)?i(this.fromComponentProvider(e.componentProvider,t,r)):n("")},s.prototype.fromString=function(e,t){return x.isFunction(e)?e(t):e},s.prototype.fromUrl=function(e,t){return x.isFunction(e)&&(e=e(t)),null==e?null:this._useHttp?this.$http.get(e,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(e){return e.data}):this.$templateRequest(e)},s.prototype.fromProvider=function(e,t,r){var n=x.services.$injector.annotate(e),i=x.isArray(e)?x.tail(e):e;return new x.Resolvable("",i,n).get(r)},s.prototype.fromComponentProvider=function(e,t,r){var n=x.services.$injector.annotate(e),i=x.isArray(e)?x.tail(e):e;return new x.Resolvable("",i,n).get(r)},s.prototype.makeComponentTemplate=function(c,s,e,l){function f(e){var t=x.kebobString(e);return/^(x|data)-/.exec(t)?"x-"+t:t}l=l||{};var v=3<=C.version.minor?"::":"",t=function(e){var t=x.services.$injector.get(e+"Directive");if(!t||!t.length)throw new Error("Unable to find component named '"+e+"'");return t.map(p).reduce(x.unnestR,[])}(e).map(function(e){var t=e.name,r=e.type,n=f(t);if(c.attr(n)&&!l[t])return n+"='"+c.attr(n)+"'";var i=l[t]||t;if("@"===r)return n+"='{{"+v+"$resolve."+i+"}}'";if("&"!==r)return n+"='"+v+"$resolve."+i+"'";var o=s.getResolvable(i),a=o&&o.data,u=a&&x.services.$injector.annotate(a)||[];return n+"='$resolve."+i+(x.isArray(a)?"["+(a.length-1)+"]":"")+"("+u.join(",")+")'"}).join(" "),r=f(e);return"<"+r+" "+t+">"+r+">"},s);function s(){var n=this;this._useHttp=C.version.minor<3,this.$get=["$http","$templateCache","$injector",function(e,t,r){return n.$templateRequest=r.has&&r.has("$templateRequest")&&r.get("$templateRequest"),n.$http=e,n.$templateCache=t,n}]}var p=function(e){return x.isObject(e.bindToController)?l(e.bindToController):l(e.scope)},l=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@&])[?]?(.*)/.exec(t[e])]}).filter(function(e){return x.isDefined(e)&&x.isArray(e[1])}).map(function(e){return{name:e[1][2]||e[0],type:e[1][1]}})},f=(v.prototype.decorator=function(e,t){return this.stateRegistry.decorator(e,t)||this},v.prototype.state=function(e,t){return x.isObject(e)?t=e:t.name=e,this.stateRegistry.register(t),this},v.prototype.onInvalid=function(e){return this.stateService.onInvalid(e)},v);function v(e,t){this.stateRegistry=e,this.stateService=t,x.createProxyFunctions(x.val(v.prototype),this,x.val(this))}function $(r){return function(e,t){var i=e[r],o="onExit"===r?"from":"to";return i?function(e,t){var r=new x.ResolveContext(e.treeChanges(o)).subContext(t.$$state()),n=x.extend(U(r),{$state$:t,$transition$:e});return x.services.$injector.invoke(i,this,n)}:void 0}}var d=(h.monkeyPatchPathParameterType=function(e){var t=e.urlMatcherFactory.type("path");t.encode=function(e){return null!=e?e.toString().replace(/(~|\/)/g,function(e){return{"~":"~~","/":"~2F"}[e]}):e},t.decode=function(e){return null!=e?e.toString().replace(/(~~|~2F)/g,function(e){return{"~~":"~","~2F":"/"}[e]}):e}},h.prototype.dispose=function(){},h.prototype.onChange=function(e){var t=this;return this._urlListeners.push(e),function(){return x.removeFrom(t._urlListeners)(e)}},h.prototype.html5Mode=function(){var e=this.$locationProvider.html5Mode();return(e=x.isObject(e)?e.enabled:e)&&this.$sniffer.history},h.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},h.prototype.url=function(e,t,r){return void 0===t&&(t=!1),x.isDefined(e)&&this.$location.url(e),t&&this.$location.replace(),r&&this.$location.state(r),this.$location.url()},h.prototype._runtimeServices=function(e,t,r,n,i){var o=this;this.$location=t,this.$sniffer=r,this.$browser=n,this.$window=i,e.$on("$locationChangeSuccess",function(t){return o._urlListeners.forEach(function(e){return e(t)})});var a=x.val(t);x.createProxyFunctions(a,this,a,["replace","path","search","hash"]),x.createProxyFunctions(a,this,a,["port","protocol","host"])},h);function h(e){this._urlListeners=[],this.$locationProvider=e;var t=x.val(e);x.createProxyFunctions(t,this,t,["hashPrefix"])}var m=(g.injectableHandler=function(t,r){return function(e){return x.services.$injector.invoke(r,null,{$match:e,$stateParams:t.globals.params})}},g.prototype.$get=function(){var e=this.router.urlService;return this.router.urlRouter.update(!0),e.interceptDeferred||e.listen(),this.router.urlRouter},g.prototype.rule=function(e){var t=this;if(!x.isFunction(e))throw new Error("'rule' must be a function");var r=new x.BaseUrlRule(function(){return e(x.services.$injector,t.router.locationService)},x.identity);return this.router.urlService.rules.rule(r),this},g.prototype.otherwise=function(e){var t=this,r=this.router.urlService.rules;if(x.isString(e))r.otherwise(e);else{if(!x.isFunction(e))throw new Error("'rule' must be a string or function");r.otherwise(function(){return e(x.services.$injector,t.router.locationService)})}return this},g.prototype.when=function(e,t){return(x.isArray(t)||x.isFunction(t))&&(t=g.injectableHandler(this.router,t)),this.router.urlService.rules.when(e,t),this},g.prototype.deferIntercept=function(e){this.router.urlService.deferIntercept(e)},g);function g(e){this.router=e}C.module("ui.router.angular1",[]);var w=C.module("ui.router.init",["ng"]),y=C.module("ui.router.util",["ui.router.init"]),S=C.module("ui.router.router",["ui.router.util"]),b=C.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),P=C.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),j=(C.module("ui.router.compat",["ui.router"]),null);function A(e){(j=this.router=new x.UIRouter).stateProvider=new f(j.stateRegistry,j.stateService),j.stateRegistry.decorator("views",i),j.stateRegistry.decorator("onExit",$("onExit")),j.stateRegistry.decorator("onRetain",$("onRetain")),j.stateRegistry.decorator("onEnter",$("onEnter")),j.viewService._pluginapi._viewConfigFactory("ng1",n());var u=j.locationService=j.locationConfig=new d(e);function t(e,t,r,n,i,o,a){return u._runtimeServices(i,e,n,t,r),delete j.router,delete j.$get,j}return d.monkeyPatchPathParameterType(j),((j.router=j).$get=t).$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],j}A.$inject=["$locationProvider"];function E(r){return["$uiRouterProvider",function(e){var t=e.router[r];return t.$get=function(){return t},t}]}function V(t,e,r){if(x.services.$injector=t,x.services.$q=e,!t.hasOwnProperty("strictDi"))try{t.invoke(function(e){})}catch(e){t.strictDi=!!/strict mode/.exec(e&&e.toString())}r.stateRegistry.get().map(function(e){return e.$$state().resolvables}).reduce(x.unnestR,[]).filter(function(e){return"deferred"===e.deps}).forEach(function(e){return e.deps=t.annotate(e.resolveFn,t.strictDi)})}V.$inject=["$injector","$q","$uiRouter"];function D(e){e.$watch(function(){x.trace.approximateDigests++})}D.$inject=["$rootScope"],w.provider("$uiRouter",A),S.provider("$urlRouter",["$uiRouterProvider",function(e){return e.urlRouterProvider=new m(e)}]),y.provider("$urlService",E("urlService")),y.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return j.urlMatcherFactory}]),y.provider("$templateFactory",function(){return new c}),b.provider("$stateRegistry",E("stateRegistry")),b.provider("$uiRouterGlobals",E("globals")),b.provider("$transitions",E("transitionService")),b.provider("$state",["$uiRouterProvider",function(){return x.extend(j.stateProvider,{$get:function(){return j.stateService}})}]),b.factory("$stateParams",["$uiRouter",function(e){return e.globals.params}]),P.factory("$view",function(){return j.viewService}),P.service("$trace",function(){return x.trace}),P.run(D),y.run(["$urlMatcherFactory",function(e){}]),b.run(["$state",function(e){}]),S.run(["$urlRouter",function(e){}]),w.run(V);var F,O,q,I,U=function(r){return r.getTokens().filter(x.isString).map(function(e){var t=r.getResolvable(e);return[e,"NOWAIT"===r.getPolicy(t).async?t.promise:t.data]}).reduce(x.applyPairs,{})};function k(e){var t,r=e.match(/^\s*({[^}]*})\s*$/);if(r&&(e="("+r[1]+")"),!(t=e.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/))||4!==t.length)throw new Error("Invalid state ref '"+e+"'");return{state:t[1]||null,paramExpr:t[3]||null}}function _(e){var t=e.parent().inheritedData("$uiView"),r=x.parse("$cfg.path")(t);return r?x.tail(r).state.name:void 0}function L(e,t,r){var n=r.uiState||e.current.name,i=x.extend(function(e,t){return{relative:_(e)||t.$current,inherit:!0,source:"sref"}}(t,e),r.uiStateOpts||{}),o=e.href(n,r.uiStateParams,i);return{uiState:n,uiStateParams:r.uiStateParams,uiStateOpts:i,href:o}}function T(e){var t="[object SVGAnimatedString]"===Object.prototype.toString.call(e.prop("href")),r="FORM"===e[0].nodeName;return{attr:r?"action":t?"xlink:href":"href",isAnchor:"A"===e.prop("tagName").toUpperCase(),clickable:!r}}function H(o,a,u,c,s){return function(e){var t=e.which||e.button,r=s();if(!(1